| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 return; | 90 return; |
| 91 } | 91 } |
| 92 | 92 |
| 93 Page* page = document->page(); | 93 Page* page = document->page(); |
| 94 if (!page) | 94 if (!page) |
| 95 return; | 95 return; |
| 96 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 96 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
| 97 scrollingCoordinator->touchEventTargetRectsDidChange(document); | 97 scrollingCoordinator->touchEventTargetRectsDidChange(document); |
| 98 if (m_touchEventTargets->size()) | 98 if (m_touchEventTargets->size()) |
| 99 return; | 99 return; |
| 100 for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree()->t
raverseNext()) { | 100 for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree().tr
averseNext()) { |
| 101 if (frame->document() && TouchController::from(frame->document())->hasTo
uchEventHandlers()) | 101 if (frame->document() && TouchController::from(frame->document())->hasTo
uchEventHandlers()) |
| 102 return; | 102 return; |
| 103 } | 103 } |
| 104 page->chrome().client().needTouchEvents(false); | 104 page->chrome().client().needTouchEvents(false); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void TouchController::didRemoveEventTargetNode(Document* document, Node* handler
) | 107 void TouchController::didRemoveEventTargetNode(Document* document, Node* handler
) |
| 108 { | 108 { |
| 109 if (m_touchEventTargets && !m_touchEventTargets->isEmpty()) { | 109 if (m_touchEventTargets && !m_touchEventTargets->isEmpty()) { |
| 110 if (handler == document) | 110 if (handler == document) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 void TouchController::documentBeingDestroyed() | 154 void TouchController::documentBeingDestroyed() |
| 155 { | 155 { |
| 156 Document* document = static_cast<Document*>(executionContext()); | 156 Document* document = static_cast<Document*>(executionContext()); |
| 157 | 157 |
| 158 if (Document* ownerDocument = document->ownerDocument()) | 158 if (Document* ownerDocument = document->ownerDocument()) |
| 159 TouchController::from(ownerDocument)->didRemoveEventTargetNode(ownerDocu
ment, document); | 159 TouchController::from(ownerDocument)->didRemoveEventTargetNode(ownerDocu
ment, document); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace WebCore | 162 } // namespace WebCore |
| OLD | NEW |