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

Issue 126033003: Support colors w/ alpha in SVG 'stop' elements and 'feFlood' (Closed)

Created:
6 years, 11 months ago by fs
Modified:
6 years, 11 months ago
CC:
blink-reviews, jamesr, krit, dsinclair, jbroman, danakj, Rik, f(malita), pdr, Stephen Chennney, rwlbuis, Erik Dahlström (inactive)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Support colors w/ alpha in SVG 'stop' elements and 'feFlood' When a color w/ alpha is specified (via rgba(...)) as stop-color on a SVG 'stop' element, or as flood-color (or equivalent) on 'feFlood', then modulate the alpha-channel with the stop-opacity or flood-opacity respectively to produce the final color to use. BUG=331516 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=164690

Patch Set 1 #

Total comments: 2

Patch Set 2 : More TC variation; modulate->combineWithAlpha. #

Patch Set 3 : Tweak TC colors. #

Patch Set 4 : Rebase; Prebake expected colors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -0 lines) Patch
A LayoutTests/svg/custom/gradient-rgba-stop-color.svg View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-expected.svg View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-1.svg View 1 1 chunk +11 lines, -0 lines 0 comments Download
A + LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-1-expected.svg View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-2.svg View 1 2 3 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-2-expected.svg View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-3.svg View 1 1 chunk +11 lines, -0 lines 0 comments Download
A + LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-3-expected.svg View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-4.svg View 1 1 chunk +11 lines, -0 lines 0 comments Download
A + LayoutTests/svg/custom/gradient-rgba-stop-color-w-opacity-4-expected.svg View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color.svg View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-expected.svg View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-1.svg View 1 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-1-expected.svg View 1 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-2.svg View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-2-expected.svg View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-3.svg View 1 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-3-expected.svg View 1 1 chunk +3 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-4.svg View 1 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/svg/filters/feFlood-rgba-flood-color-w-opacity-4-expected.svg View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/svg/SVGStopElement.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/Color.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/graphics/Color.cpp View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Source/platform/graphics/filters/FEFlood.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
fs
6 years, 11 months ago (2014-01-07 17:30:15 UTC) #1
krit
I would like the others look at the code first. Just a comment on the ...
6 years, 11 months ago (2014-01-07 17:46:15 UTC) #2
Stephen Chennney
Good fix. Are the given RGBA colors not pre-multiplied? Given the code I assume that's ...
6 years, 11 months ago (2014-01-07 17:49:37 UTC) #3
pdr.
I like this as well. My only contribution is a nitpick on the name: "modulate" ...
6 years, 11 months ago (2014-01-08 05:26:38 UTC) #4
fs
On 2014/01/07 17:49:37, Stephen Chenney wrote: > Good fix. > > Are the given RGBA ...
6 years, 11 months ago (2014-01-08 08:22:47 UTC) #5
fs
Now with 400% more TCs... =)
6 years, 11 months ago (2014-01-08 10:05:52 UTC) #6
Stephen Chennney
lgtm
6 years, 11 months ago (2014-01-08 15:48:24 UTC) #7
fs
6 years, 11 months ago (2014-01-08 17:08:04 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/126033003/240001
6 years, 11 months ago (2014-01-08 17:09:50 UTC) #9
commit-bot: I haz the power
6 years, 11 months ago (2014-01-08 17:30:45 UTC) #10
Message was sent while issue was closed.
Change committed as 164690

Powered by Google App Engine
This is Rietveld 408576698