Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Why do new browsers use Chromium instead of Firefox as their base?
301 points by josemando on Jan 12, 2022 | hide | past | favorite | 183 comments
Every time there is a post here related to Firefox, I see a lot of people complaining about the state of browsers and the utterly dominance of Chrome and Chromium based browsers.

I’m wondering if that are technical reasons why the newish browsers (such as Brave or Edge) are choosing Chromium instead of Firefox as their starting point.

If so, shouldn’t this be a priority for Mozilla to change that?




Gecko and servo are both not easily embeddable.

Servo isn't a finished rendering engine yet and the browser I saw that could exclusively use servo was not compliant enough and since mozilla fired the servo team there is no certain future for it anymore. Projects that tried to make servo embeddable are all dead and gone (see https://github.com/paulrouget/servo-embedding-example for example)

So yeah last time I tried to use gecko I failed and didn't try again (years ago) nobody is willing to do the work and mozilla seems to focus more on other stuff...


That non embeddability is probably also a major reason why there isn't a significant node competitor based on spidermonkey. I get wanting to focus on Firefox as a whole, and that making components more independent can add quite a bit of work. But at the same time, if it was easier to use gecko in other browsers, and spidermonkey as JS environment outside the browser, I wonder if that would increase usage of and interest in the underlying technology.


Spidermonkey is quite embeddable by itself [1]. On Linux things like polkit, couchdb, mongodb use it. Still, the compilation process seems to download the whole firefox tarball and only compiles the JS related parts [2, 3].

[1] https://spidermonkey.dev

[2] https://archlinux.org/packages/extra/x86_64/js78/

[3] https://www.linuxfromscratch.org/blfs/view/svn/general/js78....


And the fact that polkit uses it is why debian and ubuntu use an ancient version of polkit. And fwiw, there is an effort to replace spidermonkey in polkit with something else, like duktape.

Also js78 uses the version of spidermoneky from Firefox 78. The current Firefox ESR is 91 (released in august), but I don't see any js91 package, and https://github.com/mozilla-spidermonkey/spidermonkey-embeddi... still says to use the 78 ESR. Note that ESR78 is end of life and no longer receives security updates.

And from what I understand, there is no attempt at backwards compatibility in the spidermonkey interface, so each upgrade requires a lot of changes to the embedding program.

Yes, it is possible to embed spidermonkey, but there are a lot of challenges.



We embedded spidermonkey as the JavaScript engine for the prime video application on games consoles and smart TVs when I was at Amazon (5 years ago+ not sure if they still use it). I've not embedded any other JS engines, but it wasn't too bad to embed.


Actually, I just realised what I said above was slightly inaccurate, we also built an application that embedded CEF, so I technically have embedded another js engine (that was 7+ years ago though, and my memory is spotty).

CEF was also relatively straightforward to use. Both times we were embedding them in C++ applications.


This was the biggest fumble of the Mozilla strategy in the last 20 years. Instead of focusing on the developer market, particularly after the appearance of WebKit, they bet (half) the farm on a quixotic quest to build a mobile OS from scratch. By attempting to gain a level of control that was always unlikely, they endangered their own survival.


I would have made that same mistake if I was making decisions for Mozilla at the time. It's such an elegant, logical and tempting ideal to turn the browser into the OS. Too bad it didn't work out.


Well, now we have PWAs. I'd be more than a bit bitter if I was a mozilla dev tasked with making those work on android/ios instead of on firefoxOs.


Good luck getting Apple to allow basic features like storage without weird limits, notifications, and the rest of the list. They killed Flash in favor of HTML5+JS and then decided for the walled garden.


KaiOS though has had success. If anything FxOS was ahead of its time and targeting a market too small.


Interestingly there was a (never finished) Node fork based off SpiderMonkey (https://github.com/mozilla/spidernode had to write a V8 shim on top of SpiderMonkey), and GNOME Shell and some GNOME apps are written on gjs which uses SpiderMonkey. I don't know if it's bad at embedding compared to V8, but it's definitely been done.


MongoDB embeds SpiderMonkey. Embeddability of SpiderMonkey is fine. It is Gecko that is the problem.


Interestingly, MongoDB switched from SpiderMonkey to V8 only to switch back a few releases later.

https://engineering.mongodb.com/post/code-generating-away-th...


I embedded it in https://digiguide.tv/products/windows.asp around 20 years ago.

Aside from thread-wrangling I thought it was trvial to embed.


> 32mb RAM and 8mb Disk Space.

I miss such numbers so much.


>since mozilla fired the servo team there is no certain future for it anymore.

When did that happen? It seems the managerial class has completed their takeover of Mozilla in the last few years. A real shame, since it basically cedes the entire web to Google.



>it basically cedes the entire web to Google

Refocusing on making Mozilla a viable entity without the need for cash splashes from Google is doing precisely the opposite. By diluting Google's financial control it ensures decision-making is both actually and ostensibly impartial.

Gecko is still a perfectly functioning browser engine. It's far easier to keep Gecko up to date with modern web standards than reinventing the wheel.

As nice as it would be to have a free and open source browser engine written in a memory safe language, I can't see there being a lot of money in it for Mozilla.


In 2013 Mozilla spent $197M on software development and $30M on general/administrative.

In 2020 it was $242M and $137M.

The future-focused servo team was not the place to cut a couple million.


It seems to me, that once a company reaches a tipping point of more than 50% non-engineers in upper management, it's the demise of the company as an engineering company, and it will slowly drift in the direction of being a technology holding company only.


I wouldn't be this cynical if everyone said the same thing to the Firefox OS back then. It turned out that Firefox OS did have much potential to countries with less mobile penetration, as observed from KaiOS's success in India.

Was the Firefox OS less future-focused than Servo? I don't think so, and given that Servo actually did survive long enough to give back to the mainline Gecko (in the form of WebRender and so on). It might or might not make actual sense to conclude that as the ROI shrinks, but it is always easier to claim the decision was wrong after that decision.


Well, many claimed that back when decisions were being taken. They could have scrapped FFOS much sooner than they did.

> Firefox OS did have much potential to countries with less mobile penetration, as observed from KaiOS's success in India.

Such "success" is inevitably fleeting. Eventually a "developing" market develops to demand more established and desirable products. Nokia had those markets under lock and key for a long time, back when EU/US had already moved on to iPhone-like products; but then consumers inevitably gravitated towards the fashionable.


> Nokia had those markets under lock and key for a long time, back when EU/US had already moved on to iPhone-like products; but then consumers inevitably gravitated towards the fashionable.

“fashionable” is the wrong word: it should be “functional”. Those old Nokia phones were very good at being phones but that's it — maybe a minimal messaging app, but anyone who used one knows just how limited those old mobile OSes were.

I think FirefoxOS was an interesting idea but there are really important thresholds you need to be able to hit and that was the critical error they made. There was no plausible way to grow the low-end feature phone market into a large enough business to get there when competing with cheap knock-off Android devices. If they'd started years earlier or gotten a major vendor on-board, maybe, but at their funding levels there was no way to make the numbers work and it was pretty clear at the time that this was a low-probability gamble.


Not if the platform can leverage its position to move upmarket, as Japanese, Korean and now Chinese manufacturers have.


  > In 2013 Mozilla spent $197M on software development and $30M on general/administrative.
  > In 2020 it was $242M and $137M.
  > The future-focused servo team was not the place to cut a couple million. 
Wasn't it just after 2013 when the replacement politically-correct CEO got quadruple the pay of the not-politically-correct engineer CEO?


That's a bit of an oversimplification, it's not like they had a choice between adequately funding R&D projects or Doing Political Correctness and chose the latter. Besides, remember that Eich was appointed in 2014 and had only a short stint at CEO, so I don't think you can attribute the 2013 figures to him

I think all of us on HN are a bit saddened about Mozilla cutting back on the Rust and Servo teams, but political-correctness isn't the reason behind that. Let's not turn this into one of those discussions.


They did give like a 10k grant for people to remove master/slave terminology from docs, so who knows what other PC work they were funding.


>They did give like a 10k grant for people to remove master/slave terminology from docs, so who knows what other PC work they were funding.

As a black person in tech, I can't tell you how much that whole debacle drives me insane. I never once in my life ever made the association between "master branch" and "slave master". But now every single time I pull a repo with a "main" branch instead of "master", I have to think about it and play along to assuage someone's white guilt. I absolutely refuse to ever make the switch.


As someone whose grandfather was an actual slave, I agree with this 100%. If I pull a repo and find "main" I have to WTF and be reminded again that somebody somewhere has a guilty conscience. I would have preferred that they keep their guilty conscience to themselves and let us work without constant reminders of the chip on their shoulder.


I think I can set your mind at ease on this one. If you see "main" instead of "master" then I can almost guarantee that it's not someone with a guilty conscience believing that naming their branch differently absolves them of something they or their ancestors did. But rather it's someone trying to follow a broader movement whose aim is to try to avoid terms they think are rooted in hatred or oppression.

If you're getting harrassed by someone because you've got some repos with a "master" branch then I sympathise with you - the people giving you shit are likely engaging in a bit of performative outrage and don't really understand what this is all about. However if you're really getting upset when you clone a repo and see that someone's named it "main" then I have to say that might be on you.


> I can almost guarantee that it's not someone with a guilty conscience believing that naming their branch differently absolves them of something they or their ancestors did.

"white guilt" doesn't necessarily care if their ancestors did it.

> But rather it's someone trying to follow a broader movement whose aim is to try to avoid terms they think are rooted in hatred or oppression.

It's annoying and sigh-inducing to be reminded that such a movement is full of people that don't understand how words work, that "master" has plenty of perfectly good contexts that don't imply "master/slave".

> However if you're really getting upset [...] that might be on you.

Nobody is "really getting upset" and that entire part of your post is needlessly insulting.


> "white guilt" doesn't necessarily care if their ancestors did it.

Honestly don't know what you're getting at here. You're going to have to spell this one out to me.

> It's annoying and sigh-inducing to be reminded that such a movement is full of people that don't understand ... that "master" has plenty of perfectly good contexts

I don't disagree. See my comment about people engaging in performative outrage, it does exist. But in this case you're annoyed at the very sight of the word "main". Like ... c'mon

> Nobody is "really getting upset" and that entire part of your post is needlessly insulting.

Are you misunderstanding that "However if you're really getting upset ..." means "However you're truly getting upset ..." and not "You're getting really upset ..."? Additionally if you read my comment, I provide two interpretations:

1. they exclaim "WTF" when attacked for having named a branch "master" (IMO understandable)

2. they exclaim "WTF" at the very sight of a branch named "main" (IMO a bit silly)

I honestly don't know which is the right one. It is up to the commenter if they want to tell us which it is.

Update: and just like that this part of the thread has become the farce I feared it would, we are debating whether the words "main" and "really" are offensive. This is a very important thing to consider when answering the question "Why do new browsers use Chromium instead of Firefox as their base?"


> Honestly don't know what you're getting at here. You're going to have to spell this one out to me.

You said "I can almost guarantee that it's not someone with a guilty conscience believing that naming their branch differently absolves them of something they or their ancestors did." but the accusation of doing it out of "white guilt" isn't really saying they were trying to absolve themselves of something their ancestors did.

> I don't disagree. See my comment about people engaging in performative outrage, it does exist. But in this case you're annoyed at the very sight of the word "main". Like ... c'mon

Annoyance is pretty mild. If seeing it reminds me of it, what do you expect to happen? I don't think that's unreasonable.

> Are you misunderstanding that "However if you're really getting upset ..." means "However you're truly getting upset ..." and not "You're getting really upset ..."?

I understand that. By even bringing it up you're implying it's necessary to worry about people "truly getting upset" which is not saying great things about your opinion of your conversation partners. I mean look above where you said "c'mon", you're implying that it's unreasonable for me to be "annoyed".

> Additionally if you read my comment, I provide two interpretations:

And I was talking about interpretation 2 specifically.

I interpret "I have to WTF" as something akin to a double take, not "truly getting upset".

> This is a very important thing to consider when answering the question "Why do new browsers use Chromium instead of Firefox as their base?"

Shrug.


I think changing the default in Git was fine — it's such a small amount of work and doesn't affect existing projects — but what I really wish was that more people had taken this as the cue to ask what “master” even meant for their project. I've tried to switch my projects to names which actually describe what we use them for — e.g. tracking branches like development, staging, production representing what is currently being deployed to those environments — and that's been far more worthwhile because it brings clarity to discussions and simplifies things like CI/CD scripting.


This is a silly conspiracy theory if you think about it even a little bit. The grant you're referring to was $15K grant to Buildbot, which Mozilla has used heavily for years, and that was both to update terminology and “also to make improvements so Buildbot works better in the Amazon EC2 cloud” — guess which one is more work? — and $15K is a big amount to an open source maintainer but tiny when you're talking about budgets measured in hundreds of millions of dollars. You don't solve major budgetary issues by going after tiny fractions of one percent when there are individual people making orders of magnitude more money.

Mozilla is also one of the most open companies in our field — given how often we read about far less significant events there, it seems incredibly unlikely that there's some sort of substantial but well-concealed dark funding of “PC work” which has remained secret even after, say, lots of people being laid off or leaving especially when such work would by necessity have visible impacts.


where can I find this statistics?



It happened when Mozilla laid off 25% of their staff. Servo was probably part of that because it was more of a research project than part of the core business.


Isn't their core business just helping google avoid anti-trust issues by being the "other" browser?


Well. Can't step on Google's embedability then.


OOF


I really hope that does not end up being the case because Firefox is better than ever in my opinion


Early attempts at embedding browsers in games were based on Gecko as well.

But it didn't become more widespread until a switch to Chromium was made, which made the entire process a lot simpler in both execution and distribution.

And there hasn't really been a need to revisit Gecko.


Wasn't Rust specifically invented to rewrite Gecko?


Rust was a personal project of Graydon Hoare. Mozilla jumped on the Rust train 3 years after its inception. https://web.archive.org/web/20160609195720/https://www.rust-...


It seems like everyone has reached much the same conclusion: there may be many factors, but the real killer and root cause is that Chromium is well suited to being embedded, and Gecko is not.

So hey, any companies out there interested in bringing back a little diversity in browser engines? Or just making a tiny dent in Google's dominance for the greater good? Consider funding work to make Gecko better suited to embedding.


> root cause is that Chromium is well suited to being embedded

Bingo. Let's not forget, Chromium itself is built off a fork of kHTML, the rendering-engine-as-a-library originally developed and used by KDE project.

Apple forked kHTML and released WebKit. That gave the world Safari. Not long after, WebKit became the engine powering Chromium/Chrome, but with process isolation and high-octane JavaScript interpreter (V8). Then quite some time later, frustrated by Apple's control over the engine, Google forked WebKit and came out with Blink.

Sometimes the only difference between provenance and history is the written narrative.


Yeah, WebKit really tilted the scale. KHTML had been built to be easily embeddable already (since it was supposed to be used across the whole KDE desktop, following what MS had done with "Active Desktop" in Windows 2000/XP), and Apple gave it the polish and popularity to make it the obvious choice. Any org or ecosystem who needed a rendering engine rushed to wrap WebKit, and that included Google.


> Then quite some time later, frustrated by Apple's control over the engine, Google forked WebKit and came out with Blink.

I see you've bought into Google's historical revisionism.

When Google introduced multi-process rendering into Chrome, it was a massive technical innovation, but it was built at such a low level that it was effectively proprietary to Chrome. No one else could use it without pretty much adopting all of Chrome.

Apple (along with the rest of the technical world) recognized the benefits of multi-process, but Apple wanted to ensure that literally anyone building a WebKit-based browser could gain the benefit of multi-process rendering. So they created WebKit 2 [1]:

"WebKit2 is designed from the ground up to support a split process model, where the web content (JavaScript, HTML, layout, etc) lives in a separate process. This model is similar to what Google Chrome offers, with the major difference being that we have built the process split model directly into the framework, allowing other clients to use it."

In other words, Google's main technical advantage would be baked into the browser engine itself and made available for everybody.

As you can imagine, Google was less than thrilled, and the differing natures of the multi-process implementation led to duplication and complexity. So, when Google decided that supporting multiple architectures was too much work, it had a choice.

Google could do the hard work of switching Chrome's multi-process rendering to WebKit 2, which would mean a significant browser rework, but it would mean that any and all browsers derived from WebKit would have all of the same basic capabilities, and at the same level, as Chrome itself.

Or, Google could use it as an excuse to proprietize its work by forking, thus ensuring that any future stream of enhancements made to the browser would only benefit Google and Chrome instead of everybody.

In the end, Google decided that the only thing it cared about was itself:

"However, Chromium uses a different multi-process architecture than other WebKit-based browsers, and supporting multiple architectures over the years has led to increasing complexity for both the WebKit and Chromium projects. This has slowed down the collective pace of innovation - so today, we are introducing Blink, a new open source rendering engine based on WebKit."

So remember, when Google made a proprietary technical leap in an otherwise open source project, it was Apple, not Google, who made sure that everyone could benefit from the same technical leap. And when it became too difficult to maintain two versions, it was Google, not Apple, who forked the engine and the community in order to proprietize improvements for their own gain.

--

[1] https://lists.webkit.org/pipermail/webkit-dev/2010-April/012... [2] https://blog.chromium.org/2013/04/blink-rendering-engine-for...


> In other words, Google's main technical advantage would be baked into the browser engine itself and made available for everybody.

This is a bit of a silly narrative built on what's basically different architectural decisions. Chrome embedding was intended to be through CEF (which was fully multi-process), while WebKit through WebCore.

You could just as easily say that Apple decided not to do the hard work of migrating Chrome's multi-process architecture into WebKit and instead made a hard break and just started landing incompatible changes. From the thread you posted, you can even see a WebKit embedder at KDE blindsided by the news[1].

But in reality, browsers are hard, and in a way WebKit and Chrome were always forks but with shared components. The Blink fork was just a fork of one of the biggest of those components and a formalization of what was pretty much always the case by moving to separate source control, code review, etc.

[1] https://lists.webkit.org/pipermail/webkit-dev/2010-April/012...


> the real killer and root cause is that Chromium is well suited to being embedded, and Gecko is not.

When Firefox was new, it was trivial to embed Gecko. There was an ActiveX-Widget that you could just drag to your VB or C# form and get a browser. There were also a bunch of browsers which were just wrappers around Gecko (K-Meleon or Galeon). It was also possible in other environments, though maybe not so easy - StarOffice/OpenOffice included Gecko, too. One reason this was possible is that from the beginning, Gecko was built with components in mind. XPCOM was very much like COM and allowed you to have a stable C++ ABI. Your classes are basically structs with a known memory layout and function pointers, and you use interfaces to access them.

Unfortunately it was a bit overengineered, and component technologies fell out of favor and were removed from many projects (XPCOM, COM, BONOBO, UNO...). I think it was a overreaction to the excesses of object orientation in the 90s- Microsoft is moving back to the opposite direction with WinRT. Anyway, the modularity was removed from Firefox/Gecko on purpose in order to simplify the code.

Webkit comes from a similar heritage (Kparts). I think the reason why there are embeddable Webkit widgets is just because people did the work to create them - QtWebKit, WebView2, ..., not because Webkit is inherently more embeddable. In fact, the multi-process nature causes a bunch of problems. You can't just reach into the DOM from your native code, but you have to inject JS to manipulate it, and so on.


real killer and root cause is that Chromium is well suited to being embedded, and Gecko is not.

I don't think that's really the key problem since you don't have to build a new browser out of FF by embedding Gecko. FF itself is a browser that was made out of another browser, much of the old core Mozilla technology is basically a cross-platform app-building framework with one of the 'apps' being a browser. Somewhat unobviously, this turned out not to be a great way to build a browser in the long run.


> Somewhat unobviously, this turned out not to be a great way to build a browser

It's actually great in the amount of flexibility and access it gives to 3rd-party developers to customize the browser itself. Unfortunately, the price seems to be complexity and rigidity in some critical areas (performance, embeddability).


>Consider funding work to make Gecko better suited to embedding

Mozilla seems to choose what to do with donations though. I don't think there's any way to target funding for Gecko, Rust, etc.


I think the suggestion being made here is that if somebody else did that work, they might be willing to merge it into their tree.


Has Mozilla showed any reason to bet on them in the last decade? It seems like leadership is happy to sink the company and take bonuses paid for by donations along the way.

I'd rather see a new player in the space. I have no confidence in Mozilla.


If a 501(c)(3) non-profit receives a donation for a specific project, by law they cannot direct the funds toward anything else unless the donor releases the funds for another purpose. This is more of a thing with large donations than, say, a recurring $10/month. If a small-dollar donor tried to restrict their funding, the non-profit would probably ignore the restriction because the donor has no leverage to find out if their instructions were followed.

If anyone with a ton of money wants to focus Mozilla specifically on Gecko, Rust, whatever, then that person can probably get them to do it.


This is the reason I stopped donating and stopped using Firefox. They won’t give up control and I don’t want a cent sent to anything but firefox/rust.


I think you would have to be funding a fork. I would point to LibreOffice and OpenOffice as an example.


If not even Microsoft is willing to make that investment (given its vast resources), it's unlikely any smaller players would. I agree with the sentiment (diversity is good), but it's extremely expensive to build a browser. Maybe that's the real issue.


My understanding was that, something like a decade ago, Qt tried that. Fresh embedding API and everything. Maybe it's fine to try again? Maybe Mozilla will be more receptive this time…


Consider funding work to make Gecko better suited to embedding.

Well, with that said, Mozilla is the wrong shepherd for Firefox given that they laid off 25% of their workforce last year.


Could someone explain what _embedding_ means in the context of web browsers? Thanks


Including as a library rather than running as a complete program.


As an engine, Chromium has overwhelming market share, so it decreases risk to build on top of it. Choosing an alternative browser engine increases risk.

Embeddability has little to do with it; Chromium (as opposed to WebKit) isn't actually that embeddable. Rather, market share is king. With a high market share, the community will step up with projects like Electron and Chromium Embedded Framework that add embeddability.


> Embeddability has little to do with it; Chromium (as opposed to WebKit) isn't actually that embeddable.

No way. I remember the bad old days of XULRunner. In 2010, pre-Electron, it was literally easier to implement my own WebKit-based app from scratch in C++ than it was to follow the documentation and use XULRunner.

Firefox's embeddability was bad. Really bad.


And Chromium's embeddability is just as bad. Notice you're talking about WebKit, not Chromium. Chromium doesn't even have a XULRunner.


Chromium Embedded Framework is Chromium's XULRunner. It was much easier to use and maintain than XULRunner, which is why it's still maintained to this day, and XULRunner is in the trash.


CEF is a third-party project that isn't officially supported by Google, unlike XULRunner. Which gets back to my point about market share: when you're popular enough, then people will step in to provide embeddability (in this case, CEF) on top of your non-embeddable product (Chromium). You could easily imagine an alternate universe where Firefox was the #1 browser and someone stepped in to write a Gecko Embedded Framework. The reason why Chromium Embedded Framework exists and Gecko Embedded Framework doesn't is market share.


You have your cause and effect backwards. That market share was achieved in large part by ease of embedding. Google itself started the project on WebKit because it was easier to embed and manipulate than anything else, and were pretty careful to allow others to do the same one level higher up the stack (i.e. making it easy to build your own branded browser on top of Chromium).


It's never been easier to build a custom branded Chrome than to build a custom branded Firefox. Building a custom branded Firefox is very easy, which is why tons of people have done it.

Google achieved market share by taking the embeddable WebKit, wrapping it in a non-embeddable wrapper called Chromium, and eventually forking WebKit to Blink in large part to make it non-embeddable and more tightly coupled to Chromium.


Custom branding and embedding aren't the same thing though.


Correct. And Chromium, as shipped and supported by Google (not third-party projects like CEF), is no better than Firefox at embedding (and certainly wasn't when Chromium was taking off in market share). There is a reason why Chromium-based browsers are forks of Chromium, not embeddings of Chromium.


There is a parallel universe where Gecko was always more embeddable and approachable, and Google used it as the base for Chrome.


There is the Chromium Embedded Framework which makes it somewhat easy to embed Chromium: https://github.com/chromiumembedded/cef


While embedding Gecko in desktop applications is not as straightforward as embedding Chromium, Mozilla's GeckoView project makes it easier to do this on Android:

https://mozilla.github.io/geckoview/

GeckoView is the foundation of Firefox for Android and Firefox Focus. The SmartCookieWeb-Preview browser, which supports sideloading Firefox extensions on Android, is also based on GeckoView:

https://github.com/CookieJarApps/SmartCookieWeb-Preview


But then again on Android the OS already provides a Webview implementation for usage by apps, so while on Android Gecko might be more easily emebeddable than on Desktop, it's then hobbled by the fact that on Android the choice for app developers is either using the default Chrome/Blink-based Webview provided by the OS at absolutely no size-penalty, or else thinking about shipping a full browser engine with your app at a size penalty of dozens of MB, at which point you might then consider possibly using GeckoView instead of shipping your own specific version of Blink.


Can this be offered as a library that many apps could share?


No idea. With flash this certainly used to work (i.e. Adobe distributed an APK with the Flash plugin, and other browsers including Firefox were able to use the library contained therein), but of course Flash has been discontinued for quite a while now and I don't know whether a similar approach might still work with the most recent versions of Android.

In any case though this would raise the backwards compatibility constraints on Mozilla quite a bit, and I'm not sure whether they'd be willing to take on that burden. Of course even now they can't go around breaking GeckoView-APIs all willy-nilly, but when it does happen, it "only" affects app developers the next time they want to recompile their app with a newer GeckoView version.

If GeckoView was being distributed as an independently, user-installable library instead, any breakage at all becomes a big no-go, because users naturally expect their existing GeckoView-using apps to keep working regardless of which updated version of GeckoView they might happen to install.


As others have said; Gecko and Servo are not easily embeddable.

That was Apple's reported reason for using KHTML and making WebKit which Google used for Chrome and forked eventually. They wanted something light and embeddable. Don't blame them. Also, that software was LGPL.

I was always hoping that Microsoft or Apple would fund the Mozilla Foundation to keep a competitive web engine afloat and prevent Google Chrome engineers from dominating the web. They can take the Firefox code for their closed source software under the MPL.

Really doubt MS is going to do that these days. Kinda hoping Apple does since Safari is often the last to support new web standards. It would take very little of their profit and yet keep a big competitor from dominating a critical function of their most profitable products. This is regardless if they actually use Gecko or Servo.


> Gecko and Servo are not easily embeddable.

That's right. And the Safari team chose KHTML despite the presence of Dave Hyatt - a key Firefox developer and creator of Camino browser (which did embed Gecko). That's probably everything one needs to know about how easily embeddable Gecko is.


> Safari is often the last to support new web standards

Where "web standards" are "whatever Chrome does", and written by Chrome devs. There you've also got the reason nobody starts from the FF/Gecko/Servo codebase.


Yea there's no reason other than greed to not fully implement pwas, local storage over 500mb, and native share intents to pwa


Chromium embeds the Blink browser engine which is a fork of WebKit which is a fork of KHTML.

You can read Creative Selection by Ken Kocienda to get the backstory on why they chose KHTML over Gecko. You can also Google for podcasts that Don Melton has been on.


> on why they chose KHTML

For those who don’t know: “they” is Apple here. Apple forked KHTML to create WebKit. Google contributed to WebKit and later forked it into Blink.


I had a conversation here with people about Servo and it was immediately clear that it was a collection of people who wanted to play around with Rust and not actually solve a problem that people have while saying that they did. They were way more concerned with bullshit like governance than meat and potatoes like writing a getting started article.

> Servo’s mission is to provide an independent, modular, embeddable web engine, which allows developers to deliver content and applications using web standards.

This is servo's mission, on their website, and the last time I checked, they provide absolutely no documentation on how to actually do it.

If you need embedded, just use CEF like everyone else. If you need a browser base, just use Chromium. Everyone else is dicking around.

I would have written a WebKit port[1] for my own purposes, because CEF has significant technical limitations, but WebKit has no documentation on how to do it either. They have documentation on what a WebKit port is, and what ones exist, but not actual documentation on how to create your own callbacks for view abstraction and blitting etc. It's a much more significant effort compared to just using CEF.

[1]: https://trac.webkit.org/wiki/SuccessfulPortHowTo


The documentation on how to run it is in the readme. They've only got pre-release builds available on their website, since the tech isn't production ready yet.

I've been compiling it locally and playing with it. I run it like:

$ servo https://news.ycombinator.com

To do that, I've got an alias set up to point to my dev build.

alias servo='f() { /home/tychi/SourceCode/servo/mach run --release $1 };f'


The question was how to Embed servo, not how to Run servo


One reason is that Firefox is an older browser design (compared to Chrome), in parts retrofitted. That's a difficult, laborious rut to get out of, especially if your competition has more resources and a big head start. If you're starting a new browser variant, it doesn't make much sense to also start with Mozilla's disadvantage.


Chrome was architected specifically to overcome the shortfalls of the IE and Firefox engines at the time. Firefox has not only been playing catch-up, it's been playing catch-up against specifically its greatest weaknesses.


It's what happens when you fire you engineer CEO for his personal opinions (that I disagree with) and replace him with a "company culture" that has nothing to do with engineering, but has the "right" opinions.


Firefox became competitive again on a technical level after the overhaul with 57 long after Eich was gone, and under Eich the browser was already in a steady state of decline for a long time both technologically and in terms of usershare.

Trying to ride old stereotypes about engineers and management that has nothing to do with facts is pretty cringeworthy.


Guess which one is better in 2022, Firefox or Brave? (except maybe containers)

Firefox was born in 2002 (under Eich management) as Phoenix, it's kinda obvious that 16 years later (57 is from 2018, Eich left in 2014) it needed a technological upgrade.

In ~2009-2010 Firefox was used by 33% of the web users.

Today it's at ~6%.

I blame management, the alternative is believing Firefox just had bad luck or that developers at Firefox suck (which they do not)


> I blame management, the alternative is believing Firefox just had bad luck or that developers at Firefox suck (which they do not)

There are other factors at play than managerial incompetence:

- the entire iOS part of "all web users" uses WebKit because Apple doesn't allow other engines. For Android, most devices ship either Chrome or a WebKit wrapper (the default Android WebView), and many users don't bother switching browsers from the default. As ever more Web usage moves towards mobile, the disadvantage towards Firefox only accelerates - which is part of the reason why Mozilla tried to build a competitor.

- Many users also don't bother very much to switch their desktop browser. Apple users, especially on mobile, tend to stay with Safari as not even Chrome can keep up with the battery life optimizations Apple did, much less Firefox (not to mention Apple probably doesn't even grant non-Apple apps access to entitlements, but that's just guesswork).

- Netflix and other DRM content. A lot of people went to Chrome back in ye olde days when getting Netflix to run in HD resolutions (or at all) was a nightmare on everything sans Chrome (and Internet Explorer), and thanks to inertia (see above) they stayed on Chrome. And I'm not even wishing to fault Mozilla's management for resisting DRM for as long as they did, but in the end customers voted with their download buttons for convenience.

- The desktop users that do switch their desktop browser switch mostly to Chrome because Google blasts out tons of ads to switch to Chrome, not to mention website developers suggesting their users to move to Chrome or outright announcing that bugs involving browsers other than Chrome won't get addressed.

The last thing is undoubtedly the biggest issue - it is impossible to counteract the advertising and other financial firepower of Google. In ye olde times, regulatory agencies should have stepped in long ago to ban the cross-promotion that Google did (similar to the MS judgements), but they didn't and now we're living in a browser duopoly that is rapidly devolving into WebKit monopoly.


> There are other factors at play than managerial incompetence:

I agree there's no single point of failure, but IMO what made Firefox (and Mozilla before it) different was that it was different.

they played catch-up against Chrome with the result that they did not gain new users and lost many of the older ones

I still use Firefox on desktop, but on mobile first they removed the extensions from their mobile browser, then announced they would only support WebExtensions API, removing a ton of features from existing extensions, then they started purging "controversial" extensions (as in controversial in the eyes of Google) from their addons web site, that basically made Firefox a worse Chrome.

The nails in the coffin for me have been laying off the entire devtools, MDN and servo development teams and the ads in the search bar.

All of this started happening soon after Eich left.

I'm not saying Eich alone could save Firefox, he's also a person I dislike on a human level and he's probably more troubles than he's worth for a company, but my opinion is that Firefox "new" mindset post Eich disappointed its true fans that were mainly developers and you don't recover from that.

EDIT: I understand the need to make money, but are Pocket Premium or reselling VPNs the right way for a browser vendor?


I prefer firefox to brave


I mean, they had an internal employee revolt, since his “personal opinions”, opinions backed by cash, were that those employees should have their human rights limited.

You can’t lead effectively if the people you are trying to lead justifiably view you as hostile to them.


> were that those employees should have their human rights limited

I repeat it: I don't like Eich, I don't like his opinions, but he never laid off entire dev teams, he used his personal money to support his personal world view, it has nothing to do with what people at Mozilla could or couldn't do.

> You can’t lead effectively if the people you are trying to lead justifiably view you as hostile to them.

Is it better if your righteous new CEO fires you?


This is actually not the case.

Because someone supports creating new laws for other kinds of marriage than traditional doesn't mean that they hate or want to limit the rights of some groups.

Eich donated significant sums of money to LGBT organizations both before and after the voter referendum.


At this point, more people are using Chromium, so more devs target it, so more browsers are based on it. However, in the beginning, Firefox’s engine (Gecko) was harder to embed than Chromium’s engine (Blink).

https://www.reddit.com/r/firefox/comments/m8cwdu/why_arent_t...


The Mozilla rendering engine (gecko) was never meant to be embedded in the same way webkit is. It changed a little with Fennec and firefox. The engine became leaner... Yet still it isn't easy to reuse.

Even spidermonkey, the javascript engine, is never reused as v8.

Different design priciples


>Even spidermonkey, the javascript engine, is never reused as v8.

GNOME and Cinnamon desktops use it, MongoDB uses it, polkit, etc. It's obviously not embedded nearly as much as V8 but it does have a few.


But aren’t Brave, Edge and Opera based on Chromium instead of only Blink? Am I missing something?


Blink is a part of Chromium, but not really a decoupled part. Having blink without the rest of Chromium isn't really possible at this time. Some details at https://www.chromium.org/blink https://www.chromium.org/developers/content-module


I think the point is gecko is to blink, as firefox is to chromium. Sure, there are various browsers based on chromium out there, but they're not embedding blink. They're reskins of chromium with additional changes. How much more difficult is that compared to what goes into making iceweasel from firefox, I couldn't tell you.

But the "embedding gecko is hard, embedding chromium is easy" explanation certainly seems to be wrong, in terminology at least.


Brave started in 2015 on Gecko, using Graphene (FirefoxOS multiprocess/sandboxed app framework). We switched by end of year due to too many gaps (HTML5 DRM was a big one) and incompatibilities (mobile, mostly). Big spreadsheet, most rows netted out negative for Gecko. No way to change now, and a worse bet now based on Mozilla fundamentals.


I think Chromium’s performance contributed a lot to its dominance. Browser distributions have to build off of it to be relevant.

Other than Ekioh’s Flow, I don’t know any other competitive attempts from companies building browser components from scratch.


The aggressive advertising on many of the most popular sites on the web also helped a lot, the occasional accidental breakage of other browsers on those same google properties also worked out in their favor.


Performance & security, easy choice.


I only use firefox because of it's multi-account container capabilities and some other better privacy features, which is more to do with it's wrapper vs. it's actual engine. Someone could make multi-account containers or better with chromium, and if they did I would just use that instead.

Otherwise firefox is a slower, less secure browser and an older more crufty codebase and less webdevs test it thoroughly. Why would I choose it as a new browser wrapper developer ever?


>Otherwise firefox is a slower, less secure browser

I'd like to see citations on that - AFAIK (my opinion is as baseless as yours) FF is plenty fast on desktop, and there is nothing inherently less secure about it than Chrome.

I do use Vivaldi (based on Chromium) on Android, but I consider Firefox Mobile and Desktop to be separate products.


Empirically, Firefox falls more easily than Chrome at Pwn2Own, and the exploit chains don't need to be very long.

Good news is, there is research that finds the Rust components of Firefox have much less memory safety bugs. Bad news, moco is not investing in Rust very much at all, anymore.


On perf metrics (artificial and specific websites) firefox is consistently slower than chrome and safari. It's improved a lot and on a good desktop, it's probably 'good enough', why would I not choose the faster one when I'm starting a new project when all other things being are equal?


Using those containers might be making your firefox experience slower. The very reason you use it might make you think you shouldn't use it for anything else. If you used it without containers I wonder if you would think it's faster. Each container has it's own resources.

How can it be less secure and the browser you choose for privacy reasons only?


Multi-account containers are separated cookie/state jars that auto spawn on tabs based on URL rules , they don't need a lot of resources other than maybe kilobytes or a few MB of extra memory per account container. CPU wise and overall memory wise it isn't much.


I would say it means that obviously Google wants to track all your personal info but they work really hard and expend a lot resources to be sure it's safe from everyone else, also some attacks are done to not get your info but just to wreck stuff.


On June 21st, 2011 Mozilla decided that Chrome would lead and Firefox would follow. Almost every single change to Firefox since then made it more similar to Chrome, not less. If you're making a browser, you follow the leader, not the first follower.


What happened on that day? Is there more historical details?


>What happened on that day? Is there more historical details?

Not the guy but a quick search pulls up a press release for that day which was the release of Firefox v4.0 and mentions the 'new' rapid release cycle. I'm assuming it was this last that they were referring to.

Link: https://blog.mozilla.org/press-uk/2011/06/21/mozilla-deliver...


We had to choose between Webkit and Gecko. For us it was primarily the license, which was GPL vs MIT. Gecko was a non starter.


I thought mozilla projects, including firefox and gecko are GPL/MPL dual licensed? Where MPL is close to LGPL https://tldrlegal.com/license/mozilla-public-license-2.0-(mp...


Why was GPL better than MIT?


From what I can see its actually LGPL vs MPL which are similar in end goal, of being viral when modifying and distributing the project as is, but integrating the library into an application can allow for a licence change


> of being viral when modifying and distributing the project as is

That's not what "viral" means. MPLv2 cannot "infect" your own code like the GPL can just by virtue of using the library.

The only condition is if you want to make modifications to MPLv2 licensed code files, you do have to retain the license on all contributions.


I'm wondering, Tor [1] is a Firefox based browser in the same sense as Edge/Brave/+ are based on Chromium?

[1] https://www.torproject.org


The difference is that Tor Browser is Firefox, it's not Gecko embedded into a new one. TB is just FF with a bunch of minor (compared to the whole codebase) changes.


Servo should be developed for taxpayers money just to keep Google honest.


Wasn’t chromium based in WebKit? Same as Safari. Basically Apple forket webkit to make safari and Google forked WebKit to make chromium. I really don’t see what the hubbub is about trying so hard to have gecko, webkit, etc. rendering engines out there. If the end goal is standards compliance, the outcome should be the same. The fact that Google did such a good job on early chrome compared to everyone else is really why it’s so popular. Ultimately it’s open source. I think chromium could become more popular than it is, if they upped their marketing and made access to up to date binaries as frictionless as possible for as many platforms as possible.


Apple forked KHTML to make WebKit, which it used to make Safari. Google originally used WebKit to make Chrome, but then forked WebKit to make Blink, which it uses for Chrome now.


> If the end goal is standards compliance, the outcome should be the same.

The problem is Google is using Chromium dominant market share to push some questionable "features" into standards.

> The fact that Google did such a good job on early chrome compared to everyone else is really why it’s so popular.

Chrome is good, but Google being the largest advertising machine in the world also helps.


That's simple. Gecko is awful to embed and use independently of Firefox.

Now my question would be why not WebKit, as that is also easy to embed. There are browsers that use WebKit, just not that many.


> Now my question would be why not WebKit, as that is also easy to embed. There are browsers that use WebKit, just not that many.

Wasn’t part of the WebKit/Blink split that Google cared about supporting non-Apple platforms and Apple didn’t want to anymore, (and the reverse on a number of Apple-priority features), and both sides purged their post-split engine codebases of the stuff they weren’t supporting, making post-split WebKit very much not suited to non-Apple platforms.


This is incorrect. Conflict was over multiprocess architecture, where Google added it as a WebKit port and Apple did a proper redesign and produced WebKit2. WebKit is still extremely portable and non-Apple platforms are first class.


I thought platform support was part of it, too, but I must have been mixing up the abandonment of non-Apple-platform Safari with the Blink/WebKit fork.


Ah, that might be it.

Quick googling (not any in-depth knowledge) tells me that WebKit is for Linux too, I cannot find out anything about Windows.


The answer is actually in the original Scott McCloud comic http://www.google.com/googlebooks/chrome/ . A few highlights are on page 17 (about V8 JS engine) and 36-37 (about Chrome in general)

Chrome/Chromium and its stack was designed to be easy to reuse and build upon. This may have been an explicit design goal because of the difficulties with reusing parts of Firefox and other software.


Firefox used to be extremely extensible: there were some software based on Gecko and Xulrunner. However, they all died out after Chromium and Electron took over.


Xulrunner specifically, died or at least is not easily revived, because Mozilla killed XUL and XPCOM.



Because Chrome has bigger market share, webdevs test their stuff only in Chrome, as a consequence their stuff works only in Chrome. Browsers have to be based on Chrome or suffer incompatibility problems, and sometimes even that doesn't help as some sites block browsers based on user agent strings if they detect it's not true Chrome.


Interestingly, both the new browser Orion and the one DuckDuckGo is developing are WebKit-based, not chromium-based.


Orion seems to be Apple (MacOS/iOS) only - makes sense.


Out of the blue yesterday my phone asked me to rate Firefox. I think Google is trying to create a facade of competition where there is none by stuffing the Play Store review stats.


Have you never been asked to rate apps before? I heard about google "randomly" asking people to rate restaurants they recently visited, so "randomly" asking people to rate apps they installed doesn't seem too out of the ordinary. It's definitely not enough to think "Google is trying to create a facade of competition where there is none by stuffing the Play Store review stats".


No, I have never been asked to rate apps before. Perhaps because I am in China.


I've heard Firefox described as Google's "antitrust insurance".


They funded Mozilla as far as I know for many years for exactly this reason


The problem with gecko is that it is fundamentally challenging to embed as a standalone UI element. Too much of the "I am a browser" mentality gets into the rest of the engine.

Chrome adopted the webkit model of being primarily an embeddable engine, that happened to have a browser as its primary use case. The WebKit framework is used extensively throughout macOS and iOS, across a variety of applications, precisely because the framework is designed as a content view, not as a browser.


The Firefox engine sucks. It's resource intensive, buggy, and doesn't play nice with other technologies... think Flash.

Even the former CEO of Mozilla who left and created the Brave browser decided to go with Chromium.

Right now- the only browser engines seeing a lot of action are Chromium and WebKit. Every browser is being built on one of these two engines.

I suspect even Firefox will switch over to gain the benefits of one of those engines and the number of people working on them.


It seems that it's mostly the people building those browsers and their personal preferences.

With google building a track record of shady tactics, I would agree. firefox seems the better choice. It seems no more difficult to fork than chromium (though I've never tried).

My 2 cents, there's nothing to stop anyone from refusing to support updates on old frameworks and I'd suspect google to pull the rug out from beneath everyone before firefox anyday.


Making a fork of a repository is super easy, but you need to have a reason.

The core problem is that Gecko is not easily embedded. It does not strongly separate the renderer from the application, and that means that it is very difficult to simply use in the middle of another app.

You can compare it to WebKit and the old mshtml controls: the entire engine is designed, specifically with the intention of being a content view in an application.

Chromium inherited the core webkit design, so it is also much easier to embed than gecko. It requires much more work than a webkit webview, but that's largely down to exactly where they felt their API boundaries should be (e.g. a conscious design decision vs happenstance).

The end result is that forking Gecko is useful if what you want to do is make a fork of Firefox. Using gecko for anything else is challenging - there used to be a Mac browser built on gecko, and it required a huge amount of work to keep going, and would routinely fall behind due to changes that broke embedding. Just a browser, so it still had the same basic UI structure, and it was still hard to make in the first place, and hard to maintain.


What do you mean by "strongly seperate the renderer from the application"? is there a vs's?

arent they protocols? implementations of a protocol should not change.

my big gripe, chromium seems to make more analytics calls than gecko. are they grouping calls? probably.

gecko/firefox doesnt seem to have this agenda. Doh along with super-cookie controls seem to out-perform chromium in every way.

The end result seems to be privacy.

embedded?? are you using ChromiumOs?


sometimes I feel like it would be better for everyone if we had one engine that all browser makers contributed to.

This would mean that there is only one engine that needs to keep up to date with the html/JavaScript spec and then browsers would then be competing on features rather than if a web site will render correctly.


As one who inserted numerous test instrumention points through out SpiderMonkey JS executable, I can vouch for the extreme nastiness build procedure made by and of Modzilla Firefox build team, not only code-wise but interaction-wise.

It’s a bit easier nowadays but still in no way portable for suitable embedded use.


Mozilla (the org) never supported any of the "make Gecko embeddable" initiatives.


Chromium is somewhat packaged as a library. Firefox and its internals are not.


>If so, shouldn’t this be a priority for Mozilla to change that?

I would flip that and say Mozilla would be better off if they just adopted Chromium and made sure they provided builds without the controversial stuff.

They gave up on having a competitive rendering engine implementation when they abandoned Servo so why bother ?

Who is using FF for the rendering engine ? If anything it just breaks compatibility because few test for it anyway. They even fired the devtools team so developing for FF is worse than Chrome.

If they created a Chromium distro that was cleaned up for privacy it would probably be a better product than what they have right now.


Chrome is easy to fork, Firefox is not. It's pretty much that simple.


This was true, imo, ~2 years ago. Does not appear to be the case now, I recently went through the process with Firefox and the developer environment was very very friendly, would be straightforward to fork. (I shipped a Chromium fork in the past)


Could you care to elaborate a little more? What does it make it easy or hard to fork?


Mozilla’s priorities are questionable, I’m not sure anyone outside the company knows.

I’ve long resisted using a Chromium browser but Firefox has languished for far too long. I’ve been using Arc for maybe half a year now and I don’t plan on going back.

Without a team working on Servo, Mozilla is lost IMO.


Recently Mozilla decided it does not want donations :)

Great for woke bs, not so great for actually funding and developing browser.


Where was this headline?




Chromium works better on more websites (especially ones with 3d models)


[flagged]


And you're saying Google's isn't the same? Mozilla and Google are both businesses whose primary goals are obtaining money.

If you think that there are engineers specifically on the Chrome/Chromium team who ARE interested in the technology, what's the chances that there are engineers on the Firefox team who feel the same?

My point being companies will always have to be monetarily-biased, and the hope is that the team working on the product itself still believe in it because they don't get much kickback from management's decisions about the technology.


Technically Mozilla is non-profit and thus technically not in the business of obtaining money.


Actually, the Mozilla Corporation, the entity that makes Firefox, is a for profit corporation that is wholly owned by the nonprofit Mozilla Foundation.

It has this weird structure because the search deal makes too much money relative to donations according to IRS nonprofit rules.

If B corps existed back when this structure was created, then they would have incorporated as that, but B corps didn’t exist then, and there’s no benefit to reincorporating as a B corp now.


I'm pretty sure all non-profits are in the business of obtaining money.


Many non-profits will obtain money, but they purpose of the business is mainly things other than obtaining money. There definitely do exist non-profits that obtain more money than you would hope for a non-profit. Mozilla doesn't smell like such an organization to me.


Mozilla clearly exists to make as much money as possible for their employees (and in particular the leadership).

I know, they claim their goal is to promote the Open Web and so on... But that ideal from the 2000's is long gone at Mozilla, when you see how the leadership is acting.


But the people controlling them are. Charity vultures find a way to divert the revenue stream into their pockets.


The big difference though is that they are not beholden to shareholder demands. Other peoples demands, sure


Yeah, but a good browser strongly aligns with obtaining money for Google. Google has strong performance quality driven incentives.

Mozilla doesn't seem to have performance driven incentives. The remaining supporters of Firefox at this point are people who are mad at tech companies/care a great deal about privacy.


There isn't some huge performance delta between the browsers, and I've already customized Firefox to my liking, why switch?


You are already using Firefox. But Firefox needs new users too.


Security.

The world class team that is responsible for protecting the iPhone protects Chromium.


What does that mean? Google and Apple are different companies with different security teams.

Are you talking about Google's Project Zero? If so, you can include lots of software with that logic, and it would make even less sense to say that "the world class team that is responsible for protecting Intel processors protects Chromium".


I’m calling bullshit to most of the comments here and to Mozilla.

First, why cannot we have a multi-platform single click, no chrome/ui with fullscreen capabilities, firefox launcher that has prepackaged web app that is self contained? You think Major Tech Dudes can’t implement this?

Second, it’s all probably to do with bureaucracy and politics. For all we know FAANG blocks such ad ventures otherwise its bully time.


We had it. It was called Prism: https://wiki.mozilla.org/Prism

It died when XulRunner died, and none of the followon attempts survived.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: