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 duplicate stacking context creation for anonymous Flows #18921

Merged
merged 1 commit into from Oct 19, 2017

Conversation

@mrobinson
Copy link
Member

mrobinson commented Oct 17, 2017

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because they are covered by existing tests.

This change is Reviewable

@highfive
Copy link

highfive commented Oct 17, 2017

Heads up! This PR modifies the following files:

  • @bholley: components/style/stylist.rs
  • @canaltinova: components/style/stylist.rs
  • @emilio: components/layout/block.rs, components/layout/display_list_builder.rs, components/style/stylist.rs, components/layout/table.rs
@highfive
Copy link

highfive commented Oct 17, 2017

warning Warning warning

  • These commits modify style and layout code, but no tests are modified. Please consider adding a test!
@mrobinson
Copy link
Member Author

mrobinson commented Oct 17, 2017

A couple tests fail due to missing display:inline-table support. These failures were hidden before. I'm also noticing a couple passes that I'd like to confirm via bors now.

@bors-servo try

@bors-servo
Copy link
Contributor

bors-servo commented Oct 17, 2017

Trying commit b3ad3fb with merge bff283c...

@mrobinson mrobinson force-pushed the mrobinson:incremental-stacking-context-ids branch 2 times, most recently from cf5af6e to b3ad3fb Oct 17, 2017
bors-servo added a commit that referenced this pull request Oct 17, 2017
…<try>

Fix duplicate stacking context creation for anonymous Flows

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are covered by existing tests.

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

bors-servo commented Oct 17, 2017

💔 Test failed - linux-rel-css

@mrobinson mrobinson force-pushed the mrobinson:incremental-stacking-context-ids branch from b3ad3fb to ae3c4be Oct 17, 2017
@mrobinson
Copy link
Member Author

mrobinson commented Oct 17, 2017

The failures and passes were the ones that I was expecting. I've updated the PR and it should be ready to review.

@bors-servo try

@bors-servo
Copy link
Contributor

bors-servo commented Oct 17, 2017

Trying commit ae3c4be with merge 891bbe8...

bors-servo added a commit that referenced this pull request Oct 17, 2017
…<try>

Fix duplicate stacking context creation for anonymous Flows

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are covered by existing tests.

<!-- 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/18921)
<!-- Reviewable:end -->
@mrobinson mrobinson requested review from mbrubeck and emilio Oct 17, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Oct 17, 2017

@emilio
emilio approved these changes Oct 17, 2017
Copy link
Member

emilio left a comment

So, I still think the INHERIT_ALL flag may be pretty broken (what happens when we transform a table, do we double transform it because it also applies to the parent?)

I also don't know what a non-anonymous table wrapper is supposed to be, so maybe @mbrubeck, which reviewed the Legalizer stuff could take another look.

In any case, this looks like a step in the right direction, r=me

@@ -763,12 +763,12 @@ impl Stylist {

// For most (but not all) pseudo-elements, we inherit all values from the parent.
let inherit_all = match *pseudo {
PseudoElement::ServoAnonymousTableCell |
PseudoElement::ServoAnonymousTableRow |

This comment has been minimized.

@emilio

emilio Oct 17, 2017

Member

Please add a comment on how this infliluences stacking context creation and such?

This comment has been minimized.

@mrobinson

mrobinson Oct 18, 2017

Author Member

I left some comments here. I think they also answer your earlier question about transformations.

if self.base.flags.contains(IS_ABSOLUTELY_POSITIONED) ||
self.fragment.style.get_box().position != position::T::static_ ||
self.base.flags.is_float() {
BlockStackingContextType::PseudoStackingContext

This comment has been minimized.

@emilio

emilio Oct 17, 2017

Member

Maybe this reads nicer returning early in each of those cases? Your call.

This comment has been minimized.

@mrobinson

mrobinson Oct 18, 2017

Author Member

Okay. This seems like an improvement to me as well.

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.
@mrobinson mrobinson force-pushed the mrobinson:incremental-stacking-context-ids branch from ae3c4be to 36fa7e4 Oct 18, 2017
@mrobinson
Copy link
Member Author

mrobinson commented Oct 18, 2017

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 18, 2017

📌 Commit 36fa7e4 has been approved by emilio

@highfive highfive assigned emilio and unassigned nox Oct 18, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Oct 18, 2017

Testing commit 36fa7e4 with merge ed47981...

bors-servo added a commit that referenced this pull request Oct 18, 2017
…emilio

Fix duplicate stacking context creation for anonymous Flows

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are covered by existing tests.

<!-- 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/18921)
<!-- Reviewable:end -->
@jdm
Copy link
Member

jdm commented Oct 19, 2017

@bors-servo: retry

@jdm jdm closed this Oct 19, 2017
@jdm jdm reopened this Oct 19, 2017
@jdm
Copy link
Member

jdm commented Oct 19, 2017

@jdm
Copy link
Member

jdm commented Oct 19, 2017

@bors-servo; r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 19, 2017

📌 Commit 36fa7e4 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 19, 2017

Testing commit 36fa7e4 with merge 865b9ae...

bors-servo added a commit that referenced this pull request Oct 19, 2017
…emilio

Fix duplicate stacking context creation for anonymous Flows

Anonymous nodes were previously creating duplicate stacking contexts,
one for each node in the anonymous node chain. This change eliminates
that for tables.

Additionally the use of stacking context ids based on node addresses is
no longer necessary since stacking contexts no longer control scrolling.
This is the first step in eliminating the dependency between node
addresses and ClipScrollNodes which causes issues like #16425.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they are covered by existing tests.

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

bors-servo commented Oct 19, 2017

@bors-servo bors-servo merged commit 36fa7e4 into servo:master Oct 19, 2017
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.