Reviewed by Chris.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Sep 2004 18:55:48 +0000 (18:55 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Sep 2004 18:55:48 +0000 (18:55 +0000)
        - fixed <rdar://problem/3818558> REGRESSION: "Installed Plug-ins" is blank
        because of <script type="application/x-javascript">

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::parseTag):
        add "application/x-javascript" to the list of legal scripting types. Mozilla
        accepts this, but WinIE doesn't.

        * layout-tests/fast/tokenizer/004.html:
        updated layout test to test some application/xxxx types

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7710 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/fast/tokenizer/004.html
WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/htmltokenizer.cpp

index 5fd32caed2598a77bb62232586f5b08f974abd0e..00f94772a13d6e2378a0f533ddea3272dc6a2916 100644 (file)
@@ -19,6 +19,7 @@
        <li>text/javascript1.3 <script type="text/javascript1.3">document.write("***");</script></li>
        <li>text/javascript1.4 <script type="text/javascript1.4">document.write("***");</script></li>
        <li>text/javascript1.5 <script type="text/javascript1.5">document.write("***");</script></li>
        <li>text/javascript1.3 <script type="text/javascript1.3">document.write("***");</script></li>
        <li>text/javascript1.4 <script type="text/javascript1.4">document.write("***");</script></li>
        <li>text/javascript1.5 <script type="text/javascript1.5">document.write("***");</script></li>
+       <li>application/x-javascript <script type="application/x-javascript">document.write("***");</script></li>
 </ol>
 <h4>These scripts should not execute</h4>
 <ol>
 </ol>
 <h4>These scripts should not execute</h4>
 <ol>
        <li>text/xml <script type="text/xml">document.write("***");</script></li>
        <li>text/javascript1 <script type="text/javascript1">document.write("***");</script></li>
        <li>text/javascript1.6 <script type="text/javascript1.6">document.write("***");</script></li>
        <li>text/xml <script type="text/xml">document.write("***");</script></li>
        <li>text/javascript1 <script type="text/javascript1">document.write("***");</script></li>
        <li>text/javascript1.6 <script type="text/javascript1.6">document.write("***");</script></li>
+       <li>application/jscript <script type="application/jscript">document.write("***");</script></li>
+       <li>application/x-jscript <script type="application/x-jscript">document.write("***");</script></li>
+       <li>application/livescript <script type="application/livescript">document.write("***");</script></li>
+       <li>application/x-livescript <script type="application/x-livescript">document.write("***");</script></li>
+       <li>application/ecmascript <script type="application/ecmascript">document.write("***");</script></li>
+       <li>application/x-ecmascript <script type="application/x-ecmascript">document.write("***");</script></li>
+       <li>application/javascript <script type="application/javascript">document.write("***");</script></li>
+       <li>application/javascript1.2 <script type="application/javascript1.2">document.write("***");</script></li>
+       <li>application/x-javascript1.2 <script type="application/x-javascript1.2">document.write("***");</script></li>
        <li>javascript <script type="javascript">document.write("***");</script></li>
        <li>jscript <script type="jscript">document.write("***");</script></li>
        <li>ecmascript <script type="ecmascript">document.write("***");</script></li>
        <li>javascript <script type="javascript">document.write("***");</script></li>
        <li>jscript <script type="jscript">document.write("***");</script></li>
        <li>ecmascript <script type="ecmascript">document.write("***");</script></li>
        <li>empty string language, "bogus" type <script type="bogus" language="">document.write("***");</script></li>
 </ol>
 </body>
        <li>empty string language, "bogus" type <script type="bogus" language="">document.write("***");</script></li>
 </ol>
 </body>
-</html>
\ No newline at end of file
+</html>
index 80146bcc42528daed0216e3002fedf3640528f27..0b5c1b5401d55d3a75752256aa31e8fd767c74dc 100644 (file)
@@ -1,3 +1,18 @@
+2004-09-28  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Chris.
+
+        - fixed <rdar://problem/3818558> REGRESSION: "Installed Plug-ins" is blank 
+        because of <script type="application/x-javascript">
+
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::parseTag):
+        add "application/x-javascript" to the list of legal scripting types. Mozilla
+        accepts this, but WinIE doesn't.
+        
+        * layout-tests/fast/tokenizer/004.html:
+        updated layout test to test some application/xxxx types
+
 2004-09-27  David Hyatt  <hyatt@apple.com>
 
        Reworked lists to work well with RTL text.  Specifically the following bugs have been fixed:
 2004-09-27  David Hyatt  <hyatt@apple.com>
 
        Reworked lists to work well with RTL text.  Specifically the following bugs have been fixed:
index 27c6a2f1033c20df3ded0d12e92a4235e690b695..2bcbb6e30135cec8d87a8782168c0efce62716f8 100644 (file)
@@ -1315,6 +1315,10 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
 
                 if( foundTypeAttribute ) {
                     /* 
 
                 if( foundTypeAttribute ) {
                     /* 
+                        Mozilla 1.5 accepts application/x-javascript, and some web references claim it is the only
+                        correct variation, but WinIE 6 doesn't accept it.
+                        Neither Mozilla 1.5 nor WinIE 6 accept application/javascript, application/ecmascript, or
+                        application/x-ecmascript.
                         Mozilla 1.5 doesn't accept the text/javascript1.x formats, but WinIE 6 does.
                         Mozilla 1.5 doesn't accept text/jscript, text/ecmascript, and text/livescript, but WinIE 6 does.
                         Mozilla 1.5 allows leading and trailing whitespace, but WinIE 6 doesn't.
                         Mozilla 1.5 doesn't accept the text/javascript1.x formats, but WinIE 6 does.
                         Mozilla 1.5 doesn't accept text/jscript, text/ecmascript, and text/livescript, but WinIE 6 does.
                         Mozilla 1.5 allows leading and trailing whitespace, but WinIE 6 doesn't.
@@ -1322,7 +1326,8 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
                         We want to accept all the values that either of these browsers accept, but not other values.
                      */
                     QString type = a->value().string().stripWhiteSpace().lower();
                         We want to accept all the values that either of these browsers accept, but not other values.
                      */
                     QString type = a->value().string().stripWhiteSpace().lower();
-                    if( type.compare("text/javascript") != 0 &&
+                    if( type.compare("application/x-javascript") != 0 &&
+                        type.compare("text/javascript") != 0 &&
                         type.compare("text/javascript1.0") != 0 &&
                         type.compare("text/javascript1.1") != 0 &&
                         type.compare("text/javascript1.2") != 0 &&
                         type.compare("text/javascript1.0") != 0 &&
                         type.compare("text/javascript1.1") != 0 &&
                         type.compare("text/javascript1.2") != 0 &&