New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601877 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 501642



Sign in to add a comment

[2D Canvas] Make filter font liveness match Firefox's behavior

Project Member Reported by ajuma@chromium.org, Apr 8 2016

Issue description

When a canvas filter defines lengths using relative sizes (like percents and 'em' units), these are interpreted relative to font size, and, in our implementation, updated whenever the font size changes.

Firefox uses the value of the font size attribute when the filter is set (so doesn't update for changes to font size).

This behavior difference needs to be resolved (either by changing our behavior to match Firefox, or, if we thing our behavior is better, convincing them to match ours).

 

Comment 1 by ajuma@chromium.org, Apr 8 2016

For context, here's the corresponding Mozilla bug, where they reached the conclusion that font changes that happen after setting the filter shouldn't change the used filter:
https://bugzilla.mozilla.org/show_bug.cgi?id=1163107
Cc: senorblanco@chromium.org
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/222eb4b80b8531ca616f78207033427d359c2879

commit 222eb4b80b8531ca616f78207033427d359c2879
Author: ajuma <ajuma@chromium.org>
Date: Tue Apr 19 00:51:37 2016

Make canvas filters use the font size in effect when the filter is set

This snapshots the current font when a new filter is set,
and uses the snapshotted font whenever the filter is rebuilt,
rather than using the current font. The filter is no longer
rebuilt for changes to the current font. This matches Firefox's
behavior.

BUG= 601877 

Review URL: https://codereview.chromium.org/1886063002

Cr-Commit-Position: refs/heads/master@{#388099}

[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-liveness-expected.html
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-modified-expected.html
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-modified.html
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-units-em-liveness-expected.html
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/LayoutTests/fast/canvas/canvas-filter-units-em-liveness.html
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.cpp
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h
[modify] https://crrev.com/222eb4b80b8531ca616f78207033427d359c2879/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h

Comment 4 by ajuma@chromium.org, Apr 19 2016

Status: Fixed (was: Assigned)

Sign in to add a comment