| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008, The Android Open Source Project | 2 * Copyright 2008, The Android Open Source Project |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above copyright | 10 * * Redistributions in binary form must reproduce the above copyright |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // event is uncancelable. | 256 // event is uncancelable. |
| 257 MessageSource message_source = kJSMessageSource; | 257 MessageSource message_source = kJSMessageSource; |
| 258 String warning_message; | 258 String warning_message; |
| 259 switch (HandlingPassive()) { | 259 switch (HandlingPassive()) { |
| 260 case PassiveMode::kNotPassive: | 260 case PassiveMode::kNotPassive: |
| 261 case PassiveMode::kNotPassiveDefault: | 261 case PassiveMode::kNotPassiveDefault: |
| 262 if (!cancelable()) { | 262 if (!cancelable()) { |
| 263 if (view() && view()->GetFrame()) { | 263 if (view() && view()->GetFrame()) { |
| 264 UseCounter::Count( | 264 UseCounter::Count( |
| 265 view()->GetFrame(), | 265 view()->GetFrame(), |
| 266 UseCounter::kUncancellableTouchEventPreventDefaulted); | 266 UseCounter::kUncancelableTouchEventPreventDefaulted); |
| 267 } | 267 } |
| 268 | 268 |
| 269 if (native_event_ && | 269 if (native_event_ && |
| 270 native_event_->dispatch_type == | 270 native_event_->dispatch_type == |
| 271 WebInputEvent:: | 271 WebInputEvent:: |
| 272 kListenersForcedNonBlockingDueToMainThreadResponsiveness) { | 272 kListenersForcedNonBlockingDueToMainThreadResponsiveness) { |
| 273 // Non blocking due to main thread responsiveness. | 273 // Non blocking due to main thread responsiveness. |
| 274 if (view() && view()->GetFrame()) { | 274 if (view() && view()->GetFrame()) { |
| 275 UseCounter::Count( | 275 UseCounter::Count( |
| 276 view()->GetFrame(), | 276 view()->GetFrame(), |
| 277 UseCounter:: | 277 UseCounter:: |
| 278 kUncancellableTouchEventDueToMainThreadResponsivenessPrevent
Defaulted); | 278 kUncancelableTouchEventDueToMainThreadResponsivenessPreventD
efaulted); |
| 279 } | 279 } |
| 280 message_source = kInterventionMessageSource; | 280 message_source = kInterventionMessageSource; |
| 281 warning_message = | 281 warning_message = |
| 282 "Ignored attempt to cancel a " + type() + | 282 "Ignored attempt to cancel a " + type() + |
| 283 " event with cancelable=false. This event was forced to be " | 283 " event with cancelable=false. This event was forced to be " |
| 284 "non-cancellable because the page was too busy to handle the " | 284 "non-cancellable because the page was too busy to handle the " |
| 285 "event promptly."; | 285 "event promptly."; |
| 286 } else { | 286 } else { |
| 287 // Non blocking for any other reason. | 287 // Non blocking for any other reason. |
| 288 warning_message = "Ignored attempt to cancel a " + type() + | 288 warning_message = "Ignored attempt to cancel a " + type() + |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 return ToTouchEvent(EventDispatchMediator::GetEvent()); | 378 return ToTouchEvent(EventDispatchMediator::GetEvent()); |
| 379 } | 379 } |
| 380 | 380 |
| 381 DispatchEventResult TouchEventDispatchMediator::DispatchEvent( | 381 DispatchEventResult TouchEventDispatchMediator::DispatchEvent( |
| 382 EventDispatcher& dispatcher) const { | 382 EventDispatcher& dispatcher) const { |
| 383 Event().GetEventPath().AdjustForTouchEvent(Event()); | 383 Event().GetEventPath().AdjustForTouchEvent(Event()); |
| 384 return dispatcher.Dispatch(); | 384 return dispatcher.Dispatch(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace blink | 387 } // namespace blink |
| OLD | NEW |