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

Unified Diff: Source/core/rendering/PointerEventsHitRules.cpp

Issue 45733010: Add pointer-events="bounding-box" for svg content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/PointerEventsHitRules.cpp
diff --git a/Source/core/rendering/PointerEventsHitRules.cpp b/Source/core/rendering/PointerEventsHitRules.cpp
index 8ae6aa7ead53819690f13b021594ac64d9e2b3b1..2ff05f938e5a00cb0151a6224436cbe2db53114c 100644
--- a/Source/core/rendering/PointerEventsHitRules.cpp
+++ b/Source/core/rendering/PointerEventsHitRules.cpp
@@ -28,6 +28,7 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hitTesting, const HitTe
, requireStroke(false)
, canHitStroke(false)
, canHitFill(false)
+ , canHitBoundingBox(false)
{
if (request.svgClipContent())
pointerEvents = PE_FILL;
@@ -35,6 +36,9 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hitTesting, const HitTe
if (hitTesting == SVG_PATH_HITTESTING) {
switch (pointerEvents)
{
+ case PE_BOUNDINGBOX:
+ canHitBoundingBox = true;
+ break;
case PE_VISIBLE_PAINTED:
case PE_AUTO: // "auto" is like "visiblePainted" when in SVG content
requireFill = true;
@@ -72,6 +76,9 @@ PointerEventsHitRules::PointerEventsHitRules(EHitTesting hitTesting, const HitTe
} else {
switch (pointerEvents)
{
+ case PE_BOUNDINGBOX:
+ canHitBoundingBox = true;
+ break;
case PE_VISIBLE_PAINTED:
case PE_AUTO: // "auto" is like "visiblePainted" when in SVG content
requireVisible = true;

Powered by Google App Engine
This is Rietveld 408576698