| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4823 m_touchEventTargets = adoptPtr(new TouchEventTargetSet); | 4823 m_touchEventTargets = adoptPtr(new TouchEventTargetSet); |
| 4824 m_touchEventTargets->add(handler); | 4824 m_touchEventTargets->add(handler); |
| 4825 if (Document* parent = parentDocument()) { | 4825 if (Document* parent = parentDocument()) { |
| 4826 parent->didAddTouchEventHandler(this); | 4826 parent->didAddTouchEventHandler(this); |
| 4827 return; | 4827 return; |
| 4828 } | 4828 } |
| 4829 if (Page* page = this->page()) { | 4829 if (Page* page = this->page()) { |
| 4830 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) | 4830 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordina
tor()) |
| 4831 scrollingCoordinator->touchEventTargetRectsDidChange(this); | 4831 scrollingCoordinator->touchEventTargetRectsDidChange(this); |
| 4832 if (m_touchEventTargets->size() == 1) | 4832 if (m_touchEventTargets->size() == 1) |
| 4833 page->chrome().client()->needTouchEvents(true); | 4833 page->chrome().client().needTouchEvents(true); |
| 4834 } | 4834 } |
| 4835 } | 4835 } |
| 4836 | 4836 |
| 4837 void Document::didRemoveTouchEventHandler(Node* handler) | 4837 void Document::didRemoveTouchEventHandler(Node* handler) |
| 4838 { | 4838 { |
| 4839 if (!m_touchEventTargets.get()) | 4839 if (!m_touchEventTargets.get()) |
| 4840 return; | 4840 return; |
| 4841 ASSERT(m_touchEventTargets->contains(handler)); | 4841 ASSERT(m_touchEventTargets->contains(handler)); |
| 4842 m_touchEventTargets->remove(handler); | 4842 m_touchEventTargets->remove(handler); |
| 4843 if (Document* parent = parentDocument()) { | 4843 if (Document* parent = parentDocument()) { |
| 4844 parent->didRemoveTouchEventHandler(this); | 4844 parent->didRemoveTouchEventHandler(this); |
| 4845 return; | 4845 return; |
| 4846 } | 4846 } |
| 4847 | 4847 |
| 4848 Page* page = this->page(); | 4848 Page* page = this->page(); |
| 4849 if (!page) | 4849 if (!page) |
| 4850 return; | 4850 return; |
| 4851 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) | 4851 if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator(
)) |
| 4852 scrollingCoordinator->touchEventTargetRectsDidChange(this); | 4852 scrollingCoordinator->touchEventTargetRectsDidChange(this); |
| 4853 if (m_touchEventTargets->size()) | 4853 if (m_touchEventTargets->size()) |
| 4854 return; | 4854 return; |
| 4855 for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree()->t
raverseNext()) { | 4855 for (const Frame* frame = page->mainFrame(); frame; frame = frame->tree()->t
raverseNext()) { |
| 4856 if (frame->document() && frame->document()->hasTouchEventHandlers()) | 4856 if (frame->document() && frame->document()->hasTouchEventHandlers()) |
| 4857 return; | 4857 return; |
| 4858 } | 4858 } |
| 4859 page->chrome().client()->needTouchEvents(false); | 4859 page->chrome().client().needTouchEvents(false); |
| 4860 } | 4860 } |
| 4861 | 4861 |
| 4862 void Document::didRemoveEventTargetNode(Node* handler) | 4862 void Document::didRemoveEventTargetNode(Node* handler) |
| 4863 { | 4863 { |
| 4864 if (m_touchEventTargets) { | 4864 if (m_touchEventTargets) { |
| 4865 m_touchEventTargets->removeAll(handler); | 4865 m_touchEventTargets->removeAll(handler); |
| 4866 if ((handler == this || m_touchEventTargets->isEmpty()) && parentDocumen
t()) | 4866 if ((handler == this || m_touchEventTargets->isEmpty()) && parentDocumen
t()) |
| 4867 parentDocument()->didRemoveEventTargetNode(this); | 4867 parentDocument()->didRemoveEventTargetNode(this); |
| 4868 } | 4868 } |
| 4869 } | 4869 } |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5189 | 5189 |
| 5190 void Document::didAssociateFormControlsTimerFired(Timer<Document>* timer) | 5190 void Document::didAssociateFormControlsTimerFired(Timer<Document>* timer) |
| 5191 { | 5191 { |
| 5192 ASSERT_UNUSED(timer, timer == &m_didAssociateFormControlsTimer); | 5192 ASSERT_UNUSED(timer, timer == &m_didAssociateFormControlsTimer); |
| 5193 if (!frame() || !frame()->page()) | 5193 if (!frame() || !frame()->page()) |
| 5194 return; | 5194 return; |
| 5195 | 5195 |
| 5196 Vector<RefPtr<Element> > associatedFormControls; | 5196 Vector<RefPtr<Element> > associatedFormControls; |
| 5197 copyToVector(m_associatedFormControls, associatedFormControls); | 5197 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5198 | 5198 |
| 5199 frame()->page()->chrome().client()->didAssociateFormControls(associatedFormC
ontrols); | 5199 frame()->page()->chrome().client().didAssociateFormControls(associatedFormCo
ntrols); |
| 5200 m_associatedFormControls.clear(); | 5200 m_associatedFormControls.clear(); |
| 5201 } | 5201 } |
| 5202 | 5202 |
| 5203 PassOwnPtr<LifecycleNotifier> Document::createLifecycleNotifier() | 5203 PassOwnPtr<LifecycleNotifier> Document::createLifecycleNotifier() |
| 5204 { | 5204 { |
| 5205 return DocumentLifecycleNotifier::create(this); | 5205 return DocumentLifecycleNotifier::create(this); |
| 5206 } | 5206 } |
| 5207 | 5207 |
| 5208 DocumentLifecycleNotifier* Document::lifecycleNotifier() | 5208 DocumentLifecycleNotifier* Document::lifecycleNotifier() |
| 5209 { | 5209 { |
| 5210 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); | 5210 return static_cast<DocumentLifecycleNotifier*>(ScriptExecutionContext::lifec
ycleNotifier()); |
| 5211 } | 5211 } |
| 5212 | 5212 |
| 5213 } // namespace WebCore | 5213 } // namespace WebCore |
| OLD | NEW |