Auto merge of #26697 - utsavoza:ugo/issue-11681/22-05-2020, r=jdm

Implement CanvasRenderingContext2d.fillText

The PR consists of broadly two main changes:
- Implementation of Canvas2dRenderingContext.font
- Basic implementation of Canvas2dRenderingContext.fillText

Although I am not fully sure about the long term goals for the canvas backend in Servo, I assumed limited scope for font and text handling (should support simple text drawing with font selection) in the current implementation as I believe a more complete implementation would eventually be brought in as a part of #22957.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #11681
- [x] There are tests for these changes
This commit is contained in:
bors-servo 2020-06-12 13:43:51 -04:00 committed by GitHub
commit 721271dcd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 928 additions and 183 deletions

View file

@ -2602,6 +2602,7 @@ pub mod style_structs {
% for style_struct in data.active_style_structs():
% if style_struct.name == "Font":
#[derive(Clone, Debug, MallocSizeOf)]
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
% else:
#[derive(Clone, Debug, MallocSizeOf, PartialEq)]
% endif