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

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: make assert more specific 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/PointerEventsHitRules.h ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/PointerEventsHitRules.cpp
diff --git a/Source/core/rendering/PointerEventsHitRules.cpp b/Source/core/rendering/PointerEventsHitRules.cpp
index b0fd42c63ce4cd8a7cfd89b795265ec463e39951..b154570c6517358e3230ce91bd95002a92105b8e 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_GEOMETRY_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;
« no previous file with comments | « Source/core/rendering/PointerEventsHitRules.h ('k') | Source/core/rendering/style/RenderStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698