| Summary: | Artifacts when absolute positioned element with transform moves positions | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Liam <carlos> | ||||||||
| Component: | New Bugs | Assignee: | zalan <zalan> | ||||||||
| Status: | ASSIGNED --- | ||||||||||
| Severity: | Normal | CC: | simon.fraser, webkit-bug-importer, zalan | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | 528+ (Nightly build) | ||||||||||
| Hardware: | Mac | ||||||||||
| OS: | OS X 10.10 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Carlos Liam
2015-01-07 06:34:51 PST
I can reproduce on ToT. We don't repaint the invalidated area, resulting in stale pixels everywhere. Created attachment 244304 [details]
Test reduction.
This happens because we repaint the layer in RenderLayerCompositor::updateBacking() after the style change that starts the transition. So the layer already has the new transform and transform origin. We can work around this by repainting using the layer's cached repaint rect I think. Created attachment 244401 [details]
Test with positioned descendant of the moving box
Fix is something like this:
diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp
index 1e9f4955775fa120f39cca40126296089e043746..8688273887be2d6dba3d741afe925a02071de05b 100644
--- a/Source/WebCore/rendering/RenderLayer.cpp
+++ b/Source/WebCore/rendering/RenderLayer.cpp
@@ -4094,12 +4094,14 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
bool needToAdjustSubpixelQuantization = setupFontSubpixelQuantization(context, didQuantizeFonts);
// Apply clip-path to context.
- bool hasClipPath = setupClipPath(context, paintingInfo, offsetFromRoot, rootRelativeBounds, rootRelativeBoundsComputed);
+ LayoutSize columnAwareOffsetFromRoot = toLayoutSize(convertToLayerCoords(paintingInfo.rootLayer, LayoutPoint(), AdjustForColumns));
+ bool hasClipPath = setupClipPath(context, paintingInfo, columnAwareOffsetFromRoot, rootRelativeBounds, rootRelativeBoundsComputed);
LayerPaintingInfo localPaintingInfo(paintingInfo);
GraphicsContext* transparencyLayerContext = context;
- std::unique_ptr<FilterEffectRendererHelper> filterPainter = setupFilters(context, localPaintingInfo, paintFlags, offsetFromRoot, rootRelativeBounds, rootRelativeBoundsComputed);
+
+ std::unique_ptr<FilterEffectRendererHelper> filterPainter = setupFilters(context, localPaintingInfo, paintFlags, columnAwareOffsetFromRoot, rootRelativeBounds, rootRelativeBoundsComputed);
if (filterPainter) {
context = filterPainter->filterContext();
if (context != transparencyLayerContext && haveTransparency) {
Sorry, that was meant for another bug. |