Title: [281357] trunk
Revision
281357
Author
[email protected]
Date
2021-08-20 18:45:09 -0700 (Fri, 20 Aug 2021)

Log Message

[IFC][Integration] Enable inline level boxes with relative (min/max)width and (min/max)height values
https://bugs.webkit.org/show_bug.cgi?id=229065

Reviewed by Antti Koivisto.

Source/WebCore:

When a block level box's style changes, while we mark the box itself for layout we normally don't
walk the subtree for damaged inline content. Instead during layout, we dirty these individual descendant renderers as needed.
Inline level boxes with relative width/height values are part of this group.
It's also similar to what we do in LegacyLineLayout::layoutLineBoxes.

* layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::canUseForChild):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutModernLines):

LayoutTests:

* platform/ios/fast/frames/onlyCommentInIFrame-expected.txt:
* platform/mac/fast/frames/onlyCommentInIFrame-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (281356 => 281357)


--- trunk/LayoutTests/ChangeLog	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/LayoutTests/ChangeLog	2021-08-21 01:45:09 UTC (rev 281357)
@@ -1,3 +1,13 @@
+2021-08-20  Zalan Bujtas  <[email protected]>
+
+        [IFC][Integration] Enable inline level boxes with relative (min/max)width and (min/max)height values
+        https://bugs.webkit.org/show_bug.cgi?id=229065
+
+        Reviewed by Antti Koivisto.
+
+        * platform/ios/fast/frames/onlyCommentInIFrame-expected.txt:
+        * platform/mac/fast/frames/onlyCommentInIFrame-expected.txt:
+
 2021-08-20  Alan Bujtas  <[email protected]>
 
         [IFC][Integration] Enable non-auto line-break values

Modified: trunk/LayoutTests/platform/ios/fast/frames/onlyCommentInIFrame-expected.txt (281356 => 281357)


--- trunk/LayoutTests/platform/ios/fast/frames/onlyCommentInIFrame-expected.txt	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/LayoutTests/platform/ios/fast/frames/onlyCommentInIFrame-expected.txt	2021-08-21 01:45:09 UTC (rev 281357)
@@ -14,7 +14,7 @@
         layer at (0,0) size 784x10
           RenderBlock {HTML} at (0,0) size 784x10
             RenderBody {BODY} at (8,8) size 768x0
-      RenderBR {BR} at (0,0) size 0x0
+      RenderBR {BR} at (788,59) size 0x19
       RenderBR {BR} at (0,74) size 0x19
       RenderIFrame {IFRAME} at (0,94) size 788x14 [border: (2px inset #000000)]
         layer at (0,0) size 784x170

Modified: trunk/LayoutTests/platform/mac/fast/frames/onlyCommentInIFrame-expected.txt (281356 => 281357)


--- trunk/LayoutTests/platform/mac/fast/frames/onlyCommentInIFrame-expected.txt	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/LayoutTests/platform/mac/fast/frames/onlyCommentInIFrame-expected.txt	2021-08-21 01:45:09 UTC (rev 281357)
@@ -14,7 +14,7 @@
         layer at (0,0) size 784x10
           RenderBlock {HTML} at (0,0) size 784x10
             RenderBody {BODY} at (8,8) size 768x0
-      RenderBR {BR} at (0,0) size 0x0
+      RenderBR {BR} at (788,54) size 0x18
       RenderBR {BR} at (0,68) size 0x18
       RenderIFrame {IFRAME} at (0,86) size 788x14 [border: (2px inset #000000)]
         layer at (0,0) size 769x169

Modified: trunk/Source/WebCore/ChangeLog (281356 => 281357)


--- trunk/Source/WebCore/ChangeLog	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/Source/WebCore/ChangeLog	2021-08-21 01:45:09 UTC (rev 281357)
@@ -1,3 +1,20 @@
+2021-08-20  Zalan Bujtas  <[email protected]>
+
+        [IFC][Integration] Enable inline level boxes with relative (min/max)width and (min/max)height values
+        https://bugs.webkit.org/show_bug.cgi?id=229065
+
+        Reviewed by Antti Koivisto.
+
+        When a block level box's style changes, while we mark the box itself for layout we normally don't
+        walk the subtree for damaged inline content. Instead during layout, we dirty these individual descendant renderers as needed.
+        Inline level boxes with relative width/height values are part of this group.
+        It's also similar to what we do in LegacyLineLayout::layoutLineBoxes.
+
+        * layout/integration/LayoutIntegrationCoverage.cpp:
+        (WebCore::LayoutIntegration::canUseForChild):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::layoutModernLines):
+
 2021-08-20  Alan Bujtas  <[email protected]>
 
         [IFC][Integration] Enable non-auto line-break values

Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp (281356 => 281357)


--- trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp	2021-08-21 01:45:09 UTC (rev 281357)
@@ -594,12 +594,6 @@
     auto isSupportedStyle = [] (const auto& style) {
         if (style.verticalAlign() == VerticalAlign::Sub || style.verticalAlign() == VerticalAlign::Super)
             return false;
-        if (style.width().isPercentOrCalculated() || style.height().isPercentOrCalculated())
-            return false;
-        if (style.minWidth().isPercentOrCalculated() || style.maxWidth().isPercentOrCalculated())
-            return false;
-        if (style.minHeight().isPercentOrCalculated() || style.maxHeight().isPercentOrCalculated())
-            return false;
         if (style.boxShadow())
             return false;
         if (!style.hangingPunctuation().isEmpty())

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.cpp (281356 => 281357)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2021-08-21 01:13:06 UTC (rev 281356)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.cpp	2021-08-21 01:45:09 UTC (rev 281357)
@@ -3698,8 +3698,9 @@
 
     for (auto walker = InlineWalker(*this); !walker.atEnd(); walker.advance()) {
         auto& renderer = *walker.current();
-        if (relayoutChildren)
+        if (relayoutChildren || (is<RenderBox>(renderer) && downcast<RenderBox>(renderer).hasRelativeDimensions()))
             renderer.setNeedsLayout(MarkOnlyThis);
+
         if (!renderer.needsLayout() && !needsUpdateReplacedDimensions)
             continue;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to