Changeset 88282 in webkit
- Timestamp:
- Jun 7, 2011 4:24:40 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88279 r88282 1 2011-06-07 Emil A Eklund <eae@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Change RenderBlock::hitTestContents to IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62170 7 8 Covered by existing tests. 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::nodeAtPoint): 12 (WebCore::RenderBlock::hitTestColumns): 13 (WebCore::RenderBlock::hitTestContents): 14 * rendering/RenderBlock.h: 15 1 16 2011-06-07 Jer Noble <jer.noble@apple.com> 2 17 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r88250 r88282 3929 3929 // Hit test contents if we don't have columns. 3930 3930 if (!hasColumns()) { 3931 if (hitTestContents(request, result, pointInContainer, scrolledOffset.width(), scrolledOffset.height(), hitTestAction)) {3931 if (hitTestContents(request, result, pointInContainer, toPoint(scrolledOffset), hitTestAction)) { 3932 3932 updateHitTestResult(result, pointInContainer - localOffset); 3933 3933 return true; … … 4021 4021 int finalY = ty + offset.height(); 4022 4022 if (result.isRectBasedTest() && !colRect.contains(result.rectForPoint(pointInContainer))) 4023 hitTestContents(request, result, pointInContainer, finalX, finalY, hitTestAction);4023 hitTestContents(request, result, pointInContainer, IntPoint(finalX, finalY), hitTestAction); 4024 4024 else 4025 return hitTestContents(request, result, pointInContainer, finalX, finalY, hitTestAction) || (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer, finalX, finalY));4025 return hitTestContents(request, result, pointInContainer, IntPoint(finalX, finalY), hitTestAction) || (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer, finalX, finalY)); 4026 4026 } 4027 4027 } … … 4030 4030 } 4031 4031 4032 bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)4032 bool RenderBlock::hitTestContents(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction hitTestAction) 4033 4033 { 4034 4034 if (childrenInline() && !isTable()) { 4035 4035 // We have to hit-test our line boxes. 4036 if (m_lineBoxes.hitTest(this, request, result, pointInContainer, IntPoint(tx, ty), hitTestAction))4036 if (m_lineBoxes.hitTest(this, request, result, pointInContainer, accumulatedOffset, hitTestAction)) 4037 4037 return true; 4038 4038 } else { … … 4042 4042 childHitTest = HitTestChildBlockBackground; 4043 4043 for (RenderBox* child = lastChildBox(); child; child = child->previousSiblingBox()) { 4044 IntPoint childPoint = flipForWritingMode(child, IntPoint(tx, ty), ParentToChildFlippingAdjustment);4044 IntPoint childPoint = flipForWritingMode(child, accumulatedOffset, ParentToChildFlippingAdjustment); 4045 4045 if (!child->hasSelfPaintingLayer() && !child->isFloating() && child->nodeAtPoint(request, result, pointInContainer, childPoint.x(), childPoint.y(), childHitTest)) 4046 4046 return true; -
trunk/Source/WebCore/rendering/RenderBlock.h
r88250 r88282 590 590 591 591 virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction); 592 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);592 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction); 593 593 bool hitTestFloats(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty); 594 594
Note: See TracChangeset
for help on using the changeset viewer.