Title: [251680] trunk
Revision
251680
Author
[email protected]
Date
2019-10-28 16:09:39 -0700 (Mon, 28 Oct 2019)

Log Message

Hidden framesets should provide default edgeInfo value
https://bugs.webkit.org/show_bug.cgi?id=203506
<rdar://problem/56233726>

Reviewed by Simon Fraser.

Source/WebCore:

The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call.
When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus
hidden nested framesets can only provide the default edge info.
This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS.

Test: fast/frames/hidden-frameset.html

* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::edgeInfo const):

LayoutTests:

* fast/frames/hidden-frameset-expected.txt: Added.
* fast/frames/hidden-frameset.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (251679 => 251680)


--- trunk/LayoutTests/ChangeLog	2019-10-28 22:41:24 UTC (rev 251679)
+++ trunk/LayoutTests/ChangeLog	2019-10-28 23:09:39 UTC (rev 251680)
@@ -1,3 +1,14 @@
+2019-10-28  Zalan Bujtas  <[email protected]>
+
+        Hidden framesets should provide default edgeInfo value
+        https://bugs.webkit.org/show_bug.cgi?id=203506
+        <rdar://problem/56233726>
+
+        Reviewed by Simon Fraser.
+
+        * fast/frames/hidden-frameset-expected.txt: Added.
+        * fast/frames/hidden-frameset.html: Added.
+
 2019-10-28  Chris Dumez  <[email protected]>
 
         Update html/semantics/forms WPT tests from upstream

Added: trunk/LayoutTests/fast/frames/hidden-frameset-expected.txt (0 => 251680)


--- trunk/LayoutTests/fast/frames/hidden-frameset-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/frames/hidden-frameset-expected.txt	2019-10-28 23:09:39 UTC (rev 251680)
@@ -0,0 +1 @@
+

Added: trunk/LayoutTests/fast/frames/hidden-frameset.html (0 => 251680)


--- trunk/LayoutTests/fast/frames/hidden-frameset.html	                        (rev 0)
+++ trunk/LayoutTests/fast/frames/hidden-frameset.html	2019-10-28 23:09:39 UTC (rev 251680)
@@ -0,0 +1,18 @@
+<script>
+    if (window.testRunner)
+        testRunner.dumpAsText();
+    _onload_ = ()=> {
+        // Force layout first.
+        document.documentElement.offsetTop;
+
+        // Then expand the root frameset grid from 2x1 to 2x2.
+        document.getElementById("rootSet").setAttribute("rows", "*, 0");
+    }
+</script>
+<frameset id="rootSet" cols="0, *">
+    <frame id="firstChild"></frame>
+    <frame src="" PASS if no crash or assertion failure."></frame>
+    <frameset>
+         <frame src=""
+     </frameset>
+</frameset>

Modified: trunk/Source/WebCore/ChangeLog (251679 => 251680)


--- trunk/Source/WebCore/ChangeLog	2019-10-28 22:41:24 UTC (rev 251679)
+++ trunk/Source/WebCore/ChangeLog	2019-10-28 23:09:39 UTC (rev 251680)
@@ -1,3 +1,21 @@
+2019-10-28  Zalan Bujtas  <[email protected]>
+
+        Hidden framesets should provide default edgeInfo value
+        https://bugs.webkit.org/show_bug.cgi?id=203506
+        <rdar://problem/56233726>
+
+        Reviewed by Simon Fraser.
+
+        The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call.
+        When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus
+        hidden nested framesets can only provide the default edge info.
+        This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS.
+
+        Test: fast/frames/hidden-frameset.html
+
+        * rendering/RenderFrameSet.cpp:
+        (WebCore::RenderFrameSet::edgeInfo const):
+
 2019-10-28  Chris Dumez  <[email protected]>
 
         Drop code for X-Temp-Tablet HTTP header experiment

Modified: trunk/Source/WebCore/rendering/RenderFrameSet.cpp (251679 => 251680)


--- trunk/Source/WebCore/rendering/RenderFrameSet.cpp	2019-10-28 22:41:24 UTC (rev 251679)
+++ trunk/Source/WebCore/rendering/RenderFrameSet.cpp	2019-10-28 23:09:39 UTC (rev 251680)
@@ -525,17 +525,15 @@
             int width = m_cols.m_sizes[c];
 
             // has to be resized and itself resize its contents
-            if (width != child->width() || height != child->height()) {
-                child->setWidth(width);
-                child->setHeight(height);
+            child->setWidth(width);
+            child->setHeight(height);
 #if PLATFORM(IOS_FAMILY)
-                // FIXME: Is this iOS-specific?
-                child->setNeedsLayout(MarkOnlyThis);
+            // FIXME: Is this iOS-specific?
+            child->setNeedsLayout(MarkOnlyThis);
 #else
-                child->setNeedsLayout();
+            child->setNeedsLayout();
 #endif
-                child->layout();
-            }
+            child->layout();
 
             xPos += width + borderThickness;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to