Skip to content

Move DL items from gfx to layout and implement corner clipping - #20420

Merged
bors-servo merged 2 commits into
servo:masterfrom
pyfisch:corner-clipping
Apr 29, 2018
Merged

bors-servo merged 2 commits into
servo:masterfrom
pyfisch:corner-clipping

Conversation

@pyfisch

@pyfisch pyfisch commented Mar 24, 2018 •

Copy link
Copy Markdown
Contributor

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, closes #19680, closes #19802


  • ./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
Copy Markdown

Heads up! This PR modifies the following files:

  • @emilio: components/layout/block.rs, components/layout/animation.rs, components/layout/display_list/background.rs, components/layout/display_list/items.rs, components/layout/opaque_node.rs and 10 more

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 24, 2018
@pyfisch

pyfisch commented Mar 24, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 26ace4c with merge 50b6e63...

bors-servo pushed a commit that referenced this pull request Mar 24, 2018
WIP Move DL items from gfx to layout

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, #19680, #19802

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] 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/20420)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-dev-unit

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Mar 24, 2018
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Mar 25, 2018
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Opened new PR for upstreamable changes.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#44.

@pyfisch pyfisch changed the title WIP Move DL items from gfx to layout Move DL items from gfx to layout Mar 25, 2018
@pyfisch

pyfisch commented Mar 25, 2018

Copy link
Copy Markdown
Contributor Author

This is now ready for review.

The two failing tests are some weird bug that only occurs for elements with direction: rtl in certain conditions. It appears that the WritingMode is empty for these elements while the border_padding has direction RTL. This causes an assertion in debug mode to fail.

@pyfisch

pyfisch commented Mar 25, 2018

Copy link
Copy Markdown
Contributor Author

@Manishearth: You created the "build_display_list_for_background_if_applicable_with_background" method. I guess based on the name it should display the provided background instead of the element background. But in only uses the provided background for color and not for images and gradients. (It does not suffice to remove the line because the different images again access the background via style: &ComputedValues.

@Manishearth

Copy link
Copy Markdown
Member

Ah, oops. It should be using the same background. You're right that that's not enough; fixing the rest is a part of the fix for #20093 (which I haven't had time to get to)

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#44.

@pyfisch

pyfisch commented Apr 21, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#44.

@pyfisch

pyfisch commented Apr 21, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo try

@pyfisch

pyfisch commented Apr 21, 2018

Copy link
Copy Markdown
Contributor Author

r? @emilio

This PR moves the display list items from the gfx crate to layout. They are only ever used in layout and moving them there will hopefully decrease compile when modifying these items as gfx stays untouched. This also adds corner clipping for backgrounds along with a test.

Previously this used the same code to clip the background color and the background images but I reverted it because of two failing right-to-left tests.

As you see I tried to start bors but for some reason the bot is not replying?

@highfive highfive assigned emilio and unassigned Manishearth Apr 21, 2018
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes servo#19649, servo#19680, servo#19802
@servo-wpt-sync

Copy link
Copy Markdown
Collaborator

Transplanted upstreamable changes to existing PR.

Completed upstream sync of web-platform-test changes at jdm/web-platform-tests#44.

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt2

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 27, 2018
@pyfisch

pyfisch commented Apr 27, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit aada975 with merge 1546cfe...

bors-servo pushed a commit that referenced this pull request Apr 27, 2018
Move DL items from gfx to layout and implement corner clipping

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, closes #19680, closes #19802

<!-- 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 #__ (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/20420)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💥 Test timed out

@pyfisch

pyfisch commented Apr 28, 2018

Copy link
Copy Markdown
Contributor Author

@emilio, @nox I don't know what "test timed out" means. This PR didn't pass CI now so many times (for reasons probably outside my code) that I give up trying.

Can you merge the PR for me? Tell me if the code needs changes.

@nox

nox commented Apr 28, 2018

Copy link
Copy Markdown
Contributor

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit aada975 with merge 7f1311d...

bors-servo pushed a commit that referenced this pull request Apr 28, 2018
Move DL items from gfx to layout and implement corner clipping

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, closes #19680, closes #19802

<!-- 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 #__ (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/20420)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 28, 2018
@CYBAI

CYBAI commented Apr 28, 2018

Copy link
Copy Markdown
Member
{"status": "FAIL", "group": "default", "message": "ReferrerPolicyTestCase is not defined", "stack": "@http://web-platform.test:8000/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/iframe-tag/cross-origin.no-redirect.http.html:23:7\n", "subtest": "Referrer-Policy: Referrer Policy is set to 'origin-when-cross-origin'", "test": "/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/iframe-tag/cross-origin.no-redirect.http.html", "line": 179025, "action": "test_result", "expected": "PASS"}
{"status": "OK", "group": "default", "message": null, "stack": null, "subtest": null, "test": "/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/iframe-tag/cross-origin.no-redirect.http.html", "line": 179026, "action": "test_result", "expected": "TIMEOUT"}

@emilio

emilio commented Apr 29, 2018

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

💡 This pull request was already approved, no need to approve it again.

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit aada975 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-tests-failed The changes caused existing tests to fail. labels Apr 29, 2018
@emilio

emilio commented Apr 29, 2018

Copy link
Copy Markdown
Member

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit aada975 with merge 0ff6f32...

bors-servo pushed a commit that referenced this pull request Apr 29, 2018
Move DL items from gfx to layout and implement corner clipping

Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, closes #19680, closes #19802

<!-- 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 #__ (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/20420)
<!-- 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-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: emilio
Pushing 0ff6f32 to master...

@bors-servo
bors-servo merged commit aada975 into servo:master Apr 29, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 29, 2018
@bors-servo bors-servo mentioned this pull request Apr 29, 2018
jdm pushed a commit to web-platform-tests/wpt that referenced this pull request May 1, 2018
Implement corner clipping.
Remove PixelFormat from WebrenderImageInfo.
Use WebRender text shadow.
Remove MallocSizeOf and Deserialize for DL items.

Closes #19649, #19680, #19802

Upstreamed from servo/servo#20420 [ci skip]
jdm pushed a commit to web-platform-tests/wpt that referenced this pull request May 1, 2018
A utility function assures that if the clipping and scrolling are changed
for a display item the old value is later restored.

Upstreamed from servo/servo#20420 [ci skip]
@pyfisch
pyfisch deleted the corner-clipping branch May 2, 2018 14:25
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.

Border-radius don't crop background-image Browser.html tile corners no longer rendered correctly Implement Corner Clipping

8 participants