3 ms·
Great, but I feel horrible at the same time because browser just slowly reinvents everything, and is still limited to a single specific implementation. How abou
by Geee 13y ago
Great, but I feel horrible at the same time because browser just slowly reinvents everything, and is still limited to a single specific implementation. How about just make Javascript frigging fast so everyone can code their own layout system? How about standard NaCl interface for layouting? Browser needs to be an open platform, not a framework.
- pcwalton 13y ago> How about just make Javascript frigging fast so everyone can code their own layout system? How about standard NaCl interface for layouting? If layout were in JS (or PNaCl), we wouldn't be able to run it off the main thread, or parallelize it in Servo, or experiment with running it on the GPU. We would also lose the ability to do text reformatting on mobile, accessibility would be harder, etc. To elaborate in regards to running CSS off the main thread: We got very lucky that IE's extensions to allow JavaScript in the middle of CSS evaluation (and also possibly XBL) never caught on, and so CSS can be done more or less entirely independent of the main JS event loop (unless the styling is performed in response to a direct JS query, e.g. getComputedStyle). If layout were performed by JS, there would be no hope: layout could perform arbitrary JS manipulations and we would be no choice other than to stall the main event loop while styling is happening (as current browsers do). But because CSS is largely separated from JS, we can just run it off the main thread and allow JavaScript to run uninterrupted by layout.
- yogo 13y ago> just slowly reinvents everything Yep. Not sure why they didn't just copy WPF or even Android's way years ago.
- dragonwriter 13y ago> How about just make Javascript frigging fast so everyone can code their own layout system? Because separating content (HTML) from layout (CSS) from behavior (JS) is a good thing, and because, particularly, being able to have content work without layout or behavior (for situations where you just need the content), and to have content and layout work without behavior (for situations where you just need static presentation) are important.
- oneeyedpigeon 13y agoI'm curious: how do you feel about css transitions? I'm being totally non-snarky here, and I fully agree in the ideals of separating the three concerns, but I sometimes wonder if the existing lines aren't drawn in slightly the wrong place.
- dragonwriter 13y agoConceptually, I think what they cover fits more into presentation than behavior, because its how the transition from one state to another is shown. So I don't see CSS transitions as an example of the line being drawn in the wrong place. I'm not saying that its always clear cut or that reasonable people can't disagree on where to draw the line.