Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Unified Diff: third_party/WebKit/Source/core/paint/ReplicaPainter.cpp

Issue 1391943005: Document reflection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed the TODO. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/paint/ReplicaPainter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/ReplicaPainter.cpp
diff --git a/third_party/WebKit/Source/core/paint/ReplicaPainter.cpp b/third_party/WebKit/Source/core/paint/ReplicaPainter.cpp
index 20fd08d116bb8b60d952ec5e13c288a8e02c580e..3c21f7b039518a123bfcb1301353531fef77ec46 100644
--- a/third_party/WebKit/Source/core/paint/ReplicaPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/ReplicaPainter.cpp
@@ -15,6 +15,10 @@ namespace blink {
void ReplicaPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
+ // PaintLayerReflectionInfo should have set a transform on the LayoutReplica.
+ // Without it, we won't paint the reflection correctly.
+ ASSERT(m_layoutReplica.layer()->transform());
+
if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseMask)
return;
@@ -23,7 +27,7 @@ void ReplicaPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintO
if (paintInfo.phase == PaintPhaseForeground) {
// Turn around and paint the parent layer. Use temporary clipRects, so that the layer doesn't end up caching clip rects
// computing using the wrong rootLayer
- PaintLayer* rootPaintingLayer = m_layoutReplica.layer()->transform() ? m_layoutReplica.layer()->parent() : m_layoutReplica.layer()->enclosingTransformedAncestor();
+ PaintLayer* rootPaintingLayer = m_layoutReplica.layer()->parent();
PaintLayerPaintingInfo paintingInfo(rootPaintingLayer, LayoutRect(paintInfo.rect), GlobalPaintNormalPhase, LayoutSize(), 0);
PaintLayerFlags flags = PaintLayerHaveTransparency | PaintLayerAppliedTransform | PaintLayerUncachedClipRects | PaintLayerPaintingReflection;
PaintLayerPainter(*m_layoutReplica.layer()->parent()).paintLayer(paintInfo.context, paintingInfo, flags);
« no previous file with comments | « third_party/WebKit/Source/core/paint/ReplicaPainter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698