Changeset 112438 in webkit
- Timestamp:
- Mar 28, 2012 2:00:37 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r112436 r112438 1 2012-03-28 Florin Malita <fmalita@google.com> 2 3 Incorrect foreignObject hit test results when overlapping other SVG elements 4 https://bugs.webkit.org/show_bug.cgi?id=82059 5 6 Reviewed by Nikolas Zimmermann. 7 8 * svg/hittest/foreign-object-background-expected.txt: Added. 9 * svg/hittest/foreign-object-background.svg: Added. 10 1 11 2012-03-26 Shawn Singh <shawnsingh@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r112436 r112438 1 2012-03-28 Florin Malita <fmalita@google.com> 2 3 Incorrect foreignObject hit test results when overlapping other SVG elements 4 https://bugs.webkit.org/show_bug.cgi?id=82059 5 6 Reviewed by Nikolas Zimmermann. 7 8 Test: svg/hittest/foreign-object-background.svg 9 10 Foreign content needs to be hit-tested atomically due to the (pseudo) 11 stacking context established by FOs. 12 13 * rendering/svg/RenderSVGForeignObject.cpp: 14 (WebCore::RenderSVGForeignObject::nodeAtFloatPoint): 15 Hit test all phases on FO HitTestForeground. 16 1 17 2012-03-26 Shawn Singh <shawnsingh@chromium.org> 2 18 -
trunk/Source/WebCore/rendering/svg/RenderSVGForeignObject.cpp
r110285 r112438 27 27 #include "GraphicsContext.h" 28 28 #include "LayoutRepainter.h" 29 #include "RenderObject.h" 29 30 #include "RenderSVGResource.h" 30 31 #include "RenderView.h" … … 166 167 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) 167 168 { 169 // Embedded content is drawn in the foreground phase. 170 if (hitTestAction != HitTestForeground) 171 return false; 172 168 173 FloatPoint localPoint = localTransform().inverse().mapPoint(pointInParent); 169 174 … … 172 177 return false; 173 178 174 return RenderBlock::nodeAtPoint(request, result, roundedLayoutPoint(localPoint), LayoutPoint(), hitTestAction); 179 // FOs establish a stacking context, so we need to hit-test all layers. 180 return RenderBlock::nodeAtPoint(request, result, roundedLayoutPoint(localPoint), LayoutPoint(), HitTestForeground) 181 || RenderBlock::nodeAtPoint(request, result, roundedLayoutPoint(localPoint), LayoutPoint(), HitTestFloat) 182 || RenderBlock::nodeAtPoint(request, result, roundedLayoutPoint(localPoint), LayoutPoint(), HitTestChildBlockBackgrounds); 175 183 } 176 184
Note: See TracChangeset
for help on using the changeset viewer.