Diff
Modified: trunk/Source/WebCore/ChangeLog (88384 => 88385)
--- trunk/Source/WebCore/ChangeLog 2011-06-08 21:02:49 UTC (rev 88384)
+++ trunk/Source/WebCore/ChangeLog 2011-06-08 21:15:25 UTC (rev 88385)
@@ -1,3 +1,20 @@
+2011-06-08 Emil A Eklund <e...@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Convert RenderBlock::isPointInOverflowControl to IntPoint
+ https://bugs.webkit.org/show_bug.cgi?id=62312
+
+ Covered by existing tests.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::isPointInOverflowControl):
+ (WebCore::RenderBlock::nodeAtPoint):
+ * rendering/RenderBlock.h:
+ * rendering/RenderListBox.cpp:
+ (WebCore::RenderListBox::isPointInOverflowControl):
+ * rendering/RenderListBox.h:
+
2011-06-08 James Simonsen <simon...@chromium.org>
Reviewed by Tony Gentilcore.
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (88384 => 88385)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-06-08 21:02:49 UTC (rev 88384)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2011-06-08 21:15:25 UTC (rev 88385)
@@ -3887,12 +3887,12 @@
return result;
}
-bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty)
+bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset)
{
if (!scrollsOverflow())
return false;
- return layer()->hitTestOverflowControls(result, pointInContainer - IntSize(tx, ty));
+ return layer()->hitTestOverflowControls(result, pointInContainer - toSize(accumulatedOffset));
}
bool RenderBlock::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction hitTestAction)
@@ -3908,7 +3908,7 @@
return false;
}
- if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, pointInContainer, localOffset.width(), localOffset.height())) {
+ if ((hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) && isPointInOverflowControl(result, pointInContainer, adjustedLocation)) {
updateHitTestResult(result, pointInContainer - localOffset);
// FIXME: isPointInOverflowControl() doesn't handle rect-based tests yet.
if (!result.addNodeToRectBasedTestResult(node(), pointInContainer))
Modified: trunk/Source/WebCore/rendering/RenderBlock.h (88384 => 88385)
--- trunk/Source/WebCore/rendering/RenderBlock.h 2011-06-08 21:02:49 UTC (rev 88384)
+++ trunk/Source/WebCore/rendering/RenderBlock.h 2011-06-08 21:15:25 UTC (rev 88385)
@@ -592,7 +592,7 @@
virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction);
bool hitTestFloats(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
- virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, int tx, int ty);
+ virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
void computeInlinePreferredLogicalWidths();
void computeBlockPreferredLogicalWidths();
Modified: trunk/Source/WebCore/rendering/RenderListBox.cpp (88384 => 88385)
--- trunk/Source/WebCore/rendering/RenderListBox.cpp 2011-06-08 21:02:49 UTC (rev 88384)
+++ trunk/Source/WebCore/rendering/RenderListBox.cpp 2011-06-08 21:15:25 UTC (rev 88385)
@@ -437,13 +437,13 @@
}
}
-bool RenderListBox::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty)
+bool RenderListBox::isPointInOverflowControl(HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset)
{
if (!m_vBar)
return false;
- IntRect vertRect(tx + width() - borderRight() - m_vBar->width(),
- ty + borderTop(),
+ IntRect vertRect(accumulatedOffset.x() + width() - borderRight() - m_vBar->width(),
+ accumulatedOffset.y() + borderTop(),
m_vBar->width(),
height() - borderTop() - borderBottom());
Modified: trunk/Source/WebCore/rendering/RenderListBox.h (88384 => 88385)
--- trunk/Source/WebCore/rendering/RenderListBox.h 2011-06-08 21:02:49 UTC (rev 88384)
+++ trunk/Source/WebCore/rendering/RenderListBox.h 2011-06-08 21:15:25 UTC (rev 88385)
@@ -68,7 +68,7 @@
virtual void paintObject(PaintInfo&, const IntPoint&);
virtual IntRect controlClipRect(const IntPoint&) const;
- virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, int tx, int ty);
+ virtual bool isPointInOverflowControl(HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset);
virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);
virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0);