Skip to content

Inline split fixes#12699 - #12760

Merged
bors-servo merged 4 commits into
servo:masterfrom
splav:inline_split_fixes#12699
Aug 9, 2016
Merged

bors-servo merged 4 commits into
servo:masterfrom
splav:inline_split_fixes#12699

Conversation

@splav

@splav splav commented Aug 7, 2016 •

Copy link
Copy Markdown
Contributor

Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.


  • There are tests for these changes OR
  • These changes do not require tests because _____

This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 7, 2016
@splav

splav commented Aug 7, 2016

Copy link
Copy Markdown
Contributor Author

The thing I'm concerned about is that the test is not fully adequate. The sizes, even in em are font-dependant and the line breakage can happen in different places.
The max_inline_size change makes breakage behave like in Firefox. Honestly, I haven't checked the specs.
And, sorry, I've mixed up commit names, will fix them among other fixes after review.

};

let mut remaining_inline_size = max_inline_size;
let mut remaining_inline_size = max_inline_size - self.border_padding.inline_start_end();

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.

Disregard previous comment, I was very confused. Sorry about that.

@pcwalton

pcwalton commented Aug 8, 2016

Copy link
Copy Markdown
Contributor

Just had a couple of review nits to address and then this looks good. Thanks!

@pcwalton

pcwalton commented Aug 8, 2016

Copy link
Copy Markdown
Contributor

Don't worry about the test; as long as it splits in the right place on at least one of our bots it will catch any regressions.

@notriddle

Copy link
Copy Markdown
Contributor

Couldn't you use Ahem, the test font?

@Ms2ger

Ms2ger commented Aug 8, 2016

Copy link
Copy Markdown
Contributor

@bors-servo try

bors-servo pushed a commit that referenced this pull request Aug 8, 2016
Inline split fixes#12699

<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12699 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12760)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit e68e263 with merge 15ffeba...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive

highfive commented Aug 8, 2016

Copy link
Copy Markdown
  ▶ PASS [expected FAIL] /css21_dev/html4/c5509-ipadn-l-001.htm

  ▶ PASS [expected FAIL] /css21_dev/html4/c5509-ipadn-l-003.htm

  ▶ PASS [expected FAIL] /css21_dev/html4/inlines-017.htm

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Aug 8, 2016
@notriddle

Copy link
Copy Markdown
Contributor

About your question, you can ask the bot for a particular reviewer using r?. For example:

r? @notriddle

@highfive highfive assigned notriddle and unassigned larsbergstrom Aug 8, 2016
@splav
splav force-pushed the inline_split_fixes#12699 branch from e68e263 to 18438ef Compare August 8, 2016 17:01
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Aug 8, 2016
@splav

splav commented Aug 8, 2016

Copy link
Copy Markdown
Contributor Author

@notriddle I've changed the tests, looking at other test, using Ahem font. Is this version looking better. I've also changed the div width to get the same result.

<meta content="ahem dom" name="flags">
<style>
div {
width: 9em;

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.

Make the div 20px Ahem font. That way the em size is consistent everywhere.

@notriddle

Copy link
Copy Markdown
Contributor

Other than that, looks awesome! Fix it, then r=me.

@splav
splav force-pushed the inline_split_fixes#12699 branch from 18438ef to 98df0bf Compare August 8, 2016 21:54
@splav

splav commented Aug 8, 2016 •

Copy link
Copy Markdown
Contributor Author

Fixed
r? @notriddle

@jdm

jdm commented Aug 8, 2016

Copy link
Copy Markdown
Member

@bors-servo: r=notriddle
Thanks for jumping on that, @notriddle!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 98df0bf has been approved by notriddle

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 8, 2016
@splav

splav commented Aug 8, 2016

Copy link
Copy Markdown
Contributor Author

@jdm argh... I should finally put the bot commands list somewhere in the bookmarks... Thanks.

@notriddle

Copy link
Copy Markdown
Contributor

@splav Since I can't delegate, you wouldn't have been able to do it anyway.

@splav

splav commented Aug 8, 2016

Copy link
Copy Markdown
Contributor Author

@notriddle OK, I see.

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 98df0bf with merge 7ad120a...

bors-servo pushed a commit that referenced this pull request Aug 8, 2016
Inline split fixes#12699

<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12699 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12760)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 8, 2016
@highfive

highfive commented Aug 8, 2016

Copy link
Copy Markdown
  ▶ FAIL [expected PASS] /css21_dev/html4/c5509-ipadn-l-003.htm
  └   → /css21_dev/html4/c5509-ipadn-l-003.htm 60dc40da063dfa4b8f48965e9324ab4159ec6cca
/css21_dev/html4/reference/c5502-imrgn-r-003-ref.htm f02ece1ca5437cc3070b1ba6b068ec29f330a545
Testing 60dc40da063dfa4b8f48965e9324ab4159ec6cca == f02ece1ca5437cc3070b1ba6b068ec29f330a545

@notriddle

Copy link
Copy Markdown
Contributor

Platform-specific pass, probably because of Core Fonts. Just put something like this in:

File: tests/wpt/metadata-css/css21_dev/html4/c5509-ipadn-l-003.htm.ini

[c5509-ipadn-l-003.htm]
  type: reftest
  expected:
    if os == "mac": FAIL

@splav
splav force-pushed the inline_split_fixes#12699 branch from 98df0bf to 9c8b3a6 Compare August 9, 2016 04:12
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 9, 2016
@jdm

jdm commented Aug 9, 2016

Copy link
Copy Markdown
Member

@bors-servo: delegate=notriddle

@bors-servo

Copy link
Copy Markdown
Contributor

✌️ @notriddle can now approve this pull request

@notriddle

notriddle commented Aug 9, 2016 •

Copy link
Copy Markdown
Contributor

@bors-servo r+

Thanks, @jdm!

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 9c8b3a6 has been approved by notriddle

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 9, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 9c8b3a6 has been approved by notriddle

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 9c8b3a6 with merge 2420dc4...

bors-servo pushed a commit that referenced this pull request Aug 9, 2016
Inline split fixes#12699

<!-- Please describe your changes on the following line: -->
Fix fragment splitting algorithm to set FIRST/LAST_FRAGMENT_OF_ELEMENT flag correctly, account for border_padding for border_box and set zero border_padding between for new fragments.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12699 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12760)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit 9c8b3a6 into servo:master Aug 9, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 9, 2016
@emilio

emilio commented Aug 9, 2016

Copy link
Copy Markdown
Member

Awesome work here @splav, thanks! :)

@notriddle notriddle mentioned this pull request Aug 9, 2016
4 of 5 tasks
@splav
splav deleted the inline_split_fixes#12699 branch August 11, 2016 13:13
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.

Borders of inline elements are wrong for broken lines

9 participants