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

Issue 8528011: Page zoom improvements (Closed)

Created:
9 years, 1 month ago by csilv
Modified:
8 years, 11 months ago
Reviewers:
jam, James Hawkins
CC:
chromium-reviews, Avi (use Gerrit), creis+watch_chromium.org, ajwong+watch_chromium.org, jam, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, arv (Not doing code reviews), darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Page zoom improvements: 1. Change from using zoom levels to a range of preset zoom factors (percentages). Zoom levels are the values that WebKit uses for page zoom. While zoom levels are simple to implement, they result in undesirable percentages like 57%, 144%, 207%, etc. Changing to zoom factors gives us user-friendly zoom percentages. 2. Increase the range of supported zoom values. A user can now zoom between 25% to 500%. 3. Use an epsilon value when comparing zoom floating point values. The previous version was doing an equality comparison of double values which may not always work as expected. BUG=71484 TEST=Exercise zoom in/out via the wrench menu; exercise default page zoom setting in options window Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111087

Patch Set 1 #

Total comments: 20

Patch Set 2 : Review enhancements #

Patch Set 3 : Minor cleanups #

Total comments: 8

Patch Set 4 : Enhancements, added tests #

Patch Set 5 : Tweak #

Patch Set 6 : Tweak, Tweak #

Total comments: 2

Patch Set 7 : Code review changes, rebase #

Patch Set 8 : Fix comment spelling mistake #

Total comments: 6

Patch Set 9 : Review changes. #

Patch Set 10 : One last(?) tweak. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+605 lines, -47 lines) Patch
A chrome/browser/chrome_page_zoom.h View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/chrome_page_zoom.cc View 1 2 3 4 5 6 7 8 1 chunk +60 lines, -0 lines 0 comments Download
A chrome/browser/chrome_page_zoom_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +98 lines, -0 lines 1 comment Download
M chrome/browser/resources/options/advanced_options.html View 1 2 3 4 5 6 1 chunk +2 lines, -14 lines 0 comments Download
M chrome/browser/resources/options/advanced_options.js View 1 2 3 4 5 6 2 chunks +29 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 3 chunks +48 lines, -9 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 1 chunk +34 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/advanced_options_browsertest.js View 1 2 3 4 5 6 1 chunk +40 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/options/advanced_options_handler.h View 1 2 3 4 5 6 4 chunks +20 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/options/advanced_options_handler.cc View 1 2 3 4 5 6 7 8 10 chunks +58 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/host_zoom_map.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
A content/browser/host_zoom_map_unittest.cc View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
M content/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/webui/web_ui.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/webui/web_ui.cc View 1 2 3 4 5 6 1 chunk +9 lines, -0 lines 0 comments Download
A content/browser/webui/web_ui_unittest.cc View 1 2 3 6 1 chunk +74 lines, -0 lines 0 comments Download
A content/common/page_zoom.cc View 1 2 3 4 5 6 7 8 1 chunk +25 lines, -0 lines 0 comments Download
A content/common/page_zoom_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +19 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/common/page_zoom.h View 1 2 3 4 5 6 2 chunks +13 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
csilv
+jhawkins for review James, I'm going to ask you to review this when you have ...
9 years, 1 month ago (2011-11-12 19:57:43 UTC) #1
James Hawkins
You're gonna cringe, but I'm going to have to ask you to write some tests. ...
9 years, 1 month ago (2011-11-14 18:09:04 UTC) #2
csilv
Partial response to review comments. (Answering questions, asking for clarifications.) http://codereview.chromium.org/8528011/diff/1/content/browser/tab_contents/tab_contents.cc File content/browser/tab_contents/tab_contents.cc (right): http://codereview.chromium.org/8528011/diff/1/content/browser/tab_contents/tab_contents.cc#newcode866 ...
9 years, 1 month ago (2011-11-14 23:10:29 UTC) #3
csilv
James, If you have time please take a look at this revised CL. I believe ...
9 years, 1 month ago (2011-11-15 02:20:30 UTC) #4
csilv
http://codereview.chromium.org/8528011/diff/1/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/8528011/diff/1/chrome/browser/ui/browser.cc#newcode1973 chrome/browser/ui/browser.cc:1973: RenderViewHost* host = GetSelectedTabContentsWrapper()->render_view_host(); On 2011/11/14 18:09:05, James Hawkins ...
9 years, 1 month ago (2011-11-15 02:26:49 UTC) #5
James Hawkins
http://codereview.chromium.org/8528011/diff/12004/chrome/browser/resources/options/advanced_options.html File chrome/browser/resources/options/advanced_options.html (right): http://codereview.chromium.org/8528011/diff/12004/chrome/browser/resources/options/advanced_options.html#newcode95 chrome/browser/resources/options/advanced_options.html:95: <select id="defaultZoomFactor" dataType="double"></select> s/defaultZoomFactor/default-zoom-factor/ To make this mod would ...
9 years, 1 month ago (2011-11-15 18:35:50 UTC) #6
csilv
Updated per reviews, added test cases at different levels. PTAL. http://codereview.chromium.org/8528011/diff/12004/chrome/browser/resources/options/advanced_options.html File chrome/browser/resources/options/advanced_options.html (right): http://codereview.chromium.org/8528011/diff/12004/chrome/browser/resources/options/advanced_options.html#newcode95 ...
9 years, 1 month ago (2011-11-19 00:17:45 UTC) #7
James Hawkins
lgtm
9 years, 1 month ago (2011-11-19 00:54:32 UTC) #8
csilv
+jam for OWNERS for review/approval. Primarily these files: content/browser/host_zoom_map.cc content/browser/host_zoom_map_unittest.cc content/browser/tab_contents/tab_contents.cc content/browser/webui/web_ui.cc [.h] content/public/common/page_zoom.cc [.h] ...
9 years, 1 month ago (2011-11-19 02:42:34 UTC) #9
jam
http://codereview.chromium.org/8528011/diff/25001/content/public/common/page_zoom.cc File content/public/common/page_zoom.cc (right): http://codereview.chromium.org/8528011/diff/25001/content/public/common/page_zoom.cc#newcode20 content/public/common/page_zoom.cc:20: const double kPresetZoomFactors[] = { 0.25, 0.333, 0.5, 0.666, ...
9 years, 1 month ago (2011-11-21 18:24:39 UTC) #10
csilv
http://codereview.chromium.org/8528011/diff/25001/content/public/common/page_zoom.cc File content/public/common/page_zoom.cc (right): http://codereview.chromium.org/8528011/diff/25001/content/public/common/page_zoom.cc#newcode20 content/public/common/page_zoom.cc:20: const double kPresetZoomFactors[] = { 0.25, 0.333, 0.5, 0.666, ...
9 years, 1 month ago (2011-11-21 21:44:58 UTC) #11
jam
http://codereview.chromium.org/8528011/diff/34004/chrome/browser/page_zoom.h File chrome/browser/page_zoom.h (right): http://codereview.chromium.org/8528011/diff/34004/chrome/browser/page_zoom.h#newcode1 chrome/browser/page_zoom.h:1: // Copyright (c) 2009 The Chromium Authors. All rights ...
9 years, 1 month ago (2011-11-21 22:20:54 UTC) #12
csilv
http://codereview.chromium.org/8528011/diff/34004/chrome/browser/page_zoom.h File chrome/browser/page_zoom.h (right): http://codereview.chromium.org/8528011/diff/34004/chrome/browser/page_zoom.h#newcode1 chrome/browser/page_zoom.h:1: // Copyright (c) 2009 The Chromium Authors. All rights ...
9 years, 1 month ago (2011-11-22 00:10:58 UTC) #13
jam
lgtm http://codereview.chromium.org/8528011/diff/38004/chrome/browser/chrome_page_zoom_unittest.cc File chrome/browser/chrome_page_zoom_unittest.cc (right): http://codereview.chromium.org/8528011/diff/38004/chrome/browser/chrome_page_zoom_unittest.cc#newcode7 chrome/browser/chrome_page_zoom_unittest.cc:7: nit: not needed
9 years, 1 month ago (2011-11-22 01:22:43 UTC) #14
jam
hi, I just noticed that this change added a web_ui_unittest.cc but didn't add it the ...
8 years, 11 months ago (2012-01-19 20:09:35 UTC) #15
csilv
8 years, 11 months ago (2012-01-19 21:23:15 UTC) #16
On 2012/01/19 20:09:35, John Abd-El-Malek wrote:
> hi, I just noticed that this change added a web_ui_unittest.cc but didn't add
it
> the list of tests to run. they also don't pass.

Thanks for the heads up.  Reported as http://crbug.com/110784

Powered by Google App Engine
This is Rietveld 408576698