Title: [280887] trunk/Source/WebCore
- Revision
- 280887
- Author
- [email protected]
- Date
- 2021-08-11 00:43:42 -0700 (Wed, 11 Aug 2021)
Log Message
[SVG] Attribute change triggers redundant (and out of order) setNeedsLayout call
https://bugs.webkit.org/show_bug.cgi?id=228125
Patch by Rob Buis <[email protected]> on 2021-08-11
Reviewed by Darin Adler.
As explained in the bug the setNeedsLayout call is redundant, however
keep using it for embedded SVG's to update width/height of the embedder.
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::svgAttributeChanged):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (280886 => 280887)
--- trunk/Source/WebCore/ChangeLog 2021-08-11 07:39:26 UTC (rev 280886)
+++ trunk/Source/WebCore/ChangeLog 2021-08-11 07:43:42 UTC (rev 280887)
@@ -1,3 +1,16 @@
+2021-08-11 Rob Buis <[email protected]>
+
+ [SVG] Attribute change triggers redundant (and out of order) setNeedsLayout call
+ https://bugs.webkit.org/show_bug.cgi?id=228125
+
+ Reviewed by Darin Adler.
+
+ As explained in the bug the setNeedsLayout call is redundant, however
+ keep using it for embedded SVG's to update width/height of the embedder.
+
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::svgAttributeChanged):
+
2021-08-10 Chris Dumez <[email protected]>
Add Cross-Origin-Opener-Policy support for Blob URLs
Modified: trunk/Source/WebCore/svg/SVGSVGElement.cpp (280886 => 280887)
--- trunk/Source/WebCore/svg/SVGSVGElement.cpp 2021-08-11 07:39:26 UTC (rev 280886)
+++ trunk/Source/WebCore/svg/SVGSVGElement.cpp 2021-08-11 07:43:42 UTC (rev 280887)
@@ -209,11 +209,13 @@
InstanceInvalidationGuard guard(*this);
invalidateSVGPresentationalHintStyle();
- if (auto renderer = this->renderer())
- RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
+ if (auto renderer = this->renderer()) {
+ if (is<RenderSVGRoot>(renderer) && downcast<RenderSVGRoot>(*renderer).isEmbeddedThroughFrameContainingSVGDocument())
+ RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
+ }
return;
}
-
+
if (SVGFitToViewBox::isKnownAttribute(attrName)) {
if (auto* renderer = this->renderer()) {
renderer->setNeedsTransformUpdate();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes