Merge mozilla-central into cedar

This commit is contained in:
Ehsan Akhgari 2011-03-30 13:55:31 -04:00
Родитель 2865908cb2 0624d8d91b
Коммит 0b941f7409
37 изменённых файлов: 416 добавлений и 133 удалений

Просмотреть файл

@ -1417,7 +1417,7 @@ NS_IMETHODIMP
nsCanvasRenderingContext2D::Rotate(float angle)
{
if (!FloatValidate(angle))
return NS_ERROR_DOM_SYNTAX_ERR;
return NS_OK;
mThebes->Rotate(angle);
return NS_OK;
@ -1464,11 +1464,7 @@ nsCanvasRenderingContext2D::SetTransform(float m11, float m12, float m21, float
NS_IMETHODIMP
nsCanvasRenderingContext2D::SetGlobalAlpha(float aGlobalAlpha)
{
if (!FloatValidate(aGlobalAlpha))
return NS_ERROR_DOM_SYNTAX_ERR;
// ignore invalid values, as per spec
if (aGlobalAlpha < 0.0 || aGlobalAlpha > 1.0)
if (!FloatValidate(aGlobalAlpha) || aGlobalAlpha < 0.0 || aGlobalAlpha > 1.0)
return NS_OK;
CurrentState().globalAlpha = aGlobalAlpha;
@ -1720,7 +1716,8 @@ NS_IMETHODIMP
nsCanvasRenderingContext2D::SetShadowOffsetX(float x)
{
if (!FloatValidate(x))
return NS_ERROR_DOM_SYNTAX_ERR;
return NS_OK;
CurrentState().shadowOffset.x = x;
return NS_OK;
}
@ -1736,7 +1733,8 @@ NS_IMETHODIMP
nsCanvasRenderingContext2D::SetShadowOffsetY(float y)
{
if (!FloatValidate(y))
return NS_ERROR_DOM_SYNTAX_ERR;
return NS_OK;
CurrentState().shadowOffset.y = y;
return NS_OK;
}
@ -1751,10 +1749,9 @@ nsCanvasRenderingContext2D::GetShadowOffsetY(float *y)
NS_IMETHODIMP
nsCanvasRenderingContext2D::SetShadowBlur(float blur)
{
if (!FloatValidate(blur))
return NS_ERROR_DOM_SYNTAX_ERR;
if (blur < 0.0)
if (!FloatValidate(blur) || blur < 0.0)
return NS_OK;
CurrentState().shadowBlur = blur;
return NS_OK;
}

Просмотреть файл

@ -1146,19 +1146,12 @@ var ctx = canvas.getContext('2d');
ctx.globalAlpha = 0.5;
var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
var _thrown = undefined; try {
ctx.globalAlpha = Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
var _thrown = undefined; try {
ctx.globalAlpha = -Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
var _thrown = undefined; try {
ctx.globalAlpha = NaN;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
ctx.globalAlpha = Infinity;
ok(ctx.globalAlpha === a, "ctx.globalAlpha === a");
ctx.globalAlpha = -Infinity;
ok(ctx.globalAlpha === a, "ctx.globalAlpha === a");
ctx.globalAlpha = NaN;
ok(ctx.globalAlpha === a, "ctx.globalAlpha === a");
}
</script>
@ -15885,16 +15878,21 @@ function test_2d_shadow_attributes_shadowBlur_2() {
var canvas = document.getElementById('c505');
var ctx = canvas.getContext('2d');
var _thrown = undefined; try {
ctx.shadowBlur = Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowBlur = -Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowBlur = NaN;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
ctx.shadowBlur = 1;
ctx.shadowBlur = -2;
ok(ctx.shadowBlur === 1, "ctx.shadowBlur === 1");
ctx.shadowBlur = 1;
ctx.shadowBlur = Infinity;
ok(ctx.shadowBlur === 1, "ctx.shadowBlur === 1");
ctx.shadowBlur = 1;
ctx.shadowBlur = -Infinity;
ok(ctx.shadowBlur === 1, "ctx.shadowBlur === 1");
ctx.shadowBlur = 1;
ctx.shadowBlur = NaN;
ok(ctx.shadowBlur === 1, "ctx.shadowBlur === 1");
}
</script>
@ -15985,25 +15983,26 @@ function test_2d_shadow_attributes_shadowOffset_2() {
var canvas = document.getElementById('c509');
var ctx = canvas.getContext('2d');
var _thrown = undefined; try {
ctx.shadowOffsetX = Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowOffsetX = -Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowOffsetX = NaN;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowOffsetY = Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowOffsetY = -Infinity;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
var _thrown = undefined; try {
ctx.shadowOffsetY = NaN;
} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 2;
ctx.shadowOffsetX = Infinity;
ctx.shadowOffsetY = Infinity;
ok(ctx.shadowOffsetX === 1, "ctx.shadowOffsetX === 1");
ok(ctx.shadowOffsetY === 2, "ctx.shadowOffsetY === 2");
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 2;
ctx.shadowOffsetX = -Infinity;
ctx.shadowOffsetY = -Infinity;
ok(ctx.shadowOffsetX === 1, "ctx.shadowOffsetX === 1");
ok(ctx.shadowOffsetY === 2, "ctx.shadowOffsetY === 2");
ctx.shadowOffsetX = 1;
ctx.shadowOffsetY = 2;
ctx.shadowOffsetX = NaN;
ctx.shadowOffsetY = NaN;
ok(ctx.shadowOffsetX === 1, "ctx.shadowOffsetX === 1");
ok(ctx.shadowOffsetY === 2, "ctx.shadowOffsetY === 2");
}
</script>
@ -18281,7 +18280,7 @@ isPixel(ctx, 50,25, 0,255,0,255, 0);
} catch (e) {
_thrown_outer = true;
}
todo(!_thrown_outer, 'should not throw exception');
ok(!_thrown_outer, 'should not throw exception');
}

Просмотреть файл

@ -3323,7 +3323,8 @@ nsDocShell::GetChildSHEntry(PRInt32 aChildOffset, nsISHEntry ** aResult)
NS_IMETHODIMP
nsDocShell::AddChildSHEntry(nsISHEntry * aCloneRef, nsISHEntry * aNewEntry,
PRInt32 aChildOffset, PRUint32 loadType)
PRInt32 aChildOffset, PRUint32 loadType,
PRBool aCloneChildren)
{
nsresult rv;
@ -3367,8 +3368,7 @@ nsDocShell::AddChildSHEntry(nsISHEntry * aCloneRef, nsISHEntry * aNewEntry,
nsCOMPtr<nsISHEntry> nextEntry;
aCloneRef->GetID(&cloneID);
rv = CloneAndReplace(currentEntry, this, cloneID, aNewEntry,
loadType == LOAD_PUSHSTATE,
getter_AddRefs(nextEntry));
aCloneChildren, getter_AddRefs(nextEntry));
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISHistoryInternal>
@ -3384,14 +3384,15 @@ nsDocShell::AddChildSHEntry(nsISHEntry * aCloneRef, nsISHEntry * aNewEntry,
do_QueryInterface(GetAsSupports(mParent), &rv);
if (parent) {
rv = parent->AddChildSHEntry(aCloneRef, aNewEntry, aChildOffset,
loadType);
loadType, aCloneChildren);
}
}
return rv;
}
nsresult
nsDocShell::DoAddChildSHEntry(nsISHEntry* aNewEntry, PRInt32 aChildOffset)
nsDocShell::DoAddChildSHEntry(nsISHEntry* aNewEntry, PRInt32 aChildOffset,
PRBool aCloneChildren)
{
/* You will get here when you are in a subframe and
* a new url has been loaded on you.
@ -3412,7 +3413,8 @@ nsDocShell::DoAddChildSHEntry(nsISHEntry* aNewEntry, PRInt32 aChildOffset)
nsCOMPtr<nsIDocShellHistory> parent =
do_QueryInterface(GetAsSupports(mParent), &rv);
if (parent) {
rv = parent->AddChildSHEntry(mOSHE, aNewEntry, aChildOffset, mLoadType);
rv = parent->AddChildSHEntry(mOSHE, aNewEntry, aChildOffset, mLoadType,
aCloneChildren);
}
@ -5885,7 +5887,9 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest,
// This is a document.write(). Get the made-up url
// from the channel and store it in session history.
rv = AddToSessionHistory(uri, wcwgChannel, nsnull,
// Pass false for aCloneChildren, since we're creating
// a new DOM here.
rv = AddToSessionHistory(uri, wcwgChannel, nsnull, PR_FALSE,
getter_AddRefs(mLSHE));
SetCurrentURI(uri, aRequest, PR_TRUE);
// Save history state of the previous page
@ -7432,7 +7436,8 @@ nsDocShell::CreateContentViewer(const char *aContentType,
OnLoadingSite(failedChannel, PR_TRUE, PR_FALSE);
} else if (failedURI) {
mURIResultedInDocument = PR_TRUE;
OnNewURI(failedURI, nsnull, nsnull, mLoadType, PR_TRUE, PR_FALSE);
OnNewURI(failedURI, nsnull, nsnull, mLoadType, PR_TRUE, PR_FALSE,
PR_FALSE);
}
// Be sure to have a correct mLSHE, it may have been cleared by
@ -8325,7 +8330,10 @@ nsDocShell::InternalLoad(nsIURI * aURI,
if (mOSHE) {
mOSHE->GetOwner(getter_AddRefs(owner));
}
OnNewURI(aURI, nsnull, owner, mLoadType, PR_TRUE, PR_TRUE);
// Pass true for aCloneSHChildren, since we're not
// changing documents here, so all of our subframes are
// still relevant to the new session history entry.
OnNewURI(aURI, nsnull, owner, mLoadType, PR_TRUE, PR_TRUE, PR_TRUE);
nsCOMPtr<nsIInputStream> postData;
PRUint32 pageIdent = PR_UINT32_MAX;
@ -9295,7 +9303,7 @@ nsDocShell::SetupReferrerFromChannel(nsIChannel * aChannel)
PRBool
nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel, nsISupports* aOwner,
PRUint32 aLoadType, PRBool aFireOnLocationChange,
PRBool aAddToGlobalHistory)
PRBool aAddToGlobalHistory, PRBool aCloneSHChildren)
{
NS_PRECONDITION(aURI, "uri is null");
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
@ -9466,7 +9474,7 @@ nsDocShell::OnNewURI(nsIURI * aURI, nsIChannel * aChannel, nsISupports* aOwner,
*.Create a Entry for it and add it to SH, if this is the
* rootDocShell
*/
(void) AddToSessionHistory(aURI, aChannel, aOwner,
(void) AddToSessionHistory(aURI, aChannel, aOwner, aCloneSHChildren,
getter_AddRefs(mLSHE));
}
@ -9522,8 +9530,9 @@ nsDocShell::OnLoadingSite(nsIChannel * aChannel, PRBool aFireOnLocationChange,
NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
NS_ENSURE_TRUE(uri, PR_FALSE);
// Pass false for aCloneSHChildren, since we're loading a new page here.
return OnNewURI(uri, aChannel, nsnull, mLoadType, aFireOnLocationChange,
aAddToGlobalHistory);
aAddToGlobalHistory, PR_FALSE);
}
@ -9781,7 +9790,9 @@ nsDocShell::AddState(nsIVariant *aData, const nsAString& aTitle,
GetCurScrollPos(ScrollOrientation_Y, &cy);
mOSHE->SetScrollPosition(cx, cy);
rv = AddToSessionHistory(newURI, nsnull, nsnull,
// Since we're not changing which page we have loaded, pass
// true for aCloneChildren.
rv = AddToSessionHistory(newURI, nsnull, nsnull, PR_TRUE,
getter_AddRefs(newSHEntry));
NS_ENSURE_SUCCESS(rv, rv);
@ -9876,7 +9887,8 @@ nsDocShell::ShouldAddToSessionHistory(nsIURI * aURI)
nsresult
nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
nsISupports* aOwner, nsISHEntry ** aNewEntry)
nsISupports* aOwner, PRBool aCloneChildren,
nsISHEntry ** aNewEntry)
{
NS_PRECONDITION(aURI, "uri is null");
NS_PRECONDITION(!aChannel || !aOwner, "Shouldn't have both set");
@ -10004,9 +10016,9 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
if (root == static_cast<nsIDocShellTreeItem *>(this) && mSessionHistory) {
// Bug 629559: Detect if this is an anchor navigation and clone the
// session history in that case too
if (mLoadType == LOAD_PUSHSTATE && mOSHE) {
// If we need to clone our children onto the new session
// history entry, do so now.
if (aCloneChildren && mOSHE) {
PRUint32 cloneID;
mOSHE->GetID(&cloneID);
nsCOMPtr<nsISHEntry> newEntry;
@ -10042,7 +10054,7 @@ nsDocShell::AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
// This is a subframe.
if (!mOSHE || !LOAD_TYPE_HAS_FLAGS(mLoadType,
LOAD_FLAGS_REPLACE_HISTORY))
rv = DoAddChildSHEntry(entry, mChildOffset);
rv = DoAddChildSHEntry(entry, mChildOffset, aCloneChildren);
}
// Return the new SH entry...

Просмотреть файл

@ -356,10 +356,13 @@ protected:
// In all other cases PR_FALSE is returned.
// Either aChannel or aOwner must be null. If aChannel is
// present, the owner should be gotten from it.
// If OnNewURI calls AddToSessionHistory, it will pass its
// aCloneSHChildren argument as aCloneChildren.
PRBool OnNewURI(nsIURI * aURI, nsIChannel * aChannel, nsISupports* aOwner,
PRUint32 aLoadType,
PRBool aFireOnLocationChange,
PRBool aAddToGlobalHistory = PR_TRUE);
PRBool aAddToGlobalHistory,
PRBool aCloneSHChildren);
virtual void SetReferrerURI(nsIURI * aURI);
@ -367,10 +370,16 @@ protected:
virtual PRBool ShouldAddToSessionHistory(nsIURI * aURI);
// Either aChannel or aOwner must be null. If aChannel is
// present, the owner should be gotten from it.
// If aCloneChildren is true, then our current session history's
// children will be cloned onto the new entry. This should be
// used when we aren't actually changing the document while adding
// the new session history entry.
virtual nsresult AddToSessionHistory(nsIURI * aURI, nsIChannel * aChannel,
nsISupports* aOwner,
PRBool aCloneChildren,
nsISHEntry ** aNewEntry);
nsresult DoAddChildSHEntry(nsISHEntry* aNewEntry, PRInt32 aChildOffset);
nsresult DoAddChildSHEntry(nsISHEntry* aNewEntry, PRInt32 aChildOffset,
PRBool aCloneChildren);
NS_IMETHOD LoadHistoryEntry(nsISHEntry * aEntry, PRUint32 aLoadType);
NS_IMETHOD PersistLayoutHistoryState();

Просмотреть файл

@ -39,7 +39,7 @@
#include "nsISupports.idl"
interface nsISHEntry;
[scriptable, uuid(95e425aa-afc6-40a0-9db4-7f210a58310a)]
[scriptable, uuid(077af5fd-7450-48db-8f03-16617d441141)]
interface nsIDocShellHistory : nsISupports
{
/**
@ -49,11 +49,14 @@ interface nsIDocShellHistory : nsISupports
/**
* Add a Child SHEntry for a frameset page, given the child's loadtype.
* If aCloneChildren is true, then aCloneReference's children will be
* cloned onto aHistoryEntry.
*/
void addChildSHEntry(in nsISHEntry aCloneReference,
in nsISHEntry aHistoryEntry,
in long aChildOffset,
in unsigned long aLoadType);
in unsigned long aLoadType,
in boolean aCloneChilden);
/**
* Whether this docshell should save entries in global history.

Просмотреть файл

@ -97,6 +97,9 @@ _TEST_FILES = \
test_bug634834.html \
file_bug634834.html \
test_bug637644.html \
test_framedhistoryframes.html \
test_windowedhistoryframes.html \
historyframes.html \
$(NULL)
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)

Просмотреть файл

@ -0,0 +1,150 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=602256
-->
<head>
<title>Test for Bug 602256</title>
</head>
<body onload="SimpleTest.executeSoon(run_test)">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=602256">Mozilla Bug 602256</a>
<div id="content">
<iframe id="iframe" src="data:text/html,<p%20id='text'>Start</p>"></iframe>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 602256 **/
var testWin = window.opener ? window.opener : window.parent;
var SimpleTest = testWin.SimpleTest;
function is() { testWin.is.apply(testWin, arguments); }
var gFrame = null;
function gState() {
return location.hash.replace(/^#/, "");
}
function waitForLoad(aCallback) {
function listener() {
gFrame.removeEventListener("load", listener, false);
SimpleTest.executeSoon(aCallback);
}
gFrame.addEventListener("load", listener, false);
}
function loadContent(aURL, aCallback) {
waitForLoad(aCallback);
gFrame.src = aURL;
}
function getURL() {
return gFrame.contentDocument.documentURI;
}
function getContent() {
return gFrame.contentDocument.getElementById("text").textContent;
}
var START = "data:text/html,<p%20id='text'>Start</p>";
var URL1 = "data:text/html,<p%20id='text'>Test1</p>";
var URL2 = "data:text/html,<p%20id='text'>Test2</p>";
function run_test() {
window.location.hash = "START";
gFrame = document.getElementById("iframe");
test_basic_inner_navigation();
}
function end_test() {
testWin.done();
}
function test_basic_inner_navigation() {
// Navigate the inner frame a few times
loadContent(URL1, function() {
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
loadContent(URL2, function() {
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
// Test that history is working
waitForLoad(function() {
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
waitForLoad(function() {
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
test_state_navigation();
});
window.history.forward();
});
window.history.back();
});
});
}
function test_state_navigation() {
window.location.hash = "STATE1";
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
window.location.hash = "STATE2";
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
window.history.back();
is(gState(), "STATE1", "State should be correct after going back");
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
window.history.forward();
is(gState(), "STATE2", "State should be correct after going forward");
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
window.history.back();
window.history.back();
is(gState(), "START", "State should be correct");
is(getURL(), URL2, "URL should be correct");
is(getContent(), "Test2", "Page should be correct");
waitForLoad(function() {
is(getURL(), URL1, "URL should be correct");
is(getContent(), "Test1", "Page should be correct");
waitForLoad(function() {
is(gState(), "START", "State should be correct");
is(getURL(), START, "URL should be correct");
is(getContent(), "Start", "Page should be correct");
end_test();
});
window.history.back();
is(gState(), "START", "State should be correct after going back twice");
});
window.history.back();
is(gState(), "START", "State should be correct");
}
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,32 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=602256
-->
<head>
<title>Test for Bug 602256</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=602256">Mozilla Bug 602256</a>
<p id="display"></p>
<div id="content">
<iframe id="iframe" src="historyframes.html"></iframe>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 602256 **/
SimpleTest.waitForExplicitFinish();
function done() {
SimpleTest.finish();
}
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -0,0 +1,33 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=602256
-->
<head>
<title>Test for Bug 602256</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=602256">Mozilla Bug 602256</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 602256 **/
SimpleTest.waitForExplicitFinish();
function done() {
subWin.close();
SimpleTest.finish();
}
var subWin = window.open("historyframes.html", "_blank");
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -567,7 +567,10 @@ ContentParent::Observe(nsISupports* aSubject,
// Pref was created, or previously existed and its value
// changed.
PrefTuple pref;
nsresult rv = prefService->MirrorPreference(strData, &pref);
#ifdef DEBUG
nsresult rv =
#endif
prefService->MirrorPreference(strData, &pref);
NS_ASSERTION(NS_SUCCEEDED(rv), "Pref has value but can't mirror?");
if (!SendPreferenceUpdate(pref)) {
return NS_ERROR_NOT_AVAILABLE;

Просмотреть файл

@ -824,3 +824,17 @@ qcms_profile* qcms_profile_from_path(const char *path)
}
return profile;
}
#ifdef _WIN32
/* Unicode path version */
qcms_profile* qcms_profile_from_unicode_path(const wchar_t *path)
{
qcms_profile *profile = NULL;
FILE *file = _wfopen(path, L"rb");
if (file) {
profile = qcms_profile_from_file(file);
fclose(file);
}
return profile;
}
#endif

Просмотреть файл

@ -126,6 +126,9 @@ qcms_profile* qcms_profile_from_memory(const void *mem, size_t size);
qcms_profile* qcms_profile_from_file(FILE *file);
qcms_profile* qcms_profile_from_path(const char *path);
#ifdef _WIN32
qcms_profile* qcms_profile_from_unicode_path(const wchar_t *path);
#endif
qcms_profile* qcms_profile_sRGB(void);
void qcms_profile_release(qcms_profile *profile);

Просмотреть файл

@ -656,8 +656,7 @@ gfxWindowsPlatform::GetPlatformCMSOutputProfile()
if (!res)
return nsnull;
qcms_profile* profile =
qcms_profile_from_path(NS_ConvertUTF16toUTF8(str).get());
qcms_profile* profile = qcms_profile_from_unicode_path(str);
#ifdef DEBUG_tor
if (profile)
fprintf(stderr,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -117,7 +117,7 @@ End of Item 0002
0x0110,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x017E, 0x0000,
/* 0002 */ 0x2019, 0x201E, 0x00DF,
/*-------------------------------------------------------*/

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -92,7 +92,7 @@ End of Item 0001
0x0010,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x000B Start of MappingTable */

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -210,7 +210,7 @@ End of Item 0010
0x0000, 0x1000, 0x1111, 0x1111, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0009 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C0, 0x00CF, 0x00C0,
/* 0002 */ 0x00D1, 0x00D6, 0x00D1,
/* 0003 */ 0x00D8, 0x00DD, 0x00D8,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -146,7 +146,7 @@ End of Item 0009
0x0000, 0x1000, 0x0011,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C0, 0x00CF, 0x00C0,
/* 0002 */ 0x00D1, 0x00D6, 0x00D1,
/* 0003 */ 0x00D8, 0x00DD, 0x00D8,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -137,7 +137,7 @@ End of Item 0008
0x1000, 0x1111, 0x0002,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A9, 0x00B3, 0x00A9,
/* 0002 */ 0x00BF, 0x00FF, 0x00BF,
/* 0003 */ 0x00A0, 0x00A7, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -106,7 +106,7 @@ End of Item 0004
0x1000, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A9, 0x00B3, 0x00A9,
/* 0002 */ 0x00BF, 0x00FF, 0x00BF,
/* 0003 */ 0x00A0, 0x00A8, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -128,7 +128,7 @@ End of Item 0004
0x2110, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x011B, 0x0000,
/* 0002 */ 0x0139, 0x017E, 0x007C,
/* 0003 */ 0x02C7, 0x0000, 0x00B7,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -92,7 +92,7 @@ End of Item 0001
0x0010,
/*-------------------------------------------------------*/
/* Offset=0x0005 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x00FF, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x000B Start of MappingTable */

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -177,7 +177,7 @@ End of Item 000B
0x1000, 0x1111, 0x1111, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0008 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C7, 0x00CF, 0x00C7,
/* 0002 */ 0x00E7, 0x00EF, 0x00E7,
/* 0003 */ 0x00A0, 0x00C4, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -106,7 +106,7 @@ End of Item 0003
0x1000, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C7, 0x00CF, 0x00C7,
/* 0002 */ 0x00E7, 0x00EF, 0x00E7,
/* 0003 */ 0x00A0, 0x00FF, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -144,7 +144,7 @@ End of Item 0006
0x1000, 0x0121,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C1, 0x00C6, 0x00C1,
/* 0002 */ 0x00E1, 0x00E6, 0x00E1,
/* 0003 */ 0x00A0, 0x00B8, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -106,7 +106,7 @@ End of Item 0003
0x1000, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C1, 0x00C6, 0x00C1,
/* 0002 */ 0x00E1, 0x00E6, 0x00E1,
/* 0003 */ 0x00A0, 0x00FF, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -118,7 +118,7 @@ End of Item 0006
0x0000, 0x0211,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x0401, 0x040C, 0x00A1,
/* 0002 */ 0x040E, 0x044F, 0x00AE,
/* 0003 */ 0x0451, 0x045C, 0x00F1,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -120,7 +120,7 @@ End of Item 0007
0x0000, 0x1222, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A1, 0x00AC, 0x0401,
/* 0002 */ 0x00AE, 0x00EF, 0x040E,
/* 0003 */ 0x00F1, 0x00FC, 0x0451,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -111,7 +111,7 @@ End of Item 0005
0x1000, 0x0012,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x0621, 0x063A, 0x00C1,
/* 0002 */ 0x0640, 0x0652, 0x00E0,
/* 0003 */ 0x00A0, 0x00AD, 0x0000,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -105,7 +105,7 @@ End of Item 0004
0x1000, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00C1, 0x00DA, 0x0621,
/* 0002 */ 0x00E0, 0x00F2, 0x0640,
/* 0003 */ 0x00A0, 0x00AD, 0x0000,

Просмотреть файл

@ -47,7 +47,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -128,7 +128,7 @@ End of Item 0006
0x1000, 0x0111,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x038E, 0x03A1, 0x00BE,
/* 0002 */ 0x03A3, 0x03CE, 0x00D3,
/* 0003 */ 0x00A0, 0x00BD, 0x0000,

Просмотреть файл

@ -47,7 +47,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -99,7 +99,7 @@ End of Item 0003
0x1000, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0006 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00BE, 0x00D1, 0x038E,
/* 0002 */ 0x00D3, 0x00FE, 0x03A3,
/* 0003 */ 0x00A0, 0x00BD, 0x0000,

Просмотреть файл

@ -47,7 +47,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -131,7 +131,7 @@ End of Item 0008
0x0000, 0x2212, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A2, 0x00A9, 0x00A2,
/* 0002 */ 0x00AB, 0x00B9, 0x00AB,
/* 0003 */ 0x05D0, 0x05EA, 0x00E0,

Просмотреть файл

@ -47,7 +47,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007F
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -128,7 +128,7 @@ End of Item 0007
0x0000, 0x1211, 0x0000,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007F, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A2, 0x00A9, 0x00A2,
/* 0002 */ 0x00AB, 0x00B9, 0x00AB,
/* 0003 */ 0x00E0, 0x00FA, 0x05D0,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -133,7 +133,7 @@ End of Item 0008
0x0000, 0x1120, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x00CF, 0x00A0,
/* 0002 */ 0x00D1, 0x00DC, 0x00D1,
/* 0003 */ 0x00DF, 0x00EF, 0x00DF,

Просмотреть файл

@ -46,7 +46,7 @@
Begin of Item 0000
Format 0
srcBegin = 0000
srcEnd = 007E
srcEnd = 009F
destBegin = 0000
End of Item 0000
@ -130,7 +130,7 @@ End of Item 0008
0x0000, 0x2120, 0x0001,
/*-------------------------------------------------------*/
/* Offset=0x0007 Start of MapCell Array */
/* 0000 */ 0x0000, 0x007E, 0x0000,
/* 0000 */ 0x0000, 0x009F, 0x0000,
/* 0001 */ 0x00A0, 0x00CF, 0x00A0,
/* 0002 */ 0x00D1, 0x00DC, 0x00D1,
/* 0003 */ 0x00DF, 0x00EF, 0x00DF,

Просмотреть файл

@ -114,6 +114,7 @@ var EXPORTED_SYMBOLS = [ "XPCOMUtils" ];
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
const Cu = Components.utils;
var XPCOMUtils = {
/**
@ -187,6 +188,31 @@ var XPCOMUtils = {
});
},
/**
* Defines a getter on a specified object for a module. The module will not
* be imported until first use.
*
* @param aObject
* The object to define the lazy getter on.
* @param aName
* The name of the getter to define on aObject for the module.
* @param aResource
* The URL used to obtain the module.
* @param aSymbol
* The name of the symbol exported by the module.
* This parameter is optional and defaults to aName.
*/
defineLazyModuleGetter: function XPCU_defineLazyModuleGetter(aObject, aName,
aResource,
aSymbol)
{
this.defineLazyGetter(aObject, aName, function XPCU_moduleLambda() {
var temp = {};
Cu.import(aResource, temp);
return temp[aSymbol || aName];
});
},
/**
* Convenience access to category manager
*/

Просмотреть файл

@ -206,7 +206,7 @@ nsFileStream::DoOpen()
PRFileDesc* fd;
nsresult rv = mOpenParams.localFile->OpenNSPRFileDesc(mOpenParams.ioFlags, mOpenParams.perm, &fd);
CleanUpOpen();
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv)) return rv;
mFD = fd;
return NS_OK;