Title: [239070] trunk
Revision 239070
Author bfulg...@apple.com
Date 2018-12-10 22:50:33 -0800 (Mon, 10 Dec 2018)
Log Message
SVGViewSpec objects should mark relevant SVG elements
https://bugs.webkit.org/show_bug.cgi?id=192567
Reviewed by Ryosuke Niwa.
Source/WebCore:
SVGViewSpec elements reflect the state of an underlying SVGElement. Teach the mark algorithm to
recognize the relevant SVGElement as active as long as the SVGViewSpec is active.
Update SVGElement so that it can vend WeakPtrs. I also noticed that SVGAttributeOwner used a bare
pointer to the SVGElement, so switched to a WeakPtr.
Test: svg/animations/view-dependency-crash.html
* Sources.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSSVGViewSpecCustom.cpp: Added.
(WebCore::JSSVGViewSpec::visitAdditionalChildren):
* svg/SVGElement.h:
* svg/SVGPathElement.h:
* svg/SVGViewSpec.cpp:
(WebCore::SVGViewSpec::SVGViewSpec): Hold a weak pointer (rather than a bare pointer) to the underlying element.
* svg/SVGViewSpec.h:
* svg/SVGViewSpec.idl:
* svg/properties/SVGAttributeOwnerProxy.cpp: Added.
(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Hold a weak pointer (rather than a bare pointer) to
the underling SVGElement.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.
* svg/properties/SVGAttributeOwnerProxy.h:
(WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy): Move implementation to cpp file.
(WebCore::SVGAttributeOwnerProxy::element const): Ditto.
* svg/properties/SVGAttributeOwnerProxyImpl.h: Update for WeakPtr use.
LayoutTests:
* svg/animations/view-dependency-crash-expected.txt: Added.
* svg/animations/view-dependency-crash.html: Added.
Modified Paths
trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Sources.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/svg/SVGElement.h
trunk/Source/WebCore/svg/SVGPathElement.h
trunk/Source/WebCore/svg/SVGViewSpec.cpp
trunk/Source/WebCore/svg/SVGViewSpec.h
trunk/Source/WebCore/svg/SVGViewSpec.idl
trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.h
trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxyImpl.h
Added Paths
trunk/LayoutTests/svg/animations/view-dependency-crash-expected.txt
trunk/LayoutTests/svg/animations/view-dependency-crash.html
trunk/Source/WebCore/bindings/js/JSSVGViewSpecCustom.cpp
trunk/Source/WebCore/svg/properties/SVGAttributeOwnerProxy.cpp
Diff
Modified: trunk/LayoutTests/ChangeLog (239069 => 239070)
--- trunk/LayoutTests/ChangeLog 2018-12-11 05:37:24 UTC (rev 239069)
+++ trunk/LayoutTests/ChangeLog 2018-12-11 06:50:33 UTC (rev 239070)
@@ -1,3 +1,14 @@
+2018-12-10 Brent Fulgham
+
+SVGViewSpec objects should mark relevant SVG elements
+https://bugs.webkit.org/show_bug.cgi?id=192567
+
+
+Reviewed by Ryosuke Niwa.
+
+* svg/animations/view-dependency-crash-expected.txt: Added.
+* svg/animations/view-dependency-crash.html: Added.
+
2018-12-10 Benjamin Poulain
Content blocker rule "raw" blocks media elements from loading
Added: trunk/LayoutTests/svg/animations/view-dependency-crash-expected.txt (0 => 239070)
--- trunk/LayoutTests/svg/animations/view-dependency-crash-expected.txt (rev 0)
+++ trunk/LayoutTests/svg/animations/view-dependency-crash-expected.txt 2018-12-11 06:50:33 UTC (rev 239070)
@@ -0,0 +1,2 @@
+This test passes if it does not crash
+
Added: trunk/LayoutTests/svg/animations/view-dependency-crash.html (0 => 239070)
--- trunk/LayoutTests/svg/animations/view-dependency-crash.html (rev 0)
+++ trunk/LayoutTests/svg/animations/view-dependency-crash.html 2018-12-11 06:50:33 UTC (rev 239070)
@@ -0,0 +1,24 @@
+
+
+
+
+
+This test passes if it does not crash
+