SVG2: Add bounding-box keyword to pointer-events
https://bugs.webkit.org/show_bug.cgi?id=191382

Reviewed by Dean Jackson.

Source/WebCore:

SVG 2 added the bounding-box keyword to the pointer-events CSS
property. It takes the bounding box of an element as hit area.

Implemented it so that it is as if "fill" was specified for HTML.

Extended existing tests.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator PointerEvents const):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* rendering/PointerEventsHitRules.cpp:
(WebCore::PointerEventsHitRules::PointerEventsHitRules):
* rendering/PointerEventsHitRules.h:
* rendering/style/RenderStyleConstants.h:
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::nodeAtFloatPoint):

LayoutTests:

Test pointer-events: bounding-box with different SVG elements.

* platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt:
* platform/mac/svg/custom/pointer-events-image-expected.txt:
* platform/mac/svg/custom/pointer-events-path-expected.txt:
* platform/mac/svg/custom/pointer-events-text-expected.txt:
* svg/custom/pointer-events-image-css-transform.svg:
* svg/custom/pointer-events-image.svg:
* svg/custom/pointer-events-path.svg:
* svg/custom/pointer-events-text-css-transform.svg:
* svg/custom/pointer-events-text.svg:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c052e01..e10b0fa 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2019-10-22  Dirk Schulze  <krit@webkit.org>
+
+        SVG2: Add bounding-box keyword to pointer-events
+        https://bugs.webkit.org/show_bug.cgi?id=191382
+
+        Reviewed by Dean Jackson.
+
+        Test pointer-events: bounding-box with different SVG elements.
+
+        * platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt:
+        * platform/mac/svg/custom/pointer-events-image-expected.txt:
+        * platform/mac/svg/custom/pointer-events-path-expected.txt:
+        * platform/mac/svg/custom/pointer-events-text-expected.txt:
+        * svg/custom/pointer-events-image-css-transform.svg:
+        * svg/custom/pointer-events-image.svg:
+        * svg/custom/pointer-events-path.svg:
+        * svg/custom/pointer-events-text-css-transform.svg:
+        * svg/custom/pointer-events-text.svg:
+
 2019-10-22  youenn fablet  <youenn@apple.com>
 
         Carriage return character sometimes missing in SDP c-line
diff --git a/LayoutTests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt b/LayoutTests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt
index c2def50..4436102 100644
--- a/LayoutTests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/pointer-events-image-css-transform-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 549x587
+  RenderSVGRoot {svg} at (0,6) size 549x594
     RenderSVGText {text} at (110,6) size 112x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 112x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 111.56: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 113x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 113x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 112.45: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,30) size 549x563
+    RenderSVGContainer {g} at (0,30) size 549x570
       RenderSVGText {text} at (0,46) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.55: "auto"
@@ -324,39 +324,74 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 26.66: "HIT"
-      RenderSVGText {text} at (0,559) size 32x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 32x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (0,559) size 90x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 90x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.77: "bounding-box"
       RenderSVGImage {image} at (100,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (105,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (157,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (162,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (214,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (219,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (271,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (276,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (328,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (333,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (385,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (390,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (442,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (447,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (499,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (504,549) size 30x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (0,616) size 32x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 32x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (105,606) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 1 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (162,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (219,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (276,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (333,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (390,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (447,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (504,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+caret: position 0 of child 169 {text} of child 7 {g} of child 1 {svg} of document
diff --git a/LayoutTests/platform/mac/svg/custom/pointer-events-image-expected.txt b/LayoutTests/platform/mac/svg/custom/pointer-events-image-expected.txt
index f8a45d3..882523a 100644
--- a/LayoutTests/platform/mac/svg/custom/pointer-events-image-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/pointer-events-image-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 549x587
+  RenderSVGRoot {svg} at (0,6) size 549x594
     RenderSVGText {text} at (110,6) size 112x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 112x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 111.56: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 113x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 113x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 112.45: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,30) size 549x563
+    RenderSVGContainer {g} at (0,30) size 549x570
       RenderSVGText {text} at (0,46) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.55: "auto"
@@ -324,39 +324,74 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 26.66: "HIT"
-      RenderSVGText {text} at (0,559) size 32x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 32x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (0,559) size 90x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 90x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.77: "bounding-box"
       RenderSVGImage {image} at (100,543) size 50x50
-      RenderSVGText {text} at (105,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (157,543) size 50x50
-      RenderSVGText {text} at (162,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (214,543) size 50x50
-      RenderSVGText {text} at (219,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (271,543) size 50x50
-      RenderSVGText {text} at (276,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (328,543) size 50x50
-      RenderSVGText {text} at (333,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (385,543) size 50x50
-      RenderSVGText {text} at (390,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (442,543) size 50x50
-      RenderSVGText {text} at (447,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGImage {image} at (499,543) size 50x50
-      RenderSVGText {text} at (504,549) size 30x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (0,616) size 32x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 32x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (105,606) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 0 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (162,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (219,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (276,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (333,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (390,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (447,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (504,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+caret: position 0 of child 169 {text} of child 7 {g} of child 0 {svg} of document
diff --git a/LayoutTests/platform/mac/svg/custom/pointer-events-path-expected.txt b/LayoutTests/platform/mac/svg/custom/pointer-events-path-expected.txt
index fb56913..83b5af5 100644
--- a/LayoutTests/platform/mac/svg/custom/pointer-events-path-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/pointer-events-path-expected.txt
@@ -1,7 +1,7 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,4) size 730x592
+  RenderSVGRoot {svg} at (0,4) size 730x596
     RenderSVGText {text} at (610,4) size 62x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 62x18
         chunk 1 text run 1 at (610.00,18.00) startOffset 0 endOffset 8 width 61.31: "Example:"
@@ -17,7 +17,7 @@
     RenderSVGText {text} at (340,6) size 113x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 113x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 112.45: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,20) size 730x576
+    RenderSVGContainer {g} at (0,20) size 730x580
       RenderSVGRect {rect} at (680,20) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=680.00] [y=20.00] [width=50.00] [height=50.00]
       RenderSVGText {text} at (685,26) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
@@ -556,62 +556,121 @@
       RenderSVGText {text} at (504,512) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,526.00) startOffset 0 endOffset 3 width 26.66: "HIT"
-      RenderSVGText {text} at (0,559) size 32x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 32x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (0,559) size 90x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 90x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.77: "bounding-box"
       RenderSVGRect {rect} at (100,543) size 50x50 [x=100.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (105,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (105,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (105,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (154,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=157.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (162,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (162,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (162,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (214,543) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=214.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (219,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (219,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (219,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (268,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=271.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (276,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (276,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (276,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (328,543) size 50x50 [x=328.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (333,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (333,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (333,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (382,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=385.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (390,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (390,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (390,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (442,543) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=442.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (447,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (447,569) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (447,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGRect {rect} at (496,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=499.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (504,549) size 30x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (504,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,583.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (0,616) size 32x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 32x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGRect {rect} at (0,0) size 0x0 [x=100.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (105,606) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-      RenderSVGText {text} at (504,569) size 30x18 contains 1 chunk(s)
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,626) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,583.00) startOffset 0 endOffset 4 width 29.34: "miss"
+          chunk 1 text run 1 at (105.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (154,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=157.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (162,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFA500]}] [x=214.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (219,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (268,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=271.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (276,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [x=328.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (333,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (382,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=385.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (390,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFA500]}] [x=442.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (447,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGRect {rect} at (496,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=499.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (504,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (504,626) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,640.00) startOffset 0 endOffset 4 width 29.34: "miss"
diff --git a/LayoutTests/platform/mac/svg/custom/pointer-events-text-css-transform-expected.txt b/LayoutTests/platform/mac/svg/custom/pointer-events-text-css-transform-expected.txt
index 5e06454..e84b322 100644
--- a/LayoutTests/platform/mac/svg/custom/pointer-events-text-css-transform-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/pointer-events-text-css-transform-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 534x579
+  RenderSVGRoot {svg} at (0,6) size 534x594
     RenderSVGText {text} at (110,6) size 112x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 112x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 111.56: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 113x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 113x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 112.45: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,22) size 534x563
+    RenderSVGContainer {g} at (0,22) size 534x578
       RenderSVGText {text} at (0,46) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.55: "auto"
@@ -468,55 +468,106 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 26.66: "HIT"
-      RenderSVGText {text} at (0,559) size 32x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 32x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (0,559) size 90x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 90x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.77: "bounding-box"
       RenderSVGText {text} at (50,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (50.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (105,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (78,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (78.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (162,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (107,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (107.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (219,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (135,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (135.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (276,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (164,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (164.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (333,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (192,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (192.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (390,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (221,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (221.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (447,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (249,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (249.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (504,549) size 30x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (0,616) size 32x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 32x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (50,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (50.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (105,606) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 1 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (78,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (78.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (162,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (107,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (107.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (219,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (135,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (135.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (276,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (164,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (164.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (333,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (192,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (192.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (390,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (221,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (221.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (447,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (249,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (249.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (504,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+caret: position 0 of child 169 {text} of child 7 {g} of child 1 {svg} of document
diff --git a/LayoutTests/platform/mac/svg/custom/pointer-events-text-expected.txt b/LayoutTests/platform/mac/svg/custom/pointer-events-text-expected.txt
index e1594eb..af0421f 100644
--- a/LayoutTests/platform/mac/svg/custom/pointer-events-text-expected.txt
+++ b/LayoutTests/platform/mac/svg/custom/pointer-events-text-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 534x578
+  RenderSVGRoot {svg} at (0,6) size 534x594
     RenderSVGText {text} at (110,6) size 112x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 112x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 111.56: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 113x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 113x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 112.45: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,23) size 534x561
+    RenderSVGContainer {g} at (0,23) size 534x577
       RenderSVGText {text} at (0,46) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.55: "auto"
@@ -468,55 +468,106 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 26.66: "HIT"
-      RenderSVGText {text} at (0,559) size 32x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 32x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (0,559) size 90x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 90x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.77: "bounding-box"
       RenderSVGText {text} at (100,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (100.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (105,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (157,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (157.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (162,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (214,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (214.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (219,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (271,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (271.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (276,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (328,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (328.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (333,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (385,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (385.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (390,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (442,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (442.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (447,549) size 30x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
       RenderSVGText {text} at (499,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (499.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (504,549) size 30x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 26.66: "HIT"
+      RenderSVGText {text} at (0,616) size 32x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 32x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.10: "none"
+      RenderSVGText {text} at (100,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (100.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (105,606) size 30x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 30x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 29.34: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 0 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (157,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (157.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (162,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (214,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (214.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (219,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (271,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (271.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (276,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (328,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (328.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (333,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (385,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (385.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (390,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (442,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (442.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (447,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+      RenderSVGText {text} at (499,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (499.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (504,606) size 30x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 30x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 29.34: "miss"
+caret: position 0 of child 169 {text} of child 7 {g} of child 0 {svg} of document
diff --git a/LayoutTests/platform/win/svg/custom/pointer-events-image-css-transform-expected.txt b/LayoutTests/platform/win/svg/custom/pointer-events-image-css-transform-expected.txt
index baddfeb..143826d 100644
--- a/LayoutTests/platform/win/svg/custom/pointer-events-image-css-transform-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/pointer-events-image-css-transform-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 549x587
+  RenderSVGRoot {svg} at (0,6) size 549x594
     RenderSVGText {text} at (110,6) size 107x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 107x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 107.00: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 109x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 109x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 109.00: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,30) size 549x563
+    RenderSVGContainer {g} at (0,30) size 549x570
       RenderSVGText {text} at (0,46) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.00: "auto"
@@ -324,39 +324,74 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 27.00: "HIT"
-      RenderSVGText {text} at (0,559) size 31x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 31x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (0,559) size 89x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 89x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.00: "bounding-box"
       RenderSVGImage {image} at (100,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (105,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (157,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (162,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (214,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (219,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (271,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (276,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (328,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (333,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (385,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (390,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (442,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (447,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (499,543) size 50x50 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
-      RenderSVGText {text} at (504,549) size 28x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (0,616) size 31x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (105,606) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 1 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (162,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (219,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (276,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (333,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (390,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (447,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0 [transform={m=((2.00,0.00)(0.00,2.00)) t=(0.00,0.00)}]
+      RenderSVGText {text} at (504,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+caret: position 4 of child 0 {#text} of child 186 {text} of child 7 {g} of child 1 {svg} of document
diff --git a/LayoutTests/platform/win/svg/custom/pointer-events-image-expected.txt b/LayoutTests/platform/win/svg/custom/pointer-events-image-expected.txt
index 777299d..bfcea36 100644
--- a/LayoutTests/platform/win/svg/custom/pointer-events-image-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/pointer-events-image-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 549x587
+  RenderSVGRoot {svg} at (0,6) size 549x594
     RenderSVGText {text} at (110,6) size 107x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 107x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 107.00: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 109x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 109x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 109.00: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,30) size 549x563
+    RenderSVGContainer {g} at (0,30) size 549x570
       RenderSVGText {text} at (0,46) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.00: "auto"
@@ -324,39 +324,74 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 27.00: "HIT"
-      RenderSVGText {text} at (0,559) size 31x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 31x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (0,559) size 89x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 89x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.00: "bounding-box"
       RenderSVGImage {image} at (100,543) size 50x50
-      RenderSVGText {text} at (105,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (157,543) size 50x50
-      RenderSVGText {text} at (162,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (214,543) size 50x50
-      RenderSVGText {text} at (219,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (271,543) size 50x50
-      RenderSVGText {text} at (276,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (328,543) size 50x50
-      RenderSVGText {text} at (333,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (385,543) size 50x50
-      RenderSVGText {text} at (390,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (442,543) size 50x50
-      RenderSVGText {text} at (447,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGImage {image} at (499,543) size 50x50
-      RenderSVGText {text} at (504,549) size 28x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (0,616) size 31x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (105,606) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 0 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (162,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (219,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (276,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (333,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (390,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (447,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGImage {image} at (0,0) size 0x0
+      RenderSVGText {text} at (504,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+caret: position 4 of child 0 {#text} of child 186 {text} of child 7 {g} of child 0 {svg} of document
diff --git a/LayoutTests/platform/win/svg/custom/pointer-events-path-expected.txt b/LayoutTests/platform/win/svg/custom/pointer-events-path-expected.txt
index 73d2f17..5c136f0 100644
--- a/LayoutTests/platform/win/svg/custom/pointer-events-path-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/pointer-events-path-expected.txt
@@ -1,7 +1,7 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,4) size 730x592
+  RenderSVGRoot {svg} at (0,4) size 730x596
     RenderSVGText {text} at (610,4) size 60x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 60x18
         chunk 1 text run 1 at (610.00,18.00) startOffset 0 endOffset 8 width 60.00: "Example:"
@@ -17,7 +17,7 @@
     RenderSVGText {text} at (340,6) size 109x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 109x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 109.00: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,20) size 730x576
+    RenderSVGContainer {g} at (0,20) size 730x580
       RenderSVGRect {rect} at (680,20) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=680.00] [y=20.00] [width=50.00] [height=50.00]
       RenderSVGText {text} at (685,26) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
@@ -556,62 +556,121 @@
       RenderSVGText {text} at (504,512) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,526.00) startOffset 0 endOffset 3 width 27.00: "HIT"
-      RenderSVGText {text} at (0,559) size 31x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 31x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (0,559) size 89x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 89x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.00: "bounding-box"
       RenderSVGRect {rect} at (100,543) size 50x50 [x=100.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (105,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (105,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (105,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (154,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=157.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (162,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (162,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (162,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (214,543) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=214.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (219,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (219,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (219,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (268,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=271.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (276,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (276,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (276,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (328,543) size 50x50 [x=328.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (333,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (333,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (333,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (382,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=385.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (390,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (390,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (390,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (442,543) size 50x50 [fill={[type=SOLID] [color=#FFA500]}] [x=442.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (447,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (447,569) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (447,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGRect {rect} at (496,540) size 56x56 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=499.00] [y=543.00] [width=50.00] [height=50.00]
-      RenderSVGText {text} at (504,549) size 28x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (504,569) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,583.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (0,616) size 31x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGRect {rect} at (0,0) size 0x0 [x=100.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (105,606) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-      RenderSVGText {text} at (504,569) size 28x18 contains 1 chunk(s)
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,626) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,583.00) startOffset 0 endOffset 4 width 28.00: "miss"
+          chunk 1 text run 1 at (105.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (154,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=157.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (162,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFA500]}] [x=214.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (219,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (268,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=271.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (276,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [x=328.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (333,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (382,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [x=385.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (390,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (0,0) size 0x0 [fill={[type=SOLID] [color=#FFA500]}] [x=442.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (447,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGRect {rect} at (496,597) size 56x3 [stroke={[type=SOLID] [color=#0000FF] [stroke width=6.00]}] [fill={[type=SOLID] [color=#FFA500]}] [x=499.00] [y=600.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (504,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (504,626) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,640.00) startOffset 0 endOffset 4 width 28.00: "miss"
diff --git a/LayoutTests/platform/win/svg/custom/pointer-events-text-css-transform-expected.txt b/LayoutTests/platform/win/svg/custom/pointer-events-text-css-transform-expected.txt
index b7c1a68..ec33fa0 100644
--- a/LayoutTests/platform/win/svg/custom/pointer-events-text-css-transform-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/pointer-events-text-css-transform-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 532x579
+  RenderSVGRoot {svg} at (0,6) size 532x594
     RenderSVGText {text} at (110,6) size 107x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 107x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 107.00: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 109x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 109x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 109.00: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,22) size 532x563
+    RenderSVGContainer {g} at (0,22) size 532x578
       RenderSVGText {text} at (0,46) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.00: "auto"
@@ -468,55 +468,106 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 27.00: "HIT"
-      RenderSVGText {text} at (0,559) size 31x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 31x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (0,559) size 89x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 89x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.00: "bounding-box"
       RenderSVGText {text} at (50,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (50.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (105,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (78,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (78.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (162,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (107,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (107.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (219,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (135,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (135.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (276,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (164,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (164.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (333,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (192,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (192.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (390,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (221,268) size 10x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (221.00,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (447,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (249,268) size 11x24 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 10x23
           chunk 1 text run 1 at (249.50,286.50) startOffset 0 endOffset 1 width 10.00: "#"
-      RenderSVGText {text} at (504,549) size 28x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (0,616) size 31x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (50,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (50.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (105,606) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 1 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (78,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (78.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (162,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (107,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (107.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (219,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (135,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (135.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (276,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (164,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (164.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (333,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (192,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (192.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (390,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (221,297) size 10x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (221.00,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (447,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (249,297) size 11x23 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 10x23
+          chunk 1 text run 1 at (249.50,315.00) startOffset 0 endOffset 1 width 10.00: "#"
+      RenderSVGText {text} at (504,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+caret: position 4 of child 0 {#text} of child 186 {text} of child 7 {g} of child 1 {svg} of document
diff --git a/LayoutTests/platform/win/svg/custom/pointer-events-text-expected.txt b/LayoutTests/platform/win/svg/custom/pointer-events-text-expected.txt
index 9e30b67..8769071 100644
--- a/LayoutTests/platform/win/svg/custom/pointer-events-text-expected.txt
+++ b/LayoutTests/platform/win/svg/custom/pointer-events-text-expected.txt
@@ -1,14 +1,14 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (0,6) size 532x578
+  RenderSVGRoot {svg} at (0,6) size 532x594
     RenderSVGText {text} at (110,6) size 107x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 107x18
         chunk 1 text run 1 at (110.00,20.00) startOffset 0 endOffset 19 width 107.00: "Visibility: visible"
     RenderSVGText {text} at (340,6) size 109x18 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 109x18
         chunk 1 text run 1 at (340.00,20.00) startOffset 0 endOffset 18 width 109.00: "Visibility: hidden"
-    RenderSVGContainer {g} at (0,23) size 532x561
+    RenderSVGContainer {g} at (0,23) size 532x577
       RenderSVGText {text} at (0,46) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (0.00,60.00) startOffset 0 endOffset 4 width 27.00: "auto"
@@ -468,55 +468,106 @@
       RenderSVGText {text} at (504,492) size 27x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 27x18
           chunk 1 text run 1 at (504.00,506.00) startOffset 0 endOffset 3 width 27.00: "HIT"
-      RenderSVGText {text} at (0,559) size 31x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 31x18
-          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (0,559) size 89x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 89x18
+          chunk 1 text run 1 at (0.00,573.00) startOffset 0 endOffset 12 width 89.00: "bounding-box"
       RenderSVGText {text} at (100,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (100.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (105,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (105,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (105.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (157,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (157.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (162,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (162,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (162.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (214,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (214.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (219,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (219,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (219.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (271,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (271.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (276,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (276,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (276.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (328,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (328.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (333,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (333,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (333.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (385,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (385.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (390,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (390,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (390.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (442,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (442.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (447,549) size 28x18 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (447,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (447.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
       RenderSVGText {text} at (499,537) size 20x46 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 20x46
           chunk 1 text run 1 at (499.00,573.00) startOffset 0 endOffset 1 width 20.00: "#"
-      RenderSVGText {text} at (504,549) size 28x18 contains 1 chunk(s)
+      RenderSVGText {text} at (504,549) size 27x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 27x18
+          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 3 width 27.00: "HIT"
+      RenderSVGText {text} at (0,616) size 31x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x18
+          chunk 1 text run 1 at (0.00,630.00) startOffset 0 endOffset 4 width 31.00: "none"
+      RenderSVGText {text} at (100,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (100.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (105,606) size 28x18 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 28x18
-          chunk 1 text run 1 at (504.00,563.00) startOffset 0 endOffset 4 width 28.00: "miss"
-caret: position 0 of child 0 {#text} of child 3 {text} of child 0 {svg} of document
+          chunk 1 text run 1 at (105.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (157,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (157.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (162,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (162.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (214,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (214.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (219,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (219.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (271,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (271.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (276,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (276.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (328,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (328.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (333,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (333.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (385,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (385.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (390,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (390.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (442,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (442.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (447,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (447.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+      RenderSVGText {text} at (499,594) size 20x46 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 20x46
+          chunk 1 text run 1 at (499.00,630.00) startOffset 0 endOffset 1 width 20.00: "#"
+      RenderSVGText {text} at (504,606) size 28x18 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 28x18
+          chunk 1 text run 1 at (504.00,620.00) startOffset 0 endOffset 4 width 28.00: "miss"
+caret: position 4 of child 0 {#text} of child 186 {text} of child 7 {g} of child 0 {svg} of document
diff --git a/LayoutTests/svg/custom/pointer-events-image-css-transform.svg b/LayoutTests/svg/custom/pointer-events-image-css-transform.svg
index 8ba768d..6fae3be 100644
--- a/LayoutTests/svg/custom/pointer-events-image-css-transform.svg
+++ b/LayoutTests/svg/custom/pointer-events-image-css-transform.svg
@@ -12,7 +12,7 @@
     var fillValues = ['none', 'orange' ];
     var strokeValues = ['none', 'blue' ];
   
-    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
+    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'bounding-box', 'none'];
   
     var leftEdge = 100;
     var topEdge = 30;
diff --git a/LayoutTests/svg/custom/pointer-events-image.svg b/LayoutTests/svg/custom/pointer-events-image.svg
index 6b3a657..ef827d6 100644
--- a/LayoutTests/svg/custom/pointer-events-image.svg
+++ b/LayoutTests/svg/custom/pointer-events-image.svg
@@ -11,7 +11,7 @@
     var fillValues = ['none', 'orange' ];
     var strokeValues = ['none', 'blue' ];
   
-    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
+    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'bounding-box', 'none'];
   
     var leftEdge = 100;
     var topEdge = 30;
diff --git a/LayoutTests/svg/custom/pointer-events-path.svg b/LayoutTests/svg/custom/pointer-events-path.svg
index 81244cb..b922ab6 100644
--- a/LayoutTests/svg/custom/pointer-events-path.svg
+++ b/LayoutTests/svg/custom/pointer-events-path.svg
@@ -11,7 +11,7 @@
     var fillValues = ['none', 'orange' ];
     var strokeValues = ['none', 'blue' ];
   
-    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
+    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'bounding-box', 'none'];
   
     var leftEdge = 100;
     var topEdge = 30;
diff --git a/LayoutTests/svg/custom/pointer-events-text-css-transform.svg b/LayoutTests/svg/custom/pointer-events-text-css-transform.svg
index 4ba75b6..62747b4 100644
--- a/LayoutTests/svg/custom/pointer-events-text-css-transform.svg
+++ b/LayoutTests/svg/custom/pointer-events-text-css-transform.svg
@@ -11,7 +11,7 @@
     var fillValues = ['none', 'orange' ];
     var strokeValues = ['none', 'blue' ];
   
-    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
+    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'bounding-box', 'none'];
   
     var leftEdge = 100;
     var topEdge = 30;
diff --git a/LayoutTests/svg/custom/pointer-events-text.svg b/LayoutTests/svg/custom/pointer-events-text.svg
index a34c683..0014647 100644
--- a/LayoutTests/svg/custom/pointer-events-text.svg
+++ b/LayoutTests/svg/custom/pointer-events-text.svg
@@ -10,7 +10,7 @@
     var fillValues = ['none', 'orange' ];
     var strokeValues = ['none', 'blue' ];
   
-    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'none'];
+    var pointerEventsValues = ['auto', 'visiblePainted', 'visibleFill', 'visibleStroke', 'visible', 'painted', 'fill', 'stroke', 'all', 'bounding-box', 'none'];
   
     var leftEdge = 100;
     var topEdge = 30;
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index c3fc437..3e713ce 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,31 @@
+2019-10-22  Dirk Schulze  <krit@webkit.org>
+
+        SVG2: Add bounding-box keyword to pointer-events
+        https://bugs.webkit.org/show_bug.cgi?id=191382
+
+        Reviewed by Dean Jackson.
+
+        SVG 2 added the bounding-box keyword to the pointer-events CSS
+        property. It takes the bounding box of an element as hit area.
+
+        Implemented it so that it is as if "fill" was specified for HTML.
+
+        Extended existing tests.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator PointerEvents const):
+        * css/CSSProperties.json:
+        * css/CSSValueKeywords.in:
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        * rendering/PointerEventsHitRules.cpp:
+        (WebCore::PointerEventsHitRules::PointerEventsHitRules):
+        * rendering/PointerEventsHitRules.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::nodeAtFloatPoint):
+
 2019-10-22  youenn fablet  <youenn@apple.com>
 
         Carriage return character sometimes missing in SDP c-line
diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h
index 4631d94..bc33c9f 100644
--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h
@@ -3494,6 +3494,9 @@
     case PointerEvents::VisiblePainted:
         m_value.valueID = CSSValueVisiblePainted;
         break;
+    case PointerEvents::BoundingBox:
+        m_value.valueID = CSSValueBoundingBox;
+        break;
     case PointerEvents::Auto:
         m_value.valueID = CSSValueAuto;
         break;
@@ -3528,6 +3531,8 @@
         return PointerEvents::Fill;
     case CSSValueStroke:
         return PointerEvents::Stroke;
+    case CSSValueBoundingBox:
+        return PointerEvents::BoundingBox;
     default:
         break;
     }
diff --git a/Source/WebCore/css/CSSProperties.json b/Source/WebCore/css/CSSProperties.json
index 4bdb4ff..d79891b 100644
--- a/Source/WebCore/css/CSSProperties.json
+++ b/Source/WebCore/css/CSSProperties.json
@@ -3469,7 +3469,8 @@
                 "visiblestroke",
                 "painted",
                 "fill",
-                "stroke"
+                "stroke",
+                "bounding-box"
             ],
             "specification": {
                 "category": "svg",
diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in
index cf74a68..39a089f 100644
--- a/Source/WebCore/css/CSSValueKeywords.in
+++ b/Source/WebCore/css/CSSValueKeywords.in
@@ -1013,6 +1013,7 @@
 painted
 fill
 stroke
+bounding-box
 //all
 //none
 
diff --git a/Source/WebCore/css/parser/CSSParserFastPaths.cpp b/Source/WebCore/css/parser/CSSParserFastPaths.cpp
index b949cc8..0f3b438 100644
--- a/Source/WebCore/css/parser/CSSParserFastPaths.cpp
+++ b/Source/WebCore/css/parser/CSSParserFastPaths.cpp
@@ -625,7 +625,7 @@
     case CSSPropertyPointerEvents:
         // none | visiblePainted | visibleFill | visibleStroke | visible |
         // painted | fill | stroke | auto | all | bounding-box
-        return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || (valueID >= CSSValueVisiblePainted && valueID <= CSSValueStroke);
+        return valueID == CSSValueVisible || valueID == CSSValueNone || valueID == CSSValueAll || valueID == CSSValueAuto || valueID == CSSValueBoundingBox || (valueID >= CSSValueVisiblePainted && valueID <= CSSValueStroke);
     case CSSPropertyPosition: // static | relative | absolute | fixed | sticky
         return valueID == CSSValueStatic
             || valueID == CSSValueRelative
diff --git a/Source/WebCore/rendering/PointerEventsHitRules.cpp b/Source/WebCore/rendering/PointerEventsHitRules.cpp
index 9076325..c1280b2 100644
--- a/Source/WebCore/rendering/PointerEventsHitRules.cpp
+++ b/Source/WebCore/rendering/PointerEventsHitRules.cpp
@@ -28,6 +28,7 @@
     , requireStroke(false)
     , canHitStroke(false)
     , canHitFill(false)
+    , canHitBoundingBox(false)
 {
     if (request.svgClipContent())
         pointerEvents = PointerEvents::Fill;
@@ -67,6 +68,10 @@
             case PointerEvents::Stroke:
                 canHitStroke = true;
                 break;
+            case PointerEvents::BoundingBox:
+                canHitFill = true;
+                canHitBoundingBox = true;
+                break;
             case PointerEvents::None:
                 // nothing to do here, defaults are all false.
                 break;
@@ -101,6 +106,10 @@
                 canHitFill = true;
                 canHitStroke = true;
                 break;
+            case PointerEvents::BoundingBox:
+                canHitFill = true;
+                canHitBoundingBox = true;
+                break;
             case PointerEvents::None:
                 // nothing to do here, defaults are all false.
                 break;
diff --git a/Source/WebCore/rendering/PointerEventsHitRules.h b/Source/WebCore/rendering/PointerEventsHitRules.h
index 38944b9..bf63192 100644
--- a/Source/WebCore/rendering/PointerEventsHitRules.h
+++ b/Source/WebCore/rendering/PointerEventsHitRules.h
@@ -39,6 +39,7 @@
     bool requireStroke;
     bool canHitStroke;
     bool canHitFill;  
+    bool canHitBoundingBox;
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.cpp b/Source/WebCore/rendering/style/RenderStyleConstants.cpp
index ac54d0a..70a2505 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.cpp
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.cpp
@@ -892,6 +892,7 @@
     case PointerEvents::Fill: ts << "fill"; break;
     case PointerEvents::Painted: ts << "painted"; break;
     case PointerEvents::Visible: ts << "visible"; break;
+    case PointerEvents::BoundingBox: ts << "bounding-box"; break;
     case PointerEvents::VisibleStroke: ts << "visible-stroke"; break;
     case PointerEvents::VisibleFill: ts << "visible-fill"; break;
     case PointerEvents::VisiblePainted: ts << "visible-painted"; break;
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h
index f372420..90f0664 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.h
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h
@@ -906,6 +906,7 @@
     VisibleStroke,
     VisibleFill,
     VisiblePainted,
+    BoundingBox,
     All
 };
 
diff --git a/Source/WebCore/rendering/svg/RenderSVGShape.cpp b/Source/WebCore/rendering/svg/RenderSVGShape.cpp
index 6a67118..0a69c63 100644
--- a/Source/WebCore/rendering/svg/RenderSVGShape.cpp
+++ b/Source/WebCore/rendering/svg/RenderSVGShape.cpp
@@ -381,7 +381,8 @@
         if (request.svgClipContent())
             fillRule = svgStyle.clipRule();
         if ((hitRules.canHitStroke && (svgStyle.hasStroke() || !hitRules.requireStroke) && strokeContains(localPoint, hitRules.requireStroke))
-            || (hitRules.canHitFill && (svgStyle.hasFill() || !hitRules.requireFill) && fillContains(localPoint, hitRules.requireFill, fillRule))) {
+            || (hitRules.canHitFill && (svgStyle.hasFill() || !hitRules.requireFill) && fillContains(localPoint, hitRules.requireFill, fillRule))
+            || (hitRules.canHitBoundingBox && objectBoundingBox().contains(localPoint))) {
             updateHitTestResult(result, LayoutPoint(localPoint));
             if (result.addNodeToListBasedTestResult(&graphicsElement(), request, localPoint) == HitTestProgress::Stop)
                 return true;