mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Add accountable-refcell as optional build time feature
This commit is contained in:
parent
bd636b0e6c
commit
02c1612cb0
29 changed files with 69 additions and 44 deletions
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::dom::attr::Attr;
|
||||
use crate::dom::bindings::cell::DomRefCell;
|
||||
use crate::dom::bindings::cell::{ref_filter_map, DomRefCell, Ref};
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::{
|
||||
HTMLCanvasElementMethods, RenderingContext,
|
||||
|
@ -44,7 +44,6 @@ use js::rust::HandleValue;
|
|||
use profile_traits::ipc;
|
||||
use script_layout_interface::{HTMLCanvasData, HTMLCanvasDataSource};
|
||||
use servo_config::pref;
|
||||
use std::cell::Ref;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
||||
const DEFAULT_WIDTH: u32 = 300;
|
||||
|
@ -192,7 +191,7 @@ impl LayoutHTMLCanvasElementHelpers for LayoutDom<HTMLCanvasElement> {
|
|||
|
||||
impl HTMLCanvasElement {
|
||||
pub fn context(&self) -> Option<Ref<CanvasContext>> {
|
||||
ref_filter_map::ref_filter_map(self.context.borrow(), |ctx| ctx.as_ref())
|
||||
ref_filter_map(self.context.borrow(), |ctx| ctx.as_ref())
|
||||
}
|
||||
|
||||
fn get_or_init_2d_context(&self) -> Option<DomRoot<CanvasRenderingContext2D>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue