Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/WebKit/Source/core/layout/README.md

Issue 2385273002: Use SVG for the flipped blocks relpos diagram. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/resources/flipped-blocks-relpos.svg » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # `Source/core/layout` 1 # `Source/core/layout`
2 2
3 This directory contains implementation of layout objects. It covers the 3 This directory contains implementation of layout objects. It covers the
4 following document lifecycle states: 4 following document lifecycle states:
5 5
6 * LayoutSubtreeChange (`InLayoutSubtreeChange` and `LayoutSubtreeChangeClean`) 6 * LayoutSubtreeChange (`InLayoutSubtreeChange` and `LayoutSubtreeChangeClean`)
7 * PreLayout (`InPreLayout`) 7 * PreLayout (`InPreLayout`)
8 * PerformLayout (`InPerformLayout`) 8 * PerformLayout (`InPerformLayout`)
9 * AfterPerformLayout (`AfterPerformLayout` and `LayoutClean`) 9 * AfterPerformLayout (`AfterPerformLayout` and `LayoutClean`)
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 </style> 146 </style>
147 <div id="container" style="background-color: lightBlue; width: 300px; height : 200px;"> 147 <div id="container" style="background-color: lightBlue; width: 300px; height : 200px;">
148 <div id="relpos" style="position: relative; top: 50px; left: -60px; width: 70px; height: 80px; background-color: red;"></div> 148 <div id="relpos" style="position: relative; top: 50px; left: -60px; width: 70px; height: 80px; background-color: red;"></div>
149 </div> 149 </div>
150 150
151 The final location of these within an 800x600 frame is as: 151 The final location of these within an 800x600 frame is as:
152 152
153 container: (492, 8 300x200) 153 container: (492, 8 300x200)
154 relpos: (662, 58 70x80) 154 relpos: (662, 58 70x80)
155 155
156 See the [diagram](https://docs.google.com/drawings/d/1k5lOzQxhfRQ1J4HknGByJPJfpD V4o_N_ZuVTvveiSaw/edit?usp=sharing) 156 See the [diagram](resources/flipped-blocks-relpos.svg) for full detail on
157 for full detail on dimensions of the involved elements. 157 dimensions of the involved elements.
158 158
159 Determining the paint invalidation rect for `relpos` via 159 Determining the paint invalidation rect for `relpos` via
160 `mapToVisualRectInAncestorSpace()` involves walking up the layout tree from 160 `mapToVisualRectInAncestorSpace()` involves walking up the layout tree from
161 `relpos` flipping the rect within its container at each box. Below we sketch 161 `relpos` flipping the rect within its container at each box. Below we sketch
162 each step as we recurse toward the top of the document, with 'this' on the left, 162 each step as we recurse toward the top of the document, with 'this' on the left,
163 the current rect being mapped on the right, and explanation beneath each: 163 the current rect being mapped on the right, and explanation beneath each:
164 164
165 LayoutBlockFlow (relative positioned) DIV id='relpos' 0,0 70x80 165 LayoutBlockFlow (relative positioned) DIV id='relpos' 0,0 70x80
166 166
167 Apply the relative position of 'relpos' while flipping within 167 Apply the relative position of 'relpos' while flipping within
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 left-to-right or right-to-left block flow. Geometry is transposed for vertical 299 left-to-right or right-to-left block flow. Geometry is transposed for vertical
300 writing mode. See calls to `transposed{Rect,Point,Size}()`. 300 writing mode. See calls to `transposed{Rect,Point,Size}()`.
301 * `direction`/`dir`: "inline base direction" of a box. One of `ltr` or 301 * `direction`/`dir`: "inline base direction" of a box. One of `ltr` or
302 `rtl`. See calls to `isLeftToRightDirection()`. 302 `rtl`. See calls to `isLeftToRightDirection()`.
303 * `text-orientation`: orientation of text in a line. Only relevant for vertical 303 * `text-orientation`: orientation of text in a line. Only relevant for vertical
304 modes. 304 modes.
305 * orthogonal flow: when a box has a writing mode perpendicular to its containing 305 * orthogonal flow: when a box has a writing mode perpendicular to its containing
306 block. This can lead to complex cases. See 306 block. This can lead to complex cases. See
307 [specification](https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows) 307 [specification](https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows)
308 for more. 308 for more.
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/resources/flipped-blocks-relpos.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698