summaryrefslogtreecommitdiffstats
path: root/cc/base/switches.cc
diff options
context:
space:
mode:
authorbokan <bokan@chromium.org>2015-03-09 14:51:32 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-09 21:52:28 +0000
commitaa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3 (patch)
tree84d3803e89ce24dae61fbf7cba858e1d1b06995b /cc/base/switches.cc
parenta0bf8e711f92b7567e6ce3d6faba56825d36c13b (diff)
downloadchromium_src-aa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3.zip
chromium_src-aa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3.tar.gz
chromium_src-aa5d1b033c0894dfde32bfe0b1d2cd8b2d9a1eb3.tar.bz2
(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 Committed: https://crrev.com/7610e74eacde3468853c9765bd3f726c14df04c1 Cr-Commit-Position: refs/heads/master@{#319257} Review URL: https://codereview.chromium.org/961023002 Cr-Commit-Position: refs/heads/master@{#319738}
Diffstat (limited to 'cc/base/switches.cc')
-rw-r--r--cc/base/switches.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/cc/base/switches.cc b/cc/base/switches.cc
index 504e787..ae42482 100644
--- a/cc/base/switches.cc
+++ b/cc/base/switches.cc
@@ -24,9 +24,6 @@ const char kDisableMainFrameBeforeActivation[] =
const char kEnableMainFrameBeforeActivation[] =
"enable-main-frame-before-activation";
-const char kEnableTopControlsPositionCalculation[] =
- "enable-top-controls-position-calculation";
-
// Percentage of the top controls need to be hidden before they will auto hide.
const char kTopControlsHideThreshold[] = "top-controls-hide-threshold";