New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REGRESSION(r258464): SVG use element doesn't render if it references a subsequent element after a style resolution #13857
Conversation
EWS run on previous version of this PR (hash 5c9b14f) |
EWS run on previous version of this PR (hash 89a4eb9) |
if (insertionType.connectedToDocument || result == InsertedIntoAncestorResult::NeedsPostInsertionCallback) | ||
return InsertedIntoAncestorResult::NeedsPostInsertionCallback; | ||
return InsertedIntoAncestorResult::Done; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or this can be something like this:
if (insertionType.connectedToDocument)
return InsertedIntoAncestorResult::NeedsPostInsertionCallback;
return result;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Fixed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these lines can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, removed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
<svg viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name space xmlns:xlink
is not needed anymore. So it can be removed. And the version attribute
has been deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. Removed.
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" | ||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
<svg viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<use xlink:href="#x1" x="0" y="0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xlink:href
-> href
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
EWS run on current version of this PR (hash 424289b) |
β¦a subsequent element after a style resolution https://bugs.webkit.org/show_bug.cgi?id=216363 Reviewed by Said Abou-Hallawa. The bug was caused by SVGPathElement::insertedIntoAncestor and a few other insertedIntoAncestor functions ignoring the value returned by SVGElement::insertedIntoAncestor requesting a post insertion callback, and SVGMPathElement::didFinishInsertingNode not calling SVGMPathElement::didFinishInsertingNode, which updates SVG elements referencing the element. This PR fixes all insertedIntoAncestor functions in SVG to respect the value returned by super class' insertedIntoAncestor but many of them don't have any consequences at the moment. * LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update-expected.svg: Added. * LayoutTests/svg/dom/use-element-refers-subsequent-image-element-after-style-update.svg: Added. * LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update-expected.svg: Added. * LayoutTests/svg/dom/use-element-refers-subsequent-path-element-after-style-update.svg: Added. * Source/WebCore/svg/SVGFEImageElement.cpp: (WebCore::SVGFEImageElement::didFinishInsertingNode): * Source/WebCore/svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::insertedIntoAncestor): * Source/WebCore/svg/SVGImageElement.cpp: (WebCore::SVGImageElement::insertedIntoAncestor): * Source/WebCore/svg/SVGMPathElement.cpp: (WebCore::SVGMPathElement::insertedIntoAncestor): (WebCore::SVGMPathElement::didFinishInsertingNode): * Source/WebCore/svg/SVGPathElement.cpp: (WebCore::SVGPathElement::insertedIntoAncestor): * Source/WebCore/svg/SVGScriptElement.cpp: (WebCore::SVGScriptElement::insertedIntoAncestor): * Source/WebCore/svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::insertedIntoAncestor): (WebCore::SVGTRefElement::didFinishInsertingNode): * Source/WebCore/svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::didFinishInsertingNode): * Source/WebCore/svg/SVGTitleElement.cpp: (WebCore::SVGTitleElement::insertedIntoAncestor): * Source/WebCore/svg/SVGUseElement.cpp: (WebCore::SVGUseElement::insertedIntoAncestor): (WebCore::SVGUseElement::didFinishInsertingNode): * Source/WebCore/svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::didFinishInsertingNode): Canonical link: https://commits.webkit.org/264085@main
424289b
to
a6a7aa5
Compare
Committed 264085@main (a6a7aa5): https://commits.webkit.org/264085@main Reviewed commits have been landed. Closing PR #13857 and removing active labels. |
a6a7aa5
424289b
π ios-simπ§ͺ gtk-wk2π§ͺ api-ios