Remove SVGCursorElement
This allows significant cleanup of CSSCursorImageValue, so do that too.
Intent-thread:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/r0lnh5Rw23M
TBR=timvolodine@chromium.org
BUG=650598
Review-Url: https://codereview.chromium.org/2522443002
Cr-Commit-Position: refs/heads/master@{#438116}
diff --git a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
index 22ba8b52..5c29c5fd 100644
--- a/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
+++ b/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
@@ -3512,14 +3512,6 @@
getter tableValues
getter type
method constructor
-interface SVGCursorElement : SVGElement
- getter href
- getter requiredExtensions
- getter requiredFeatures
- getter systemLanguage
- getter x
- getter y
- method constructor
interface SVGDefsElement : SVGGraphicsElement
method constructor
interface SVGDescElement : SVGElement
diff --git a/third_party/WebKit/LayoutTests/fast/events/mouse-cursor-expected.txt b/third_party/WebKit/LayoutTests/fast/events/mouse-cursor-expected.txt
index 3b1ba13b..1c3d717 100644
--- a/third_party/WebKit/LayoutTests/fast/events/mouse-cursor-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/mouse-cursor-expected.txt
@@ -57,13 +57,13 @@
TEST CASE: Over large image with fallback to pointer
Cursor Info: type=Hand hotSpot=0,0
-TEST CASE: SVG cursor
-Cursor Info: type=Custom hotSpot=0,0 image=25x25
+TEST CASE: Local element reference
+Cursor Info: type=Hand hotSpot=0,0
TEST CASE: Multiple invalid cursors with fallback to pointer
Cursor Info: type=Hand hotSpot=0,0
-TEST CASE: Nonexistent SVG cursor with fallback to pointer
+TEST CASE: Nonexistent local element reference with fallback to pointer
Cursor Info: type=Hand hotSpot=0,0
TEST CASE: A link with default cursor
diff --git a/third_party/WebKit/LayoutTests/fast/events/mouse-cursor.html b/third_party/WebKit/LayoutTests/fast/events/mouse-cursor.html
index bc4d7e40..d4f9687c 100644
--- a/third_party/WebKit/LayoutTests/fast/events/mouse-cursor.html
+++ b/third_party/WebKit/LayoutTests/fast/events/mouse-cursor.html
@@ -33,9 +33,9 @@
<div style='cursor: url(resources/greenbox-hotspot5-4.cur) 20 10, pointer'>Image with explicit hot spot at (20,10) overriding implicit hot spot</div>
<div style='cursor: url(resources/greenbox-hotspot35-4.cur), pointer'>Image with implicit hot spot outside image at (35,4)</div>
<div style='cursor: url(resources/onload-image.png), pointer'>Over large image with fallback to pointer</div>
- <div style='cursor: url(#greenbox), pointer'>SVG cursor</div>
+ <div style='cursor: url(#greenbox), pointer'>Local element reference</div>
<div style='cursor: url(mouse-cursor_FAIL.html), url(unknown-scheme:cursor_FAIL.png), pointer'>Multiple invalid cursors with fallback to pointer</div>
- <div style='cursor: url(#nonexistent_FAIL), pointer'>Nonexistent SVG cursor with fallback to pointer</div>
+ <div style='cursor: url(#nonexistent_FAIL), pointer'>Nonexistent local element reference with fallback to pointer</div>
<div><a href='#'>A link with default cursor</a></div>
<div style='cursor: wait'><a href='#'>Link with default cursor overriding wait</a></div>
<div style='cursor: wait'><div style='cursor: doesntexist'>Wait cursor which should not be affected by unknown cursor rule</div></div>
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt
index f4c27c9..71a6b78 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt
+++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/origin/cross-origin-objects/cross-origin-objects-exceptions-expected.txt
@@ -10,7 +10,7 @@
FAIL [[Delete]] Should throw on cross-origin objects assert_throws: Can't delete cross-origin indexed property function "function () { delete C[0]; }" did not throw
FAIL [[DefineOwnProperty]] Should throw for cross-origin objects assert_throws: Can't define cross-origin value property length function "function () { Object.defineProperty(obj, prop, valueDesc); }" did not throw
FAIL [[Enumerate]] should return an empty iterator assert_unreached: Shouldn't have been able to enumerate stop on cross-origin Window Reached unreachable code
-FAIL [[OwnPropertyKeys]] should return all properties from cross-origin objects assert_array_equals: Object.getOwnPropertyNames() gives the right answer for cross-origin Window lengths differ, expected 863 got 13
+FAIL [[OwnPropertyKeys]] should return all properties from cross-origin objects assert_array_equals: Object.getOwnPropertyNames() gives the right answer for cross-origin Window lengths differ, expected 862 got 13
PASS A and B jointly observe the same identity for cross-origin Window and Location
PASS Cross-origin functions get local Function.prototype
FAIL Cross-origin Window accessors get local Function.prototype Cannot read property 'name' of undefined
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/svg/interfaces-expected.txt b/third_party/WebKit/LayoutTests/imported/wpt/svg/interfaces-expected.txt
index b519c23..85ff741 100644
--- a/third_party/WebKit/LayoutTests/imported/wpt/svg/interfaces-expected.txt
+++ b/third_party/WebKit/LayoutTests/imported/wpt/svg/interfaces-expected.txt
@@ -3332,19 +3332,19 @@
FAIL SVGHatchpathElement interface object name assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
FAIL SVGHatchpathElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
FAIL SVGHatchpathElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-PASS SVGCursorElement interface: existence and properties of interface object
-PASS SVGCursorElement interface object length
-PASS SVGCursorElement interface object name
-FAIL SVGCursorElement interface: existence and properties of interface prototype object assert_equals: class string of SVGCursorElement.prototype expected "[object SVGCursorElementPrototype]" but got "[object SVGCursorElement]"
-PASS SVGCursorElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGCursorElement interface: attribute x
-PASS SVGCursorElement interface: attribute y
-PASS SVGCursorElement interface: attribute href
-PASS SVGCursorElement must be primary interface of cursor
-PASS Stringification of cursor
-PASS SVGCursorElement interface: cursor must inherit property "x" with the proper type (0)
-PASS SVGCursorElement interface: cursor must inherit property "y" with the proper type (1)
-PASS SVGCursorElement interface: cursor must inherit property "href" with the proper type (2)
+FAIL SVGCursorElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface object length assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface object name assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface: attribute x assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface: attribute y assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement interface: attribute href assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL SVGCursorElement must be primary interface of cursor assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
+FAIL Stringification of cursor assert_equals: class string of cursor expected "[object SVGCursorElement]" but got "[object SVGElement]"
+FAIL SVGCursorElement interface: cursor must inherit property "x" with the proper type (0) assert_inherits: property "x" not found in prototype chain
+FAIL SVGCursorElement interface: cursor must inherit property "y" with the proper type (1) assert_inherits: property "y" not found in prototype chain
+FAIL SVGCursorElement interface: cursor must inherit property "href" with the proper type (2) assert_inherits: property "href" not found in prototype chain
PASS SVGElement interface: cursor must inherit property "className" with the proper type (0)
PASS SVGElement interface: cursor must inherit property "dataset" with the proper type (1)
PASS SVGElement interface: cursor must inherit property "ownerSVGElement" with the proper type (2)
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
index 3b76d20..e562d96 100644
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -4279,15 +4279,6 @@
getter tableValues
getter type
method constructor
-interface SVGCursorElement : SVGElement
- attribute @@toStringTag
- getter href
- getter requiredExtensions
- getter requiredFeatures
- getter systemLanguage
- getter x
- getter y
- method constructor
interface SVGDefsElement : SVGGraphicsElement
attribute @@toStringTag
method constructor
diff --git a/third_party/WebKit/LayoutTests/svg/css/cursor-change-href-expected.txt b/third_party/WebKit/LayoutTests/svg/css/cursor-change-href-expected.txt
deleted file mode 100644
index 38e0352..0000000
--- a/third_party/WebKit/LayoutTests/svg/css/cursor-change-href-expected.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-PASS
-PASS
diff --git a/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg b/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg
deleted file mode 100644
index 1086335..0000000
--- a/third_party/WebKit/LayoutTests/svg/css/cursor-change-href.svg
+++ /dev/null
@@ -1,32 +0,0 @@
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <g style="cursor:url(#cursor), auto">
- <g>
- <rect id="rect" x="50" y="50" width="100" height="100" fill="green" />
- <text id="result1" x="50" y="200">Not run.</text>
- <text id="result2" x="50" y="220">Not run.</text>
- </g>
- </g>
- <cursor id="cursor" xlink:href="file:///icon1.ico" x="0" y="0" />
- <script>
- // Modifying href of a cursor element should cause a recalc of elements using it.
-
- if (window.testRunner)
- testRunner.dumpAsText();
-
- var rect = document.getElementById("rect");
- var result1 = document.getElementById("result1").firstChild;
- var result2 = document.getElementById("result2").firstChild;
-
- if (getComputedStyle(rect).cursor == "url(\"file:///icon1.ico\") 0 0, auto")
- result1.data = "PASS";
- else
- result1.data = "FAIL - " + getComputedStyle(rect).cursor;
-
- document.getElementById("cursor").setAttribute("xlink:href", "file:///icon2.ico");
-
- if (getComputedStyle(rect).cursor == "url(\"file:///icon2.ico\") 0 0, auto")
- result2.data = "PASS";
- else
- result2.data = "FAIL - " + getComputedStyle(rect).cursor;
- </script>
-</svg>
diff --git a/third_party/WebKit/LayoutTests/svg/css/cursor-hotspot-override-from-css.html b/third_party/WebKit/LayoutTests/svg/css/cursor-hotspot-override-from-css.html
deleted file mode 100644
index 816ea6db..0000000
--- a/third_party/WebKit/LayoutTests/svg/css/cursor-hotspot-override-from-css.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<svg xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0">
- <rect id="rectWithCursorWithXYOnSVGOnly" style="cursor:url(#cursorWithXY), auto;" x="50" y="50" width="100" height="100" fill="green" />
- <rect id="rectWithCursorWithXYOnSVGAndCSS" style="cursor:url(#cursorWithXY) 30 40, auto;" x="200" y="50" width="100" height="100" fill="green" />
- <rect id="rectWithCursorWithXYInCSSOnly" style="cursor:url(#cursorWithNoXY) 30 40, auto;" x="350" y="50" width="100" height="100" fill="green" />
- <rect id="rectWithCursorWithNoXY" style="cursor:url(#cursorWithNoXY), auto;" x="500" y="50" width="100" height="100" fill="green" />
- <cursor id="cursorWithNoXY" xlink:href="file:///icon1.ico" />
- <cursor id="cursorWithXY" xlink:href="file:///icon1.ico" x="10" y="20" />
-</svg>
-<script>
-test(function() {
- // From the CSS3 UI spec:
- // If the values are unspecified, then the intrinsic hotspot defined inside the image resource itself is used.
- assert_equals(rectWithCursorWithXYOnSVGOnly.style.cursor, 'url("#cursorWithXY"), auto');
- assert_equals(getComputedStyle(rectWithCursorWithXYOnSVGOnly).cursor, 'url("file:///icon1.ico") 10 20, auto');
-}, "Setting the hotspot on the SVG and not CSS");
-
-test(function() {
- assert_equals(rectWithCursorWithXYOnSVGAndCSS.style.cursor, 'url("#cursorWithXY") 30 40, auto');
- assert_equals(getComputedStyle(rectWithCursorWithXYOnSVGAndCSS).cursor, 'url("file:///icon1.ico") 30 40, auto');
-}, "Setting the hotspot in both CSS and SVG");
-
-test(function() {
- assert_equals(rectWithCursorWithXYInCSSOnly.style.cursor, 'url("#cursorWithNoXY") 30 40, auto');
- assert_equals(getComputedStyle(rectWithCursorWithXYInCSSOnly).cursor, 'url("file:///icon1.ico") 30 40, auto');
-}, "Setting the hotspot in CSS but not the SVG");
-
-test(function() {
- // From the CSS3 UI spec:
- // If both the values are unspecific and the referenced cursor has no defined hotspot, the effect is as if a value of "0 0" were specified.
- assert_equals(rectWithCursorWithNoXY.style.cursor, 'url("#cursorWithNoXY"), auto');
- assert_equals(getComputedStyle(rectWithCursorWithNoXY).cursor, 'url("file:///icon1.ico") 0 0, auto');
-}, "Not setting the hotspot");
-</script>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html b/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html
deleted file mode 100644
index 77bf86f1..0000000
--- a/third_party/WebKit/LayoutTests/svg/css/svgcursorelement-use-counter.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<title>SVGCursorElement use counters</title>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<style>
-#target {
- cursor: url(#mycursor), auto;
-}
-</style>
-<script>
-// From UseCounter.h
-const SVGCursorElement = 1587;
-const SVGCursorElementHasClient = 1588;
-
-test(function() {
- assert_false(internals.isUseCounted(document, SVGCursorElement));
- assert_false(internals.isUseCounted(document, SVGCursorElementHasClient));
-}, document.title + ', before element parsed');
-</script>
-<svg><cursor id="mycursor" href="data:image/png;base64,"></cursor></svg>
-<script>
-test(function() {
- assert_true(internals.isUseCounted(document, SVGCursorElement));
- assert_false(internals.isUseCounted(document, SVGCursorElementHasClient));
-}, document.title + ', after element parsed');
-</script>
-<svg id="target"></svg>
-<script>
-test(function() {
- document.querySelector('#target').clientLeft;
-
- assert_true(internals.isUseCounted(document, SVGCursorElement));
- assert_true(internals.isUseCounted(document, SVGCursorElementHasClient));
-}, document.title + ', after style computed');
-</script>
diff --git a/third_party/WebKit/LayoutTests/svg/custom/global-constructors-expected.txt b/third_party/WebKit/LayoutTests/svg/custom/global-constructors-expected.txt
index e94c1d2..718f9a2 100644
--- a/third_party/WebKit/LayoutTests/svg/custom/global-constructors-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/custom/global-constructors-expected.txt
@@ -96,7 +96,7 @@
PASS SVGFESpecularLightingElement.toString() is 'function SVGFESpecularLightingElement() { [native code] }'
PASS SVGFETileElement.toString() is 'function SVGFETileElement() { [native code] }'
PASS SVGFETurbulenceElement.toString() is 'function SVGFETurbulenceElement() { [native code] }'
-PASS SVGCursorElement.toString() is 'function SVGCursorElement() { [native code] }'
+FAIL SVGCursorElement.toString() should be function SVGCursorElement() { [native code] }. Threw exception ReferenceError: SVGCursorElement is not defined
PASS SVGAElement.toString() is 'function SVGAElement() { [native code] }'
PASS SVGViewElement.toString() is 'function SVGViewElement() { [native code] }'
PASS SVGScriptElement.toString() is 'function SVGScriptElement() { [native code] }'
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash-expected.txt b/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash-expected.txt
index df505fc..b3a9740 100644
--- a/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash-expected.txt
@@ -1,4 +1,4 @@
-PASS cursorObservation.wasCollected is false
+PASS maskObservation.wasCollected is false
PASS successfullyParsed is true
TEST COMPLETE
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash.html b/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash.html
index a313a3d..b4083cb3 100644
--- a/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash.html
+++ b/third_party/WebKit/LayoutTests/svg/dom/SVGStaticListTearOff-contextElement-crash.html
@@ -5,16 +5,16 @@
if (window.testRunner)
testRunner.dumpAsText();
-var cursor = document.createElementNS("http://www.w3.org/2000/svg", "cursor");
-var cursorObservation = internals.observeGC(cursor);
-var staticList = cursor.requiredExtensions;
-cursor = null;
+var mask = document.createElementNS("http://www.w3.org/2000/svg", "mask");
+var maskObservation = internals.observeGC(mask);
+var staticList = mask.requiredExtensions;
+mask = null;
gc();
staticList.clear(); // This should not cause crash in ASAN.
-// cursor should be kept alive from "staticList"
-shouldBeFalse('cursorObservation.wasCollected');
+// mask should be kept alive from "staticList"
+shouldBeFalse('maskObservation.wasCollected');
</script>
This test passes if it doesn't crash in ASAN.
</body>
diff --git a/third_party/WebKit/LayoutTests/svg/dom/svg2-inheritance-expected.txt b/third_party/WebKit/LayoutTests/svg/dom/svg2-inheritance-expected.txt
index 2382b6d3..4ce700f 100644
--- a/third_party/WebKit/LayoutTests/svg/dom/svg2-inheritance-expected.txt
+++ b/third_party/WebKit/LayoutTests/svg/dom/svg2-inheritance-expected.txt
@@ -28,7 +28,7 @@
FAIL SVGClipPathElement should inherit SVGElement but got SVGGraphicsElement instead
FAIL SVGColorProfileElement is not defined
FAIL SVGColorProfileRule is not defined
-PASS SVGCursorElement inherits SVGElement
+FAIL SVGCursorElement is not defined
PASS SVGDefsElement inherits SVGGraphicsElement
PASS SVGDescElement inherits SVGElement
PASS SVGElement inherits Element
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.png
deleted file mode 100644
index 79d86d78..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.txt b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.txt
deleted file mode 100644
index e993281..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-SVG 1.1 dynamic update tests
-
-Tests dynamic updates of the 'x' attribute of the SVGCursorElement object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS cursorElement.getAttribute('x') is "100"
-PASS cursorElement.getAttribute('x') is "0"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr.html b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr.html
deleted file mode 100644
index aa6418d7..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-x-attr.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="resources/SVGTestCase.js"></script>
-<script src="../../resources/js-test.js"></script>
-<script src="../../paint/invalidation/resources/text-based-repaint.js"></script>
-</head>
-<body onload="runRepaintTest()">
-<h1>SVG 1.1 dynamic update tests</h1>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGCursorElement-dom-x-attr.js"></script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.png
deleted file mode 100644
index 79d86d78..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.txt b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.txt
deleted file mode 100644
index ef5dfaa..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-SVG 1.1 dynamic update tests
-
-Tests dynamic updates of the 'y' attribute of the SVGCursorElement object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS cursorElement.getAttribute('y') is "100"
-PASS cursorElement.getAttribute('y') is "0"
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr.html b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr.html
deleted file mode 100644
index 613d2e46..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-dom-y-attr.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="resources/SVGTestCase.js"></script>
-<script src="../../resources/js-test.js"></script>
-<script src="../../paint/invalidation/resources/text-based-repaint.js"></script>
-</head>
-<body onload="runRepaintTest()">
-<h1>SVG 1.1 dynamic update tests</h1>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGCursorElement-dom-y-attr.js"></script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.png
deleted file mode 100644
index 79d86d78..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.txt b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.txt
deleted file mode 100644
index 8917de1f..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-SVG 1.1 dynamic update tests
-
-Tests dynamic updates of the 'x' property of the SVGCursorElement object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS cursorElement.x.baseVal.value is 100
-PASS cursorElement.x.baseVal.value is 0
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop.html b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop.html
deleted file mode 100644
index 9822b54..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-x-prop.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="resources/SVGTestCase.js"></script>
-<script src="../../resources/js-test.js"></script>
-<script src="../../paint/invalidation/resources/text-based-repaint.js"></script>
-</head>
-<body onload="runRepaintTest()">
-<h1>SVG 1.1 dynamic update tests</h1>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGCursorElement-svgdom-x-prop.js"></script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.png b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.png
deleted file mode 100644
index 79d86d78..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.txt b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.txt
deleted file mode 100644
index 544171d..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-SVG 1.1 dynamic update tests
-
-Tests dynamic updates of the 'y' property of the SVGCursorElement object
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS cursorElement.y.baseVal.value is 100
-PASS cursorElement.y.baseVal.value is 0
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop.html b/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop.html
deleted file mode 100644
index 8071d0a..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/SVGCursorElement-svgdom-y-prop.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="resources/SVGTestCase.js"></script>
-<script src="../../resources/js-test.js"></script>
-<script src="../../paint/invalidation/resources/text-based-repaint.js"></script>
-</head>
-<body onload="runRepaintTest()">
-<h1>SVG 1.1 dynamic update tests</h1>
-<p id="description"></p>
-<div id="console"></div>
-<script src="script-tests/SVGCursorElement-svgdom-y-prop.js"></script>
-</body>
-</html>
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-x-attr.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-x-attr.js
deleted file mode 100644
index 81f99b9..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-x-attr.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// [Name] SVGCursorElement-dom-x-attr.js
-// [Expected rendering result] cursor image should hang from the upper-left corner of the cursor after clicking - and a series of PASS mesasges
-
-description("Tests dynamic updates of the 'x' attribute of the SVGCursorElement object")
-createSVGTestCase();
-
-var cursorElement = createSVGElement("cursor");
-cursorElement.setAttribute("id", "cursor");
-cursorElement.setAttribute("x", "100");
-cursorElement.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/sphere.png");
-rootSVGElement.appendChild(cursorElement);
-
-var rectElement = createSVGElement("rect");
-rectElement.setAttribute("cursor", "url(#cursor)");
-rectElement.setAttribute("width", "200");
-rectElement.setAttribute("height", "200");
-rectElement.setAttribute("fill", "green");
-rootSVGElement.appendChild(rectElement);
-
-shouldBeEqualToString("cursorElement.getAttribute('x')", "100");
-
-function repaintTest() {
- cursorElement.setAttribute("x", "0");
- shouldBeEqualToString("cursorElement.getAttribute('x')", "0");
-}
-
-var successfullyParsed = true;
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-y-attr.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-y-attr.js
deleted file mode 100644
index a91546f0..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-dom-y-attr.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// [Name] SVGCursorElement-dom-y-attr.js
-// [Expected rendering result] cursor image should hang from the upper-left corner of the cursor after clicking - and a series of PASS mesasges
-
-description("Tests dynamic updates of the 'y' attribute of the SVGCursorElement object")
-createSVGTestCase();
-
-var cursorElement = createSVGElement("cursor");
-cursorElement.setAttribute("id", "cursor");
-cursorElement.setAttribute("y", "100");
-cursorElement.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/sphere.png");
-rootSVGElement.appendChild(cursorElement);
-
-var rectElement = createSVGElement("rect");
-rectElement.setAttribute("cursor", "url(#cursor)");
-rectElement.setAttribute("width", "200");
-rectElement.setAttribute("height", "200");
-rectElement.setAttribute("fill", "green");
-rootSVGElement.appendChild(rectElement);
-
-shouldBeEqualToString("cursorElement.getAttribute('y')", "100");
-
-function repaintTest() {
- cursorElement.setAttribute("y", "0");
- shouldBeEqualToString("cursorElement.getAttribute('y')", "0");
-}
-
-var successfullyParsed = true;
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-x-prop.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-x-prop.js
deleted file mode 100644
index e375f4e..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-x-prop.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// [Name] SVGCursorElement-svgdom-x-prop.js
-// [Expected rendering result] cursor image should hang from the upper-left corner of the cursor after clicking - and a series of PASS mesasges
-
-description("Tests dynamic updates of the 'x' property of the SVGCursorElement object")
-createSVGTestCase();
-
-var cursorElement = createSVGElement("cursor");
-cursorElement.setAttribute("id", "cursor");
-cursorElement.setAttribute("x", "100");
-cursorElement.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/sphere.png");
-rootSVGElement.appendChild(cursorElement);
-
-var rectElement = createSVGElement("rect");
-rectElement.setAttribute("cursor", "url(#cursor)");
-rectElement.setAttribute("width", "200");
-rectElement.setAttribute("height", "200");
-rectElement.setAttribute("fill", "green");
-rootSVGElement.appendChild(rectElement);
-
-shouldBe("cursorElement.x.baseVal.value", "100");
-
-function repaintTest() {
- cursorElement.x.baseVal.value = 0;
- shouldBe("cursorElement.x.baseVal.value", "0");
-}
-
-var successfullyParsed = true;
diff --git a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-y-prop.js b/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-y-prop.js
deleted file mode 100644
index 7d1c69d0..0000000
--- a/third_party/WebKit/LayoutTests/svg/dynamic-updates/script-tests/SVGCursorElement-svgdom-y-prop.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// [Name] SVGCursorElement-svgdom-y-prop.js
-// [Expected rendering result] cursor image should hang from the upper-left corner of the cursor after clicking - and a series of PASS mesasges
-
-description("Tests dynamic updates of the 'y' property of the SVGCursorElement object")
-createSVGTestCase();
-
-var cursorElement = createSVGElement("cursor");
-cursorElement.setAttribute("id", "cursor");
-cursorElement.setAttribute("y", "100");
-cursorElement.setAttributeNS(xlinkNS, "xlink:href", "../W3C-SVG-1.1/resources/sphere.png");
-rootSVGElement.appendChild(cursorElement);
-
-var rectElement = createSVGElement("rect");
-rectElement.setAttribute("cursor", "url(#cursor)");
-rectElement.setAttribute("width", "200");
-rectElement.setAttribute("height", "200");
-rectElement.setAttribute("fill", "green");
-rootSVGElement.appendChild(rectElement);
-
-shouldBe("cursorElement.y.baseVal.value", "100");
-
-function repaintTest() {
- cursorElement.y.baseVal.value = 0;
- shouldBe("cursorElement.y.baseVal.value", "0");
-}
-
-var successfullyParsed = true;
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
index 76616a43..c7cd06c 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
@@ -1351,7 +1351,6 @@
svg element animateTransform
svg element circle
svg element clipPath
-svg element cursor
svg element defs
svg element desc
svg element discard
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
index 43d84673..ca9ee76 100644
--- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -4337,15 +4337,6 @@
getter tableValues
getter type
method constructor
-interface SVGCursorElement : SVGElement
- attribute @@toStringTag
- getter href
- getter requiredExtensions
- getter requiredFeatures
- getter systemLanguage
- getter x
- getter y
- method constructor
interface SVGDefsElement : SVGGraphicsElement
attribute @@toStringTag
method constructor
diff --git a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
index 97890cca1..9b209bf 100644
--- a/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
@@ -1393,7 +1393,6 @@
svg element animateTransform
svg element circle
svg element clipPath
-svg element cursor
svg element defs
svg element desc
svg element discard
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index 3168ad20..eb338bd 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -5205,15 +5205,6 @@
getter tableValues
getter type
method constructor
-interface SVGCursorElement : SVGElement
- attribute @@toStringTag
- getter href
- getter requiredExtensions
- getter requiredFeatures
- getter systemLanguage
- getter x
- getter y
- method constructor
interface SVGDefsElement : SVGGraphicsElement
attribute @@toStringTag
method constructor
diff --git a/third_party/WebKit/Source/core/core_idl_files.gni b/third_party/WebKit/Source/core/core_idl_files.gni
index af41934..1586bdd 100644
--- a/third_party/WebKit/Source/core/core_idl_files.gni
+++ b/third_party/WebKit/Source/core/core_idl_files.gni
@@ -313,7 +313,6 @@
"svg/SVGCircleElement.idl",
"svg/SVGClipPathElement.idl",
"svg/SVGComponentTransferFunctionElement.idl",
- "svg/SVGCursorElement.idl",
"svg/SVGDefsElement.idl",
"svg/SVGDescElement.idl",
"svg/SVGDiscardElement.idl",
diff --git a/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp b/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
index 307fc97..9309d823 100644
--- a/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSCursorImageValue.cpp
@@ -21,37 +21,20 @@
#include "core/css/CSSCursorImageValue.h"
-#include "core/SVGNames.h"
-#include "core/css/CSSImageSetValue.h"
-#include "core/fetch/ImageResourceContent.h"
-#include "core/style/StyleFetchedImage.h"
-#include "core/style/StyleFetchedImageSet.h"
-#include "core/style/StyleImage.h"
-#include "core/svg/SVGCursorElement.h"
-#include "core/svg/SVGLengthContext.h"
-#include "core/svg/SVGURIReference.h"
-#include "wtf/MathExtras.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
namespace blink {
-static inline SVGCursorElement* resourceReferencedByCursorElement(
- const String& url,
- const TreeScope& treeScope) {
- Element* element =
- SVGURIReference::targetElementFromIRIString(url, treeScope);
- return isSVGCursorElement(element) ? toSVGCursorElement(element) : nullptr;
-}
-
-CSSCursorImageValue::CSSCursorImageValue(CSSValue* imageValue,
+CSSCursorImageValue::CSSCursorImageValue(const CSSValue& imageValue,
bool hotSpotSpecified,
const IntPoint& hotSpot)
: CSSValue(CursorImageClass),
- m_imageValue(imageValue),
- m_hotSpotSpecified(hotSpotSpecified),
+ m_imageValue(&imageValue),
m_hotSpot(hotSpot),
- m_isCachePending(true) {}
+ m_hotSpotSpecified(hotSpotSpecified) {
+ DCHECK(imageValue.isImageValue() || imageValue.isImageSetValue());
+}
CSSCursorImageValue::~CSSCursorImageValue() {}
@@ -67,91 +50,6 @@
return result.toString();
}
-SVGCursorElement* CSSCursorImageValue::getSVGCursorElement(
- Element* element) const {
- if (!element || !element->isSVGElement())
- return nullptr;
-
- if (!hasFragmentInURL())
- return nullptr;
-
- String url = toCSSImageValue(m_imageValue.get())->url();
- return resourceReferencedByCursorElement(url, element->treeScope());
-}
-
-bool CSSCursorImageValue::isCachePending(float deviceScaleFactor) const {
- // Need to delegate completely so that changes in device scale factor can be
- // handled appropriately.
- if (m_imageValue->isImageSetValue())
- return toCSSImageSetValue(*m_imageValue).isCachePending(deviceScaleFactor);
- return m_isCachePending;
-}
-
-StyleImage* CSSCursorImageValue::cachedImage(float deviceScaleFactor) const {
- ASSERT(!isCachePending(deviceScaleFactor));
-
- if (m_imageValue->isImageSetValue())
- return toCSSImageSetValue(*m_imageValue).cachedImage(deviceScaleFactor);
- return m_cachedImage.get();
-}
-
-StyleImage* CSSCursorImageValue::cacheImage(const Document& document,
- float deviceScaleFactor) {
- if (m_imageValue->isImageSetValue())
- return toCSSImageSetValue(*m_imageValue)
- .cacheImage(document, deviceScaleFactor);
-
- if (m_isCachePending) {
- m_isCachePending = false;
-
- // For SVG images we need to lazily substitute in the correct URL. Rather
- // than attempt to change the URL of the CSSImageValue (which would then
- // change behavior like cssText), we create an alternate CSSImageValue to
- // use.
- if (hasFragmentInURL()) {
- CSSImageValue* imageValue = toCSSImageValue(m_imageValue.get());
- // FIXME: This will fail if the <cursor> element is in a shadow DOM
- // (http://crbug/59827)
- if (SVGCursorElement* cursorElement =
- resourceReferencedByCursorElement(imageValue->url(), document)) {
- CSSImageValue* svgImageValue =
- CSSImageValue::create(document.completeURL(
- cursorElement->href()->currentValue()->value()));
- svgImageValue->setReferrer(imageValue->referrer());
- m_cachedImage = svgImageValue->cacheImage(document);
- return m_cachedImage.get();
- }
- }
-
- if (m_imageValue->isImageValue())
- m_cachedImage = toCSSImageValue(*m_imageValue).cacheImage(document);
- }
-
- if (m_cachedImage && m_cachedImage->isImageResource())
- return toStyleFetchedImage(m_cachedImage);
- return nullptr;
-}
-
-bool CSSCursorImageValue::hasFragmentInURL() const {
- if (m_imageValue->isImageValue()) {
- CSSImageValue* imageValue = toCSSImageValue(m_imageValue.get());
- KURL kurl(ParsedURLString, imageValue->url());
- return kurl.hasFragmentIdentifier();
- }
- return false;
-}
-
-String CSSCursorImageValue::cachedImageURL() const {
- if (!m_cachedImage || !m_cachedImage->isImageResource())
- return String();
- return toStyleFetchedImage(m_cachedImage)->cachedImage()->url().getString();
-}
-
-void CSSCursorImageValue::clearImageResource() const {
- m_cachedImage = nullptr;
- m_isCachePending = true;
-}
-
bool CSSCursorImageValue::equals(const CSSCursorImageValue& other) const {
return (m_hotSpotSpecified
? other.m_hotSpotSpecified && m_hotSpot == other.m_hotSpot
@@ -161,7 +59,6 @@
DEFINE_TRACE_AFTER_DISPATCH(CSSCursorImageValue) {
visitor->trace(m_imageValue);
- visitor->trace(m_cachedImage);
CSSValue::traceAfterDispatch(visitor);
}
diff --git a/third_party/WebKit/Source/core/css/CSSCursorImageValue.h b/third_party/WebKit/Source/core/css/CSSCursorImageValue.h
index 733b7fa..644c712 100644
--- a/third_party/WebKit/Source/core/css/CSSCursorImageValue.h
+++ b/third_party/WebKit/Source/core/css/CSSCursorImageValue.h
@@ -21,18 +21,14 @@
#ifndef CSSCursorImageValue_h
#define CSSCursorImageValue_h
-#include "core/css/CSSImageValue.h"
-#include "core/svg/SVGCursorElement.h"
+#include "core/css/CSSValue.h"
#include "platform/geometry/IntPoint.h"
-#include "wtf/HashSet.h"
namespace blink {
-class Element;
-
class CSSCursorImageValue : public CSSValue {
public:
- static const CSSCursorImageValue* create(CSSValue* imageValue,
+ static const CSSCursorImageValue* create(const CSSValue& imageValue,
bool hotSpotSpecified,
const IntPoint& hotSpot) {
return new CSSCursorImageValue(imageValue, hotSpotSpecified, hotSpot);
@@ -41,36 +37,23 @@
~CSSCursorImageValue();
bool hotSpotSpecified() const { return m_hotSpotSpecified; }
-
- IntPoint hotSpot() const { return m_hotSpot; }
+ const IntPoint& hotSpot() const { return m_hotSpot; }
+ const CSSValue& imageValue() const { return *m_imageValue; }
String customCSSText() const;
- SVGCursorElement* getSVGCursorElement(Element*) const;
-
- void clearImageResource() const;
- bool isCachePending(float deviceScaleFactor) const;
- String cachedImageURL() const;
- StyleImage* cachedImage(float deviceScaleFactor) const;
- StyleImage* cacheImage(const Document&, float deviceScaleFactor);
-
bool equals(const CSSCursorImageValue&) const;
DECLARE_TRACE_AFTER_DISPATCH();
private:
- CSSCursorImageValue(CSSValue* imageValue,
+ CSSCursorImageValue(const CSSValue& imageValue,
bool hotSpotSpecified,
const IntPoint& hotSpot);
- bool hasFragmentInURL() const;
-
- Member<CSSValue> m_imageValue;
-
- bool m_hotSpotSpecified;
+ Member<const CSSValue> m_imageValue;
IntPoint m_hotSpot;
- mutable bool m_isCachePending;
- mutable Member<StyleImage> m_cachedImage;
+ bool m_hotSpotSpecified;
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSCursorImageValue, isCursorImageValue());
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index acfd9126..a3178b6 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -2274,11 +2274,12 @@
CursorList* cursors = style.cursors();
if (cursors && cursors->size() > 0) {
list = CSSValueList::createCommaSeparated();
- for (unsigned i = 0; i < cursors->size(); ++i) {
- if (StyleImage* image = cursors->at(i).image())
+ for (const CursorData& cursor : *cursors) {
+ if (StyleImage* image = cursor.image()) {
list->append(*CSSCursorImageValue::create(
- image->computedCSSValue(), cursors->at(i).hotSpotSpecified(),
- cursors->at(i).hotSpot()));
+ *image->computedCSSValue(), cursor.hotSpotSpecified(),
+ cursor.hotSpot()));
+ }
}
}
CSSValue* value = CSSIdentifierValue::create(style.cursor());
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 3987a7b..ecd70087d 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2119,7 +2119,7 @@
list = CSSValueList::createCommaSeparated();
list->append(
- *CSSCursorImageValue::create(image, hotSpotSpecified, hotSpot));
+ *CSSCursorImageValue::create(*image, hotSpotSpecified, hotSpot));
if (!consumeCommaIncludingWhitespace(range))
return nullptr;
}
diff --git a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
index c3da6271..23984df 100644
--- a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
@@ -24,7 +24,6 @@
#include "core/css/resolver/ElementStyleResources.h"
#include "core/CSSPropertyNames.h"
-#include "core/css/CSSCursorImageValue.h"
#include "core/css/CSSGradientValue.h"
#include "core/css/CSSImageValue.h"
#include "core/css/CSSURIValue.h"
@@ -61,9 +60,6 @@
if (value.isImageSetValue())
return setOrPendingFromValue(property, toCSSImageSetValue(value));
- if (value.isCursorImageValue())
- return cursorOrPendingFromValue(property, toCSSCursorImageValue(value));
-
return nullptr;
}
@@ -98,16 +94,6 @@
return value.cachedImage();
}
-StyleImage* ElementStyleResources::cursorOrPendingFromValue(
- CSSPropertyID property,
- const CSSCursorImageValue& value) {
- if (value.isCachePending(m_deviceScaleFactor)) {
- m_pendingImageProperties.add(property);
- return StylePendingImage::create(value);
- }
- return value.cachedImage(m_deviceScaleFactor);
-}
-
SVGElementProxy& ElementStyleResources::cachedOrPendingFromValue(
const CSSURIValue& value) {
return value.ensureElementProxy(*m_document);
@@ -147,10 +133,6 @@
return StyleGeneratedImage::create(*imageGeneratorValue);
}
- if (CSSCursorImageValue* cursorImageValue =
- pendingImage->cssCursorImageValue())
- return cursorImageValue->cacheImage(*m_document, m_deviceScaleFactor);
-
if (CSSImageSetValue* imageSetValue = pendingImage->cssImageSetValue())
return imageSetValue->cacheImage(*m_document, m_deviceScaleFactor,
crossOrigin);
diff --git a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h
index 2d7dc04..9ecb31e 100644
--- a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h
+++ b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.h
@@ -34,7 +34,6 @@
namespace blink {
-class CSSCursorImageValue;
class CSSImageGeneratorValue;
class CSSImageSetValue;
class CSSImageValue;
@@ -63,8 +62,6 @@
void loadPendingResources(ComputedStyle*);
private:
- StyleImage* cursorOrPendingFromValue(CSSPropertyID,
- const CSSCursorImageValue&);
StyleImage* generatedOrPendingFromValue(CSSPropertyID,
const CSSImageGeneratorValue&);
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index 27531b22..a456f834 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -213,51 +213,16 @@
const CSSValue& value) {
state.style()->clearCursorList();
if (value.isValueList()) {
- const CSSValueList& list = toCSSValueList(value);
- int len = list.length();
state.style()->setCursor(ECursor::Auto);
- for (int i = 0; i < len; i++) {
- const CSSValue& item = list.item(i);
- if (item.isCursorImageValue()) {
- const CSSCursorImageValue& image = toCSSCursorImageValue(item);
- IntPoint hotSpot = image.hotSpot();
- bool hotSpotSpecified = image.hotSpotSpecified();
-
- Element* element = state.element();
- if (SVGCursorElement* cursorElement =
- image.getSVGCursorElement(element)) {
- if (image.cachedImageURL() !=
- element->document().completeURL(
- cursorElement->href()->currentValue()->value()))
- image.clearImageResource();
-
- // Set the hot spot if it wasn't specified in the CSS but is specified
- // in the SVG.
- if (!hotSpotSpecified) {
- hotSpotSpecified = true;
- SVGLengthContext lengthContext(0);
- // x() and y() return 0 if they're not specified in cursorElement.
- float svgX = roundf(
- cursorElement->x()->currentValue()->value(lengthContext));
- hotSpot.setX(static_cast<int>(svgX));
- float svgY = roundf(
- cursorElement->y()->currentValue()->value(lengthContext));
- hotSpot.setY(static_cast<int>(svgY));
- }
-
- SVGElement* svgElement = toSVGElement(element);
- svgElement->setCursorImageValue(&image);
- cursorElement->addClient(svgElement);
-
- // Elements with SVG cursors are not allowed to share style.
- state.style()->setUnique();
- }
-
+ for (const auto& item : toCSSValueList(value)) {
+ if (item->isCursorImageValue()) {
+ const CSSCursorImageValue& cursor = toCSSCursorImageValue(*item);
+ const CSSValue& image = cursor.imageValue();
state.style()->addCursor(state.styleImage(CSSPropertyCursor, image),
- hotSpotSpecified, hotSpot);
+ cursor.hotSpotSpecified(), cursor.hotSpot());
} else {
state.style()->setCursor(
- toCSSIdentifierValue(item).convertTo<ECursor>());
+ toCSSIdentifierValue(*item).convertTo<ECursor>());
}
}
} else {
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h
index ae0a4947..f6b6b45 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -870,7 +870,6 @@
V8SVGAElement_Target_AttributeGetter = 1109,
V8SVGClipPathElement_ClipPathUnits_AttributeGetter = 1110,
SVG1DOMFitToViewBox = 1111,
- SVG1DOMCursorElement = 1112,
SVG1DOMSVGElement = 1114,
SVG1DOMImageElement = 1115,
SVG1DOMForeignObjectElement = 1116,
@@ -1274,8 +1273,6 @@
XSSAuditorEnabledFilter = 1584,
XSSAuditorEnabledBlock = 1585,
XSSAuditorInvalid = 1586,
- SVGCursorElement = 1587,
- SVGCursorElementHasClient = 1588,
TextInputEventOnInput = 1589,
TextInputEventOnTextArea = 1590,
TextInputEventOnContentEditable = 1591,
diff --git a/third_party/WebKit/Source/core/style/StylePendingImage.h b/third_party/WebKit/Source/core/style/StylePendingImage.h
index 9ec388cf..3aa27ba 100644
--- a/third_party/WebKit/Source/core/style/StylePendingImage.h
+++ b/third_party/WebKit/Source/core/style/StylePendingImage.h
@@ -26,7 +26,6 @@
#ifndef StylePendingImage_h
#define StylePendingImage_h
-#include "core/css/CSSCursorImageValue.h"
#include "core/css/CSSImageGeneratorValue.h"
#include "core/css/CSSImageSetValue.h"
#include "core/css/CSSImageValue.h"
@@ -67,10 +66,6 @@
? toCSSImageGeneratorValue(m_value.get())
: 0;
}
- CSSCursorImageValue* cssCursorImageValue() const {
- return m_value->isCursorImageValue() ? toCSSCursorImageValue(m_value.get())
- : 0;
- }
CSSImageSetValue* cssImageSetValue() const {
return m_value->isImageSetValue() ? toCSSImageSetValue(m_value.get()) : 0;
}
diff --git a/third_party/WebKit/Source/core/svg/BUILD.gn b/third_party/WebKit/Source/core/svg/BUILD.gn
index e8a03ae..8cebdb2 100644
--- a/third_party/WebKit/Source/core/svg/BUILD.gn
+++ b/third_party/WebKit/Source/core/svg/BUILD.gn
@@ -55,8 +55,6 @@
"SVGClipPathElement.h",
"SVGComponentTransferFunctionElement.cpp",
"SVGComponentTransferFunctionElement.h",
- "SVGCursorElement.cpp",
- "SVGCursorElement.h",
"SVGDefsElement.cpp",
"SVGDefsElement.h",
"SVGDescElement.cpp",
diff --git a/third_party/WebKit/Source/core/svg/SVGCursorElement.cpp b/third_party/WebKit/Source/core/svg/SVGCursorElement.cpp
deleted file mode 100644
index 3dbfc7b..0000000
--- a/third_party/WebKit/Source/core/svg/SVGCursorElement.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "core/svg/SVGCursorElement.h"
-
-#include "core/SVGNames.h"
-#include "core/dom/StyleChangeReason.h"
-#include "core/frame/UseCounter.h"
-
-namespace blink {
-
-inline SVGCursorElement::SVGCursorElement(Document& document)
- : SVGElement(SVGNames::cursorTag, document),
- SVGTests(this),
- SVGURIReference(this),
- m_x(SVGAnimatedLength::create(this,
- SVGNames::xAttr,
- SVGLength::create(SVGLengthMode::Width))),
- m_y(SVGAnimatedLength::create(this,
- SVGNames::yAttr,
- SVGLength::create(SVGLengthMode::Height))) {
- addToPropertyMap(m_x);
- addToPropertyMap(m_y);
-
- UseCounter::count(document, UseCounter::SVGCursorElement);
-}
-
-DEFINE_NODE_FACTORY(SVGCursorElement)
-
-SVGCursorElement::~SVGCursorElement() {}
-
-void SVGCursorElement::addClient(SVGElement* element) {
- UseCounter::count(document(), UseCounter::SVGCursorElementHasClient);
-
- m_clients.add(element);
- element->setCursorElement(this);
-}
-
-void SVGCursorElement::removeReferencedElement(SVGElement* element) {
- m_clients.remove(element);
-}
-
-void SVGCursorElement::svgAttributeChanged(const QualifiedName& attrName) {
- if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr ||
- SVGTests::isKnownAttribute(attrName) ||
- SVGURIReference::isKnownAttribute(attrName)) {
- SVGElement::InvalidationGuard invalidationGuard(this);
-
- // Any change of a cursor specific attribute triggers this recalc.
- for (const auto& client : m_clients)
- client->setNeedsStyleRecalc(
- LocalStyleChange,
- StyleChangeReasonForTracing::create(StyleChangeReason::SVGCursor));
-
- return;
- }
-
- SVGElement::svgAttributeChanged(attrName);
-}
-
-DEFINE_TRACE(SVGCursorElement) {
- visitor->trace(m_x);
- visitor->trace(m_y);
- visitor->trace(m_clients);
- SVGElement::trace(visitor);
- SVGTests::trace(visitor);
- SVGURIReference::trace(visitor);
-}
-
-} // namespace blink
diff --git a/third_party/WebKit/Source/core/svg/SVGCursorElement.h b/third_party/WebKit/Source/core/svg/SVGCursorElement.h
deleted file mode 100644
index 1074f51..0000000
--- a/third_party/WebKit/Source/core/svg/SVGCursorElement.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef SVGCursorElement_h
-#define SVGCursorElement_h
-
-#include "core/SVGNames.h"
-#include "core/svg/SVGAnimatedLength.h"
-#include "core/svg/SVGElement.h"
-#include "core/svg/SVGTests.h"
-#include "core/svg/SVGURIReference.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-class SVGCursorElement final : public SVGElement,
- public SVGTests,
- public SVGURIReference {
- DEFINE_WRAPPERTYPEINFO();
- USING_GARBAGE_COLLECTED_MIXIN(SVGCursorElement);
-
- public:
- DECLARE_NODE_FACTORY(SVGCursorElement);
-
- ~SVGCursorElement() override;
-
- void addClient(SVGElement*);
- void removeReferencedElement(SVGElement*);
-
- SVGAnimatedLength* x() const { return m_x.get(); }
- SVGAnimatedLength* y() const { return m_y.get(); }
-
- DECLARE_VIRTUAL_TRACE();
-
- private:
- explicit SVGCursorElement(Document&);
-
- bool isValid() const override { return SVGTests::isValid(); }
-
- void svgAttributeChanged(const QualifiedName&) override;
-
- bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; }
-
- Member<SVGAnimatedLength> m_x;
- Member<SVGAnimatedLength> m_y;
-
- HeapHashSet<WeakMember<SVGElement>> m_clients;
-};
-
-} // namespace blink
-
-#endif // SVGCursorElement_h
diff --git a/third_party/WebKit/Source/core/svg/SVGCursorElement.idl b/third_party/WebKit/Source/core/svg/SVGCursorElement.idl
deleted file mode 100644
index c8dee77a..0000000
--- a/third_party/WebKit/Source/core/svg/SVGCursorElement.idl
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2006 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGCursorElement
-
-interface SVGCursorElement : SVGElement {
- [MeasureAs=SVG1DOMCursorElement] readonly attribute SVGAnimatedLength x;
- [MeasureAs=SVG1DOMCursorElement] readonly attribute SVGAnimatedLength y;
-};
-
-SVGCursorElement implements SVGURIReference;
-
-// TODO(foolip): The following was part of SVG 1.1:
-// http://www.w3.org/TR/SVG11/interact.html#InterfaceSVGCursorElement
-SVGCursorElement implements SVGTests;
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index 967313ce..5f55e3f 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -34,7 +34,6 @@
#include "core/animation/InterpolationEnvironment.h"
#include "core/animation/InvalidatableInterpolation.h"
#include "core/animation/SVGInterpolationTypesMap.h"
-#include "core/css/CSSCursorImageValue.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Document.h"
#include "core/dom/ElementTraversal.h"
@@ -44,7 +43,6 @@
#include "core/html/HTMLElement.h"
#include "core/layout/LayoutObject.h"
#include "core/layout/svg/LayoutSVGResourceContainer.h"
-#include "core/svg/SVGCursorElement.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGElementRareData.h"
#include "core/svg/SVGGraphicsElement.h"
@@ -640,21 +638,6 @@
return svgRareData()->elementInstances();
}
-void SVGElement::setCursorElement(SVGCursorElement* cursorElement) {
- SVGElementRareData* rareData = ensureSVGRareData();
- if (SVGCursorElement* oldCursorElement = rareData->cursorElement()) {
- if (cursorElement == oldCursorElement)
- return;
- oldCursorElement->removeReferencedElement(this);
- }
- rareData->setCursorElement(cursorElement);
-}
-
-void SVGElement::setCursorImageValue(
- const CSSCursorImageValue* cursorImageValue) {
- ensureSVGRareData()->setCursorImageValue(cursorImageValue);
-}
-
SVGElement* SVGElement::correspondingElement() const {
ASSERT(!hasSVGRareData() || !svgRareData()->correspondingElement() ||
containingShadowRoot());
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.h b/third_party/WebKit/Source/core/svg/SVGElement.h
index f3a40118..abba52e 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGElement.h
@@ -34,12 +34,10 @@
namespace blink {
class AffineTransform;
-class CSSCursorImageValue;
class Document;
class SVGAnimatedPropertyBase;
class SubtreeLayoutScope;
class SVGAnimatedString;
-class SVGCursorElement;
class SVGElement;
class SVGElementProxySet;
class SVGElementRareData;
@@ -139,9 +137,6 @@
void mapInstanceToElement(SVGElement*);
void removeInstanceMapping(SVGElement*);
- void setCursorElement(SVGCursorElement*);
- void setCursorImageValue(const CSSCursorImageValue*);
-
SVGElement* correspondingElement() const;
void setCorrespondingElement(SVGElement*);
SVGUseElement* correspondingUseElement() const;
diff --git a/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp b/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
index 5f14b80..0b06a72 100644
--- a/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElementRareData.cpp
@@ -4,10 +4,8 @@
#include "core/svg/SVGElementRareData.h"
-#include "core/css/CSSCursorImageValue.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/dom/Document.h"
-#include "core/svg/SVGCursorElement.h"
#include "core/svg/SVGElementProxy.h"
namespace blink {
@@ -48,27 +46,6 @@
visitor->trace(m_elementInstances);
visitor->trace(m_correspondingElement);
visitor->trace(m_owner);
- visitor->template registerWeakMembers<
- SVGElementRareData, &SVGElementRareData::processWeakMembers>(this);
-}
-
-void SVGElementRareData::processWeakMembers(Visitor* visitor) {
- ASSERT(m_owner);
- if (!ThreadHeap::isHeapObjectAlive(m_cursorElement))
- m_cursorElement = nullptr;
-
- if (!ThreadHeap::isHeapObjectAlive(m_cursorImageValue)) {
- // The owning SVGElement is still alive and if it is pointing to an
- // SVGCursorElement we unregister it when the CSSCursorImageValue dies.
- if (m_cursorElement) {
- m_cursorElement->removeReferencedElement(m_owner);
- m_cursorElement = nullptr;
- }
- m_cursorImageValue = nullptr;
- }
- ASSERT(!m_cursorElement || ThreadHeap::isHeapObjectAlive(m_cursorElement));
- ASSERT(!m_cursorImageValue ||
- ThreadHeap::isHeapObjectAlive(m_cursorImageValue));
}
AffineTransform* SVGElementRareData::animateMotionTransform() {
diff --git a/third_party/WebKit/Source/core/svg/SVGElementRareData.h b/third_party/WebKit/Source/core/svg/SVGElementRareData.h
index 7aaaabf..3d99ba4 100644
--- a/third_party/WebKit/Source/core/svg/SVGElementRareData.h
+++ b/third_party/WebKit/Source/core/svg/SVGElementRareData.h
@@ -26,12 +26,9 @@
#include "platform/transforms/AffineTransform.h"
#include "wtf/HashSet.h"
#include "wtf/Noncopyable.h"
-#include "wtf/StdLibExtras.h"
namespace blink {
-class CSSCursorImageValue;
-class SVGCursorElement;
class SVGElementProxySet;
class SVGElementRareData
@@ -41,8 +38,6 @@
public:
SVGElementRareData(SVGElement* owner)
: m_owner(owner),
- m_cursorElement(nullptr),
- m_cursorImageValue(nullptr),
m_correspondingElement(nullptr),
m_instancesUpdatesBlocked(false),
m_useOverrideComputedStyle(false),
@@ -72,11 +67,6 @@
m_instancesUpdatesBlocked = value;
}
- SVGCursorElement* cursorElement() const { return m_cursorElement; }
- void setCursorElement(SVGCursorElement* cursorElement) {
- m_cursorElement = cursorElement;
- }
-
SVGElement* correspondingElement() const {
return m_correspondingElement.get();
}
@@ -84,13 +74,6 @@
m_correspondingElement = correspondingElement;
}
- const CSSCursorImageValue* cursorImageValue() const {
- return m_cursorImageValue;
- }
- void setCursorImageValue(const CSSCursorImageValue* cursorImageValue) {
- m_cursorImageValue = cursorImageValue;
- }
-
void setWebAnimatedAttributesDirty(bool dirty) {
m_webAnimatedAttributesDirty = dirty;
}
@@ -120,15 +103,12 @@
AffineTransform* animateMotionTransform();
DECLARE_TRACE();
- void processWeakMembers(Visitor*);
private:
Member<SVGElement> m_owner;
SVGElementSet m_outgoingReferences;
SVGElementSet m_incomingReferences;
HeapHashSet<WeakMember<SVGElement>> m_elementInstances;
- WeakMember<SVGCursorElement> m_cursorElement;
- WeakMember<const CSSCursorImageValue> m_cursorImageValue;
Member<SVGElementProxySet> m_elementProxySet;
Member<SVGElement> m_correspondingElement;
bool m_instancesUpdatesBlocked : 1;
diff --git a/third_party/WebKit/Source/core/svg/SVGTagNames.in b/third_party/WebKit/Source/core/svg/SVGTagNames.in
index fc6afba5..23f5ad8 100644
--- a/third_party/WebKit/Source/core/svg/SVGTagNames.in
+++ b/third_party/WebKit/Source/core/svg/SVGTagNames.in
@@ -12,7 +12,6 @@
set runtimeEnabled=smil
circle
clipPath
-cursor
defs
desc
discard runtimeEnabled=smil