summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/RenderWidget.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-05 14:34:32 -0800
commit635860845790a19bf50bbc51ba8fb66a96dde068 (patch)
treeef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/rendering/RenderWidget.cpp
parent8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff)
downloadexternal_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz
external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/rendering/RenderWidget.cpp')
-rw-r--r--WebCore/rendering/RenderWidget.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/WebCore/rendering/RenderWidget.cpp b/WebCore/rendering/RenderWidget.cpp
index 57b8722..9bf8111 100644
--- a/WebCore/rendering/RenderWidget.cpp
+++ b/WebCore/rendering/RenderWidget.cpp
@@ -75,9 +75,10 @@ void RenderWidget::destroy()
if (RenderView* v = view())
v->removeWidget(this);
- if (AXObjectCache::accessibilityEnabled())
+ if (AXObjectCache::accessibilityEnabled()) {
+ document()->axObjectCache()->childrenChanged(this->parent());
document()->axObjectCache()->remove(this);
-
+ }
remove();
if (m_widget) {
@@ -94,7 +95,7 @@ void RenderWidget::destroy()
RenderArena* arena = renderArena();
if (layer)
- layer->clearClipRect();
+ layer->clearClipRects();
if (style() && (style()->height().isPercent() || style()->minHeight().isPercent() || style()->maxHeight().isPercent()))
RenderBlock::removePercentHeightDescendant(this);
@@ -172,8 +173,8 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
if (!shouldPaint(paintInfo, tx, ty))
return;
- tx += m_x;
- ty += m_y;
+ tx += x();
+ ty += y();
if (hasBoxDecorations() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection))
paintBoxDecorations(paintInfo, tx, ty);
@@ -188,7 +189,7 @@ void RenderWidget::paint(PaintInfo& paintInfo, int tx, int ty)
#if PLATFORM(MAC)
if (style()->highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(tx - m_x, ty - m_y, style()->highlight(), true);
+ paintCustomHighlight(tx - x(), ty - y(), style()->highlight(), true);
#endif
if (m_widget) {
@@ -218,16 +219,14 @@ void RenderWidget::updateWidgetPosition()
if (!m_widget)
return;
- int x;
- int y;
- absolutePosition(x, y);
- x += borderLeft() + paddingLeft();
- y += borderTop() + paddingTop();
+ // FIXME: This doesn't work correctly with transforms.
+ FloatPoint absPos = localToAbsolute();
+ absPos.move(borderLeft() + paddingLeft(), borderTop() + paddingTop());
- int width = m_width - borderLeft() - borderRight() - paddingLeft() - paddingRight();
- int height = m_height - borderTop() - borderBottom() - paddingTop() - paddingBottom();
+ int w = width() - borderLeft() - borderRight() - paddingLeft() - paddingRight();
+ int h = height() - borderTop() - borderBottom() - paddingTop() - paddingBottom();
- IntRect newBounds(x, y, width, height);
+ IntRect newBounds(absPos.x(), absPos.y(), w, h);
IntRect oldBounds(m_widget->frameRect());
if (newBounds != oldBounds) {
// The widget changed positions. Update the frame geometry.
@@ -273,7 +272,7 @@ bool RenderWidget::nodeAtPoint(const HitTestRequest& request, HitTestResult& res
// Check to see if we are really over the widget itself (and not just in the border/padding area).
if (inside && !hadResult && result.innerNode() == element())
- result.setIsOverWidget(contentBox().contains(result.localPoint()));
+ result.setIsOverWidget(contentBoxRect().contains(result.localPoint()));
return inside;
}