mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
Merge mozilla-central and mozilla-inbound
This commit is contained in:
commit
eb8db82811
@ -1068,6 +1068,8 @@ nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
|||||||
mZero = PR_TRUE;
|
mZero = PR_TRUE;
|
||||||
height = 1;
|
height = 1;
|
||||||
width = 1;
|
width = 1;
|
||||||
|
} else {
|
||||||
|
mZero = PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfxASurface::gfxImageFormat format = GetImageFormat();
|
gfxASurface::gfxImageFormat format = GetImageFormat();
|
||||||
|
@ -1226,6 +1226,8 @@ nsCanvasRenderingContext2DAzure::SetDimensions(PRInt32 width, PRInt32 height)
|
|||||||
mZero = PR_TRUE;
|
mZero = PR_TRUE;
|
||||||
height = 1;
|
height = 1;
|
||||||
width = 1;
|
width = 1;
|
||||||
|
} else {
|
||||||
|
mZero = PR_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that the dimensions are sane
|
// Check that the dimensions are sane
|
||||||
|
@ -21392,6 +21392,27 @@ function test_zero_dimensions_imagedata() {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<p>Canvas test: getImageData_after_zero_canvas</p>
|
||||||
|
<canvas id="c686" width="100" height="100"></canvas>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function test_getImageData_after_zero_canvas() {
|
||||||
|
var c = document.getElementById("c686");
|
||||||
|
var ctx = c.getContext("2d");
|
||||||
|
ctx.fillStyle = "rgba(0, 0, 0, 1.0)";
|
||||||
|
ctx.fillRect(0, 0, c.width, c.height);
|
||||||
|
var oldimgdata = ctx.getImageData(0, 0, c.width, c.height);
|
||||||
|
c.width = c.height = 0;
|
||||||
|
c.width = c.height = 100;
|
||||||
|
ctx.fillRect(0, 0, c.width, c.height);
|
||||||
|
var imgdata = ctx.getImageData(0, 0, c.width, c.height);
|
||||||
|
var same = false;
|
||||||
|
ok(imgdata.data.length === oldimgdata.data.length, "not the same length");
|
||||||
|
for (var i = 0; i < imgdata.data.length; ++i)
|
||||||
|
same = imgdata.data[i] === oldimgdata.data[i];
|
||||||
|
ok(same, "changing dimensions broke canvas");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function asyncTestsDone() {
|
function asyncTestsDone() {
|
||||||
@ -24661,6 +24682,12 @@ function runTests() {
|
|||||||
} catch(e) {
|
} catch(e) {
|
||||||
ok(false, "unexpected exception thrown in: test_zero_dimensions_imagedata");
|
ok(false, "unexpected exception thrown in: test_zero_dimensions_imagedata");
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
test_getImageData_after_zero_canvas();
|
||||||
|
} catch(e) {
|
||||||
|
throw e;
|
||||||
|
ok(false, "unexpected exception thrown in: test_getImageData_after_zero_canvas");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// run this test last since it replaces the getContext method
|
// run this test last since it replaces the getContext method
|
||||||
test_type_replace();
|
test_type_replace();
|
||||||
|
@ -55,11 +55,11 @@
|
|||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
||||||
#ifdef PR_LOGGING
|
#ifdef PR_LOGGING
|
||||||
static PRLogModuleInfo *gUserFontsLog = PR_NewLogModule("userfonts");
|
PRLogModuleInfo *gfxUserFontSet::sUserFontsLog = PR_NewLogModule("userfonts");
|
||||||
#endif /* PR_LOGGING */
|
#endif /* PR_LOGGING */
|
||||||
|
|
||||||
#define LOG(args) PR_LOG(gUserFontsLog, PR_LOG_DEBUG, args)
|
#define LOG(args) PR_LOG(sUserFontsLog, PR_LOG_DEBUG, args)
|
||||||
#define LOG_ENABLED() PR_LOG_TEST(gUserFontsLog, PR_LOG_DEBUG)
|
#define LOG_ENABLED() PR_LOG_TEST(sUserFontsLog, PR_LOG_DEBUG)
|
||||||
|
|
||||||
static PRUint64 sFontSetGeneration = LL_INIT(0, 0);
|
static PRUint64 sFontSetGeneration = LL_INIT(0, 0);
|
||||||
|
|
||||||
@ -482,14 +482,9 @@ gfxUserFontSet::OnLoadComplete(gfxProxyFontEntry *aProxy,
|
|||||||
const PRUint8* saneData =
|
const PRUint8* saneData =
|
||||||
SanitizeOpenTypeData(aFontData, aLength, saneLen,
|
SanitizeOpenTypeData(aFontData, aLength, saneLen,
|
||||||
fontType == GFX_USERFONT_WOFF);
|
fontType == GFX_USERFONT_WOFF);
|
||||||
#ifdef DEBUG
|
|
||||||
if (!saneData) {
|
if (!saneData) {
|
||||||
char buf[1000];
|
LogMessage(aProxy, "rejected by sanitizer");
|
||||||
sprintf(buf, "downloaded font rejected for \"%s\"",
|
|
||||||
NS_ConvertUTF16toUTF8(aProxy->FamilyName()).get());
|
|
||||||
NS_WARNING(buf);
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (saneData) {
|
if (saneData) {
|
||||||
// The sanitizer ensures that we have a valid sfnt and a usable
|
// The sanitizer ensures that we have a valid sfnt and a usable
|
||||||
// name table, so this should never fail unless we're out of
|
// name table, so this should never fail unless we're out of
|
||||||
@ -503,7 +498,7 @@ gfxUserFontSet::OnLoadComplete(gfxProxyFontEntry *aProxy,
|
|||||||
saneData,
|
saneData,
|
||||||
saneLen);
|
saneLen);
|
||||||
if (!fe) {
|
if (!fe) {
|
||||||
NS_WARNING("failed to make platform font from download");
|
LogMessage(aProxy, "not usable by platform");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -523,11 +518,14 @@ gfxUserFontSet::OnLoadComplete(gfxProxyFontEntry *aProxy,
|
|||||||
fe = gfxPlatform::GetPlatform()->MakePlatformFont(aProxy,
|
fe = gfxPlatform::GetPlatform()->MakePlatformFont(aProxy,
|
||||||
aFontData,
|
aFontData,
|
||||||
aLength);
|
aLength);
|
||||||
|
if (!fe) {
|
||||||
|
LogMessage(aProxy, "not usable by platform");
|
||||||
|
}
|
||||||
aFontData = nsnull; // we must NOT free this below!
|
aFontData = nsnull; // we must NOT free this below!
|
||||||
} else {
|
} else {
|
||||||
// the data was unusable, so just discard it
|
// the data was unusable, so just discard it
|
||||||
// (error will be reported below, if logging is enabled)
|
// (error will be reported below, if logging is enabled)
|
||||||
NS_WARNING("failed to make platform font from download");
|
LogMessage(aProxy, "SFNT header or tables invalid");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -572,16 +570,8 @@ gfxUserFontSet::OnLoadComplete(gfxProxyFontEntry *aProxy,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// download failed
|
// download failed
|
||||||
#ifdef PR_LOGGING
|
LogMessage(aProxy, "download failed", nsIScriptError::errorFlag,
|
||||||
if (LOG_ENABLED()) {
|
aDownloadStatus);
|
||||||
nsCAutoString fontURI;
|
|
||||||
aProxy->mSrcList[aProxy->mSrcIndex].mURI->GetSpec(fontURI);
|
|
||||||
LOG(("userfonts (%p) [src %d] failed uri: (%s) for (%s) error %8.8x downloading font data\n",
|
|
||||||
this, aProxy->mSrcIndex, fontURI.get(),
|
|
||||||
NS_ConvertUTF16toUTF8(aProxy->mFamily->Name()).get(),
|
|
||||||
aDownloadStatus));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aFontData) {
|
if (aFontData) {
|
||||||
@ -606,7 +596,8 @@ gfxUserFontSet::LoadNext(gfxProxyFontEntry *aProxyEntry)
|
|||||||
{
|
{
|
||||||
PRUint32 numSrc = aProxyEntry->mSrcList.Length();
|
PRUint32 numSrc = aProxyEntry->mSrcList.Length();
|
||||||
|
|
||||||
NS_ASSERTION(aProxyEntry->mSrcIndex < numSrc, "already at the end of the src list for user font");
|
NS_ASSERTION(aProxyEntry->mSrcIndex < numSrc,
|
||||||
|
"already at the end of the src list for user font");
|
||||||
|
|
||||||
if (aProxyEntry->mLoadingState == gfxProxyFontEntry::NOT_LOADING) {
|
if (aProxyEntry->mLoadingState == gfxProxyFontEntry::NOT_LOADING) {
|
||||||
aProxyEntry->mLoadingState = gfxProxyFontEntry::LOADING_STARTED;
|
aProxyEntry->mLoadingState = gfxProxyFontEntry::LOADING_STARTED;
|
||||||
@ -617,7 +608,8 @@ gfxUserFontSet::LoadNext(gfxProxyFontEntry *aProxyEntry)
|
|||||||
aProxyEntry->mSrcIndex++;
|
aProxyEntry->mSrcIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load each src entry in turn, until a local face is found or a download begins successfully
|
// load each src entry in turn, until a local face is found
|
||||||
|
// or a download begins successfully
|
||||||
while (aProxyEntry->mSrcIndex < numSrc) {
|
while (aProxyEntry->mSrcIndex < numSrc) {
|
||||||
const gfxFontFaceSrc& currSrc = aProxyEntry->mSrcList[aProxyEntry->mSrcIndex];
|
const gfxFontFaceSrc& currSrc = aProxyEntry->mSrcList[aProxyEntry->mSrcIndex];
|
||||||
|
|
||||||
@ -652,7 +644,6 @@ gfxUserFontSet::LoadNext(gfxProxyFontEntry *aProxyEntry)
|
|||||||
currSrc.mFormatFlags)) {
|
currSrc.mFormatFlags)) {
|
||||||
nsresult rv = StartLoad(aProxyEntry, &currSrc);
|
nsresult rv = StartLoad(aProxyEntry, &currSrc);
|
||||||
PRBool loadOK = NS_SUCCEEDED(rv);
|
PRBool loadOK = NS_SUCCEEDED(rv);
|
||||||
|
|
||||||
if (loadOK) {
|
if (loadOK) {
|
||||||
#ifdef PR_LOGGING
|
#ifdef PR_LOGGING
|
||||||
if (LOG_ENABLED()) {
|
if (LOG_ENABLED()) {
|
||||||
@ -665,26 +656,12 @@ gfxUserFontSet::LoadNext(gfxProxyFontEntry *aProxyEntry)
|
|||||||
#endif
|
#endif
|
||||||
return STATUS_LOADING;
|
return STATUS_LOADING;
|
||||||
} else {
|
} else {
|
||||||
#ifdef PR_LOGGING
|
LogMessage(aProxyEntry, "download failed",
|
||||||
if (LOG_ENABLED()) {
|
nsIScriptError::errorFlag, rv);
|
||||||
nsCAutoString fontURI;
|
|
||||||
currSrc.mURI->GetSpec(fontURI);
|
|
||||||
LOG(("userfonts (%p) [src %d] failed uri: (%s) for (%s) download failed\n",
|
|
||||||
this, aProxyEntry->mSrcIndex, fontURI.get(),
|
|
||||||
NS_ConvertUTF16toUTF8(aProxyEntry->mFamily->Name()).get()));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef PR_LOGGING
|
LogMessage(aProxyEntry, "format not supported",
|
||||||
if (LOG_ENABLED()) {
|
nsIScriptError::warningFlag);
|
||||||
nsCAutoString fontURI;
|
|
||||||
currSrc.mURI->GetSpec(fontURI);
|
|
||||||
LOG(("userfonts (%p) [src %d] failed uri: (%s) for (%s) format not supported\n",
|
|
||||||
this, aProxyEntry->mSrcIndex, fontURI.get(),
|
|
||||||
NS_ConvertUTF16toUTF8(aProxyEntry->mFamily->Name()).get()));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
#include "nsIFile.h"
|
#include "nsIFile.h"
|
||||||
#include "nsISupportsImpl.h"
|
#include "nsISupportsImpl.h"
|
||||||
|
#include "nsIScriptError.h"
|
||||||
|
|
||||||
class nsIURI;
|
class nsIURI;
|
||||||
class gfxMixedFontFamily;
|
class gfxMixedFontFamily;
|
||||||
@ -252,10 +253,18 @@ protected:
|
|||||||
|
|
||||||
gfxMixedFontFamily *GetFamily(const nsAString& aName) const;
|
gfxMixedFontFamily *GetFamily(const nsAString& aName) const;
|
||||||
|
|
||||||
|
// report a problem of some kind (implemented in nsUserFontSet)
|
||||||
|
virtual nsresult LogMessage(gfxProxyFontEntry *aProxy,
|
||||||
|
const char *aMessage,
|
||||||
|
PRUint32 aFlags = nsIScriptError::errorFlag,
|
||||||
|
nsresult aStatus = 0) = 0;
|
||||||
|
|
||||||
// font families defined by @font-face rules
|
// font families defined by @font-face rules
|
||||||
nsRefPtrHashtable<nsStringHashKey, gfxMixedFontFamily> mFontFamilies;
|
nsRefPtrHashtable<nsStringHashKey, gfxMixedFontFamily> mFontFamilies;
|
||||||
|
|
||||||
PRUint64 mGeneration;
|
PRUint64 mGeneration;
|
||||||
|
|
||||||
|
static PRLogModuleInfo *sUserFontsLog;
|
||||||
};
|
};
|
||||||
|
|
||||||
// acts a placeholder until the real font is downloaded
|
// acts a placeholder until the real font is downloaded
|
||||||
|
40
layout/reftests/bugs/670442-1-ref.html
Normal file
40
layout/reftests/bugs/670442-1-ref.html
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
<canvas id="c1" width="400" height="400"></canvas>
|
||||||
|
<canvas id="c2" width="400" height="400"></canvas>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var canv1 = document.getElementById('c1');
|
||||||
|
var canv2 = document.getElementById('c2');
|
||||||
|
var ctx1 = canv1.getContext('2d');
|
||||||
|
var ctx2 = canv2.getContext('2d');
|
||||||
|
|
||||||
|
ctx1.strokeStyle = '#FF0000';
|
||||||
|
ctx1.moveTo(10, 10);
|
||||||
|
ctx1.lineTo(390, 390);
|
||||||
|
ctx1.stroke();
|
||||||
|
|
||||||
|
function doTest()
|
||||||
|
{
|
||||||
|
// Save img data
|
||||||
|
var imgData = ctx1.getImageData(0, 0, canv1.width, canv1.height);
|
||||||
|
|
||||||
|
// Resize canvas - seems to cause the bug
|
||||||
|
canv1.width = 0;
|
||||||
|
canv1.height = 0;
|
||||||
|
canv1.width = 400;
|
||||||
|
canv1.height = 400;
|
||||||
|
|
||||||
|
// Put image data from ctx1 to ctx2
|
||||||
|
ctx2.putImageData(imgData, 0, 0);
|
||||||
|
|
||||||
|
// Draw canvas2 on canvas1
|
||||||
|
ctx1.drawImage(canv2, 0, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
doTest();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
41
layout/reftests/bugs/670442-1.html
Normal file
41
layout/reftests/bugs/670442-1.html
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
<canvas id="c1" width="400" height="400"></canvas>
|
||||||
|
<canvas id="c2" width="400" height="400"></canvas>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var canv1 = document.getElementById('c1');
|
||||||
|
var canv2 = document.getElementById('c2');
|
||||||
|
var ctx1 = canv1.getContext('2d');
|
||||||
|
var ctx2 = canv2.getContext('2d');
|
||||||
|
|
||||||
|
ctx1.strokeStyle = '#FF0000';
|
||||||
|
ctx1.moveTo(10, 10);
|
||||||
|
ctx1.lineTo(390, 390);
|
||||||
|
ctx1.stroke();
|
||||||
|
|
||||||
|
function doTest()
|
||||||
|
{
|
||||||
|
// Save img data
|
||||||
|
var imgData = ctx1.getImageData(0, 0, canv1.width, canv1.height);
|
||||||
|
|
||||||
|
// Resize canvas - seems to cause the bug
|
||||||
|
canv1.width = 0;
|
||||||
|
canv1.height = 0;
|
||||||
|
canv1.width = 400;
|
||||||
|
canv1.height = 400;
|
||||||
|
|
||||||
|
// Put image data from ctx1 to ctx2
|
||||||
|
ctx2.putImageData(imgData, 0, 0);
|
||||||
|
|
||||||
|
// Draw canvas2 on canvas1
|
||||||
|
ctx1.drawImage(canv2, 0, 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
doTest();
|
||||||
|
doTest();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1651,3 +1651,4 @@ fails-if(layersGPUAccelerated&&cocoaWidget) == 654950-1.html 654950-1-ref.html #
|
|||||||
== 660682-1.html 660682-1-ref.html
|
== 660682-1.html 660682-1-ref.html
|
||||||
!= 669015-1.xul 669015-1-notref.xul
|
!= 669015-1.xul 669015-1-notref.xul
|
||||||
== 668319-1.xul about:blank
|
== 668319-1.xul about:blank
|
||||||
|
== 670442-1.html 670442-1-ref.html
|
||||||
|
@ -73,6 +73,8 @@
|
|||||||
#include "nsIChannelPolicy.h"
|
#include "nsIChannelPolicy.h"
|
||||||
#include "nsChannelPolicy.h"
|
#include "nsChannelPolicy.h"
|
||||||
|
|
||||||
|
#include "nsIConsoleService.h"
|
||||||
|
|
||||||
#include "nsStyleSet.h"
|
#include "nsStyleSet.h"
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
@ -342,17 +344,7 @@ nsUserFontSet::StartLoad(gfxProxyFontEntry *aProxy,
|
|||||||
rv = nsFontFaceLoader::CheckLoadAllowed(principal, aFontFaceSrc->mURI,
|
rv = nsFontFaceLoader::CheckLoadAllowed(principal, aFontFaceSrc->mURI,
|
||||||
ps->GetDocument());
|
ps->GetDocument());
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
#ifdef PR_LOGGING
|
LogMessage(aProxy, "download not allowed", nsIScriptError::errorFlag, rv);
|
||||||
if (LOG_ENABLED()) {
|
|
||||||
nsCAutoString fontURI, referrerURI;
|
|
||||||
aFontFaceSrc->mURI->GetSpec(fontURI);
|
|
||||||
if (aFontFaceSrc->mReferrer)
|
|
||||||
aFontFaceSrc->mReferrer->GetSpec(referrerURI);
|
|
||||||
LOG(("fontdownloader download blocked - font uri: (%s) "
|
|
||||||
"referrer uri: (%s) err: %8.8x\n",
|
|
||||||
fontURI.get(), referrerURI.get(), rv));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,3 +689,105 @@ nsUserFontSet::FindRuleForEntry(gfxFontEntry *aFontEntry)
|
|||||||
}
|
}
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
nsUserFontSet::LogMessage(gfxProxyFontEntry *aProxy,
|
||||||
|
const char *aMessage,
|
||||||
|
PRUint32 aFlags,
|
||||||
|
nsresult aStatus)
|
||||||
|
{
|
||||||
|
nsCOMPtr<nsIConsoleService>
|
||||||
|
console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
|
||||||
|
if (!console) {
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_ConvertUTF16toUTF8 familyName(aProxy->FamilyName());
|
||||||
|
nsCAutoString fontURI;
|
||||||
|
aProxy->mSrcList[aProxy->mSrcIndex].mURI->GetSpec(fontURI);
|
||||||
|
|
||||||
|
char weightKeywordBuf[8]; // plenty to sprintf() a PRUint16
|
||||||
|
const char *weightKeyword;
|
||||||
|
const nsAFlatCString& weightKeywordString =
|
||||||
|
nsCSSProps::ValueToKeyword(aProxy->Weight(),
|
||||||
|
nsCSSProps::kFontWeightKTable);
|
||||||
|
if (weightKeywordString.Length() > 0) {
|
||||||
|
weightKeyword = weightKeywordString.get();
|
||||||
|
} else {
|
||||||
|
sprintf(weightKeywordBuf, "%u", aProxy->Weight());
|
||||||
|
weightKeyword = weightKeywordBuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsPrintfCString
|
||||||
|
msg(1024,
|
||||||
|
"downloadable font: %s "
|
||||||
|
"(font-family: \"%s\" style:%s weight:%s stretch:%s src index:%d)",
|
||||||
|
aMessage,
|
||||||
|
familyName.get(),
|
||||||
|
aProxy->IsItalic() ? "italic" : "normal",
|
||||||
|
weightKeyword,
|
||||||
|
nsCSSProps::ValueToKeyword(aProxy->Stretch(),
|
||||||
|
nsCSSProps::kFontStretchKTable).get(),
|
||||||
|
aProxy->mSrcIndex);
|
||||||
|
|
||||||
|
if (aStatus != 0) {
|
||||||
|
msg.Append(": ");
|
||||||
|
switch (aStatus) {
|
||||||
|
case NS_ERROR_DOM_BAD_URI:
|
||||||
|
msg.Append("bad URI or cross-site access not allowed");
|
||||||
|
break;
|
||||||
|
case NS_ERROR_CONTENT_BLOCKED:
|
||||||
|
msg.Append("content blocked");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
msg.Append("status=");
|
||||||
|
msg.AppendInt(aStatus);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
msg.Append("\nsource: ");
|
||||||
|
msg.Append(fontURI);
|
||||||
|
|
||||||
|
#ifdef PR_LOGGING
|
||||||
|
if (PR_LOG_TEST(sUserFontsLog, PR_LOG_DEBUG)) {
|
||||||
|
PR_LOG(sUserFontsLog, PR_LOG_DEBUG,
|
||||||
|
("userfonts (%p) %s", this, msg.get()));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// try to give the user an indication of where the rule came from
|
||||||
|
nsCSSFontFaceRule* rule = FindRuleForEntry(aProxy);
|
||||||
|
nsString href;
|
||||||
|
nsString text;
|
||||||
|
nsresult rv;
|
||||||
|
if (rule) {
|
||||||
|
rv = rule->GetCssText(text);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
nsCOMPtr<nsIDOMCSSStyleSheet> sheet;
|
||||||
|
rv = rule->GetParentStyleSheet(getter_AddRefs(sheet));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
rv = sheet->GetHref(href);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
}
|
||||||
|
|
||||||
|
nsCOMPtr<nsIScriptError2> scriptError =
|
||||||
|
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv);
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
PRUint64 windowID = GetPresContext()->Document()->OuterWindowID();
|
||||||
|
rv = scriptError->InitWithWindowID(NS_ConvertUTF8toUTF16(msg).get(),
|
||||||
|
href.get(), // file
|
||||||
|
text.get(), // src line
|
||||||
|
0, 0, // line & column number
|
||||||
|
aFlags, // flags
|
||||||
|
"CSS Loader", // category (make separate?)
|
||||||
|
windowID);
|
||||||
|
if (NS_SUCCEEDED(rv)){
|
||||||
|
nsCOMPtr<nsIScriptError> logError = do_QueryInterface(scriptError);
|
||||||
|
if (logError) {
|
||||||
|
console->LogMessage(logError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
@ -102,6 +102,11 @@ protected:
|
|||||||
nsTArray<FontFaceRuleRecord>& oldRules,
|
nsTArray<FontFaceRuleRecord>& oldRules,
|
||||||
PRBool& aFontSetModified);
|
PRBool& aFontSetModified);
|
||||||
|
|
||||||
|
virtual nsresult LogMessage(gfxProxyFontEntry *aProxy,
|
||||||
|
const char *aMessage,
|
||||||
|
PRUint32 aFlags = nsIScriptError::errorFlag,
|
||||||
|
nsresult aStatus = 0);
|
||||||
|
|
||||||
nsPresContext *mPresContext; // weak reference
|
nsPresContext *mPresContext; // weak reference
|
||||||
|
|
||||||
// Set of all loaders pointing to us. These are not strong pointers,
|
// Set of all loaders pointing to us. These are not strong pointers,
|
||||||
|
@ -484,6 +484,8 @@ nsStandardURL::AppendSegmentToBuf(char *buf, PRUint32 i, const char *str, URLSeg
|
|||||||
memcpy(buf + i, str + seg.mPos, seg.mLen);
|
memcpy(buf + i, str + seg.mPos, seg.mLen);
|
||||||
seg.mPos = i;
|
seg.mPos = i;
|
||||||
i += seg.mLen;
|
i += seg.mLen;
|
||||||
|
} else {
|
||||||
|
seg.mPos = i;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
@ -832,6 +834,8 @@ nsStandardURL::ParseURL(const char *spec, PRInt32 specLen)
|
|||||||
nsresult
|
nsresult
|
||||||
nsStandardURL::ParsePath(const char *spec, PRUint32 pathPos, PRInt32 pathLen)
|
nsStandardURL::ParsePath(const char *spec, PRUint32 pathPos, PRInt32 pathLen)
|
||||||
{
|
{
|
||||||
|
LOG(("ParsePath: %s pathpos %d len %d\n",spec,pathPos,pathLen));
|
||||||
|
|
||||||
nsresult rv = mParser->ParsePath(spec + pathPos, pathLen,
|
nsresult rv = mParser->ParsePath(spec + pathPos, pathLen,
|
||||||
&mFilepath.mPos, &mFilepath.mLen,
|
&mFilepath.mPos, &mFilepath.mLen,
|
||||||
&mParam.mPos, &mParam.mLen,
|
&mParam.mPos, &mParam.mLen,
|
||||||
|
@ -426,6 +426,8 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, PRInt32 specLen,
|
|||||||
#if defined(XP_WIN) || defined(XP_OS2)
|
#if defined(XP_WIN) || defined(XP_OS2)
|
||||||
// if the authority looks like a drive number then we
|
// if the authority looks like a drive number then we
|
||||||
// really want to treat it as part of the path
|
// really want to treat it as part of the path
|
||||||
|
// [a-zA-Z][:|]{/\}
|
||||||
|
// i.e one of: c: c:\foo c:/foo c| c|\foo c|/foo
|
||||||
if ((specLen > 3) && (spec[3] == ':' || spec[3] == '|') &&
|
if ((specLen > 3) && (spec[3] == ':' || spec[3] == '|') &&
|
||||||
nsCRT::IsAsciiAlpha(spec[2]) &&
|
nsCRT::IsAsciiAlpha(spec[2]) &&
|
||||||
((specLen == 4) || (spec[4] == '/') || (spec[4] == '\\'))) {
|
((specLen == 4) || (spec[4] == '/') || (spec[4] == '\\'))) {
|
||||||
@ -433,16 +435,17 @@ nsNoAuthURLParser::ParseAfterScheme(const char *spec, PRInt32 specLen,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
p = (const char *) memchr(spec + 2, '/', specLen - 2);
|
// Ignore apparent authority; path is everything after it
|
||||||
|
for (p = spec + 2; p < spec + specLen; ++p) {
|
||||||
|
if (*p == '/' || *p == '?' || *p == '#' || *p == ';')
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (p) {
|
SET_RESULT(auth, 0, -1);
|
||||||
SET_RESULT(auth, 0, -1);
|
if (p && p != spec+specLen)
|
||||||
SET_RESULT(path, p - spec, specLen - (p - spec));
|
SET_RESULT(path, p - spec, specLen - (p - spec));
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
SET_RESULT(auth, 0, -1);
|
|
||||||
SET_RESULT(path, 0, -1);
|
SET_RESULT(path, 0, -1);
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -1,6 +1,15 @@
|
|||||||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
Components.utils.import("resource://gre/modules/NetUtil.jsm");
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
const Cr = Components.results;
|
||||||
|
|
||||||
|
var gIoService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIIOService);
|
||||||
|
|
||||||
|
|
||||||
|
// Relevant RFCs: 1738, 1808, 2396, 3986 (newer than the code)
|
||||||
|
// http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.5.4
|
||||||
|
// http://greenbytes.de/tech/tc/uris/
|
||||||
|
|
||||||
// TEST DATA
|
// TEST DATA
|
||||||
// ---------
|
// ---------
|
||||||
@ -29,12 +38,25 @@ var gTests = [
|
|||||||
path: "text/html;charset=utf-8,<html></html>",
|
path: "text/html;charset=utf-8,<html></html>",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: false, nsINestedURI: false },
|
nsIURL: false, nsINestedURI: false },
|
||||||
|
{ spec: "data:text/html;charset=utf-8,<html>\r\n\t</html>",
|
||||||
|
scheme: "data",
|
||||||
|
prePath: "data:",
|
||||||
|
path: "text/html;charset=utf-8,<html></html>",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: false, nsINestedURI: false },
|
||||||
{ spec: "data:text/plain,hello world",
|
{ spec: "data:text/plain,hello world",
|
||||||
scheme: "data",
|
scheme: "data",
|
||||||
prePath: "data:",
|
prePath: "data:",
|
||||||
path: "text/plain,hello%20world",
|
path: "text/plain,hello%20world",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: false, nsINestedURI: false },
|
nsIURL: false, nsINestedURI: false },
|
||||||
|
{ spec: "file:///dir/afile",
|
||||||
|
scheme: "data",
|
||||||
|
prePath: "data:",
|
||||||
|
path: "text/plain,2",
|
||||||
|
ref: "",
|
||||||
|
relativeURI: "data:te\nxt/plain,2",
|
||||||
|
nsIURL: false, nsINestedURI: false },
|
||||||
{ spec: "file://",
|
{ spec: "file://",
|
||||||
scheme: "file",
|
scheme: "file",
|
||||||
prePath: "file://",
|
prePath: "file://",
|
||||||
@ -53,6 +75,20 @@ var gTests = [
|
|||||||
path: "/myFile.html",
|
path: "/myFile.html",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: true, nsINestedURI: false },
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "file:///dir/afile",
|
||||||
|
scheme: "file",
|
||||||
|
prePath: "file://",
|
||||||
|
path: "/dir/data/text/plain,2",
|
||||||
|
ref: "",
|
||||||
|
relativeURI: "data/text/plain,2",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "file:///dir/dir2/",
|
||||||
|
scheme: "file",
|
||||||
|
prePath: "file://",
|
||||||
|
path: "/dir/dir2/data/text/plain,2",
|
||||||
|
ref: "",
|
||||||
|
relativeURI: "data/text/plain,2",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
{ spec: "ftp://",
|
{ spec: "ftp://",
|
||||||
scheme: "ftp",
|
scheme: "ftp",
|
||||||
prePath: "ftp://",
|
prePath: "ftp://",
|
||||||
@ -74,6 +110,9 @@ var gTests = [
|
|||||||
{ spec: "ftp://foo:bar@ftp.mozilla.org:100/pub/mozilla.org/README",
|
{ spec: "ftp://foo:bar@ftp.mozilla.org:100/pub/mozilla.org/README",
|
||||||
scheme: "ftp",
|
scheme: "ftp",
|
||||||
prePath: "ftp://foo:bar@ftp.mozilla.org:100",
|
prePath: "ftp://foo:bar@ftp.mozilla.org:100",
|
||||||
|
port: 100,
|
||||||
|
username: "foo",
|
||||||
|
password: "bar",
|
||||||
path: "/pub/mozilla.org/README",
|
path: "/pub/mozilla.org/README",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: true, nsINestedURI: false },
|
nsIURL: true, nsINestedURI: false },
|
||||||
@ -101,6 +140,44 @@ var gTests = [
|
|||||||
path: "/",
|
path: "/",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: true, nsINestedURI: false },
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://www.exa\nmple.com/",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://www.example.com",
|
||||||
|
path: "/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://10.32.4.239/",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://10.32.4.239",
|
||||||
|
host: "10.32.4.239",
|
||||||
|
path: "/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://[::192.9.5.5]/ipng",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://[::192.9.5.5]",
|
||||||
|
host: "::192.9.5.5",
|
||||||
|
path: "/ipng",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:8888/index.html",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]:8888",
|
||||||
|
host: "fedc:ba98:7654:3210:fedc:ba98:7654:3210",
|
||||||
|
port: 8888,
|
||||||
|
path: "/index.html",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://bar:foo@www.mozilla.org:8080/pub/mozilla.org/README.html",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://bar:foo@www.mozilla.org:8080",
|
||||||
|
port: 8080,
|
||||||
|
username: "bar",
|
||||||
|
password: "foo",
|
||||||
|
host: "www.mozilla.org",
|
||||||
|
path: "/pub/mozilla.org/README.html",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
{ spec: "jar:resource://!/",
|
{ spec: "jar:resource://!/",
|
||||||
scheme: "jar",
|
scheme: "jar",
|
||||||
prePath: "jar:",
|
prePath: "jar:",
|
||||||
@ -173,6 +250,284 @@ var gTests = [
|
|||||||
path: "abc",
|
path: "abc",
|
||||||
ref: "",
|
ref: "",
|
||||||
nsIURL: false, nsINestedURI: false },
|
nsIURL: false, nsINestedURI: false },
|
||||||
|
{ spec: "http://www2.example.com/",
|
||||||
|
relativeURI: "a/b/c/d",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://www2.example.com",
|
||||||
|
path: "/a/b/c/d",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
// relative URL testcases from http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.5.4
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g:h",
|
||||||
|
scheme: "g",
|
||||||
|
prePath: "g:",
|
||||||
|
path: "h",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: false, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "./g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g/",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "/g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "?y",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/d;p?y",
|
||||||
|
ref: "",// fix
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g?y",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g?y",
|
||||||
|
ref: "",// fix
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "#s",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/d;p?q#s",
|
||||||
|
ref: "s",// fix
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g#s",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g#s",
|
||||||
|
ref: "s",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g?y#s",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g?y#s",
|
||||||
|
ref: "s",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
/*
|
||||||
|
Bug xxxxxx - we return a path of b/c/;x
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: ";x",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/d;x",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
*/
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g;x",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g;x",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g;x?y#s",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g;x?y#s",
|
||||||
|
ref: "s",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
/*
|
||||||
|
Can't easily specify a relative URI of "" to the test code
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/d",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
*/
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: ".",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "./",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "..",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../..",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../../",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
|
||||||
|
// abnormal examples
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../../../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "../../../../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
|
||||||
|
// coalesce
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "/./g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "/../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g.",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g.",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: ".g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/.g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g..",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g..",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "..g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/..g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: ".",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "./../g",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/g",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "./g/.",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g/",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g/./h",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g/h",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g/../h",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/h",
|
||||||
|
ref: "",// fix
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g;x=1/./y",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/g;x=1/y",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
{ spec: "http://a/b/c/d;p?q",
|
||||||
|
relativeURI: "g;x=1/../y",
|
||||||
|
scheme: "http",
|
||||||
|
prePath: "http://a",
|
||||||
|
path: "/b/c/y",
|
||||||
|
ref: "",
|
||||||
|
nsIURL: true, nsINestedURI: false },
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
var gHashSuffixes = [
|
var gHashSuffixes = [
|
||||||
@ -239,24 +594,57 @@ function do_check_uri_eqExceptRef(aURI1, aURI2, aCheckTrueFunc) {
|
|||||||
// in the test bundle (or matches some function of that corresponding property,
|
// in the test bundle (or matches some function of that corresponding property,
|
||||||
// if aTestFunctor is passed in).
|
// if aTestFunctor is passed in).
|
||||||
function do_check_property(aTest, aURI, aPropertyName, aTestFunctor) {
|
function do_check_property(aTest, aURI, aPropertyName, aTestFunctor) {
|
||||||
var expectedVal = aTestFunctor ?
|
if (aTest[aPropertyName]) {
|
||||||
aTestFunctor(aTest[aPropertyName]) :
|
var expectedVal = aTestFunctor ?
|
||||||
aTest[aPropertyName];
|
aTestFunctor(aTest[aPropertyName]) :
|
||||||
|
aTest[aPropertyName];
|
||||||
|
|
||||||
do_info("testing " + aPropertyName + " of " +
|
do_info("testing " + aPropertyName + " of " +
|
||||||
(aTestFunctor ? "modified '" : "'" ) + aTest.spec +
|
(aTestFunctor ? "modified '" : "'" ) + aTest.spec +
|
||||||
"' is '" + expectedVal + "'");
|
"' is '" + expectedVal + "'");
|
||||||
do_check_eq(aURI[aPropertyName], expectedVal);
|
do_check_eq(aURI[aPropertyName], expectedVal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that a given URI parses correctly into its various components.
|
// Test that a given URI parses correctly into its various components.
|
||||||
function do_test_uri_basic(aTest) {
|
function do_test_uri_basic(aTest) {
|
||||||
var URI = NetUtil.newURI(aTest.spec);
|
var URI;
|
||||||
|
|
||||||
|
do_info("Basic tests for " + aTest.spec + " relative URI: " + aTest.relativeURI);
|
||||||
|
|
||||||
|
try {
|
||||||
|
URI = NetUtil.newURI(aTest.spec);
|
||||||
|
} catch(e) {
|
||||||
|
do_info("Caught error on parse of" + aTest.spec + " Error: " + e.result);
|
||||||
|
if (aTest.fail) {
|
||||||
|
do_check_eq(e.result, aTest.result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
do_throw(e.result);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aTest.relativeURI) {
|
||||||
|
var relURI;
|
||||||
|
|
||||||
|
try {
|
||||||
|
relURI = gIoService.newURI(aTest.relativeURI, null, URI);
|
||||||
|
} catch (e) {
|
||||||
|
do_info("Caught error on Relative parse of " + aTest.spec + " + " + aTest.relativeURI +" Error: " + e.result);
|
||||||
|
if (aTest.relativeFail) {
|
||||||
|
do_check_eq(e.result, aTest.relativeFail);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
do_throw(e.result);
|
||||||
|
}
|
||||||
|
do_info("relURI.path = " + relURI.path + ", was " + URI.path);
|
||||||
|
URI = relURI;
|
||||||
|
do_info("URI.path now = " + URI.path);
|
||||||
|
}
|
||||||
|
|
||||||
// Sanity-check
|
// Sanity-check
|
||||||
do_info("testing " + aTest.spec + " equals a clone of itself");
|
do_info("testing " + aTest.spec + " equals a clone of itself");
|
||||||
do_check_uri_eq(URI, URI.clone());
|
do_check_uri_eq(URI, URI.clone());
|
||||||
do_check_uri_eq(URI, URI.cloneIgnoringRef());
|
do_check_uri_eqExceptRef(URI, URI.cloneIgnoringRef());
|
||||||
do_info("testing " + aTest.spec + " instanceof nsIURL");
|
do_info("testing " + aTest.spec + " instanceof nsIURL");
|
||||||
do_check_eq(URI instanceof Ci.nsIURL, aTest.nsIURL);
|
do_check_eq(URI instanceof Ci.nsIURL, aTest.nsIURL);
|
||||||
do_info("testing " + aTest.spec + " instanceof nsINestedURI");
|
do_info("testing " + aTest.spec + " instanceof nsINestedURI");
|
||||||
@ -282,6 +670,10 @@ function do_test_uri_basic(aTest) {
|
|||||||
do_check_property(aTest, URI, "prePath");
|
do_check_property(aTest, URI, "prePath");
|
||||||
do_check_property(aTest, URI, "path");
|
do_check_property(aTest, URI, "path");
|
||||||
do_check_property(aTest, URI, "ref");
|
do_check_property(aTest, URI, "ref");
|
||||||
|
do_check_property(aTest, URI, "port");
|
||||||
|
do_check_property(aTest, URI, "username");
|
||||||
|
do_check_property(aTest, URI, "password");
|
||||||
|
do_check_property(aTest, URI, "host");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test that a given URI parses correctly when we add a given ref to the end
|
// Test that a given URI parses correctly when we add a given ref to the end
|
||||||
@ -289,8 +681,25 @@ function do_test_uri_with_hash_suffix(aTest, aSuffix) {
|
|||||||
do_info("making sure caller is using suffix that starts with '#'");
|
do_info("making sure caller is using suffix that starts with '#'");
|
||||||
do_check_eq(aSuffix[0], "#");
|
do_check_eq(aSuffix[0], "#");
|
||||||
|
|
||||||
var testURI = NetUtil.newURI(aTest.spec + aSuffix);
|
|
||||||
var origURI = NetUtil.newURI(aTest.spec);
|
var origURI = NetUtil.newURI(aTest.spec);
|
||||||
|
var testURI;
|
||||||
|
|
||||||
|
if (aTest.relativeURI) {
|
||||||
|
try {
|
||||||
|
origURI = gIoService.newURI(aTest.relativeURI, null, origURI);
|
||||||
|
} catch (e) {
|
||||||
|
do_info("Caught error on Relative parse of " + aTest.spec + " + " + aTest.relativeURI +" Error: " + e.result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
testURI = gIoService.newURI(aSuffix, null, origURI);
|
||||||
|
} catch (e) {
|
||||||
|
do_info("Caught error adding suffix to " + aTest.spec + " + " + aTest.relativeURI + ", suffix " + aSuffix + " Error: " + e.result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
testURI = NetUtil.newURI(aTest.spec + aSuffix);
|
||||||
|
}
|
||||||
|
|
||||||
do_info("testing " + aTest.spec + " with '" + aSuffix + "' appended " +
|
do_info("testing " + aTest.spec + " with '" + aSuffix + "' appended " +
|
||||||
"equals a clone of itself");
|
"equals a clone of itself");
|
||||||
@ -298,11 +707,6 @@ function do_test_uri_with_hash_suffix(aTest, aSuffix) {
|
|||||||
|
|
||||||
do_info("testing " + aTest.spec +
|
do_info("testing " + aTest.spec +
|
||||||
" doesn't equal self with '" + aSuffix + "' appended");
|
" doesn't equal self with '" + aSuffix + "' appended");
|
||||||
if (aTest.spec == "file://") {
|
|
||||||
do_info("TODO: bug 656853");
|
|
||||||
todo_check_false(origURI.equals(testURI));
|
|
||||||
return; // bail out early since file:// doesn't handle hash refs at all
|
|
||||||
}
|
|
||||||
|
|
||||||
do_check_false(origURI.equals(testURI));
|
do_check_false(origURI.equals(testURI));
|
||||||
|
|
||||||
@ -310,23 +714,24 @@ function do_test_uri_with_hash_suffix(aTest, aSuffix) {
|
|||||||
" is equalExceptRef to self with '" + aSuffix + "' appended");
|
" is equalExceptRef to self with '" + aSuffix + "' appended");
|
||||||
do_check_uri_eqExceptRef(origURI, testURI);
|
do_check_uri_eqExceptRef(origURI, testURI);
|
||||||
|
|
||||||
do_info("testing cloneIgnoringRef on " + testURI.spec +
|
if (!origURI.ref) {
|
||||||
" is equal to no-ref version but not equal to ref version");
|
// These tests fail if origURI has a ref
|
||||||
var cloneNoRef = testURI.cloneIgnoringRef();
|
do_info("testing cloneIgnoringRef on " + testURI.spec +
|
||||||
if ((aTest.spec == "http://" || aTest.spec == "ftp://") && aSuffix == "#") {
|
" is equal to no-ref version but not equal to ref version");
|
||||||
do_info("TODO: bug 657033");
|
var cloneNoRef = testURI.cloneIgnoringRef();
|
||||||
do_check_uri_eq(cloneNoRef, origURI, todo_check_true);
|
|
||||||
} else {
|
|
||||||
do_check_uri_eq(cloneNoRef, origURI);
|
do_check_uri_eq(cloneNoRef, origURI);
|
||||||
|
do_check_false(cloneNoRef.equals(testURI));
|
||||||
}
|
}
|
||||||
do_check_false(cloneNoRef.equals(testURI));
|
|
||||||
|
|
||||||
do_check_property(aTest, testURI, "scheme");
|
do_check_property(aTest, testURI, "scheme");
|
||||||
do_check_property(aTest, testURI, "prePath");
|
do_check_property(aTest, testURI, "prePath");
|
||||||
do_check_property(aTest, testURI, "path",
|
if (!origURI.ref) {
|
||||||
function(aStr) { return aStr + aSuffix; });
|
// These don't work if it's a ref already because '+' doesn't give the right result
|
||||||
do_check_property(aTest, testURI, "ref",
|
do_check_property(aTest, testURI, "path",
|
||||||
function(aStr) { return aSuffix.substr(1); });
|
function(aStr) { return aStr + aSuffix; });
|
||||||
|
do_check_property(aTest, testURI, "ref",
|
||||||
|
function(aStr) { return aSuffix.substr(1); });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tests various ways of setting & clearing a ref on a URI.
|
// Tests various ways of setting & clearing a ref on a URI.
|
||||||
@ -339,13 +744,6 @@ function do_test_mutate_ref(aTest, aSuffix) {
|
|||||||
|
|
||||||
var testURI = NetUtil.newURI(aTest.spec);
|
var testURI = NetUtil.newURI(aTest.spec);
|
||||||
|
|
||||||
if (aTest.spec == "file://") {
|
|
||||||
do_info("TODO: bug 656853");
|
|
||||||
testURI.ref = aSuffix;
|
|
||||||
do_check_uri_eq(testURI, refURIWithSuffix, todo_check_true);
|
|
||||||
return; // bail out early since file:// doesn't handle hash refs at all
|
|
||||||
}
|
|
||||||
|
|
||||||
// First: Try setting .ref to our suffix
|
// First: Try setting .ref to our suffix
|
||||||
do_info("testing that setting .ref on " + aTest.spec +
|
do_info("testing that setting .ref on " + aTest.spec +
|
||||||
" to '" + aSuffix + "' does what we expect");
|
" to '" + aSuffix + "' does what we expect");
|
||||||
@ -370,41 +768,39 @@ function do_test_mutate_ref(aTest, aSuffix) {
|
|||||||
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
||||||
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
||||||
|
|
||||||
// Now try setting .spec directly (including suffix) and then clearing .ref
|
if (!aTest.relativeURI) {
|
||||||
var specWithSuffix = aTest.spec + aSuffix;
|
// TODO: These tests don't work as-is for relative URIs.
|
||||||
do_info("testing that setting spec to " +
|
|
||||||
specWithSuffix + " and then clearing ref does what we expect");
|
|
||||||
testURI.spec = specWithSuffix
|
|
||||||
testURI.ref = "";
|
|
||||||
if ((aTest.spec == "http://" || aTest.spec == "ftp://") && aSuffix == "#") {
|
|
||||||
do_info("TODO: bug 657033");
|
|
||||||
do_check_uri_eq(testURI, refURIWithoutSuffix, todo_check_true);
|
|
||||||
do_check_uri_eqExceptRef(testURI, refURIWithSuffix, todo_check_true);
|
|
||||||
} else {
|
|
||||||
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
|
||||||
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX nsIJARURI throws an exception in SetPath(), so skip it for next part.
|
// Now try setting .spec directly (including suffix) and then clearing .ref
|
||||||
if (!(testURI instanceof Ci.nsIJARURI)) {
|
var specWithSuffix = aTest.spec + aSuffix;
|
||||||
// Now try setting .path directly (including suffix) and then clearing .ref
|
do_info("testing that setting spec to " +
|
||||||
// (same as above, but with now with .path instead of .spec)
|
specWithSuffix + " and then clearing ref does what we expect");
|
||||||
testURI = NetUtil.newURI(aTest.spec);
|
testURI.spec = specWithSuffix;
|
||||||
|
|
||||||
var pathWithSuffix = aTest.path + aSuffix;
|
|
||||||
do_info("testing that setting path to " +
|
|
||||||
pathWithSuffix + " and then clearing ref does what we expect");
|
|
||||||
testURI.path = pathWithSuffix;
|
|
||||||
testURI.ref = "";
|
testURI.ref = "";
|
||||||
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
||||||
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
||||||
|
|
||||||
// Also: make sure that clearing .path also clears .ref
|
// XXX nsIJARURI throws an exception in SetPath(), so skip it for next part.
|
||||||
testURI.path = pathWithSuffix;
|
if (!(testURI instanceof Ci.nsIJARURI)) {
|
||||||
do_info("testing that clearing path from " +
|
// Now try setting .path directly (including suffix) and then clearing .ref
|
||||||
pathWithSuffix + " also clears .ref");
|
// (same as above, but with now with .path instead of .spec)
|
||||||
testURI.path = "";
|
testURI = NetUtil.newURI(aTest.spec);
|
||||||
do_check_eq(testURI.ref, "");
|
|
||||||
|
var pathWithSuffix = aTest.path + aSuffix;
|
||||||
|
do_info("testing that setting path to " +
|
||||||
|
pathWithSuffix + " and then clearing ref does what we expect");
|
||||||
|
testURI.path = pathWithSuffix;
|
||||||
|
testURI.ref = "";
|
||||||
|
do_check_uri_eq(testURI, refURIWithoutSuffix);
|
||||||
|
do_check_uri_eqExceptRef(testURI, refURIWithSuffix);
|
||||||
|
|
||||||
|
// Also: make sure that clearing .path also clears .ref
|
||||||
|
testURI.path = pathWithSuffix;
|
||||||
|
do_info("testing that clearing path from " +
|
||||||
|
pathWithSuffix + " also clears .ref");
|
||||||
|
testURI.path = "";
|
||||||
|
do_check_eq(testURI.ref, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -437,22 +833,42 @@ function do_test_immutable(aTest) {
|
|||||||
// ------------------
|
// ------------------
|
||||||
function run_test()
|
function run_test()
|
||||||
{
|
{
|
||||||
|
// UTF-8 check - From bug 622981
|
||||||
|
// ASCII
|
||||||
|
let base = gIoService.newURI("http://example.org/xenia?", null, null);
|
||||||
|
let resolved = gIoService.newURI("?x", null, base);
|
||||||
|
let expected = gIoService.newURI("http://example.org/xenia?x",
|
||||||
|
null, null);
|
||||||
|
do_info("Bug 662981: ACSII - comparing " + resolved.spec + " and " + expected.spec);
|
||||||
|
do_check_true(resolved.equals(expected));
|
||||||
|
|
||||||
|
// UTF-8 character "è"
|
||||||
|
// Bug 622981 was triggered by an empty query string
|
||||||
|
base = gIoService.newURI("http://example.org/xènia?", null, null);
|
||||||
|
resolved = gIoService.newURI("?x", null, base);
|
||||||
|
expected = gIoService.newURI("http://example.org/xènia?x",
|
||||||
|
null, null);
|
||||||
|
do_info("Bug 662981: UTF8 - comparing " + resolved.spec + " and " + expected.spec);
|
||||||
|
do_check_true(resolved.equals(expected));
|
||||||
|
|
||||||
gTests.forEach(function(aTest) {
|
gTests.forEach(function(aTest) {
|
||||||
// Check basic URI functionality
|
// Check basic URI functionality
|
||||||
do_test_uri_basic(aTest);
|
do_test_uri_basic(aTest);
|
||||||
|
|
||||||
// Try adding various #-prefixed strings to the ends of the URIs
|
if (!aTest.fail) {
|
||||||
gHashSuffixes.forEach(function(aSuffix) {
|
// Try adding various #-prefixed strings to the ends of the URIs
|
||||||
do_test_uri_with_hash_suffix(aTest, aSuffix);
|
gHashSuffixes.forEach(function(aSuffix) {
|
||||||
if (!aTest.immutable) {
|
do_test_uri_with_hash_suffix(aTest, aSuffix);
|
||||||
do_test_mutate_ref(aTest, aSuffix);
|
if (!aTest.immutable) {
|
||||||
}
|
do_test_mutate_ref(aTest, aSuffix);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// For URIs that we couldn't mutate above due to them being immutable:
|
// For URIs that we couldn't mutate above due to them being immutable:
|
||||||
// Now we check that they're actually immutable.
|
// Now we check that they're actually immutable.
|
||||||
if (aTest.immutable) {
|
if (aTest.immutable) {
|
||||||
do_test_immutable(aTest);
|
do_test_immutable(aTest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -127,14 +127,6 @@ function onAlertLoad()
|
|||||||
var alertBox = document.getElementById("alertBox");
|
var alertBox = document.getElementById("alertBox");
|
||||||
alertBox.orient = (gOrigin & NS_ALERT_HORIZONTAL) ? "vertical" : "horizontal";
|
alertBox.orient = (gOrigin & NS_ALERT_HORIZONTAL) ? "vertical" : "horizontal";
|
||||||
|
|
||||||
// The above doesn't cause the labels in alertTextBox to reflow,
|
|
||||||
// see bug 311557. As the theme's -moz-box-align css rule gets ignored,
|
|
||||||
// we work around the bug by setting the align property.
|
|
||||||
if (gOrigin & NS_ALERT_HORIZONTAL)
|
|
||||||
{
|
|
||||||
document.getElementById("alertTextBox").align = "center";
|
|
||||||
}
|
|
||||||
|
|
||||||
sizeToContent();
|
sizeToContent();
|
||||||
|
|
||||||
// Work around a bug where sizeToContent() leaves a border outside of the content
|
// Work around a bug where sizeToContent() leaves a border outside of the content
|
||||||
|
@ -90,5 +90,5 @@ label {
|
|||||||
-moz-padding-start: 5px;
|
-moz-padding-start: 5px;
|
||||||
-moz-padding-end: 5px;
|
-moz-padding-end: 5px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
-moz-box-align: center; /* also hard-coded in alert.js, see bug 311557 */
|
-moz-box-align: center;
|
||||||
}
|
}
|
||||||
|
@ -95,5 +95,5 @@ label {
|
|||||||
-moz-padding-start: 5px;
|
-moz-padding-start: 5px;
|
||||||
-moz-padding-end: 5px;
|
-moz-padding-end: 5px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
-moz-box-align: center; /* also hard-coded in alert.js, see bug 311557 */
|
-moz-box-align: center;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user