惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
D
Docker
GbyAI
GbyAI
B
Blog RSS Feed
博客园 - 司徒正美
博客园 - Franky
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Secure Thoughts
博客园 - 聂微东
L
LINUX DO - 最新话题
U
Unit 42
SecWiki News
SecWiki News
A
Arctic Wolf
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
量子位
The Cloudflare Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
Last Week in AI
Last Week in AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
Latest news
Latest news

David Baron's Weblog

Software engineering, responsibility, and ownership Software engineering, responsibility, and ownership David Baron's weblog: Security and Inequality Running animations on the compositor thread David Baron's weblog: Tying ecosystems through browsers David Baron's weblog: Payments on the Web Thoughts on migrating to a secure Web David Baron's weblog: The need for government David Baron's weblog: Priority of constituencies How browser developers should seek feedback from Web developers A possible approach to shorter release cycles David Baron's weblog: Fifteen years Why debug builds (and assertions) are important Ten years of the Mozilla Foundation Open licensing at the W3C Why adding compositing and blending to CSS is harder than it looks How you can help with removing -moz- prefixes Moving bug history out of the primary display of a bug report Beware of locale-specific behavior in the C library Eating dogfood and shipping software Specification style and the future of the Web The bug system I wish I had CSS border-image changes and unprefixing Improving font size readability on Firefox for Android David Baron's weblog: CSS Animations, part 2 Hue-preserving color inversion with SVG filters Changes to handling of @-moz-keyframes David Baron's weblog: window.matchMedia() David Baron's weblog: CSS Animations What does a blur radius mean? Crash analysis in the future David Baron's weblog: calc() David Baron's weblog: colorDepth David Baron's weblog: Hidden complexity in specifications The most important field in a bug report: the summary WOFF font format submitted to W3C David Baron's weblog: :-moz-any() selector grouping setTimeout with a shorter delay Faster repainting in SVG foreignObject David Baron's weblog: Distributed Extensibility David Baron's weblog: Broadening crash analysis Correlating crashes with binary extensions or plugins David Baron's weblog: ex-HTML Downloadable font formats for the Web Web Accessibility as a Political Movement David Baron's weblog: CSS priorities David Baron's weblog: Bug priorities David Baron's weblog: Semi-vacation Some new CSS features in Firefox 3 David Baron's weblog: New selectors David Baron's weblog: The age of bugs Seeking a good Linux distribution David Baron's weblog: Teaching to the test David Baron's weblog: March 2008 David Baron's weblog: February 2008 David Baron's weblog: January 2008 David Baron's weblog: October 2007 David Baron's weblog: September 2007 David Baron's weblog: August 2007 David Baron's weblog: June 2007 David Baron's weblog: April 2007 David Baron's weblog: March 2007 David Baron's weblog: January 2007 David Baron's weblog: September 2006 David Baron's weblog: August 2006 David Baron's weblog: July 2006 David Baron's weblog: May 2006 David Baron's weblog: February 2006 David Baron's weblog: January 2006 David Baron's weblog: December 2005 David Baron's weblog: October 2005 David Baron's weblog: June 2005 David Baron's weblog: May 2005 David Baron's weblog: April 2005 David Baron's weblog: March 2005 David Baron's weblog: February 2005 David Baron's weblog: October 2004 David Baron's weblog: September 2004 David Baron's weblog: August 2004 David Baron's weblog: June 2004 David Baron's weblog: May 2004 David Baron's weblog: April 2004 David Baron's weblog: March 2004 David Baron's weblog: February 2004 David Baron's weblog: January 2004 David Baron's weblog: November 2003 David Baron's weblog: October 2003 David Baron's weblog: September 2003 David Baron's weblog: August 2003 David Baron's weblog: July 2003 David Baron's weblog: June 2003 David Baron's weblog: May 2003 David Baron's weblog: April 2003 David Baron's weblog: March 2003 David Baron's weblog: February 2003 David Baron's weblog: January 2003 David Baron's weblog: December 2002 David Baron's weblog: November 2002 David Baron's weblog: September 2002
David Baron's weblog: September 2005
David Baron · 2005-09-08 · via David Baron's Weblog

Why Mozilla shouldn't implement SVG (or at least not too much of it), and what we should do instead (00:14 -0700)

One of the things that has made Firefox successful is that its development has been driven by the needs of users. Features that were helpful to users were added and features that were harmful to users (generally because they added more confusion than benefit) were removed.

In a sense a layout engine, the part of a browser that's responsible for displaying Web pages, has two sets of users: those who write Web content (authors) and those who read it (users, or end users when it might be ambiguous). When deciding what features to add to the layout engine, we need to consider both sets of users. Mozilla's layout engine actually has a third set of important users: those who use the layout engine for the development of non-Web XUL applications.

Adding features to the layout engine generally doesn't harm Web developers, since the existing ones (should) behave the same, and there's no user interface to clutter (except maybe the user interface of DevMo). However, adding features to the layout engine can harm users who are reading Web content if they give authors too much power over the user's experience.

I propose that layout engine feature development should (like that in Firefox) be driven by the needs of users: first by the needs of the end users who read Web content, and second by the needs of content authors. In other words, we should add support for new standards when they will lead to a net improvement in the user experience (not just an improvement in user experience in the rare case when they're used appropriately). Standards that make authoring easier generally do improve the user experience since they allow authors to work on other things, including writing more or better content.

Not surprisingly, I have a specific example in mind: SVG. I think the presence of SVG on the Web would generally harm users. The fundamental difference is this: HTML and CSS are based on the idea that the user has a default font size and that text should wrap when it doesn't fit, depending on the width of the document; SVG is based on the idea that the author determines the size of text relative to the size of the image and that all the text scales depending on the width of the document. If SVG were designed primarily to replace what is currently done using images (things like figures, graphs, and logos), that would be fine, and it would probably improve the user's Web experience. However, SVG is being designed to do much more than that and being promoted to replace what is currently done using HTML and CSS, to be a language for Web applications and their user interface. If it's used that way, I believe it will be more harmful to the user experience than helpful, since it will lead to Web pages being worse at adapting to different font sizes and browser window sizes and it will make the mechanisms the browser can use to overcome those problems (such as text zoom, which violates Web standards to improve the experience for users) less useful.

I think the reasons Mozilla chose to include SVG in the layout engine in Mozilla 1.8 (and thus in Firefox 1.5) were based largely not on the desire to see SVG on the Web, but the desire to use SVG as part of the Mozilla application development platform. In other words, it was included because people want to be able to use SVG's advanced graphics features when developing the user interface of Firefox, Firefox extensions, and other XUL applications.

Design and feature decisions for Mozilla's layout engine are generally made to serve two goals: being a layout engine for Web content and being a layout engine for an application development platform. These goals often conflict, and I believe they conflict in this case. (Another case where they conflict is fixing bugs in standards compliance. When we have a bug that other Web browsers don't, fixing it is the obvious choice, since Web content doesn't depend on the bug. However, if XUL applications depend on the bug, it can be much harder or even impossible to fix.) I think the goal of being an application platform has come to dominate the decision making process, both because it's easier to control (since authors are writing Mozilla-specific applications rather than cross-browser Web pages) and because most Mozilla developers have much closer connections to XUL application developers (who are very much a part of the Mozilla community) than they do to Web developers (who tend to hang out in other places).

As more Web technologies are incorporated into the application development platform and as the application development platform becomes more popular, these conflicts will only increase. I chose to work on Mozilla's layout engine because I was interested in the Web platform, not the application development platform. Thus I find I often disagree with the priorities of other developers and the direction our layout engine is headed.

I'd like to work on features that would help users, such as better layout systems that would make it easier for authors to design pages that scale better. The XUL box model is actually pretty good at this. After all, the XUL box model was based on existing ideas of user interface layout, and applications built using XUL really do work at many window sizes and font sizes (although, as with HTML, authors sometimes go out of their way to defeat this feature). I think the first steps of this work are figuring out better integration between HTML and XUL in Mozilla (since they currently interact in rather bizarre ways), and standardization of XUL box model. The first of these is one of the goals of the reflow branch that I'm currently working on.

However, I feel like there's no way I can do all of this myself or with just one or two other people who have lots of other things to work on. And there are lots of other things to do too: fixing crashes, memory leaks, and bugs, and developing other new features (but not too many). We just need more good developers working on the core of Mozilla's layout engine if it's going to continue to succeed: developers who can make good decisions about what specifications (and features within them) we should implement, can figure out what implementing those specifications requires, can decide what to do about the things that the specifications leave open, can provide good feedback to specification authors, can answer questions about what the existing code does by reading and testing it, can make good decisions about tradeoffs between code complexity and performance, and can write robust and correct code that is clear enough that it can be maintained by various people for many years.