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

Fix "Tried to use SpatialId before it was defined" layout panic #25158

Merged
merged 1 commit into from Dec 9, 2019

Conversation

@jdm
Copy link
Member

jdm commented Dec 6, 2019

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.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #24895 and fix #19281 and fix #22826.
  • There are tests for these changes
@highfive
Copy link

highfive commented Dec 6, 2019

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list/builder.rs
@jdm
Copy link
Member Author

jdm commented Dec 6, 2019

@bors-servo try=wpt

@bors-servo
Copy link
Contributor

bors-servo commented Dec 6, 2019

Trying commit b3e6555 with merge 2ac4eb9...

bors-servo added 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
@jdm
Copy link
Member Author

jdm commented Dec 6, 2019

@highfive highfive assigned SimonSapin and unassigned asajeffrey Dec 6, 2019
@bors-servo
Copy link
Contributor

bors-servo commented Dec 6, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member Author

jdm commented Dec 6, 2019

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Dec 6, 2019

Trying commit b3e6555 with merge 441bf24...

bors-servo added 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
Copy link
Contributor

bors-servo commented Dec 6, 2019

☀️ Test successful - status-taskcluster
State: approved= try=True

@jdm jdm removed the S-tests-failed label Dec 6, 2019
@jdm jdm force-pushed the jdm:wr-spatial-panic branch from b3e6555 to cfcc2d3 Dec 8, 2019
…ng inner fragment's stacking contexts.
@SimonSapin SimonSapin force-pushed the jdm:wr-spatial-panic branch from cfcc2d3 to 6dad51f Dec 9, 2019
@SimonSapin
Copy link
Member

SimonSapin commented Dec 9, 2019

I’ve pushed an amended commit with ./mach update-manifest

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

📌 Commit 6dad51f has been approved by SimonSapin

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

Testing commit 6dad51f with merge 03c6389...

bors-servo added 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
Copy link
Contributor

bors-servo commented Dec 9, 2019

💔 Test failed - status-taskcluster

@jdm
Copy link
Member Author

jdm commented Dec 9, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Dec 9, 2019

Testing commit 6dad51f with merge e8d677a...

bors-servo added 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
Copy link
Contributor

bors-servo commented Dec 9, 2019

☀️ Test successful - status-taskcluster
Approved by: SimonSapin
Pushing e8d677a to master...

@bors-servo bors-servo merged commit 6dad51f into servo:master Dec 9, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.