aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/offscreencanvas.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-05-28 23:13:23 -0400
committerGitHub <noreply@github.com>2019-05-28 23:13:23 -0400
commit8dc7a25893cbe9a2c958966618d28757201899b6 (patch)
tree953ca23ef3bd4b6072021e76ae2527bfea7690d8 /components/script/dom/offscreencanvas.rs
parent84ec1316c90a29f07c60e10f78ba4d9f3185bef8 (diff)
parent85c20db495b25af653e6cb77130e166fae8d4b20 (diff)
downloadservo-8dc7a25893cbe9a2c958966618d28757201899b6.tar.gz
servo-8dc7a25893cbe9a2c958966618d28757201899b6.zip
Auto merge of #23381 - maharsh312:master, r=jdm
Canvas Components for OffscreenCanvas <!-- 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 - [ ] 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/23381) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/offscreencanvas.rs')
-rw-r--r--components/script/dom/offscreencanvas.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/offscreencanvas.rs b/components/script/dom/offscreencanvas.rs
index bc1e6fb6fac..5086287dbb3 100644
--- a/components/script/dom/offscreencanvas.rs
+++ b/components/script/dom/offscreencanvas.rs
@@ -93,7 +93,12 @@ impl OffscreenCanvas {
};
}
let size = self.get_size();
- let context = OffscreenCanvasRenderingContext2D::new(&self.global(), self, size);
+ let context = OffscreenCanvasRenderingContext2D::new(
+ &self.global(),
+ self,
+ size,
+ self.placeholder.as_ref().map(|c| &**c),
+ );
*self.context.borrow_mut() = Some(OffscreenCanvasContext::OffscreenContext2d(
Dom::from_ref(&*context),
));