Changeset 149168 in webkit
- Timestamp:
- Apr 25, 2013 11:23:53 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r149167 r149168 1 2013-04-25 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden 4 https://bugs.webkit.org/show_bug.cgi?id=113874 5 6 Reviewed by David Hyatt. 7 8 Add test for hit-testing of border of an out-of-flow region with overflow: hidden. 9 10 * fast/regions/hit-test-abspos-overflow-region-expected.txt: Added. 11 * fast/regions/hit-test-abspos-overflow-region.html: Added. 12 1 13 2013-04-25 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r149167 r149168 1 2013-04-25 Mihnea Ovidenie <mihnea@adobe.com> 2 3 [CSS Regions] Hit testing is broken for absolutely positioned regions that have overflow: hidden 4 https://bugs.webkit.org/show_bug.cgi?id=113874 5 6 Reviewed by David Hyatt. 7 8 Test: fast/regions/hit-test-abspos-overflow-region.html 9 10 When a region is an out-of-flow positioned object with an overflow clip, we need 11 to make sure that hit testing works also for cases other than foreground (content) 12 hit testing. This patch moves the previous hit testing code, that delegated foreground 13 hit testing to the region's flow thread hit testing, into the hitTestContent method, 14 now that RenderRegion is RenderBlock based. 15 16 * rendering/RenderRegion.cpp: 17 (WebCore::RenderRegion::hitTestContents): 18 * rendering/RenderRegion.h: 19 (RenderRegion): 20 1 21 2013-04-25 Ryosuke Niwa <rniwa@webkit.org> 2 22 -
trunk/Source/WebCore/rendering/RenderRegion.cpp
r148943 r149168 172 172 173 173 // Hit Testing 174 bool RenderRegion:: nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action)175 { 176 if (!isValid() )174 bool RenderRegion::hitTestContents(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction action) 175 { 176 if (!isValid() || action != HitTestForeground) 177 177 return false; 178 178 179 LayoutPoint adjustedLocation = accumulatedOffset + location();180 181 // Check our bounds next. For this purpose always assume that we can only be hit in the182 // foreground phase (which is true for replaced elements like images).183 // FIXME: Once we support overflow, we need to intersect with that and not with the bounds rect.184 179 LayoutRect boundsRect = borderBoxRectInRegion(locationInContainer.region()); 185 boundsRect.moveBy(adjustedLocation); 186 if (visibleToHitTesting() && action == HitTestForeground && locationInContainer.intersects(boundsRect)) { 187 // Check the contents of the RenderFlowThread. 188 if (m_flowThread->hitTestFlowThreadPortionInRegion(this, flowThreadPortionRect(), flowThreadPortionOverflowRect(), request, result, locationInContainer, LayoutPoint(adjustedLocation.x() + borderLeft() + paddingLeft(), adjustedLocation.y() + borderTop() + paddingTop()))) 189 return true; 190 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation)); 191 if (!result.addNodeToRectBasedTestResult(generatingNode(), request, locationInContainer, boundsRect)) 180 boundsRect.moveBy(accumulatedOffset); 181 if (visibleToHitTesting() && locationInContainer.intersects(boundsRect)) { 182 if (m_flowThread->hitTestFlowThreadPortionInRegion(this, flowThreadPortionRect(), flowThreadPortionOverflowRect(), request, result, 183 locationInContainer, LayoutPoint(accumulatedOffset.x() + borderLeft() + paddingLeft(), accumulatedOffset.y() + borderTop() + paddingTop()))) 192 184 return true; 193 185 } -
trunk/Source/WebCore/rendering/RenderRegion.h
r148943 r149168 49 49 virtual bool isRenderRegion() const { return true; } 50 50 51 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;51 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE; 52 52 53 53 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
Note: See TracChangeset
for help on using the changeset viewer.