diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp index 9556980..e805298 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp +++ b/src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp @@ -35,24 +35,26 @@ namespace WebCore { RenderReplica::RenderReplica(Node* n) : RenderBox(n) -{} +{ + // This is a hack. Replicas are synthetic, and don't pick up the attributes of the + // renderers being replicated, so they always report that they are inline, non-replaced. + // However, we need transforms to be applied to replicas for reflections, so have to pass + // the if (!isInline() || isReplaced()) check before setHasTransform(). + setReplaced(true); +} RenderReplica::~RenderReplica() {} void RenderReplica::layout() { - IntRect box = parent()->borderBox(); - m_x = box.x(); - m_y = box.y(); - m_width = box.width(); - m_height = box.height(); + setFrameRect(parentBox()->borderBoxRect()); setNeedsLayout(false); } void RenderReplica::calcPrefWidths() { - m_minPrefWidth = parent()->width(); + m_minPrefWidth = parentBox()->width(); m_maxPrefWidth = m_minPrefWidth; setPrefWidthsDirty(false); } @@ -62,15 +64,15 @@ void RenderReplica::paint(PaintInfo& paintInfo, int tx, int ty) if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhaseMask) return; - tx += m_x; - ty += m_y; + tx += x(); + ty += y(); 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 layer()->parent()->paintLayer(layer()->transform() ? layer()->parent() : layer()->enclosingTransformedAncestor(), paintInfo.context, paintInfo.rect, - true, PaintRestrictionNone, 0, + true, PaintRestrictionNone, 0, 0, true, // appliedTransform true); // temporaryClipRects else if (paintInfo.phase == PaintPhaseMask) |