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 | |