Changeset 240305 in webkit


Ignore:
Timestamp:
Jan 22, 2019 4:13:41 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
https://bugs.webkit.org/show_bug.cgi?id=193647

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-01-22
Reviewed by Simon Fraser.

Source/WebCore:

Changing a style attribute of an SVGELement needs to call invalidateInstances().

Tests: svg/custom/svg-use-style-dynamic-change-invalidate.svg

  • svg/SVGElement.cpp:

(WebCore::SVGElement::attributeChanged):

LayoutTests:

  • svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg: Added.
  • svg/custom/svg-use-style-dynamic-change-invalidate.svg: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240293 r240305  
     12019-01-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
     4        https://bugs.webkit.org/show_bug.cgi?id=193647
     5
     6        Reviewed by Simon Fraser.
     7
     8        * svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg: Added.
     9        * svg/custom/svg-use-style-dynamic-change-invalidate.svg: Added.
     10
    1112019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r240297 r240305  
     12019-01-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
     4        https://bugs.webkit.org/show_bug.cgi?id=193647
     5
     6        Reviewed by Simon Fraser.
     7
     8        Changing a style attribute of an SVGELement needs to call invalidateInstances().
     9
     10        Tests: svg/custom/svg-use-style-dynamic-change-invalidate.svg
     11
     12        * svg/SVGElement.cpp:
     13        (WebCore::SVGElement::attributeChanged):
     14
    1152019-01-22  Alex Christensen  <achristensen@webkit.org>
    216
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r240237 r240305  
    687687
    688688    // Changes to the style attribute are processed lazily (see Element::getAttribute() and related methods),
    689     // so we don't want changes to the style attribute to result in extra work here.
    690     if (name != HTMLNames::styleAttr)
     689    // so we don't want changes to the style attribute to result in extra work here except invalidateInstances().
     690    if (name == HTMLNames::styleAttr)
     691        invalidateInstances();
     692    else
    691693        svgAttributeChanged(name);
    692694}
Note: See TracChangeset for help on using the changeset viewer.