Changes between Version 1 and Version 2 of April 2012 Write Your Own Render Object


Ignore:
Timestamp:
Apr 20, 2012 2:22:14 PM (12 years ago)
Author:
dpranke@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • April 2012 Write Your Own Render Object

    v1 v2  
    4444* xpos / ypos ? have been replaced by accumulated offsets - how do these relate to absolute positioning?
    4545* logical vs. physical coordinate spaces (e.g., RTL - does x mean "from left" or "from start")?
     46* painting the line box tree
    4647
    4748== Transforms ==
     
    5657* A RenderTextFragment splits off the first letter to handle "first-letter"
    5758* "first-line" is split off into a different InlineText box
    58 
     59
     60== X-Position and the absolute coordinates ==
     61
     62* most objects maintain coordinates from their containing block - you can get the absolute coordinates by either walking up the dom tree computing offsets or going to the RenderLayer which maintains a cache.
     63* when you are "position: absolute" you have to go to your positioning context and ancestor instead
     64
     65== Logical vs. Physical coordinate spaces ==
     66
     67* There are multiple coordinate systems in the rendering tree
     68  * One is for vertical vs. horizontal writing direction (logical height vs. height)
     69  * logical vs. document order for RTL (right-to-left text)
     70  * there might be a third (?)
     71  * before/after and start/end are CSS concepts that map onto logical and physical in WebKit
     72    * cf. CSS 3 Writing Modes spec ?
     73    * always use the logical height and width in order to do the right thing
     74
     75== How the Linbox Tree Paints ==
     76
     77* All the painting logic is in RenderBlock, first line down, left to right
     78  * Creates text run objects and sends those to the GraphicsContext
     79  * the text run splits between simple and complex
     80  * the chunking logic is done through the Unicode abstraction to ICU on most ports
     81    * the logic may also be platform-specific because different text rendering engines may be able to handle different things (e.g., ATSUI vs. DirectWrite)
     82  * the LTR/RTL logic sorts a list of text runs
     83* How do we figure out when to break for lines?
     84  * all in RenderBlockLineLayout - calls out to ICU to figure out where breaks can occur
     85  * then we measure the widths of the glyphs and determine where we might want to break
     86 
    5987
    6088