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 | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 m_hasAnnotatedRegions(false), | 469 m_hasAnnotatedRegions(false), |
470 m_annotatedRegionsDirty(false), | 470 m_annotatedRegionsDirty(false), |
471 m_useSecureKeyboardEntryWhenActive(false), | 471 m_useSecureKeyboardEntryWhenActive(false), |
472 m_documentClasses(documentClasses), | 472 m_documentClasses(documentClasses), |
473 m_isViewSource(false), | 473 m_isViewSource(false), |
474 m_sawElementsInKnownNamespaces(false), | 474 m_sawElementsInKnownNamespaces(false), |
475 m_isSrcdocDocument(false), | 475 m_isSrcdocDocument(false), |
476 m_isMobileDocument(false), | 476 m_isMobileDocument(false), |
477 m_layoutView(0), | 477 m_layoutView(0), |
478 m_contextDocument(initializer.contextDocument()), | 478 m_contextDocument(initializer.contextDocument()), |
479 m_hasFullscreenSupplement(false), | |
480 m_loadEventDelayCount(0), | 479 m_loadEventDelayCount(0), |
481 m_loadEventDelayTimer(TaskRunnerHelper::get(TaskType::Networking, this), | 480 m_loadEventDelayTimer(TaskRunnerHelper::get(TaskType::Networking, this), |
482 this, | 481 this, |
483 &Document::loadEventDelayTimerFired), | 482 &Document::loadEventDelayTimerFired), |
484 m_pluginLoadingTimer(TaskRunnerHelper::get(TaskType::Internal, this), | 483 m_pluginLoadingTimer(TaskRunnerHelper::get(TaskType::Internal, this), |
485 this, | 484 this, |
486 &Document::pluginLoadingTimerFired), | 485 &Document::pluginLoadingTimerFired), |
487 m_documentTiming(*this), | 486 m_documentTiming(*this), |
488 m_writeRecursionIsTooDeep(false), | 487 m_writeRecursionIsTooDeep(false), |
489 m_writeRecursionDepth(0), | 488 m_writeRecursionDepth(0), |
(...skipping 3702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4192 return 0; | 4191 return 0; |
4193 return domWindow->getAttributeEventListener(eventType); | 4192 return domWindow->getAttributeEventListener(eventType); |
4194 } | 4193 } |
4195 | 4194 |
4196 EventQueue* Document::getEventQueue() const { | 4195 EventQueue* Document::getEventQueue() const { |
4197 if (!m_domWindow) | 4196 if (!m_domWindow) |
4198 return 0; | 4197 return 0; |
4199 return m_domWindow->getEventQueue(); | 4198 return m_domWindow->getEventQueue(); |
4200 } | 4199 } |
4201 | 4200 |
| 4201 void Document::enqueueAnimationFrameTask(std::unique_ptr<WTF::Closure> task) { |
| 4202 ensureScriptedAnimationController().enqueueTask(std::move(task)); |
| 4203 } |
| 4204 |
4202 void Document::enqueueAnimationFrameEvent(Event* event) { | 4205 void Document::enqueueAnimationFrameEvent(Event* event) { |
4203 ensureScriptedAnimationController().enqueueEvent(event); | 4206 ensureScriptedAnimationController().enqueueEvent(event); |
4204 } | 4207 } |
4205 | 4208 |
4206 void Document::enqueueUniqueAnimationFrameEvent(Event* event) { | 4209 void Document::enqueueUniqueAnimationFrameEvent(Event* event) { |
4207 ensureScriptedAnimationController().enqueuePerFrameEvent(event); | 4210 ensureScriptedAnimationController().enqueuePerFrameEvent(event); |
4208 } | 4211 } |
4209 | 4212 |
4210 void Document::enqueueScrollEventForNode(Node* target) { | 4213 void Document::enqueueScrollEventForNode(Node* target) { |
4211 // Per the W3C CSSOM View Module only scroll events fired at the document | 4214 // Per the W3C CSSOM View Module only scroll events fired at the document |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5705 void Document::removeFromTopLayer(Element* element) { | 5708 void Document::removeFromTopLayer(Element* element) { |
5706 if (!element->isInTopLayer()) | 5709 if (!element->isInTopLayer()) |
5707 return; | 5710 return; |
5708 size_t position = m_topLayerElements.find(element); | 5711 size_t position = m_topLayerElements.find(element); |
5709 DCHECK_NE(position, kNotFound); | 5712 DCHECK_NE(position, kNotFound); |
5710 m_topLayerElements.remove(position); | 5713 m_topLayerElements.remove(position); |
5711 element->setIsInTopLayer(false); | 5714 element->setIsInTopLayer(false); |
5712 } | 5715 } |
5713 | 5716 |
5714 HTMLDialogElement* Document::activeModalDialog() const { | 5717 HTMLDialogElement* Document::activeModalDialog() const { |
5715 if (m_topLayerElements.isEmpty()) | 5718 for (auto it = m_topLayerElements.rbegin(); it != m_topLayerElements.rend(); |
5716 return 0; | 5719 ++it) { |
5717 return toHTMLDialogElement(m_topLayerElements.last().get()); | 5720 if (isHTMLDialogElement(*it)) |
| 5721 return toHTMLDialogElement((*it).get()); |
| 5722 } |
| 5723 |
| 5724 return nullptr; |
5718 } | 5725 } |
5719 | 5726 |
5720 void Document::exitPointerLock() { | 5727 void Document::exitPointerLock() { |
5721 if (!page()) | 5728 if (!page()) |
5722 return; | 5729 return; |
5723 if (Element* target = page()->pointerLockController().element()) { | 5730 if (Element* target = page()->pointerLockController().element()) { |
5724 if (target->document() != this) | 5731 if (target->document() != this) |
5725 return; | 5732 return; |
5726 page()->pointerLockController().requestPointerUnlock(); | 5733 page()->pointerLockController().requestPointerUnlock(); |
5727 } | 5734 } |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6464 } | 6471 } |
6465 | 6472 |
6466 void showLiveDocumentInstances() { | 6473 void showLiveDocumentInstances() { |
6467 WeakDocumentSet& set = liveDocumentSet(); | 6474 WeakDocumentSet& set = liveDocumentSet(); |
6468 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6475 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6469 for (Document* document : set) | 6476 for (Document* document : set) |
6470 fprintf(stderr, "- Document %p URL: %s\n", document, | 6477 fprintf(stderr, "- Document %p URL: %s\n", document, |
6471 document->url().getString().utf8().data()); | 6478 document->url().getString().utf8().data()); |
6472 } | 6479 } |
6473 #endif | 6480 #endif |
OLD | NEW |