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

Issue 678343002: Default zoom was never read from chrome://settings (Closed)

Created:
6 years, 1 month ago by sarka
Modified:
5 years, 9 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Default zoom was never read from chrome://settings The fix basically includes reading default zoom percent of a tab from a helper function in zoom_controller. BUG=427440 TESTs = Go to chrome://settings Expand to Webcontents under Advanced Settings Change the default Zoom percentage Expected result: All the open tabs would be changed to that particular zoom value and the "Actual Size" under View menu would be disabled. Committed: https://crrev.com/daadc7150bd4955f19af36c67d104e68fef5d5fe Cr-Commit-Position: refs/heads/master@{#318191}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Uses IsAtDefaultZoom() to see whether a tab zoom has been reset #

Total comments: 1

Patch Set 3 : Renamed function names to something intuitive #

Total comments: 2

Patch Set 4 : Fixed Nit in browser_commands_unittest.cc #

Total comments: 1

Patch Set 5 : Added unit test for reading default zoom from Settings #

Patch Set 6 : Added unit test for reading default zoom from Settings #

Total comments: 1

Patch Set 7 : Replaced header in testing_profile #

Total comments: 3

Patch Set 8 : Fixed rounding errors for maxium zoom level #

Total comments: 2

Patch Set 9 : Rouding off double value for the minimum zoom factor #

Total comments: 1

Patch Set 10 : Updated comments based on feedback #

Total comments: 1

Patch Set 11 : Using round() api to round maximum/minimum zoom #

Total comments: 1

Patch Set 12 : Cleaning up conflicts after updating a stale branch #

Patch Set 13 : Fixed Nit #

Total comments: 4

Patch Set 14 : Renamed Zoom Update commands #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -34 lines) Patch
M chrome/browser/browser_commands_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +53 lines, -23 lines 2 comments Download
M chrome/browser/ui/browser_command_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_commands.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/test/base/testing_profile.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +11 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 82 (15 generated)
sarka
On 2014/10/28 11:44:44, sarka wrote: > mailto:a.sarkar.arun@gmail.com changed reviewers: > + mailto:asvitkine@chromium.org PTAL. Thanks
6 years, 1 month ago (2014-10-28 11:45:34 UTC) #2
Alexei Svitkine (slow)
https://codereview.chromium.org/678343002/diff/1/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/678343002/diff/1/chrome/browser/ui/browser_commands.cc#newcode615 chrome/browser/ui/browser_commands.cc:615: zoom_controller->GetDefaultZoomPercent(); Can't you use zoom_controller->IsAtDefaultZoom() instead of doing the ...
6 years, 1 month ago (2014-10-28 13:15:54 UTC) #3
sarka
On 2014/10/28 13:15:54, Alexei Svitkine wrote: > https://codereview.chromium.org/678343002/diff/1/chrome/browser/ui/browser_commands.cc > File chrome/browser/ui/browser_commands.cc (right): > > https://codereview.chromium.org/678343002/diff/1/chrome/browser/ui/browser_commands.cc#newcode615 ...
6 years, 1 month ago (2014-10-29 01:57:05 UTC) #4
Alexei Svitkine (slow)
https://codereview.chromium.org/678343002/diff/20001/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/678343002/diff/20001/chrome/browser/ui/browser_commands.cc#newcode611 chrome/browser/ui/browser_commands.cc:611: bool ActualSize(content::WebContents* contents) { I was suggesting we rename ...
6 years, 1 month ago (2014-10-29 03:44:25 UTC) #5
sarka
On 2014/10/29 03:44:25, Alexei Svitkine wrote: > https://codereview.chromium.org/678343002/diff/20001/chrome/browser/ui/browser_commands.cc > File chrome/browser/ui/browser_commands.cc (right): > > https://codereview.chromium.org/678343002/diff/20001/chrome/browser/ui/browser_commands.cc#newcode611 ...
6 years, 1 month ago (2014-10-29 14:28:23 UTC) #6
sarka
On 2014/10/29 14:28:23, sarka wrote: > On 2014/10/29 03:44:25, Alexei Svitkine wrote: > > > ...
6 years, 1 month ago (2014-10-30 02:16:34 UTC) #7
Alexei Svitkine (slow)
Please add a TEST= line to the CL description that describes how QA can verify ...
6 years, 1 month ago (2014-10-30 13:49:42 UTC) #8
sarka
On 2014/10/30 13:49:42, Alexei Svitkine wrote: > Please add a TEST= line to the CL ...
6 years, 1 month ago (2014-10-31 02:39:12 UTC) #9
Alexei Svitkine (slow)
lgtm, thanks you also need an owner approval
6 years, 1 month ago (2014-10-31 05:16:18 UTC) #10
sarka
On 2014/10/31 05:16:18, Alexei Svitkine wrote: > lgtm, thanks > > you also need an ...
6 years, 1 month ago (2014-10-31 14:10:57 UTC) #12
sky
How about test coverage? +wjmaclean
6 years, 1 month ago (2014-11-01 17:26:30 UTC) #14
wjmaclean
lgtm https://codereview.chromium.org/678343002/diff/60001/chrome/browser/ui/browser_commands.cc File chrome/browser/ui/browser_commands.cc (right): https://codereview.chromium.org/678343002/diff/60001/chrome/browser/ui/browser_commands.cc#newcode613 chrome/browser/ui/browser_commands.cc:613: return zoom_controller->IsAtDefaultZoom(); Thanks, this is definitely preferred.
6 years, 1 month ago (2014-11-01 17:45:47 UTC) #15
sarka
On 2014/11/01 17:45:47, wjmaclean wrote: > lgtm > > https://codereview.chromium.org/678343002/diff/60001/chrome/browser/ui/browser_commands.cc > File chrome/browser/ui/browser_commands.cc (right): > ...
6 years, 1 month ago (2014-11-03 15:30:03 UTC) #16
Alexei Svitkine (slow)
Ping, what's the status of this?
6 years, 1 month ago (2014-11-13 23:21:44 UTC) #17
sarka
Sorry, Have been pretty busy lately. Is there an ETA? I would like to upload ...
6 years, 1 month ago (2014-11-13 23:37:28 UTC) #18
Alexei Svitkine (slow)
This weekend sounds good, thanks! On Thu, Nov 13, 2014 at 6:37 PM, arunoday sarkar ...
6 years, 1 month ago (2014-11-13 23:43:49 UTC) #19
sarka
On 2014/11/13 23:43:49, Alexei Svitkine wrote: > This weekend sounds good, thanks! > > On ...
6 years, 1 month ago (2014-11-16 18:51:33 UTC) #20
Alexei Svitkine (slow)
lgtm, thanks!
6 years, 1 month ago (2014-11-17 01:25:20 UTC) #21
tfarina
https://codereview.chromium.org/678343002/diff/100001/chrome/test/base/testing_profile.h File chrome/test/base/testing_profile.h (right): https://codereview.chromium.org/678343002/diff/100001/chrome/test/base/testing_profile.h#newcode14 chrome/test/base/testing_profile.h:14: #include "chrome/browser/ui/zoom/chrome_zoom_level_prefs.h" why did you include this here? for ...
6 years, 1 month ago (2014-11-17 01:57:12 UTC) #23
sarka
On 2014/11/17 01:57:12, tfarina wrote: > https://codereview.chromium.org/678343002/diff/100001/chrome/test/base/testing_profile.h > File chrome/test/base/testing_profile.h (right): > > https://codereview.chromium.org/678343002/diff/100001/chrome/test/base/testing_profile.h#newcode14 > ...
6 years, 1 month ago (2014-11-17 02:01:21 UTC) #24
tfarina
On Mon, Nov 17, 2014 at 12:01 AM, <a.sarkar.arun@gmail.com> wrote: > On 2014/11/17 01:57:12, tfarina ...
6 years, 1 month ago (2014-11-17 02:03:22 UTC) #25
sarka
On 2014/11/17 02:03:22, tfarina wrote: > On Mon, Nov 17, 2014 at 12:01 AM, <mailto:a.sarkar.arun@gmail.com> ...
6 years, 1 month ago (2014-11-17 02:33:39 UTC) #26
sarka
On 2014/11/17 02:33:39, sarka wrote: > On 2014/11/17 02:03:22, tfarina wrote: > > On Mon, ...
6 years, 1 month ago (2014-11-17 02:36:59 UTC) #27
tfarina
thanks, testing_profile.* changes lgtm!
6 years, 1 month ago (2014-11-18 15:47:05 UTC) #28
sky
https://codereview.chromium.org/678343002/diff/120001/chrome/browser/browser_commands_unittest.cc File chrome/browser/browser_commands_unittest.cc (right): https://codereview.chromium.org/678343002/diff/120001/chrome/browser/browser_commands_unittest.cc#newcode354 chrome/browser/browser_commands_unittest.cc:354: EXPECT_EQ(zoom_controller->GetZoomPercent(), 125); Format for assertions in tests is 'expected, ...
6 years ago (2014-11-24 15:46:57 UTC) #29
Alexei Svitkine (slow)
Ping, what's the status of this?
5 years, 11 months ago (2015-01-07 17:25:30 UTC) #30
sarka
On 2015/01/07 17:25:30, Alexei Svitkine wrote: > Ping, what's the status of this? Couple of ...
5 years, 11 months ago (2015-01-07 18:57:19 UTC) #31
wjmaclean
On 2015/01/07 18:57:19, sarka wrote: > On 2015/01/07 17:25:30, Alexei Svitkine wrote: > > Ping, ...
5 years, 11 months ago (2015-01-07 19:13:53 UTC) #32
Alexei Svitkine (slow)
Could you use EXPECT_FLOAT_EQ? On Wed, Jan 7, 2015 at 2:13 PM, <wjmaclean@chromium.org> wrote: > ...
5 years, 11 months ago (2015-01-07 19:44:05 UTC) #33
sarka
On 2015/01/07 19:44:05, Alexei Svitkine wrote: > Could you use EXPECT_FLOAT_EQ? > > On Wed, ...
5 years, 11 months ago (2015-01-12 00:46:03 UTC) #34
sarka
On 2015/01/12 00:46:03, sarka wrote: > On 2015/01/07 19:44:05, Alexei Svitkine wrote: > > Could ...
5 years, 11 months ago (2015-01-12 00:46:42 UTC) #35
Alexei Svitkine (slow)
> @wjmaclean > Thanks for your comments. I am seeing something weird happening with > ...
5 years, 11 months ago (2015-01-12 16:29:17 UTC) #36
Alexei Svitkine (slow)
I bet the error is in web_contents_impl.cc in the following code: maximum_zoom_percent_(static_cast<int>(kMaximumZoomFactor * 100)), Since ...
5 years, 11 months ago (2015-01-12 16:33:50 UTC) #37
sarka
On 2015/01/12 16:33:50, Alexei Svitkine wrote: > I bet the error is in web_contents_impl.cc in ...
5 years, 11 months ago (2015-01-12 16:34:59 UTC) #38
sarka
On 2015/01/12 16:34:59, sarka wrote: > On 2015/01/12 16:33:50, Alexei Svitkine wrote: > > I ...
5 years, 11 months ago (2015-01-13 05:02:32 UTC) #39
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/678343002/diff/140001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/678343002/diff/140001/content/renderer/render_view_impl.cc#newcode3763 content/renderer/render_view_impl.cc:3763: ZoomLevelToZoomFactor(minimum_level) * 100); This should probably be rounded ...
5 years, 11 months ago (2015-01-13 14:51:13 UTC) #40
sarka
On 2015/01/13 14:51:13, Alexei Svitkine wrote: > lgtm > > https://codereview.chromium.org/678343002/diff/140001/content/renderer/render_view_impl.cc > File content/renderer/render_view_impl.cc (right): ...
5 years, 11 months ago (2015-01-14 03:04:04 UTC) #41
Alexei Svitkine (slow)
sky, could you take another look at the CL? I think your comments have been ...
5 years, 11 months ago (2015-01-14 20:42:40 UTC) #42
sky
On 2015/01/07 18:57:19, sarka wrote: > On 2015/01/07 17:25:30, Alexei Svitkine wrote: > > Ping, ...
5 years, 11 months ago (2015-01-14 20:57:39 UTC) #43
Alexei Svitkine (slow)
I believe the above is no longer the case in his latest patch set. (i.e. ...
5 years, 11 months ago (2015-01-14 21:01:20 UTC) #44
sky
https://codereview.chromium.org/678343002/diff/160001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/678343002/diff/160001/content/renderer/render_view_impl.cc#newcode3762 content/renderer/render_view_impl.cc:3762: // Round the double before dispatching the async IPC. ...
5 years, 11 months ago (2015-01-15 00:45:49 UTC) #45
sarka
On 2015/01/15 00:45:49, sky wrote: > https://codereview.chromium.org/678343002/diff/160001/content/renderer/render_view_impl.cc > File content/renderer/render_view_impl.cc (right): > > https://codereview.chromium.org/678343002/diff/160001/content/renderer/render_view_impl.cc#newcode3762 > ...
5 years, 11 months ago (2015-01-22 01:51:28 UTC) #46
sky
https://codereview.chromium.org/678343002/diff/180001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/678343002/diff/180001/content/renderer/render_view_impl.cc#newcode3765 content/renderer/render_view_impl.cc:3765: ZoomLevelToZoomFactor(minimum_level) * 100 + 0.5); If we're rounding, why ...
5 years, 11 months ago (2015-01-22 17:30:35 UTC) #47
Alexei Svitkine (slow)
Do we have a round API? On Thu, Jan 22, 2015 at 12:30 PM, <sky@chromium.org> ...
5 years, 11 months ago (2015-01-22 20:46:54 UTC) #48
sky
round() ? On Thu, Jan 22, 2015 at 12:46 PM, Alexei Svitkine <asvitkine@chromium.org> wrote: > ...
5 years, 11 months ago (2015-01-22 21:20:28 UTC) #49
sarka
On 2015/01/22 21:20:28, sky wrote: > round() ? > > On Thu, Jan 22, 2015 ...
5 years, 11 months ago (2015-01-23 04:11:32 UTC) #50
sky
On Thu, Jan 22, 2015 at 8:11 PM, <a.sarkar.arun@gmail.com> wrote: > On 2015/01/22 21:20:28, sky ...
5 years, 11 months ago (2015-01-23 17:17:12 UTC) #51
sarka
On 2015/01/23 17:17:12, sky wrote: > On Thu, Jan 22, 2015 at 8:11 PM, <mailto:a.sarkar.arun@gmail.com> ...
5 years, 11 months ago (2015-01-24 18:30:20 UTC) #52
sky
LGTM
5 years, 11 months ago (2015-01-26 16:00:54 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678343002/200001
5 years, 11 months ago (2015-01-26 19:51:54 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/38375)
5 years, 11 months ago (2015-01-26 20:00:09 UTC) #57
sarka
On 2015/01/24 18:30:20, sarka wrote: > On 2015/01/23 17:17:12, sky wrote: > > On Thu, ...
5 years, 10 months ago (2015-01-27 19:55:40 UTC) #59
jeremy
LGTM https://codereview.chromium.org/678343002/diff/200001/chrome/browser/browser_commands_unittest.cc File chrome/browser/browser_commands_unittest.cc (right): https://codereview.chromium.org/678343002/diff/200001/chrome/browser/browser_commands_unittest.cc#newcode367 chrome/browser/browser_commands_unittest.cc:367: // Tab no longer at default zoom hence ...
5 years, 10 months ago (2015-01-28 05:59:25 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678343002/200001
5 years, 10 months ago (2015-01-28 14:36:19 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/18065) mac_chromium_compile_dbg_ng on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/18223)
5 years, 10 months ago (2015-01-28 14:39:18 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678343002/240001
5 years, 10 months ago (2015-02-22 03:21:40 UTC) #66
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/61325)
5 years, 10 months ago (2015-02-22 03:24:42 UTC) #68
sarka
On 2015/02/22 03:24:42, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
5 years, 10 months ago (2015-02-23 01:59:23 UTC) #71
Avi (use Gerrit)
not lgtm Am I missing something? The naming is completely wrong here. https://codereview.chromium.org/678343002/diff/240001/chrome/browser/browser_commands_unittest.cc File chrome/browser/browser_commands_unittest.cc ...
5 years, 10 months ago (2015-02-23 04:51:55 UTC) #72
sarka
On 2015/02/23 04:51:55, Avi wrote: > not lgtm > > Am I missing something? The ...
5 years, 10 months ago (2015-02-23 05:35:40 UTC) #73
sarka
On 2015/02/23 05:35:40, sarka wrote: > On 2015/02/23 04:51:55, Avi wrote: > > not lgtm ...
5 years, 10 months ago (2015-02-24 02:13:04 UTC) #74
Avi (use Gerrit)
On 2015/02/24 02:13:04, sarka wrote: > On 2015/02/23 05:35:40, sarka wrote: > > On 2015/02/23 ...
5 years, 10 months ago (2015-02-25 19:22:21 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/678343002/260001
5 years, 10 months ago (2015-02-26 03:20:02 UTC) #78
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 10 months ago (2015-02-26 05:39:25 UTC) #79
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/daadc7150bd4955f19af36c67d104e68fef5d5fe Cr-Commit-Position: refs/heads/master@{#318191}
5 years, 10 months ago (2015-02-26 05:40:12 UTC) #80
Alexei Svitkine (slow)
https://codereview.chromium.org/678343002/diff/260001/chrome/browser/browser_commands_unittest.cc File chrome/browser/browser_commands_unittest.cc (right): https://codereview.chromium.org/678343002/diff/260001/chrome/browser/browser_commands_unittest.cc#newcode242 chrome/browser/browser_commands_unittest.cc:242: WebContents* firstTab = tab_strip_model->GetWebContentsAt(0); Hmm, not sure at which ...
5 years, 10 months ago (2015-02-26 14:26:35 UTC) #81
sarka
5 years, 9 months ago (2015-02-26 15:37:22 UTC) #82
Message was sent while issue was closed.
https://codereview.chromium.org/678343002/diff/120001/chrome/browser/ui/brows...
File chrome/browser/ui/browser_commands.cc (right):

https://codereview.chromium.org/678343002/diff/120001/chrome/browser/ui/brows...
chrome/browser/ui/browser_commands.cc:604: contents->GetMaximumZoomPercent() +
1;
On 2014/11/24 15:46:57, sky wrote:
> Why the +1 here?

If I remember correct contents->GetMaximumZoomPercent() returned 499 when I had
initially uploaded the patch. Hence +1

https://codereview.chromium.org/678343002/diff/260001/chrome/browser/browser_...
File chrome/browser/browser_commands_unittest.cc (right):

https://codereview.chromium.org/678343002/diff/260001/chrome/browser/browser_...
chrome/browser/browser_commands_unittest.cc:242: WebContents* firstTab =
tab_strip_model->GetWebContentsAt(0);
On 2015/02/26 14:26:35, Alexei Svitkine wrote:
> Hmm, not sure at which point this slipped through - but actually code in this
> file should be using hacker_style, not camelCase.
> 
> Can you fix in a follow-up CL? Thanks.

My bad, I updated the names in the last CL. The names in the older patch looked
silly. Will upload a followup CL.
Thanks

Powered by Google App Engine
This is Rietveld 408576698