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

Unified Diff: ui/base/gestures/gesture_sequence.cc

Issue 11359194: Revert 167255 - ui: Remove gfx::Size::ClampToNonNegative, prevent negative sizes always. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | ui/gfx/rect_f.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gestures/gesture_sequence.cc
===================================================================
--- ui/base/gestures/gesture_sequence.cc (revision 167502)
+++ ui/base/gestures/gesture_sequence.cc (working copy)
@@ -583,9 +583,7 @@
void GestureSequence::RecreateBoundingBox() {
// TODO(sad): Recreating the bounding box at every touch-event is not very
// efficient. This should be made better.
- if (point_count_ == 0) {
- bounding_box_.SetRect(0, 0, 0, 0);
- } else if (point_count_ == 1) {
+ if (point_count_ == 1) {
bounding_box_ = GetPointByPointId(0)->enclosing_rectangle();
} else {
int left = INT_MAX / 20, top = INT_MAX / 20;
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.cc ('k') | ui/gfx/rect_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698