[webkit-changes] [WebKit/WebKit] c1324d: Positioned element with percentage padding should ...
Ahmad Saleem
noreply at github.com
Fri Nov 4 02:32:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c1324d73bd3c9620496236c7b3abbda0c0cbd607
https://github.com/WebKit/WebKit/commit/c1324d73bd3c9620496236c7b3abbda0c0cbd607
Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
Date: 2022-11-04 (Fri, 04 Nov 2022)
Changed paths:
A LayoutTests/fast/block/absolute-position-change-width-with-inline-container-expected.html
A LayoutTests/fast/block/absolute-position-change-width-with-inline-container.html
A LayoutTests/fast/block/containing-block-change-percentage-padding-width-recalc-expected.html
A LayoutTests/fast/block/containing-block-change-percentage-padding-width-recalc.html
M Source/WebCore/rendering/RenderBlock.cpp
Log Message:
-----------
Positioned element with percentage padding should recalc width when containing block changed
Positioned element with percentage padding should recalc width when containing block changed
https://bugs.webkit.org/show_bug.cgi?id=80808
Reviewed by Alan Baradlay.
This patch is to align Webkit behavior with Blink / Chrome and Gecko / Firefox.
Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=184672
and a test case from Patch Authored by SravanKumar Sandela.
RenderBlock::removePositionObjects usually don't recalc the width of
positioned descendants with percentage padding unless its width is changed.
For positioned elements which changed their containing block, it should be considered as if the width of the containing block changed.
* Source/WebCore/rendering/RenderBlock.cpp:
(RenderBlock::removePositionObjects): Add condition to recalculate the width
* LayoutTests/fast/block/containing-block-change-percentage-padding-width-recalc.html: Added Test Case
* LayoutTests/fast/block/containing-block-change-percentage-padding-width-recalc-expected.html: Added Test Case Expectations
* LayoutTests/fast/block/absolute-position-change-width-with-inline-container.html: Added Test Case
* LayoutTests/fast/block/absolute-position-change-width-with-inline-container-expected.html: Added Test Case Expectations
Canonical link: https://commits.webkit.org/256315@main
More information about the webkit-changes
mailing list