Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1253)

Issue 1135023003: Rework the checks for too-few values in feColorMatrix filter. (Closed)

Created:
5 years, 7 months ago by Stephen Chennney
Modified:
5 years, 7 months ago
Reviewers:
laforge
CC:
blink-reviews, Dominik Röttsches, krit, Rik, dshwang, jbroman, Justin Novosad, danakj, pdr+graphicswatchlist_chromium.org, f(malita), rwlbuis
Target Ref:
refs/branch-heads/chromium/2357
Project:
blink
Visibility:
Public.

Description

Rework the checks for too-few values in feColorMatrix filter. Revert the prevous fix because it was flat-out wrong for some filters. Here we add checks at all points the values are used, because it is impossible to enforce an always-valid m_values vector inside the FEColorMatrix object. For example, we need to support any ordering of setAttribute('type', ...) and setAttribute('values', ...), but the valid number of values depends on the type. We couldn't set the type from "hueRotate" to "matrix", for example, without first adding more values than are necessary for the "hueRotate". That's a bad user experience. TBR=laforge@chromium.org BUG=468519 Review URL: https://codereview.chromium.org/1087283002 git-svn-id: svn://svn.chromium.org/blink/trunk@193911 bbb929c8-8fbe-4397-9dbb-9b2b20218538 (cherry picked from commit 9ae9e4492c79ea25f96297f198c4ad57636ab049) Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=195283

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -11 lines) Patch
A LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1.html View 1 chunk +39 lines, -0 lines 0 comments Download
A + LayoutTests/svg/filters/feColorMatrix-setAttribute-crash1-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/svg/filters/feColorMatrix-setAttribute-crash2.html View 1 chunk +39 lines, -0 lines 0 comments Download
A + LayoutTests/svg/filters/feColorMatrix-setAttribute-crash2-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/platform/graphics/filters/FEColorMatrix.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/platform/graphics/filters/FEColorMatrix.cpp View 5 chunks +22 lines, -13 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
Stephen Chennney
5 years, 7 months ago (2015-05-13 01:13:25 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 195283 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698