зеркало из https://github.com/mozilla/pjs.git
Merge last green changeset from mozilla-inbound to mozilla-central
This commit is contained in:
Коммит
50d8f656f8
|
@ -3908,12 +3908,29 @@ var FullScreen = {
|
|||
}
|
||||
},
|
||||
|
||||
exitDomFullScreen : function(e) {
|
||||
document.mozCancelFullScreen();
|
||||
},
|
||||
|
||||
enterDomFullScreen : function(event) {
|
||||
if (!document.mozFullScreen) {
|
||||
// We receive "mozfullscreenchange" events for each subdocument which
|
||||
// is an ancestor of the document containing the element which requested
|
||||
// full-screen. Only add listeners and show warning etc when the event we
|
||||
// receive is targeted at the chrome document, i.e. only once every time
|
||||
// we enter DOM full-screen mode.
|
||||
if (!document.mozFullScreen || event.target.ownerDocument != document) {
|
||||
return;
|
||||
}
|
||||
this.showWarning(true);
|
||||
|
||||
// Exit DOM full-screen mode upon open, close, or change tab.
|
||||
gBrowser.tabContainer.addEventListener("TabOpen", this.exitDomFullScreen);
|
||||
gBrowser.tabContainer.addEventListener("TabClose", this.exitDomFullScreen);
|
||||
gBrowser.tabContainer.addEventListener("TabSelect", this.exitDomFullScreen);
|
||||
|
||||
// Exit DOM full-screen mode when the browser window loses focus (ALT+TAB, etc).
|
||||
window.addEventListener("deactivate", this.exitDomFullScreen, true);
|
||||
|
||||
// Cancel any "hide the toolbar" animation which is in progress, and make
|
||||
// the toolbar hide immediately.
|
||||
clearInterval(this._animationInterval);
|
||||
|
@ -3946,6 +3963,10 @@ var FullScreen = {
|
|||
fullScrToggler.removeEventListener("dragenter", this._expandCallback, false);
|
||||
}
|
||||
this.cancelWarning();
|
||||
gBrowser.tabContainer.removeEventListener("TabOpen", this.exitDomFullScreen);
|
||||
gBrowser.tabContainer.removeEventListener("TabClose", this.exitDomFullScreen);
|
||||
gBrowser.tabContainer.removeEventListener("TabSelect", this.exitDomFullScreen);
|
||||
window.removeEventListener("deactivate", this.exitDomFullScreen, true);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -214,8 +214,13 @@ using namespace mozilla::dom;
|
|||
|
||||
typedef nsTArray<Link*> LinkArray;
|
||||
|
||||
// Reference to the document which requested DOM full-screen mode.
|
||||
nsWeakPtr nsDocument::sFullScreenDoc = nsnull;
|
||||
|
||||
// Reference to the root document of the branch containing the document
|
||||
// which requested DOM full-screen mode.
|
||||
nsWeakPtr nsDocument::sFullScreenRootDoc = nsnull;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
static PRLogModuleInfo* gDocumentLeakPRLog;
|
||||
static PRLogModuleInfo* gCspPRLog;
|
||||
|
@ -7301,6 +7306,21 @@ NotifyPageHide(nsIDocument* aDocument, void* aData)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
SetFullScreenState(nsIDocument* aDoc, Element* aElement, bool aIsFullScreen);
|
||||
|
||||
static void
|
||||
SetWindowFullScreen(nsIDocument* aDoc, bool aValue);
|
||||
|
||||
static bool
|
||||
ResetFullScreen(nsIDocument* aDocument, void* aData) {
|
||||
if (aDocument->IsFullScreenDoc()) {
|
||||
::SetFullScreenState(aDocument, nsnull, false);
|
||||
aDocument->EnumerateSubDocuments(ResetFullScreen, nsnull);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::OnPageHide(bool aPersisted,
|
||||
nsIDOMEventTarget* aDispatchStartTarget)
|
||||
|
@ -7352,6 +7372,29 @@ nsDocument::OnPageHide(bool aPersisted,
|
|||
|
||||
EnumerateExternalResources(NotifyPageHide, &aPersisted);
|
||||
EnumerateFreezableElements(NotifyActivityChanged, nsnull);
|
||||
|
||||
if (IsFullScreenDoc()) {
|
||||
// A full-screen doc has been hidden. We need to ensure we exit
|
||||
// full-screen, i.e. remove full-screen state from all full-screen
|
||||
// documents, and exit the top-level window from full-screen mode.
|
||||
// Unfortunately by the time a doc is hidden, it has been removed
|
||||
// from the doc tree, so we can't just call CancelFullScreen()...
|
||||
|
||||
// So firstly reset full-screen state in *this* document. OnPageHide()
|
||||
// is called in every hidden document, so doing this ensures all hidden
|
||||
// documents have their state reset.
|
||||
::SetFullScreenState(this, nsnull, false);
|
||||
|
||||
// Next walk the document tree of still visible documents, and reset
|
||||
// their full-screen state. We then move the top-level window out
|
||||
// of full-screen mode.
|
||||
nsCOMPtr<nsIDocument> fullScreenRoot(do_QueryReferent(sFullScreenRootDoc));
|
||||
if (fullScreenRoot) {
|
||||
fullScreenRoot->EnumerateSubDocuments(ResetFullScreen, nsnull);
|
||||
SetWindowFullScreen(fullScreenRoot, false);
|
||||
sFullScreenRootDoc = nsnull;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -8456,6 +8499,7 @@ nsDocument::CancelFullScreen()
|
|||
doc = doc->GetParentDocument();
|
||||
}
|
||||
sFullScreenDoc = nsnull;
|
||||
sFullScreenRootDoc = nsnull;
|
||||
|
||||
// Move the window out of full-screen mode.
|
||||
SetWindowFullScreen(this, false);
|
||||
|
@ -8500,6 +8544,19 @@ GetCommonAncestor(nsIDocument* aDoc1, nsIDocument* aDoc2)
|
|||
return parent;
|
||||
}
|
||||
|
||||
// Returns the root document in a document hierarchy.
|
||||
static nsIDocument*
|
||||
GetRootDocument(nsIDocument* aDoc)
|
||||
{
|
||||
if (!aDoc)
|
||||
return nsnull;
|
||||
nsIDocument* doc = aDoc;
|
||||
while (doc->GetParentDocument()) {
|
||||
doc = doc->GetParentDocument();
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
|
||||
void
|
||||
nsDocument::RequestFullScreen(Element* aElement)
|
||||
{
|
||||
|
@ -8538,6 +8595,10 @@ nsDocument::RequestFullScreen(Element* aElement)
|
|||
SetWindowFullScreen(fullScreenDoc, false);
|
||||
}
|
||||
|
||||
// Remember the root document, so that if a full-screen document is hidden
|
||||
// we can reset full-screen state the remaining visible full-screen documents.
|
||||
sFullScreenRootDoc = do_GetWeakReference(GetRootDocument(this));
|
||||
|
||||
// Set the full-screen element. This sets the full-screen style on the
|
||||
// element, and the full-screen-ancestor styles on ancestors of the element
|
||||
// in this document.
|
||||
|
|
|
@ -1083,6 +1083,13 @@ protected:
|
|||
// of this document will also be full-screen.
|
||||
static nsWeakPtr sFullScreenDoc;
|
||||
|
||||
// The root document of the doctree containing the document which requested
|
||||
// full-screen. This root document will also be in full-screen state, as will
|
||||
// all the descendents down to the document which requested full-screen. This
|
||||
// reference allows us to reset full-screen state on all documents when a
|
||||
// document is hidden/navigation occurs.
|
||||
static nsWeakPtr sFullScreenRootDoc;
|
||||
|
||||
nsRefPtr<nsEventListenerManager> mListenerManager;
|
||||
nsCOMPtr<nsIDOMStyleSheetList> mDOMStyleSheets;
|
||||
nsRefPtr<nsDOMStyleSheetSetList> mStyleSheetSetList;
|
||||
|
|
|
@ -307,8 +307,6 @@ nsPlainTextSerializer::AppendText(nsIContent* aText,
|
|||
NS_ENSURE_ARG(aText);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRInt32 length = 0;
|
||||
nsAutoString textstr;
|
||||
|
||||
nsIContent* content = aText;
|
||||
const nsTextFragment* frag;
|
||||
|
@ -319,16 +317,19 @@ nsPlainTextSerializer::AppendText(nsIContent* aText,
|
|||
PRInt32 endoffset = (aEndOffset == -1) ? frag->GetLength() : aEndOffset;
|
||||
NS_ASSERTION(aStartOffset <= endoffset, "A start offset is beyond the end of the text fragment!");
|
||||
|
||||
length = endoffset - aStartOffset;
|
||||
PRInt32 length = endoffset - aStartOffset;
|
||||
if (length <= 0) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsAutoString textstr;
|
||||
if (frag->Is2b()) {
|
||||
textstr.Assign(frag->Get2b() + aStartOffset, length);
|
||||
}
|
||||
else {
|
||||
textstr.AssignWithConversion(frag->Get1b()+aStartOffset, length);
|
||||
// AssignASCII is for 7-bit character only, so don't use it
|
||||
const char *data = frag->Get1b();
|
||||
CopyASCIItoUTF16(Substring(data + aStartOffset, data + endoffset), textstr);
|
||||
}
|
||||
|
||||
mOutputString = &aStr;
|
||||
|
|
|
@ -284,6 +284,7 @@ _TEST_FILES = \
|
|||
file_fullscreen-plugins.html \
|
||||
file_fullscreen-denied.html \
|
||||
file_fullscreen-hidden.html \
|
||||
file_fullscreen-navigation.html \
|
||||
test_li_attributes_reflection.html \
|
||||
test_ol_attributes_reflection.html \
|
||||
test_bug651956.html \
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=685402
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 685402</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body onload="boom();" style="background-color: gray;">
|
||||
|
||||
<iframe id="f" src="data:text/html,<body text=green>1" mozallowfullscreen></iframe>
|
||||
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685402">Mozilla Bug 685402</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 685402 **/
|
||||
|
||||
var frameWin;
|
||||
var e1;
|
||||
var prevEnabled;
|
||||
var prevTrusted;
|
||||
|
||||
function boom()
|
||||
{
|
||||
frameWin = document.getElementById("f").contentWindow;
|
||||
e1 = frameWin.document.body;
|
||||
e1.mozRequestFullScreen();
|
||||
setTimeout(
|
||||
function() {
|
||||
opener.ok(document.mozFullScreen, "Request should be granted");
|
||||
frameWin.location = "data:text/html,<body text=blue onload='parent.b2()'>2";
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function b2()
|
||||
{
|
||||
opener.ok(!document.mozFullScreen, "Should have left full-screen due to navigation.");
|
||||
opener.nextTest();
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -40,7 +40,8 @@ var gTestWindows = [
|
|||
"file_fullscreen-api.html",
|
||||
"file_fullscreen-api-keys.html",
|
||||
"file_fullscreen-plugins.html",
|
||||
"file_fullscreen-hidden.html"
|
||||
"file_fullscreen-hidden.html",
|
||||
"file_fullscreen-navigation.html"
|
||||
];
|
||||
|
||||
var testWindow = null;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<rect fill="blue" height="100" width="100">
|
||||
<animate id="a" attributeName="x" calcMode="paced" values="50; 50; 50"/>
|
||||
</rect>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 182 B |
|
@ -42,3 +42,4 @@ load 670313-1.svg
|
|||
load 678822-1.svg
|
||||
load 678847-1.svg
|
||||
load 678938-1.svg
|
||||
load 699325-1.svg
|
||||
|
|
|
@ -561,6 +561,13 @@ nsSMILAnimationFunction::ComputePacedPosition(const nsSMILValueArray& aValues,
|
|||
if (totalDistance == COMPUTE_DISTANCE_ERROR)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// If we have 0 total distance, then it's unclear where our "paced" position
|
||||
// should be. We can just fail, which drops us into discrete animation mode.
|
||||
// (That's fine, since our values are apparently indistinguishable anyway.)
|
||||
if (totalDistance == 0.0) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// total distance we should have moved at this point in time.
|
||||
// (called 'remainingDist' due to how it's used in loop below)
|
||||
double remainingDist = aSimpleProgress * totalDistance;
|
||||
|
|
|
@ -40,43 +40,42 @@
|
|||
# which is available under the MIT license.
|
||||
|
||||
# Tokenizer errors
|
||||
errGarbageAfterLtSlash=Garbage after \u201C</\u201D.
|
||||
errLtSlashGt=Saw \u201C</>\u201D. Probable causes: Unescaped \u201C<\u201D (escape as \u201C<\u201D) or mistyped end tag.
|
||||
errGarbageAfterLtSlash=Garbage after “</”.
|
||||
errLtSlashGt=Saw “</>”. Probable causes: Unescaped “<” (escape as “<”) or mistyped end tag.
|
||||
errCharRefLacksSemicolon=Character reference was not terminated by a semicolon.
|
||||
errNoDigitsInNCR=No digits in numeric character reference.
|
||||
errGtInSystemId=\u201C>\u201D in system identifier.
|
||||
errGtInPublicId=\u201C>\u201D in public identifier.
|
||||
errGtInSystemId=“>” in system identifier.
|
||||
errGtInPublicId=“>” in public identifier.
|
||||
errNamelessDoctype=Nameless doctype.
|
||||
errConsecutiveHyphens=Consecutive hyphens did not terminate a comment. \u201C--\u201D is not permitted inside a comment, but e.g. \u201C- -\u201D is.
|
||||
errPrematureEndOfComment=Premature end of comment. Use \u201C-->\u201D to end a comment properly.
|
||||
errConsecutiveHyphens=Consecutive hyphens did not terminate a comment. “--” is not permitted inside a comment, but e.g. “- -” is.
|
||||
errPrematureEndOfComment=Premature end of comment. Use “-->” to end a comment properly.
|
||||
errBogusComment=Bogus comment.
|
||||
errUnquotedAttributeLt=\u201C<\u201D in an unquoted attribute value. Probable cause: Missing \u201C>\u201D immediately before.
|
||||
errUnquotedAttributeGrave=\u201C`\u201D in an unquoted attribute value. Probable cause: Using the wrong character as a quote.
|
||||
errUnquotedAttributeLt=“<” in an unquoted attribute value. Probable cause: Missing “>” immediately before.
|
||||
errUnquotedAttributeGrave=“`” in an unquoted attribute value. Probable cause: Using the wrong character as a quote.
|
||||
errUnquotedAttributeQuote=Quote in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.
|
||||
errUnquotedAttributeEquals=\u201C=\u201D in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.
|
||||
errSlashNotFollowedByGt=A slash was not immediate followed by \u201C>\u201D.
|
||||
errUnquotedAttributeEquals=“=” in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.
|
||||
errSlashNotFollowedByGt=A slash was not immediate followed by “>”.
|
||||
errNoSpaceBetweenAttributes=No space between attributes.
|
||||
errUnquotedAttributeStartLt=\u201C<\u201D at the start of an unquoted attribute value. Probable cause: Missing \u201C>\u201D immediately before
|
||||
errUnquotedAttributeStartGrave=\u201C`\u201D at the start of an unquoted attribute value. Probable cause: Using the wrong character as a quote.
|
||||
errUnquotedAttributeStartEquals=\u201C=\u201D at the start of an unquoted attribute value. Probable cause: Stray duplicate equals sign.
|
||||
errUnquotedAttributeStartLt=“<” at the start of an unquoted attribute value. Probable cause: Missing “>” immediately before
|
||||
errUnquotedAttributeStartGrave=“`” at the start of an unquoted attribute value. Probable cause: Using the wrong character as a quote.
|
||||
errUnquotedAttributeStartEquals=“=” at the start of an unquoted attribute value. Probable cause: Stray duplicate equals sign.
|
||||
errAttributeValueMissing=Attribute value missing.
|
||||
errBadCharBeforeAttributeNameLt=Saw \u201C<\u201D when expecting an attribute name. Probable cause: Missing \u201C>\u201D immediately before.
|
||||
errEqualsSignBeforeAttributeName=Saw \u201C=\u201D when expecting an attribute name. Probable cause: Attribute name missing.
|
||||
errBadCharAfterLt=Bad character after \u201C<\u201D. Probable cause: Unescaped \u201C<\u201D. Try escaping it as \u201C<\u201D.
|
||||
errLtGt=Saw \u201C<>\u201D. Probable causes: Unescaped \u201C<\u201D (escape as \u201C<\u201D) or mistyped start tag.
|
||||
errProcessingInstruction=Saw \u201C<?\u201D. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
|
||||
errUnescapedAmpersandInterpretedAsCharacterReference=The string following \u201C&\u201D was interpreted as a character reference. (\u201C&\u201D probably should have been escaped as \u201C&\u201D.)
|
||||
errNotSemicolonTerminated=Named character reference was not terminated by a semicolon. (Or \u201C&\u201D should have been escaped as \u201C&\u201D.)
|
||||
errNoNamedCharacterMatch=\u201C&\u201D did not start a character reference. (\u201C&\u201D probably should have been escaped as \u201C&\u201D.)
|
||||
errQuoteBeforeAttributeName=Saw a quote when expecting an attribute name. Probable cause: \u201C=\u201D missing immediately before.
|
||||
errLtInAttributeName=\u201C<\u201D in attribute name. Probable cause: \u201C>\u201D missing immediately before.
|
||||
errBadCharBeforeAttributeNameLt=Saw “<” when expecting an attribute name. Probable cause: Missing “>” immediately before.
|
||||
errEqualsSignBeforeAttributeName=Saw “=” when expecting an attribute name. Probable cause: Attribute name missing.
|
||||
errBadCharAfterLt=Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”.
|
||||
errLtGt=Saw “<>”. Probable causes: Unescaped “<” (escape as “<”) or mistyped start tag.
|
||||
errProcessingInstruction=Saw “<?”. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)
|
||||
errUnescapedAmpersandInterpretedAsCharacterReference=The string following “&” was interpreted as a character reference. (“&” probably should have been escaped as “&”.)
|
||||
errNotSemicolonTerminated=Named character reference was not terminated by a semicolon. (Or “&” should have been escaped as “&”.)
|
||||
errNoNamedCharacterMatch=“&” did not start a character reference. (“&” probably should have been escaped as “&”.)
|
||||
errQuoteBeforeAttributeName=Saw a quote when expecting an attribute name. Probable cause: “=” missing immediately before.
|
||||
errLtInAttributeName=“<” in attribute name. Probable cause: “>” missing immediately before.
|
||||
errQuoteInAttributeName=Quote in attribute name. Probable cause: Matching quote missing somewhere earlier.
|
||||
errExpectedPublicId=Expected a public identifier but the doctype ended.
|
||||
errBogusDoctype=Bogus doctype.
|
||||
maybeErrAttributesOnEndTag=End tag had attributes.
|
||||
maybeErrSlashInEndTag=Stray \u201C/\u201D at the end of an end tag.
|
||||
maybeErrSlashInEndTag=Stray “/” at the end of an end tag.
|
||||
errNcrNonCharacter=Character reference expands to a non-character.
|
||||
errAstralNonCharacter=Character reference expands to an astral non-character.
|
||||
errNcrSurrogate=Character reference expands to a surrogate.
|
||||
errNcrControlChar=Character reference expands to a control character.
|
||||
errNcrCr=A numeric character reference expanded to carriage return.
|
||||
|
@ -86,67 +85,67 @@ errEofInComment=End of file inside comment.
|
|||
errEofInDoctype=End of file inside doctype.
|
||||
errEofInAttributeValue=End of file reached when inside an attribute value. Ignoring tag.
|
||||
errEofInAttributeName=End of file occurred in an attribute name. Ignoring tag.
|
||||
errEofWithoutGt=Saw end of file without the previous tag ending with \u201C>\u201D. Ignoring tag.
|
||||
errEofWithoutGt=Saw end of file without the previous tag ending with “>”. Ignoring tag.
|
||||
errEofInTagName=End of file seen when looking for tag name. Ignoring tag.
|
||||
errEofInEndTag=End of file inside end tag. Ignoring tag.
|
||||
errEofAfterLt=End of file after \u201C<\u201D.
|
||||
errEofAfterLt=End of file after “<”.
|
||||
errNcrOutOfRange=Character reference outside the permissible Unicode range.
|
||||
errNcrUnassigned=Character reference expands to a permanently unassigned code point.
|
||||
errDuplicateAttribute=Duplicate attribute.
|
||||
errEofInSystemId=End of file inside system identifier.
|
||||
errExpectedSystemId=Expected a system identifier but the doctype ended.
|
||||
errMissingSpaceBeforeDoctypeName=Missing space before doctype name.
|
||||
errHyphenHyphenBang=\u201C--!\u201D found in comment.
|
||||
errHyphenHyphenBang=“--!” found in comment.
|
||||
errNcrControlChar=Character reference expands to a control character.
|
||||
errNcrZero=Character reference expands to zero.
|
||||
errNoSpaceBetweenDoctypeSystemKeywordAndQuote=No space between the doctype \u201CSYSTEM\u201D keyword and the quote.
|
||||
errNoSpaceBetweenDoctypeSystemKeywordAndQuote=No space between the doctype “SYSTEM” keyword and the quote.
|
||||
errNoSpaceBetweenPublicAndSystemIds=No space between the doctype public and system identifiers.
|
||||
errNoSpaceBetweenDoctypePublicKeywordAndQuote=No space between the doctype \u201CPUBLIC\u201D keyword and the quote.
|
||||
errNoSpaceBetweenDoctypePublicKeywordAndQuote=No space between the doctype “PUBLIC” keyword and the quote.
|
||||
|
||||
# Tree builder errors
|
||||
errStrayStartTag=Stray start tag \u201C%1$S\u201D.
|
||||
errStrayEndTag=Stray end tag \u201C%1$S\u201D.
|
||||
errUnclosedElements=End tag \u201C%1$S\u201D seen, but there were open elements.
|
||||
errUnclosedElementsImplied=End tag \u201C%1$S\u201D implied, but there were open elements.
|
||||
errStrayStartTag2=Stray start tag “%1$S”.
|
||||
errStrayEndTag=Stray end tag “%1$S”.
|
||||
errUnclosedElements=End tag “%1$S” seen, but there were open elements.
|
||||
errUnclosedElementsImplied=End tag “%1$S” implied, but there were open elements.
|
||||
errUnclosedElementsCell=A table cell was implicitly closed, but there were open elements.
|
||||
errStrayDoctype=Stray doctype.
|
||||
errAlmostStandardsDoctype=Almost standards mode doctype. Expected \u201C<!DOCTYPE html>\u201D.
|
||||
errQuirkyDoctype=Quirky doctype. Expected \u201C<!DOCTYPE html>\u201D.
|
||||
errAlmostStandardsDoctype=Almost standards mode doctype. Expected “<!DOCTYPE html>”.
|
||||
errQuirkyDoctype=Quirky doctype. Expected “<!DOCTYPE html>”.
|
||||
errNonSpaceInTrailer=Non-space character in page trailer.
|
||||
errNonSpaceAfterFrameset=Non-space after \u201Cframeset\u201D.
|
||||
errNonSpaceInFrameset=Non-space in \u201Cframeset\u201D.
|
||||
errNonSpaceAfterFrameset=Non-space after “frameset”.
|
||||
errNonSpaceInFrameset=Non-space in “frameset”.
|
||||
errNonSpaceAfterBody=Non-space character after body.
|
||||
errNonSpaceInColgroupInFragment=Non-space in \u201Ccolgroup\u201D when parsing fragment.
|
||||
errNonSpaceInNoscriptInHead=Non-space character inside \u201Cnoscript\u201D inside \u201Chead\u201D.
|
||||
errFooBetweenHeadAndBody=\u201C%1$S\u201D element between \u201Chead\u201D and \u201Cbody\u201D.
|
||||
errStartTagWithoutDoctype=Start tag seen without seeing a doctype first. Expected \u201C<!DOCTYPE html>\u201D.
|
||||
errNoSelectInTableScope=No \u201Cselect\u201D in table scope.
|
||||
errStartSelectWhereEndSelectExpected=\u201Cselect\u201D start tag where end tag expected.
|
||||
errStartTagWithSelectOpen=\u201C%1$S\u201D start tag with \u201Cselect\u201D open.
|
||||
errBadStartTagInHead=Bad start tag in \u201C%1$S\u201D in \u201Chead\u201D.
|
||||
errImage=Saw a start tag \u201Cimage\u201D.
|
||||
errIsindex=\u201Cisindex\u201D seen.
|
||||
errFooSeenWhenFooOpen=An \u201C%1$S\u201D start tag seen but an element of the same type was already open.
|
||||
errNonSpaceInColgroupInFragment=Non-space in “colgroup” when parsing fragment.
|
||||
errNonSpaceInNoscriptInHead=Non-space character inside “noscript” inside “head”.
|
||||
errFooBetweenHeadAndBody=“%1$S” element between “head” and “body”.
|
||||
errStartTagWithoutDoctype=Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
|
||||
errNoSelectInTableScope=No “select” in table scope.
|
||||
errStartSelectWhereEndSelectExpected=“select” start tag where end tag expected.
|
||||
errStartTagWithSelectOpen=“%1$S” start tag with “select” open.
|
||||
errBadStartTagInHead=Bad start tag in “%1$S” in “head”.
|
||||
errImage=Saw a start tag “image”.
|
||||
errIsindex=“isindex” seen.
|
||||
errFooSeenWhenFooOpen=An “%1$S” start tag seen but an element of the same type was already open.
|
||||
errHeadingWhenHeadingOpen=Heading cannot be a child of another heading.
|
||||
errFramesetStart=\u201Cframeset\u201D start tag seen.
|
||||
errFramesetStart=“frameset” start tag seen.
|
||||
errNoCellToClose=No cell to close.
|
||||
errStartTagInTable=Start tag \u201C%1$S\u201D seen in \u201Ctable\u201D.
|
||||
errFormWhenFormOpen=Saw a \u201Cform\u201D start tag, but there was already an active \u201Cform\u201D element. Nested forms are not allowed. Ignoring the tag.
|
||||
errTableSeenWhileTableOpen=Start tag for \u201Ctable\u201D seen but the previous \u201Ctable\u201D is still open.
|
||||
errStartTagInTableBody=\u201C%1$S\u201D start tag in table body.
|
||||
errEndTagSeenWithoutDoctype=End tag seen without seeing a doctype first. Expected \u201C<!DOCTYPE html>\u201D.
|
||||
errEndTagAfterBody=Saw an end tag after \u201Cbody\u201D had been closed.
|
||||
errEndTagSeenWithSelectOpen=\u201C%1$S\u201D end tag with \u201Cselect\u201D open.
|
||||
errGarbageInColgroup=Garbage in \u201Ccolgroup\u201D fragment.
|
||||
errEndTagBr=End tag \u201Cbr\u201D.
|
||||
errNoElementToCloseButEndTagSeen=No \u201C%1$S\u201D element in scope but a \u201C%1$S\u201D end tag seen.
|
||||
errHtmlStartTagInForeignContext=HTML start tag \u201C%1$S\u201D in a foreign namespace context.
|
||||
errTableClosedWhileCaptionOpen=\u201Ctable\u201D closed but \u201Ccaption\u201D was still open.
|
||||
errStartTagInTable=Start tag “%1$S” seen in “table”.
|
||||
errFormWhenFormOpen=Saw a “form” start tag, but there was already an active “form” element. Nested forms are not allowed. Ignoring the tag.
|
||||
errTableSeenWhileTableOpen=Start tag for “table” seen but the previous “table” is still open.
|
||||
errStartTagInTableBody=“%1$S” start tag in table body.
|
||||
errEndTagSeenWithoutDoctype=End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”.
|
||||
errEndTagAfterBody=Saw an end tag after “body” had been closed.
|
||||
errEndTagSeenWithSelectOpen=“%1$S” end tag with “select” open.
|
||||
errGarbageInColgroup=Garbage in “colgroup” fragment.
|
||||
errEndTagBr=End tag “br”.
|
||||
errNoElementToCloseButEndTagSeen=No “%1$S” element in scope but a “%1$S” end tag seen.
|
||||
errHtmlStartTagInForeignContext=HTML start tag “%1$S” in a foreign namespace context.
|
||||
errTableClosedWhileCaptionOpen=“table” closed but “caption” was still open.
|
||||
errNoTableRowToClose=No table row to close.
|
||||
errNonSpaceInTable=Misplaced non-space characters inside a table.
|
||||
errUnclosedChildrenInRuby=Unclosed children in \u201Cruby\u201D.
|
||||
errStartTagSeenWithoutRuby=Start tag \u201C%1$S\u201D seen without a \u201Cruby\u201D element being open.
|
||||
errSelfClosing=Self-closing syntax (\u201C/>\u201D) used on a non-void HTML element. Ignoring the slash and treating as a start tag.
|
||||
errUnclosedChildrenInRuby=Unclosed children in “ruby”.
|
||||
errStartTagSeenWithoutRuby=Start tag “%1$S” seen without a “ruby” element being open.
|
||||
errSelfClosing=Self-closing syntax (“/>”) used on a non-void HTML element. Ignoring the slash and treating as a start tag.
|
||||
errNoCheckUnclosedElementsOnStack=Unclosed elements on stack.
|
||||
errEndTagDidNotMatchCurrentOpenElement=End tag \u201C%1$S\u201D did not match the name of the current open element (\u201C%2$S\u201D).
|
||||
errEndTagViolatesNestingRules=End tag \u201C%1$S\u201D violates nesting rules.
|
||||
errEndTagDidNotMatchCurrentOpenElement=End tag “%1$S” did not match the name of the current open element (“%2$S”).
|
||||
errEndTagViolatesNestingRules=End tag “%1$S” violates nesting rules.
|
||||
|
|
|
@ -166,12 +166,57 @@ bool nsICODecoder::FillBitmapFileHeaderBuffer(PRInt8 *bfh)
|
|||
// A BMP inside of an ICO has *2 height because of the AND mask
|
||||
// that follows the actual bitmap. The BMP shouldn't know about
|
||||
// this difference though.
|
||||
void
|
||||
nsICODecoder::FillBitmapInformationBufferHeight(PRInt8 *bih)
|
||||
bool
|
||||
nsICODecoder::FixBitmapHeight(PRInt8 *bih)
|
||||
{
|
||||
PRInt32 height = GetRealHeight();
|
||||
// Get the height from the BMP file information header
|
||||
PRInt32 height;
|
||||
memcpy(&height, bih + 8, sizeof(height));
|
||||
height = LITTLE_TO_NATIVE32(height);
|
||||
|
||||
// The bitmap height is by definition * 2 what it should be to account for
|
||||
// the 'AND mask'. It is * 2 even if the `AND mask` is not present.
|
||||
height /= 2;
|
||||
|
||||
if (height > 256) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We should always trust the height from the bitmap itself instead of
|
||||
// the ICO height. So fix the ICO height.
|
||||
if (height == 256) {
|
||||
mDirEntry.mHeight = 0;
|
||||
} else {
|
||||
mDirEntry.mHeight = (PRInt8)height;
|
||||
}
|
||||
|
||||
// Fix the BMP height in the BIH so that the BMP decoder can work properly
|
||||
height = NATIVE32_TO_LITTLE(height);
|
||||
memcpy(bih + 8, &height, sizeof(height));
|
||||
return true;
|
||||
}
|
||||
|
||||
// We should always trust the contained resource for the width
|
||||
// information over our own information.
|
||||
bool
|
||||
nsICODecoder::FixBitmapWidth(PRInt8 *bih)
|
||||
{
|
||||
// Get the width from the BMP file information header
|
||||
PRInt32 width;
|
||||
memcpy(&width, bih + 4, sizeof(width));
|
||||
width = LITTLE_TO_NATIVE32(width);
|
||||
if (width > 256) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We should always trust the width from the bitmap itself instead of
|
||||
// the ICO width.
|
||||
if (width == 256) {
|
||||
mDirEntry.mWidth = 0;
|
||||
} else {
|
||||
mDirEntry.mWidth = (PRInt8)width;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// The BMP information header's bits per pixel should be trusted
|
||||
|
@ -410,8 +455,18 @@ nsICODecoder::WriteInternal(const char* aBuffer, PRUint32 aCount)
|
|||
// Setup the cursor hot spot if one is present
|
||||
SetHotSpotIfCursor();
|
||||
|
||||
// Fix the height on the BMP resource
|
||||
FillBitmapInformationBufferHeight((PRInt8*)mBIHraw);
|
||||
// Fix the ICO height from the BIH.
|
||||
// Fix the height on the BIH to be /2 so our BMP decoder will understand.
|
||||
if (!FixBitmapHeight(reinterpret_cast<PRInt8*>(mBIHraw))) {
|
||||
PostDataError();
|
||||
return;
|
||||
}
|
||||
|
||||
// Fix the ICO width from the BIH.
|
||||
if (!FixBitmapWidth(reinterpret_cast<PRInt8*>(mBIHraw))) {
|
||||
PostDataError();
|
||||
return;
|
||||
}
|
||||
|
||||
// Write out the BMP's bitmap info header
|
||||
mContainedDecoder->Write(mBIHraw, sizeof(mBIHraw));
|
||||
|
|
|
@ -83,8 +83,14 @@ private:
|
|||
void SetHotSpotIfCursor();
|
||||
// Creates a bitmap file header buffer, returns true if successful
|
||||
bool FillBitmapFileHeaderBuffer(PRInt8 *bfh);
|
||||
// Fixes the height of a BMP information header field
|
||||
void FillBitmapInformationBufferHeight(PRInt8 *bih);
|
||||
// Fixes the ICO height to match that of the BIH.
|
||||
// and also fixes the BIH height to be /2 of what it was.
|
||||
// See definition for explanation.
|
||||
// Returns false if invalid information is contained within.
|
||||
bool FixBitmapHeight(PRInt8 *bih);
|
||||
// Fixes the ICO width to match that of the BIH.
|
||||
// Returns false if invalid information is contained within.
|
||||
bool FixBitmapWidth(PRInt8 *bih);
|
||||
// Extract bitmap info header size count from BMP information header
|
||||
PRInt32 ExtractBIHSizeFromBitmap(PRInt8 *bih);
|
||||
// Extract bit count from BMP information header
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 879 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 894 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 894 B |
|
@ -9,3 +9,7 @@
|
|||
# Invalid compression value
|
||||
== wrapper.html?invalid-compression.ico about:blank
|
||||
|
||||
# Invalid ICO width and heigth should be ignored if the
|
||||
# contained BMP is correct.
|
||||
== invalid_ico_height.ico 16x16.png
|
||||
== invalid_ico_width.ico 16x16.png
|
||||
|
|
|
@ -6073,8 +6073,13 @@ MALLOC_OUT:
|
|||
default_zone->version == LION_MALLOC_ZONE_T_VERSION);
|
||||
|
||||
/* Allow us dynamically turn off jemalloc for testing. */
|
||||
if (getenv("NO_MAC_JEMALLOC"))
|
||||
if (getenv("NO_MAC_JEMALLOC")) {
|
||||
osx_use_jemalloc = false;
|
||||
#ifdef __i386__
|
||||
malloc_printf("Warning: NO_MAC_JEMALLOC has no effect on "
|
||||
"i386 machines (such as this one).\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (osx_use_jemalloc) {
|
||||
/*
|
||||
|
@ -6175,8 +6180,11 @@ wrap(strdup)(const char *src) {
|
|||
* allocators, we need to call the OSX allocators from the functions below,
|
||||
* when osx_use_jemalloc is not (dynamically) set.
|
||||
*
|
||||
* memalign is unavailable on Leopard, so we can't dynamically do this there.
|
||||
* However, we don't use jemalloc on Leopard, so we can ignore this.
|
||||
* Note that we assume jemalloc is enabled on i386. This is safe because the
|
||||
* only i386 versions of MacOS are 10.5 and 10.6, which we support. We have to
|
||||
* do this because madvise isn't in the malloc zone struct for 10.5.
|
||||
*
|
||||
* This means that NO_MAC_JEMALLOC doesn't work on i386.
|
||||
*/
|
||||
#if defined(MOZ_MEMORY_DARWIN) && !defined(__i386__)
|
||||
#define DARWIN_ONLY(A) if (!osx_use_jemalloc) { A; }
|
||||
|
|
|
@ -179,7 +179,7 @@ void
|
|||
nsHtml5Tokenizer::errAstralNonCharacter(int ch)
|
||||
{
|
||||
if (NS_UNLIKELY(mViewSource)) {
|
||||
mViewSource->AddErrorToCurrentNode("errAstralNonCharacter");
|
||||
mViewSource->AddErrorToCurrentNode("errNcrNonCharacter");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -730,7 +730,7 @@ void
|
|||
nsHtml5TreeBuilder::errStrayStartTag(nsIAtom* aName)
|
||||
{
|
||||
if (NS_UNLIKELY(mViewSource)) {
|
||||
mViewSource->AddErrorToCurrentRun("errStrayStartTag", aName);
|
||||
mViewSource->AddErrorToCurrentRun("errStrayStartTag2", aName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,19 +48,24 @@
|
|||
void
|
||||
test_file_perms()
|
||||
{
|
||||
nsCOMPtr<nsIFile> profDir;
|
||||
(void)NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(profDir));
|
||||
nsCOMPtr<nsILocalFile> sqlite_file = do_QueryInterface(profDir);
|
||||
sqlite_file->Append(NS_LITERAL_STRING("places.sqlite"));
|
||||
nsCOMPtr<mozIStorageConnection> db(getDatabase());
|
||||
nsCOMPtr<nsIFile> dbFile;
|
||||
do_check_success(db->GetDatabaseFile(getter_AddRefs(dbFile)));
|
||||
|
||||
nsCOMPtr<nsILocalFile> localFile = do_QueryInterface(dbFile);
|
||||
do_check_true(localFile);
|
||||
|
||||
PRUint32 perms = 0;
|
||||
sqlite_file->GetPermissions(&perms);
|
||||
do_check_success(localFile->GetPermissions(&perms));
|
||||
|
||||
// This reflexts the permissions defined by SQLITE_DEFAULT_FILE_PERMISSIONS in
|
||||
// db/sqlite3/src/Makefile.in and must be kept in sync with that
|
||||
#ifdef ANDROID
|
||||
do_check_true(perms == PR_IRUSR | PR_IWUSR);
|
||||
do_check_true(perms == (PR_IRUSR | PR_IWUSR));
|
||||
#elif defined(XP_WIN)
|
||||
do_check_true(perms == (PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH | PR_IWOTH));
|
||||
#else
|
||||
do_check_true(perms == PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IWGRP | PR_IROTH | PR_IWOTH);
|
||||
do_check_true(perms == (PR_IRUSR | PR_IWUSR | PR_IRGRP | PR_IROTH));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ FormAutoComplete.prototype = {
|
|||
// Preferences. Add observer so we get notified of changes.
|
||||
this._prefBranch = Services.prefs.getBranch("browser.formfill.");
|
||||
this._prefBranch.QueryInterface(Ci.nsIPrefBranch2);
|
||||
this._prefBranch.addObserver("", this.observer, false);
|
||||
this._prefBranch.addObserver("", this.observer, true);
|
||||
this.observer._self = this;
|
||||
|
||||
this._debug = this._prefBranch.getBoolPref("debug");
|
||||
|
@ -86,7 +86,7 @@ FormAutoComplete.prototype = {
|
|||
|
||||
this._dbStmts = [];
|
||||
|
||||
Services.obs.addObserver(this.observer, "xpcom-shutdown", false);
|
||||
Services.obs.addObserver(this.observer, "xpcom-shutdown", true);
|
||||
},
|
||||
|
||||
observer : {
|
||||
|
|
|
@ -1759,7 +1759,7 @@ var XPIProvider = {
|
|||
}
|
||||
|
||||
// Ensure any changes to the add-ons list are flushed to disk
|
||||
XPIDatabase.writeAddonsList();
|
||||
XPIDatabase.writeAddonsList([]);
|
||||
Services.prefs.setBoolPref(PREF_PENDING_OPERATIONS, false);
|
||||
},
|
||||
|
||||
|
@ -2942,18 +2942,16 @@ var XPIProvider = {
|
|||
|
||||
let state = this.getInstallLocationStates();
|
||||
|
||||
// If the database exists then the previous file cache can be trusted
|
||||
// otherwise the database needs to be recreated
|
||||
let dbFile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
|
||||
updateDatabase |= !dbFile.exists();
|
||||
if (!updateDatabase) {
|
||||
// If the state has changed then we must update the database
|
||||
let cache = Prefs.getCharPref(PREF_INSTALL_CACHE, null);
|
||||
updateDatabase |= cache != JSON.stringify(state);
|
||||
}
|
||||
|
||||
// If the database doesn't exist and there are add-ons installed then we
|
||||
// must update the database however if there are no add-ons then there is
|
||||
// no need to update the database.
|
||||
if (!XPIDatabase.dbfile.exists())
|
||||
updateDatabase = state.length > 0;
|
||||
|
||||
if (!updateDatabase) {
|
||||
let bootstrapDescriptors = [this.bootstrappedAddons[b].descriptor
|
||||
for (b in this.bootstrappedAddons)];
|
||||
|
@ -2965,7 +2963,7 @@ var XPIProvider = {
|
|||
bootstrapDescriptors.splice(pos, 1);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
if (bootstrapDescriptors.length > 0) {
|
||||
WARN("Bootstrap state is invalid (missing add-ons: " + bootstrapDescriptors.toSource() + ")");
|
||||
updateDatabase = true;
|
||||
|
@ -2979,7 +2977,7 @@ var XPIProvider = {
|
|||
// If the database needs to be updated then open it and then update it
|
||||
// from the filesystem
|
||||
if (updateDatabase || hasPendingChanges) {
|
||||
let migrateData = XPIDatabase.openConnection(false, true);
|
||||
let migrateData = XPIDatabase.openConnection(false);
|
||||
|
||||
try {
|
||||
extensionListChanged = this.processFileChanges(state, manifests,
|
||||
|
@ -3034,8 +3032,8 @@ var XPIProvider = {
|
|||
// Check that the add-ons list still exists
|
||||
let addonsList = FileUtils.getFile(KEY_PROFILEDIR, [FILE_XPI_ADDONS_LIST],
|
||||
true);
|
||||
if (addonsList.exists() == (state.length == 0)) {
|
||||
LOG("Add-ons list is invalid, rebuilding");
|
||||
if (!addonsList.exists()) {
|
||||
LOG("Add-ons list is missing, recreating");
|
||||
XPIDatabase.writeAddonsList();
|
||||
}
|
||||
|
||||
|
@ -4024,8 +4022,6 @@ var XPIDatabase = {
|
|||
addonCache: [],
|
||||
// The nested transaction count
|
||||
transactionCount: 0,
|
||||
// The database file
|
||||
dbfile: FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true),
|
||||
|
||||
// The statements used by the database
|
||||
statements: {
|
||||
|
@ -4075,8 +4071,7 @@ var XPIDatabase = {
|
|||
"type<>'theme' AND bootstrap=0",
|
||||
getActiveTheme: "SELECT " + FIELDS_ADDON + " FROM addon WHERE " +
|
||||
"internalName=:internalName AND type='theme'",
|
||||
getThemes: "SELECT " + FIELDS_ADDON + " FROM addon WHERE type='theme' AND " +
|
||||
"internalName<>:defaultSkin",
|
||||
getThemes: "SELECT " + FIELDS_ADDON + " FROM addon WHERE type='theme'",
|
||||
|
||||
getAddonInLocation: "SELECT " + FIELDS_ADDON + " FROM addon WHERE id=:id " +
|
||||
"AND location=:location",
|
||||
|
@ -4218,17 +4213,12 @@ var XPIDatabase = {
|
|||
* @return the migration data from the database if it was an old schema or
|
||||
* null otherwise.
|
||||
*/
|
||||
openConnection: function XPIDB_openConnection(aRebuildOnError, aForceOpen) {
|
||||
openConnection: function XPIDB_openConnection(aRebuildOnError) {
|
||||
this.initialized = true;
|
||||
let dbfile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_DATABASE], true);
|
||||
delete this.connection;
|
||||
|
||||
if (!aForceOpen && !this.dbfile.exists()) {
|
||||
this.connection = null;
|
||||
return {};
|
||||
}
|
||||
|
||||
this.initialized = true;
|
||||
|
||||
this.connection = this.openDatabaseFile(this.dbfile);
|
||||
this.connection = this.openDatabaseFile(dbfile);
|
||||
|
||||
let migrateData = null;
|
||||
// If the database was corrupt or missing then the new blank database will
|
||||
|
@ -4245,11 +4235,11 @@ var XPIDatabase = {
|
|||
// Delete the existing database
|
||||
this.connection.close();
|
||||
try {
|
||||
if (this.dbfile.exists())
|
||||
this.dbfile.remove(true);
|
||||
if (dbfile.exists())
|
||||
dbfile.remove(true);
|
||||
|
||||
// Reopen an empty database
|
||||
this.connection = this.openDatabaseFile(this.dbfile);
|
||||
this.connection = this.openDatabaseFile(dbfile);
|
||||
}
|
||||
catch (e) {
|
||||
ERROR("Failed to remove old database", e);
|
||||
|
@ -4260,6 +4250,7 @@ var XPIDatabase = {
|
|||
}
|
||||
else if (Prefs.getIntPref(PREF_DB_SCHEMA, 0) == 0) {
|
||||
// Only migrate data from the RDF if we haven't done it before
|
||||
LOG("Migrating data from extensions.rdf");
|
||||
migrateData = this.getMigrateDataFromRDF();
|
||||
}
|
||||
|
||||
|
@ -4359,7 +4350,6 @@ var XPIDatabase = {
|
|||
// Migrate data from extensions.rdf
|
||||
let rdffile = FileUtils.getFile(KEY_PROFILEDIR, [FILE_OLD_DATABASE], true);
|
||||
if (rdffile.exists()) {
|
||||
LOG("Migrating data from extensions.rdf");
|
||||
let ds = gRDF.GetDataSourceBlocking(Services.io.newFileURI(rdffile).spec);
|
||||
let root = Cc["@mozilla.org/rdf/container;1"].
|
||||
createInstance(Ci.nsIRDFContainer);
|
||||
|
@ -4973,9 +4963,6 @@ var XPIDatabase = {
|
|||
* @return an array of names of install locations
|
||||
*/
|
||||
getInstallLocations: function XPIDB_getInstallLocations() {
|
||||
if (!this.connection)
|
||||
return [];
|
||||
|
||||
let stmt = this.getStatement("getInstallLocations");
|
||||
|
||||
return [row.location for each (row in resultRows(stmt))];
|
||||
|
@ -4989,9 +4976,6 @@ var XPIDatabase = {
|
|||
* @return an array of DBAddonInternals
|
||||
*/
|
||||
getAddonsInLocation: function XPIDB_getAddonsInLocation(aLocation) {
|
||||
if (!this.connection)
|
||||
return [];
|
||||
|
||||
let stmt = this.getStatement("getAddonsInLocation");
|
||||
|
||||
stmt.params.location = aLocation;
|
||||
|
@ -5010,11 +4994,6 @@ var XPIDatabase = {
|
|||
* A callback to pass the DBAddonInternal to
|
||||
*/
|
||||
getAddonInLocation: function XPIDB_getAddonInLocation(aId, aLocation, aCallback) {
|
||||
if (!this.connection) {
|
||||
aCallback(null);
|
||||
return;
|
||||
}
|
||||
|
||||
let stmt = this.getStatement("getAddonInLocation");
|
||||
|
||||
stmt.params.id = aId;
|
||||
|
@ -5041,11 +5020,6 @@ var XPIDatabase = {
|
|||
* A callback to pass the DBAddonInternal to
|
||||
*/
|
||||
getVisibleAddonForID: function XPIDB_getVisibleAddonForID(aId, aCallback) {
|
||||
if (!this.connection) {
|
||||
aCallback(null);
|
||||
return;
|
||||
}
|
||||
|
||||
let stmt = this.getStatement("getVisibleAddonForID");
|
||||
|
||||
stmt.params.id = aId;
|
||||
|
@ -5071,11 +5045,6 @@ var XPIDatabase = {
|
|||
* A callback to pass the array of DBAddonInternals to
|
||||
*/
|
||||
getVisibleAddons: function XPIDB_getVisibleAddons(aTypes, aCallback) {
|
||||
if (!this.connection) {
|
||||
aCallback([]);
|
||||
return;
|
||||
}
|
||||
|
||||
let stmt = null;
|
||||
if (!aTypes || aTypes.length == 0) {
|
||||
stmt = this.getStatement("getVisibleAddons");
|
||||
|
@ -5107,9 +5076,6 @@ var XPIDatabase = {
|
|||
* @return an array of DBAddonInternals
|
||||
*/
|
||||
getAddonsByType: function XPIDB_getAddonsByType(aType) {
|
||||
if (!this.connection)
|
||||
return [];
|
||||
|
||||
let stmt = this.getStatement("getAddonsByType");
|
||||
|
||||
stmt.params.type = aType;
|
||||
|
@ -5124,9 +5090,6 @@ var XPIDatabase = {
|
|||
* @return a DBAddonInternal
|
||||
*/
|
||||
getVisibleAddonForInternalName: function XPIDB_getVisibleAddonForInternalName(aInternalName) {
|
||||
if (!this.connection)
|
||||
return null;
|
||||
|
||||
let stmt = this.getStatement("getVisibleAddonForInternalName");
|
||||
|
||||
let addon = null;
|
||||
|
@ -5149,11 +5112,6 @@ var XPIDatabase = {
|
|||
*/
|
||||
getVisibleAddonsWithPendingOperations:
|
||||
function XPIDB_getVisibleAddonsWithPendingOperations(aTypes, aCallback) {
|
||||
if (!this.connection) {
|
||||
aCallback([]);
|
||||
return;
|
||||
}
|
||||
|
||||
let stmt = null;
|
||||
if (!aTypes || aTypes.length == 0) {
|
||||
stmt = this.getStatement("getVisibleAddonsWithPendingOperations");
|
||||
|
@ -5185,9 +5143,6 @@ var XPIDatabase = {
|
|||
* @return an array of DBAddonInternals
|
||||
*/
|
||||
getAddons: function XPIDB_getAddons() {
|
||||
if (!this.connection)
|
||||
return [];
|
||||
|
||||
let stmt = this.getStatement("getAddons");
|
||||
|
||||
return [this.makeAddonFromRow(row) for each (row in resultRows(stmt))];;
|
||||
|
@ -5202,10 +5157,6 @@ var XPIDatabase = {
|
|||
* The file descriptor of the add-on
|
||||
*/
|
||||
addAddonMetadata: function XPIDB_addAddonMetadata(aAddon, aDescriptor) {
|
||||
// If there is no DB yet then forcibly create one
|
||||
if (!this.connection)
|
||||
this.openConnection(false, true);
|
||||
|
||||
this.beginTransaction();
|
||||
|
||||
var self = this;
|
||||
|
@ -5471,24 +5422,14 @@ var XPIDatabase = {
|
|||
* Writes out the XPI add-ons list for the platform to read.
|
||||
*/
|
||||
writeAddonsList: function XPIDB_writeAddonsList() {
|
||||
LOG("Writing add-ons list");
|
||||
Services.appinfo.invalidateCachesOnRestart();
|
||||
|
||||
let addonsList = FileUtils.getFile(KEY_PROFILEDIR, [FILE_XPI_ADDONS_LIST],
|
||||
true);
|
||||
if (!this.connection) {
|
||||
if (addonsList.exists()) {
|
||||
LOG("Deleting add-ons list");
|
||||
addonsList.remove(false);
|
||||
}
|
||||
|
||||
Services.prefs.clearUserPref(PREF_EM_ENABLED_ADDONS);
|
||||
return;
|
||||
}
|
||||
|
||||
let enabledAddons = [];
|
||||
let text = "[ExtensionDirs]\r\n";
|
||||
let count = 0;
|
||||
let fullCount = 0;
|
||||
|
||||
let stmt = this.getStatement("getActiveAddons");
|
||||
|
||||
|
@ -5496,47 +5437,28 @@ var XPIDatabase = {
|
|||
text += "Extension" + (count++) + "=" + row.descriptor + "\r\n";
|
||||
enabledAddons.push(row.id + ":" + row.version);
|
||||
}
|
||||
fullCount += count;
|
||||
|
||||
// The selected skin may come from an inactive theme (the default theme
|
||||
// when a lightweight theme is applied for example)
|
||||
text += "\r\n[ThemeDirs]\r\n";
|
||||
|
||||
stmt = null;
|
||||
if (Prefs.getBoolPref(PREF_EM_DSS_ENABLED)) {
|
||||
stmt = this.getStatement("getThemes");
|
||||
stmt.params.defaultSkin = XPIProvider.defaultSkin;
|
||||
}
|
||||
else if (XPIProvider.selectedSkin != XPIProvider.defaultSkin) {
|
||||
else {
|
||||
stmt = this.getStatement("getActiveTheme");
|
||||
stmt.params.internalName = XPIProvider.selectedSkin;
|
||||
}
|
||||
|
||||
if (stmt) {
|
||||
count = 0;
|
||||
for (let row in resultRows(stmt)) {
|
||||
text += "Extension" + (count++) + "=" + row.descriptor + "\r\n";
|
||||
enabledAddons.push(row.id + ":" + row.version);
|
||||
}
|
||||
fullCount += count;
|
||||
count = 0;
|
||||
for (let row in resultRows(stmt)) {
|
||||
text += "Extension" + (count++) + "=" + row.descriptor + "\r\n";
|
||||
enabledAddons.push(row.id + ":" + row.version);
|
||||
}
|
||||
|
||||
if (fullCount > 0) {
|
||||
LOG("Writing add-ons list");
|
||||
var fos = FileUtils.openSafeFileOutputStream(addonsList);
|
||||
fos.write(text, text.length);
|
||||
FileUtils.closeSafeFileOutputStream(fos);
|
||||
var fos = FileUtils.openSafeFileOutputStream(addonsList);
|
||||
fos.write(text, text.length);
|
||||
FileUtils.closeSafeFileOutputStream(fos);
|
||||
|
||||
Services.prefs.setCharPref(PREF_EM_ENABLED_ADDONS, enabledAddons.join(","));
|
||||
}
|
||||
else {
|
||||
if (addonsList.exists()) {
|
||||
LOG("Deleting add-ons list");
|
||||
addonsList.remove(false);
|
||||
}
|
||||
|
||||
Services.prefs.clearUserPref(PREF_EM_ENABLED_ADDONS);
|
||||
}
|
||||
Services.prefs.setCharPref(PREF_EM_ENABLED_ADDONS, enabledAddons.join(","));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -125,13 +125,6 @@ function run_test() {
|
|||
|
||||
startupManager();
|
||||
|
||||
let file = gProfD.clone();
|
||||
file.append("extensions.sqlite");
|
||||
do_check_false(file.exists());
|
||||
|
||||
file.leafName = "extensions.ini";
|
||||
do_check_false(file.exists());
|
||||
|
||||
run_test_1();
|
||||
}
|
||||
|
||||
|
@ -174,13 +167,6 @@ function run_test_1() {
|
|||
}
|
||||
|
||||
function check_test_1() {
|
||||
let file = gProfD.clone();
|
||||
file.append("extensions.sqlite");
|
||||
do_check_true(file.exists());
|
||||
|
||||
file.leafName = "extensions.ini";
|
||||
do_check_false(file.exists());
|
||||
|
||||
AddonManager.getAllInstalls(function(installs) {
|
||||
// There should be no active installs now since the install completed and
|
||||
// doesn't require a restart.
|
||||
|
@ -261,10 +247,6 @@ function run_test_3() {
|
|||
do_check_eq(getShutdownReason(), ADDON_DISABLE);
|
||||
do_check_not_in_crash_annotation("bootstrap1@tests.mozilla.org", "1.0");
|
||||
|
||||
let file = gProfD.clone();
|
||||
file.append("extensions.ini");
|
||||
do_check_false(file.exists());
|
||||
|
||||
AddonManager.getAddonByID("bootstrap1@tests.mozilla.org", function(b1) {
|
||||
do_check_neq(b1, null);
|
||||
do_check_eq(b1.version, "1.0");
|
||||
|
|
|
@ -48,7 +48,7 @@ function run_test() {
|
|||
do_check_false(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -76,7 +76,7 @@ function run_test_1(d, a) {
|
|||
do_check_true(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_true(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -94,7 +94,7 @@ function run_test_1(d, a) {
|
|||
do_check_false(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -121,7 +121,7 @@ function run_test_2() {
|
|||
do_check_false(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -140,7 +140,7 @@ function run_test_2() {
|
|||
do_check_true(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_true(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -158,7 +158,7 @@ function run_test_2() {
|
|||
do_check_false(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -176,7 +176,7 @@ function run_test_2() {
|
|||
do_check_true(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_true(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
@ -241,7 +241,7 @@ function check_test_2() {
|
|||
do_check_false(d.userDisabled);
|
||||
do_check_false(d.appDisabled);
|
||||
do_check_true(d.isActive);
|
||||
do_check_false(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_true(isThemeInAddonsList(profileDir, d.id));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_DISABLE));
|
||||
do_check_false(hasFlag(d.permissions, AddonManager.PERM_CAN_ENABLE));
|
||||
|
||||
|
|
|
@ -132,13 +132,6 @@ function run_test() {
|
|||
check_startup_changes(AddonManager.STARTUP_CHANGE_DISABLED, []);
|
||||
check_startup_changes(AddonManager.STARTUP_CHANGE_ENABLED, []);
|
||||
|
||||
let file = gProfD.clone();
|
||||
file.append("extensions.sqlite");
|
||||
do_check_false(file.exists());
|
||||
|
||||
file.leafName = "extensions.ini";
|
||||
do_check_false(file.exists());
|
||||
|
||||
AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
|
||||
"addon2@tests.mozilla.org",
|
||||
"addon3@tests.mozilla.org",
|
||||
|
@ -190,13 +183,6 @@ function run_test_1() {
|
|||
check_startup_changes(AddonManager.STARTUP_CHANGE_ENABLED, []);
|
||||
do_check_true(gCachePurged);
|
||||
|
||||
let file = gProfD.clone();
|
||||
file.append("extensions.sqlite");
|
||||
do_check_true(file.exists());
|
||||
|
||||
file.leafName = "extensions.ini";
|
||||
do_check_true(file.exists());
|
||||
|
||||
AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
|
||||
"addon2@tests.mozilla.org",
|
||||
"addon3@tests.mozilla.org",
|
||||
|
@ -298,10 +284,6 @@ function run_test_2() {
|
|||
check_startup_changes(AddonManager.STARTUP_CHANGE_ENABLED, []);
|
||||
do_check_true(gCachePurged);
|
||||
|
||||
var file = gProfD.clone();
|
||||
file.append("extensions.ini");
|
||||
do_check_true(file.exists());
|
||||
|
||||
AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org",
|
||||
"addon2@tests.mozilla.org",
|
||||
"addon3@tests.mozilla.org",
|
||||
|
|
|
@ -957,7 +957,7 @@ backtrace(tm_thread *t, int skip, int *immediate_abort)
|
|||
t->suppress_tracing++;
|
||||
|
||||
if (!stacks_enabled) {
|
||||
#if defined(XP_MACOSX)
|
||||
#if defined(XP_MACOSX) && defined(__i386)
|
||||
/* Walk the stack, even if stacks_enabled is false. We do this to
|
||||
check if we must set immediate_abort. */
|
||||
info->entries = 0;
|
||||
|
|
|
@ -115,7 +115,7 @@ extern "C" {
|
|||
case nsXPTType::T_U64 : *((PRUint64*)d) = s->val.u64; d++; break;
|
||||
case nsXPTType::T_FLOAT : *((float*) d) = s->val.f; break;
|
||||
case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) d) = s->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((PRUint32*)d) = s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRUint32*)d) = s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break;
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ extern "C" {
|
|||
case nsXPTType::T_U64 : *((PRUint64*)d) = s->val.u64; d++; break;
|
||||
case nsXPTType::T_FLOAT : *((float*) d) = s->val.f; break;
|
||||
case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) d) = s->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((PRUint32*)d) = s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRUint32*)d) = s->val.c; break;
|
||||
// wchar_t is an int (32 bits) on NetBSD
|
||||
case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break;
|
||||
|
|
|
@ -166,7 +166,7 @@ invoke_copy_to_stack(PRUint32* d,
|
|||
case nsXPTType::T_U8 : *((PRUint32*) (dest)) = source->val.u8; break;
|
||||
case nsXPTType::T_U16 : *((PRUint32*) (dest)) = source->val.u16; break;
|
||||
case nsXPTType::T_U32 : *((PRUint32*) (dest)) = source->val.u32; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) (dest)) = source->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((PRUint32*) (dest)) = source->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRUint32*) (dest)) = source->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((PRInt32*) (dest)) = source->val.wc; break;
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
|
|||
if(fpCount < 13)
|
||||
l_fprData[fpCount++] = l_s->val.f;
|
||||
break;
|
||||
case nsXPTType::T_BOOL : *((bool*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((uint32*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*) l_d) = l_s->val.wc; break;
|
||||
default:
|
||||
|
|
|
@ -122,8 +122,8 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s, double
|
|||
if (fpCount < 13)
|
||||
fprData[fpCount++] = s->val.d;
|
||||
break;
|
||||
case nsXPTType::T_BOOL : *((bool*) d) = s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
|
||||
case nsXPTType::T_BOOL : *((PRUint32*) d) = s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRInt32*) d) = s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((PRUint32*) d) = s->val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
|
|
|
@ -138,13 +138,13 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
|
|||
if (regCount < 5) regCount++;
|
||||
*((uint32*) l_d) = ((DU *)l_s)->lo;
|
||||
break;
|
||||
case nsXPTType::T_U8 : *((uint32*) l_d) = l_s->val.u8; break;
|
||||
case nsXPTType::T_U8 : *((uint32*) l_d) = l_s->val.u8; break;
|
||||
case nsXPTType::T_U16 : *((uint32*) l_d) = l_s->val.u16; break;
|
||||
case nsXPTType::T_U32 : *((uint32*) l_d) = l_s->val.u32; break;
|
||||
case nsXPTType::T_FLOAT : *((float*) l_d) = l_s->val.f; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*)l_d) = l_s->val.wc; break;
|
||||
case nsXPTType::T_BOOL : *((uint32*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*) l_d) = l_s->val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
*((void**)l_d) = l_s->val.p;
|
||||
|
|
|
@ -139,7 +139,7 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
|
|||
case nsXPTType::T_U16 : *((uint32*) l_d) = l_s->val.u16; break;
|
||||
case nsXPTType::T_U32 : *((uint32*) l_d) = l_s->val.u32; break;
|
||||
case nsXPTType::T_FLOAT : *((float*) l_d) = l_s->val.f; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((uint32*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*) l_d) = l_s->val.wc; break;
|
||||
default:
|
||||
|
|
|
@ -138,13 +138,13 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s)
|
|||
if (regCount < 5) regCount++;
|
||||
*((uint32*) l_d) = ((DU *)l_s)->lo;
|
||||
break;
|
||||
case nsXPTType::T_U8 : *((uint32*) l_d) = l_s->val.u8; break;
|
||||
case nsXPTType::T_U8 : *((uint32*) l_d) = l_s->val.u8; break;
|
||||
case nsXPTType::T_U16 : *((uint32*) l_d) = l_s->val.u16; break;
|
||||
case nsXPTType::T_U32 : *((uint32*) l_d) = l_s->val.u32; break;
|
||||
case nsXPTType::T_FLOAT : *((float*) l_d) = l_s->val.f; break;
|
||||
case nsXPTType::T_BOOL : *((bool*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*)l_d) = l_s->val.wc; break;
|
||||
case nsXPTType::T_BOOL : *((uint32*) l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((uint32*) l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((int32*) l_d) = l_s->val.wc; break;
|
||||
default:
|
||||
// all the others are plain pointer types
|
||||
*((void**)l_d) = l_s->val.p;
|
||||
|
|
|
@ -92,7 +92,7 @@ invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
|
|||
*/
|
||||
case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
|
||||
case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
|
||||
case nsXPTType::T_BOOL : *((bool*)l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_BOOL : *((PRUint64*)l_d) = l_s->val.b; break;
|
||||
case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break;
|
||||
case nsXPTType::T_WCHAR : *((PRInt64*)l_d) = l_s->val.wc; break;
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*)ap); ap++; break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); ap++; break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint32* ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *(((char*) ap) + 3); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break;
|
||||
default:
|
||||
|
|
|
@ -102,7 +102,7 @@ extern "C" {
|
|||
case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*)ap); ap++; break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); ap++; break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *(((char*) ap) + 3); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *(((char*) ap) + 3); break;
|
||||
// wchar_t is an int (32 bits) on NetBSD
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break;
|
||||
|
|
|
@ -138,7 +138,7 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex,
|
|||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*) args); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint32*) args); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*) args); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) args); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint32*) args); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) args); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) args); break;
|
||||
default:
|
||||
|
|
|
@ -102,12 +102,12 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
((DU *)dp)->lo = ((DU *)ap)->lo;
|
||||
ap++;
|
||||
break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
|
|
|
@ -105,12 +105,12 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
((DU *)dp)->lo = ((DU *)ap)->lo;
|
||||
ap++;
|
||||
break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
|
|
|
@ -99,12 +99,12 @@ PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args)
|
|||
((DU *)dp)->lo = ((DU *)ap)->lo;
|
||||
ap++;
|
||||
break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
|
|
|
@ -86,19 +86,19 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
|
|||
// else
|
||||
switch(type)
|
||||
{
|
||||
case nsXPTType::T_I8 : dp->val.i8 = *((PRInt32*) ap); break;
|
||||
case nsXPTType::T_I16 : dp->val.i16 = *((PRInt32*) ap); break;
|
||||
case nsXPTType::T_I32 : dp->val.i32 = *((PRInt32*) ap); break;
|
||||
case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
|
||||
case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*) ap); break;
|
||||
case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break;
|
||||
case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break;
|
||||
case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break;
|
||||
case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
|
||||
case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*)ap); break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((bool*) ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint32*) ap); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt32*) ap); break;
|
||||
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_FLOAT : dp->val.f = ((float*) ap)[1]; break;
|
||||
case nsXPTType::T_BOOL : dp->val.b = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*)ap); break;
|
||||
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break;
|
||||
default:
|
||||
NS_ERROR("bad type");
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче