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

Issue 1637763002: Fix bug in browser action icon scaling for non-1x scale factors. (Closed)

Created:
4 years, 11 months ago by Evan Stade
Modified:
4 years, 10 months ago
Reviewers:
Devlin, benwells, varkha
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix bug in browser action icon scaling for non-1x scale factors. skia::ImageOperations::Resize needs pixels, and we were passing dp. Also, ignore the icon size key and just use the icon size itself. This fixes a bug (evidenced again by Shoptagr) where an icon size such as "19": "icons/19.png" // 19.png is actually 50x50 would be scaled incorrectly. At this point, the API should take a list rather than a dict, but it's probably not possible to change that and maintain backcompat. BUG=581232 TBR=benwells@chromium.org Committed: https://crrev.com/52969d7388642a56447da090bf577974a6bf562f Cr-Commit-Position: refs/heads/master@{#371904}

Patch Set 1 #

Patch Set 2 : also deal with wrong icon sizes #

Patch Set 3 : remove dbg code #

Total comments: 7

Patch Set 4 : size limits #

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -15 lines) Patch
M chrome/browser/extensions/extension_action.cc View 1 2 3 4 2 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/extensions/icon_with_badge_image_source.cc View 1 3 chunks +10 lines, -6 lines 0 comments Download

Messages

Total messages: 31 (15 generated)
Evan Stade
4 years, 11 months ago (2016-01-26 02:52:21 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1637763002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1637763002/40001
4 years, 11 months ago (2016-01-26 02:55:16 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-26 03:55:42 UTC) #7
varkha
Tried it locally and all the icons looked correctly. https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/ui/extensions/icon_with_badge_image_source.cc File chrome/browser/ui/extensions/icon_with_badge_image_source.cc (right): https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/ui/extensions/icon_with_badge_image_source.cc#newcode136 chrome/browser/ui/extensions/icon_with_badge_image_source.cc:136: ...
4 years, 11 months ago (2016-01-26 16:18:42 UTC) #9
Devlin
lgtm https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc File chrome/browser/extensions/extension_action.cc (left): https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc#oldcode136 chrome/browser/extensions/extension_action.cc:136: icon_size > kActionIconMaxSize) { Do we not want ...
4 years, 11 months ago (2016-01-26 19:08:48 UTC) #10
Evan Stade
https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc File chrome/browser/extensions/extension_action.cc (left): https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc#oldcode136 chrome/browser/extensions/extension_action.cc:136: icon_size > kActionIconMaxSize) { On 2016/01/26 19:08:48, Devlin (Slow ...
4 years, 11 months ago (2016-01-26 19:50:07 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1637763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1637763002/80001
4 years, 11 months ago (2016-01-26 19:50:49 UTC) #13
Devlin
https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc File chrome/browser/extensions/extension_action.cc (right): https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc#newcode150 chrome/browser/extensions/extension_action.cc:150: if (bitmap.width() != bitmap.height()) On 2016/01/26 19:50:07, Evan Stade ...
4 years, 11 months ago (2016-01-26 19:58:25 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-26 20:35:58 UTC) #16
Evan Stade
https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc File chrome/browser/extensions/extension_action.cc (right): https://codereview.chromium.org/1637763002/diff/40001/chrome/browser/extensions/extension_action.cc#newcode150 chrome/browser/extensions/extension_action.cc:150: if (bitmap.width() != bitmap.height()) On 2016/01/26 19:58:25, Devlin (Slow ...
4 years, 11 months ago (2016-01-26 22:33:50 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1637763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1637763002/80001
4 years, 11 months ago (2016-01-26 22:37:12 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/139256)
4 years, 11 months ago (2016-01-26 22:51:01 UTC) #22
Evan Stade
once again TBR benwells
4 years, 10 months ago (2016-01-27 21:52:12 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1637763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1637763002/80001
4 years, 10 months ago (2016-01-27 21:52:59 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-01-27 22:53:21 UTC) #29
commit-bot: I haz the power
4 years, 10 months ago (2016-01-27 22:54:58 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/52969d7388642a56447da090bf577974a6bf562f
Cr-Commit-Position: refs/heads/master@{#371904}

Powered by Google App Engine
This is Rietveld 408576698