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

Issue 961023002: (Reland) Always create top controls manager (Closed)

Created:
5 years, 10 months ago by bokan
Modified:
5 years, 9 months ago
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

(Reland) Always create top controls manager. This CL removes the calculate_top_controls_position flag and instead always creates the top controls manager. The methods of the manager become no-ops if the top controls height is 0 so that it becomes effectively enabled when a top controls height gets set. This fixes the attached bug because some Android Chrome UI pages don't have top controls but the manager was still created. These pages set the height to 0 to hide the top controls but the methods of the manager were still getting called. This caused a crash in Blink since ScrollBy would try to calculate the shown ratio with a 0 height, causing a NaN to propagate into Blink. BUG=460007, 461511 Committed: https://crrev.com/7610e74eacde3468853c9765bd3f726c14df04c1 Cr-Commit-Position: refs/heads/master@{#319257} Committed: https://crrev.com/aa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3 Cr-Commit-Position: refs/heads/master@{#319738}

Patch Set 1 #

Patch Set 2 : Removed calculate_top_controls_position and create manager lazily #

Patch Set 3 : Remove calculate_top_controls_position #

Patch Set 4 : Always create top controls manager #

Patch Set 5 : Removed calculate_top_controls_position flag from Android flags #

Total comments: 10

Patch Set 6 : Remove enabled state #

Patch Set 7 : Rebase #

Patch Set 8 : Skip updateViewportContainerSizes if no top controls #

Patch Set 9 : Zero out deltas before returning #

Patch Set 10 : Rebase #

Patch Set 11 : Fixing bad patch (Patches since "rebase" were from wrong branch) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -56 lines) Patch
M cc/base/switches.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M cc/base/switches.cc View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M cc/input/top_controls_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -0 lines 0 comments Download
M cc/input/top_controls_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -8 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 10 chunks +27 lines, -27 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 3 chunks +1 line, -3 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ApplicationInitialization.java View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/chrome_restart_request.cc View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/common/ContentSwitches.java View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
bokan
This was causing crashes further down as the NaN propagated into Blink. Looks like the ...
5 years, 10 months ago (2015-02-26 19:10:39 UTC) #2
aelias_OOO_until_Jul13
This fix looks OK. I prefer this to the setting, in fact I think it ...
5 years, 10 months ago (2015-02-26 20:51:05 UTC) #3
bokan
PTAL, I made LTHI always create the top controls manager as you suggested.
5 years, 9 months ago (2015-03-04 14:57:47 UTC) #4
aelias_OOO_until_Jul13
https://codereview.chromium.org/961023002/diff/80001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/961023002/diff/80001/cc/input/top_controls_manager.cc#newcode72 cc/input/top_controls_manager.cc:72: if (!TopControlsEnabled()) This one shouldn't be suppressed by height. ...
5 years, 9 months ago (2015-03-04 20:05:53 UTC) #5
bokan
https://codereview.chromium.org/961023002/diff/80001/cc/input/top_controls_manager.cc File cc/input/top_controls_manager.cc (right): https://codereview.chromium.org/961023002/diff/80001/cc/input/top_controls_manager.cc#newcode72 cc/input/top_controls_manager.cc:72: if (!TopControlsEnabled()) On 2015/03/04 20:05:53, aelias wrote: > This ...
5 years, 9 months ago (2015-03-04 21:48:30 UTC) #6
aelias_OOO_until_Jul13
OK, lgtm.
5 years, 9 months ago (2015-03-04 21:57:06 UTC) #7
bokan
+yfriedman@ for ApplicationInitialization.java and ContentSwitches.java +avi@ for render_widget_compositor.cc +dpolukhin@ for chrome_restart_request.cc
5 years, 9 months ago (2015-03-04 22:05:06 UTC) #9
Avi (use Gerrit)
lgtm stampity stamp
5 years, 9 months ago (2015-03-04 22:11:04 UTC) #10
Dmitry Polukhin
LGTM chrome/browser/chromeos/login/chrome_restart_request.cc
5 years, 9 months ago (2015-03-05 08:44:53 UTC) #11
Yaron
lgtm
5 years, 9 months ago (2015-03-05 14:44:20 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/961023002/100001
5 years, 9 months ago (2015-03-05 15:23:28 UTC) #14
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 9 months ago (2015-03-05 16:19:42 UTC) #15
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/7610e74eacde3468853c9765bd3f726c14df04c1 Cr-Commit-Position: refs/heads/master@{#319257}
5 years, 9 months ago (2015-03-05 16:20:35 UTC) #16
Dirk Pranke
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/986433004/ by dpranke@chromium.org. ...
5 years, 9 months ago (2015-03-05 23:59:24 UTC) #17
bokan
Alexandre, fixed up the patch to skip updateViewportContainerSizes if top controls aren't used (like before). ...
5 years, 9 months ago (2015-03-06 21:06:21 UTC) #19
aelias_OOO_until_Jul13
Could you set all the bound deltas to zero before early-returning? That's more correct in ...
5 years, 9 months ago (2015-03-06 21:51:05 UTC) #20
bokan
On 2015/03/06 21:51:05, aelias wrote: > Could you set all the bound deltas to zero ...
5 years, 9 months ago (2015-03-06 22:25:59 UTC) #21
aelias_OOO_until_Jul13
lgtm
5 years, 9 months ago (2015-03-06 22:32:29 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/961023002/180001
5 years, 9 months ago (2015-03-09 12:38:14 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/961023002/200001
5 years, 9 months ago (2015-03-09 15:34:21 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/961023002/220001
5 years, 9 months ago (2015-03-09 18:45:36 UTC) #33
commit-bot: I haz the power
Committed patchset #11 (id:220001)
5 years, 9 months ago (2015-03-09 21:51:54 UTC) #34
commit-bot: I haz the power
5 years, 9 months ago (2015-03-09 21:52:38 UTC) #35
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/aa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3
Cr-Commit-Position: refs/heads/master@{#319738}

Powered by Google App Engine
This is Rietveld 408576698