diff options
| author | japhet@chromium.org <japhet@chromium.org> | 2015-06-12 23:45:50 +0000 |
|---|---|---|
| committer | japhet@chromium.org <japhet@chromium.org> | 2015-06-12 23:45:50 +0000 |
| commit | bc705123834c734184adadc7216f1fb8e7765bd5 (patch) | |
| tree | dd40bf2977493f27f4df3bc910040f095636264b | |
| parent | f783e7a4e704bd082e4027164a931c9c5b485426 (diff) | |
| download | chromium_src-bc705123834c734184adadc7216f1fb8e7765bd5.zip chromium_src-bc705123834c734184adadc7216f1fb8e7765bd5.tar.gz chromium_src-bc705123834c734184adadc7216f1fb8e7765bd5.tar.bz2 | |
Empty object@data url shouldn't be resolved and loaded
BUG=374191
TEST=fast/plugins/empty-url-object.html
Review URL: https://codereview.chromium.org/1185773003
git-svn-id: svn://svn.chromium.org/blink/trunk@197072 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed, 20 insertions, 1 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object-expected.txt b/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object-expected.txt new file mode 100644 index 0000000..9eb0218 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object-expected.txt @@ -0,0 +1,6 @@ +This text should only appear once. + +-------- +Frame: '<!--framePath //<!--frame0-->-->' +-------- + diff --git a/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object.html b/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object.html new file mode 100644 index 0000000..c717630 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/plugins/empty-url-object.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<body> +<script> +if (window.testRunner) { + testRunner.dumpAsText(); + testRunner.dumpChildFramesAsText(); +} +</script> +This text should only appear once. +<object data="" type="text/plain"></object> +</body> +</html> diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp index 415416b..6ec3d2c 100644 --- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp @@ -501,7 +501,7 @@ bool HTMLPlugInElement::requestObject(const String& url, const String& mimeType, if (protocolIsJavaScript(url)) return false; - KURL completedURL = document().completeURL(url); + KURL completedURL = url.isEmpty() ? KURL() : document().completeURL(url); if (!pluginIsLoadable(completedURL, mimeType)) return false; |
