Skip to content

Fix various issues with overflow clipping - #16463

Merged
bors-servo merged 1 commit into
servo:masterfrom
mrobinson:various-overflow-fixes
Apr 17, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
mrobinson:various-overflow-fixes

Conversation

@mrobinson

@mrobinson mrobinson commented Apr 14, 2017 •

Copy link
Copy Markdown
Member

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

@mrobinson
mrobinson requested review from glennw and pcwalton April 14, 2017 18:10
@highfive highfive assigned ghost Apr 14, 2017
@highfive

Copy link
Copy Markdown

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 Apr 14, 2017
@ghost

ghost commented Apr 14, 2017

Copy link
Copy Markdown

r? @pcwalton or @glennw

@highfive highfive assigned pcwalton and unassigned ghost Apr 14, 2017
let containing_scroll_root_id = self.setup_scroll_root_for_block(state);

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay! I've added a function for this.

@emilio

emilio commented Apr 17, 2017

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 668078e has been approved by emilio

@highfive highfive assigned emilio and unassigned pcwalton Apr 17, 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 Apr 17, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 668078e with merge e62ad1b...

bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt2

@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 Apr 17, 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.
@mrobinson
mrobinson force-pushed the various-overflow-fixes branch from 668078e to 4213b32 Compare April 17, 2017 12:22
@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 Apr 17, 2017
@mrobinson

mrobinson commented Apr 17, 2017 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member Author

@bors-servo r=emilio

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 4213b32 has been approved by emilio

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Apr 17, 2017
@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 17, 2017
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4213b32 with merge b9274b7...

bors-servo pushed 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
Copy Markdown
Contributor

☀️ 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
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 17, 2017
@mrobinson
mrobinson deleted the various-overflow-fixes branch April 17, 2017 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants