| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 static const int kMaximumCursorSize = 128; | 148 static const int kMaximumCursorSize = 128; |
| 149 | 149 |
| 150 // It's pretty unlikely that a scale of less than one would ever be used. But | 150 // It's pretty unlikely that a scale of less than one would ever be used. But |
| 151 // all we really need to ensure here is that the scale isn't so small that | 151 // all we really need to ensure here is that the scale isn't so small that |
| 152 // integer overflow can occur when dividing cursor sizes (limited above) by the | 152 // integer overflow can occur when dividing cursor sizes (limited above) by the |
| 153 // scale. | 153 // scale. |
| 154 static const double kMinimumCursorScale = 0.001; | 154 static const double kMinimumCursorScale = 0.001; |
| 155 | 155 |
| 156 // The minimum amount of time an element stays active after a ShowPress | 156 // The minimum amount of time an element stays active after a ShowPress |
| 157 // This is roughly 9 frames, which should be long enough to be noticeable. | 157 // This is roughly 9 frames, which should be long enough to be noticeable. |
| 158 static const TimeDelta kMinimumActiveInterval = TimeDelta::FromSecondsD(0.15); | 158 constexpr TimeDelta kMinimumActiveInterval = TimeDelta::FromSecondsD(0.15); |
| 159 | 159 |
| 160 enum NoCursorChangeType { kNoCursorChange }; | 160 enum NoCursorChangeType { kNoCursorChange }; |
| 161 | 161 |
| 162 class OptionalCursor { | 162 class OptionalCursor { |
| 163 public: | 163 public: |
| 164 OptionalCursor(NoCursorChangeType) : is_cursor_change_(false) {} | 164 OptionalCursor(NoCursorChangeType) : is_cursor_change_(false) {} |
| 165 OptionalCursor(const Cursor& cursor) | 165 OptionalCursor(const Cursor& cursor) |
| 166 : is_cursor_change_(true), cursor_(cursor) {} | 166 : is_cursor_change_(true), cursor_(cursor) {} |
| 167 | 167 |
| 168 bool IsCursorChange() const { return is_cursor_change_; } | 168 bool IsCursorChange() const { return is_cursor_change_; } |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2071 MouseEventWithHitTestResults& mev, | 2071 MouseEventWithHitTestResults& mev, |
| 2072 LocalFrame* subframe) { | 2072 LocalFrame* subframe) { |
| 2073 WebInputEventResult result = | 2073 WebInputEventResult result = |
| 2074 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); | 2074 subframe->GetEventHandler().HandleMouseReleaseEvent(mev.Event()); |
| 2075 if (result != WebInputEventResult::kNotHandled) | 2075 if (result != WebInputEventResult::kNotHandled) |
| 2076 return result; | 2076 return result; |
| 2077 return WebInputEventResult::kHandledSystem; | 2077 return WebInputEventResult::kHandledSystem; |
| 2078 } | 2078 } |
| 2079 | 2079 |
| 2080 } // namespace blink | 2080 } // namespace blink |
| OLD | NEW |