diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index f9516e82a707..9a41f651cc8a 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -2901,9 +2901,7 @@ GetFontStyleForServo(Element* aElement, const nsAString& aFont, // parsed (including having line-height removed). (Older drafts of // the spec required font sizes be converted to pixels, but that no // longer seems to be required.) - Servo_DeclarationBlock_SerializeOneValue(declarations, - eCSSProperty_font, - &aOutUsedFont); + Servo_SerializeFontValueForCanvas(declarations, &aOutUsedFont); return sc.forget(); } diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h index 1d1c7e116330..985e90f7a0fa 100644 --- a/layout/style/ServoBindingList.h +++ b/layout/style/ServoBindingList.h @@ -473,6 +473,11 @@ SERVO_BINDING_FUNC(Servo_StyleSet_GetBaseComputedValuesForElement, const mozilla::ServoElementSnapshotTable* snapshots, mozilla::CSSPseudoElementType pseudo_type) +// For canvas font. +SERVO_BINDING_FUNC(Servo_SerializeFontValueForCanvas, void, + RawServoDeclarationBlockBorrowed declarations, + nsAString* buffer) + // Style-struct management. #define STYLE_STRUCT(name, checkdata_cb) \ struct nsStyle##name; \