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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 newContainerNode->appendChild(newChild.release(), exceptionState); | 897 newContainerNode->appendChild(newChild.release(), exceptionState); |
898 if (exceptionState.hadException()) | 898 if (exceptionState.hadException()) |
899 return false; | 899 return false; |
900 } | 900 } |
901 | 901 |
902 return true; | 902 return true; |
903 } | 903 } |
904 | 904 |
905 PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, bool deep,
ExceptionState& exceptionState) | 905 PassRefPtrWillBeRawPtr<Node> Document::importNode(Node* importedNode, bool deep,
ExceptionState& exceptionState) |
906 { | 906 { |
907 switch (importedNode->nodeType()) { | 907 switch (importedNode->getNodeType()) { |
908 case TEXT_NODE: | 908 case TEXT_NODE: |
909 return createTextNode(importedNode->nodeValue()); | 909 return createTextNode(importedNode->nodeValue()); |
910 case CDATA_SECTION_NODE: | 910 case CDATA_SECTION_NODE: |
911 return CDATASection::create(*this, importedNode->nodeValue()); | 911 return CDATASection::create(*this, importedNode->nodeValue()); |
912 case PROCESSING_INSTRUCTION_NODE: | 912 case PROCESSING_INSTRUCTION_NODE: |
913 return createProcessingInstruction(importedNode->nodeName(), importedNod
e->nodeValue(), exceptionState); | 913 return createProcessingInstruction(importedNode->nodeName(), importedNod
e->nodeValue(), exceptionState); |
914 case COMMENT_NODE: | 914 case COMMENT_NODE: |
915 return createComment(importedNode->nodeValue()); | 915 return createComment(importedNode->nodeValue()); |
916 case DOCUMENT_TYPE_NODE: { | 916 case DOCUMENT_TYPE_NODE: { |
917 DocumentType* doctype = toDocumentType(importedNode); | 917 DocumentType* doctype = toDocumentType(importedNode); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 } | 963 } |
964 | 964 |
965 ASSERT_NOT_REACHED(); | 965 ASSERT_NOT_REACHED(); |
966 return nullptr; | 966 return nullptr; |
967 } | 967 } |
968 | 968 |
969 PassRefPtrWillBeRawPtr<Node> Document::adoptNode(PassRefPtrWillBeRawPtr<Node> so
urce, ExceptionState& exceptionState) | 969 PassRefPtrWillBeRawPtr<Node> Document::adoptNode(PassRefPtrWillBeRawPtr<Node> so
urce, ExceptionState& exceptionState) |
970 { | 970 { |
971 EventQueueScope scope; | 971 EventQueueScope scope; |
972 | 972 |
973 switch (source->nodeType()) { | 973 switch (source->getNodeType()) { |
974 case DOCUMENT_NODE: | 974 case DOCUMENT_NODE: |
975 exceptionState.throwDOMException(NotSupportedError, "The node provided i
s of type '" + source->nodeName() + "', which may not be adopted."); | 975 exceptionState.throwDOMException(NotSupportedError, "The node provided i
s of type '" + source->nodeName() + "', which may not be adopted."); |
976 return nullptr; | 976 return nullptr; |
977 case ATTRIBUTE_NODE: { | 977 case ATTRIBUTE_NODE: { |
978 Attr* attr = toAttr(source.get()); | 978 Attr* attr = toAttr(source.get()); |
979 if (RefPtrWillBeRawPtr<Element> ownerElement = attr->ownerElement()) | 979 if (RefPtrWillBeRawPtr<Element> ownerElement = attr->ownerElement()) |
980 ownerElement->removeAttributeNode(attr, exceptionState); | 980 ownerElement->removeAttributeNode(attr, exceptionState); |
981 break; | 981 break; |
982 } | 982 } |
983 default: | 983 default: |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 { | 1404 { |
1405 ASSERT(m_visibilityObservers.contains(observer)); | 1405 ASSERT(m_visibilityObservers.contains(observer)); |
1406 m_visibilityObservers.remove(observer); | 1406 m_visibilityObservers.remove(observer); |
1407 } | 1407 } |
1408 | 1408 |
1409 String Document::nodeName() const | 1409 String Document::nodeName() const |
1410 { | 1410 { |
1411 return "#document"; | 1411 return "#document"; |
1412 } | 1412 } |
1413 | 1413 |
1414 Node::NodeType Document::nodeType() const | 1414 Node::NodeType Document::getNodeType() const |
1415 { | 1415 { |
1416 return DOCUMENT_NODE; | 1416 return DOCUMENT_NODE; |
1417 } | 1417 } |
1418 | 1418 |
1419 FormController& Document::formController() | 1419 FormController& Document::formController() |
1420 { | 1420 { |
1421 if (!m_formController) { | 1421 if (!m_formController) { |
1422 m_formController = FormController::create(); | 1422 m_formController = FormController::create(); |
1423 if (m_frame && m_frame->loader().currentItem() && m_frame->loader().curr
entItem()->isCurrentDocument(this)) | 1423 if (m_frame && m_frame->loader().currentItem() && m_frame->loader().curr
entItem()->isCurrentDocument(this)) |
1424 m_frame->loader().currentItem()->setDocumentState(m_formController->
formElementsState()); | 1424 m_frame->loader().currentItem()->setDocumentState(m_formController->
formElementsState()); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1537 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending); | 1537 m_lifecycle.ensureStateAtMost(DocumentLifecycle::VisualUpdatePending); |
1538 | 1538 |
1539 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu
leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty
lesEvent::data(frame())); | 1539 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Schedu
leStyleRecalculation", TRACE_EVENT_SCOPE_THREAD, "data", InspectorRecalculateSty
lesEvent::data(frame())); |
1540 InspectorInstrumentation::didScheduleStyleRecalculation(this); | 1540 InspectorInstrumentation::didScheduleStyleRecalculation(this); |
1541 | 1541 |
1542 ++m_styleVersion; | 1542 ++m_styleVersion; |
1543 } | 1543 } |
1544 | 1544 |
1545 bool Document::hasPendingForcedStyleRecalc() const | 1545 bool Document::hasPendingForcedStyleRecalc() const |
1546 { | 1546 { |
1547 return hasPendingStyleRecalc() && !inStyleRecalc() && styleChangeType() >= S
ubtreeStyleChange; | 1547 return hasPendingStyleRecalc() && !inStyleRecalc() && getStyleChangeType() >
= SubtreeStyleChange; |
1548 } | 1548 } |
1549 | 1549 |
1550 void Document::updateStyleInvalidationIfNeeded() | 1550 void Document::updateStyleInvalidationIfNeeded() |
1551 { | 1551 { |
1552 ScriptForbiddenScope forbidScript; | 1552 ScriptForbiddenScope forbidScript; |
1553 | 1553 |
1554 if (!isActive()) | 1554 if (!isActive()) |
1555 return; | 1555 return; |
1556 if (!childNeedsStyleInvalidation()) | 1556 if (!childNeedsStyleInvalidation()) |
1557 return; | 1557 return; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 void Document::updateStyle() | 1812 void Document::updateStyle() |
1813 { | 1813 { |
1814 ASSERT(!view()->shouldThrottleRendering()); | 1814 ASSERT(!view()->shouldThrottleRendering()); |
1815 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); | 1815 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); |
1816 unsigned initialElementCount = styleEngine().styleForElementCount(); | 1816 unsigned initialElementCount = styleEngine().styleForElementCount(); |
1817 | 1817 |
1818 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; | 1818 HTMLFrameOwnerElement::UpdateSuspendScope suspendWidgetHierarchyUpdates; |
1819 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc); | 1819 m_lifecycle.advanceTo(DocumentLifecycle::InStyleRecalc); |
1820 | 1820 |
1821 StyleRecalcChange change = NoChange; | 1821 StyleRecalcChange change = NoChange; |
1822 if (styleChangeType() >= SubtreeStyleChange) | 1822 if (getStyleChangeType() >= SubtreeStyleChange) |
1823 change = Force; | 1823 change = Force; |
1824 | 1824 |
1825 NthIndexCache nthIndexCache(*this); | 1825 NthIndexCache nthIndexCache(*this); |
1826 | 1826 |
1827 // FIXME: Cannot access the ensureStyleResolver() before calling styleForDoc
ument below because | 1827 // FIXME: Cannot access the ensureStyleResolver() before calling styleForDoc
ument below because |
1828 // apparently the StyleResolver's constructor has side effects. We should fi
x it. | 1828 // apparently the StyleResolver's constructor has side effects. We should fi
x it. |
1829 // See printing/setPrinting.html, printing/width-overflow.html though they o
nly fail on | 1829 // See printing/setPrinting.html, printing/width-overflow.html though they o
nly fail on |
1830 // mac when accessing the resolver by what appears to be a viewport size dif
ference. | 1830 // mac when accessing the resolver by what appears to be a viewport size dif
ference. |
1831 | 1831 |
1832 if (change == Force) { | 1832 if (change == Force) { |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2103 return false; | 2103 return false; |
2104 | 2104 |
2105 for (Element* element : m_layerUpdateSVGFilterElements) | 2105 for (Element* element : m_layerUpdateSVGFilterElements) |
2106 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTraci
ng::create(StyleChangeReason::SVGFilterLayerUpdate)); | 2106 element->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTraci
ng::create(StyleChangeReason::SVGFilterLayerUpdate)); |
2107 m_layerUpdateSVGFilterElements.clear(); | 2107 m_layerUpdateSVGFilterElements.clear(); |
2108 return true; | 2108 return true; |
2109 } | 2109 } |
2110 | 2110 |
2111 void Document::scheduleSVGFilterLayerUpdateHack(Element& element) | 2111 void Document::scheduleSVGFilterLayerUpdateHack(Element& element) |
2112 { | 2112 { |
2113 if (element.styleChangeType() == NeedsReattachStyleChange) | 2113 if (element.getStyleChangeType() == NeedsReattachStyleChange) |
2114 return; | 2114 return; |
2115 element.setSVGFilterNeedsLayerUpdate(); | 2115 element.setSVGFilterNeedsLayerUpdate(); |
2116 m_layerUpdateSVGFilterElements.add(&element); | 2116 m_layerUpdateSVGFilterElements.add(&element); |
2117 scheduleLayoutTreeUpdateIfNeeded(); | 2117 scheduleLayoutTreeUpdateIfNeeded(); |
2118 } | 2118 } |
2119 | 2119 |
2120 void Document::unscheduleSVGFilterLayerUpdateHack(Element& element) | 2120 void Document::unscheduleSVGFilterLayerUpdateHack(Element& element) |
2121 { | 2121 { |
2122 element.clearSVGFilterNeedsLayerUpdate(); | 2122 element.clearSVGFilterNeedsLayerUpdate(); |
2123 m_layerUpdateSVGFilterElements.remove(&element); | 2123 m_layerUpdateSVGFilterElements.remove(&element); |
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3237 case TEXT_NODE: | 3237 case TEXT_NODE: |
3238 return false; | 3238 return false; |
3239 case COMMENT_NODE: | 3239 case COMMENT_NODE: |
3240 case PROCESSING_INSTRUCTION_NODE: | 3240 case PROCESSING_INSTRUCTION_NODE: |
3241 return true; | 3241 return true; |
3242 case DOCUMENT_TYPE_NODE: | 3242 case DOCUMENT_TYPE_NODE: |
3243 case ELEMENT_NODE: | 3243 case ELEMENT_NODE: |
3244 // Documents may contain no more than one of each of these. | 3244 // Documents may contain no more than one of each of these. |
3245 // (One Element and one DocumentType.) | 3245 // (One Element and one DocumentType.) |
3246 for (Node& c : NodeTraversal::childrenOf(*this)) { | 3246 for (Node& c : NodeTraversal::childrenOf(*this)) { |
3247 if (c.nodeType() == type) | 3247 if (c.getNodeType() == type) |
3248 return false; | 3248 return false; |
3249 } | 3249 } |
3250 return true; | 3250 return true; |
3251 } | 3251 } |
3252 return false; | 3252 return false; |
3253 } | 3253 } |
3254 | 3254 |
3255 bool Document::canAcceptChild(const Node& newChild, const Node* oldChild, Except
ionState& exceptionState) const | 3255 bool Document::canAcceptChild(const Node& newChild, const Node* oldChild, Except
ionState& exceptionState) const |
3256 { | 3256 { |
3257 if (oldChild && oldChild->nodeType() == newChild.nodeType()) | 3257 if (oldChild && oldChild->getNodeType() == newChild.getNodeType()) |
3258 return true; | 3258 return true; |
3259 | 3259 |
3260 int numDoctypes = 0; | 3260 int numDoctypes = 0; |
3261 int numElements = 0; | 3261 int numElements = 0; |
3262 | 3262 |
3263 // First, check how many doctypes and elements we have, not counting | 3263 // First, check how many doctypes and elements we have, not counting |
3264 // the child we're about to remove. | 3264 // the child we're about to remove. |
3265 for (Node& child : NodeTraversal::childrenOf(*this)) { | 3265 for (Node& child : NodeTraversal::childrenOf(*this)) { |
3266 if (oldChild && *oldChild == child) | 3266 if (oldChild && *oldChild == child) |
3267 continue; | 3267 continue; |
3268 | 3268 |
3269 switch (child.nodeType()) { | 3269 switch (child.getNodeType()) { |
3270 case DOCUMENT_TYPE_NODE: | 3270 case DOCUMENT_TYPE_NODE: |
3271 numDoctypes++; | 3271 numDoctypes++; |
3272 break; | 3272 break; |
3273 case ELEMENT_NODE: | 3273 case ELEMENT_NODE: |
3274 numElements++; | 3274 numElements++; |
3275 break; | 3275 break; |
3276 default: | 3276 default: |
3277 break; | 3277 break; |
3278 } | 3278 } |
3279 } | 3279 } |
3280 | 3280 |
3281 // Then, see how many doctypes and elements might be added by the new child. | 3281 // Then, see how many doctypes and elements might be added by the new child. |
3282 if (newChild.isDocumentFragment()) { | 3282 if (newChild.isDocumentFragment()) { |
3283 for (Node& child : NodeTraversal::childrenOf(toDocumentFragment(newChild
))) { | 3283 for (Node& child : NodeTraversal::childrenOf(toDocumentFragment(newChild
))) { |
3284 switch (child.nodeType()) { | 3284 switch (child.getNodeType()) { |
3285 case ATTRIBUTE_NODE: | 3285 case ATTRIBUTE_NODE: |
3286 case CDATA_SECTION_NODE: | 3286 case CDATA_SECTION_NODE: |
3287 case DOCUMENT_FRAGMENT_NODE: | 3287 case DOCUMENT_FRAGMENT_NODE: |
3288 case DOCUMENT_NODE: | 3288 case DOCUMENT_NODE: |
3289 case TEXT_NODE: | 3289 case TEXT_NODE: |
3290 exceptionState.throwDOMException(HierarchyRequestError, "Nodes o
f type '" + newChild.nodeName() + | 3290 exceptionState.throwDOMException(HierarchyRequestError, "Nodes o
f type '" + newChild.nodeName() + |
3291 "' may not be inserted inside nodes of type '#document'."); | 3291 "' may not be inserted inside nodes of type '#document'."); |
3292 return false; | 3292 return false; |
3293 case COMMENT_NODE: | 3293 case COMMENT_NODE: |
3294 case PROCESSING_INSTRUCTION_NODE: | 3294 case PROCESSING_INSTRUCTION_NODE: |
3295 break; | 3295 break; |
3296 case DOCUMENT_TYPE_NODE: | 3296 case DOCUMENT_TYPE_NODE: |
3297 numDoctypes++; | 3297 numDoctypes++; |
3298 break; | 3298 break; |
3299 case ELEMENT_NODE: | 3299 case ELEMENT_NODE: |
3300 numElements++; | 3300 numElements++; |
3301 break; | 3301 break; |
3302 } | 3302 } |
3303 } | 3303 } |
3304 } else { | 3304 } else { |
3305 switch (newChild.nodeType()) { | 3305 switch (newChild.getNodeType()) { |
3306 case ATTRIBUTE_NODE: | 3306 case ATTRIBUTE_NODE: |
3307 case CDATA_SECTION_NODE: | 3307 case CDATA_SECTION_NODE: |
3308 case DOCUMENT_FRAGMENT_NODE: | 3308 case DOCUMENT_FRAGMENT_NODE: |
3309 case DOCUMENT_NODE: | 3309 case DOCUMENT_NODE: |
3310 case TEXT_NODE: | 3310 case TEXT_NODE: |
3311 exceptionState.throwDOMException(HierarchyRequestError, "Nodes of ty
pe '" + newChild.nodeName() + | 3311 exceptionState.throwDOMException(HierarchyRequestError, "Nodes of ty
pe '" + newChild.nodeName() + |
3312 "' may not be inserted inside nodes of type '#document'."); | 3312 "' may not be inserted inside nodes of type '#document'."); |
3313 return false; | 3313 return false; |
3314 case COMMENT_NODE: | 3314 case COMMENT_NODE: |
3315 case PROCESSING_INSTRUCTION_NODE: | 3315 case PROCESSING_INSTRUCTION_NODE: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3348 if (isXMLDocument()) { | 3348 if (isXMLDocument()) { |
3349 if (isXHTMLDocument()) | 3349 if (isXHTMLDocument()) |
3350 return XMLDocument::createXHTML(init.withRegistrationContext(registr
ationContext())); | 3350 return XMLDocument::createXHTML(init.withRegistrationContext(registr
ationContext())); |
3351 return XMLDocument::create(init); | 3351 return XMLDocument::create(init); |
3352 } | 3352 } |
3353 return create(init); | 3353 return create(init); |
3354 } | 3354 } |
3355 | 3355 |
3356 void Document::cloneDataFromDocument(const Document& other) | 3356 void Document::cloneDataFromDocument(const Document& other) |
3357 { | 3357 { |
3358 setCompatibilityMode(other.compatibilityMode()); | 3358 setCompatibilityMode(other.getCompatibilityMode()); |
3359 setEncodingData(other.m_encodingData); | 3359 setEncodingData(other.m_encodingData); |
3360 setContextFeatures(other.contextFeatures()); | 3360 setContextFeatures(other.contextFeatures()); |
3361 setSecurityOrigin(other.securityOrigin()->isolatedCopy()); | 3361 setSecurityOrigin(other.securityOrigin()->isolatedCopy()); |
3362 setMimeType(other.contentType()); | 3362 setMimeType(other.contentType()); |
3363 } | 3363 } |
3364 | 3364 |
3365 bool Document::isSecureContextImpl(String* errorMessage, const SecureContextChec
k privilegeContextCheck) const | 3365 bool Document::isSecureContextImpl(String* errorMessage, const SecureContextChec
k privilegeContextCheck) const |
3366 { | 3366 { |
3367 // There may be exceptions for the secure context check defined for certain | 3367 // There may be exceptions for the secure context check defined for certain |
3368 // schemes. The exceptions are applied only to the special scheme and to | 3368 // schemes. The exceptions are applied only to the special scheme and to |
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4934 // This can occur via document.implementation.createDocument(). | 4934 // This can occur via document.implementation.createDocument(). |
4935 m_cookieURL = KURL(ParsedURLString, emptyString()); | 4935 m_cookieURL = KURL(ParsedURLString, emptyString()); |
4936 setSecurityOrigin(SecurityOrigin::createUnique()); | 4936 setSecurityOrigin(SecurityOrigin::createUnique()); |
4937 initContentSecurityPolicy(); | 4937 initContentSecurityPolicy(); |
4938 return; | 4938 return; |
4939 } | 4939 } |
4940 | 4940 |
4941 // In the common case, create the security context from the currently | 4941 // In the common case, create the security context from the currently |
4942 // loading URL with a fresh content security policy. | 4942 // loading URL with a fresh content security policy. |
4943 m_cookieURL = m_url; | 4943 m_cookieURL = m_url; |
4944 enforceSandboxFlags(initializer.sandboxFlags()); | 4944 enforceSandboxFlags(initializer.getSandboxFlags()); |
4945 if (initializer.shouldEnforceStrictMixedContentChecking()) | 4945 if (initializer.shouldEnforceStrictMixedContentChecking()) |
4946 enforceStrictMixedContentChecking(); | 4946 enforceStrictMixedContentChecking(); |
4947 setInsecureRequestsPolicy(initializer.insecureRequestsPolicy()); | 4947 setInsecureRequestsPolicy(initializer.getInsecureRequestsPolicy()); |
4948 if (initializer.insecureNavigationsToUpgrade()) { | 4948 if (initializer.insecureNavigationsToUpgrade()) { |
4949 for (auto toUpgrade : *initializer.insecureNavigationsToUpgrade()) | 4949 for (auto toUpgrade : *initializer.insecureNavigationsToUpgrade()) |
4950 addInsecureNavigationUpgrade(toUpgrade); | 4950 addInsecureNavigationUpgrade(toUpgrade); |
4951 } | 4951 } |
4952 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique(
) : SecurityOrigin::create(m_url)); | 4952 setSecurityOrigin(isSandboxed(SandboxOrigin) ? SecurityOrigin::createUnique(
) : SecurityOrigin::create(m_url)); |
4953 | 4953 |
4954 if (importsController()) { | 4954 if (importsController()) { |
4955 // If this document is an HTML import, grab a reference to it's master d
ocument's Content | 4955 // If this document is an HTML import, grab a reference to it's master d
ocument's Content |
4956 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca
se, as we can't | 4956 // Security Policy. We don't call 'initContentSecurityPolicy' in this ca
se, as we can't |
4957 // rebind the master document's policy object: its ExecutionContext need
s to remain tied | 4957 // rebind the master document's policy object: its ExecutionContext need
s to remain tied |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5994 #ifndef NDEBUG | 5994 #ifndef NDEBUG |
5995 using namespace blink; | 5995 using namespace blink; |
5996 void showLiveDocumentInstances() | 5996 void showLiveDocumentInstances() |
5997 { | 5997 { |
5998 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5998 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5999 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5999 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6000 for (Document* document : set) | 6000 for (Document* document : set) |
6001 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 6001 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
6002 } | 6002 } |
6003 #endif | 6003 #endif |
OLD | NEW |