Skip to content
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

Implement CanvasRenderingContext2D.font property #26176

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove misplaced borrow() calls

  • Loading branch information
pylbrecht committed May 11, 2020
commit e3ad2635e398d55de8f4aeb50c5e3a49b13c7413
@@ -609,12 +609,12 @@ impl CanvasRenderingContext2DMethods for CanvasRenderingContext2D {

// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
fn Font(&self) -> DOMString {
self.canvas_state.borrow().font()
self.canvas_state.font()
}

// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
fn SetFont(&self, value: DOMString) {
self.canvas_state.borrow().set_font(value)
self.canvas_state.set_font(value)
}
}

@@ -516,11 +516,11 @@ impl OffscreenCanvasRenderingContext2DMethods for OffscreenCanvasRenderingContex

// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
fn Font(&self) -> DOMString {
self.canvas_state.borrow().font()
self.canvas_state.font()
}

// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
fn SetFont(&self, value: DOMString) {
self.canvas_state.borrow().set_font(value)
self.canvas_state.set_font(value)
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.