Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(895)

Side by Side Diff: Source/core/rendering/svg/RenderSVGImage.cpp

Issue 45733010: Add pointer-events="bounding-box" for svg content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: lowercase boundingBox Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 2 * Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org> 5 * Copyright (C) 2007, 2008, 2009 Rob Buis <buis@kde.org>
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 8 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return false; 180 return false;
181 181
182 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, request, style()->pointerEvents()); 182 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, request, style()->pointerEvents());
183 bool isVisible = (style()->visibility() == VISIBLE); 183 bool isVisible = (style()->visibility() == VISIBLE);
184 if (isVisible || !hitRules.requireVisible) { 184 if (isVisible || !hitRules.requireVisible) {
185 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(poin tInParent); 185 FloatPoint localPoint = localToParentTransform().inverse().mapPoint(poin tInParent);
186 186
187 if (!SVGRenderSupport::pointInClippingArea(this, localPoint)) 187 if (!SVGRenderSupport::pointInClippingArea(this, localPoint))
188 return false; 188 return false;
189 189
190 if (hitRules.canHitFill) { 190 if (hitRules.canHitFill || hitRules.canHitBoundingBox) {
pdr. 2013/12/02 02:57:25 Do you mind adding an image to your testcase that
191 if (m_objectBoundingBox.contains(localPoint)) { 191 if (m_objectBoundingBox.contains(localPoint)) {
192 updateHitTestResult(result, roundedLayoutPoint(localPoint)); 192 updateHitTestResult(result, roundedLayoutPoint(localPoint));
193 return true; 193 return true;
194 } 194 }
195 } 195 }
196 } 196 }
197 197
198 return false; 198 return false;
199 } 199 }
200 200
(...skipping 19 matching lines...) Expand all
220 220
221 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint &, const RenderLayerModelObject*) 221 void RenderSVGImage::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint &, const RenderLayerModelObject*)
222 { 222 {
223 // this is called from paint() after the localTransform has already been app lied 223 // this is called from paint() after the localTransform has already been app lied
224 IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates()); 224 IntRect contentRect = enclosingIntRect(repaintRectInLocalCoordinates());
225 if (!contentRect.isEmpty()) 225 if (!contentRect.isEmpty())
226 rects.append(contentRect); 226 rects.append(contentRect);
227 } 227 }
228 228
229 } // namespace WebCore 229 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698