mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement CanvasRenderingContext2d.fillText's "unimplemented" message
This commit is contained in:
parent
1c9c0334ba
commit
2af828485f
6 changed files with 35 additions and 3 deletions
|
@ -133,6 +133,7 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
match msg.unwrap() {
|
||||
CanvasMsg::Canvas2d(message) => {
|
||||
match message {
|
||||
Canvas2dMsg::FillText(text, x, y, max_width) => painter.fill_text(text, x, y, max_width),
|
||||
Canvas2dMsg::FillRect(ref rect) => painter.fill_rect(rect),
|
||||
Canvas2dMsg::StrokeRect(ref rect) => painter.stroke_rect(rect),
|
||||
Canvas2dMsg::ClearRect(ref rect) => painter.clear_rect(rect),
|
||||
|
@ -228,6 +229,10 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn fill_text(&self, text: String, x: f64, y: f64, max_width: Option<f64>) {
|
||||
error!("Unimplemented canvas2d.fillText. Values received: {}, {}, {}, {:?}.", text, x, y, max_width);
|
||||
}
|
||||
|
||||
fn fill_rect(&self, rect: &Rect<f32>) {
|
||||
if is_zero_size_gradient(&self.state.fill_style) {
|
||||
return; // Paint nothing if gradient size is zero.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue