Title: [152437] trunk
Revision
152437
Author
[email protected]
Date
2013-07-06 13:08:48 -0700 (Sat, 06 Jul 2013)

Log Message

createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
https://bugs.webkit.org/show_bug.cgi?id=88360

Reviewed by Sam Weinig.

Source/WebCore:

Create a HTMLElement when using createElement('image'), but keep the HTML5 parser constructing HTMLImageelement for it.

* html/HTMLTagNames.in:

LayoutTests:

Update tests to reflect new behavior. This matches FireFox and Opera 12.

* fast/canvas/webgl/context-lost.html:
* fast/dom/prefixed-image-tag-expected.txt:
* fast/dom/prefixed-image-tag.xhtml:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
* platform/mac/fast/dom/wrapper-classes-objc.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (152436 => 152437)


--- trunk/LayoutTests/ChangeLog	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/ChangeLog	2013-07-06 20:08:48 UTC (rev 152437)
@@ -1,3 +1,20 @@
+2013-07-06  Rob Buis  <[email protected]>
+
+        createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
+        https://bugs.webkit.org/show_bug.cgi?id=88360
+
+        Reviewed by Sam Weinig.
+
+        Update tests to reflect new behavior. This matches FireFox and Opera 12.
+
+        * fast/canvas/webgl/context-lost.html:
+        * fast/dom/prefixed-image-tag-expected.txt:
+        * fast/dom/prefixed-image-tag.xhtml:
+        * fast/dom/wrapper-classes-expected.txt:
+        * fast/dom/wrapper-classes.html:
+        * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
+        * platform/mac/fast/dom/wrapper-classes-objc.html:
+
 2013-07-05  Zalan Bujtas  <[email protected]>
 
         iframe constrained by max-width in full screen

Modified: trunk/LayoutTests/fast/canvas/webgl/context-lost.html (152436 => 152437)


--- trunk/LayoutTests/fast/canvas/webgl/context-lost.html	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/fast/canvas/webgl/context-lost.html	2013-07-06 20:08:48 UTC (rev 152437)
@@ -121,7 +121,7 @@
     // Test the extension itself.
     shouldGenerateGLError(gl, gl.INVALID_OPERATION, "extension.loseContext()");
 
-    image = document.createElement("image");
+    image = document.createElement("img");
     video = document.createElement("video");
     canvas2d = document.createElement("canvas");
     ctx2d = canvas2d.getContext("2d");

Modified: trunk/LayoutTests/fast/dom/prefixed-image-tag-expected.txt (152436 => 152437)


--- trunk/LayoutTests/fast/dom/prefixed-image-tag-expected.txt	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/fast/dom/prefixed-image-tag-expected.txt	2013-07-06 20:08:48 UTC (rev 152437)
@@ -1,5 +1,5 @@
 This test makes sure that a prefixed image keeps its prefix and that the localName matches img
 
 PASSED: prefix was kept
-PASSED: localName matches <img>
+PASSED: localName matches <image>
 

Modified: trunk/LayoutTests/fast/dom/prefixed-image-tag.xhtml (152436 => 152437)


--- trunk/LayoutTests/fast/dom/prefixed-image-tag.xhtml	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/fast/dom/prefixed-image-tag.xhtml	2013-07-06 20:08:48 UTC (rev 152437)
@@ -21,10 +21,10 @@
             else
                 debug("FAILED: prefix was not kept");
 
-            if (document.getElementById('image').localName == "img")
-                debug("PASSED: localName matches &lt;img&gt;");
+            if (document.getElementById('image').localName == "image")
+                debug("PASSED: localName matches &lt;image&gt;");
             else
-                debug("FAILED: localName does not match &lt;img&gt;");
+                debug("FAILED: localName does not match &lt;image&gt;");
         }
     </script>
 </head>

Modified: trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt (152436 => 152437)


--- trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/fast/dom/wrapper-classes-expected.txt	2013-07-06 20:08:48 UTC (rev 152437)
@@ -305,9 +305,9 @@
 PASS tagJSWrapperClass('iframe') is 'HTMLIFrameElement'
 PASS tagJSWrapperPrototypeClass('iframe') is 'HTMLIFrameElementPrototype'
 PASS tagJSWrapperConstructorClass('iframe') is 'HTMLIFrameElementConstructor'
-PASS tagJSWrapperClass('image') is 'HTMLImageElement'
-PASS tagJSWrapperPrototypeClass('image') is 'HTMLImageElementPrototype'
-PASS tagJSWrapperConstructorClass('image') is 'HTMLImageElementConstructor'
+PASS tagJSWrapperClass('image') is 'HTMLElement'
+PASS tagJSWrapperPrototypeClass('image') is 'HTMLElementPrototype'
+PASS tagJSWrapperConstructorClass('image') is 'HTMLElementConstructor'
 PASS tagJSWrapperClass('img') is 'HTMLImageElement'
 PASS tagJSWrapperPrototypeClass('img') is 'HTMLImageElementPrototype'
 PASS tagJSWrapperConstructorClass('img') is 'HTMLImageElementConstructor'

Modified: trunk/LayoutTests/fast/dom/wrapper-classes.html (152436 => 152437)


--- trunk/LayoutTests/fast/dom/wrapper-classes.html	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/fast/dom/wrapper-classes.html	2013-07-06 20:08:48 UTC (rev 152437)
@@ -200,7 +200,7 @@
     testTag("html", "HTMLHtmlElement");
     testTag("i", "HTMLElement");
     testTag("iframe", "HTMLIFrameElement");
-    testTag("image", "HTMLImageElement");
+    testTag("image", "HTMLElement");
     testTag("img", "HTMLImageElement");
     testTag("input", "HTMLInputElement");
     testTag("ins", "HTMLModElement");

Modified: trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt (152436 => 152437)


--- trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt	2013-07-06 20:08:48 UTC (rev 152437)
@@ -115,7 +115,7 @@
 PASS tagObjCWrapperClass('html') is 'DOMHTMLHtmlElement'
 PASS tagObjCWrapperClass('i') is 'DOMHTMLElement'
 PASS tagObjCWrapperClass('iframe') is 'DOMHTMLIFrameElement'
-PASS tagObjCWrapperClass('image') is 'DOMHTMLImageElement'
+PASS tagObjCWrapperClass('image') is 'DOMHTMLElement'
 PASS tagObjCWrapperClass('img') is 'DOMHTMLImageElement'
 PASS tagObjCWrapperClass('input') is 'DOMHTMLInputElement'
 PASS tagObjCWrapperClass('ins') is 'DOMHTMLModElement'

Modified: trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html (152436 => 152437)


--- trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html	2013-07-06 20:08:48 UTC (rev 152437)
@@ -209,7 +209,7 @@
     testTag("html", "HTMLHtmlElement");
     testTag("i", "HTMLElement");
     testTag("iframe", "HTMLIFrameElement");
-    testTag("image", "HTMLImageElement");
+    testTag("image", "HTMLElement");
     testTag("img", "HTMLImageElement");
     testTag("input", "HTMLInputElement");
     testTag("ins", "HTMLModElement");

Modified: trunk/Source/WebCore/ChangeLog (152436 => 152437)


--- trunk/Source/WebCore/ChangeLog	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/Source/WebCore/ChangeLog	2013-07-06 20:08:48 UTC (rev 152437)
@@ -1,3 +1,14 @@
+2013-07-06  Rob Buis  <[email protected]>
+
+        createElement("image") creates an HTMLImageElement, although this hack should exist in parser only
+        https://bugs.webkit.org/show_bug.cgi?id=88360
+
+        Reviewed by Sam Weinig.
+
+        Create a HTMLElement when using createElement('image'), but keep the HTML5 parser constructing HTMLImageelement for it.
+
+        * html/HTMLTagNames.in:
+
 2013-07-06  Christophe Dumez  <[email protected]>
 
         Stop hardcoding interfaces that have indexed getters returning strings

Modified: trunk/Source/WebCore/html/HTMLTagNames.in (152436 => 152437)


--- trunk/Source/WebCore/html/HTMLTagNames.in	2013-07-06 17:12:21 UTC (rev 152436)
+++ trunk/Source/WebCore/html/HTMLTagNames.in	2013-07-06 20:08:48 UTC (rev 152437)
@@ -66,7 +66,7 @@
 html
 i interfaceName=HTMLElement
 iframe interfaceName=HTMLIFrameElement
-image mapToTagName=img
+image interfaceName=HTMLElement
 img interfaceName=HTMLImageElement, constructorNeedsFormElement
 input constructorNeedsFormElement, constructorNeedsCreatedByParser
 ins interfaceName=HTMLModElement
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to