summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderPart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/RenderPart.cpp')
-rw-r--r--WebCore/rendering/RenderPart.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/WebCore/rendering/RenderPart.cpp b/WebCore/rendering/RenderPart.cpp
index a9a821e..6f79a00 100644
--- a/WebCore/rendering/RenderPart.cpp
+++ b/WebCore/rendering/RenderPart.cpp
@@ -88,13 +88,11 @@ void RenderPart::updateWidgetPosition()
if (!m_widget)
return;
- int x, y, width, height;
- absolutePosition(x, y);
- x += borderLeft() + paddingLeft();
- y += borderTop() + paddingTop();
- width = m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight();
- height = m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom();
- IntRect newBounds(x,y,width,height);
+ FloatPoint absPos = localToAbsolute();
+ absPos.move(borderLeft() + paddingLeft(), borderTop() + paddingTop());
+ int w = width() - borderLeft() - borderRight() - paddingLeft() - paddingRight();
+ int h = height() - borderTop() - borderBottom() - paddingTop() - paddingBottom();
+ IntRect newBounds(absPos.x(), absPos.y(), w, h);
bool boundsChanged = newBounds != m_widget->frameRect();
if (boundsChanged) {
// The widget changed positions. Update the frame geometry.