Bug 264397
Summary: | When no clearance applies to an element with 'clear' set, place the element below the float just as we would if it was clear:none | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bfulgham, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | BrowserCompat, InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ahmad Saleem
Hi Team,
I came across another failing test on STP182:
Test Case: https://jsfiddle.net/d83gt4d8/16/
^ This fails in Safari but passes in Chrome Canary 121 and Firefox Nightly 121.
Test Case (from commit): https://jsfiddle.net/vo39besy/show
^ Third last and above fails in Safari.
Blink Commit: https://chromium.googlesource.com/chromium/blink/+/502ffded2efe7d27b5e0ec085a47d4764b65c12c
WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderBlockFlow.cpp#1593
____
This compiles:
if (!grandchildBox)
return;
// Make sure to update the block margins now for the grandchild box so that we're looking at
...
// If we have a 'clear' value but also have a margin we may not actually require clearance to move past any floats.
// If that's the case we want to be sure we estimate the correct position including margins after any floats rather
// than use 'clearance' later which could give us the wrong position.
if (RenderStyle::usedClear(*grandchildBox) != UsedClear::None && !childBlock.marginBeforeForChild(*grandchildBox))
return;
______
It progress above test case and it might also progress 'no-clearance-due-to-large-margin.html' on WPT in css2 directory.
_______
Just wanted to raise, so we can fix it. Adding 'BrowserCompat' since only Safari / WebKit fails it.
Thanks!
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
PR Attempt - https://github.com/WebKit/WebKit/pull/20199
EWS
Committed 270525@main (f5f625b22572): <https://commits.webkit.org/270525@main>
Reviewed commits have been landed. Closing PR #20199 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/118230738>