Title: [262481] trunk
- Revision
- 262481
- Author
- jfernan...@igalia.com
- Date
- 2020-06-03 00:31:29 -0700 (Wed, 03 Jun 2020)
Log Message
[css-grid] Dynamically setting "position: absolute" in a grid item doesn't trigger a relayout of that element
https://bugs.webkit.org/show_bug.cgi?id=191465
Reviewed by Manuel Rego Casasnovas.
Source/WebCore:
>From Blink r484620 by Sergio Villar <svil...@igalia.com>
Containing block overrides not cleared for position:absolute
Whenever a position:absolute block gets a new containing block the
previously set containing block overrides are not cleared. This causes the
block not to be properly layout for its new containing block (for example
when using relative sizes).
In particular this affects grid items which always get a containing block
override size (which represent the grid areas) in case their
containing block switches from the grid container to a grid ancestor.
No new tests, as this change is covered by current web platform tests.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::insertPositionedObject): Clear the containing block's override width and height.
LayoutTests:
Several tests pass now thanks to this change.
* TestExpectations: Removed failure expectations, since now these tests pass now.
- absolute-positioning-changing-containing-block-001.html
- grid-item-absolute-positioning-dynamic-001.html
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (262480 => 262481)
--- trunk/LayoutTests/ChangeLog 2020-06-03 07:28:11 UTC (rev 262480)
+++ trunk/LayoutTests/ChangeLog 2020-06-03 07:31:29 UTC (rev 262481)
@@ -1,3 +1,16 @@
+2020-06-03 Javier Fernandez <jfernan...@igalia.com>
+
+ [css-grid] Dynamically setting "position: absolute" in a grid item doesn't trigger a relayout of that element
+ https://bugs.webkit.org/show_bug.cgi?id=191465
+
+ Reviewed by Manuel Rego Casasnovas.
+
+ Several tests pass now thanks to this change.
+
+ * TestExpectations: Removed failure expectations, since now these tests pass now.
+ - absolute-positioning-changing-containing-block-001.html
+ - grid-item-absolute-positioning-dynamic-001.html
+
2020-06-02 Yusuke Suzuki <ysuz...@apple.com>
ASSERTION FAILED: isCell() under WebCore::JSDOMConstructor seen with webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html
Modified: trunk/LayoutTests/TestExpectations (262480 => 262481)
--- trunk/LayoutTests/TestExpectations 2020-06-03 07:28:11 UTC (rev 262480)
+++ trunk/LayoutTests/TestExpectations 2020-06-03 07:31:29 UTC (rev 262481)
@@ -1054,8 +1054,6 @@
webkit.org/b/136754 css3/flexbox/csswg/ttwf-reftest-flex-wrap.html [ ImageOnlyFailure ]
# grid layout tests
-webkit.org/b/191465 imported/w3c/web-platform-tests/css/css-grid/abspos/absolute-positioning-changing-containing-block-001.html [ ImageOnlyFailure ]
-webkit.org/b/191465 imported/w3c/web-platform-tests/css/css-grid/abspos/grid-item-absolute-positioning-dynamic-001.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010.html [ Pass Failure ]
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013.html [ Pass Failure ]
imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html [ Pass Failure ]
Modified: trunk/Source/WebCore/ChangeLog (262480 => 262481)
--- trunk/Source/WebCore/ChangeLog 2020-06-03 07:28:11 UTC (rev 262480)
+++ trunk/Source/WebCore/ChangeLog 2020-06-03 07:31:29 UTC (rev 262481)
@@ -1,3 +1,28 @@
+2020-06-03 Javier Fernandez <jfernan...@igalia.com>
+
+ [css-grid] Dynamically setting "position: absolute" in a grid item doesn't trigger a relayout of that element
+ https://bugs.webkit.org/show_bug.cgi?id=191465
+
+ Reviewed by Manuel Rego Casasnovas.
+
+ From Blink r484620 by Sergio Villar <svil...@igalia.com>
+
+ Containing block overrides not cleared for position:absolute
+
+ Whenever a position:absolute block gets a new containing block the
+ previously set containing block overrides are not cleared. This causes the
+ block not to be properly layout for its new containing block (for example
+ when using relative sizes).
+
+ In particular this affects grid items which always get a containing block
+ override size (which represent the grid areas) in case their
+ containing block switches from the grid container to a grid ancestor.
+
+ No new tests, as this change is covered by current web platform tests.
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::insertPositionedObject): Clear the containing block's override width and height.
+
2020-06-03 Youenn Fablet <you...@apple.com>
Add more logging related to service worker fetch event handling
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (262480 => 262481)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2020-06-03 07:28:11 UTC (rev 262480)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2020-06-03 07:31:29 UTC (rev 262481)
@@ -1752,6 +1752,9 @@
void RenderBlock::insertPositionedObject(RenderBox& positioned)
{
ASSERT(!isAnonymousBlock());
+
+ positioned.clearOverrideContainingBlockContentSize();
+
if (positioned.isRenderFragmentedFlow())
return;
// FIXME: Find out if we can do this as part of positioned.setChildNeedsLayout(MarkOnlyThis)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes