WebKit Bugzilla
Attachment 371742 Details for
Bug 198717
: Event region should be set on scrolledContentsLayer if it exists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
touch-action-scrolling-2.patch (text/plain), 10.92 KB, created by
Antti Koivisto
on 2019-06-10 07:51:11 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-06-10 07:51:11 PDT
Size:
10.92 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 246262) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,30 @@ >+2019-06-10 Antti Koivisto <antti@apple.com> >+ >+ Event region should be set on scrolledContentsLayer if it exists >+ https://bugs.webkit.org/show_bug.cgi?id=198717 >+ <rdar://problem/51572169> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: pointerevents/ios/touch-action-region-overflow.html >+ >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateConfiguration): >+ >+ Move to updateBackingAndHierarchy. >+ >+ (WebCore::RenderLayerBacking::updateEventRegion): >+ >+ - Set event region on scrolledContentsLayer if it exists >+ - Translate away the scroll offset >+ - Get the offset from renderer from the GraphicsLayer so scrolling and non-scrolling case can be handled uniformly. >+ >+ * rendering/RenderLayerBacking.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): >+ >+ Invoke updateEventRegion after geometry update so offsets are already available on GraphicsLayer. >+ > 2019-06-09 Rob Buis <rbuis@igalia.com> > > Add wildcard to Access-Control-Allow-Methods and Access-Control-Allow-Headers >Index: Source/WebCore/rendering/RenderLayerBacking.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 246186) >+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy) >@@ -841,8 +841,6 @@ bool RenderLayerBacking::updateConfigura > } else > updateRootLayerConfiguration(); > >- updateEventRegion(); >- > // Requires layout. > if (contentsInfo.isDirectlyCompositedImage()) > updateImageContents(contentsInfo); >@@ -1526,10 +1524,12 @@ void RenderLayerBacking::updateEventRegi > for (auto& layer : m_backingSharingLayers) > layer->paintLayerWithEffects(nullContext, paintingInfo, paintFlags); > >- auto contentOffset = roundedIntSize(contentOffsetInCompositingLayer()); >- eventRegion.translate(contentOffset); >- m_graphicsLayer->setEventRegion(WTFMove(eventRegion)); >+ GraphicsLayer& layerForEventRegion = m_scrolledContentsLayer ? *m_scrolledContentsLayer : *m_graphicsLayer; >+ >+ auto layerOffset = toIntSize(layerForEventRegion.scrollOffset()) - roundedIntSize(layerForEventRegion.offsetFromRenderer()); >+ eventRegion.translate(layerOffset); > >+ layerForEventRegion.setEventRegion(WTFMove(eventRegion)); > #endif > } > >Index: Source/WebCore/rendering/RenderLayerBacking.h >=================================================================== >--- Source/WebCore/rendering/RenderLayerBacking.h (revision 246186) >+++ Source/WebCore/rendering/RenderLayerBacking.h (working copy) >@@ -216,6 +216,8 @@ public: > bool setCompositedBounds(const LayoutRect&); > // Returns true if changed. > bool updateCompositedBounds(); >+ >+ void updateEventRegion(); > > void updateAfterWidgetResize(); > void positionOverflowControlsLayers(); >@@ -358,7 +360,6 @@ private: > bool paintsContent(RenderLayer::PaintedContentRequest&) const; > > void updateDrawsContent(PaintedContentsInfo&); >- void updateEventRegion(); > > // Returns true if this compositing layer has no visible content. > bool isSimpleContainerCompositingLayer(PaintedContentsInfo&) const; >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 246186) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -1210,6 +1210,11 @@ void RenderLayerCompositor::updateBackin > } else if (layer.needsScrollingTreeUpdate()) > scrollingNodeChanges.add(ScrollingNodeChangeFlags::LayerGeometry); > >+ // This needs to happen after any geometry update. >+ // FIXME: Use separate bit for event region invalidation. >+ if (layerNeedsUpdate || layer.needsCompositingConfigurationUpdate()) >+ layerBacking->updateEventRegion(); >+ > if (auto* reflection = layer.reflectionLayer()) { > if (auto* reflectionBacking = reflection->backing()) { > reflectionBacking->updateCompositedBounds(); >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 246186) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2019-06-10 Antti Koivisto <antti@apple.com> >+ >+ Event region should be set on scrolledContentsLayer if it exists >+ https://bugs.webkit.org/show_bug.cgi?id=198717 >+ <rdar://problem/51572169> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * pointerevents/ios/touch-action-region-backing-sharing-expected.txt: >+ * pointerevents/ios/touch-action-region-overflow-expected.txt: Added. >+ * pointerevents/ios/touch-action-region-overflow.html: Added. >+ > 2019-06-06 Youenn Fablet <youenn@apple.com> > > Allow WebKitTestRunner to terminate network process after it finishes service worker file operations >Index: LayoutTests/pointerevents/ios/touch-action-region-backing-sharing-expected.txt >=================================================================== >--- LayoutTests/pointerevents/ios/touch-action-region-backing-sharing-expected.txt (revision 246186) >+++ LayoutTests/pointerevents/ios/touch-action-region-backing-sharing-expected.txt (working copy) >@@ -1,7 +1,6 @@ > (GraphicsLayer > (anchor 0.00 0.00) > (bounds 800.00 600.00) >- (deep color 1) > (children 1 > (GraphicsLayer > (bounds 800.00 600.00) >@@ -9,15 +8,10 @@ > (event region > (rect (0,0) width=800 height=600) > ) >- (deep color 1) > (children 2 > (GraphicsLayer > (position 8.00 13.00) > (bounds 200.00 200.00) >- (event region >- (rect (0,0) width=500 height=500) >- ) >- (deep color 1) > (children 1 > (GraphicsLayer > (bounds 200.00 200.00) >@@ -26,7 +20,9 @@ > (anchor 0.00 0.00) > (bounds 500.00 500.00) > (drawsContent 1) >- (deep color 1) >+ (event region >+ (rect (0,0) width=500 height=500) >+ ) > ) > ) > ) >@@ -48,7 +44,6 @@ > ) > ) > ) >- (deep color 1) > ) > ) > ) >Index: LayoutTests/pointerevents/ios/touch-action-region-overflow-expected.txt >=================================================================== >--- LayoutTests/pointerevents/ios/touch-action-region-overflow-expected.txt (nonexistent) >+++ LayoutTests/pointerevents/ios/touch-action-region-overflow-expected.txt (working copy) >@@ -0,0 +1,96 @@ >+(GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 800.00 671.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 800.00 671.00) >+ (contentsOpaque 1) >+ (event region >+ (rect (0,0) width=800 height=671) >+ ) >+ (children 3 >+ (GraphicsLayer >+ (position 8.00 8.00) >+ (bounds 200.00 200.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds 200.00 200.00) >+ (children 1 >+ (GraphicsLayer >+ (anchor 0.00 0.00) >+ (bounds 500.00 500.00) >+ (drawsContent 1) >+ (event region >+ (rect (0,0) width=500 height=500) >+ (touch-action >+ (none >+ (rect (150,150) width=100 height=100) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (position 8.00 208.00) >+ (bounds 200.00 200.00) >+ (children 1 >+ (GraphicsLayer >+ (bounds origin 150.00 150.00) >+ (bounds 200.00 200.00) >+ (children 1 >+ (GraphicsLayer >+ (scrollOffset (150,150)) >+ (anchor 0.00 0.00) >+ (bounds 500.00 500.00) >+ (drawsContent 1) >+ (event region >+ (rect (0,0) width=500 height=500) >+ (touch-action >+ (none >+ (rect (150,150) width=100 height=100) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ (GraphicsLayer >+ (position 8.00 408.00) >+ (bounds 250.00 250.00) >+ (drawsContent 1) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=25 height=25) >+ (position 25.00 25.00) >+ (bounds origin 150.00 150.00) >+ (bounds 200.00 200.00) >+ (children 1 >+ (GraphicsLayer >+ (offsetFromRenderer width=25 height=25) >+ (scrollOffset (150,150)) >+ (anchor 0.00 0.00) >+ (bounds 500.00 500.00) >+ (drawsContent 1) >+ (event region >+ (rect (0,0) width=500 height=500) >+ (touch-action >+ (none >+ (rect (150,150) width=100 height=100) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >Index: LayoutTests/pointerevents/ios/touch-action-region-overflow.html >=================================================================== >--- LayoutTests/pointerevents/ios/touch-action-region-overflow.html (nonexistent) >+++ LayoutTests/pointerevents/ios/touch-action-region-overflow.html (working copy) >@@ -0,0 +1,23 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<style> >+.scroll { position:relative; width:200px; height:200px; overflow:scroll } >+.scrollcontent { position:absolute; width:500px; height:500px; background:green; } >+.none { position:relative; top:150px; left:150px; width:100px; height:100px; background:blue; touch-action: none; } >+</style> >+<body> >+<div class="scroll"><div class="scrollcontent"><div class="none"></div></div></div> >+<div class="scroll target"><div class="scrollcontent"><div class="none"></div></div></div> >+<div class="scroll target" style="border:25px solid yellow"><div class="scrollcontent"><div class="none"></div></div></div> >+<pre id="results"></pre> >+<script> >+for (target of document.querySelectorAll(".target")) >+ target.scrollBy(150,150); >+ >+if (window.testRunner) >+ testRunner.dumpAsText(); >+if (window.internals) >+ results.innerText = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_EVENT_REGION); >+</script> >+</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 198717
: 371742 |
371766