WebKit Bugzilla
Attachment 372606 Details for
Bug 199096
: Make it possible to include clipping in GraphicsLayer tree dumps
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199096-20190620182128.patch (text/plain), 14.21 KB, created by
Simon Fraser (smfr)
on 2019-06-20 18:21:28 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-06-20 18:21:28 PDT
Size:
14.21 KB
patch
obsolete
>Subversion Revision: 246612 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 37e2317df6da9d04474bcc19bca6c10b32fb4194..a22c8fe907d6031ad90f1adaceda7bf48dcc21f2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2019-06-20 Simon Fraser <simon.fraser@apple.com> >+ >+ Make it possible to include clipping in GraphicsLayer tree dumps >+ https://bugs.webkit.org/show_bug.cgi?id=199096 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning >+ it on for a couple of tests. >+ >+ * page/Frame.h: >+ * platform/graphics/GraphicsLayer.cpp: >+ (WebCore::GraphicsLayer::dumpProperties const): >+ * platform/graphics/GraphicsLayerClient.h: >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::layerTreeAsText): >+ * testing/Internals.cpp: >+ (WebCore::toLayerTreeFlags): >+ * testing/Internals.h: >+ * testing/Internals.idl: >+ > 2019-06-19 Jer Noble <jer.noble@apple.com> > > iOS 12.2 Drawing portrait video to canvas is sideways >diff --git a/Source/WebCore/page/Frame.h b/Source/WebCore/page/Frame.h >index 69a248fe157a17498bb11d8a3afa0a90c55ae31c..42742dd6f8e7a8712344e289c7fede9725e2e875 100644 >--- a/Source/WebCore/page/Frame.h >+++ b/Source/WebCore/page/Frame.h >@@ -113,9 +113,10 @@ enum { > LayerTreeFlagsIncludePaintingPhases = 1 << 4, > LayerTreeFlagsIncludeContentLayers = 1 << 5, > LayerTreeFlagsIncludeAcceleratesDrawing = 1 << 6, >- LayerTreeFlagsIncludeBackingStoreAttached = 1 << 7, >- LayerTreeFlagsIncludeRootLayerProperties = 1 << 8, >- LayerTreeFlagsIncludeEventRegion = 1 << 9, >+ LayerTreeFlagsIncludeClipping = 1 << 7, >+ LayerTreeFlagsIncludeBackingStoreAttached = 1 << 8, >+ LayerTreeFlagsIncludeRootLayerProperties = 1 << 9, >+ LayerTreeFlagsIncludeEventRegion = 1 << 10, > }; > typedef unsigned LayerTreeFlags; > >diff --git a/Source/WebCore/platform/graphics/GraphicsLayer.cpp b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >index 264af0b993420e976d09fe315d72b4c3df804d05..94aac1df8356bdb10df7d086face26c1e3718326 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayer.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsLayer.cpp >@@ -906,6 +906,9 @@ void GraphicsLayer::dumpProperties(TextStream& ts, LayerTreeAsTextBehavior behav > if (m_supportsSubpixelAntialiasedText) > ts << indent << "(supports subpixel antialiased text " << m_supportsSubpixelAntialiasedText << ")\n"; > >+ if (m_masksToBounds && behavior & LayerTreeAsTextIncludeClipping) >+ ts << indent << "(clips " << m_masksToBounds << ")\n"; >+ > if (m_preserves3D) > ts << indent << "(preserves3D " << m_preserves3D << ")\n"; > >diff --git a/Source/WebCore/platform/graphics/GraphicsLayerClient.h b/Source/WebCore/platform/graphics/GraphicsLayerClient.h >index 4056280540092f4b7e6caad55096a5311c9530fe..b87d758b02e3ba3f864847ddaf7ad06418c6904c 100644 >--- a/Source/WebCore/platform/graphics/GraphicsLayerClient.h >+++ b/Source/WebCore/platform/graphics/GraphicsLayerClient.h >@@ -70,9 +70,10 @@ enum LayerTreeAsTextBehaviorFlags { > LayerTreeAsTextIncludeContentLayers = 1 << 5, > LayerTreeAsTextIncludePageOverlayLayers = 1 << 6, > LayerTreeAsTextIncludeAcceleratesDrawing = 1 << 7, >- LayerTreeAsTextIncludeBackingStoreAttached = 1 << 8, >- LayerTreeAsTextIncludeRootLayerProperties = 1 << 9, >- LayerTreeAsTextIncludeEventRegion = 1 << 10, >+ LayerTreeAsTextIncludeClipping = 1 << 8, >+ LayerTreeAsTextIncludeBackingStoreAttached = 1 << 9, >+ LayerTreeAsTextIncludeRootLayerProperties = 1 << 10, >+ LayerTreeAsTextIncludeEventRegion = 1 << 11, > LayerTreeAsTextShowAll = 0xFFFF > }; > typedef unsigned LayerTreeAsTextBehavior; >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index f2978da5f6aa7923a5d7924c8919ed1eaea8632b..6752a87cf3949677bd73f4642622b5b975e1bdf3 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2084,6 +2084,8 @@ String RenderLayerCompositor::layerTreeAsText(LayerTreeFlags flags) > layerTreeBehavior |= LayerTreeAsTextIncludeContentLayers; > if (flags & LayerTreeFlagsIncludeAcceleratesDrawing) > layerTreeBehavior |= LayerTreeAsTextIncludeAcceleratesDrawing; >+ if (flags & LayerTreeFlagsIncludeClipping) >+ layerTreeBehavior |= LayerTreeAsTextIncludeClipping; > if (flags & LayerTreeFlagsIncludeBackingStoreAttached) > layerTreeBehavior |= LayerTreeAsTextIncludeBackingStoreAttached; > if (flags & LayerTreeFlagsIncludeRootLayerProperties) >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 7efc7c4469712f06c734fee2fadc534532047c4a..d25745aef1a6173cba74ecece7adbb75531df00c 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -2544,6 +2544,8 @@ static LayerTreeFlags toLayerTreeFlags(unsigned short flags) > layerTreeFlags |= LayerTreeFlagsIncludeContentLayers; > if (flags & Internals::LAYER_TREE_INCLUDES_ACCELERATES_DRAWING) > layerTreeFlags |= LayerTreeFlagsIncludeAcceleratesDrawing; >+ if (flags & Internals::LAYER_TREE_INCLUDES_CLIPPING) >+ layerTreeFlags |= LayerTreeFlagsIncludeClipping; > if (flags & Internals::LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED) > layerTreeFlags |= LayerTreeFlagsIncludeBackingStoreAttached; > if (flags & Internals::LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES) >diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h >index 0c03d68646ae6b4cc42cbe139f0a7c0c645308fc..7e41758cc60ab73eedb086cc23f97fed3491d014 100644 >--- a/Source/WebCore/testing/Internals.h >+++ b/Source/WebCore/testing/Internals.h >@@ -351,9 +351,10 @@ public: > LAYER_TREE_INCLUDES_PAINTING_PHASES = 8, > LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16, > LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32, >- LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64, >- LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128, >- LAYER_TREE_INCLUDES_EVENT_REGION = 256, >+ LAYER_TREE_INCLUDES_CLIPPING = 64, >+ LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 128, >+ LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 256, >+ LAYER_TREE_INCLUDES_EVENT_REGION = 512, > }; > ExceptionOr<String> layerTreeAsText(Document&, unsigned short flags) const; > ExceptionOr<uint64_t> layerIDForElement(Element&); >diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl >index 2692535d4614227aa161f4bdc86a08f258062f01..0822dbcde2a0240691d3d093616869b66347970b 100644 >--- a/Source/WebCore/testing/Internals.idl >+++ b/Source/WebCore/testing/Internals.idl >@@ -372,9 +372,10 @@ enum CompositingPolicy { > const unsigned short LAYER_TREE_INCLUDES_PAINTING_PHASES = 8; > const unsigned short LAYER_TREE_INCLUDES_CONTENT_LAYERS = 16; > const unsigned short LAYER_TREE_INCLUDES_ACCELERATES_DRAWING = 32; >- const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 64; >- const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 128; >- const unsigned short LAYER_TREE_INCLUDES_EVENT_REGION = 256; >+ const unsigned short LAYER_TREE_INCLUDES_CLIPPING = 64; >+ const unsigned short LAYER_TREE_INCLUDES_BACKING_STORE_ATTACHED = 128; >+ const unsigned short LAYER_TREE_INCLUDES_ROOT_LAYER_PROPERTIES = 256; >+ const unsigned short LAYER_TREE_INCLUDES_EVENT_REGION = 512; > [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0); > > [MayThrowException] unsigned long long layerIDForElement(Element element); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 8754acb8e3e9d02bfffad488406e829f3a439967..b3d1d93b9504b554308dac1e098ded06442ba12d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-20 Simon Fraser <simon.fraser@apple.com> >+ >+ Make it possible to include clipping in GraphicsLayer tree dumps >+ https://bugs.webkit.org/show_bug.cgi?id=199096 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt: >+ * compositing/clipping/border-radius-async-overflow-clipping-layer.html: >+ * compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt: >+ * compositing/clipping/border-radius-overflow-hidden-stacking-context.html: >+ * platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt: >+ > 2019-06-19 Jer Noble <jer.noble@apple.com> > > iOS 12.2 Drawing portrait video to canvas is sideways >diff --git a/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt b/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >index 74275d073f110d898a924f262e4acf326bad49df..77796824b658aa40b5f21cded05fd6702e97d38c 100644 >--- a/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >+++ b/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >@@ -3,6 +3,7 @@ This is the scrolled contents > (GraphicsLayer > (anchor 0.00 0.00) > (bounds 800.00 600.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (bounds 800.00 600.00) >@@ -18,6 +19,7 @@ This is the scrolled contents > (offsetFromRenderer width=30 height=30) > (position 44.00 44.00) > (bounds 320.00 200.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=30 height=30) >@@ -51,10 +53,12 @@ This is the scrolled contents > (offsetFromRenderer width=30 height=30) > (position 44.00 44.00) > (bounds 320.00 200.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=30 height=30) > (bounds 320.00 200.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (offsetFromRenderer width=30 height=30) >diff --git a/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html b/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html >index eb1b15b9f59229537efaf0ca11f268189ed8f841..a3b563c78cc21db3139a463c2194911dadf55268 100644 >--- a/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html >+++ b/LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html >@@ -39,7 +39,7 @@ > > window.addEventListener('load', () => { > if (window.testRunner) >- document.getElementById('layers').innerText = window.internals.layerTreeAsText(document); >+ document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING); > }, false); > </script> > >diff --git a/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt b/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt >index e635615accea1db04a1b93ecaed4eed93ef7278e..25ef15b7ac538d7f8f5504f73dceebb56d33f905 100644 >--- a/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt >+++ b/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context-expected.txt >@@ -3,6 +3,7 @@ Test CSS clip with composited layers. Left and right sides should look the same. > (GraphicsLayer > (anchor 0.00 0.00) > (bounds 800.00 600.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (bounds 800.00 600.00) >@@ -14,6 +15,7 @@ Test CSS clip with composited layers. Left and right sides should look the same. > (children 1 > (GraphicsLayer > (bounds 100.00 100.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (bounds 200.00 200.00) >diff --git a/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context.html b/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context.html >index 8ffcb0b6d4e4207f1a80e3e9663f2f77731b72bd..52d62fa3e9477fb50989261d2d8b9b3cfc5e1c6c 100644 >--- a/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context.html >+++ b/LayoutTests/compositing/clipping/border-radius-overflow-hidden-stacking-context.html >@@ -35,7 +35,7 @@ > > function doTest() { > if (window.testRunner) { >- document.getElementById('layers').innerText = window.internals.layerTreeAsText(document); >+ document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING); > testRunner.notifyDone(); > } > } >diff --git a/LayoutTests/platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt b/LayoutTests/platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >index b78ee333714f7ca559c9352e0920163e19782567..5341a900126bf14bc93c92601a6068bed5919951 100644 >--- a/LayoutTests/platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >+++ b/LayoutTests/platform/mac-wk1/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt >@@ -3,6 +3,7 @@ This is the scrolled contents > (GraphicsLayer > (anchor 0.00 0.00) > (bounds 800.00 600.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (bounds 800.00 600.00) >@@ -17,6 +18,7 @@ This is the scrolled contents > (offsetFromRenderer width=30 height=30) > (position 44.00 44.00) > (bounds 320.00 200.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (position 10.00 10.00) >@@ -43,6 +45,7 @@ This is the scrolled contents > (offsetFromRenderer width=30 height=30) > (position 44.00 44.00) > (bounds 320.00 200.00) >+ (clips 1) > (children 1 > (GraphicsLayer > (position 10.00 10.00)
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
Flags:
zalan
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199096
: 372606