Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b424c89ef6900030cc7298e28909b1f826bbb25f
https://github.com/WebKit/WebKit/commit/b424c89ef6900030cc7298e28909b1f826bbb25f
Author: Alan Baradlay <[email protected]>
Date: 2024-06-09 (Sun, 09 Jun 2024)
Changed paths:
A LayoutTests/fast/block/float/non-intrusive-float-overlap-expected.html
A LayoutTests/fast/block/float/non-intrusive-float-overlap.html
M Source/WebCore/layout/floats/FloatingContext.cpp
M Source/WebCore/layout/floats/FloatingContext.h
Log Message:
-----------
neowin.net: 'share' drop-down layout is broken and overlaps
https://bugs.webkit.org/show_bug.cgi?id=275290
<rdar://problem/129445546>
Reviewed by Antti Koivisto.
Floats, somewhat surprisingly may overlap each other, but only when an already
placed float coming from outside of
the current containing block does not overlap the containing block's content
box.
In such cases, newly placed floats may overlap such non-intrusive floats at
their non-floating side.
e.g.
F - float box
C - containing block for (F)
N - non-overlapping box, sibling of C, also float but not overlapping C's
content box.
<div id=N style="width: 20px; float: left"></div>
<div id=C style="width: 100px; padding-left: 20px">
<div id=F style="width: 200px; float: right">
_____
|N | This is where (C)'s content box starts (see padding-left: 20px)
|_____|_|____________________
|C ___|_|__________________ |
| | | | F||
| | | | ||
| | | | ||
| |___|_|__________________||
|_____|_|___________________|
| |
|_____|
Note that (F) float box overlaps (N -also float) with its non-floating (left)
side.
* Source/WebCore/layout/floats/FloatingContext.cpp:
(WebCore::Layout::findAvailablePosition):
(WebCore::Layout::FloatingContext::positionForFloat const):
(WebCore::Layout::FloatingContext::positionForNonFloatingFloatAvoider const):
(WebCore::Layout::FloatingContext::findPositionForFormattingContextRoot const):
* Source/WebCore/layout/floats/FloatingContext.h:
Canonical link: https://commits.webkit.org/279867@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes