Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
| index dfb698dacd38e11963dcac100fb43ce12cac9db6..b10434d1aa7a17569872bad6a5b4a4a088d73dd5 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp |
| @@ -33,6 +33,7 @@ |
| #include "core/html/PluginDocument.h" |
| #include "core/html/parser/HTMLParserIdioms.h" |
| #include "core/layout/LayoutPart.h" |
| +#include "core/loader/FrameLoaderClient.h" |
| namespace blink { |
| @@ -146,6 +147,14 @@ void HTMLEmbedElement::updateWidgetInternal() |
| if (!layoutObject()) |
| return; |
| + // Overwrites the URL and MIME type of a Flash embed to use an |
| + // HTML5 embed when possible. |
| + KURL overridenUrl = document().frame()->loader().client()->overrideFlashEmbedWithHTML(document().completeURL(m_url)); |
| + if (!overridenUrl.isEmpty()) { |
| + m_url = overridenUrl.getString(); |
|
Mike West
2016/08/04 12:41:39
As an unrelated aside, it's super-weird that `m_ur
kdsilva
2016/08/05 11:06:02
Haha, you're not wrong.
|
| + m_serviceType = "text/html"; |
| + } |
| + |
| requestObject(m_url, m_serviceType, paramNames, paramValues); |
| } |