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

Issue 15713020: High DPI support for Themes: change chrome_html.py (Closed)

Created:
7 years, 6 months ago by sschmitz
Modified:
7 years, 6 months ago
Reviewers:
flackr
CC:
grit-developer_googlegroups.com
Base URL:
https://chromium.googlesource.com/external/grit-i18n.git@master
Visibility:
Public.

Description

High DPI support for Themes: change chrome_html.py Modified processing of Theme URLs. We will now insert the scale factor text before the first ? instead of just appending it. This is necessary for parsing to work properly (see ParsePathAndScale in src/ui/webui/web_ui_util.cc). See also recent CL which modified related *.css and *.js files: https://codereview.chromium.org/16610002/ Example: Old: url(chrome://theme/IDR_THEME_NTP_ATTRIBUTION?$1@2x) New: url(chrome://theme/IDR_THEME_NTP_ATTRIBUTION?@2x$1) BUG=248189, 133934 R=flackr@chromium.org TEST=manual src/tools/grit/grit.py unit Load a theme that has 1x and 2x images for IDR_THEME_NTP_ATTRIBUTION and IDR_THEME_NTP_BACKGROUND.

Patch Set 1 #

Total comments: 2

Patch Set 2 : using match groups #

Total comments: 4

Patch Set 3 : unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -3 lines) Patch
M grit/gather/chrome_html.py View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M grit/gather/chrome_html_unittest.py View 1 2 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
sschmitz
Rob: I just tried it. Created branch in submodule (tools/grit), edited, local commit and 'git ...
7 years, 6 months ago (2013-06-11 21:52:20 UTC) #1
flackr
https://codereview.chromium.org/15713020/diff/1/grit/gather/chrome_html.py File grit/gather/chrome_html.py (right): https://codereview.chromium.org/15713020/diff/1/grit/gather/chrome_html.py#newcode34 grit/gather/chrome_html.py:34: _THEME_SOURCE_WITH_QUESTIONMARK = lazy_re.compile('chrome://theme/IDR_[A-Z0-9_]*\?') You should use matching groups in ...
7 years, 6 months ago (2013-06-12 01:05:44 UTC) #2
sschmitz
https://codereview.chromium.org/15713020/diff/1/grit/gather/chrome_html.py File grit/gather/chrome_html.py (right): https://codereview.chromium.org/15713020/diff/1/grit/gather/chrome_html.py#newcode34 grit/gather/chrome_html.py:34: _THEME_SOURCE_WITH_QUESTIONMARK = lazy_re.compile('chrome://theme/IDR_[A-Z0-9_]*\?') On 2013/06/12 01:05:44, flackr wrote: > ...
7 years, 6 months ago (2013-06-12 18:00:14 UTC) #3
flackr
LGTM with nits https://codereview.chromium.org/15713020/diff/4001/grit/gather/chrome_html.py File grit/gather/chrome_html.py (right): https://codereview.chromium.org/15713020/diff/4001/grit/gather/chrome_html.py#newcode33 grit/gather/chrome_html.py:33: '(?P<baseurl>chrome://theme/IDR_[A-Z0-9_]*)(?P<query>\?[^\']*)?') Since this is only used ...
7 years, 6 months ago (2013-06-13 14:57:24 UTC) #4
flackr
Can you add a test for this too?
7 years, 6 months ago (2013-06-13 15:13:33 UTC) #5
sschmitz
https://codereview.chromium.org/15713020/diff/4001/grit/gather/chrome_html.py File grit/gather/chrome_html.py (right): https://codereview.chromium.org/15713020/diff/4001/grit/gather/chrome_html.py#newcode33 grit/gather/chrome_html.py:33: '(?P<baseurl>chrome://theme/IDR_[A-Z0-9_]*)(?P<query>\?[^\']*)?') On 2013/06/13 14:57:24, flackr wrote: > Since this ...
7 years, 6 months ago (2013-06-13 16:27:53 UTC) #6
flackr
7 years, 6 months ago (2013-06-13 16:59:17 UTC) #7
Landed in grit as r127. You'll have to manually update the DEPS in the chromium
repository to pull this in.

Powered by Google App Engine
This is Rietveld 408576698