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
Paint worklet size should agree with Chrome. #17456
Merged
bors-servo
merged 1 commit into
servo:master
from
asajeffrey:script-paint-worklets-size
Jun 22, 2017
+75
−2
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
| @@ -0,0 +1,17 @@ | ||
| <!doctype html> | ||
| <html class="reftest-wait"> | ||
| <head> | ||
| <meta charset=utf-8> | ||
| <title>Test the size parameter of paint worklets</title> | ||
| <link rel=match href=/_mozilla/mozilla/worklets/test_paint_worklet_ref.html> | ||
| </head> | ||
| <body> | ||
| <div style="height: 100px; width: 200px; background: paint(test); | ||
| margin: 10px; border: 3px solid blue; padding: 5px;"></div> | ||
| </body> | ||
| <script> | ||
| window.paintWorklet | ||
| .addModule("test_paint_worklet_size.js") | ||
| .then(function() { document.documentElement.classList.remove("reftest-wait"); }); | ||
| </script> | ||
| </html> |
| @@ -0,0 +1,8 @@ | ||
| registerPaint("test", class { | ||
| paint(ctx, size) { | ||
| if ((size.width === 210) && (size.height === 110)) { | ||
| ctx.fillStyle = "green"; | ||
| ctx.fillRect(0, 0, size.width, size.height); | ||
| } | ||
| } | ||
| }); |
| @@ -0,0 +1,7 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <body> | ||
| <div style="height: 100px; width: 200px; background: green; | ||
| margin: 10px; border: 3px solid blue; padding: 5px;"></div> | ||
| </body> | ||
| </html> |
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Huh? Why expected fail?