Skip to content

layout: Fix float speculation with percentage inline sizes, rewrite vertical alignment, fix inline block ascent/descent computation, and fix absolute inline-block hypothetical boxes. - #10691

Merged
bors-servo merged 12 commits into
servo:masterfrom
pcwalton:float-fixes
May 4, 2016

Conversation

@pcwalton

Copy link
Copy Markdown
Contributor

This change is Reviewable

@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify gfx and layout code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 18, 2016
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 872136d with merge f992004...

bors-servo pushed a commit that referenced this pull request Apr 18, 2016
layout: Various fixes for floats. (NOT READY YET; DO NOT MERGE)
Comment thread components/layout/block.rs Outdated

self.base.intrinsic_inline_sizes = computation.finish();
/*if self.base.flags.is_float() {
println!("intrinsic inline sizes for float={:?}", self.base.intrinsic_inline_sizes);

@emilio emilio Apr 18, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, printf-based debugging is the best kind of debugging ;-)

Jokes aside, great work trying to take all this floats bugs down!

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 18, 2016
@emilio

emilio commented Apr 18, 2016 •

Copy link
Copy Markdown
Member
  ▶ FAIL [expected PASS] /_mozilla/css/white-space-mixed-002.htm
  └   → /_mozilla/css/white-space-mixed-002.htm 094ec397037e69456a51b9f41e839bb07517361b
/_mozilla/css/white-space-mixed-002-ref.htm c11114d62a0df65ec487600581335e11858dc85a
Testing 094ec397037e69456a51b9f41e839bb07517361b == c11114d62a0df65ec487600581335e11858dc85a

Andd... A bunch of failing tests in test-css:

EDIT: Moved them into a gist

EDIT 2: Actually there are a few passes:

  ▶ PASS [expected FAIL] /css21_dev/html4/c414-flt-wrap-001.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/floats-132.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/floats-wrap-top-below-inline-002l.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/floats-wrap-top-below-inline-002r.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/floats-wrap-top-below-inline-003r.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/floats-wrap-top-below-inline-003l.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/inline-replaced-width-012.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/inline-replaced-width-013.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/inline-replaced-width-015.htm
  ▶ PASS [expected FAIL] /css21_dev/html4/c414-flt-wrap-001.htm

// 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()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes #6997.

@mbrubeck mbrubeck mentioned this pull request Apr 19, 2016
@Ms2ger

Ms2ger commented Apr 20, 2016

Copy link
Copy Markdown
Contributor

r? @mbrubeck

@highfive highfive assigned mbrubeck and unassigned Ms2ger Apr 20, 2016
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 6d06c6c with merge 6e6d0a1...

bors-servo pushed a commit that referenced this pull request Apr 21, 2016
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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@pcwalton pcwalton changed the title layout: Various fixes for floats. (NOT READY YET; DO NOT MERGE) layout: Rewrite the vertical alignment code to integrate properly with float placement. (NOT READY YET; DO NOT MERGE) Apr 21, 2016
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit c909d81 with merge 0f41226...

bors-servo pushed a commit that referenced this pull request Apr 21, 2016
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 -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 21, 2016
@jdm

jdm commented Apr 30, 2016

Copy link
Copy Markdown
Member

Note that transform-input-018.htm was just disabled in #10809 (see #10881) so it might be an intermittent pass. Worth seeing if it can be replicated!

@jdm

jdm commented Apr 30, 2016

Copy link
Copy Markdown
Member

Nevermind, I didn't realize that #10809 hadn't merged yet. Ignore the previous comment.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #10809) made this pull request unmergeable. Please resolve the merge conflicts.

@pcwalton

pcwalton commented May 2, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 9189fa0 with merge 007597f...

@pcwalton

pcwalton commented May 2, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo: try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 332ad76 with merge 33c006e...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive

highfive commented May 2, 2016

Copy link
Copy Markdown
  ▶ FAIL [expected PASS] /_mozilla/css/input_button_margins_a.html
  └   → /_mozilla/css/input_button_margins_a.html 48e56d7dbddaacd655fbf019797e31c9f64fbd7c
/_mozilla/css/input_button_margins_ref.html 3b70d692952309f43f0d6f10f6efd256c3c45363
Testing 48e56d7dbddaacd655fbf019797e31c9f64fbd7c == 3b70d692952309f43f0d6f10f6efd256c3c45363

@jdm

jdm commented May 2, 2016

Copy link
Copy Markdown
Member

The non-reference button is offset downwards by 1 or 2 pixels, according to the reftest analyzer.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #10979) made this pull request unmergeable. Please resolve the merge conflicts.

pcwalton added 12 commits May 4, 2016 13:19
inline sizes are nonzero.

This is a bit of a hack.
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.
It depends on the vertical alignment of button text, which is a spec
bug.
@pcwalton

pcwalton commented May 4, 2016

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=mbrubeck

Just updated a test (the test fails on Gecko without this fix)

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit dacc482 has been approved by mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit dacc482 with merge 35ba293...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows

@paulrouget

Copy link
Copy Markdown
Contributor

regression: #11063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants