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

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

Issue 2387883002: Use float for scroll offset. (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
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 23 matching lines...) Expand all
34 _____________________ 34 _____________________
35 | | | 35 | | |
36 | | | 36 | | |
37 | | | 37 | | |
38 direction:rtl | | box | 38 direction:rtl | | box |
39 | | | 39 | | |
40 | | | 40 | | |
41 |__________|__________| 41 |__________|__________|
42 42
43 overflow rect 43 overflow rect
44 |<--------------------->| 44 |<------------------->|
45 45
46 46
47 However, if the box has a scrollbar for the orthogonal direction (e.g., a vertic al scrollbar 47 However, if the box has a scrollbar for the orthogonal direction (e.g., a vertic al scrollbar
48 in a direction:rtl block), the size of the scrollbar must be added to the scroll origin calculation. 48 in a direction:rtl block), the size of the scrollbar must be added to the scroll origin calculation.
49 Here are two examples -- note that it doesn't matter whether the vertical scroll bar is placed on 49 Here are two examples -- note that it doesn't matter whether the vertical scroll bar is placed on
50 the right or left of the box (the vertical scrollbar is the `|/|` part): 50 the right or left of the box (the vertical scrollbar is the `|/|` part):
51 51
52
52 content 53 content
53 rect 54 rect
54 |<-------->| 55 |<-------->|
55 scroll 56 scroll
56 origin 57 origin
57 |<---------->| 58 |<---------->|
58 _______________________ 59 _______________________
59 | |/| | 60 | |/| |
60 | |/| | 61 | |/| |
61 | |/| | 62 | |/| |
62 direction:rtl | |/| box | 63 direction:rtl | |/| box |
63 | |/| | 64 | |/| |
64 | |/| | 65 | |/| |
65 |__________|/|__________| 66 |__________|/|__________|
66 67
67 overflow rect 68 overflow rect
68 |<--------------------->| 69 |<--------------------->|
69 70
71
70 content 72 content
71 rect 73 rect
72 |<-------->| 74 |<-------->|
73 scroll 75 scroll
74 origin 76 origin
75 |<---------->| 77 |<---------->|
76 _______________________ 78 . _______________________
77 | | |/| 79 . | | |/|
78 | | |/| 80 . | | |/|
79 | | |/| 81 . | | |/|
80 writing-mode: | | |/| 82 writing-mode: . | | |/|
81 vertical-rl | | |/| 83 vertical-rl . | | |/|
82 | | |/| 84 . | | |/|
83 | | |/| 85 . | | |/|
84 | | |/| 86 . | | |/|
85 |__________|__________|/| 87 . |__________|__________|/|
88 .
89 . overflow rect
90 |<--------------------->|
86 91
87 overflow rect
88 |<--------------------->|
89 92
90 ## Coordinate Spaces 93 ## Coordinate Spaces
91 94
92 Layout and Paint work with and frequently refer to three main coordinate spaces 95 Layout and Paint work with and frequently refer to three main coordinate spaces
93 (really two, with one variant): 96 (really two, with one variant):
94 97
95 * Physical coordinates: Corresponds to physical direction of the output per the 98 * Physical coordinates: Corresponds to physical direction of the output per the
96 physical display (screen, printed page). Generally used for painting, thus 99 physical display (screen, printed page). Generally used for painting, thus
97 layout logic that feeds into paint may produce values in this space. CSS 100 layout logic that feeds into paint may produce values in this space. CSS
98 properties such as `top`, `right`, `bottom`, and `left` are in this space. See 101 properties such as `top`, `right`, `bottom`, and `left` are in this space. See
(...skipping 200 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 302 left-to-right or right-to-left block flow. Geometry is transposed for vertical
300 writing mode. See calls to `transposed{Rect,Point,Size}()`. 303 writing mode. See calls to `transposed{Rect,Point,Size}()`.
301 * `direction`/`dir`: "inline base direction" of a box. One of `ltr` or 304 * `direction`/`dir`: "inline base direction" of a box. One of `ltr` or
302 `rtl`. See calls to `isLeftToRightDirection()`. 305 `rtl`. See calls to `isLeftToRightDirection()`.
303 * `text-orientation`: orientation of text in a line. Only relevant for vertical 306 * `text-orientation`: orientation of text in a line. Only relevant for vertical
304 modes. 307 modes.
305 * orthogonal flow: when a box has a writing mode perpendicular to its containing 308 * orthogonal flow: when a box has a writing mode perpendicular to its containing
306 block. This can lead to complex cases. See 309 block. This can lead to complex cases. See
307 [specification](https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows) 310 [specification](https://www.w3.org/TR/css-writing-modes-3/#orthogonal-flows)
308 for more. 311 for more.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698