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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 | 65 |
66 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawP tr<Document> contextDocument, HTMLImportsController* importsController) | 66 DocumentInit::DocumentInit(const KURL& url, LocalFrame* frame, WeakPtrWillBeRawP tr<Document> contextDocument, HTMLImportsController* importsController) |
67 : m_url(url) | 67 : m_url(url) |
68 , m_frame(frame) | 68 , m_frame(frame) |
69 , m_parent(parentDocument(frame)) | 69 , m_parent(parentDocument(frame)) |
70 , m_owner(ownerDocument(frame)) | 70 , m_owner(ownerDocument(frame)) |
71 , m_contextDocument(contextDocument) | 71 , m_contextDocument(contextDocument) |
72 , m_importsController(importsController) | 72 , m_importsController(importsController) |
73 , m_createNewRegistrationContext(false) | 73 , m_createNewRegistrationContext(false) |
74 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url)) | 74 , m_shouldReuseDefaultView(frame && frame->shouldReuseDefaultView(url)) |
75 , m_shouldInheritSecurityOriginFromOwner(url.isEmpty() || url.protocolIsAbou t()) | |
75 { | 76 { |
76 } | 77 } |
77 | 78 |
78 DocumentInit::DocumentInit(const DocumentInit& other) | 79 DocumentInit::DocumentInit(const DocumentInit& other) |
79 : m_url(other.m_url) | 80 : m_url(other.m_url) |
80 , m_frame(other.m_frame) | 81 , m_frame(other.m_frame) |
81 , m_parent(other.m_parent) | 82 , m_parent(other.m_parent) |
82 , m_owner(other.m_owner) | 83 , m_owner(other.m_owner) |
83 , m_contextDocument(other.m_contextDocument) | 84 , m_contextDocument(other.m_contextDocument) |
84 , m_importsController(other.m_importsController) | 85 , m_importsController(other.m_importsController) |
85 , m_registrationContext(other.m_registrationContext) | 86 , m_registrationContext(other.m_registrationContext) |
86 , m_createNewRegistrationContext(other.m_createNewRegistrationContext) | 87 , m_createNewRegistrationContext(other.m_createNewRegistrationContext) |
87 , m_shouldReuseDefaultView(other.m_shouldReuseDefaultView) | 88 , m_shouldReuseDefaultView(other.m_shouldReuseDefaultView) |
sof
2016/02/06 08:35:29
Missing initialization of m_shouldInheritSecurityO
| |
88 { | 89 { |
89 } | 90 } |
90 | 91 |
91 DocumentInit::~DocumentInit() | 92 DocumentInit::~DocumentInit() |
92 { | 93 { |
93 } | 94 } |
94 | 95 |
95 bool DocumentInit::shouldSetURL() const | 96 bool DocumentInit::shouldSetURL() const |
96 { | 97 { |
97 LocalFrame* frame = frameForSecurityContext(); | 98 LocalFrame* frame = frameForSecurityContext(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 return *this; | 166 return *this; |
166 } | 167 } |
167 | 168 |
168 DocumentInit& DocumentInit::withNewRegistrationContext() | 169 DocumentInit& DocumentInit::withNewRegistrationContext() |
169 { | 170 { |
170 ASSERT(!m_createNewRegistrationContext && !m_registrationContext); | 171 ASSERT(!m_createNewRegistrationContext && !m_registrationContext); |
171 m_createNewRegistrationContext = true; | 172 m_createNewRegistrationContext = true; |
172 return *this; | 173 return *this; |
173 } | 174 } |
174 | 175 |
176 DocumentInit& DocumentInit::withoutInheritingSecurityOrigin() | |
177 { | |
178 m_shouldInheritSecurityOriginFromOwner = false; | |
179 return *this; | |
180 } | |
181 | |
175 PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> DocumentInit::registrat ionContext(Document* document) const | 182 PassRefPtrWillBeRawPtr<CustomElementRegistrationContext> DocumentInit::registrat ionContext(Document* document) const |
176 { | 183 { |
177 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) | 184 if (!document->isHTMLDocument() && !document->isXHTMLDocument()) |
178 return nullptr; | 185 return nullptr; |
179 | 186 |
180 if (m_createNewRegistrationContext) | 187 if (m_createNewRegistrationContext) |
181 return CustomElementRegistrationContext::create(); | 188 return CustomElementRegistrationContext::create(); |
182 | 189 |
183 return m_registrationContext.get(); | 190 return m_registrationContext.get(); |
184 } | 191 } |
185 | 192 |
186 WeakPtrWillBeRawPtr<Document> DocumentInit::contextDocument() const | 193 WeakPtrWillBeRawPtr<Document> DocumentInit::contextDocument() const |
187 { | 194 { |
188 return m_contextDocument; | 195 return m_contextDocument; |
189 } | 196 } |
190 | 197 |
191 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu ment, const KURL& url) | 198 DocumentInit DocumentInit::fromContext(WeakPtrWillBeRawPtr<Document> contextDocu ment, const KURL& url) |
192 { | 199 { |
193 return DocumentInit(url, 0, contextDocument, 0); | 200 return DocumentInit(url, 0, contextDocument, 0); |
194 } | 201 } |
195 | 202 |
196 } // namespace blink | 203 } // namespace blink |
197 | 204 |
OLD | NEW |