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

Implement paint worklet properties #17364

Merged

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Jun 16, 2017

This is the final PR to get basic paint worklet support. It adds support for paint worklet properties (https://drafts.css-houdini.org/css-paint-api/#paint-definition-input-properties). When a paint worklet is registered, it specifies a list of CSS properties, and is provided with their computed values when it is invoked.

This is a dependent PR:

  • "Implemented paint worklets invoking worklet scripts" is #17239.
  • "Implemented paint worklets rendering contexts" is #17326.

There should be tests added for this, hopefully the existing wpt houdini tests.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #16839
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Jun 16, 2017

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/webidls/PaintWorkletGlobalScope.webidl, components/script/dom/webidls/StylePropertyMapReadOnly.webidl, components/script_layout_interface/lib.rs, components/script/dom/testworkletglobalscope.rs, components/script/dom/mod.rs and 23 more
  • @fitzgen: components/script/dom/webidls/PaintWorkletGlobalScope.webidl, components/script/dom/webidls/StylePropertyMapReadOnly.webidl, components/script_layout_interface/lib.rs, components/script/dom/testworkletglobalscope.rs, components/script/dom/mod.rs and 23 more
  • @emilio: components/layout/display_list_builder.rs, components/layout/context.rs, components/layout/Cargo.toml, components/layout/lib.rs
@highfive
Copy link

highfive commented Jun 16, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 16, 2017

@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 16, 2017

The simplest Google demo now renders

@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch from cc7008e to 9a4c11b Jun 20, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Jun 22, 2017

The latest upstream changes (presumably #17456) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch from 9a784c8 to 486297b Jun 22, 2017
@asajeffrey
Copy link
Member Author

asajeffrey commented Jun 23, 2017

out

asajeffrey added a commit to asajeffrey/servo that referenced this pull request Jun 23, 2017
asajeffrey added a commit to asajeffrey/servo that referenced this pull request Jun 28, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Jun 30, 2017

The latest upstream changes (presumably #17239) made this pull request unmergeable. Please resolve the merge conflicts.

asajeffrey added a commit to asajeffrey/servo that referenced this pull request Jun 30, 2017
@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch from 486297b to 21ab344 Jul 3, 2017
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 3, 2017

Rebased. This PRs dependencies have all landed, so it's ready for review.

@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch 2 times, most recently from 737a46f to 9db541a Jul 4, 2017
@bors-servo
Copy link
Contributor

bors-servo commented Jul 6, 2017

The latest upstream changes (presumably #17615) made this pull request unmergeable. Please resolve the merge conflicts.

@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch from 24349c4 to 0f81cd7 Jul 6, 2017
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 11, 2017

Squashed. @bors-servo: r=jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 11, 2017

📌 Commit 7fbd9c5 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 11, 2017

Testing commit 7fbd9c5 with merge 0da75a2...

bors-servo added a commit that referenced this pull request Jul 11, 2017
…=jdm

Implement paint worklet properties

<!-- Please describe your changes on the following line: -->

This is the final PR to get basic paint worklet support. It adds support for paint worklet properties (https://drafts.css-houdini.org/css-paint-api/#paint-definition-input-properties). When a paint worklet is registered, it specifies a list of CSS properties, and is provided with their computed values when it is invoked.

This is a dependent PR:
* "Implemented paint worklets invoking worklet scripts" is #17239.
* "Implemented paint worklets rendering contexts" is #17326.

There should be tests added for this, hopefully the existing wpt houdini tests.

---
<!-- 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 #16839
- [x] There are tests for these changes

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

bors-servo commented Jul 11, 2017

💔 Test failed - mac-rel-wpt4

@jdm
Copy link
Member

jdm commented Jul 11, 2017

  ▶ Unexpected subtest result in /_mozilla/mozilla/interfaces.html:
  │ FAIL [expected PASS] Interfaces exposed on the window
  │   → assert_true: If this is failing: DANGER, are you sure you want to expose the new interface CSSStyleValue to all webpages as a property on the global? Do not make a change to this file without review from jdm or Ms2ger for that specific change! expected true got false
  │ 
  │ test_interfaces/<@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:73:7
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1406:20
  │ test@http://web-platform.test:8000/resources/testharness.js:497:9
  │ test_interfaces@http://web-platform.test:8000/_mozilla/mozilla/interfaces.js:2:3
  └ @http://web-platform.test:8000/_mozilla/mozilla/interfaces.html:13:1
@asajeffrey asajeffrey force-pushed the asajeffrey:script-paint-worklets-properties branch from 7fbd9c5 to ef033b8 Jul 11, 2017
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 11, 2017

Made the new interfaces just exposed to Worklet, not Window. @bors-servo r=jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 11, 2017

📌 Commit ef033b8 has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Jul 11, 2017

🌲 The tree is currently closed for pull requests below priority 9000, this pull request will be tested once the tree is reopened

@bors-servo
Copy link
Contributor

bors-servo commented Jul 11, 2017

Testing commit ef033b8 with merge bc44246...

bors-servo added a commit that referenced this pull request Jul 11, 2017
…=jdm

Implement paint worklet properties

<!-- Please describe your changes on the following line: -->

This is the final PR to get basic paint worklet support. It adds support for paint worklet properties (https://drafts.css-houdini.org/css-paint-api/#paint-definition-input-properties). When a paint worklet is registered, it specifies a list of CSS properties, and is provided with their computed values when it is invoked.

This is a dependent PR:
* "Implemented paint worklets invoking worklet scripts" is #17239.
* "Implemented paint worklets rendering contexts" is #17326.

There should be tests added for this, hopefully the existing wpt houdini tests.

---
<!-- 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 #16839
- [x] There are tests for these changes

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

bors-servo commented Jul 12, 2017

@bors-servo bors-servo merged commit ef033b8 into servo:master Jul 12, 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
bors-servo added a commit that referenced this pull request Jul 20, 2017
Fixed scaling artefacts in paint worklets caused by zoom and hidpi

<!-- Please describe your changes on the following line: -->

This PR renders paint worklet canvases at the device pixel resolution, rather than the CSS pixel resolution.

It's a dependent PR, building on #17239, #17326 and #17364.

---
<!-- 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 #17454
- [X] These changes do not require tests because we don't run reftests with zoom enabled

<!-- 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/17499)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 21, 2017
Fixed scaling artefacts in paint worklets caused by zoom and hidpi

<!-- Please describe your changes on the following line: -->

This PR renders paint worklet canvases at the device pixel resolution, rather than the CSS pixel resolution.

It's a dependent PR, building on #17239, #17326 and #17364.

---
<!-- 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 #17454
- [X] These changes do not require tests because we don't run reftests with zoom enabled

<!-- 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/17499)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this pull request Jul 21, 2017
Implement drawing an image from a CSS style value into a canvas

<!-- Please describe your changes on the following line: -->

Implemented drawing a CSS style value into a canvas, which is needed for the Houdini CSS Paint API.

This PR is dependent on #17364.

---
<!-- 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 #17432.
- [X] These changes do not require tests because the existing CSS paint API wpt test cases test this behaviour.

<!-- 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/17634)
<!-- Reviewable:end -->
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.

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