Title: [281983] trunk/Source/WebCore
Revision
281983
Author
commit-qu...@webkit.org
Date
2021-09-03 03:04:49 -0700 (Fri, 03 Sep 2021)

Log Message

Remove some SVG code from dirtyForLayoutFromPercentageHeightDescendants
https://bugs.webkit.org/show_bug.cgi?id=229805

Patch by Rob Buis <rb...@igalia.com> on 2021-09-03
Reviewed by Darin Adler.

Remove some SVG code from dirtyForLayoutFromPercentageHeightDescendants
that was needed when we were using containingBlock but not anymore
now we use container in dirtyForLayoutFromPercentageHeightDescendants.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (281982 => 281983)


--- trunk/Source/WebCore/ChangeLog	2021-09-03 09:48:07 UTC (rev 281982)
+++ trunk/Source/WebCore/ChangeLog	2021-09-03 10:04:49 UTC (rev 281983)
@@ -1,3 +1,17 @@
+2021-09-03  Rob Buis  <rb...@igalia.com>
+
+        Remove some SVG code from dirtyForLayoutFromPercentageHeightDescendants
+        https://bugs.webkit.org/show_bug.cgi?id=229805
+
+        Reviewed by Darin Adler.
+
+        Remove some SVG code from dirtyForLayoutFromPercentageHeightDescendants
+        that was needed when we were using containingBlock but not anymore
+        now we use container in dirtyForLayoutFromPercentageHeightDescendants.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
+
 2021-09-03  Youenn Fablet  <you...@apple.com>
 
         Migrate to latest libwebrtc AddIceCandidate

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (281982 => 281983)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-09-03 09:48:07 UTC (rev 281982)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-09-03 10:04:49 UTC (rev 281983)
@@ -63,7 +63,6 @@
 #include "RenderLayoutState.h"
 #include "RenderListMarker.h"
 #include "RenderMenuList.h"
-#include "RenderSVGRoot.h"
 #include "RenderTableCell.h"
 #include "RenderTextControl.h"
 #include "RenderTextFragment.h"
@@ -71,7 +70,6 @@
 #include "RenderTreeBuilder.h"
 #include "RenderTreePosition.h"
 #include "RenderView.h"
-#include "SVGSVGElement.h"
 #include "Settings.h"
 #include "ShadowRoot.h"
 #include "ShapeOutsideInfo.h"
@@ -839,20 +837,7 @@
             // (A horizontal flexbox that contains an inline image wrapped in an anonymous block for example.)
             if (renderer->hasIntrinsicAspectRatio() || renderer->style().hasAspectRatio())
                 renderer->setPreferredLogicalWidthsDirty(true);
-            auto* container = renderer->container();
-            // Mark the svg ancestor chain dirty as we walk to the container.
-            if (is<SVGElement>(renderer->element()) && container != renderer->parent()) {
-                auto* ancestor = renderer->parent();
-                ASSERT(ancestor->isDescendantOf(container));
-                while (ancestor != container) {
-                    ancestor->setChildNeedsLayout(MarkOnlyThis);
-                    // This is the topmost SVG root, no need to go any further.
-                    if (is<SVGSVGElement>(ancestor->element()) && !downcast<SVGSVGElement>(*ancestor->element()).ownerSVGElement())
-                        break;
-                    ancestor = ancestor->parent();
-                }
-            }
-            renderer = container;
+            renderer = renderer->container();
             ASSERT(renderer);
             if (!renderer)
                 break;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to