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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #include "core/dom/ElementCreationOptions.h" | 82 #include "core/dom/ElementCreationOptions.h" |
83 #include "core/dom/ElementDataCache.h" | 83 #include "core/dom/ElementDataCache.h" |
84 #include "core/dom/ElementRegistrationOptions.h" | 84 #include "core/dom/ElementRegistrationOptions.h" |
85 #include "core/dom/ElementTraversal.h" | 85 #include "core/dom/ElementTraversal.h" |
86 #include "core/dom/ExceptionCode.h" | 86 #include "core/dom/ExceptionCode.h" |
87 #include "core/dom/ExecutionContextTask.h" | 87 #include "core/dom/ExecutionContextTask.h" |
88 #include "core/dom/FrameRequestCallback.h" | 88 #include "core/dom/FrameRequestCallback.h" |
89 #include "core/dom/IntersectionObserverController.h" | 89 #include "core/dom/IntersectionObserverController.h" |
90 #include "core/dom/LayoutTreeBuilderTraversal.h" | 90 #include "core/dom/LayoutTreeBuilderTraversal.h" |
91 #include "core/dom/LiveNodeList.h" | 91 #include "core/dom/LiveNodeList.h" |
| 92 #include "core/dom/ModuleMap.h" |
92 #include "core/dom/MutationObserver.h" | 93 #include "core/dom/MutationObserver.h" |
93 #include "core/dom/NodeChildRemovalTracker.h" | 94 #include "core/dom/NodeChildRemovalTracker.h" |
94 #include "core/dom/NodeComputedStyle.h" | 95 #include "core/dom/NodeComputedStyle.h" |
95 #include "core/dom/NodeFilter.h" | 96 #include "core/dom/NodeFilter.h" |
96 #include "core/dom/NodeIntersectionObserverData.h" | 97 #include "core/dom/NodeIntersectionObserverData.h" |
97 #include "core/dom/NodeIterator.h" | 98 #include "core/dom/NodeIterator.h" |
98 #include "core/dom/NodeRareData.h" | 99 #include "core/dom/NodeRareData.h" |
99 #include "core/dom/NodeTraversal.h" | 100 #include "core/dom/NodeTraversal.h" |
100 #include "core/dom/NodeWithIndex.h" | 101 #include "core/dom/NodeWithIndex.h" |
101 #include "core/dom/NthIndexCache.h" | 102 #include "core/dom/NthIndexCache.h" |
(...skipping 6344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6446 return LayoutViewItem(m_layoutView); | 6447 return LayoutViewItem(m_layoutView); |
6447 } | 6448 } |
6448 | 6449 |
6449 PropertyRegistry* Document::propertyRegistry() { | 6450 PropertyRegistry* Document::propertyRegistry() { |
6450 // TODO(timloh): When the flag is removed, return a reference instead. | 6451 // TODO(timloh): When the flag is removed, return a reference instead. |
6451 if (!m_propertyRegistry && RuntimeEnabledFeatures::cssVariables2Enabled()) | 6452 if (!m_propertyRegistry && RuntimeEnabledFeatures::cssVariables2Enabled()) |
6452 m_propertyRegistry = PropertyRegistry::create(); | 6453 m_propertyRegistry = PropertyRegistry::create(); |
6453 return m_propertyRegistry; | 6454 return m_propertyRegistry; |
6454 } | 6455 } |
6455 | 6456 |
| 6457 ModuleMap* Document::ensureModuleMap() { |
| 6458 if (!RuntimeEnabledFeatures::moduleScriptsEnabled()) |
| 6459 return nullptr; |
| 6460 |
| 6461 if (!m_moduleMap) { |
| 6462 m_moduleMap = ModuleMap::create(frame(), fetcher()); |
| 6463 } |
| 6464 |
| 6465 return m_moduleMap; |
| 6466 } |
| 6467 |
6456 void Document::incrementPasswordCount() { | 6468 void Document::incrementPasswordCount() { |
6457 ++m_passwordCount; | 6469 ++m_passwordCount; |
6458 if (isSecureContext() || m_passwordCount != 1) { | 6470 if (isSecureContext() || m_passwordCount != 1) { |
6459 // The browser process only cares about passwords on pages where the | 6471 // The browser process only cares about passwords on pages where the |
6460 // top-level URL is not secure. Secure contexts must have a top-level | 6472 // top-level URL is not secure. Secure contexts must have a top-level |
6461 // URL that is secure, so there is no need to send notifications for | 6473 // URL that is secure, so there is no need to send notifications for |
6462 // password fields in secure contexts. | 6474 // password fields in secure contexts. |
6463 // | 6475 // |
6464 // Also, only send a message on the first visible password field; the | 6476 // Also, only send a message on the first visible password field; the |
6465 // browser process doesn't care about the presence of additional | 6477 // browser process doesn't care about the presence of additional |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6527 visitor->trace(m_timeline); | 6539 visitor->trace(m_timeline); |
6528 visitor->trace(m_compositorPendingAnimations); | 6540 visitor->trace(m_compositorPendingAnimations); |
6529 visitor->trace(m_contextDocument); | 6541 visitor->trace(m_contextDocument); |
6530 visitor->trace(m_canvasFontCache); | 6542 visitor->trace(m_canvasFontCache); |
6531 visitor->trace(m_intersectionObserverController); | 6543 visitor->trace(m_intersectionObserverController); |
6532 visitor->trace(m_intersectionObserverData); | 6544 visitor->trace(m_intersectionObserverData); |
6533 visitor->trace(m_snapCoordinator); | 6545 visitor->trace(m_snapCoordinator); |
6534 visitor->trace(m_resizeObserverController); | 6546 visitor->trace(m_resizeObserverController); |
6535 visitor->trace(m_propertyRegistry); | 6547 visitor->trace(m_propertyRegistry); |
6536 visitor->trace(m_styleReattachDataMap); | 6548 visitor->trace(m_styleReattachDataMap); |
| 6549 visitor->trace(m_moduleMap); |
6537 Supplementable<Document>::trace(visitor); | 6550 Supplementable<Document>::trace(visitor); |
6538 TreeScope::trace(visitor); | 6551 TreeScope::trace(visitor); |
6539 ContainerNode::trace(visitor); | 6552 ContainerNode::trace(visitor); |
6540 ExecutionContext::trace(visitor); | 6553 ExecutionContext::trace(visitor); |
6541 SecurityContext::trace(visitor); | 6554 SecurityContext::trace(visitor); |
6542 SynchronousMutationNotifier::trace(visitor); | 6555 SynchronousMutationNotifier::trace(visitor); |
6543 } | 6556 } |
6544 | 6557 |
6545 void Document::maybeRecordLoadReason(WouldLoadReason reason) { | 6558 void Document::maybeRecordLoadReason(WouldLoadReason reason) { |
6546 DCHECK(m_wouldLoadReason == Created || reason != Created); | 6559 DCHECK(m_wouldLoadReason == Created || reason != Created); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6589 } | 6602 } |
6590 | 6603 |
6591 void showLiveDocumentInstances() { | 6604 void showLiveDocumentInstances() { |
6592 WeakDocumentSet& set = liveDocumentSet(); | 6605 WeakDocumentSet& set = liveDocumentSet(); |
6593 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6606 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6594 for (Document* document : set) | 6607 for (Document* document : set) |
6595 fprintf(stderr, "- Document %p URL: %s\n", document, | 6608 fprintf(stderr, "- Document %p URL: %s\n", document, |
6596 document->url().getString().utf8().data()); | 6609 document->url().getString().utf8().data()); |
6597 } | 6610 } |
6598 #endif | 6611 #endif |
OLD | NEW |