Closed Bug 1163107 Opened 5 years ago Closed 4 years ago

Changes to font size not respected when using relative filter units


(Core :: Canvas: 2D, defect)

Not set



Tracking Status
firefox48 --- fixed


(Reporter: tschneider, Unassigned)



(Whiteboard: [gfx-noted])


(1 file, 1 obsolete file)

Attached file test case (obsolete) —
When changing the font size after a filter using relative units was set, the change is not respected when the filter gets applied.
Blocks: 927892
Hmm. Maybe we should just define the current Firefox behavior as correct. It's similar to how ctx.font works:

> When the 'font-size' component is set to lengths using percentages, 'em' or
> 'ex' units, or the 'larger' or 'smaller' keywords, these must be interpreted
> relative to the computed value of the 'font-size' property of the font style
> source node at the time that the attribute is set, if that is an element.
Whiteboard: [gfx-noted]
Blocks: 1173545
I agree, It makes most sense to make it work just like ctx.font.
Attached patch test caseSplinter Review
Change test to reflect previously discussed behavior.
Attachment #8603497 - Attachment is obsolete: true
Attachment #8738904 - Flags: review?(mstange)
Comment on attachment 8738904 [details] [diff] [review]
test case

Review of attachment 8738904 [details] [diff] [review]:

Can you also add a test that makes sure that we *don't* react to font changes that happen after the filter was set?
Attachment #8738904 - Flags: review?(mstange) → review+
That's what the test is already doing. It changes the font size to 20px after setting the filter, which should get ignored.
Oh, right.
Keywords: checkin-needed
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.