| 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, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static Document* parentDocument(LocalFrame* frame) | 42 static Document* parentDocument(LocalFrame* frame) |
| 43 { | 43 { |
| 44 if (!frame) | 44 if (!frame) |
| 45 return 0; | 45 return 0; |
| 46 Element* ownerElement = frame->deprecatedLocalOwner(); | 46 Element* ownerElement = frame->deprecatedLocalOwner(); |
| 47 if (!ownerElement) | 47 if (!ownerElement) |
| 48 return 0; | 48 return 0; |
| 49 return &ownerElement->document(); | 49 return &ownerElement->document(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawP
tr<Document> contextDocument, HTMLImportsController* importsController) | 52 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, RawPtr<Document>
contextDocument, HTMLImportsController* importsController) |
| 53 : DocumentInit(nullptr, url, frame, contextDocument, importsController) | 53 : DocumentInit(nullptr, url, frame, contextDocument, importsController) |
| 54 { | 54 { |
| 55 } | 55 } |
| 56 | 56 |
| 57 DocumentInit::DocumentInit(PassRefPtrWillBeRawPtr<Document> ownerDocument, const
KURL& url, LocalFrame* frame, WeakPtrWillBeRawPtr<Document> contextDocument, HT
MLImportsController* importsController) | 57 DocumentInit::DocumentInit(RawPtr<Document> ownerDocument, const KURL& url, Loca
lFrame* frame, RawPtr<Document> contextDocument, HTMLImportsController* importsC
ontroller) |
| 58 : m_url(url) | 58 : m_url(url) |
| 59 , m_frame(frame) | 59 , m_frame(frame) |
| 60 , m_parent(parentDocument(frame)) | 60 , m_parent(parentDocument(frame)) |
| 61 , m_owner(ownerDocument) | 61 , m_owner(ownerDocument) |
| 62 , m_contextDocument(contextDocument) | 62 , m_contextDocument(contextDocument) |
| 63 , m_importsController(importsController) | 63 , m_importsController(importsController) |
| 64 , m_createNewRegistrationContext(false) | 64 , m_createNewRegistrationContext(false) |
| 65 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url)) | 65 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url)) |
| 66 { | 66 { |
| 67 } | 67 } |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 return *this; | 155 return *this; |
| 156 } | 156 } |
| 157 | 157 |
| 158 DocumentInit& DocumentInit::withNewRegistrationContext() | 158 DocumentInit& DocumentInit::withNewRegistrationContext() |
| 159 { | 159 { |
| 160 ASSERT(!m_createNewRegistrationContext && !m_registrationContext); | 160 ASSERT(!m_createNewRegistrationContext && !m_registrationContext); |
| 161 m_createNewRegistrationContext = true; | 161 m_createNewRegistrationContext = true; |
| 162 return *this; | 162 return *this; |
| 163 } | 163 } |
| 164 | 164 |
| 165 PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> DocumentInit::registrat
ionContext(Document* document) const | 165 RawPtr<CustomElementRegistrationContext> DocumentInit::registrationContext(Docum
ent* document) const |
| 166 { | 166 { |
| 167 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) | 167 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) |
| 168 return nullptr; | 168 return nullptr; |
| 169 | 169 |
| 170 if (m_createNewRegistrationContext) | 170 if (m_createNewRegistrationContext) |
| 171 return CustomElementRegistrationContext::create(); | 171 return CustomElementRegistrationContext::create(); |
| 172 | 172 |
| 173 return m_registrationContext.get(); | 173 return m_registrationContext.get(); |
| 174 } | 174 } |
| 175 | 175 |
| 176 WeakPtrWillBeRawPtr<Document> DocumentInit::contextDocument() const | 176 RawPtr<Document> DocumentInit::contextDocument() const |
| 177 { | 177 { |
| 178 return m_contextDocument; | 178 return m_contextDocument; |
| 179 } | 179 } |
| 180 | 180 |
| 181 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu
ment, const KURL& url) | 181 DocumentInit DocumentInit::fromContext(RawPtr<Document> contextDocument, const K
URL& url) |
| 182 { | 182 { |
| 183 return DocumentInit(url, 0, contextDocument, 0); | 183 return DocumentInit(url, 0, contextDocument, 0); |
| 184 } | 184 } |
| 185 | 185 |
| 186 } // namespace blink | 186 } // namespace blink |
| 187 | 187 |
| OLD | NEW |