Skip to content

Commit

Permalink
Bug 1793071 [wpt PR 36104] - Avoid invalid class C break when a first…
Browse files Browse the repository at this point in the history
… inflow child fits beside float., a=testonly

Automatic update from web-platform-tests
Avoid invalid class C break when a first inflow child fits beside float.

If a container was cleared by a preceding float, and said container has
a float and a BFC root child, and the BFC root fits beside the float,
we'd incorrectly detect container separation before the BFC root, even
though there was no gap between it and its container.

We don't really need to let child_margin_got_separated be part of the
container separation check, since we're already comparing block-offsets.
That said, the whole child_margin_got_separated thing is a bit sketchy,
in that there may be false positives. Added a TODO.

Note that, among the tests included, only the -004 one would fail
without this fix. The two others are just regression tests, to make sure
that we still detect valid class C breakpoints in very similar
situations.

Bug: 1368518
Change-Id: I78ff2f5081e4a6878d4556ddbd859286da12e7d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3921636
Commit-Queue: Morten Stenshorne <mstenshochromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org>
Cr-Commit-Position: refs/heads/main{#1053246}

--

wpt-commits: 58c963f081777c28ab7600e70bc3c850b6b3b733
wpt-pr: 36104

UltraBlame original commit: 0ab7208335a36a0571aea6d5d20f95bcb2f37e46
  • Loading branch information
marco-c committed Apr 20, 2023
1 parent a77d73f commit 1860834
Show file tree
Hide file tree
Showing 3 changed files with 1,070 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,360 @@
<
!
DOCTYPE
html
>
<
link
rel
=
"
author
"
title
=
"
Morten
Stenshorne
"
href
=
"
mailto
:
mstensho
chromium
.
org
"
>
<
link
rel
=
"
help
"
href
=
"
https
:
/
/
www
.
w3
.
org
/
TR
/
css
-
break
-
3
/
#
possible
-
breaks
"
>
<
link
rel
=
"
match
"
href
=
"
.
.
/
reference
/
ref
-
filled
-
green
-
100px
-
square
.
xht
"
>
<
meta
name
=
"
assert
"
content
=
"
There
should
be
a
class
C
breakpoint
after
the
float
since
the
flow
-
root
sibling
is
cleared
past
the
float
(
but
note
that
it
would
otherwise
fit
beside
it
)
so
that
there
'
ll
be
a
gap
to
establish
a
class
C
break
opportunity
"
>
<
p
>
Test
passes
if
there
is
a
filled
green
square
and
<
strong
>
no
red
<
/
strong
>
.
<
/
p
>
<
div
style
=
"
columns
:
2
;
gap
:
0
;
column
-
fill
:
auto
;
width
:
100px
;
height
:
100px
;
background
:
red
;
"
>
<
div
style
=
"
width
:
200
%
;
"
>
<
div
style
=
"
width
:
50
%
;
height
:
50px
;
background
:
green
;
"
>
<
/
div
>
<
div
style
=
"
float
:
left
;
width
:
50
%
;
height
:
40px
;
background
:
green
;
"
>
<
/
div
>
<
div
style
=
"
clear
:
both
;
width
:
50
%
;
background
:
green
;
"
>
<
div
style
=
"
float
:
left
;
width
:
10px
;
height
:
10px
;
"
>
<
/
div
>
<
div
style
=
"
clear
:
both
;
display
:
flow
-
root
;
break
-
inside
:
avoid
;
height
:
100px
;
"
>
<
/
div
>
<
/
div
>
<
/
div
>
<
/
div
>
Loading

0 comments on commit 1860834

Please sign in to comment.