Diff
Modified: trunk/Source/WebCore/ChangeLog (90697 => 90698)
--- trunk/Source/WebCore/ChangeLog 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/ChangeLog 2011-07-10 19:20:37 UTC (rev 90698)
@@ -1,3 +1,38 @@
+2011-07-10 Emil A Eklund <[email protected]>
+
+ Switch updateHitTestResult to to new layout types
+ https://bugs.webkit.org/show_bug.cgi?id=64209
+
+ Reviewed by Eric Seidel.
+
+ No new tests, no functionality changes.
+
+ * rendering/EllipsisBox.cpp:
+ (WebCore::EllipsisBox::nodeAtPoint):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::hitTestFloats):
+ (WebCore::RenderBlock::updateHitTestResult):
+ * rendering/RenderBlock.h:
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::updateHitTestResult):
+ * rendering/RenderInline.h:
+ * rendering/RenderLineBoxList.cpp:
+ (WebCore::RenderLineBoxList::hitTest):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::updateHitTestResult):
+ * rendering/RenderObject.h:
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::updateHitTestResult):
+ * rendering/RenderView.h:
+ * rendering/svg/RenderSVGContainer.cpp:
+ (WebCore::RenderSVGContainer::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGImage.cpp:
+ (WebCore::RenderSVGImage::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGPath.cpp:
+ (WebCore::RenderSVGPath::nodeAtFloatPoint):
+ * rendering/svg/RenderSVGRoot.cpp:
+ (WebCore::RenderSVGRoot::nodeAtPoint):
+
2011-07-10 Patrick Gansterer <[email protected]>
Reviewed by Adam Barth.
Modified: trunk/Source/WebCore/rendering/EllipsisBox.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/EllipsisBox.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/EllipsisBox.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -104,15 +104,15 @@
bool EllipsisBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, int lineTop, int lineBottom)
{
- LayoutPoint adjustedLocation = accumulatedOffset + roundedIntPoint(topLeft());
+ LayoutPoint adjustedLocation = accumulatedOffset + roundedLayoutPoint(topLeft());
// Hit test the markup box.
if (m_markupBox) {
RenderStyle* style = m_renderer->style(m_firstLine);
LayoutUnit mtx = adjustedLocation.x() + m_logicalWidth - m_markupBox->x();
LayoutUnit mty = adjustedLocation.y() + style->fontMetrics().ascent() - (m_markupBox->y() + m_markupBox->renderer()->style(m_firstLine)->fontMetrics().ascent());
- if (m_markupBox->nodeAtPoint(request, result, pointInContainer, IntPoint(mtx, mty), lineTop, lineBottom)) {
- renderer()->updateHitTestResult(result, pointInContainer - IntSize(mtx, mty));
+ if (m_markupBox->nodeAtPoint(request, result, pointInContainer, LayoutPoint(mtx, mty), lineTop, lineBottom)) {
+ renderer()->updateHitTestResult(result, pointInContainer - LayoutSize(mtx, mty));
return true;
}
}
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -4023,7 +4023,7 @@
LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - floatingObject->m_renderer->y();
LayoutPoint childPoint = flipFloatForWritingMode(floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset));
if (floatingObject->m_renderer->hitTest(request, result, pointInContainer, childPoint)) {
- updateHitTestResult(result, pointInContainer - toSize(childPoint));
+ updateHitTestResult(result, pointInContainer - toLayoutSize(childPoint));
return true;
}
}
@@ -5778,7 +5778,7 @@
// |this| may be dead here
}
-void RenderBlock::updateHitTestResult(HitTestResult& result, const IntPoint& point)
+void RenderBlock::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
{
if (result.innerNode())
return;
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2011-07-10 19:20:37 UTC (rev 90698)
@@ -313,7 +313,7 @@
virtual int firstLineBoxBaseline() const;
virtual int lastLineBoxBaseline() const;
- virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
+ virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
// Delay update scrollbar until finishDelayRepaint() will be
// called. This function is used when a flexbox is laying out its
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -1195,13 +1195,13 @@
splitFlow(beforeChild, newBox, child, oldContinuation);
}
-void RenderInline::updateHitTestResult(HitTestResult& result, const IntPoint& point)
+void RenderInline::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
{
if (result.innerNode())
return;
Node* n = node();
- IntPoint localPoint(point);
+ LayoutPoint localPoint(point);
if (n) {
if (isInlineElementContinuation()) {
// We're in the continuation of a split inline. Adjust our local point to be in the coordinate space
Modified: trunk/Source/WebCore/rendering/RenderInline.h (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderInline.h 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderInline.h 2011-07-10 19:20:37 UTC (rev 90698)
@@ -150,7 +150,7 @@
virtual void childBecameNonInline(RenderObject* child);
- virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
+ virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
Modified: trunk/Source/WebCore/rendering/RenderLineBoxList.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderLineBoxList.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderLineBoxList.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -300,7 +300,7 @@
if (rangeIntersectsRect(renderer, curr->logicalTopVisualOverflow(root->lineTop()), curr->logicalBottomVisualOverflow(root->lineBottom()), rect, accumulatedOffset)) {
bool inside = curr->nodeAtPoint(request, result, pointInContainer, accumulatedOffset, root->lineTop(), root->lineBottom());
if (inside) {
- renderer->updateHitTestResult(result, toPoint(pointInContainer - accumulatedOffset));
+ renderer->updateHitTestResult(result, pointInContainer - toLayoutSize(accumulatedOffset));
return true;
}
}
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -2169,7 +2169,7 @@
return inside;
}
-void RenderObject::updateHitTestResult(HitTestResult& result, const IntPoint& point)
+void RenderObject::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
{
if (result.innerNode())
return;
Modified: trunk/Source/WebCore/rendering/RenderObject.h (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderObject.h 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2011-07-10 19:20:37 UTC (rev 90698)
@@ -550,7 +550,7 @@
bool hitTest(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter = HitTestAll);
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const LayoutPoint& pointInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
- virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
+ virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
virtual VisiblePosition positionForPoint(const IntPoint&);
VisiblePosition createVisiblePosition(int offset, EAffinity);
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -708,7 +708,7 @@
return false;
}
-void RenderView::updateHitTestResult(HitTestResult& result, const IntPoint& point)
+void RenderView::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
{
if (result.innerNode())
return;
Modified: trunk/Source/WebCore/rendering/RenderView.h (90697 => 90698)
--- trunk/Source/WebCore/rendering/RenderView.h 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/RenderView.h 2011-07-10 19:20:37 UTC (rev 90698)
@@ -125,7 +125,7 @@
bool layoutStateEnabled() const { return m_layoutStateDisableCount == 0 && m_layoutState; }
LayoutState* layoutState() const { return m_layoutState; }
- virtual void updateHitTestResult(HitTestResult&, const IntPoint&);
+ virtual void updateHitTestResult(HitTestResult&, const LayoutPoint&);
unsigned pageLogicalHeight() const { return m_pageLogicalHeight; }
void setPageLogicalHeight(unsigned height)
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGContainer.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -169,7 +169,7 @@
for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->nodeAtFloatPoint(request, result, localPoint, hitTestAction)) {
- updateHitTestResult(result, roundedIntPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint));
return true;
}
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGImage.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -157,7 +157,7 @@
if (hitRules.canHitFill) {
if (m_objectBoundingBox.contains(localPoint)) {
- updateHitTestResult(result, roundedIntPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint));
return true;
}
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGPath.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -263,7 +263,7 @@
fillRule = svgStyle->clipRule();
if ((hitRules.canHitStroke && (svgStyle->hasStroke() || !hitRules.requireStroke) && strokeContains(localPoint, hitRules.requireStroke))
|| (hitRules.canHitFill && (svgStyle->hasFill() || !hitRules.requireFill) && fillContains(localPoint, hitRules.requireFill, fillRule))) {
- updateHitTestResult(result, roundedIntPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint));
return true;
}
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp (90697 => 90698)
--- trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2011-07-10 18:55:22 UTC (rev 90697)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp 2011-07-10 19:20:37 UTC (rev 90698)
@@ -464,7 +464,7 @@
// hit testing would stop immediately. For SVG only trees this doesn't matter. Though when we have a <foreignObject> subtree we need
// to be able to detect hits on the background of a <div> element. If we'd return true here in the 'Foreground' phase, we are not able
// to detect these hits anymore.
- updateHitTestResult(result, roundedIntPoint(localPoint));
+ updateHitTestResult(result, roundedLayoutPoint(localPoint));
return true;
}