Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Side by Side Diff: Source/core/dom/TouchController.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/dom/FullscreenElementStack.cpp ('k') | Source/core/dom/TreeScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698