mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make LayoutCanvasWebGLRenderingContextHelpers methods take self
This commit is contained in:
parent
301acdc309
commit
d87444cb1f
2 changed files with 3 additions and 3 deletions
|
@ -3886,7 +3886,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
|||
|
||||
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
|
||||
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
|
||||
let this = &*self.unsafe_get();
|
||||
(*this.base.to_layout().unsafe_get()).layout_handle()
|
||||
}
|
||||
|
|
|
@ -4447,12 +4447,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
|
||||
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource;
|
||||
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource;
|
||||
}
|
||||
|
||||
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
|
||||
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
|
||||
(*self.unsafe_get()).layout_handle()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue