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

Issue 2776893002: DevTools: use chess-like icon positions (Closed)

Created:
3 years, 9 months ago by lushnikov
Modified:
3 years, 9 months ago
Reviewers:
dgozman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: use chess-like icon positions This patch: - moves icons from {x, y, width, height} coordinates into chess-like coordinates. Position 'a1' means bottom-left corner, and position 'a8' means 1st column 8th row. - removes spritesheet image sizes from inspectorCommon.css. This turned out to be possible since icon's background/mask-image always have default size of the image. This solves multiple issues: - it's easy to convert between icon coordinates and spritesheets. Chess-like coordinate systems are embedded into SVGs: http://imgur.com/a/YcSSs - it discourages abusing of icon sizes - icon could occupy the whole cell only - resizing spritesheet is as easy as changing its size in inkscape Performance-wise, this change doesn't impact time to create icon in a noticeble way. Before this patch, creating all 107 icons was taking ~3ms on my MacBook Pro 2015. With this patch, the time didn't change. BUG=700249 R=dgozman Review-Url: https://codereview.chromium.org/2776893002 Cr-Commit-Position: refs/heads/master@{#459958} Committed: https://chromium.googlesource.com/chromium/src/+/8c40265f143b45ecc7ddf49aedb363d6c7c70e69

Patch Set 1 #

Patch Set 2 : remove unneeded assert #

Patch Set 3 : add chess coordinates to svg #

Total comments: 2

Patch Set 4 : make row in formula zero-based #

Unified diffs Side-by-side diffs Delta from patch set Stats (+550 lines, -148 lines) Patch
M third_party/WebKit/Source/devtools/front_end/Images/src/largeIcons.svg View 1 2 2 chunks +192 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/Images/src/mediumIcons.svg View 1 2 2 chunks +93 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/Images/src/smallIcons.svg View 1 2 2 chunks +115 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/Icon.js View 1 2 3 3 chunks +144 lines, -117 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css View 1 chunk +0 lines, -10 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 16 (9 generated)
lushnikov
please, take a look.
3 years, 9 months ago (2017-03-25 18:44:37 UTC) #2
dgozman
https://codereview.chromium.org/2776893002/diff/40001/third_party/WebKit/Source/devtools/front_end/ui/Icon.js File third_party/WebKit/Source/devtools/front_end/ui/Icon.js (right): https://codereview.chromium.org/2776893002/diff/40001/third_party/WebKit/Source/devtools/front_end/ui/Icon.js#newcode119 third_party/WebKit/Source/devtools/front_end/ui/Icon.js:119: 'smallicon-bezier': {position: 'a5', spritesheet: 'smallicons', isMask: true}, I think ...
3 years, 9 months ago (2017-03-25 19:44:21 UTC) #7
dgozman
Nice idea overall! > it discourages abusing of icon sizes - icon could occupy the ...
3 years, 9 months ago (2017-03-25 19:45:56 UTC) #8
lushnikov
On 2017/03/25 19:45:56, dgozman wrote: > Nice idea overall! > > > it discourages abusing ...
3 years, 9 months ago (2017-03-27 22:07:20 UTC) #9
dgozman
lgtm
3 years, 9 months ago (2017-03-27 22:48:28 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2776893002/60001
3 years, 9 months ago (2017-03-27 23:00:12 UTC) #13
commit-bot: I haz the power
3 years, 9 months ago (2017-03-28 00:51:09 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/8c40265f143b45ecc7ddf49aedb3...

Powered by Google App Engine
This is Rietveld 408576698