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

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

Merged
merged 2 commits into from Apr 29, 2018

Conversation

@pyfisch
Copy link
Contributor

pyfisch commented Mar 24, 2018

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

highfive commented Mar 24, 2018

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
@pyfisch
Copy link
Contributor Author

pyfisch commented Mar 24, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Mar 24, 2018

Trying commit 26ace4c with merge 50b6e63...

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

bors-servo commented Mar 24, 2018

💔 Test failed - mac-dev-unit

@pyfisch pyfisch force-pushed the pyfisch:corner-clipping branch from 26ace4c to fbc801f Mar 25, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Mar 25, 2018

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
Copy link
Contributor Author

pyfisch commented Mar 25, 2018

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
Copy link
Contributor Author

pyfisch commented Mar 25, 2018

@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
Member

Manishearth commented Mar 25, 2018

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)

@pyfisch pyfisch force-pushed the pyfisch:corner-clipping branch from fbc801f to 7fa28e3 Apr 21, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 21, 2018

Transplanted upstreamable changes to existing PR.

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

@pyfisch
Copy link
Contributor Author

pyfisch commented Apr 21, 2018

@pyfisch pyfisch force-pushed the pyfisch:corner-clipping branch from 7fa28e3 to 04c732a Apr 21, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 21, 2018

Transplanted upstreamable changes to existing PR.

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

@pyfisch
Copy link
Contributor Author

pyfisch commented Apr 21, 2018

@pyfisch
Copy link
Contributor Author

pyfisch commented Apr 21, 2018

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 #19649, #19680, #19802
@pyfisch pyfisch force-pushed the pyfisch:corner-clipping branch from 04c732a to c0be925 Apr 22, 2018
@servo-wpt-sync
Copy link
Collaborator

servo-wpt-sync commented Apr 22, 2018

Transplanted upstreamable changes to existing PR.

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

@bors-servo
Copy link
Contributor

bors-servo commented Apr 27, 2018

💔 Test failed - mac-rel-wpt2

@pyfisch
Copy link
Contributor Author

pyfisch commented Apr 27, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Apr 27, 2018

Trying commit aada975 with merge 1546cfe...

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

bors-servo commented Apr 28, 2018

💥 Test timed out

@pyfisch
Copy link
Contributor Author

pyfisch commented Apr 28, 2018

@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
Copy link
Member

nox commented Apr 28, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Apr 28, 2018

Trying commit aada975 with merge 7f1311d...

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

bors-servo commented Apr 28, 2018

💔 Test failed - linux-rel-wpt

@CYBAI
Copy link
Collaborator

CYBAI commented Apr 28, 2018

{"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
Copy link
Member

emilio commented Apr 29, 2018

@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2018

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

  • This pull request previously failed. You should add more commits to fix the bug, or use retry to trigger a build again.
  • There's another pull request that is currently being tested, blocking this pull request: #20678
@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2018

📌 Commit aada975 has been approved by emilio

@emilio
Copy link
Member

emilio commented Apr 29, 2018

@bors-servo retry

@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2018

Testing commit aada975 with merge 0ff6f32...

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

bors-servo commented Apr 29, 2018

@bors-servo bors-servo merged commit aada975 into servo:master Apr 29, 2018
3 of 4 checks passed
3 of 4 checks passed
Taskcluster (pull_request) TaskGroup: failure
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Apr 29, 2018
jdm added 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 added 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 pyfisch:corner-clipping branch May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.