Commit 3dd3f19
Block container inline-axis overflow includes padding + block-level child margins
https://bugs.webkit.org/show_bug.cgi?id=286753
rdar://144312078
Reviewed by Alan Baradlay.
The CSS specs recently expanded the scrollable overflow area of block containers
in the inline axis to include the padding edge as appended to the outer (margin)
edge of child block-level boxes.
See discussion in w3c/csswg-drafts#129
and w3c/csswg-drafts#8660
This patch updates our implementation by
- Adding some options to ComputeOverflowOptions to enable this behavior.
- Passing in those options when calling computeOverflow from RenderBlockFlow.
- Adding/rearranging some helper functions to calculate it.
- Renaming some methods for clarity.
* LayoutTests/compositing/overflow/rtl-scrollbar-layer-positioning-expected.txt:
* LayoutTests/compositing/tiling/perspective-on-scroller-tile-coverage-expected.txt:
* LayoutTests/css2.1/20110323/abspos-containing-block-initial-001-expected.txt:
* LayoutTests/css3/scroll-snap/scroll-snap-offsets-expected.txt:
* LayoutTests/css3/scroll-snap/scroll-snap-offsets-rtl-expected.txt:
* LayoutTests/fast/scrolling/mac/negative-z-index-overflow-scroll-expected.txt:
* LayoutTests/http/tests/misc/ftp-eplf-directory-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-transform-005.tentative-expected.txt:
Rebaseline.
* LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-zero-one-axis-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollWidthHeight-expected.txt:
Pass more tests.
* LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/scrollable-overflow-zero-one-axis-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/scrollWidthHeight-expected.txt:
* LayoutTests/interaction-region/text-input-expected.txt:
* LayoutTests/overflow/overflow-transform-perspective-expected.txt:
* LayoutTests/platform/glib/compositing/overflow/ancestor-overflow-expected.txt:
* LayoutTests/platform/glib/compositing/tiling/visiblerect-accumulated-offset-expected.txt:
* LayoutTests/platform/glib/overflow/overflow-transform-perspective-expected.txt:
* LayoutTests/platform/gtk/tables/mozilla/bugs/bug44505-expected.txt:
* LayoutTests/platform/gtk/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* LayoutTests/platform/ios/compositing/overflow/ancestor-overflow-expected.txt:
* LayoutTests/platform/ios/compositing/tiling/perspective-on-scroller-tile-coverage-expected.txt:
* LayoutTests/platform/ios/compositing/tiling/visiblerect-accumulated-offset-expected.txt:
* LayoutTests/platform/ios/css2.1/20110323/abspos-containing-block-initial-001-expected.txt:
* LayoutTests/platform/ios/http/tests/misc/ftp-eplf-directory-expected.txt:
* LayoutTests/platform/ios/overflow/overflow-transform-perspective-expected.txt:
* LayoutTests/platform/ios/tables/mozilla/bugs/bug44505-expected.txt:
* LayoutTests/platform/ios/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* LayoutTests/platform/mac-sequoia-wk2/tables/mozilla/bugs/bug44505-expected.txt:
* LayoutTests/platform/mac-sequoia-wk2/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* LayoutTests/platform/mac-wk2/tables/mozilla/bugs/bug44505-expected.txt: Removed.
* LayoutTests/platform/mac-wk2/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: Removed.
* LayoutTests/platform/mac/compositing/overflow/ancestor-overflow-expected.txt:
* LayoutTests/platform/mac/compositing/tiling/visiblerect-accumulated-offset-expected.txt:
* LayoutTests/platform/mac/tables/mozilla/bugs/bug44505-expected.txt:
* LayoutTests/platform/mac/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
* LayoutTests/platform/win/compositing/tiling/visiblerect-accumulated-offset-expected.txt:
* LayoutTests/platform/win/overflow/overflow-transform-perspective-expected.txt:
* LayoutTests/platform/wpe/tables/mozilla/bugs/bug44505-expected.txt:
* LayoutTests/platform/wpe/tables/mozilla_expected_failures/bugs/bug2479-5-expected.png:
* LayoutTests/platform/wpe/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt:
Rebaseline.
* Source/WebCore/platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::uniteXEvenIfEmpty):
(WebCore::LayoutRect::uniteYEvenIfEmpty):
* Source/WebCore/platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::containsX const):
(WebCore::LayoutRect::containsY const):
Add utility functions.
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeOverflow):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
Make RenderBlockFlow add inline-axis child margins and self padding to overflow.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::addOverflowWithRendererOffset):
(WebCore::RenderBox::clampToAllowedLayoutOverflow):
(WebCore::RenderBox::addLayoutOverflow):
(WebCore::RenderBox::addMarginBoxOverflow):
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderBoxInlines.h:
(WebCore::RenderBox::scrollableContentAreaOverflowRect const):
(WebCore::RenderBox::scrollablePaddingAreaOverflowRect const):
Extract some logic into helper methods and add per-axis arguments for
computeOverflow() methods.
* Source/WebCore/rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutMasonry):
Update call site to new argument format.
* Source/WebCore/rendering/RenderOverflow.h:
(WebCore::RenderOverflow::addContentOverflowX):
(WebCore::RenderOverflow::addContentOverflowY):
Provide per-axis variants of addContentOverflow methods.
Canonical link: https://commits.webkit.org/307212@main1 parent 9c8ea0e commit 3dd3f19
File tree
48 files changed
+260
-582
lines changed- LayoutTests
- compositing
- overflow
- tiling
- css2.1/20110323
- css3/scroll-snap
- fast/scrolling/mac
- http/tests/misc
- imported/w3c/web-platform-tests/css
- css-overflow
- cssom-view
- interaction-region
- overflow
- platform
- glib
- compositing
- overflow
- tiling
- overflow
- gtk/tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- ios
- compositing
- overflow
- tiling
- css2.1/20110323
- http/tests/misc
- overflow
- tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- mac-sequoia-wk2/tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- mac-wk2/tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- mac
- compositing
- overflow
- tiling
- tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- win
- compositing/tiling
- overflow
- wpe/tables
- mozilla_expected_failures/bugs
- mozilla/bugs
- Source/WebCore
- platform/graphics
- rendering
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+260
-582
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments