Commit 23434b4e authored by wjmaclean's avatar wjmaclean Committed by Commit bot

Use ZoomValuesEqual() instead of ==.

Replace an unsafe comparison of zoom level values.

BUG=none

Review URL: https://codereview.chromium.org/1032503003

Cr-Commit-Position: refs/heads/master@{#321866}
parent a27daaff
...@@ -96,7 +96,7 @@ bool ZoomController::SetZoomLevelByClient( ...@@ -96,7 +96,7 @@ bool ZoomController::SetZoomLevelByClient(
// Do not actually rescale the page in manual mode. // Do not actually rescale the page in manual mode.
if (zoom_mode_ == ZOOM_MODE_MANUAL) { if (zoom_mode_ == ZOOM_MODE_MANUAL) {
// If the zoom level hasn't changed, early out to avoid sending an event. // If the zoom level hasn't changed, early out to avoid sending an event.
if (zoom_level_ == zoom_level) if (content::ZoomValuesEqual(zoom_level_, zoom_level))
return true; return true;
double old_zoom_level = zoom_level_; double old_zoom_level = zoom_level_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment