| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/webscrollbarbehavior_impl_gtkoraura.h" | 5 #include "content/renderer/webscrollbarbehavior_impl_gtkoraura.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" |
| 7 #include "third_party/WebKit/public/platform/WebPoint.h" | 8 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 8 #include "third_party/WebKit/public/platform/WebRect.h" | 9 #include "third_party/WebKit/public/platform/WebRect.h" |
| 9 | 10 |
| 10 namespace content { | 11 namespace content { |
| 11 | 12 |
| 12 bool WebScrollbarBehaviorImpl::shouldCenterOnThumb( | 13 bool WebScrollbarBehaviorImpl::shouldCenterOnThumb( |
| 13 blink::WebScrollbarBehavior::Button mouseButton, | 14 blink::WebScrollbarBehavior::Button mouseButton, |
| 14 bool shiftKeyPressed, | 15 bool shiftKeyPressed, |
| 15 bool altKeyPressed) { | 16 bool altKeyPressed) { |
| 16 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 17 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) | 53 #if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) |
| 53 return isHorizontal ? | 54 return isHorizontal ? |
| 54 (eventPoint.y < noSnapRect.y() || eventPoint.y >= noSnapRect.bottom()) : | 55 (eventPoint.y < noSnapRect.y() || eventPoint.y >= noSnapRect.bottom()) : |
| 55 (eventPoint.x < noSnapRect.x() || eventPoint.x >= noSnapRect.right()); | 56 (eventPoint.x < noSnapRect.x() || eventPoint.x >= noSnapRect.right()); |
| 56 #else | 57 #else |
| 57 return !noSnapRect.Contains(eventPoint); | 58 return !noSnapRect.Contains(eventPoint); |
| 58 #endif | 59 #endif |
| 59 } | 60 } |
| 60 | 61 |
| 61 } // namespace content | 62 } // namespace content |
| OLD | NEW |