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 upDon't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT. #14035
Conversation
highfive
commented
Nov 3, 2016
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @Ms2ger (or someone else) soon. |
highfive
commented
Nov 3, 2016
|
Heads up! This PR modifies the following files:
|
|
@bors-servo try |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
<!-- -->
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
| @@ -222,7 +248,7 @@ impl InlineFragmentsAccumulator { | |||
| pseudo: node.get_pseudo_element_type().strip(), | |||
| style: node.style(style_context), | |||
| selected_style: node.selected_style(), | |||
| flags: InlineFragmentNodeFlags::empty(), | |||
| flags: FIRST_FRAGMENT_OF_ELEMENT | LAST_FRAGMENT_OF_ELEMENT, | |||
This comment has been minimized.
This comment has been minimized.
emilio
Nov 3, 2016
•
Member
This looks good to me, but I wonder if there's a way to organize this so this doesn't start with this flags. It feels weird to use these flags here since we always remove them in to_intermediate_inline_fragments.
Maybe keeping in the accumulator something like saw_ib_split flag or similar, and don't insert the flags in that case?
This comment has been minimized.
This comment has been minimized.
Permutatrix
Nov 3, 2016
•
Author
Contributor
I think of InlineFragmentsAccumulator's enclosing_node as representing the "whole" InlineFragmentNodeInfo for this accumulator, i.e. what it would be if it was all one fragment. It's split in two each time an {ib} split is encountered, then split up again in to_intermediate_inline_fragments. I'm not convinced that it's conceptually more reasonable to save instructions for how to mark the nodes and follow them as late as possible rather than simply handling it this way as we go.
Practically speaking, Servo will one day have to handle the positioning of backgrounds across multiple line boxes. Information about this will likely be stored in InlineFragmentNodeInfo. Using a conceptual model that allows that information to be reused will make it easier.
Comments would definitely help, though. If we stick with my model, I'll add some explaining it.
This comment has been minimized.
This comment has been minimized.
Permutatrix
Nov 3, 2016
Author
Contributor
Actually, I suppose information about positioning backgrounds won't be split at this stage. But, uh, you know... Something else could be. In theory.
This comment has been minimized.
This comment has been minimized.
pcwalton
Nov 8, 2016
Contributor
I concur with @Permutatrix; let's make things as simple as possible. But definitely comment this explaining how things work and the rationale.
|
|
highfive
commented
Nov 3, 2016
|
|
Sorry, but the "opclns" tests and "word-break-normal" pass on real desktop installs but fail in CI. It's font-related, I think. Remove those test expectations, and try should pass. |
|
Thanks, @notriddle. |
|
@bors-servo try |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
<!-- -->
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
@bors-servo clean try |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
<!-- -->
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
|
|
Last attempt @bors-servo retry |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
<!-- -->
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
Trying to get homu unstuck. |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
<!-- -->
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
|
|
Cool. So, are we doing things my way or @emilio's? Any more thoughts on that? |
|
I don't really care that much as long as it's well documented, but probably @pcwalton or @notriddle have some opinions on it? |
|
No complaints here about doing it the @Permutatrix way. |
|
Okay, I've added a comment about |
|
Calling not it, I don't know anything about layout :) r? @SimonSapin |
|
@bors-servo r+ |
|
|
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
Don't mark the first/last fragment of an {ib} split as FIRST/LAST_FRAGMENT_OF_ELEMENT.
<!-- Please describe your changes on the following line: -->
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
---
<!-- 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 #14030
- [X] There are tests for these changes
<!-- 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/14035)
<!-- Reviewable:end -->
|
|
Permutatrix commentedNov 3, 2016
•
edited
This change allows inline margins, borders, and padding to interact correctly with {ib} splits.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is