Title: [279130] trunk
- Revision
- 279130
- Author
- simon.fra...@apple.com
- Date
- 2021-06-22 11:33:24 -0700 (Tue, 22 Jun 2021)
Log Message
REGRESSION (Safari 14): Submenus on https://codelearn.cat don't show
https://bugs.webkit.org/show_bug.cgi?id=225467
<rdar://problem/77612276>
Reviewed by Alan Bujtas.
Source/WebCore:
RenderBox::requiresLayerWithScrollableArea() is called via RenderLayer::styleChanged()
which is before layout, yet requiresLayerWithScrollableArea() was consulting layout-dependent
state under hasHorizontalOverflow() || hasVerticalOverflow(). This resulted in composited
scrolling layers sticking around after overflow style changed from `scroll` to `visible`.
Fix by just removing the "has overflow" checks; we make RenderLayerScrollableArea
for any non-visible overflow anyway. scrollsOverflow() checks hasOverflowClip(),
so all we need is a hasOverflowClip() check.
Remove some redundant comments and add a FIXME about layers which get RenderLayerScrollableAreas
but don't need them.
Test: compositing/overflow/overflow-scroll-to-visible.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::requiresLayerWithScrollableArea const):
LayoutTests:
* compositing/overflow/overflow-scroll-to-visible-expected.html: Added.
* compositing/overflow/overflow-scroll-to-visible.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (279129 => 279130)
--- trunk/LayoutTests/ChangeLog 2021-06-22 18:18:30 UTC (rev 279129)
+++ trunk/LayoutTests/ChangeLog 2021-06-22 18:33:24 UTC (rev 279130)
@@ -1,3 +1,14 @@
+2021-06-22 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (Safari 14): Submenus on https://codelearn.cat don't show
+ https://bugs.webkit.org/show_bug.cgi?id=225467
+ <rdar://problem/77612276>
+
+ Reviewed by Alan Bujtas.
+
+ * compositing/overflow/overflow-scroll-to-visible-expected.html: Added.
+ * compositing/overflow/overflow-scroll-to-visible.html: Added.
+
2021-06-22 Chris Dumez <cdu...@apple.com>
CSSStyleDeclaration.getPropertyPriority() should return the empty string for invalid CSS properties
Added: trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible-expected.html (0 => 279130)
--- trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible-expected.html 2021-06-22 18:33:24 UTC (rev 279130)
@@ -0,0 +1,29 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .scroller {
+ border: 1px solid black;
+ margin: 10px;
+ padding: 10px;
+ overflow: visible;
+ transform: translateZ(0px);
+ }
+
+ .box {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: 2px solid blue;
+ background-color: green;
+ padding: 10px;
+ }
+ </style>
+</head>
+<body>
+ <div class="scroller">
+ You should see the entire green box below
+ <div class="box"></div>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible.html (0 => 279130)
--- trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible.html (rev 0)
+++ trunk/LayoutTests/compositing/overflow/overflow-scroll-to-visible.html 2021-06-22 18:33:24 UTC (rev 279130)
@@ -0,0 +1,45 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .scroller {
+ border: 1px solid black;
+ margin: 10px;
+ padding: 10px;
+ overflow: scroll;
+ transform: translateZ(0px);
+ }
+
+ .box {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ border: 2px solid blue;
+ background-color: green;
+ padding: 10px;
+ }
+
+ body.changed .scroller {
+ overflow: visible;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ window.addEventListener('load', () => {
+ requestAnimationFrame(() => {
+ document.body.classList.add('changed');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ }, false);
+ </script>
+</head>
+<body>
+ <div class="scroller">
+ You should see the entire green box below
+ <div class="box"></div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (279129 => 279130)
--- trunk/Source/WebCore/ChangeLog 2021-06-22 18:18:30 UTC (rev 279129)
+++ trunk/Source/WebCore/ChangeLog 2021-06-22 18:33:24 UTC (rev 279130)
@@ -1,3 +1,28 @@
+2021-06-22 Simon Fraser <simon.fra...@apple.com>
+
+ REGRESSION (Safari 14): Submenus on https://codelearn.cat don't show
+ https://bugs.webkit.org/show_bug.cgi?id=225467
+ <rdar://problem/77612276>
+
+ Reviewed by Alan Bujtas.
+
+ RenderBox::requiresLayerWithScrollableArea() is called via RenderLayer::styleChanged()
+ which is before layout, yet requiresLayerWithScrollableArea() was consulting layout-dependent
+ state under hasHorizontalOverflow() || hasVerticalOverflow(). This resulted in composited
+ scrolling layers sticking around after overflow style changed from `scroll` to `visible`.
+
+ Fix by just removing the "has overflow" checks; we make RenderLayerScrollableArea
+ for any non-visible overflow anyway. scrollsOverflow() checks hasOverflowClip(),
+ so all we need is a hasOverflowClip() check.
+
+ Remove some redundant comments and add a FIXME about layers which get RenderLayerScrollableAreas
+ but don't need them.
+
+ Test: compositing/overflow/overflow-scroll-to-visible.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::requiresLayerWithScrollableArea const):
+
2021-06-22 Chris Dumez <cdu...@apple.com>
CSSStyleDeclaration.getPropertyPriority() should return the empty string for invalid CSS properties
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (279129 => 279130)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2021-06-22 18:18:30 UTC (rev 279129)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2021-06-22 18:33:24 UTC (rev 279130)
@@ -959,19 +959,16 @@
bool RenderBox::requiresLayerWithScrollableArea() const
{
- // The RenderView is always expected to be potentially scrollable.
+ // FIXME: This is wrong; these boxes' layers should not need ScrollableAreas via RenderLayer.
if (isRenderView() || isDocumentElementRenderer())
return true;
- // Overflow handling needs RenderLayerScrollableArea.
- if (scrollsOverflow() || hasOverflowClip() || hasHorizontalOverflow() || hasVerticalOverflow())
+ if (hasOverflowClip())
return true;
- // Resize handling needs RenderLayerScrollableArea.
if (style().resize() != Resize::None)
return true;
- // Marquee handling needs RenderLayerScrollableArea.
if (isHTMLMarquee() && style().marqueeBehavior() != MarqueeBehavior::None)
return true;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes