Changeset 264068 in webkit


Ignore:
Timestamp:
Jul 8, 2020, 2:01:47 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r258459 - SVGMatrix should have the access right of its owner SVGTransform always
https://bugs.webkit.org/show_bug.cgi?id=207462

Reviewed by Simon Fraser.

Source/WebCore:

The SVGMatrix needs to be reattached to its owner SVGTransform when the
access right of this owner changes. The access right of the owner changes
when it gets attached to or detached from a higher level owner.

Test: svg/dom/SVGTransformList-anim-read-only.html

  • svg/SVGTransform.h:
  • svg/properties/SVGProperty.h:

(WebCore::SVGProperty::attach):
(WebCore::SVGProperty::detach):
(WebCore::SVGProperty::reattach):

LayoutTests:

  • svg/dom/SVGTransformList-anim-read-only-expected.txt: Added.
  • svg/dom/SVGTransformList-anim-read-only.html: Added.
Location:
releases/WebKitGTK/webkit-2.28
Files:
2 added
4 edited

Legend:

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

    r260629 r264068  
     12020-03-13  Said Abou-Hallawa  <said@apple.com>
     2
     3        SVGMatrix should have the access right of its owner SVGTransform always
     4        https://bugs.webkit.org/show_bug.cgi?id=207462
     5
     6        Reviewed by Simon Fraser.
     7
     8        * svg/dom/SVGTransformList-anim-read-only-expected.txt: Added.
     9        * svg/dom/SVGTransformList-anim-read-only.html: Added.
     10
    1112020-04-22  Enrique Ocaña González  <eocanha@igalia.com>
    212
  • releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog

    r264066 r264068  
     12020-03-13  Said Abou-Hallawa  <said@apple.com>
     2
     3        SVGMatrix should have the access right of its owner SVGTransform always
     4        https://bugs.webkit.org/show_bug.cgi?id=207462
     5
     6        Reviewed by Simon Fraser.
     7
     8        The SVGMatrix needs to be reattached to its owner SVGTransform when the
     9        access right of this owner changes. The access right of the owner changes
     10        when it gets attached to or detached from a higher level owner.
     11
     12        Test: svg/dom/SVGTransformList-anim-read-only.html
     13
     14        * svg/SVGTransform.h:
     15        * svg/properties/SVGProperty.h:
     16        (WebCore::SVGProperty::attach):
     17        (WebCore::SVGProperty::detach):
     18        (WebCore::SVGProperty::reattach):
     19
    1202020-03-02  Mark Lam  <mark.lam@apple.com>
    221
  • releases/WebKitGTK/webkit-2.28/Source/WebCore/svg/SVGTransform.h

    r251427 r264068  
    145145    }
    146146
     147    void attach(SVGPropertyOwner* owner, SVGPropertyAccess access) override
     148    {
     149        Base::attach(owner, access);
     150        // Reattach the SVGMatrix to the SVGTransformValue with the new SVGPropertyAccess.
     151        m_value.matrix()->reattach(this, access);
     152    }
     153
     154    void detach() override
     155    {
     156        Base::detach();
     157        // Reattach the SVGMatrix to the SVGTransformValue with the SVGPropertyAccess::ReadWrite.
     158        m_value.matrix()->reattach(this, access());
     159    }
     160
    147161private:
    148162    using Base = SVGValueProperty<SVGTransformValue>;
  • releases/WebKitGTK/webkit-2.28/Source/WebCore/svg/properties/SVGProperty.h

    r244663 r264068  
    3737    // Managing the relationship with the owner.
    3838    bool isAttached() const { return m_owner; }
    39     void attach(SVGPropertyOwner* owner, SVGPropertyAccess access)
     39    virtual void attach(SVGPropertyOwner* owner, SVGPropertyAccess access)
    4040    {
    4141        ASSERT(!m_owner);
     
    4545    }
    4646
    47     void detach()
     47    virtual void detach()
    4848    {
    4949        m_owner = nullptr;
    5050        m_access = SVGPropertyAccess::ReadWrite;
     51        m_state = SVGPropertyState::Clean;
     52    }
     53
     54    void reattach(SVGPropertyOwner* owner, SVGPropertyAccess access)
     55    {
     56        ASSERT_UNUSED(owner, owner == m_owner);
     57        m_access = access;
    5158        m_state = SVGPropertyState::Clean;
    5259    }
Note: See TracChangeset for help on using the changeset viewer.