Commit 608c0ac5 authored by rdevlin.cronin's avatar rdevlin.cronin Committed by Commit bot

[Extensions Toolbar Mac] Adjust equality comparisons in container code

Adjust from using strict equality to >= and <= in order to account for the
possibility of ratios and floats more safely.

BUG=463905

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

Cr-Commit-Position: refs/heads/master@{#321834}
parent 82e8dcf1
......@@ -168,10 +168,10 @@ const CGFloat kMinimumContainerWidth = 3.0;
if ((dX < 0.0 && !canDragLeft_) || (dX > 0.0 && !canDragRight_))
return;
if (NSWidth(containerFrame) == kMinimumContainerWidth)
if (NSWidth(containerFrame) <= kMinimumContainerWidth)
return;
grippyPinned_ = NSWidth(containerFrame) == maxAllowedWidth;
grippyPinned_ = NSWidth(containerFrame) >= maxAllowedWidth;
containerFrame.origin.x += dX;
[self setFrame:containerFrame];
......
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