Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign uplayout: Fix float speculation with percentage inline sizes, rewrite vertical alignment, fix inline block ascent/descent computation, and fix absolute inline-block hypothetical boxes. #10691
Conversation
highfive
commented
Apr 18, 2016
|
@bors-servo: try |
layout: Various fixes for floats. (NOT READY YET; DO NOT MERGE)
| @@ -1528,6 +1528,9 @@ impl BlockFlow { | |||
| left_float_width + right_float_width); | |||
|
|
|||
| self.base.intrinsic_inline_sizes = computation.finish(); | |||
| /*if self.base.flags.is_float() { | |||
| println!("intrinsic inline sizes for float={:?}", self.base.intrinsic_inline_sizes); | |||
This comment has been minimized.
This comment has been minimized.
emilio
Apr 18, 2016
•
Member
Heh, printf-based debugging is the best kind of debugging ;-)
Jokes aside, great work trying to take all this floats bugs down!
|
|
Andd... A bunch of failing tests in EDIT: Moved them into a gist EDIT 2: Actually there are a few passes:
|
| @@ -444,7 +444,7 @@ impl LineBreaker { | |||
| // Initially, pretend a splittable fragment has zero inline-size. We will move it later if | |||
| // it has nonzero inline-size and that causes problems. | |||
| let placement_inline_size = if first_fragment.can_split() { | |||
| Au(0) | |||
| first_fragment.minimum_splittable_inline_size() | |||
This comment has been minimized.
This comment has been minimized.
|
r? @mbrubeck |
|
@bors-servo: try |
layout: Various fixes for floats. (NOT READY YET; DO NOT MERGE) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10691) <!-- Reviewable:end -->
|
|
|
@bors-servo: try |
layout: Rewrite the vertical alignment code to integrate properly with float placement. (NOT READY YET; DO NOT MERGE) <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10691) <!-- Reviewable:end -->
|
|
|
|
inline sizes are nonzero. This is a bit of a hack.
between floats.
baselines when aligning inline fragments per CSS 2.1 § 10.8.1.
This makes the line breaker determine the final block positions of each line rather than doing it in a separate pass afterward. Not only does this simplify the code, it makes `vertical-align` and float placement interact properly.
`position: absolute` inline per CSS 2.1 § 10.3.7.
information about each float.
|
@bors-servo: r=mbrubeck Just updated a test (the test fails on Gecko without this fix) |
|
|
layout: Fix float speculation with percentage inline sizes, rewrite vertical alignment, fix inline block ascent/descent computation, and fix absolute inline-block hypothetical boxes. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10691) <!-- Reviewable:end -->
|
|
|
regression: #11063 |
pcwalton commentedApr 18, 2016
This change is