summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-06-21 23:16:08 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-06-21 23:16:08 (GMT)
commit511d86e88b33380116f27d5f6a2a0754e8f62fa0 (patch)
tree6fdcb11b5270984112bc2563738c24d2891595d4 /src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp
parentaae3c899b10bee2dd64bb00bb2832620a47cff87 (diff)
parentfbf9db1fc6b500bfe05fdfca121986687d73d5c6 (diff)
downloadQt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.zip
Qt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.tar.gz
Qt-511d86e88b33380116f27d5f6a2a0754e8f62fa0.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderReplica.cpp22
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)