WebKit Bugzilla
Attachment 369561 Details for
Bug 197692
: Backing-sharing layers with transforms render incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
bug-197692-20190510101719.patch (text/plain), 23.49 KB, created by
Simon Fraser (smfr)
on 2019-05-10 10:17:20 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-10 10:17:20 PDT
Size:
23.49 KB
patch
obsolete
>Subversion Revision: 245170 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8cb18e7da7c75fd08039c7e663e741ed20889016..b9262b8b069fa293d7a9584aab537b8784cd82c3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,32 @@ >+2019-05-09 Simon Fraser <simon.fraser@apple.com> >+ >+ Backing-sharing layers with transforms render incorrectly >+ https://bugs.webkit.org/show_bug.cgi?id=197692 >+ <rdar://problem/50652127> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When layers that paint into shared backing have effects (transform, filter, opacity), we need >+ to paint with those effects. That's different from the primary layer, whose effects are normally >+ mapped to GraphicsLayer properties. (Note that if the primary layer has an effect, that effect will create >+ stacking context, so descendants will also become z-order descendants and there's no need to do sharing.) >+ >+ For some reason reflection painting is broken, so just disable sharing in that case. >+ >+ Tests: compositing/shared-backing/shared-layer-has-filter.html >+ compositing/shared-backing/shared-layer-has-opacity.html >+ compositing/shared-backing/shared-layer-has-reflection.html >+ compositing/shared-backing/shared-layer-has-transform.html >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintLayer): >+ (WebCore::RenderLayer::paintLayerWithEffects): >+ * rendering/RenderLayer.h: >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::paintIntoLayer): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::backingProviderLayerCanIncludeLayer): >+ > 2019-05-09 Simon Fraser <simon.fraser@apple.com> > > Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer >diff --git a/Source/WebCore/platform/Logging.cpp b/Source/WebCore/platform/Logging.cpp >index 899141ce0d39d4151450cf4e1632cdb4ca85af97..e48fc645355401d3938e26a5c8adbe8130b34e0b 100644 >--- a/Source/WebCore/platform/Logging.cpp >+++ b/Source/WebCore/platform/Logging.cpp >@@ -78,6 +78,7 @@ void initializeLogChannelsIfNecessary(Optional<String> logChannelString) > > String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString(); > WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, enabledChannelsString.utf8().data()); >+ LogCompositing.state = WTFLogChannelState::On; > } > > WTFLogChannel* getLogChannel(const String& name) >diff --git a/Source/WebCore/platform/graphics/GraphicsContext.h b/Source/WebCore/platform/graphics/GraphicsContext.h >index 1c366d51cbd74d0bcedec5790df2ed71aacc7a96..964598b4a414ca808bdcac7b019cae8b32a35ee8 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContext.h >+++ b/Source/WebCore/platform/graphics/GraphicsContext.h >@@ -348,6 +348,8 @@ public: > > WEBCORE_EXPORT void save(); > WEBCORE_EXPORT void restore(); >+ >+ unsigned stackSize() const { return m_stack.size(); } > > // These draw methods will do both stroking and filling. > // FIXME: ...except drawRect(), which fills properly but always strokes >@@ -686,6 +688,27 @@ private: > bool m_saveAndRestore; > }; > >+ >+class GraphicsContextStateStackChecker { >+public: >+ GraphicsContextStateStackChecker(GraphicsContext& context) >+ : m_context(context) >+ , m_stackSize(context.stackSize()) >+ { } >+ >+ ~GraphicsContextStateStackChecker() >+ { >+ if (m_context.stackSize() != m_stackSize) >+ WTFLogAlways("GraphicsContext %p stack changed by %d", this, (int)m_context.stackSize() - (int)m_stackSize); >+ } >+ >+private: >+ GraphicsContext& m_context; >+ unsigned m_stackSize; >+}; >+ >+ >+ > class InterpolationQualityMaintainer { > public: > explicit InterpolationQualityMaintainer(GraphicsContext& graphicsContext, InterpolationQuality interpolationQualityToUse) >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index a25dbd1abb909e84c6fe51b68ed414c7129da324..9901d46da10e3bc0a62c5df79d84420c15b10f39 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -2056,6 +2056,8 @@ void RenderLayer::beginTransparencyLayers(GraphicsContext& context, const LayerP > ancestor->beginTransparencyLayers(context, paintingInfo, dirtyRect); > > if (paintsWithTransparency(paintingInfo.paintBehavior)) { >+ >+ WTFLogAlways("RenderLayer %p beginTransparencyLayers", this); > ASSERT(isCSSStackingContext()); > m_usedTransparency = true; > context.save(); >@@ -4100,26 +4102,39 @@ void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& > return; > } > >+ paintLayerWithEffects(context, paintingInfo, paintFlags); >+} >+ >+void RenderLayer::paintLayerWithEffects(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags) >+{ >+ GraphicsContextStateStackChecker checker(context); >+ > // Non self-painting leaf layers don't need to be painted as their renderer() should properly paint itself. > if (!isSelfPaintingLayer() && !hasSelfPaintingLayerDescendant()) > return; > > if (shouldSuppressPaintingLayer(this)) > return; >- >+ > // If this layer is totally invisible then there is nothing to paint. > if (!renderer().opacity()) > return; > >+ WTFLogAlways("-> RenderLayer %p paintLayerWithEffects (paints with transparency %d)", this, paintsWithTransparency(paintingInfo.paintBehavior)); >+ > if (paintsWithTransparency(paintingInfo.paintBehavior)) > paintFlags.add(PaintLayerHaveTransparency); > > // PaintLayerAppliedTransform is used in RenderReplica, to avoid applying the transform twice. > if (paintsWithTransform(paintingInfo.paintBehavior) && !(paintFlags & PaintLayerAppliedTransform)) { >+ GraphicsContextStateStackChecker transformChecker(context); >+ > TransformationMatrix layerTransform = renderableTransform(paintingInfo.paintBehavior); > // If the transform can't be inverted, then don't paint anything. >- if (!layerTransform.isInvertible()) >+ if (!layerTransform.isInvertible()) { >+ WTFLogAlways("<- RenderLayer %p paintLayerWithEffects 1", this); > return; >+ } > > // If we have a transparency layer enclosing us and we are the root of a transform, then we need to establish the transparency > // layer from the parent now, assuming there is a parent >@@ -4132,6 +4147,7 @@ void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& > > if (enclosingPaginationLayer(ExcludeCompositedPaginatedLayers)) { > paintTransformedLayerIntoFragments(context, paintingInfo, paintFlags); >+ WTFLogAlways("<- RenderLayer %p paintLayerWithEffects 2", this); > return; > } > >@@ -4153,10 +4169,13 @@ void RenderLayer::paintLayer(GraphicsContext& context, const LayerPaintingInfo& > if (parent()) > parent()->restoreClip(context, paintingInfo, clipRect); > >+ WTFLogAlways("<- RenderLayer %p paintLayerWithEffects 3", this); > return; > } > > paintLayerContentsAndReflection(context, paintingInfo, paintFlags); >+ >+ WTFLogAlways("<- RenderLayer %p paintLayerWithEffects", this); > } > > void RenderLayer::paintLayerContentsAndReflection(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags) >@@ -4549,7 +4568,9 @@ void RenderLayer::paintLayerContents(GraphicsContext& context, const LayerPainti > } > > // End our transparency layer >+ WTFLogAlways("RenderLayer %p may endTransparencyLayer - haveTransparency %d, m_usedTransparency %d", this, haveTransparency, m_usedTransparency); > if (haveTransparency && m_usedTransparency && !m_paintingInsideReflection) { >+ WTFLogAlways("RenderLayer %p endTransparencyLayer", this); > context.endTransparencyLayer(); > context.restore(); > m_usedTransparency = false; >@@ -4565,6 +4586,9 @@ void RenderLayer::paintLayerContents(GraphicsContext& context, const LayerPainti > > void RenderLayer::paintLayerByApplyingTransform(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags, const LayoutSize& translationOffset) > { >+ WTFLogAlways("-> RenderLayer %p paintLayerByApplyingTransform", this); >+ GraphicsContextStateStackChecker checker(context); >+ > // This involves subtracting out the position of the layer in our current coordinate space, but preserving > // the accumulated error for sub-pixel layout. > float deviceScaleFactor = renderer().document().deviceScaleFactor(); >@@ -4590,6 +4614,8 @@ void RenderLayer::paintLayerByApplyingTransform(GraphicsContext& context, const > transformedPaintingInfo.subpixelOffset = adjustedSubpixelOffset; > paintLayerContentsAndReflection(context, transformedPaintingInfo, paintFlags); > context.setCTM(oldTransfrom); >+ >+ WTFLogAlways("<- RenderLayer %p paintLayerByApplyingTransform", this); > } > > void RenderLayer::paintList(LayerList layerIterator, GraphicsContext& context, const LayerPaintingInfo& paintingInfo, OptionSet<PaintLayerFlag> paintFlags) >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index da4beb9ac9850608552fafafe7bda20af019ad1b..22be9bcbbfe02dedc4bc25caaada73466ad62756 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -1003,6 +1003,8 @@ private: > void applyFilters(GraphicsContext& originalContext, const LayerPaintingInfo&, const LayerFragments&); > > void paintLayer(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>); >+ void paintLayerWithEffects(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>); >+ > void paintLayerContentsAndReflection(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>); > void paintLayerByApplyingTransform(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>, const LayoutSize& translationOffset = LayoutSize()); > void paintLayerContents(GraphicsContext&, const LayerPaintingInfo&, OptionSet<PaintLayerFlag>); >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index 0ed800cf919112e1da9806f86b4dcb74ef101718..7c71cc35eb741fca797dd4de06e7a340f8de4e51 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -2659,16 +2659,21 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap > auto paintOneLayer = [&](RenderLayer& layer, OptionSet<RenderLayer::PaintLayerFlag> paintFlags) { > InspectorInstrumentation::willPaint(layer.renderer()); > >+ GraphicsContextStateStackChecker checker(context); >+ > FrameView::PaintingState paintingState; > if (layer.isRenderViewLayer()) > renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState); > > RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer); > >- layer.paintLayerContents(context, paintingInfo, paintFlags); >+ if (&layer == &m_owningLayer) { >+ layer.paintLayerContents(context, paintingInfo, paintFlags); > >- if (layer.containsDirtyOverlayScrollbars()) >- layer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); >+ if (layer.containsDirtyOverlayScrollbars()) >+ layer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); >+ } else >+ layer.paintLayerWithEffects(context, paintingInfo, paintFlags); > > if (layer.isRenderViewLayer()) > renderer().view().frameView().didPaintContents(context, paintDirtyRect, paintingState); >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index e3a4c9f3f87abeb4ebe4024fec1e69ac51648d36..a2348ff1a7e327c23d28362939a7c351c0ca07be 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -860,6 +860,9 @@ bool RenderLayerCompositor::updateCompositingLayers(CompositingUpdateType update > > static bool backingProviderLayerCanIncludeLayer(const RenderLayer& sharedLayer, const RenderLayer& layer) > { >+ // Disable sharing when painting shared layers doesn't work correctly. >+ if (layer.hasReflection()) >+ return false; > return layer.ancestorLayerIsInContainingBlockChain(sharedLayer); > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 72cecf98bb49ee8e208906cf95b381f17c2d678d..4806f21612dd20a66749e051f8a81f549c330b65 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-09 Simon Fraser <simon.fraser@apple.com> >+ >+ Backing-sharing layers with transforms render incorrectly >+ https://bugs.webkit.org/show_bug.cgi?id=197692 >+ <rdar://problem/50652127> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/shared-backing/shared-layer-has-filter-expected.html: Added. >+ * compositing/shared-backing/shared-layer-has-filter.html: Added. >+ * compositing/shared-backing/shared-layer-has-opacity-expected.html: Added. >+ * compositing/shared-backing/shared-layer-has-opacity.html: Added. >+ * compositing/shared-backing/shared-layer-has-reflection-expected.html: Added. >+ * compositing/shared-backing/shared-layer-has-reflection.html: Added. >+ * compositing/shared-backing/shared-layer-has-transform-expected.html: Added. >+ * compositing/shared-backing/shared-layer-has-transform.html: Added. >+ > 2019-05-09 Simon Fraser <simon.fraser@apple.com> > > Implement backing-sharing in compositing layers, allowing overlap layers to paint into the backing store of another layer >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-filter-expected.html b/LayoutTests/compositing/shared-backing/shared-layer-has-filter-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..55828317fca87f46603428e80d7ad0fe13d69ae4 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-filter-expected.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a filtered layer into shared backing</title> >+ <style> >+ .scrollable { >+ position: relative; >+ z-index: 0; >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 200px; >+ height: 200px; >+ background-color: magenta; >+ filter: hue-rotate(0.5turn); >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-filter.html b/LayoutTests/compositing/shared-backing/shared-layer-has-filter.html >new file mode 100644 >index 0000000000000000000000000000000000000000..40713897176abb1b24b09aea227c71aa012533ed >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-filter.html >@@ -0,0 +1,33 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a filtered layer into shared backing</title> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 200px; >+ height: 200px; >+ background-color: magenta; >+ filter: hue-rotate(0.5turn); >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-opacity-expected.html b/LayoutTests/compositing/shared-backing/shared-layer-has-opacity-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..74c6a3303ce9ebef9d52382a9e19a34b3acf470b >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-opacity-expected.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a layer with opacity into shared backing</title> >+ <style> >+ .scrollable { >+ position: relative; >+ z-index: 0; >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 200px; >+ height: 200px; >+ background-color: green; >+ opacity: 0.5; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-opacity.html b/LayoutTests/compositing/shared-backing/shared-layer-has-opacity.html >new file mode 100644 >index 0000000000000000000000000000000000000000..1abf4e48c3bd300387a2bdef48a4c2bd439a1448 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-opacity.html >@@ -0,0 +1,33 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a layer with opacity into shared backing</title> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 200px; >+ height: 200px; >+ background-color: green; >+ opacity: 0.5; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-reflection-expected.html b/LayoutTests/compositing/shared-backing/shared-layer-has-reflection-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4eefd643fb9d4b9572f36742007ecd9822a08669 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-reflection-expected.html >@@ -0,0 +1,37 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a reflected layer into shared backing</title> >+ <style> >+ .scrollable { >+ position: relative; >+ z-index: 0; >+ overflow-y: scroll; >+ height: 400px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ margin: 20px; >+ width: 150px; >+ height: 130px; >+ background-color: green; >+ border-bottom: 20px solid orange; >+ -webkit-box-reflect: below 10px; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-reflection.html b/LayoutTests/compositing/shared-backing/shared-layer-has-reflection.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f584d9ef1a5f3619d88f9e6588b50d1eb3e06d44 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-reflection.html >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a reflected layer into shared backing</title> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 400px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ margin: 20px; >+ width: 150px; >+ height: 130px; >+ background-color: green; >+ border-bottom: 20px solid orange; >+ -webkit-box-reflect: below 10px; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-transform-expected.html b/LayoutTests/compositing/shared-backing/shared-layer-has-transform-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..daccda1b77fc43489e372c97b892ec0b63920b41 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-transform-expected.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a transformed layer into shared backing</title> >+ <style> >+ .scrollable { >+ position: relative; >+ z-index: 0; >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+ transform: scale(2); >+ transform-origin: top left; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >diff --git a/LayoutTests/compositing/shared-backing/shared-layer-has-transform.html b/LayoutTests/compositing/shared-backing/shared-layer-has-transform.html >new file mode 100644 >index 0000000000000000000000000000000000000000..7a45c9151b5eb1e0308da5e2d3f9172d054f41dc >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/shared-layer-has-transform.html >@@ -0,0 +1,34 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests painting of a transformed layer into shared backing</title> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .sharing { >+ width: 100px; >+ height: 100px; >+ background-color: green; >+ transform: scale(2); >+ transform-origin: top left; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing"> >+ </div> >+ <div class="spacer"></div> >+ </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 197692
:
369544
|
369561
|
369637
|
369638
|
369639
|
369641
|
369642
|
369643
|
369644
|
369645
|
369646
|
369647
|
369652