mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Query layout to resolve canvas font property value
This commit is contained in:
parent
f161ab8e57
commit
7883718c12
11 changed files with 161 additions and 9 deletions
|
@ -257,6 +257,17 @@ impl OffscreenCanvasRenderingContext2DMethods for OffscreenCanvasRenderingContex
|
|||
self.canvas_state.measure_text(&self.global(), text)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
|
||||
fn Font(&self) -> DOMString {
|
||||
self.canvas_state.font()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-font
|
||||
fn SetFont(&self, value: DOMString) {
|
||||
self.canvas_state
|
||||
.set_font(self.htmlcanvas.as_ref().map(|c| &**c), value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-context-2d-linewidth
|
||||
fn LineWidth(&self) -> f64 {
|
||||
self.canvas_state.line_width()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue