Changeset 88311 in webkit
- Timestamp:
- Jun 7, 2011 6:46:17 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88308 r88311 1 2011-06-07 Emil A Eklund <eae@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Change RenderBlock::hitTestColumns to IntPoint 6 https://bugs.webkit.org/show_bug.cgi?id=62172 7 8 Covered by existing tests. 9 10 * rendering/RenderBlock.cpp: 11 (WebCore::RenderBlock::nodeAtPoint): 12 (WebCore::RenderBlock::hitTestColumns): 13 * rendering/RenderBlock.h: 14 1 15 2011-06-07 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r88297 r88311 3935 3935 if (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer, scrolledOffset.width(), scrolledOffset.height())) 3936 3936 return true; 3937 } else if (hitTestColumns(request, result, pointInContainer, scrolledOffset.width(), scrolledOffset.height(), hitTestAction)) {3937 } else if (hitTestColumns(request, result, pointInContainer, toPoint(scrolledOffset), hitTestAction)) { 3938 3938 updateHitTestResult(result, pointInContainer - localOffset); 3939 3939 return true; … … 3983 3983 } 3984 3984 3985 bool RenderBlock::hitTestColumns(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, int tx, int ty, HitTestAction hitTestAction)3985 bool RenderBlock::hitTestColumns(const HitTestRequest& request, HitTestResult& result, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction hitTestAction) 3986 3986 { 3987 3987 // We need to do multiple passes, breaking up our hit testing into strips. … … 4011 4011 else 4012 4012 currLogicalTopOffset += blockDelta; 4013 colRect.move (tx, ty);4013 colRect.moveBy(accumulatedOffset); 4014 4014 4015 4015 if (colRect.intersects(result.rectForPoint(pointInContainer))) { 4016 4016 // The point is inside this column. 4017 // Adjust tx and tyto change where we hit test.4017 // Adjust accumulatedOffset to change where we hit test. 4018 4018 4019 4019 IntSize offset = isHorizontal ? IntSize(currLogicalLeftOffset, currLogicalTopOffset) : IntSize(currLogicalTopOffset, currLogicalLeftOffset); 4020 int finalX = tx + offset.width(); 4021 int finalY = ty + offset.height(); 4020 IntPoint finalLocation = accumulatedOffset + offset; 4022 4021 if (result.isRectBasedTest() && !colRect.contains(result.rectForPoint(pointInContainer))) 4023 hitTestContents(request, result, pointInContainer, IntPoint(finalX, finalY), hitTestAction);4022 hitTestContents(request, result, pointInContainer, finalLocation, hitTestAction); 4024 4023 else 4025 return hitTestContents(request, result, pointInContainer, IntPoint(finalX, finalY), hitTestAction) || (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer, finalX, finalY));4024 return hitTestContents(request, result, pointInContainer, finalLocation, hitTestAction) || (hitTestAction == HitTestFloat && hitTestFloats(request, result, pointInContainer, finalLocation.x(), finalLocation.y())); 4026 4025 } 4027 4026 } -
trunk/Source/WebCore/rendering/RenderBlock.h
r88297 r88311 589 589 int nextFloatLogicalBottomBelow(int) const; 590 590 591 virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, int tx, int ty, HitTestAction);591 virtual bool hitTestColumns(const HitTestRequest&, HitTestResult&, const IntPoint& pointInContainer, const IntPoint& accumulatedOffset, HitTestAction); 592 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);
Note: See TracChangeset
for help on using the changeset viewer.