OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google, Inc. All rights reserved. | 2 * Copyright (C) 2013 Google, Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 const char* WheelController::supplementName() | 47 const char* WheelController::supplementName() |
48 { | 48 { |
49 return "WheelController"; | 49 return "WheelController"; |
50 } | 50 } |
51 | 51 |
52 WheelController* WheelController::from(Document& document) | 52 WheelController* WheelController::from(Document& document) |
53 { | 53 { |
54 WheelController* controller = static_cast<WheelController*>(DocumentSuppleme
nt::from(document, supplementName())); | 54 WheelController* controller = static_cast<WheelController*>(DocumentSuppleme
nt::from(document, supplementName())); |
55 if (!controller) { | 55 if (!controller) { |
56 controller = new WheelController(document); | 56 controller = new WheelController(document); |
57 DocumentSupplement::provideTo(document, supplementName(), adoptPtr(contr
oller)); | 57 DocumentSupplement::provideTo(document, supplementName(), adoptPtrWillBe
Noop(controller)); |
58 } | 58 } |
59 return controller; | 59 return controller; |
60 } | 60 } |
61 | 61 |
62 static void wheelEventHandlerCountChanged(Document& document) | 62 static void wheelEventHandlerCountChanged(Document& document) |
63 { | 63 { |
64 Page* page = document.page(); | 64 Page* page = document.page(); |
65 if (!page) | 65 if (!page) |
66 return; | 66 return; |
67 | 67 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 { | 109 { |
110 if (eventType != EventTypeNames::wheel && eventType != EventTypeNames::mouse
wheel) | 110 if (eventType != EventTypeNames::wheel && eventType != EventTypeNames::mouse
wheel) |
111 return; | 111 return; |
112 | 112 |
113 Document* document = window->document(); | 113 Document* document = window->document(); |
114 ASSERT(document); | 114 ASSERT(document); |
115 didRemoveWheelEventHandler(*document); | 115 didRemoveWheelEventHandler(*document); |
116 } | 116 } |
117 | 117 |
118 } // namespace WebCore | 118 } // namespace WebCore |
OLD | NEW |