Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: third_party/WebKit/Source/core/dom/DOMImplementation.cpp

Issue 2849403002: Use const ref for LocalFrame::LocalFrameRoot and FrameTree::Top (Closed)
Patch Set: fix compile and dchecks Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 // init.frame()->tree().top()->securityContext() returns nullptr. 241 // init.frame()->tree().top()->securityContext() returns nullptr.
242 // For that reason, the origin must be retrieved directly from init.url(). 242 // For that reason, the origin must be retrieved directly from init.url().
243 if (init.GetFrame()->IsMainFrame()) { 243 if (init.GetFrame()->IsMainFrame()) {
244 RefPtr<SecurityOrigin> origin = SecurityOrigin::Create(init.Url()); 244 RefPtr<SecurityOrigin> origin = SecurityOrigin::Create(init.Url());
245 plugin_data = init.GetFrame()->GetPage()->GetPluginData(origin.Get()); 245 plugin_data = init.GetFrame()->GetPage()->GetPluginData(origin.Get());
246 } else { 246 } else {
247 plugin_data = 247 plugin_data =
248 init.GetFrame()->GetPage()->GetPluginData(init.GetFrame() 248 init.GetFrame()->GetPage()->GetPluginData(init.GetFrame()
249 ->Tree() 249 ->Tree()
250 .Top() 250 .Top()
251 ->GetSecurityContext() 251 .GetSecurityContext()
252 ->GetSecurityOrigin()); 252 ->GetSecurityOrigin());
253 } 253 }
254 } 254 }
255 255
256 // PDF is one image type for which a plugin can override built-in support. 256 // PDF is one image type for which a plugin can override built-in support.
257 // We do not want QuickTime to take over all image types, obviously. 257 // We do not want QuickTime to take over all image types, obviously.
258 if ((type == "application/pdf" || type == "text/pdf") && plugin_data && 258 if ((type == "application/pdf" || type == "text/pdf") && plugin_data &&
259 plugin_data->SupportsMimeType(type)) 259 plugin_data->SupportsMimeType(type))
260 return PluginDocument::Create(init); 260 return PluginDocument::Create(init);
261 // multipart/x-mixed-replace is only supported for images. 261 // multipart/x-mixed-replace is only supported for images.
(...skipping 21 matching lines...) Expand all
283 return XMLDocument::Create(init); 283 return XMLDocument::Create(init);
284 284
285 return HTMLDocument::Create(init); 285 return HTMLDocument::Create(init);
286 } 286 }
287 287
288 DEFINE_TRACE(DOMImplementation) { 288 DEFINE_TRACE(DOMImplementation) {
289 visitor->Trace(document_); 289 visitor->Trace(document_);
290 } 290 }
291 291
292 } // namespace blink 292 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698