mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #8728 - dzbarsky:reset_bitmpa, r=dzbarsky
Reset canvas state when changing bitmap dimensions Ran http://mxr.mozilla.org/servo/source/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html?force=1#88 to confirm that this code is being executed, but the test still fails because the font isn't implemented and the expando doesn't get reset. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8728) <!-- Reviewable:end -->
This commit is contained in:
commit
2bb34feb3e
4 changed files with 103 additions and 2 deletions
|
@ -81,7 +81,7 @@ impl HTMLCanvasElement {
|
|||
let size = self.get_size();
|
||||
if let Some(ref context) = *self.context.borrow() {
|
||||
match *context {
|
||||
CanvasContext::Context2d(ref context) => context.recreate(size),
|
||||
CanvasContext::Context2d(ref context) => context.set_bitmap_dimensions(size),
|
||||
CanvasContext::WebGL(ref context) => context.recreate(size),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue