Title: [242870] releases/WebKitGTK/webkit-2.24
- Revision
- 242870
- Author
- [email protected]
- Date
- 2019-03-13 02:25:15 -0700 (Wed, 13 Mar 2019)
Log Message
Merge r242515 - SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
https://bugs.webkit.org/show_bug.cgi?id=195333
<rdar://problem/48475802>
Reviewed by Simon Fraser.
Source/WebCore:
Because the SVG1.1 specs states that the newItem should be removed from
its original list before adding it to another list,
SVGPathSegList.insertItemBefore() should fail if the new item belongs to
an animating animPathSegList since it is read-only.
Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg
* svg/SVGPathSegList.cpp:
(WebCore::SVGPathSegList::processIncomingListItemValue):
LayoutTests:
* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
* svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (242869 => 242870)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-03-13 09:25:10 UTC (rev 242869)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-03-13 09:25:15 UTC (rev 242870)
@@ -1,3 +1,14 @@
+2019-03-05 Said Abou-Hallawa <[email protected]>
+
+ SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
+ https://bugs.webkit.org/show_bug.cgi?id=195333
+ <rdar://problem/48475802>
+
+ Reviewed by Simon Fraser.
+
+ * svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
+ * svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.
+
2019-03-06 Wenson Hsieh <[email protected]>
Crash when attempting to change input type while dismissing datalist suggestions
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt (0 => 242870)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt 2019-03-13 09:25:15 UTC (rev 242870)
@@ -0,0 +1 @@
+PASS: did not assert in debug.
Added: releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg (0 => 242870)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg (rev 0)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg 2019-03-13 09:25:15 UTC (rev 242870)
@@ -0,0 +1,29 @@
+<svg id="svg" xmlns="http://www.w3.org/2000/svg">
+ <path id="path1"></path>
+ <path id="path2" d="M 1 1 S 2,2 3,3">
+ <animate id="animate" attributeName="d" values="M 1 1" min="1s" max="2s"/>
+ </path>
+ <text>PASS: did not assert in debug.</text>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ var animate = document.getElementById("animate");
+ animate.addEventListener('beginEvent' , function () {
+ var path1 = document.getElementById("path1");
+ var path2 = document.getElementById("path2");
+
+ var path1_pathSegList = path1.pathSegList;
+ var path2_animPathSegList = path2.animatedPathSegList;
+
+ document.documentElement.setCurrentTime(1);
+
+ var pathseg = path2_animPathSegList.getItem(0);
+ path1_pathSegList.insertItemBefore(pathseg, 0);
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, { once: true});
+ </script>
+</svg>
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (242869 => 242870)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-03-13 09:25:10 UTC (rev 242869)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog 2019-03-13 09:25:15 UTC (rev 242870)
@@ -1,3 +1,21 @@
+2019-03-05 Said Abou-Hallawa <[email protected]>
+
+ SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
+ https://bugs.webkit.org/show_bug.cgi?id=195333
+ <rdar://problem/48475802>
+
+ Reviewed by Simon Fraser.
+
+ Because the SVG1.1 specs states that the newItem should be removed from
+ its original list before adding it to another list,
+ SVGPathSegList.insertItemBefore() should fail if the new item belongs to
+ an animating animPathSegList since it is read-only.
+
+ Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg
+
+ * svg/SVGPathSegList.cpp:
+ (WebCore::SVGPathSegList::processIncomingListItemValue):
+
2019-03-08 Miguel Gomez <[email protected]>
Use a thread safe refcounter for FilterOperation.
Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/svg/SVGPathSegList.cpp (242869 => 242870)
--- releases/WebKitGTK/webkit-2.24/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-13 09:25:10 UTC (rev 242869)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-13 09:25:15 UTC (rev 242870)
@@ -85,8 +85,15 @@
bool livesInOtherList = animatedPropertyOfItem != m_animatedProperty;
RefPtr<SVGAnimatedPathSegListPropertyTearOff> propertyTearOff = static_pointer_cast<SVGAnimatedPathSegListPropertyTearOff>(animatedPropertyOfItem);
int indexToRemove = propertyTearOff->findItem(newItem.get());
- ASSERT(indexToRemove != -1);
+ // If newItem does not exist in the propertyTearOff baseVal() list, it has to be
+ // in its animVal() list and it has to be animating.
+ if (indexToRemove == -1) {
+ ASSERT(propertyTearOff->isAnimating());
+ ASSERT(propertyTearOff->animVal()->findItem(newItem.get()) != -1);
+ return false;
+ }
+
// Do not remove newItem if already in this list at the target index.
if (!livesInOtherList && indexToModify && static_cast<unsigned>(indexToRemove) == *indexToModify)
return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes