Changeset 69192 in webkit
- Timestamp:
- Oct 6, 2010 7:53:54 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r69187 r69192 1 2010-10-06 Antonio Gomes <agomes@rim.org> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 Rename HitTestResult::rectFromPoint to rectForPoint 6 https://bugs.webkit.org/show_bug.cgi?id=47261 7 8 As per Kenneth Christiansen request inhttps://bugs.webkit.org/show_bug.cgi?id=46336#c20. 9 10 * WebCore.exp.in: 11 * dom/Document.cpp: 12 (WebCore::Document::nodesFromRect): 13 * rendering/EllipsisBox.cpp: 14 (WebCore::EllipsisBox::nodeAtPoint): 15 * rendering/HitTestResult.cpp: 16 (WebCore::HitTestResult::addNodeToRectBasedTestResult): 17 (WebCore::HitTestResult::rectForPoint): 18 * rendering/HitTestResult.h: 19 (WebCore::HitTestResult::rectForPoint): 20 * rendering/InlineFlowBox.cpp: 21 (WebCore::InlineFlowBox::nodeAtPoint): 22 * rendering/InlineTextBox.cpp: 23 (WebCore::InlineTextBox::nodeAtPoint): 24 * rendering/RenderBlock.cpp: 25 (WebCore::RenderBlock::nodeAtPoint): 26 (WebCore::RenderBlock::hitTestColumns): 27 * rendering/RenderBox.cpp: 28 (WebCore::RenderBox::nodeAtPoint): 29 * rendering/RenderLayer.cpp: 30 (WebCore::RenderLayer::hitTestLayer): 31 (WebCore::RenderLayer::hitTestChildLayerColumns): 32 * rendering/RenderTable.cpp: 33 (WebCore::RenderTable::nodeAtPoint): 34 * rendering/RenderTableSection.cpp: 35 (WebCore::RenderTableSection::nodeAtPoint): 36 1 37 2010-10-06 Dirk Schulze <krit@webkit.org> 2 38 -
trunk/WebCore/WebCore.exp.in
r68951 r69192 282 282 __ZN7WebCore13AXObjectCache21gAccessibilityEnabledE 283 283 __ZN7WebCore13AXObjectCache42gAccessibilityEnhancedUserInterfaceEnabledE 284 __ZN7WebCore13HitTestResult13rectFromPointERKNS_8IntPointEjjjj285 284 __ZN7WebCore13HitTestResultC1ERKS0_ 286 285 __ZN7WebCore13HitTestResultD1Ev -
trunk/WebCore/dom/Document.cpp
r69043 r69192 1070 1070 if (ignoreClipping) 1071 1071 type |= HitTestRequest::IgnoreClipping; 1072 else if (!frameView->visibleContentRect().intersects(HitTestResult::rectF romPoint(point, topPadding, rightPadding, bottomPadding, leftPadding)))1072 else if (!frameView->visibleContentRect().intersects(HitTestResult::rectForPoint(point, topPadding, rightPadding, bottomPadding, leftPadding))) 1073 1073 return 0; 1074 1074 -
trunk/WebCore/rendering/EllipsisBox.cpp
r68177 r69192 115 115 116 116 IntRect boundsRect = IntRect(tx, ty, m_logicalWidth, m_height); 117 if (visibleToHitTesting() && boundsRect.intersects(result.rectF romPoint(x, y))) {117 if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(x, y))) { 118 118 renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); 119 119 if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, boundsRect)) -
trunk/WebCore/rendering/HitTestResult.cpp
r68854 r69192 532 532 m_rectBasedTestResult.add(node); 533 533 534 return !rect.contains(rectF romPoint(x, y));534 return !rect.contains(rectForPoint(x, y)); 535 535 } 536 536 … … 554 554 } 555 555 556 IntRect HitTestResult::rectF romPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding)556 IntRect HitTestResult::rectForPoint(const IntPoint& point, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding) 557 557 { 558 558 IntPoint actualPoint(point); -
trunk/WebCore/rendering/HitTestResult.h
r68475 r69192 99 99 // Rect-based hit test related methods. 100 100 bool isRectBasedTest() const { return m_isRectBased; } 101 IntRect rectF romPoint(int x, int y) const;102 IntRect rectF romPoint(const IntPoint&) const;103 static IntRect rectF romPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding);101 IntRect rectForPoint(int x, int y) const; 102 IntRect rectForPoint(const IntPoint&) const; 103 static IntRect rectForPoint(const IntPoint&, unsigned topPadding, unsigned rightPadding, unsigned bottomPadding, unsigned leftPadding); 104 104 int topPadding() const { return m_topPadding; } 105 105 int rightPadding() const { return m_rightPadding; } … … 135 135 }; 136 136 137 inline IntRect HitTestResult::rectF romPoint(int x, int y) const137 inline IntRect HitTestResult::rectForPoint(int x, int y) const 138 138 { 139 return rectF romPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);139 return rectForPoint(IntPoint(x, y), m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding); 140 140 } 141 141 … … 145 145 // width = leftPadding + rightPadding + 1 146 146 // height = topPadding + bottomPadding + 1 147 inline IntRect HitTestResult::rectF romPoint(const IntPoint& point) const147 inline IntRect HitTestResult::rectForPoint(const IntPoint& point) const 148 148 { 149 return rectF romPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding);149 return rectForPoint(point, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding); 150 150 } 151 151 -
trunk/WebCore/rendering/InlineFlowBox.cpp
r68817 r69192 613 613 IntRect overflowRect(visibleOverflowRect()); 614 614 overflowRect.move(tx, ty); 615 if (!overflowRect.intersects(result.rectF romPoint(x, y)))615 if (!overflowRect.intersects(result.rectForPoint(x, y))) 616 616 return false; 617 617 … … 626 626 // Now check ourselves. 627 627 IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight()); 628 if (visibleToHitTesting() && rect.intersects(result.rectF romPoint(x, y))) {628 if (visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) { 629 629 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. 630 630 if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect)) -
trunk/WebCore/rendering/InlineTextBox.cpp
r68817 r69192 288 288 289 289 IntRect rect(tx + m_x, ty + m_y, m_logicalWidth, logicalHeight()); 290 if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectF romPoint(x, y))) {290 if (m_truncation != cFullTruncation && visibleToHitTesting() && rect.intersects(result.rectForPoint(x, y))) { 291 291 renderer()->updateHitTestResult(result, IntPoint(x - tx, y - ty)); 292 292 if (!result.addNodeToRectBasedTestResult(renderer()->node(), x, y, rect)) -
trunk/WebCore/rendering/RenderBlock.cpp
r69184 r69192 3972 3972 IntRect overflowBox = visibleOverflowRect(); 3973 3973 overflowBox.move(tx, ty); 3974 if (!overflowBox.intersects(result.rectF romPoint(_x, _y)))3974 if (!overflowBox.intersects(result.rectForPoint(_x, _y))) 3975 3975 return false; 3976 3976 } … … 3986 3986 bool useOverflowClip = hasOverflowClip() && !hasSelfPaintingLayer(); 3987 3987 bool useClip = (hasControlClip() || useOverflowClip); 3988 IntRect hitTestArea(result.rectF romPoint(_x, _y));3988 IntRect hitTestArea(result.rectForPoint(_x, _y)); 3989 3989 bool checkChildren = !useClip || (hasControlClip() ? controlClipRect(tx, ty).intersects(hitTestArea) : overflowClipRect(tx, ty).intersects(hitTestArea)); 3990 3990 if (checkChildren) { … … 4015 4015 if (hitTestAction == HitTestBlockBackground || hitTestAction == HitTestChildBlockBackground) { 4016 4016 IntRect boundsRect(tx, ty, width(), height()); 4017 if (visibleToHitTesting() && boundsRect.intersects(result.rectF romPoint(_x, _y))) {4017 if (visibleToHitTesting() && boundsRect.intersects(result.rectForPoint(_x, _y))) { 4018 4018 updateHitTestResult(result, IntPoint(_x - tx, _y - ty)); 4019 4019 if (!result.addNodeToRectBasedTestResult(node(), _x, _y, boundsRect)) … … 4069 4069 colRect.move(tx, ty); 4070 4070 4071 if (colRect.intersects(result.rectF romPoint(x, y))) {4071 if (colRect.intersects(result.rectForPoint(x, y))) { 4072 4072 // The point is inside this column. 4073 4073 // Adjust tx and ty to change where we hit test. … … 4075 4075 int finalX = tx + currXOffset; 4076 4076 int finalY = ty + currYOffset; 4077 if (result.isRectBasedTest() && !colRect.contains(result.rectF romPoint(x, y)))4077 if (result.isRectBasedTest() && !colRect.contains(result.rectForPoint(x, y))) 4078 4078 hitTestContents(request, result, x, y, finalX, finalY, hitTestAction); 4079 4079 else -
trunk/WebCore/rendering/RenderBox.cpp
r68917 r69192 680 680 // foreground phase (which is true for replaced elements like images). 681 681 IntRect boundsRect = IntRect(tx, ty, width(), height()); 682 if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectF romPoint(xPos, yPos))) {682 if (visibleToHitTesting() && action == HitTestForeground && boundsRect.intersects(result.rectForPoint(xPos, yPos))) { 683 683 updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty)); 684 684 if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect)) -
trunk/WebCore/rendering/RenderLayer.cpp
r68817 r69192 2779 2779 #endif 2780 2780 2781 IntRect hitTestArea = result.rectF romPoint(hitTestPoint);2781 IntRect hitTestArea = result.rectForPoint(hitTestPoint); 2782 2782 2783 2783 // Apply a transform if we have one. … … 3062 3062 localClipRect.intersect(colRect); 3063 3063 3064 if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectF romPoint(hitTestPoint))) {3064 if (!localClipRect.isEmpty() && localClipRect.intersects(result.rectForPoint(hitTestPoint))) { 3065 3065 RenderLayer* hitLayer = 0; 3066 3066 if (!columnIndex) { -
trunk/WebCore/rendering/RenderTable.cpp
r68817 r69192 1128 1128 1129 1129 // Check kids first. 1130 if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectF romPoint(xPos, yPos))) {1130 if (!hasOverflowClip() || overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) { 1131 1131 for (RenderObject* child = lastChild(); child; child = child->previousSibling()) { 1132 1132 if (child->isBox() && !toRenderBox(child)->hasSelfPaintingLayer() && (child->isTableSection() || child == m_caption) && … … 1140 1140 // Check our bounds next. 1141 1141 IntRect boundsRect = IntRect(tx, ty, width(), height()); 1142 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectF romPoint(xPos, yPos))) {1142 if (visibleToHitTesting() && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && boundsRect.intersects(result.rectForPoint(xPos, yPos))) { 1143 1143 updateHitTestResult(result, IntPoint(xPos - tx, yPos - ty)); 1144 1144 if (!result.addNodeToRectBasedTestResult(node(), xPos, yPos, boundsRect)) -
trunk/WebCore/rendering/RenderTableSection.cpp
r69161 r69192 1197 1197 ty += y(); 1198 1198 1199 if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectF romPoint(xPos, yPos)))1199 if (hasOverflowClip() && !overflowClipRect(tx, ty).intersects(result.rectForPoint(xPos, yPos))) 1200 1200 return false; 1201 1201
Note: See TracChangeset
for help on using the changeset viewer.