⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242870 in webkit


Ignore:
Timestamp:
Mar 13, 2019, 2:25:15 AM (7 years ago)
Author:
Carlos Garcia Campos
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.
Location:
releases/WebKitGTK/webkit-2.24
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r242867 r242870  
     12019-03-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
     4        https://bugs.webkit.org/show_bug.cgi?id=195333
     5        <rdar://problem/48475802>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * svg/dom/SVGPathSegList-insert-from-animating-animPathSegList-expected.txt: Added.
     10        * svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg: Added.
     11
    1122019-03-06  Wenson Hsieh  <wenson_hsieh@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r242869 r242870  
     12019-03-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        SVGPathSegList.insertItemBefore() should fail if the newItem belongs to an animating animPathSegList
     4        https://bugs.webkit.org/show_bug.cgi?id=195333
     5        <rdar://problem/48475802>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Because the SVG1.1 specs states that the newItem should be removed from
     10        its original list before adding it to another list,
     11        SVGPathSegList.insertItemBefore() should fail if the new item belongs to
     12        an animating animPathSegList since it is read-only.
     13
     14        Test: svg/dom/SVGPathSegList-insert-from-animating-animPathSegList.svg
     15
     16        * svg/SVGPathSegList.cpp:
     17        (WebCore::SVGPathSegList::processIncomingListItemValue):
     18
    1192019-03-08  Miguel Gomez  <magomez@igalia.com>
    220
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/svg/SVGPathSegList.cpp

    r229830 r242870  
    8686    RefPtr<SVGAnimatedPathSegListPropertyTearOff> propertyTearOff = static_pointer_cast<SVGAnimatedPathSegListPropertyTearOff>(animatedPropertyOfItem);
    8787    int indexToRemove = propertyTearOff->findItem(newItem.get());
    88     ASSERT(indexToRemove != -1);
     88
     89    // If newItem does not exist in the propertyTearOff baseVal() list, it has to be
     90    // in its animVal() list and it has to be animating.
     91    if (indexToRemove == -1) {
     92        ASSERT(propertyTearOff->isAnimating());
     93        ASSERT(propertyTearOff->animVal()->findItem(newItem.get()) != -1);
     94        return false;
     95    }
    8996
    9097    // Do not remove newItem if already in this list at the target index.
Note: See TracChangeset for help on using the changeset viewer.