WebKit Bugzilla
Attachment 359778 Details for
Bug 193647
: Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193647-20190122144719.patch (text/plain), 4.27 KB, created by
Said Abou-Hallawa
on 2019-01-22 14:47:20 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-01-22 14:47:20 PST
Size:
4.27 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 240297) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-01-22 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances >+ https://bugs.webkit.org/show_bug.cgi?id=193647 >+ >+ Reviewed by Simon Fraser. >+ >+ 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): >+ > 2019-01-22 Alex Christensen <achristensen@webkit.org> > > Fix more builds. >Index: Source/WebCore/svg/SVGElement.cpp >=================================================================== >--- Source/WebCore/svg/SVGElement.cpp (revision 240297) >+++ Source/WebCore/svg/SVGElement.cpp (working copy) >@@ -686,8 +686,10 @@ void SVGElement::attributeChanged(const > document().accessSVGExtensions().rebuildAllElementReferencesForTarget(*this); > > // Changes to the style attribute are processed lazily (see Element::getAttribute() and related methods), >- // so we don't want changes to the style attribute to result in extra work here. >- if (name != HTMLNames::styleAttr) >+ // so we don't want changes to the style attribute to result in extra work here except invalidateInstances(). >+ if (name == HTMLNames::styleAttr) >+ invalidateInstances(); >+ else > svgAttributeChanged(name); > } > >Index: LayoutTests/ChangeLog >=================================================================== >--- LayoutTests/ChangeLog (revision 240297) >+++ LayoutTests/ChangeLog (working copy) >@@ -1,3 +1,13 @@ >+2019-01-22 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances >+ https://bugs.webkit.org/show_bug.cgi?id=193647 >+ >+ Reviewed by Simon Fraser. >+ >+ * svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg: Added. >+ * svg/custom/svg-use-style-dynamic-change-invalidate.svg: Added. >+ > 2019-01-22 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, skip all resource load statistics tests on GTK >Index: LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg >=================================================================== >--- LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg (nonexistent) >+++ LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate-expected.svg (working copy) >@@ -0,0 +1,6 @@ >+<svg xmlns="http://www.w3.org/2000/svg"> >+ <rect width="100" height="100" fill="green"/> >+ <rect x="110" width="100" height="100" fill="green"/> >+ <rect x="220" width="100" height="100" fill="green"/> >+ <rect x="330" width="100" height="100" fill="green"/> >+</svg> >Index: LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate.svg >=================================================================== >--- LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate.svg (nonexistent) >+++ LayoutTests/svg/custom/svg-use-style-dynamic-change-invalidate.svg (working copy) >@@ -0,0 +1,25 @@ >+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> >+ <symbol id="symbol"> >+ <rect id="symbol-rect" width="100%" height="100%" fill="red"/> >+ </symbol> >+ <defs> >+ <rect id="defs-rect" width="100" height="100" fill="red"/> >+ </defs> >+ <rect id="rect" width="100" height="100" fill="red"/> >+ <use x="110" width="100" height="100" xlink:href="#symbol"/> >+ <use x="220" width="100" height="100" xlink:href="#defs-rect"/> >+ <use x="330" width="100" height="100" xlink:href="#rect"/> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+ setTimeout(function(){ >+ document.getElementById("symbol-rect").setAttribute("style", "fill: green"); >+ document.getElementById("defs-rect").setAttribute("style", "fill: green"); >+ document.getElementById("rect").setAttribute("style", "fill: green"); >+ >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }, 0); >+ </script> >+</svg>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193647
:
359675
|
359766
|
359770
|
359773
| 359778