diff options
author | jhaas@chromium.org <jhaas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 18:47:34 +0000 |
---|---|---|
committer | jhaas@chromium.org <jhaas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-11 18:47:34 +0000 |
commit | dcc45d06e47c3e07f18d4fbef6909f315a4f6210 (patch) | |
tree | ff6c5868633038b72c2c5256a7f4a49307113684 /webkit/data | |
parent | be18d3eae2db247dc5a0e211cc97579620324641 (diff) | |
download | chromium_src-dcc45d06e47c3e07f18d4fbef6909f315a4f6210.zip chromium_src-dcc45d06e47c3e07f18d4fbef6909f315a4f6210.tar.gz chromium_src-dcc45d06e47c3e07f18d4fbef6909f315a4f6210.tar.bz2 |
Fix Chromium bug 4178
"new Image()" was aliased in the V8 bindings to document.createElement('image').
While the behavior of new Image() doesn't appear to be well-defined in spec,
all other browsers always create an HTML image element, regardless of the type of
the current document. Changed our implementation to conform.
Review URL: http://codereview.chromium.org/10268
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/data')
-rw-r--r-- | webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt | 1 | ||||
-rw-r--r-- | webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element.svg | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt b/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt new file mode 100644 index 0000000..0cdd613 --- /dev/null +++ b/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element-expected.txt @@ -0,0 +1 @@ +PASS
diff --git a/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element.svg b/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element.svg new file mode 100644 index 0000000..cfa0890 --- /dev/null +++ b/webkit/data/layout_tests/chrome/svg/custom/new-image-is-html-element.svg @@ -0,0 +1,14 @@ +<svg xmlns="http://www.w3.org/2000/svg"> + <text id="result" y="100"/> + <script> + if (window.layoutTestController) + layoutTestController.dumpAsText(); + + // Firefox, Opera, and Safari all treat "new Image()" as creating an + // HTML image element regardless of the current doctype. Ensure that + // Chrome's behavior is the same + + var pass = "[object HTMLImageElement]" == new Image(); + document.getElementById("result").appendChild(document.createTextNode(pass ? "PASS" : "FAIL")); + </script> +</svg> |