WebKit Bugzilla
Attachment 356443 Details for
Bug 192320
: REGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords.html does not stay fixed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192320-20181203181721.patch (text/plain), 7.05 KB, created by
Simon Fraser (smfr)
on 2018-12-03 18:17:21 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2018-12-03 18:17:21 PST
Size:
7.05 KB
patch
obsolete
>Subversion Revision: 238817 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f4e615dd2bdd5224db937e5d4c47ce9bb468a8b1..00456cf137ed4acecad6db961cd5bbe440baea4e 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-12-03 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords.html does not stay fixed >+ https://bugs.webkit.org/show_bug.cgi?id=192320 >+ <rdar://problem/46429833> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When we fall into slow scrolling mode (for example, because of background-attachment: fixed), >+ RenderLayerCompositor::updateCompositingLayers() needs to set the geometry dirty bit on layers >+ for viewport-constrained objects so we update them. >+ >+ This is only necessary for page scrolling; for overflow scrolls, updateLayerPositions() already >+ does enough dirtying that fixed layers nested inside scrollers get updated. >+ >+ Test: compositing/fixed-with-main-thread-scrolling.html >+ >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::updateCompositingLayers): >+ > 2018-12-03 Simon Fraser <simon.fraser@apple.com> > > FrameView's ViewportConstrainedObjectSet can contain RenderLayerModelObjects rather than RenderElements >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index e01125599fee0a89f6d96adc4168728d0a4725e2..208c656124375303d6f7926d9295fa69014859c6 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -666,9 +666,20 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update > if (!m_compositing && (m_forceCompositingMode || (isMainFrameCompositor() && page().pageOverlayController().overlayCount()))) > enableCompositingMode(true); > >+ bool isPageScroll = !updateRoot || updateRoot == &rootRenderLayer(); > updateRoot = &rootRenderLayer(); > > if (updateType == CompositingUpdateType::OnScroll || updateType == CompositingUpdateType::OnCompositedScroll) { >+ // We only get here if we didn't scroll on the scrolling thread, so this update needs to re-position viewport-constrained layers. >+ if (m_renderView.settings().acceleratedCompositingForFixedPositionEnabled() && isPageScroll) { >+ if (auto* viewportConstrainedObjects = m_renderView.frameView().viewportConstrainedObjects()) { >+ for (auto* renderer : *viewportConstrainedObjects) { >+ if (auto* layer = renderer->layer()) >+ layer->setNeedsCompositingGeometryUpdate(); >+ } >+ } >+ } >+ > // Scrolling can affect overlap. FIXME: avoid for page scrolling. > updateRoot->setDescendantsNeedCompositingRequirementsTraversal(); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index bbc008dc136cef19c57e722e71efeebd303bc995..b12398d918a1daec9c72ccfc8bc7fe1abdb8f319 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-12-03 Simon Fraser <simon.fraser@apple.com> >+ >+ REGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords.html does not stay fixed >+ https://bugs.webkit.org/show_bug.cgi?id=192320 >+ <rdar://problem/46429833> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/fixed-with-main-thread-scrolling-expected.html: Added. >+ * compositing/fixed-with-main-thread-scrolling.html: Added. >+ > 2018-12-03 Daniel Bates <dabates@apple.com> > > [iOS] Do not handle key events that are key commands >diff --git a/LayoutTests/compositing/fixed-with-main-thread-scrolling-expected.html b/LayoutTests/compositing/fixed-with-main-thread-scrolling-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..6bf7cba6881aee92b34d4f5accfc6fbc235d922f >--- /dev/null >+++ b/LayoutTests/compositing/fixed-with-main-thread-scrolling-expected.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ body { >+ height: 6000px; >+ } >+ .box { >+ position: absolute; >+ top: 5718px; >+ left: 10px; >+ width: 200px; >+ height: 200px; >+ background-color: green; >+ } >+ >+ .fixed-background { >+ margin-top: 300px; >+ height: 200px; >+ background-image: linear-gradient(white, silver); >+ background-attachment: fixed; >+ } >+ </style> >+</head> >+<body> >+ >+<div class="box"></div> >+ >+<div class="fixed-background"> >+ I have a fixed background. >+</div> >+<script> >+ window.scrollTo(0, 6000); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/compositing/fixed-with-main-thread-scrolling.html b/LayoutTests/compositing/fixed-with-main-thread-scrolling.html >new file mode 100644 >index 0000000000000000000000000000000000000000..951660340f077b7d35fbc751169487669e6a2291 >--- /dev/null >+++ b/LayoutTests/compositing/fixed-with-main-thread-scrolling.html >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <style> >+ body { >+ height: 6000px; >+ } >+ .box { >+ position: fixed; >+ top: 10px; >+ left: 10px; >+ width: 200px; >+ height: 200px; >+ background-color: green; >+ } >+ >+ .fixed-background { >+ margin-top: 300px; >+ height: 200px; >+ background-image: linear-gradient(white, silver); >+ background-attachment: fixed; >+ } >+ </style> >+ <script> >+ if (window.testRunner) { >+ testRunner.waitUntilDone(); >+ } >+ >+ function scrollTest() >+ { >+ eventSender.mouseMoveTo(20, 20); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "began", "none"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "changed", "none"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "changed", "none"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -1, "changed", "none"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "begin"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -100, "none", "continue"); >+ eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "none", "end"); >+ testRunner.notifyDone(); >+ } >+ >+ window.addEventListener('load', () => { >+ setTimeout(() => { >+ scrollTest(); >+ }, 0) >+ }, false); >+ </script> >+</head> >+<body> >+ >+<div class="box"></div> >+ >+<div class="fixed-background"> >+ I have a fixed background. >+</div> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192320
:
356443
|
356448