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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
68 ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(); | 68 ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(); |
69 if (!scrollingCoordinator) | 69 if (!scrollingCoordinator) |
70 return; | 70 return; |
71 | 71 |
72 FrameView* frameView = document.view(); | 72 scrollingCoordinator->haveWheelEventHandlersChangedForPage(); |
abarth-chromium
2014/04/11 18:53:38
didChangeWheelEventHandlers() ?
| |
73 if (!frameView) | |
74 return; | |
75 | |
76 scrollingCoordinator->frameViewWheelEventHandlerCountChanged(frameView); | |
77 } | 73 } |
78 | 74 |
79 void WheelController::didAddWheelEventHandler(Document& document) | 75 void WheelController::didAddWheelEventHandler(Document& document) |
80 { | 76 { |
81 ++m_wheelEventHandlerCount; | 77 ++m_wheelEventHandlerCount; |
82 Page* page = document.page(); | 78 Page* page = document.page(); |
83 LocalFrame* mainFrame = page ? page->mainFrame() : 0; | 79 LocalFrame* mainFrame = page ? page->mainFrame() : 0; |
84 if (mainFrame) | 80 if (mainFrame) |
85 mainFrame->notifyChromeClientWheelEventHandlerCountChanged(); | 81 mainFrame->notifyChromeClientWheelEventHandlerCountChanged(); |
86 | 82 |
(...skipping 26 matching lines...) Expand all Loading... | |
113 { | 109 { |
114 if (eventType != EventTypeNames::wheel && eventType != EventTypeNames::mouse wheel) | 110 if (eventType != EventTypeNames::wheel && eventType != EventTypeNames::mouse wheel) |
115 return; | 111 return; |
116 | 112 |
117 Document* document = window->document(); | 113 Document* document = window->document(); |
118 ASSERT(document); | 114 ASSERT(document); |
119 didRemoveWheelEventHandler(*document); | 115 didRemoveWheelEventHandler(*document); |
120 } | 116 } |
121 | 117 |
122 } // namespace WebCore | 118 } // namespace WebCore |
OLD | NEW |