On 30/01/2014 18:25, Patrick Walton wrote:
Hi everyone,
Preface: This is a total bikeshed.
In that case, let’s bikeshed :)
I was wondering whether we might want to rename "render" to "paint".
Agreed.
The
issue is that "render" means different things in different browser
engines and so the term is kind of confusing. As far as I can tell
"render" in Gecko means either "layout" or "paint" depending on the
circumstances. This is also true in WebKit, where "render" usually means
"layout". But in Servo "render" means "paint" only, which is somewhat at
odds with how the term is used in other engines.
So I'd like to propose renaming "render" to "paint" in Servo. More
broadly, I was thinking about using these headings for the various
rendering phases, which are a hopefully-clear intersection of the Gecko
and WebKit terminology:
* "Layout" (from Gecko; WebKit calls this "rendering")
I disagree with "layout" here (see below), but I don’t have a better
suggestion. "Rendering" may be overloaded.
But do we really need a name for this? What do these three sub-items
have in common that other things do not?
- "Style recalc" (from WebKit; I'm not sure if Gecko has a name for
this specifically)
o Initialization of layout data
o CSS selector matching/cascading
Cascading may be separated from selector matching, but ok.
o "Dirty marking" (from Gecko)
- "Reflow" (from Gecko; WebKit calls this "layout")
I (and WeasyPrint) agree with WebKit here. This is the part that is
laying things out in space.
CSS specs also tend to call "layout modes" things like Flexbox, tables, etc.
http://dev.w3.org/csswg/css-flexbox/#intro
o Bubble widths (perhaps rename to "compute min/pref widths"?)
Compute intrinsic widths (or intrinsic measures, see below)
http://dev.w3.org/csswg/css-sizing/#intrinsic-sizing
o Assign widths
o Assign heights/store overflow
Maybe measure/extent instead of width/height, in anticipation for
vertical text. (I’m not a fan of these specific terms, but we probably
should use logical directions instead of physical.)
http://dev.w3.org/csswg/css-writing-modes/#abstract-dimensions
- Display list building (from Gecko; WebKit ports that use display
lists call this "painting")
* "Painting" (from WebKit ports that do not use display lists)
- Buffer preparation
- Drawing
I honestly don’t know what is the difference between painting and
drawing. Can this be more specific?
* Compositing
Thoughts?
These are perhaps not "phases" but while we’re into naming, additional
components are:
* Content: Documents, elements, attributes, etc. The HTML parser
produces a content tree.
* DOM: The set of APIs exposing events and the content tree to script.
Not the tree itself. "DOM tree" is a misuse IMO, although the data model
for the content tree is necessarily closely tied to the DOM.
--
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo