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

Issue 733063005: Don't decode AND mask for an icon that already has alpha information (Closed)

Created:
6 years, 1 month ago by Sami
Modified:
6 years ago
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

Don't decode AND mask for an icon that already has alpha information Normally BMP-format images in an ICO file contain data for two images: first the color data for the icon, followed by a 1 bit transparency mask ("AND" bitmap). If the color data includes alpha data which is not completely transparent, we should ignore the mask bitmap data. In fact, the mask bitmap data may be completely missing in this case, so the decoder would have previously interpreted the start of the next image in the icon as the mask. BUG=424272 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185957

Patch Set 1 #

Total comments: 1

Patch Set 2 : Rebased. #

Total comments: 1

Patch Set 3 : Clamp size later. #

Total comments: 1

Patch Set 4 : Also clamp for png. #

Patch Set 5 : Check presence of alpha data instead. #

Total comments: 1

Patch Set 6 : No need to check hasAlpha(). #

Patch Set 7 : Check m_bitMasks too. #

Patch Set 8 : Rebased. #

Patch Set 9 : Rebase again. #

Patch Set 10 : Rebase like there's no tomorrow. #

Patch Set 11 : Also rebaseline virtual deferred test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/fast/images/icon-decoding.html View 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/fast/images/icon-decoding-expected.txt View 1 chunk +4 lines, -1 line 0 comments Download
A LayoutTests/fast/images/resources/icon-without-and-bitmap.ico View Binary file 0 comments Download
M Source/platform/image-decoders/bmp/BMPImageReader.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 32 (9 generated)
Sami
6 years, 1 month ago (2014-11-17 20:31:51 UTC) #2
Stephen White
+pkasting
6 years, 1 month ago (2014-11-17 20:34:00 UTC) #4
Stephen White
Leaving for Peter. https://codereview.chromium.org/733063005/diff/1/Source/platform/image-decoders/ico/ICOImageDecoder.cpp File Source/platform/image-decoders/ico/ICOImageDecoder.cpp (right): https://codereview.chromium.org/733063005/diff/1/Source/platform/image-decoders/ico/ICOImageDecoder.cpp#newcode318 Source/platform/image-decoders/ico/ICOImageDecoder.cpp:318: entry.m_imageSize = readUint32(8); I'm probably just ...
6 years, 1 month ago (2014-11-17 20:43:05 UTC) #5
Stephen White
On 2014/11/17 20:43:05, Stephen White wrote: > Leaving for Peter. > > https://codereview.chromium.org/733063005/diff/1/Source/platform/image-decoders/ico/ICOImageDecoder.cpp > File ...
6 years, 1 month ago (2014-11-17 20:46:46 UTC) #6
Peter Kasting
On 2014/11/17 20:46:46, Stephen White wrote: > On 2014/11/17 20:43:05, Stephen White wrote: > > ...
6 years, 1 month ago (2014-11-17 20:47:15 UTC) #7
Peter Kasting
Ugh. What about the bitmap info header for this entry: * Is biHeight still doubled ...
6 years, 1 month ago (2014-11-17 20:59:32 UTC) #8
Sami
On 2014/11/17 20:59:32, Peter Kasting wrote: > Ugh. > > What about the bitmap info ...
6 years, 1 month ago (2014-11-18 11:43:27 UTC) #9
Sami
On 2014/11/17 20:46:46, Stephen White wrote: > I see now that the read functions take ...
6 years, 1 month ago (2014-11-18 11:44:15 UTC) #10
Peter Kasting
https://codereview.chromium.org/733063005/diff/40001/Source/platform/image-decoders/ico/ICOImageDecoder.cpp File Source/platform/image-decoders/ico/ICOImageDecoder.cpp (right): https://codereview.chromium.org/733063005/diff/40001/Source/platform/image-decoders/ico/ICOImageDecoder.cpp#newcode223 Source/platform/image-decoders/ico/ICOImageDecoder.cpp:223: m_bmpReaders[index]->setData(bmpData.get()); I have three concerns with this code, in ...
6 years, 1 month ago (2014-11-18 20:59:05 UTC) #11
Sami
Thanks for the good ideas. On 2014/11/18 20:59:05, Peter Kasting wrote: > (1) We also ...
6 years, 1 month ago (2014-11-21 19:36:47 UTC) #12
Peter Kasting
If we put artificially truncated values into the image size fields you were previously clamping ...
6 years, 1 month ago (2014-11-21 20:05:54 UTC) #13
Sami
On 2014/11/21 20:05:54, Peter Kasting wrote: > If we put artificially truncated values into the ...
6 years ago (2014-11-24 13:53:00 UTC) #14
Peter Kasting
Thanks for doing all the research here. I'm comfortable ignoring the size field. For the ...
6 years ago (2014-11-24 20:49:11 UTC) #15
Sami
On 2014/11/24 20:49:11, Peter Kasting wrote: > Thanks for doing all the research here. I'm ...
6 years ago (2014-11-25 10:24:22 UTC) #16
Stephen White
On 2014/11/25 10:24:22, Sami wrote: > On 2014/11/24 20:49:11, Peter Kasting wrote: > > Thanks ...
6 years ago (2014-11-25 13:03:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/733063005/140001
6 years ago (2014-11-25 13:52:16 UTC) #19
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
6 years ago (2014-11-25 13:52:22 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/733063005/160001
6 years ago (2014-11-25 14:56:09 UTC) #23
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
6 years ago (2014-11-25 14:56:15 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/733063005/180001
6 years ago (2014-11-25 15:11:34 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/38388)
6 years ago (2014-11-25 16:31:43 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/733063005/200001
6 years ago (2014-11-25 16:42:38 UTC) #31
commit-bot: I haz the power
6 years ago (2014-11-25 17:56:30 UTC) #32
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=185957

Powered by Google App Engine
This is Rietveld 408576698