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
Clear webrender image id when resizing a canvas. #17278
Merged
bors-servo
merged 1 commit into
servo:master
from
asajeffrey:canvas-clear-webrender-image-key-when-resizing
Jun 13, 2017
+76
−1
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.
Loading status checks…
Clear webrender image id when resizing a canvas.
- Loading branch information
commit 4e04daa9d08b4ad45fcdb001677ea8b4035049c7
| @@ -0,0 +1,25 @@ | ||
| <!doctype html> | ||
| <html class="reftest-wait"> | ||
| <head> | ||
| <meta charset=utf-8> | ||
| <title>Resizing a canvas</title> | ||
| <link rel=match href=/_mozilla/mozilla/canvas/set_dimensions_ref.html> | ||
| </head> | ||
|
|
||
| <body> | ||
| <canvas width="50px" height="50px"></canvas> | ||
| <script> | ||
| var canvas = document.getElementsByTagName('canvas')[0]; | ||
| var ctx = canvas.getContext('2d'); | ||
| ctx.fillStyle = "red"; | ||
| ctx.fillRect(0, 0, canvas.width, canvas.height); | ||
| setTimeout(function() { | ||
| canvas.width = 100; | ||
| canvas.height = 100; | ||
| ctx.fillStyle = "green"; | ||
| ctx.fillRect(0, 0, canvas.width, canvas.height); | ||
| document.documentElement.classList.remove("reftest-wait"); | ||
| }, 0); | ||
| </script> | ||
| </body> | ||
| </html> |
| @@ -0,0 +1,17 @@ | ||
| <!doctype html> | ||
| <html> | ||
| <head> | ||
| <meta charset=utf-8> | ||
| <title>Resizing a canvas reference</title> | ||
| </head> | ||
|
|
||
| <body> | ||
| <canvas width="100px" height="100px"></canvas> | ||
| <script> | ||
| var canvas = document.getElementsByTagName('canvas')[0]; | ||
| var ctx = canvas.getContext('2d'); | ||
| ctx.fillStyle = "green"; | ||
| ctx.fillRect(0, 0, canvas.width, canvas.height); | ||
| </script> | ||
| </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.
r=me, but could you do the same in the
webgl_paint_thread? Right now the readback path suffers the same problem afaict.