Bug 659466: Fix remaining data URI "#" --> "%23" conversions in testcases. r=bz

This commit is contained in:
Daniel Holbert 2011-05-26 01:20:08 -07:00
parent 3019f5c45f
commit d82fe3627c
6 changed files with 23 additions and 14 deletions

View File

@ -3,11 +3,11 @@
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
<?xml-stylesheet href="data:text/css,
#box {
%23box {
background: blue;
}
#box:-moz-window-inactive {
%23box:-moz-window-inactive {
background: cyan;
}

View File

@ -2,11 +2,11 @@
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<?xml-stylesheet href="data:text/css,
#box {
%23box {
background: blue;
}
#box:-moz-window-inactive {
%23box:-moz-window-inactive {
background: cyan;
}

View File

@ -4194,7 +4194,7 @@ gfxTextRun::CopyGlyphDataFrom(gfxTextRun *aSource, PRUint32 aStart,
// different fonts to a base character and a following diacritic.
// Example on OSX 10.5/10.6 with default fonts installed:
// data:text/html,<p style="font-family:helvetica, arial, sans-serif;">
// &#x043E;&#x0486;&#x20;&#x043E;&#x0486;
// &%23x043E;&%23x0486;&%23x20;&%23x043E;&%23x0486;
// This means the rendering of the cluster will probably not be very good,
// but it's the best we can do for now if the specified font only covered the
// initial base character and not its applied marks.

View File

@ -1,6 +1,10 @@
<html>
<head>
<link href="data:text/css,#master{display:table; width: 100%;}" rel="stylesheet" type="text/css" media="screen">
<link href="data:text/css,%23master{display:table; width: 100%;}"
rel="stylesheet" type="text/css" media="screen">
<style>
#master { outline: 1px dashed black; }
</style>
</head>
<body>
<div id="master">

View File

@ -1,6 +1,7 @@
<html>
<head>
<link href="data:text/css,#master{display:table; width: 100%;}" rel="stylesheet" type="text/css" media="screen">
<link href="data:text/css,%23master{display:table; width: 100%; outline: 1px dashed black; }"
rel="stylesheet" type="text/css" media="screen">
</head>
<body>
<div id="master">

View File

@ -8,18 +8,18 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=405818
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<link rel="stylesheet" type="text/css" href="data:text/css,#nosuchid{color:green;}">
<link rel="stylesheet" type="text/css" href="data:text/css,%23myDiv{color:green;}">
<link rel="stylesheet" type="text/css" href="chrome://global/skin/global.css">
<!-- Script to make sure sheets gets a chance to load fully in Gecko 1.8 and earlier -->
<script type="text/javascript" src="data:text/javascript,"></script>
<link rel="stylesheet" type="text/css" href="data:text/css,#nosuchid{color:green;}">
<link rel="stylesheet" type="text/css" href="data:text/css,%23myDiv{color:green;}">
<link rel="stylesheet" type="text/css" href="chrome://global/skin/global.css">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=405818">Mozilla Bug 405818</a>
<p id="display"></p>
<div id="content" style="display: none">
<div id="myDiv"></div>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
@ -29,10 +29,10 @@ SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
is(document.styleSheets[1].href,
"data:text/css,#nosuchid{color:green;}",
"data:text/css,%23myDiv{color:green;}",
"Unexpected href for linked sheet before cloning");
is(document.styleSheets[3].href,
"data:text/css,#nosuchid{color:green;}",
"data:text/css,%23myDiv{color:green;}",
"Unexpected href for later linked sheet before cloning");
is(document.styleSheets[2].href,
@ -50,10 +50,10 @@ addLoadEvent(function() {
})();
is(document.styleSheets[1].href,
"data:text/css,#nosuchid{color:green;}",
"data:text/css,%23myDiv{color:green;}",
"Unexpected href for linked sheet after cloning");
is(document.styleSheets[3].href,
"data:text/css,#nosuchid{color:green;}",
"data:text/css,%23myDiv{color:green;}",
"Unexpected href for later linked sheet after cloning");
is(document.styleSheets[2].href,
@ -63,6 +63,10 @@ addLoadEvent(function() {
"chrome://global/skin/global.css",
"Unexpected href for later linked chrome sheet after cloning");
var myDiv = document.getElementById("myDiv");
is(getComputedStyle(myDiv, "").color, "rgb(0, 128, 0)",
"Unexpected color for div (data URI stylesheet not being honored?)");
SimpleTest.finish();
});
</script>