| 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 28 matching lines...) Expand all Loading... |
| 39 #include "bindings/core/v8/V8DOMWrapper.h" | 39 #include "bindings/core/v8/V8DOMWrapper.h" |
| 40 #include "bindings/core/v8/V8PerIsolateData.h" | 40 #include "bindings/core/v8/V8PerIsolateData.h" |
| 41 #include "bindings/core/v8/WindowProxy.h" | 41 #include "bindings/core/v8/WindowProxy.h" |
| 42 #include "core/HTMLElementFactory.h" | 42 #include "core/HTMLElementFactory.h" |
| 43 #include "core/HTMLNames.h" | 43 #include "core/HTMLNames.h" |
| 44 #include "core/SVGElementFactory.h" | 44 #include "core/SVGElementFactory.h" |
| 45 #include "core/SVGNames.h" | 45 #include "core/SVGNames.h" |
| 46 #include "core/XMLNSNames.h" | 46 #include "core/XMLNSNames.h" |
| 47 #include "core/XMLNames.h" | 47 #include "core/XMLNames.h" |
| 48 #include "core/animation/AnimationTimeline.h" | 48 #include "core/animation/AnimationTimeline.h" |
| 49 #include "core/animation/CompositorPendingAnimations.h" |
| 49 #include "core/animation/DocumentAnimations.h" | 50 #include "core/animation/DocumentAnimations.h" |
| 50 #include "core/css/CSSFontSelector.h" | 51 #include "core/css/CSSFontSelector.h" |
| 51 #include "core/css/CSSStyleDeclaration.h" | 52 #include "core/css/CSSStyleDeclaration.h" |
| 52 #include "core/css/CSSStyleSheet.h" | 53 #include "core/css/CSSStyleSheet.h" |
| 53 #include "core/css/MediaQueryMatcher.h" | 54 #include "core/css/MediaQueryMatcher.h" |
| 54 #include "core/css/StylePropertySet.h" | 55 #include "core/css/StylePropertySet.h" |
| 55 #include "core/css/StyleSheetContents.h" | 56 #include "core/css/StyleSheetContents.h" |
| 56 #include "core/css/StyleSheetList.h" | 57 #include "core/css/StyleSheetList.h" |
| 57 #include "core/css/invalidation/StyleInvalidator.h" | 58 #include "core/css/invalidation/StyleInvalidator.h" |
| 58 #include "core/css/parser/CSSParser.h" | 59 #include "core/css/parser/CSSParser.h" |
| (...skipping 4653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4712 doc = &element->document(); | 4713 doc = &element->document(); |
| 4713 | 4714 |
| 4714 DCHECK(doc); | 4715 DCHECK(doc); |
| 4715 return *doc; | 4716 return *doc; |
| 4716 } | 4717 } |
| 4717 | 4718 |
| 4718 RawPtr<Document> Document::contextDocument() | 4719 RawPtr<Document> Document::contextDocument() |
| 4719 { | 4720 { |
| 4720 if (m_contextDocument) | 4721 if (m_contextDocument) |
| 4721 return m_contextDocument; | 4722 return m_contextDocument; |
| 4722 if (m_frame) { | 4723 if (m_frame) |
| 4723 return createWeakPtr(); | 4724 return this; |
| 4724 } | |
| 4725 return nullptr; | 4725 return nullptr; |
| 4726 } | 4726 } |
| 4727 | 4727 |
| 4728 RawPtr<Attr> Document::createAttribute(const AtomicString& name, ExceptionState&
exceptionState) | 4728 RawPtr<Attr> Document::createAttribute(const AtomicString& name, ExceptionState&
exceptionState) |
| 4729 { | 4729 { |
| 4730 if (isHTMLDocument() && name != name.lower()) | 4730 if (isHTMLDocument() && name != name.lower()) |
| 4731 UseCounter::count(*this, UseCounter::HTMLDocumentCreateAttributeNameNotL
owercase); | 4731 UseCounter::count(*this, UseCounter::HTMLDocumentCreateAttributeNameNotL
owercase); |
| 4732 return createAttributeNS(nullAtom, name, exceptionState, true); | 4732 return createAttributeNS(nullAtom, name, exceptionState, true); |
| 4733 } | 4733 } |
| 4734 | 4734 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5210 { | 5210 { |
| 5211 if (equalIgnoringCase(dnsPrefetchControl, "on") && !m_haveExplicitlyDisabled
DNSPrefetch) { | 5211 if (equalIgnoringCase(dnsPrefetchControl, "on") && !m_haveExplicitlyDisabled
DNSPrefetch) { |
| 5212 m_isDNSPrefetchEnabled = true; | 5212 m_isDNSPrefetchEnabled = true; |
| 5213 return; | 5213 return; |
| 5214 } | 5214 } |
| 5215 | 5215 |
| 5216 m_isDNSPrefetchEnabled = false; | 5216 m_isDNSPrefetchEnabled = false; |
| 5217 m_haveExplicitlyDisabledDNSPrefetch = true; | 5217 m_haveExplicitlyDisabledDNSPrefetch = true; |
| 5218 } | 5218 } |
| 5219 | 5219 |
| 5220 RawPtr<Document> Document::createWeakPtr() | |
| 5221 { | |
| 5222 #if ENABLE(OILPAN) | |
| 5223 return this; | |
| 5224 #else | |
| 5225 return m_weakFactory.createWeakPtr(); | |
| 5226 #endif | |
| 5227 } | |
| 5228 | |
| 5229 IntersectionObserverController* Document::intersectionObserverController() | 5220 IntersectionObserverController* Document::intersectionObserverController() |
| 5230 { | 5221 { |
| 5231 return m_intersectionObserverController; | 5222 return m_intersectionObserverController; |
| 5232 } | 5223 } |
| 5233 | 5224 |
| 5234 IntersectionObserverController& Document::ensureIntersectionObserverController() | 5225 IntersectionObserverController& Document::ensureIntersectionObserverController() |
| 5235 { | 5226 { |
| 5236 if (!m_intersectionObserverController) | 5227 if (!m_intersectionObserverController) |
| 5237 m_intersectionObserverController = IntersectionObserverController::creat
e(this); | 5228 m_intersectionObserverController = IntersectionObserverController::creat
e(this); |
| 5238 return *m_intersectionObserverController; | 5229 return *m_intersectionObserverController; |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6045 #ifndef NDEBUG | 6036 #ifndef NDEBUG |
| 6046 using namespace blink; | 6037 using namespace blink; |
| 6047 void showLiveDocumentInstances() | 6038 void showLiveDocumentInstances() |
| 6048 { | 6039 { |
| 6049 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6040 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
| 6050 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6041 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6051 for (Document* document : set) | 6042 for (Document* document : set) |
| 6052 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6043 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6053 } | 6044 } |
| 6054 #endif | 6045 #endif |
| OLD | NEW |