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

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

Issue 2073563002: Rework mapToVisualRectInAncestorSpace to handle flipped blocks correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Integrate feedback. Created 4 years, 5 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 ## Overflow rects and scroll offsets 3 ## Overflow rects and scroll offsets
4 4
5 PaintLayerScrollableArea uses a "scroll origin" to conceptually represent the di stance between 5 PaintLayerScrollableArea uses a "scroll origin" to conceptually represent the di stance between
6 the top-left corner of the box'es content rect and the top-left corner of its ov erflow rect 6 the top-left corner of the box'es content rect and the top-left corner of its ov erflow rect
7 when the box is scrolled to the logical beginning of its content (.e.g. all the way to the left for 7 when the box is scrolled to the logical beginning of its content (.e.g. all the way to the left for
8 LTR, all the way to the right for RTL). For left-to-right and top-to-bottom flo ws, the scroll 8 LTR, all the way to the right for RTL). For left-to-right and top-to-bottom flo ws, the scroll
9 origin is zero, i.e., the top/left of the overflow rect is at the same position as the top/left of 9 origin is zero, i.e., the top/left of the overflow rect is at the same position as the top/left of
10 the box'es content rect when scrolled to the beginning of flow. For right-to-le ft and bottom-to-top 10 the box'es content rect when scrolled to the beginning of flow. For right-to-le ft and bottom-to-top
(...skipping 10 matching lines...) Expand all
21 origin 21 origin
22 |<-------->| 22 |<-------->|
23 _____________________ 23 _____________________
24 | | | 24 | | |
25 | | | 25 | | |
26 | | | 26 | | |
27 direction:rtl | | box | 27 direction:rtl | | box |
28 | | | 28 | | |
29 | | | 29 | | |
30 |__________|__________| 30 |__________|__________|
31 31
chrishtr 2016/07/11 22:35:11 Spurious edits in this file.
wkorman 2016/07/11 22:46:17 Done.
32 overflow rect 32 overflow rect
33 |<--------------------->| 33 |<--------------------->|
34 34
35 35
36 However, if the box has a scrollbar for the orthogonal direction (e.g., a vertic al scrollbar 36 However, if the box has a scrollbar for the orthogonal direction (e.g., a vertic al scrollbar
37 in a direction:rtl block), the size of the scrollbar must be added to the scroll origin calculation. 37 in a direction:rtl block), the size of the scrollbar must be added to the scroll origin calculation.
38 Here are two examples -- note that it doesn't matter whether the vertical scroll bar is placed on 38 Here are two examples -- note that it doesn't matter whether the vertical scroll bar is placed on
39 the right or left of the box (the vertical scrollbar is the |/| part): 39 the right or left of the box (the vertical scrollbar is the |/| part):
40 40
41 content 41 content
42 rect 42 rect
43 |<-------->| 43 |<-------->|
44 scroll 44 scroll
45 origin 45 origin
46 |<---------->| 46 |<---------->|
47 _______________________ 47 _______________________
48 | |/| | 48 | |/| |
49 | |/| | 49 | |/| |
50 | |/| | 50 | |/| |
51 direction:rtl | |/| box | 51 direction:rtl | |/| box |
52 | |/| | 52 | |/| |
53 | |/| | 53 | |/| |
54 |__________|/|__________| 54 |__________|/|__________|
55 55
56 overflow rect 56 overflow rect
57 |<--------------------->| 57 |<--------------------->|
58 58
59 59
60 60
61 content 61 content
62 rect 62 rect
63 |<-------->| 63 |<-------->|
64 scroll 64 scroll
65 origin 65 origin
66 |<---------->| 66 |<---------->|
67 _______________________ 67 _______________________
68 | | |/| 68 | | |/|
69 | | |/| 69 | | |/|
70 | | |/| 70 | | |/|
71 writing-mode: | | |/| 71 writing-mode: | | |/|
72 vertical-rl | | |/| 72 vertical-rl | | |/|
73 | | |/| 73 | | |/|
74 | | |/| 74 | | |/|
75 | | |/| 75 | | |/|
76 |__________|__________|/| 76 |__________|__________|/|
77 77
78 overflow rect 78 overflow rect
79 |<--------------------->| 79 |<--------------------->|
80
81 ## Coordinate Spaces
82
83 TODO(wkorman): Document writing mode, particularly flipped blocks.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698