Title: [242856] branches/safari-607-branch
- Revision
- 242856
- Author
- [email protected]
- Date
- 2019-03-13 01:24:34 -0700 (Wed, 13 Mar 2019)
Log Message
Cherry-pick r242515. rdar://problem/48839275
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-607-branch/LayoutTests/ChangeLog (242855 => 242856)
--- branches/safari-607-branch/LayoutTests/ChangeLog 2019-03-13 08:24:31 UTC (rev 242855)
+++ branches/safari-607-branch/LayoutTests/ChangeLog 2019-03-13 08:24:34 UTC (rev 242856)
@@ -1,5 +1,46 @@
2019-03-13 Babak Shafiei <[email protected]>
+ Cherry-pick r242515. rdar://problem/48839275
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-13 Babak Shafiei <[email protected]>
+
Cherry-pick r241608. rdar://problem/48839277
[WebVTT] Inline WebVTT styles should start with '::cue'
Added: branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt (0 => 242856)
--- branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt (rev 0)
+++ branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt 2019-03-13 08:24:34 UTC (rev 242856)
@@ -0,0 +1 @@
+PASS: did not assert in debug.
Added: branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg (0 => 242856)
--- branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg (rev 0)
+++ branches/safari-607-branch/LayoutTests/svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg 2019-03-13 08:24:34 UTC (rev 242856)
@@ -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: branches/safari-607-branch/Source/WebCore/ChangeLog (242855 => 242856)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-03-13 08:24:31 UTC (rev 242855)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-03-13 08:24:34 UTC (rev 242856)
@@ -1,5 +1,53 @@
2019-03-13 Babak Shafiei <[email protected]>
+ Cherry-pick r242515. rdar://problem/48839275
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-13 Babak Shafiei <[email protected]>
+
Cherry-pick r241632. rdar://problem/48839379
Sample domainsVisited diagnostic logging
Modified: branches/safari-607-branch/Source/WebCore/svg/SVGPathSegList.cpp (242855 => 242856)
--- branches/safari-607-branch/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-13 08:24:31 UTC (rev 242855)
+++ branches/safari-607-branch/Source/WebCore/svg/SVGPathSegList.cpp 2019-03-13 08:24:34 UTC (rev 242856)
@@ -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