Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle stacking context collection for truncated fragments #18510

Conversation

mrobinson
Copy link
Member

@mrobinson mrobinson commented Sep 14, 2017

Before we did not properly descend intro truncated fragments when
collecting stacking contexts. This change makes sure that we descend
properly

Fixes #18254.
Fixes #17072.


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

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list_builder.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 14, 2017
Copy link
Member

@emilio emilio left a comment

Choose a reason for hiding this comment

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

The right fix is #15144, I guess, but meanwhile this is ok, I guess. Mind leaving a comment in the collect_stacking_contexts_for_blocklike_fragments declaration pointing to this PR and that issue, noting that we could get rid of it?

@emilio
Copy link
Member

emilio commented Sep 14, 2017

I wonder how many similar bugs did TruncatedFragment introduce... :(

@mrobinson
Copy link
Member Author

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

📌 Commit 98d70ea has been approved by emilio

@highfive highfive assigned emilio and unassigned Manishearth Sep 14, 2017
@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 Sep 14, 2017
@mrobinson mrobinson force-pushed the truncated-fragment-stacking-context-collection branch from 98d70ea to 4262723 Compare September 14, 2017 18:24
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 14, 2017
@mrobinson
Copy link
Member Author

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

📌 Commit 4262723 has been approved by emilio

@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 Sep 14, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 4262723 with merge 2cedfcd...

bors-servo pushed a commit that referenced this pull request Sep 15, 2017
…collection, r=emilio

Properly handle stacking context collection for truncated fragments

Before we did not properly descend intro truncated fragments when
collecting stacking contexts. This change makes sure that we descend
properly

Fixes #18254.
Fixes #17072.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #18254,  #17072 (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18510)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - android

@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 Sep 15, 2017
Before we did not properly descend intro truncated fragments when
collecting stacking contexts. This change makes sure that we descend
properly

Fixes servo#18254.
Fixes servo#17072.
@mrobinson mrobinson force-pushed the truncated-fragment-stacking-context-collection branch from 4262723 to 73c8947 Compare September 15, 2017 13:33
@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 Sep 15, 2017
@mrobinson
Copy link
Member Author

I rebased this properly and will send it back to bors.

@mrobinson
Copy link
Member Author

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

📌 Commit 73c8947 has been approved by emilio

@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 Sep 15, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit 73c8947 with merge 5d0d5af...

bors-servo pushed a commit that referenced this pull request Sep 15, 2017
…collection, r=emilio

Properly handle stacking context collection for truncated fragments

Before we did not properly descend intro truncated fragments when
collecting stacking contexts. This change makes sure that we descend
properly

Fixes #18254.
Fixes #17072.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #18254,  #17072 (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18510)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt1

@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 Sep 15, 2017
@mrobinson
Copy link
Member Author

@bors-servo retry

  • The mac builder timed out with no relevant output.

@bors-servo
Copy link
Contributor

⌛ Testing commit 73c8947 with merge 4911706...

bors-servo pushed a commit that referenced this pull request Sep 16, 2017
…collection, r=emilio

Properly handle stacking context collection for truncated fragments

Before we did not properly descend intro truncated fragments when
collecting stacking contexts. This change makes sure that we descend
properly

Fixes #18254.
Fixes #17072.

<!-- Please describe your changes on the following line: -->

---
<!-- 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 #18254,  #17072 (github issue number if applicable).

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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/18510)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Sep 16, 2017
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: emilio
Pushing 4911706 to master...

@bors-servo bors-servo merged commit 73c8947 into servo:master Sep 16, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Sep 16, 2017
@mrobinson mrobinson deleted the truncated-fragment-stacking-context-collection branch October 3, 2017 11:06
bors-servo pushed a commit that referenced this pull request Dec 6, 2019
Fix "Tried to use SpatialId before it was defined" layout panic

In the case where an element uses `text-overflow: ellipsis` and causes overflow, we create a TruncatedFragment that wraps the original overflowing fragment. When collecting stacking contexts for the truncated fragment, #18510 addressed the case where the wrapped fragment wouldn't be processed, but neglected the case where that fragment ends up creating a new stacking context. When that happens, the TruncatedFragment would be stuck with the updated scrolling/clipping information based on the new stacking context, but it would be a child of the parent stacking context. Since the new scrolling/clipping nodes do not exist in the display list until the new stacking context display item is created, this led to the observed panic.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24895 and #19281 and #22826.
- [x] There are tests for these changes
bors-servo pushed a commit that referenced this pull request Dec 6, 2019
Fix "Tried to use SpatialId before it was defined" layout panic

In the case where an element uses `text-overflow: ellipsis` and causes overflow, we create a TruncatedFragment that wraps the original overflowing fragment. When collecting stacking contexts for the truncated fragment, #18510 addressed the case where the wrapped fragment wouldn't be processed, but neglected the case where that fragment ends up creating a new stacking context. When that happens, the TruncatedFragment would be stuck with the updated scrolling/clipping information based on the new stacking context, but it would be a child of the parent stacking context. Since the new scrolling/clipping nodes do not exist in the display list until the new stacking context display item is created, this led to the observed panic.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24895 and #19281 and #22826.
- [x] There are tests for these changes
bors-servo pushed a commit that referenced this pull request Dec 9, 2019
Fix "Tried to use SpatialId before it was defined" layout panic

In the case where an element uses `text-overflow: ellipsis` and causes overflow, we create a TruncatedFragment that wraps the original overflowing fragment. When collecting stacking contexts for the truncated fragment, #18510 addressed the case where the wrapped fragment wouldn't be processed, but neglected the case where that fragment ends up creating a new stacking context. When that happens, the TruncatedFragment would be stuck with the updated scrolling/clipping information based on the new stacking context, but it would be a child of the parent stacking context. Since the new scrolling/clipping nodes do not exist in the display list until the new stacking context display item is created, this led to the observed panic.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24895 and fix #19281 and fix #22826.
- [x] There are tests for these changes
bors-servo pushed a commit that referenced this pull request Dec 9, 2019
Fix "Tried to use SpatialId before it was defined" layout panic

In the case where an element uses `text-overflow: ellipsis` and causes overflow, we create a TruncatedFragment that wraps the original overflowing fragment. When collecting stacking contexts for the truncated fragment, #18510 addressed the case where the wrapped fragment wouldn't be processed, but neglected the case where that fragment ends up creating a new stacking context. When that happens, the TruncatedFragment would be stuck with the updated scrolling/clipping information based on the new stacking context, but it would be a child of the parent stacking context. Since the new scrolling/clipping nodes do not exist in the display list until the new stacking context display item is created, this led to the observed panic.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24895 and fix #19281 and fix #22826.
- [x] There are tests for these changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants