Rename HitTestResult::rectFromPoint to rectForPoint
https://bugs.webkit.org/show_bug.cgi?id=47261
Patch by Antonio Gomes <agomes@rim.org> on 2010-10-06
Reviewed by Kenneth Rohde Christiansen.
As per Kenneth Christiansen request inhttps://bugs.webkit.org/show_bug.cgi?id=46336#c20.
* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::nodeAtPoint):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::addNodeToRectBasedTestResult):
(WebCore::HitTestResult::rectForPoint):
* rendering/HitTestResult.h:
(WebCore::HitTestResult::rectForPoint):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::nodeAtPoint):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::nodeAtPoint):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestColumns):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::nodeAtPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestChildLayerColumns):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::nodeAtPoint):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::nodeAtPoint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 27af6a1..b385614 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-10-06 Antonio Gomes <agomes@rim.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Rename HitTestResult::rectFromPoint to rectForPoint
+ https://bugs.webkit.org/show_bug.cgi?id=47261
+
+ As per Kenneth Christiansen request inhttps://bugs.webkit.org/show_bug.cgi?id=46336#c20.
+
+ * WebCore.exp.in:
+ * dom/Document.cpp:
+ (WebCore::Document::nodesFromRect):
+ * rendering/EllipsisBox.cpp:
+ (WebCore::EllipsisBox::nodeAtPoint):
+ * rendering/HitTestResult.cpp:
+ (WebCore::HitTestResult::addNodeToRectBasedTestResult):
+ (WebCore::HitTestResult::rectForPoint):
+ * rendering/HitTestResult.h:
+ (WebCore::HitTestResult::rectForPoint):
+ * rendering/InlineFlowBox.cpp:
+ (WebCore::InlineFlowBox::nodeAtPoint):
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::nodeAtPoint):
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::nodeAtPoint):
+ (WebCore::RenderBlock::hitTestColumns):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::nodeAtPoint):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::hitTestLayer):
+ (WebCore::RenderLayer::hitTestChildLayerColumns):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::nodeAtPoint):
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::nodeAtPoint):
+
2010-10-06 Dirk Schulze <krit@webkit.org>
Unreviewed fix of Cairo ports.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index a045111..65d2ae9 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -281,7 +281,6 @@
__ZN7WebCore13AXObjectCache11getOrCreateEPNS_12RenderObjectE
__ZN7WebCore13AXObjectCache21gAccessibilityEnabledE
__ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE
-__ZN7WebCore13HitTestResult13rectFromPointERKNS_8IntPointEjjjj
__ZN7WebCore13HitTestResultC1ERKS0_
__ZN7WebCore13HitTestResultD1Ev
__ZN7WebCore13IdentifierRep3getEPKc
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 2192f11..8d52078 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -1069,7 +1069,7 @@
// When ignoreClipping is false, this method returns null for coordinates outside of the viewport.
if (ignoreClipping)
type |= HitTestRequest::IgnoreClipping;
- else if (!frameView->visibleContentRect().intersects(HitTestResult::rectFromPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
+ else if (!frameView->visibleContentRect().intersects(HitTestResult::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))
return 0;
HitTestRequest request(type);
diff --git a/WebCore/rendering/EllipsisBox.cpp b/WebCore/rendering/EllipsisBox.cpp
index 1d71d35..f9c4f03 100644
--- a/WebCore/rendering/EllipsisBox.cpp
+++ b/WebCore/rendering/EllipsisBox.cpp
@@ -114,7 +114,7 @@
}
IntRect boundsRect = IntRect(tx, ty, m_logicalWidth, m_height);
- if (visibleToHitTesting() && boundsRect.intersects(result.rectFromPoint(x, y))) {
+ if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(x, y))) {
renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, boundsRect))
return true;
diff --git a/WebCore/rendering/HitTestResult.cpp b/WebCore/rendering/HitTestResult.cpp
index 301c0fb..1bc238f 100644
--- a/WebCore/rendering/HitTestResult.cpp
+++ b/WebCore/rendering/HitTestResult.cpp
@@ -531,7 +531,7 @@
node = node->shadowAncestorNode();
m_rectBasedTestResult.add(node);
- return !rect.contains(rectFromPoint(x, y));
+ return !rect.contains(rectForPoint(x, y));
}
void HitTestResult::append(const HitTestResult& other)
@@ -553,7 +553,7 @@
m_rectBasedTestResult.add(it->get());
}
-IntRect HitTestResult::rectFromPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding)
+IntRect HitTestResult::rectForPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding)
{
IntPoint actualPoint(point);
actualPoint -= IntSize(leftPadding, topPadding);
diff --git a/WebCore/rendering/HitTestResult.h b/WebCore/rendering/HitTestResult.h
index 1304e22..8d9b18d 100644
--- a/WebCore/rendering/HitTestResult.h
+++ b/WebCore/rendering/HitTestResult.h
@@ -98,9 +98,9 @@
// Rect-based hit test related methods.
bool isRectBasedTest() const { return m_isRectBased; }
- IntRect rectFromPoint(int x, int y) const;
- IntRect rectFromPoint(const IntPoint&) const;
- static IntRect rectFromPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
+ IntRect rectForPoint(int x, int y) const;
+ IntRect rectForPoint(const IntPoint&) const;
+ static IntRect rectForPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);
int topPadding() const { return m_topPadding; }
int rightPadding() const { return m_rightPadding; }
int bottomPadding() const { return m_bottomPadding; }
@@ -134,9 +134,9 @@
ListHashSet<RefPtr<Node> > m_rectBasedTestResult;
};
-inline IntRect HitTestResult::rectFromPoint(int x, int y) const
+inline IntRect HitTestResult::rectForPoint(int x, int y) const
{
- return rectFromPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
+ return rectForPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
}
// Formula:
@@ -144,9 +144,9 @@
// y = p.y() - topPadding
// width = leftPadding + rightPadding + 1
// height = topPadding + bottomPadding + 1
-inline IntRect HitTestResult::rectFromPoint(const IntPoint& point) const
+inline IntRect HitTestResult::rectForPoint(const IntPoint& point) const
{
- return rectFromPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
+ return rectForPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);
}
String displayString(const String&, const Node*);
diff --git a/WebCore/rendering/InlineFlowBox.cpp b/WebCore/rendering/InlineFlowBox.cpp
index 5577b22..53ddf5b 100644
--- a/WebCore/rendering/InlineFlowBox.cpp
+++ b/WebCore/rendering/InlineFlowBox.cpp
@@ -612,7 +612,7 @@
{
IntRect overflowRect(visibleOverflowRect());
overflowRect.move(tx, ty);
- if (!overflowRect.intersects(result.rectFromPoint(x, y)))
+ if (!overflowRect.intersects(result.rectForPoint(x, y)))
return false;
// Check children first.
@@ -625,7 +625,7 @@
// Now check ourselves.
IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
- if (visibleToHitTesting() && rect.intersects(result.rectFromPoint(x, y))) {
+ if (visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); // Don't add in m_x or m_y here, we want coords in the containing block's space.
if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
return true;
diff --git a/WebCore/rendering/InlineTextBox.cpp b/WebCore/rendering/InlineTextBox.cpp
index ed12a6e..dd1d5a6 100644
--- a/WebCore/rendering/InlineTextBox.cpp
+++ b/WebCore/rendering/InlineTextBox.cpp
@@ -287,7 +287,7 @@
return false;
IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight());
- if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectFromPoint(x, y))) {
+ if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) {
renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty));
if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect))
return true;
diff --git a/WebCore/rendering/RenderBlock.cpp b/WebCore/rendering/RenderBlock.cpp
index beae8f3..bc8d4c1 100644
--- a/WebCore/rendering/RenderBlock.cpp
+++ b/WebCore/rendering/RenderBlock.cpp
@@ -3971,7 +3971,7 @@
// Check if we need to do anything at all.
IntRect overflowBox = visibleOverflowRect();
overflowBox.move(tx, ty);
- if (!overflowBox.intersects(result.rectFromPoint(_x, _y)))
+ if (!overflowBox.intersects(result.rectForPoint(_x, _y)))
return false;
}
@@ -3985,7 +3985,7 @@
// If we have clipping, then we can't have any spillout.
bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer();
bool useClip = (hasControlClip() || useOverflowClip);
- IntRect hitTestArea(result.rectFromPoint(_x, _y));
+ IntRect hitTestArea(result.rectForPoint(_x, _y));
bool checkChildren = !useClip || (hasControlClip() ? controlClipRect(tx, ty).intersects(hitTestArea) : overflowClipRect(tx, ty).intersects(hitTestArea));
if (checkChildren) {
// Hit test descendants first.
@@ -4014,7 +4014,7 @@
// Now hit test our background
if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) {
IntRect boundsRect(tx, ty, width(), height());
- if (visibleToHitTesting() && boundsRect.intersects(result.rectFromPoint(_x, _y))) {
+ if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(_x, _y))) {
updateHitTestResult(result, IntPoint(_x - tx, _y - ty));
if (!result.addNodeToRectBasedTestResult(node(), _x, _y, boundsRect))
return true;
@@ -4068,13 +4068,13 @@
currYOffset += colRect.height();
colRect.move(tx, ty);
- if (colRect.intersects(result.rectFromPoint(x, y))) {
+ if (colRect.intersects(result.rectForPoint(x, y))) {
// The point is inside this column.
// Adjust tx and ty to change where we hit test.
int finalX = tx + currXOffset;
int finalY = ty + currYOffset;
- if (result.isRectBasedTest() && !colRect.contains(result.rectFromPoint(x, y)))
+ if (result.isRectBasedTest() && !colRect.contains(result.rectForPoint(x, y)))
hitTestContents(request, result, x, y, finalX, finalY, hitTestAction);
else
return hitTestContents(request, result, x, y, finalX, finalY, hitTestAction) || (hitTestAction == HitTestFloat && hitTestFloats(request, result, x, y, finalX, finalY));
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 487a2bb..9862a7b 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -679,7 +679,7 @@
// Check our bounds next. For this purpose always assume that we can only be hit in the
// foreground phase (which is true for replaced elements like images).
IntRect boundsRect = IntRect(tx, ty, width(), height());
- if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectFromPoint(xPos, yPos))) {
+ if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
return true;
diff --git a/WebCore/rendering/RenderLayer.cpp b/WebCore/rendering/RenderLayer.cpp
index 0bf0bd6..a3639d8 100644
--- a/WebCore/rendering/RenderLayer.cpp
+++ b/WebCore/rendering/RenderLayer.cpp
@@ -2778,7 +2778,7 @@
useTemporaryClipRects = compositor()->inCompositingMode();
#endif
- IntRect hitTestArea = result.rectFromPoint(hitTestPoint);
+ IntRect hitTestArea = result.rectForPoint(hitTestPoint);
// Apply a transform if we have one.
if (transform() && !appliedTransform) {
@@ -3061,7 +3061,7 @@
IntRect localClipRect(hitTestRect);
localClipRect.intersect(colRect);
- if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectFromPoint(hitTestPoint))) {
+ if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectForPoint(hitTestPoint))) {
RenderLayer* hitLayer = 0;
if (!columnIndex) {
// Apply a translation transform to change where the layer paints.
diff --git a/WebCore/rendering/RenderTable.cpp b/WebCore/rendering/RenderTable.cpp
index f7477c4..0027e6a 100644
--- a/WebCore/rendering/RenderTable.cpp
+++ b/WebCore/rendering/RenderTable.cpp
@@ -1127,7 +1127,7 @@
ty += y();
// Check kids first.
- if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectFromPoint(xPos, yPos))) {
+ if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) {
for (RenderObject* child = lastChild(); child; child = child->previousSibling()) {
if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption) &&
child->nodeAtPoint(request, result, xPos, yPos, tx, ty, action)) {
@@ -1139,7 +1139,7 @@
// Check our bounds next.
IntRect boundsRect = IntRect(tx, ty, width(), height());
- if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectFromPoint(xPos, yPos))) {
+ if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) {
updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty));
if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect))
return true;
diff --git a/WebCore/rendering/RenderTableSection.cpp b/WebCore/rendering/RenderTableSection.cpp
index ed4f527..a5ee3e2 100644
--- a/WebCore/rendering/RenderTableSection.cpp
+++ b/WebCore/rendering/RenderTableSection.cpp
@@ -1196,7 +1196,7 @@
tx += x();
ty += y();
- if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectFromPoint(xPos, yPos)))
+ if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos)))
return false;
if (m_hasOverflowingCell) {