| 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 * 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |