| OLD | NEW |
| 1 <?xml version="1.0" encoding="iso-8859-5"?> | 1 <?xml version="1.0" encoding="iso-8859-5"?> |
| 2 <?xml-stylesheet href="css-charset-inherit-iso-8859-5.css?1" type="text/css"?> | 2 <?xml-stylesheet href="css-charset-inherit-iso-8859-5.css?1" type="text/css"?> |
| 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 4 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 5 <html xmlns="http://www.w3.org/1999/xhtml"> | 5 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 6 <head> | 6 <head> |
| 7 <title>CSS Default charset</title> | 7 <title>CSS Default charset</title> |
| 8 <link rel="stylesheet" type="text/css" href="css-charset-inherit-iso-8859-5.
css?2"/> | 8 <link rel="stylesheet" type="text/css" href="css-charset-inherit-iso-8859-5.
css?2"/> |
| 9 <link rel="stylesheet" type="text/css" href="css-charset-import.css"/> | 9 <link rel="stylesheet" type="text/css" href="css-charset-import.css"/> |
| 10 <style type="text/css"> | 10 <style type="text/css"> |
| 11 @import "css-charset-inherit-iso-8859-5.css?4"; | 11 @import "css-charset-inherit-iso-8859-5.css?4"; |
| 12 </style> | 12 </style> |
| 13 <script>document.charset = "koi8-r";</script> | |
| 14 <link rel="stylesheet" type="text/css" href="css-charset-inherit-koi-8.css?2
"/> | |
| 15 </head> | 13 </head> |
| 16 <body onload="test()"> | 14 <body onload="test()"> |
| 17 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=11011">bug 11011</a>
: | 15 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=11011">bug 11011</a>
: |
| 18 External CSS is parsed as iso-8859-1 even though the main document is utf-8.</p> | 16 External CSS is parsed as iso-8859-1 even though the main document is utf-8.</p> |
| 19 | 17 |
| 20 <p id="res1">Stylesheet 1 (inherit document charset using xml-stylesheet process
ing instruction): </p> | 18 <p id="res1">Stylesheet 1 (inherit document charset using xml-stylesheet process
ing instruction): </p> |
| 21 <p id="res2">Stylesheet 2 (inherit document charset using link): </p> | 19 <p id="res2">Stylesheet 2 (inherit document charset using link): </p> |
| 22 <p id="res3">Stylesheet 3 (inherit referring stylesheet charset): </p> | 20 <p id="res3">Stylesheet 3 (inherit referring stylesheet charset): </p> |
| 23 <p id="res4">Stylesheet 4 (inherit referring inline stylesheet charset): </p> | 21 <p id="res4">Stylesheet 4 (inherit referring inline stylesheet charset): </p> |
| 24 <p id="res5">Stylesheet 5 (inherit document charset using link after document.ch
arset was set): </p> | |
| 25 | 22 |
| 26 <script type="text/javascript"> | 23 <script type="text/javascript"> |
| 27 if (window.testRunner) | 24 if (window.testRunner) |
| 28 testRunner.dumpAsText(); | 25 testRunner.dumpAsText(); |
| 29 | 26 |
| 30 function test() { | 27 function test() { |
| 31 try { | 28 try { |
| 32 document.getElementById("res1").innerHTML += document.styleSheets[0].cssRule
s[0].style.content; | 29 document.getElementById("res1").innerHTML += document.styleSheets[0].cssRule
s[0].style.content; |
| 33 | 30 |
| 34 document.getElementById("res2").innerHTML += document.styleSheets[1].cssRule
s[0].style.content; | 31 document.getElementById("res2").innerHTML += document.styleSheets[1].cssRule
s[0].style.content; |
| 35 | 32 |
| 36 document.getElementById("res3").innerHTML += document.styleSheets[2].cssRule
s[0].styleSheet.cssRules[0].style.content; | 33 document.getElementById("res3").innerHTML += document.styleSheets[2].cssRule
s[0].styleSheet.cssRules[0].style.content; |
| 37 | 34 |
| 38 document.getElementById("res4").innerHTML += document.styleSheets[3].cssRule
s[0].styleSheet.cssRules[0].style.content; | 35 document.getElementById("res4").innerHTML += document.styleSheets[3].cssRule
s[0].styleSheet.cssRules[0].style.content; |
| 39 | |
| 40 document.getElementById("res5").innerHTML += document.styleSheets[4].cssRule
s[0].style.content; | |
| 41 } catch (ex) { | 36 } catch (ex) { |
| 42 alert(ex.toString()); | 37 alert(ex.toString()); |
| 43 } | 38 } |
| 44 } | 39 } |
| 45 </script> | 40 </script> |
| 46 | 41 |
| 47 </body> | 42 </body> |
| 48 </html> | 43 </html> |
| OLD | NEW |