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 various issues with overflow clipping #16463

Merged
merged 1 commit into from Apr 17, 2017

Conversation

@mrobinson
Copy link
Member

mrobinson commented Apr 14, 2017

When dealing absolutely positioned items, we should use clip of our
containing block, even if our containing block doesn't itself establish
a new overflow clip. Additionally, we need to properly handle
assigning scroll root ids to fragments of inline elements.

We add a test for this behavior.


  • ./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 _____

This change is Reviewable

@highfive
Copy link

highfive commented Apr 14, 2017

Heads up! This PR modifies the following files:

  • @emilio: components/layout/display_list_builder.rs
@wafflespeanut
Copy link
Member

wafflespeanut commented Apr 14, 2017

@highfive highfive assigned pcwalton and unassigned wafflespeanut Apr 14, 2017
@@ -1953,6 +1953,12 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
// we don't want it to be clipped by its own scroll root.
let containing_scroll_root_id = self.setup_scroll_root_for_block(state);

match self.positioning() {
position::T::absolute | position::T::relative | position::T::fixed =>

This comment has been minimized.

Copy link
@emilio

emilio Apr 16, 2017

Member

Perhaps a new method that returns a boolean if this matches could avoid some duplication?

This comment has been minimized.

Copy link
@mrobinson

mrobinson Apr 17, 2017

Author Member

Okay! I've added a function for this.

@mrobinson mrobinson force-pushed the mrobinson:various-overflow-fixes branch from cd07cbc to 668078e Apr 17, 2017
@mrobinson mrobinson mentioned this pull request Apr 17, 2017
4 of 5 tasks complete
@emilio
Copy link
Member

emilio commented Apr 17, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Apr 17, 2017

📌 Commit 668078e has been approved by emilio

@highfive highfive assigned emilio and unassigned pcwalton Apr 17, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Apr 17, 2017

Testing commit 668078e with merge e62ad1b...

bors-servo added a commit that referenced this pull request Apr 17, 2017
Fix various issues with overflow clipping

When dealing absolutely positioned items, we should use clip of our
containing block, even if our containing block doesn't itself establish
a new overflow clip. Additionally, we need to properly handle
assigning scroll root ids to fragments of inline elements.

We add a test for this behavior.

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

bors-servo commented Apr 17, 2017

💔 Test failed - mac-rel-wpt2

When dealing absolutely positioned items, we should use clip of our
containing block, even if our containing block doesn't itself establish
a new overflow clip. Additionally, we need to properly handle
assigning scroll root ids to fragments of inline elements.

We add a test for this behavior.
@mrobinson mrobinson force-pushed the mrobinson:various-overflow-fixes branch from 668078e to 4213b32 Apr 17, 2017
@mrobinson
Copy link
Member Author

mrobinson commented Apr 17, 2017

The new test is failing, but one result is currently incorrect because of #16462. I'm going to try to disable this particular test case (until the bug is fixed), on the chance that the bug is causing platform-dependent behavior.

The new branch should have updated version of the test. @emilio, is it okay that I try to land this again?

@mrobinson
Copy link
Member Author

mrobinson commented Apr 17, 2017

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

bors-servo commented Apr 17, 2017

📌 Commit 4213b32 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Apr 17, 2017

Testing commit 4213b32 with merge b9274b7...

bors-servo added a commit that referenced this pull request Apr 17, 2017
Fix various issues with overflow clipping

When dealing absolutely positioned items, we should use clip of our
containing block, even if our containing block doesn't itself establish
a new overflow clip. Additionally, we need to properly handle
assigning scroll root ids to fragments of inline elements.

We add a test for this behavior.

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

bors-servo commented Apr 17, 2017

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

@bors-servo bors-servo merged commit 4213b32 into servo:master Apr 17, 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
@mrobinson mrobinson deleted the mrobinson:various-overflow-fixes branch Apr 17, 2017
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.