forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LayoutNG] Fix ScrollableOverflowForPropagation()
NGPhysicalFragment::ScrollableOverflowForPropagation() had an important different compared to LayoutBox::LayoutOverflowRectForPropagation() as it was not including the border box when computing the overflow for propagation. This was causing issues in some cases calculating the overflow of replaced elements in LayoutNG, legacy was working fine. This patch changes AdjustScrollableOverflowForPropagation() to also include the element's border box. Note that we cannot do this for ruby boxes as they have some special behavior (see crbug.com/1082087 and r784709 for details). We need new rebaselines for the following test fast/replaced/border-radius-clip.html This is because when you scroll down you can see the border of the embed object (which was hidden before). BUG=1128984 TEST=css/css-overflow/overflow-replaced-element-001.html Change-Id: I038ccb46db7e00a922e33a387cf10e3c805b81c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414313 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#808518}
- Loading branch information
Showing
7 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
third_party/blink/web_tests/external/wpt/css/css-overflow/overflow-replaced-element-001.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Overflow: overflow replaced element with borders and negative end margins</title> | ||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overflow/#scrollable"> | ||
<meta name="assert" content="Checks that the scrollable overflow of a replaced elements with borders is properly computed even when it has a negative margin-right and margin-bottom."> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="/resources/check-layout-th.js"></script> | ||
<body onload="checkLayout('#wrapper');"> | ||
<div id="wrapper" style="width: 200px; height: 100px; overflow: scroll;" | ||
data-expected-scroll-width="400" data-expected-scroll-height="300"> | ||
<img style="border: 50px solid green; width: 300px; height: 200px; | ||
margin-right: -100px; margin-bottom: -200px;" /> | ||
</div> | ||
</body> |
Binary file modified
BIN
+0 Bytes
(100%)
...ty/blink/web_tests/platform/linux/fast/replaced/border-radius-clip-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5 Bytes
(100%)
...arty/blink/web_tests/platform/mac/fast/replaced/border-radius-clip-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...arty/blink/web_tests/platform/win/fast/replaced/border-radius-clip-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.