Merge last PGO-green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2012-03-15 12:42:01 +00:00
commit 9424dfaf15
167 changed files with 1281 additions and 1910 deletions

View File

@ -117,8 +117,10 @@ NotificationController::Shutdown()
// Shutdown handling child documents.
PRInt32 childDocCount = mHangingChildDocuments.Length();
for (PRInt32 idx = childDocCount - 1; idx >= 0; idx--)
mHangingChildDocuments[idx]->Shutdown();
for (PRInt32 idx = childDocCount - 1; idx >= 0; idx--) {
if (!mHangingChildDocuments[idx]->IsDefunct())
mHangingChildDocuments[idx]->Shutdown();
}
mHangingChildDocuments.Clear();
@ -259,6 +261,8 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
PRUint32 hangingDocCnt = mHangingChildDocuments.Length();
for (PRUint32 idx = 0; idx < hangingDocCnt; idx++) {
nsDocAccessible* childDoc = mHangingChildDocuments[idx];
if (childDoc->IsDefunct())
continue;
nsIContent* ownerContent = mDocument->GetDocumentNode()->
FindContentForSubDocument(childDoc->GetDocumentNode());

View File

@ -98,7 +98,8 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
eNoValue,
eNoAction,
eNoLiveAttr,
states::READONLY
kNoReqStates,
eReadonlyUntilEditable
},
{
"button",
@ -168,7 +169,8 @@ nsRoleMapEntry nsARIAMap::gWAIRoleMap[] =
eNoValue,
eNoAction,
eNoLiveAttr,
states::READONLY
kNoReqStates,
eReadonlyUntilEditable
},
{
"grid",
@ -661,7 +663,10 @@ nsStateMapEntry nsARIAMap::gWAIStateMap[] = {
// eARIASelectable
nsStateMapEntry(&nsGkAtoms::aria_selected, kBoolType,
states::SELECTABLE, states::SELECTED, 0, true)
states::SELECTABLE, states::SELECTED, 0, true),
// eReadonlyUntilEditable
nsStateMapEntry(states::READONLY, states::EDITABLE)
};
/**
@ -742,6 +747,23 @@ nsStateMapEntry::nsStateMapEntry() :
mDefinedIfAbsent(false)
{}
nsStateMapEntry::nsStateMapEntry(PRUint64 aDefaultState,
PRUint64 aExclusingState) :
mAttributeName(nsnull),
mIsToken(false),
mPermanentState(0),
mValue1(nsnull),
mState1(0),
mValue2(nsnull),
mState2(0),
mValue3(nsnull),
mState3(0),
mDefaultState(aDefaultState),
mDefinedIfAbsent(false),
mExcludingState(aExclusingState)
{
}
nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName, eStateValueType aType,
PRUint64 aPermanentState,
PRUint64 aTrueState,
@ -757,7 +779,8 @@ nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName, eStateValueType aType,
mValue3(nsnull),
mState3(0),
mDefaultState(aTrueState),
mDefinedIfAbsent(aDefinedIfAbsent)
mDefinedIfAbsent(aDefinedIfAbsent),
mExcludingState(0)
{
if (aType == kMixedType) {
mValue2 = "mixed";
@ -773,7 +796,7 @@ nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName,
mValue1(aValue1), mState1(aState1),
mValue2(aValue2), mState2(aState2),
mValue3(aValue3), mState3(aState3),
mDefaultState(0), mDefinedIfAbsent(false)
mDefaultState(0), mDefinedIfAbsent(false), mExcludingState(0)
{
}
@ -786,7 +809,7 @@ nsStateMapEntry::nsStateMapEntry(nsIAtom** aAttrName,
mValue1(aValue1), mState1(aState1),
mValue2(aValue2), mState2(aState2),
mValue3(aValue3), mState3(aState3),
mDefaultState(0), mDefinedIfAbsent(true)
mDefaultState(0), mDefinedIfAbsent(true), mExcludingState(0)
{
if (aDefaultStateRule == eUseFirstState)
mDefaultState = aState1;
@ -802,6 +825,15 @@ nsStateMapEntry::MapToStates(nsIContent* aContent, PRUint64* aState,
const nsStateMapEntry& entry = nsARIAMap::gWAIStateMap[aStateMapEntryID];
// Non ARIA attribute case. Expose default state until excluding state is
// presented.
if (!entry.mAttributeName) {
if (!(*aState & entry.mExcludingState))
*aState |= entry.mDefaultState;
return true;
}
if (entry.mIsToken) {
// If attribute is considered as defined when it's absent then let's act
// attribute value is "false" supposedly.

View File

@ -187,7 +187,8 @@ enum eStateMapEntryID
eARIAReadonly,
eARIAReadonlyOrEditable,
eARIARequired,
eARIASelectable
eARIASelectable,
eReadonlyUntilEditable
};
class nsStateMapEntry
@ -198,6 +199,12 @@ public:
*/
nsStateMapEntry();
/**
* Used to expose permanent states presented until accessible has an excluding
* state.
*/
nsStateMapEntry(PRUint64 aDefaultState, PRUint64 aExclusingState);
/**
* Used for ARIA attributes having boolean or mixed values.
*/
@ -260,6 +267,9 @@ private:
// Permanent and false states are applied if attribute is absent
bool mDefinedIfAbsent;
// If this state is presented in state bits then default state is not exposed.
PRUint64 mExcludingState;
};

View File

@ -1617,11 +1617,7 @@ nsAccessible::State()
state |= states::HORIZONTAL;
}
}
// If we are editable, force readonly bit off
if (state & states::EDITABLE)
state &= ~states::READONLY;
return state;
}
@ -1668,7 +1664,6 @@ nsAccessible::ApplyARIAState(PRUint64* aState)
if (!mRoleMapEntry)
return;
// Note: the readonly bitflag will be overridden later if content is editable
*aState |= mRoleMapEntry->state;
if (nsStateMapEntry::MapToStates(mContent, aState,
mRoleMapEntry->attributeMap1) &&
@ -1677,7 +1672,6 @@ nsAccessible::ApplyARIAState(PRUint64* aState)
nsStateMapEntry::MapToStates(mContent, aState,
mRoleMapEntry->attributeMap3);
}
}
// Not implemented by this class

View File

@ -168,11 +168,8 @@ nsHyperTextAccessible::NativeState()
nsCOMPtr<nsIEditor> editor = GetEditor();
if (editor) {
PRUint32 flags;
editor->GetFlags(&flags);
if (0 == (flags & nsIPlaintextEditor::eEditorReadonlyMask)) {
states |= states::EDITABLE;
}
states |= states::EDITABLE;
} else if (mContent->Tag() == nsGkAtoms::article) {
// We want <article> to behave like a document in terms of readonly state.
states |= states::READONLY;

View File

@ -102,15 +102,6 @@ function testStates(aAccOrElmOrID, aState, aExtraState, aAbsentState,
"Not focusable " + id + " must be not focused!");
}
// readonly/editable
if (state & STATE_READONLY)
isState(extraState & EXT_STATE_EDITABLE, 0, true,
"Read-only " + id + " cannot be editable!");
if (extraState & EXT_STATE_EDITABLE)
isState(state & STATE_READONLY, 0, true,
"Editable " + id + " cannot be readonly!");
// multiline/singleline
if (extraState & EXT_STATE_MULTI_LINE)
isState(extraState & EXT_STATE_SINGLE_LINE, 0, true,

View File

@ -50,13 +50,13 @@ _TEST_FILES =\
test_aria_imgmap.html \
test_aria_widgetitems.html \
test_buttons.html \
test_controls.xul \
test_doc.html \
test_docarticle.html \
test_editablebody.html \
test_expandable.xul \
test_frames.html \
test_inputs.html \
test_inputs.xul \
test_link.html \
test_popup.xul \
test_selects.html \

View File

@ -19,10 +19,6 @@
function doTest()
{
testStates("some-text", STATE_FOCUSABLE, 0, STATE_UNAVAILABLE);
testStates("some-text2", STATE_UNAVAILABLE, 0 , STATE_FOCUSABLE);
testStates("some-password", STATE_FOCUSABLE, 0, STATE_UNAVAILABLE);
testStates("some-password2", STATE_UNAVAILABLE, 0 , STATE_FOCUSABLE);
testStates("checkbox", STATE_FOCUSABLE, 0, STATE_UNAVAILABLE);
testStates("checkbox2", STATE_UNAVAILABLE, 0 , STATE_FOCUSABLE);
testStates("radio-group", 0, 0, STATE_UNAVAILABLE);
@ -55,11 +51,6 @@
<vbox flex="1">
<textbox id="some-text"/>
<textbox id="some-text2" disabled="true"/>
<textbox id="some-password" type="password" maxlength="8"/>
<textbox id="some-password2" type="password" maxlength="8" disabled="true"/>
<checkbox id="checkbox" checked="true" label="Steak"/>
<checkbox id="checkbox2" checked="true" label="Salad" disabled="true"/>

View File

@ -20,7 +20,7 @@
testStates(getRootAccessible(), 0, EXT_STATE_ACTIVE);
// Bug 509696, 607219.
testStates(document, STATE_READONLY); // role=""
testStates(document, STATE_READONLY, 0); // role=""
document.body.setAttribute("role","banner"); // no platform mapping
testStates(document, STATE_READONLY);
@ -32,20 +32,20 @@
// Bugs 454997 and 467387
testStates(document, STATE_READONLY);
testStates("document", STATE_READONLY);
testStates("editable_document", 0, EXT_STATE_EDITABLE);
testStates("editable_document", 0, EXT_STATE_EDITABLE, STATE_READONLY);
document.designMode = "on";
testStates(document, 0, EXT_STATE_EDITABLE);
testStates("p", 0, EXT_STATE_EDITABLE);
testStates("document", 0, EXT_STATE_EDITABLE);
testStates("editable_document", 0, EXT_STATE_EDITABLE);
testStates(document, 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("p", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("document", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("editable_document", 0, EXT_STATE_EDITABLE, STATE_READONLY);
document.designMode = "off";
testStates(document, STATE_READONLY);
testStates("document", STATE_READONLY);
testStates("editable_document", 0, EXT_STATE_EDITABLE);
testStates("editable_document", 0, EXT_STATE_EDITABLE, STATE_READONLY);
SimpleTest.finish();
}

View File

@ -20,25 +20,26 @@
if (docAcc) {
testStates(docAcc, STATE_READONLY);
testStates("aria_article", STATE_READONLY);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE,
STATE_READONLY);
testStates("article", STATE_READONLY);
testStates("editable_article", 0, EXT_STATE_EDITABLE);
testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
document.designMode = "on";
testStates(docAcc, 0, EXT_STATE_EDITABLE);
testStates("aria_article", 0, EXT_STATE_EDITABLE);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE);
testStates("article", 0, EXT_STATE_EDITABLE);
testStates("editable_article", 0, EXT_STATE_EDITABLE);
testStates(docAcc, 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
document.designMode = "off";
testStates(docAcc, STATE_READONLY);
testStates("aria_article", STATE_READONLY);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE);
testStates("editable_aria_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
testStates("article", STATE_READONLY);
testStates("editable_article", 0, EXT_STATE_EDITABLE);
testStates("editable_article", 0, EXT_STATE_EDITABLE, STATE_READONLY);
}
SimpleTest.finish();
}

View File

@ -22,22 +22,32 @@
frameDocCheckbox = document.getElementById("frame_doc_checkbox").contentDocument;
frameDocTextbox = document.getElementById("frame_doc_textbox").contentDocument;
testStates(frameDoc, STATE_READONLY, 0, 0, 0, "test1: frameDoc");
testStates(frameDocArticle, STATE_READONLY, 0, 0, 0, "test1: frameDocArticle");
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0, "test1: frameDocCheckbox");
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE, 0, 0, "test1: frameDocTextbox");
testStates(frameDoc, STATE_READONLY, 0, 0, 0,
"test1: frameDoc");
testStates(frameDocArticle, STATE_READONLY, 0, 0, 0,
"test1: frameDocArticle");
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0,
"test1: frameDocCheckbox");
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE, STATE_READONLY, 0,
"test1: frameDocTextbox");
frameDoc.designMode = "on";
testStates(frameDoc, 0, EXT_STATE_EDITABLE, 0, 0, "test2: frameDoc");
testStates(frameDocArticle, STATE_READONLY, 0, 0, 0, "test2: frameDocArticle");
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0, "test2: frameDocCheckbox");
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE, 0, 0, "test2: frameDocTextbox");
testStates(frameDoc, 0, EXT_STATE_EDITABLE, STATE_READONLY, 0,
"test2: frameDoc");
testStates(frameDocArticle, STATE_READONLY, 0, 0, 0,
"test2: frameDocArticle");
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0,
"test2: frameDocCheckbox");
testStates(frameDocTextbox, 0, EXT_STATE_EDITABLE, STATE_READONLY, 0,
"test2: frameDocTextbox");
frameDocArticle.designMode = "on";
testStates(frameDocArticle, 0, EXT_STATE_EDITABLE, 0, 0, "test3: frameDocArticle");
testStates(frameDocArticle, 0, EXT_STATE_EDITABLE, STATE_READONLY, 0,
"test3: frameDocArticle");
frameDocCheckbox.designMode = "on";
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0, "test4: frameDocCheckbox");
testStates(frameDocCheckbox, 0, 0, STATE_READONLY, 0,
"test4: frameDocCheckbox");
// Replace iframe document body before the document accessible tree is
// created. Check the states are updated for new body.

View File

@ -16,37 +16,66 @@
<script type="application/javascript">
function doTest()
{
// 'required' state. Also piggyback 'unavailable' testing here.
////////////////////////////////////////////////////////////////////////////
// 'editable' and 'multiline' states.
testStates("input", 0, EXT_STATE_EDITABLE, 0, EXT_STATE_MULTI_LINE);
testStates("textarea", 0, EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE);
testStates("input_readonly", 0, EXT_STATE_EDITABLE);
testStates("input_disabled", 0, EXT_STATE_EDITABLE);
testStates("textarea_readonly", 0, EXT_STATE_EDITABLE);
testStates("textarea_disabled", 0, EXT_STATE_EDITABLE);
////////////////////////////////////////////////////////////////////////////
// 'required', 'readonly' and 'unavailable' states.
var maybe_required = ["input","search","radio","checkbox","textarea"];
var never_required = ["submit","button","reset","image"];
var i;
for (i in maybe_required) {
testStates(maybe_required[i], STATE_REQUIRED, 0, STATE_UNAVAILABLE);
testStates(maybe_required[i] + "2", 0, 0, STATE_REQUIRED);
testStates(maybe_required[i] + "3", STATE_UNAVAILABLE);
testStates(maybe_required[i],
STATE_FOCUSABLE, 0,
STATE_REQUIRED | STATE_READONLY | STATE_UNAVAILABLE);
testStates(maybe_required[i] + "_required",
STATE_FOCUSABLE | STATE_REQUIRED, 0,
STATE_UNAVAILABLE | STATE_READONLY);
var readonlyID = maybe_required[i] + "_readonly";
if (document.getElementById(readonlyID)) {
testStates(readonlyID,
STATE_FOCUSABLE | STATE_READONLY, 0,
STATE_UNAVAILABLE | STATE_REQUIRED);
}
testStates(maybe_required[i] + "_disabled",
STATE_UNAVAILABLE, 0,
STATE_FOCUSABLE | STATE_READONLY | STATE_REQUIRED);
}
for (i in never_required) {
testStates(never_required[i], 0, 0, STATE_REQUIRED);
}
////////////////////////////////////////////////////////////////////////////
// inherited 'unavailable' state
testStates("f", STATE_UNAVAILABLE);
testStates("f_input", STATE_UNAVAILABLE);
testStates("f_input_disabled", STATE_UNAVAILABLE);
////////////////////////////////////////////////////////////////////////////
// inherited from file control
var fileTextField = getAccessible("file").firstChild;
testStates(fileTextField, STATE_UNAVAILABLE | STATE_REQUIRED);
var fileBrowseButton = getAccessible("file").lastChild;
testStates(fileBrowseButton, STATE_UNAVAILABLE | STATE_REQUIRED);
/**
* maxlength doesn't make the element invalid until bug 613016 and bug 613019
* are fixed. Commenting out related lines and adding a todo to make sure
* it will be uncommented as soon as possible.
*/
////////////////////////////////////////////////////////////////////////////
// 'invalid' state
// XXX: maxlength doesn't make the element invalid until bug 613016 and
// bug 613019 are fixed. Commenting out related lines and adding a todo to
// make sure it will be uncommented as soon as possible.
var todoInput = document.createElement("input");
todoInput.maxLength = '2';
todoInput.value = 'foo';
@ -71,6 +100,7 @@
testStates(invalid[i] + "2", 0, 0, STATE_INVALID);
}
////////////////////////////////////////////////////////////////////////////
// autocomplete states
testStates("autocomplete-default", 0, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
testStates("autocomplete-off", 0, 0, 0, EXT_STATE_SUPPORTS_AUTOCOMPLETION);
@ -121,6 +151,11 @@
title="File input control should be propogate states to descendants">
Mozilla Bug 699017
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=733382"
title="Editable state bit should be present on readonly inputs">
Mozilla Bug 733382
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">
@ -128,21 +163,24 @@
<form>
<input id="input" type="input" required>
<input id="input2" type="input">
<input id="input3" type="input" disabled>
<input id="search" type="search" required>
<input id="search2" type="search">
<input id="search3" type="search" disabled>
<input id="radio" type="radio" required>
<input id="radio2" type="radio">
<input id="radio3" type="radio" disabled>
<input id="checkbox" type="checkbox" required>
<input id="checkbox2" type="checkbox">
<input id="checkbox3" type="checkbox" disabled>
<textarea id="textarea" required></textarea>
<textarea id="textarea2"></textarea>
<textarea id="textarea3" disabled></textarea>
<input id="input" type="input">
<input id="input_required" type="input" required>
<input id="input_readonly" type="input" readonly>
<input id="input_disabled" type="input" disabled>
<input id="search" type="search">
<input id="search_required" type="search" required>
<input id="search_readonly" type="search" readonly>
<input id="search_disabled" type="search" disabled>
<input id="radio" type="radio">
<input id="radio_required" type="radio" required>
<input id="radio_disabled" type="radio" disabled>
<input id="checkbox" type="checkbox">
<input id="checkbox_required" type="checkbox" required>
<input id="checkbox_disabled" type="checkbox" disabled>
<textarea id="textarea"></textarea>
<textarea id="textarea_required" required></textarea>
<textarea id="textarea_readonly" readonly></textarea>
<textarea id="textarea_disabled" disabled></textarea>
</form>
<!-- bogus required usage -->

View File

@ -23,65 +23,83 @@
//////////////////////////////////////////////////////////////////////////
// Ordinary textbox
testStates("textbox",
STATE_FOCUSABLE, EXT_STATE_EDITABLE,
STATE_PROTECTED | STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE,
EXT_STATE_EDITABLE,
STATE_PROTECTED | STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"ordinary textbox");
//////////////////////////////////////////////////////////////////////////
// Password textbox
testStates("password",
STATE_FOCUSABLE | STATE_PROTECTED, EXT_STATE_EDITABLE,
STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE | STATE_PROTECTED,
EXT_STATE_EDITABLE,
STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"password textbox");
//////////////////////////////////////////////////////////////////////////
// Textarea
testStates("textarea",
STATE_FOCUSABLE, EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE,
EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"multiline textbox");
//////////////////////////////////////////////////////////////////////////
// Readonly textbox
testStates("readonly_textbox",
STATE_FOCUSABLE | STATE_READONLY, 0,
STATE_PROTECTED | STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE | STATE_READONLY,
EXT_STATE_EDITABLE,
STATE_PROTECTED | STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"readonly textbox");
//////////////////////////////////////////////////////////////////////////
// Disabled textbox
testStates("disabled_textbox",
STATE_UNAVAILABLE, 0,
STATE_FOCUSABLE | STATE_PROTECTED, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_UNAVAILABLE,
EXT_STATE_EDITABLE,
STATE_FOCUSABLE | STATE_PROTECTED,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"readonly textbox");
//////////////////////////////////////////////////////////////////////////
// Readonly textarea
testStates("readonly_textarea",
STATE_FOCUSABLE | STATE_READONLY, EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE | STATE_READONLY,
EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"readonly multiline textbox");
//////////////////////////////////////////////////////////////////////////
// Disabled textarea
testStates("disabled_textarea",
STATE_UNAVAILABLE, EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_FOCUSABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_UNAVAILABLE,
EXT_STATE_EDITABLE| EXT_STATE_MULTI_LINE,
STATE_PROTECTED | STATE_FOCUSABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"readonly multiline textbox");
//////////////////////////////////////////////////////////////////////////
// Search textbox without search button, searches as you type and filters
// a separate control.
testStates("searchbox",
STATE_FOCUSABLE, EXT_STATE_EDITABLE | EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_PROTECTED | STATE_UNAVAILABLE, 0,
STATE_FOCUSABLE,
EXT_STATE_EDITABLE | EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_PROTECTED | STATE_UNAVAILABLE,
0,
"searchbox");
//////////////////////////////////////////////////////////////////////////
// Search textbox with search button, does not support autoCompletion.
testStates("searchfield",
STATE_FOCUSABLE, EXT_STATE_EDITABLE,
STATE_PROTECTED | STATE_UNAVAILABLE, EXT_STATE_SUPPORTS_AUTOCOMPLETION,
STATE_FOCUSABLE,
EXT_STATE_EDITABLE,
STATE_PROTECTED | STATE_UNAVAILABLE,
EXT_STATE_SUPPORTS_AUTOCOMPLETION,
"searchfield");
SimpleTest.finish();

View File

@ -27,9 +27,8 @@ function testAction(aID, aAcc, aNumActions, aActionName, aActionDescription)
}
}
function testThis(aID, aName, aValue, aDescription, aRole, aState,
aExtraState, aAbsentState, aNumActions, aActionName,
aActionDescription)
function testThis(aID, aName, aValue, aDescription, aRole,
aNumActions, aActionName, aActionDescription)
{
var acc = getAccessible(aID);
if (!acc)
@ -40,7 +39,5 @@ function testThis(aID, aName, aValue, aDescription, aRole, aState,
is(acc.description, aDescription, "Wrong description for " + aID + "!");
testRole(aID, aRole);
testStates(acc, aState, aExtraState, aAbsentState);
testAction(aID, acc, aNumActions, aActionName, aActionDescription);
}

View File

@ -30,9 +30,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -44,9 +41,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -58,9 +52,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"I have some text", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -72,9 +63,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"", // value
"", // description
ROLE_PASSWORD_TEXT, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -86,9 +74,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -100,9 +85,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -114,9 +96,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
" I also have some text.\n ", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -128,9 +107,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
"You cannot change me.", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE | STATE_READONLY), // state
(0), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -142,9 +118,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=442648
" You cannot change me, either.\n ", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE | STATE_READONLY), // state
(EXT_STATE_MULTI_LINE), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription

View File

@ -30,9 +30,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -44,9 +41,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -58,9 +52,6 @@
"I have some text", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -72,9 +63,6 @@
"", // value
"", // description
ROLE_PASSWORD_TEXT, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -86,9 +74,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -100,9 +85,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -114,9 +96,6 @@
"I also have some text.", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_EDITABLE | EXT_STATE_MULTI_LINE), // extState
(STATE_READONLY), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -128,9 +107,6 @@
"You cannot change me.", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE | STATE_READONLY), // state
(0), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -142,9 +118,6 @@
"You cannot change me, either.", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE | STATE_READONLY), // state
(EXT_STATE_MULTI_LINE), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -157,9 +130,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(EXT_STATE_SUPPORTS_AUTOCOMPLETION), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription
@ -171,9 +141,6 @@
"", // value
"", // description
ROLE_ENTRY, // role
(STATE_FOCUSABLE), // state
(0), // extState
(0), // absentState
1, // numActions
"activate", // ActionName
"Activate"); // ActionDescription

View File

@ -38,7 +38,7 @@
MOZ_APP_BASENAME=B2G
MOZ_APP_VENDOR=Mozilla
MOZ_APP_VERSION=13.0a1
MOZ_APP_VERSION=14.0a1
MOZ_APP_UA_NAME=Firefox
MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial

View File

@ -148,7 +148,7 @@
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_telephony.xpt
@BINPATH@/components/dom_wifi.xpt
@BINPATH@/components/dom_system_b2g.xpt
@BINPATH@/components/dom_system_gonk.xpt
#endif
@BINPATH@/components/dom_battery.xpt
#ifdef MOZ_B2G_BT

View File

@ -39,8 +39,13 @@
#filter substitution
# SYNTAX HINTS: dashes are delimiters. Use underscores instead.
# The first character after a period must be alphabetic.
#
# SYNTAX HINTS:
#
# - Dashes are delimiters; use underscores instead.
# - The first character after a period must be alphabetic.
# - Computed values (e.g. 50 * 1024) don't work.
#
#ifdef XP_UNIX
#ifndef XP_MACOSX

View File

@ -324,6 +324,7 @@
<key id="showAllHistoryKb" key="&showAllHistoryCmd.commandkey;" command="Browser:ShowAllHistory" modifiers="accel,shift"/>
<key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
<key keycode="VK_F6" command="Browser:FocusNextFrame"/>
<key keycode="VK_F6" command="Browser:FocusNextFrame" modifiers="shift"/>
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
#else
<key id="key_fullScreen" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>

View File

@ -4497,8 +4497,13 @@ var XULBrowserWindow = {
setOverLink: function (url, anchorElt) {
// Encode bidirectional formatting characters.
// (RFC 3987 sections 3.2 and 4.1 paragraph 6)
this.overLink = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
encodeURIComponent);
url = url.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
encodeURIComponent);
if (gURLBar && gURLBar._mayTrimURLs /* corresponds to browser.urlbar.trimURLs */)
url = trimURL(url);
this.overLink = url;
LinkTargetDisplay.update();
},

View File

@ -56,7 +56,7 @@
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
#define BOOKMARKS_FILE_NAME NS_LITERAL_STRING("bookmarks.html")
#define DEFAULT_BOOKMARKS NS_LITERAL_CSTRING("resource:///defaults/profile/bookmarks.html")
void SetUnicharPref(const char* aPref, const nsAString& aValue,
nsIPrefBranch* aPrefs)
@ -164,72 +164,19 @@ GetProfilePath(nsIProfileStartup* aStartup, nsCOMPtr<nsIFile>& aProfileDir)
}
nsresult
ImportBookmarksHTML(nsIFile* aBookmarksFile,
bool aImportIntoRoot,
bool aOverwriteDefaults,
const PRUnichar* aImportSourceNameKey)
ImportDefaultBookmarks()
{
nsresult rv;
nsCOMPtr<nsIPlacesImportExportService> importer =
do_GetService(NS_PLACESIMPORTEXPORTSERVICE_CONTRACTID);
NS_ENSURE_STATE(importer);
nsCOMPtr<nsILocalFile> localFile(do_QueryInterface(aBookmarksFile));
NS_ENSURE_TRUE(localFile, NS_ERROR_FAILURE);
nsCOMPtr<nsIPlacesImportExportService> importer = do_GetService(NS_PLACESIMPORTEXPORTSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIIOService> ioService = mozilla::services::GetIOService();
NS_ENSURE_STATE(ioService);
nsCOMPtr<nsIURI> bookmarksURI;
nsresult rv = ioService->NewURI(DEFAULT_BOOKMARKS, nsnull, nsnull,
getter_AddRefs(bookmarksURI));
if (NS_FAILED(rv))
return rv;
// Import file directly into the bookmarks root folder.
if (aImportIntoRoot) {
rv = importer->ImportHTMLFromFile(localFile, aOverwriteDefaults);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
// Get the source application name.
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIStringBundle> bundle;
rv = bundleService->CreateBundle(MIGRATION_BUNDLE, getter_AddRefs(bundle));
NS_ENSURE_SUCCESS(rv, rv);
nsString sourceName;
rv = bundle->GetStringFromName(aImportSourceNameKey,
getter_Copies(sourceName));
NS_ENSURE_SUCCESS(rv, rv);
const PRUnichar* sourceNameStrings[] = { sourceName.get() };
nsString importedBookmarksTitle;
rv = bundle->FormatStringFromName(NS_LITERAL_STRING("importedBookmarksFolder").get(),
sourceNameStrings, 1,
getter_Copies(importedBookmarksTitle));
NS_ENSURE_SUCCESS(rv, rv);
// Get the bookmarks service.
nsCOMPtr<nsINavBookmarksService> bms =
do_GetService(NS_NAVBOOKMARKSSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Create an imported bookmarks folder under the bookmarks menu.
PRInt64 root;
rv = bms->GetBookmarksMenuFolder(&root);
NS_ENSURE_SUCCESS(rv, rv);
PRInt64 folder;
rv = bms->CreateFolder(root, NS_ConvertUTF16toUTF8(importedBookmarksTitle),
nsINavBookmarksService::DEFAULT_INDEX, &folder);
NS_ENSURE_SUCCESS(rv, rv);
// Import the bookmarks into the folder.
return importer->ImportHTMLFromFileToFolder(localFile, folder, false);
}
nsresult
InitializeBookmarks(nsIFile* aTargetProfile)
{
nsCOMPtr<nsIFile> bookmarksFile;
aTargetProfile->Clone(getter_AddRefs(bookmarksFile));
bookmarksFile->Append(BOOKMARKS_FILE_NAME);
nsresult rv = ImportBookmarksHTML(bookmarksFile, true, true, EmptyString().get());
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
return importer->ImportHTMLFromURI(bookmarksURI, true);
}

View File

@ -99,18 +99,10 @@ void GetMigrateDataFromArray(MigrationData* aDataArray,
// this is already cloned, modify it to your heart's content
void GetProfilePath(nsIProfileStartup* aStartup, nsCOMPtr<nsIFile>& aProfileDir);
// In-place import from aBookmarksFile into a folder in the user's bookmarks.
// If the importIntoRoot parameter has a value of true, the bookmarks will be
// imported into the bookmarks root folder. Otherwise, they'll be imported into
// a new folder with the name "From (STR:aImportSourceNameKey)".
// aImportSourceNameKey is a key into migration.properties with the pretty name
// of the application.
nsresult ImportBookmarksHTML(nsIFile* aBookmarksFile,
bool aImportIntoRoot,
bool aOverwriteDefaults,
const PRUnichar* aImportSourceNameKey);
nsresult InitializeBookmarks(nsIFile* aTargetProfile);
/**
* Imports default bookmarks to the profile.
*/
nsresult ImportDefaultBookmarks();
#endif

View File

@ -1404,11 +1404,10 @@ nsIEProfileMigrator::CopyFavoritesBatched(bool aReplace)
NS_ENSURE_SUCCESS(rv, rv);
}
else {
// Initialize the default bookmarks
nsCOMPtr<nsIFile> profile;
GetProfilePath(nsnull, profile);
rv = InitializeBookmarks(profile);
NS_ENSURE_SUCCESS(rv, rv);
// If importing defaults fails for whatever reason, let the import process
// continue.
DebugOnly<nsresult> rv = ImportDefaultBookmarks();
MOZ_ASSERT(NS_SUCCEEDED(rv), "Should be able to import default bookmarks");
// Locate the Links toolbar folder, we want to replace the Personal Toolbar
// content with Favorites in this folder.

View File

@ -65,6 +65,8 @@
#include "nsNetUtil.h"
#include "nsTArray.h"
#include "mozilla/Util.h"
#include <Carbon/Carbon.h>
#define SAFARI_PREFERENCES_FILE_NAME NS_LITERAL_STRING("com.apple.Safari.plist")
@ -76,6 +78,8 @@
#define SAFARI_HOME_PAGE_PREF "HomePage"
#define MIGRATION_BUNDLE "chrome://browser/locale/migration/migration.properties"
using namespace mozilla;
///////////////////////////////////////////////////////////////////////////////
// nsSafariProfileMigrator
@ -977,10 +981,11 @@ nsSafariProfileMigrator::CopyBookmarksBatched(bool aReplace)
NS_ENSURE_SUCCESS(rv, rv);
}
else {
nsCOMPtr<nsIFile> profile;
GetProfilePath(nsnull, profile);
rv = InitializeBookmarks(profile);
NS_ENSURE_SUCCESS(rv, rv);
// If importing defaults fails for whatever reason, let the import process
// continue.
DebugOnly<nsresult> rv = ImportDefaultBookmarks();
MOZ_ASSERT(NS_SUCCEEDED(rv), "Should be able to import default bookmarks");
// In replace mode we are merging at the top level.
folder = bookmarksMenuFolderId;
}

View File

@ -1,16 +0,0 @@
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks Menu</H1>
<DL><p>
<DT><A HREF="http://example.com/" ADD_DATE="1233157972" LAST_MODIFIED="1233157984">example</A>
<DT><H3 ADD_DATE="1233157910" LAST_MODIFIED="1233157972" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Toolbar</H3>
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
<DL><p>
<DT><A HREF="http://example.com/" ADD_DATE="1233157972" LAST_MODIFIED="1233157984">example</A>
</DL><p>
</DL><p>

View File

@ -22,7 +22,3 @@ function newMigratorFor(aKey) {
let cid = "@mozilla.org/profile/migrator;1?app=browser&type=" + aKey;
return Cc[cid].createInstance(Ci.nsIBrowserProfileMigrator);
}
let (bookmarkshtml = do_get_file("bookmarks.html")) {
bookmarkshtml.copyTo(gProfD, "bookmarks.html");
}

View File

@ -915,7 +915,7 @@ BrowserGlue.prototype = {
Services.prefs.clearUserPref(PREF_TELEMETRY_PROMPTED);
Services.prefs.clearUserPref(PREF_TELEMETRY_ENABLED);
var telemetryPrompt = browserBundle.formatStringFromName("telemetryPrompt", [productName, serverOwner], 2);
var telemetryPrompt = browserBundle.formatStringFromName("telemetryOptInPrompt", [productName, serverOwner], 2);
var buttons = [
{

View File

@ -9,33 +9,61 @@ var EXPORTED_SYMBOLS = [ "Promise" ];
/**
* Create an unfulfilled promise
*
* @param {*=} aTrace A debugging value
*
* @constructor
*/
function Promise() {
function Promise(aTrace) {
this._status = Promise.PENDING;
this._value = undefined;
this._onSuccessHandlers = [];
this._onErrorHandlers = [];
this._trace = aTrace;
// Debugging help
this._id = Promise._nextId++;
Promise._outstanding[this._id] = this;
if (Promise.Debug._debug) {
this._id = Promise.Debug._nextId++;
Promise.Debug._outstanding[this._id] = this;
}
}
/**
* We give promises and ID so we can track which are outstanding
* Debugging options and tools.
*/
Promise._nextId = 0;
Promise.Debug = {
/**
* Set current debugging mode.
*
* @param {boolean} value If |true|, maintain _nextId, _outstanding, _recent.
* Otherwise, cleanup debugging data.
*/
setDebug: function(value) {
Promise.Debug._debug = value;
if (!value) {
Promise.Debug._outstanding = [];
Promise.Debug._recent = [];
}
},
/**
* Outstanding promises. Handy list for debugging only
*/
Promise._outstanding = [];
_debug: false,
/**
* We give promises and ID so we can track which are outstanding.
*/
_nextId: 0,
/**
* Outstanding promises. Handy for debugging (only).
*/
_outstanding: [],
/**
* Recently resolved promises. Also for debugging only.
*/
_recent: []
};
/**
* Recently resolved promises. Also for debugging only
*/
Promise._recent = [];
/**
* A promise can be in one of 2 states.
@ -140,13 +168,50 @@ Promise.prototype.reject = function(data) {
Promise.prototype._complete = function(list, status, data, name) {
// Complain if we've already been completed
if (this._status != Promise.PENDING) {
if (typeof 'console' === 'object') {
console.error('Promise complete. Attempted ' + name + '() with ', data);
console.error('Prev status = ', this._status, ', value = ', this._value);
}
Promise._error("Promise complete.", "Attempted ", name, "() with ", data);
Promise._error("Previous status: ", this._status, ", value =", this._value);
throw new Error('Promise already complete');
}
if (list.length == 0 && status == Promise.ERROR) {
var frame;
var text;
//Complain if a rejection is ignored
//(this is the equivalent of an empty catch-all clause)
Promise._error("Promise rejection ignored and silently dropped", data);
if (data.stack) {// This looks like an exception. Try harder to display it
if (data.fileName && data.lineNumber) {
Promise._error("Error originating at", data.fileName,
", line", data.lineNumber );
}
try {
for (frame = data.stack; frame; frame = frame.caller) {
text += frame + "\n";
}
Promise._error("Attempting to extract exception stack", text);
} catch (x) {
Promise._error("Could not extract exception stack.");
}
} else {
Promise._error("Exception stack not available.");
}
if (Components && Components.stack) {
try {
text = "";
for (frame = Components.stack; frame; frame = frame.caller) {
text += frame + "\n";
}
Promise._error("Attempting to extract current stack", text);
} catch (x) {
Promise._error("Could not extract current stack.");
}
} else {
Promise._error("Current stack not available.");
}
}
this._status = status;
this._value = data;
@ -159,7 +224,7 @@ Promise.prototype._complete = function(list, status, data, name) {
// Remove the given {promise} from the _outstanding list, and add it to the
// _recent list, pruning more than 20 recent promises from that list
delete Promise._outstanding[this._id];
delete Promise.Debug._outstanding[this._id];
// The original code includes this very useful debugging aid, however there
// is concern that it will create a memory leak, so we leave it out here.
/*
@ -172,6 +237,33 @@ Promise.prototype._complete = function(list, status, data, name) {
return this;
};
/**
* Log an error on the most appropriate channel.
*
* If the console is available, this method uses |console.warn|. Otherwise,
* this method falls back to |dump|.
*
* @param {...*} items Items to log.
*/
Promise._error = null;
if (typeof console != "undefined" && console.warn) {
Promise._error = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift("Promise");
console.warn.call(console, args);
};
} else {
Promise._error = function() {
var i;
var len = arguments.length;
dump("Promise: ");
for (i = 0; i < len; ++i) {
dump(arguments[i]+" ");
}
dump("\n");
};
}
/**
* Takes an array of promises and returns a promise that that is fulfilled once
* all the promises in the array are fulfilled
@ -213,3 +305,105 @@ Promise.group = function(promiseList) {
return groupPromise;
};
/**
* Trap errors.
*
* This function serves as an asynchronous counterpart to |catch|.
*
* Example:
* myPromise.chainPromise(a) //May reject
* .chainPromise(b) //May reject
* .chainPromise(c) //May reject
* .trap(d) //Catch any rejection from a, b or c
* .chainPromise(e) //If either a, b and c or
* //d has resolved, execute
*
* Scenario 1:
* If a, b, c resolve, e is executed as if d had not been added.
*
* Scenario 2:
* If a, b or c rejects, d is executed. If d resolves, we proceed
* with e as if nothing had happened. Otherwise, we proceed with
* the rejection of d.
*
* @param {Function} aTrap Called if |this| promise is rejected,
* with one argument: the rejection.
* @return {Promise} A new promise. This promise resolves if all
* previous promises have resolved or if |aTrap| succeeds.
*/
Promise.prototype.trap = function(aTrap) {
var promise = new Promise();
var resolve = Promise.prototype.resolve.bind(promise);
var reject = function(aRejection) {
try {
//Attempt to handle issue
var result = aTrap.call(aTrap, aRejection);
promise.resolve(result);
} catch (x) {
promise.reject(x);
}
};
this.then(resolve, reject);
return promise;
};
/**
* Execute regardless of errors.
*
* This function serves as an asynchronous counterpart to |finally|.
*
* Example:
* myPromise.chainPromise(a) //May reject
* .chainPromise(b) //May reject
* .chainPromise(c) //May reject
* .always(d) //Executed regardless
* .chainPromise(e)
*
* Whether |a|, |b| or |c| resolve or reject, |d| is executed.
*
* @param {Function} aTrap Called regardless of whether |this|
* succeeds or fails.
* @return {Promise} A new promise. This promise holds the same
* resolution/rejection as |this|.
*/
Promise.prototype.always = function(aTrap) {
var promise = new Promise();
var resolve = function(result) {
try {
aTrap.call(aTrap);
promise.resolve(result);
} catch (x) {
promise.reject(x);
}
};
var reject = function(result) {
try {
aTrap.call(aTrap);
promise.reject(result);
} catch (x) {
promise.reject(result);
}
};
this.then(resolve, reject);
return promise;
};
Promise.prototype.toString = function() {
var status;
switch (this._status) {
case Promise.PENDING:
status = "pending";
break;
case Promise.SUCCESS:
status = "resolved";
break;
case Promise.ERROR:
status = "rejected";
break;
default:
status = "invalid status: "+this._status;
}
return "[Promise " + this._id + " (" + status + ")]";
};

View File

@ -149,7 +149,7 @@
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_telephony.xpt
@BINPATH@/components/dom_wifi.xpt
@BINPATH@/components/dom_system_b2g.xpt
@BINPATH@/components/dom_system_gonk.xpt
#endif
@BINPATH@/components/dom_battery.xpt
#ifdef MOZ_B2G_BT

View File

@ -325,9 +325,10 @@ syncPromoNotification.passwords.description=You can access your passwords on all
syncPromoNotification.learnMoreLinkText=Learn More
# Telemetry prompt
# LOCALIZATION NOTE (telemetryPrompt): %1$S will be replaced by brandFullName,
# and %2$S by the value of the toolkit.telemetry.server_owner preference.
telemetryPrompt = Will you help improve %1$S by sending anonymous information about performance, hardware characteristics, feature usage, and browser customizations to %2$S?
# LOCALIZATION NOTE (telemetryOptInPrompt): %1$S will be replaced by
# brandFullName, and %2$S by the value of the toolkit.telemetry.server_owner
# preference.
telemetryOptInPrompt = Will you help improve %1$S by sending information about performance, hardware, usage, and customizations to %2$S?
telemetryLinkLabel = Learn More
telemetryYesButtonLabel2 = Yes, I want to help
telemetryYesButtonAccessKey = Y

View File

@ -33,8 +33,7 @@ wizardpage {
}
.wizard-buttons {
border-top: 2px solid #ccd9ea;
background-color: #f1f5fb;
background-color: rgba(0,0,0,0.1);
padding: 1em;
}

View File

@ -33,8 +33,7 @@ wizardpage {
}
.wizard-buttons {
border-top: 2px solid #ccd9ea;
background-color: #f1f5fb;
background-color: rgba(0,0,0,0.1);
padding: 1em;
}

View File

@ -33,8 +33,7 @@ wizardpage {
}
.wizard-buttons {
border-top: 2px solid #ccd9ea;
background-color: #f1f5fb;
background-color: rgba(0,0,0,0.1);
padding: 1em;
}

View File

@ -1038,10 +1038,12 @@ pixman.h
shareuiinterface.h
#endif
#if MOZ_NATIVE_LIBVPX==1
vpx/vpx_codec.h
vpx/vpx_decoder.h
vpx/vp8dx.h
#endif
#ifdef XP_WIN
vpx/vpx_codec.h
vpx/vpx_decoder.h
vpx/vp8dx.h
sydneyaudio/sydney_audio.h

View File

@ -318,9 +318,9 @@ if test -n "$gonkdir" ; then
STLPORT_CPPFLAGS="-I$gonkdir/ndk/sources/cxx-stl/stlport/stlport/"
STLPORT_LIBS="-lstlport"
CPPFLAGS="-DANDROID -I$gonkdir/bionic/libc/include/ -I$gonkdir/bionic/libc/kernel/common -I$gonkdir/bionic/libc/arch-arm/include -I$gonkdir/bionic/libc/kernel/arch-arm -I$gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system/core/include -I$gonkdir/bionic -I$gonkdir/frameworks/base/include $STLPORT_CPPFLAGS $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice"
CPPFLAGS="-DANDROID -isystem $gonkdir/bionic/libc/include/ -isystem $gonkdir/bionic/libc/kernel/common -isystem $gonkdir/bionic/libc/arch-arm/include -isystem $gonkdir/bionic/libc/kernel/arch-arm -isystem $gonkdir/bionic/libm/include -I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/base/native/include -I$gonkdir/hardware/libhardware/include -I$gonkdir/hardware/libhardware_legacy/include -I$gonkdir/system/core/include -isystem $gonkdir/bionic -I$gonkdir/frameworks/base/include $CPPFLAGS -I$gonkdir/frameworks/base/services/sensorservice"
CFLAGS="-mandroid -fno-short-enums -fno-exceptions $CFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS"
CXXFLAGS="-mandroid -fno-short-enums -fno-exceptions $CXXFLAGS $STLPORT_CPPFLAGS"
LIBS="$LIBS $STLPORT_LIBS"
dnl Add -llog by default, since we use it all over the place.
@ -1801,27 +1801,29 @@ if test "$OS_TARGET" = "Android"; then
ANDROID_CPU_ARCH=x86
;;
esac
fi
if test "$OS_TARGET" = "Android" -a -z "$gonkdir"; then
if test -n "$MOZ_ANDROID_LIBSTDCXX" ; then
if test ! -e "$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/libstdc++.a" ; then
AC_MSG_ERROR([Cannot find path to libstdc++ (NDK version >= 5?)])
fi
STLPORT_CPPFLAGS="-isystem $android_ndk/sources/cxx-stl/gnu-libstdc++/include -isystem $android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include -D_GLIBCXX_PERMIT_BACKWARD_HASH"
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/gnu-libstdc++/include -I$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH/include -D_GLIBCXX_PERMIT_BACKWARD_HASH"
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/$ANDROID_CPU_ARCH"
STLPORT_LIBS="-lstdc++"
elif test -e "$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a" ; then
STLPORT_CPPFLAGS="-isystem $android_ndk/sources/cxx-stl/stlport/stlport"
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport"
STLPORT_LDFLAGS="-L$android_ndk/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/"
STLPORT_LIBS="-lstlport_static"
elif test -e "$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH/libstlport_static.a" ; then
STLPORT_CPPFLAGS="-isystem $android_ndk/sources/cxx-stl/stlport/stlport"
STLPORT_CPPFLAGS="-I$android_ndk/sources/cxx-stl/stlport/stlport"
STLPORT_LDFLAGS="-L$android_ndk/tmp/ndk-digit/build/install/sources/cxx-stl/stlport/libs/$ANDROID_CPU_ARCH"
STLPORT_LIBS="-lstlport_static"
elif test "$target" != "arm-android-eabi"; then
dnl fail if we're not building with NDKr4
AC_MSG_ERROR([Couldn't find path to stlport in the android ndk])
fi
CPPFLAGS="$CPPFLAGS $STLPORT_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $STLPORT_CPPFLAGS"
LDFLAGS="$LDFLAGS $STLPORT_LDFLAGS"
LIBS="$LIBS $STLPORT_LIBS"
fi
@ -9195,7 +9197,6 @@ if test -z "$MOZ_NATIVE_NSPR"; then
_SAVE_LDFLAGS="$LDFLAGS"
export LDFLAGS="$LDFLAGS $NSPR_LDFLAGS"
AC_OUTPUT_SUBDIRS(nsprpub)
unset LDFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
if test -n "$MOZ_LINKER" -a -z "$MOZ_OLD_LINKER" -a "$ac_cv_func_dladdr" = no; then
unset CPPFLAGS
@ -9216,22 +9217,20 @@ if test -z "$MOZ_NATIVE_NSPR"; then
rm -f config/autoconf.mk.bak
fi
if test -n "$direct_nspr_config"; then
dnl ========================================================
dnl = Setup a nice relatively clean build environment for
dnl = sub-configures.
dnl ========================================================
CC="$_SUBDIR_CC"
CXX="$_SUBDIR_CXX"
CFLAGS="$_SUBDIR_CFLAGS"
CPPFLAGS="$_SUBDIR_CPPFLAGS"
CXXFLAGS="$_SUBDIR_CXXFLAGS"
LDFLAGS="$_SUBDIR_LDFLAGS"
HOST_CC="$_SUBDIR_HOST_CC"
HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS"
HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
RC=
fi
dnl ========================================================
dnl = Setup a nice relatively clean build environment for
dnl = sub-configures.
dnl ========================================================
CC="$_SUBDIR_CC"
CXX="$_SUBDIR_CXX"
CFLAGS="$_SUBDIR_CFLAGS"
CPPFLAGS="$_SUBDIR_CPPFLAGS"
CXXFLAGS="$_SUBDIR_CXXFLAGS"
LDFLAGS="$_SUBDIR_LDFLAGS"
HOST_CC="$_SUBDIR_HOST_CC"
HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS"
HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS"
RC=
# Run the SpiderMonkey 'configure' script.
dist=$MOZ_BUILD_ROOT/dist

View File

@ -345,7 +345,7 @@ public:
NS_DECL_NSIDOMFILELIST
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -192,7 +192,7 @@ NS_IMPL_ADDREF_INHERITED(nsSimpleContentList, nsBaseContentList)
NS_IMPL_RELEASE_INHERITED(nsSimpleContentList, nsBaseContentList)
JSObject*
nsSimpleContentList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
nsSimpleContentList::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::NodeList::create(cx, scope, this, triedToWrap);
@ -509,8 +509,7 @@ nsContentList::~nsContentList()
}
JSObject*
nsContentList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
nsContentList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::HTMLCollection::create(cx, scope, this,
triedToWrap);

View File

@ -138,7 +138,7 @@ public:
virtual PRInt32 IndexOf(nsIContent *aContent, bool aDoFlush);
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap) = 0;
protected:
@ -162,7 +162,7 @@ public:
{
return mRoot;
}
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
private:
@ -293,7 +293,7 @@ public:
virtual ~nsContentList();
// nsWrapperCache
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
// nsIDOMHTMLCollection

View File

@ -630,7 +630,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMFileList)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMFileList)
JSObject*
nsDOMFileList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
nsDOMFileList::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::FileList::create(cx, scope, this, triedToWrap);

View File

@ -80,7 +80,7 @@ nsDOMSettableTokenList::SetValue(const nsAString& aValue)
}
JSObject*
nsDOMSettableTokenList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
nsDOMSettableTokenList::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::DOMSettableTokenList::create(cx, scope, this,

View File

@ -59,7 +59,7 @@ public:
nsDOMSettableTokenList(nsGenericElement* aElement, nsIAtom* aAttrAtom);
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
protected:

View File

@ -309,8 +309,7 @@ nsDOMTokenList::ToString(nsAString& aResult)
}
JSObject*
nsDOMTokenList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
nsDOMTokenList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::DOMTokenList::create(cx, scope, this,
triedToWrap);

View File

@ -58,7 +58,7 @@ public:
void DropReference();
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsINode *GetParentObject()

View File

@ -1759,7 +1759,7 @@ NS_INTERFACE_TABLE_HEAD(nsChildContentList)
NS_INTERFACE_MAP_END
JSObject*
nsChildContentList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
nsChildContentList::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::NodeList::create(cx, scope, this, triedToWrap);

View File

@ -107,7 +107,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(nsChildContentList)
// nsWrapperCache
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
// nsIDOMNodeList interface

View File

@ -60,16 +60,26 @@ static void
SetupCapitalization(const PRUnichar* aWord, PRUint32 aLength,
bool* aCapitalization)
{
// Capitalize the first non-punctuation character after a space or start
// Capitalize the first alphanumeric character after a space or start
// of the word.
// The only space character a word can contain is NBSP.
bool capitalizeNextChar = true;
for (PRUint32 i = 0; i < aLength; ++i) {
if (capitalizeNextChar && !nsContentUtils::IsFirstLetterPunctuation(aWord[i])) {
aCapitalization[i] = true;
capitalizeNextChar = false;
PRUint32 ch = aWord[i];
if (capitalizeNextChar) {
if (NS_IS_HIGH_SURROGATE(ch) && i + 1 < aLength &&
NS_IS_LOW_SURROGATE(aWord[i + 1])) {
ch = SURROGATE_TO_UCS4(ch, aWord[i + 1]);
}
if (nsContentUtils::IsAlphanumeric(ch)) {
aCapitalization[i] = true;
capitalizeNextChar = false;
}
if (!IS_IN_BMP(ch)) {
++i;
}
}
if (aWord[i] == 0xA0 /*NBSP*/) {
if (ch == 0xA0 /*NBSP*/) {
capitalizeNextChar = true;
}
}

View File

@ -149,7 +149,7 @@ public:
SetIsProxy();
}
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::TouchList::create(cx, scope, this,

View File

@ -75,7 +75,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPaintRequestList)
NS_DECL_NSIDOMPAINTREQUESTLIST
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::PaintRequestList::create(cx, scope, this,

View File

@ -148,8 +148,7 @@ nsClientRectList::GetItemAt(PRUint32 aIndex)
}
JSObject*
nsClientRectList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
nsClientRectList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::ClientRectList::create(cx, scope, this,
triedToWrap);

View File

@ -80,7 +80,7 @@ public:
NS_DECL_NSIDOMCLIENTRECTLIST
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -150,7 +150,7 @@ public:
nsresult GetSortedControls(nsTArray<nsGenericHTMLFormElement*>& aControls) const;
// nsWrapperCache
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::HTMLCollection::create(cx, scope, this,

View File

@ -2061,7 +2061,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsHTMLOptionCollection)
JSObject*
nsHTMLOptionCollection::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
nsHTMLOptionCollection::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::HTMLOptionsCollection::create(cx, scope, this,

View File

@ -76,7 +76,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
// nsIDOMHTMLOptionsCollection interface

View File

@ -86,7 +86,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TableRowsCollection)
// nsWrapperCache
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::HTMLCollection::create(cx, scope, this,

View File

@ -100,8 +100,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGLengthList)
NS_INTERFACE_MAP_END
JSObject*
DOMSVGLengthList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
DOMSVGLengthList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::SVGLengthList::create(cx, scope, this,
triedToWrap);

View File

@ -102,7 +102,7 @@ public:
}
};
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -101,8 +101,7 @@ NS_INTERFACE_MAP_END
JSObject*
DOMSVGNumberList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
DOMSVGNumberList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::SVGNumberList::create(cx, scope, this,
triedToWrap);

View File

@ -101,7 +101,7 @@ public:
}
}
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -113,8 +113,7 @@ DOMSVGPathSegList::~DOMSVGPathSegList()
}
JSObject*
DOMSVGPathSegList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
DOMSVGPathSegList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::SVGPathSegList::create(cx, scope, this,
triedToWrap);

View File

@ -88,7 +88,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPathSegList)
NS_DECL_NSIDOMSVGPATHSEGLIST
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -132,8 +132,7 @@ DOMSVGPointList::~DOMSVGPointList()
}
JSObject*
DOMSVGPointList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
DOMSVGPointList::WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
return mozilla::dom::binding::SVGPointList::create(cx, scope, this,
triedToWrap);

View File

@ -88,7 +88,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPointList)
NS_DECL_NSIDOMSVGPOINTLIST
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -103,7 +103,7 @@ NS_INTERFACE_MAP_END
// DOMSVGTransformList methods:
JSObject*
DOMSVGTransformList::WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
DOMSVGTransformList::WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::SVGTransformList::create(cx, scope, this,

View File

@ -97,7 +97,7 @@ public:
}
}
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap);
nsISupports* GetParentObject()

View File

@ -113,7 +113,7 @@ public:
nsXBLInsertionPoint* GetInsertionPointAt(PRInt32 i) { return static_cast<nsXBLInsertionPoint*>(mElements->ElementAt(i)); }
void RemoveInsertionPointAt(PRInt32 i) { mElements->RemoveElementAt(i); }
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
return mozilla::dom::binding::NodeList::create(cx, scope, this,

View File

@ -972,8 +972,7 @@ Navigator::GetMozPower(nsIDOMMozPowerManager** aPower)
mPowerManager->Init(win);
}
nsCOMPtr<nsIDOMMozPowerManager> power =
do_QueryInterface(NS_ISUPPORTS_CAST(nsIDOMMozPowerManager*, mPowerManager));
nsCOMPtr<nsIDOMMozPowerManager> power(mPowerManager);
power.forget(aPower);
return NS_OK;

View File

@ -301,8 +301,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
// nsWrapperCache
JSObject *WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
bool *triedToWrap)
JSObject *WrapObject(JSContext *cx, JSObject *scope, bool *triedToWrap)
{
NS_ASSERTION(IsOuterWindow(),
"Inner window supports nsWrapperCache, fix WrapObject!");

View File

@ -3496,12 +3496,12 @@ DOMGCSliceCallback(JSRuntime *aRt, js::GCProgress aProgress, const js::GCDescrip
sFirstCollectionTime = now;
}
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) %s");
nsString msg, gcstats;
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f) ");
nsString prefix, gcstats;
gcstats.Adopt(aDesc.formatMessage(aRt));
msg.Adopt(nsTextFormatter::smprintf(kFmt.get(),
double(delta) / PR_USEC_PER_SEC,
gcstats.get()));
prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
double(delta) / PR_USEC_PER_SEC));
nsString msg = prefix + gcstats;
nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID);
if (cs) {
cs->LogStringMessage(msg.get());

View File

@ -183,7 +183,7 @@ public:
* object doesn't actually support creating a wrapper through its WrapObject
* hook.
*/
virtual JSObject* WrapObject(JSContext *cx, XPCWrappedNativeScope *scope,
virtual JSObject* WrapObject(JSContext *cx, JSObject *scope,
bool *triedToWrap)
{
*triedToWrap = false;

View File

@ -26,7 +26,7 @@ DOM_SRCDIRS = \
ifdef MOZ_B2G_RIL
DOM_SRCDIRS += \
dom/system/b2g \
dom/system/gonk \
dom/telephony \
dom/wifi \
$(NULL)

View File

@ -91,8 +91,8 @@ interface nsIDOMHTMLDocument : nsIDOMDocument
attribute DOMString designMode;
boolean execCommand(in DOMString commandID,
in boolean doShowUI,
in DOMString value);
[optional] in boolean doShowUI,
[optional] in DOMString value);
// returns true if the help is being shown for command (false if not)
boolean execCommandShowHelp(in DOMString commandID);

View File

@ -415,9 +415,14 @@ nsPluginInstanceOwner::SetInstance(nsNPAPIPluginInstance *aInstance)
// If we're going to null out mInstance after use, be sure to call
// mInstance->InvalidateOwner() here, since it now won't be called
// from our destructor. This fixes bug 613376.
if (mInstance && !aInstance)
if (mInstance && !aInstance) {
mInstance->InvalidateOwner();
#ifdef MOZ_WIDGET_ANDROID
RemovePluginView();
#endif
}
mInstance = aInstance;
return NS_OK;
@ -748,7 +753,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
}
return rv;
#elif defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)
#elif (defined(MOZ_WIDGET_GTK2) || defined(MOZ_WIDGET_QT)) && defined(MOZ_X11)
// X11 window managers want the toplevel window for WM_TRANSIENT_FOR.
nsIWidget* win = mObjectFrame->GetNearestWidget();
if (!win)

View File

@ -163,8 +163,7 @@ PowerManagerService::NewWakeLock(const nsAString &aTopic,
nsresult rv = wakelock->Init(aTopic, aWindow);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDOMMozWakeLock> wl =
do_QueryInterface(NS_ISUPPORTS_CAST(nsIDOMMozWakeLock*, wakelock));
nsCOMPtr<nsIDOMMozWakeLock> wl(wakelock);
wl.forget(aWakeLock);
return NS_OK;

View File

@ -99,7 +99,7 @@ LOCAL_INCLUDES += $(VPATH:%=-I%)
ifdef MOZ_B2G_RIL
LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/telephony \
-I$(topsrcdir)/dom/system/b2g \
-I$(topsrcdir)/dom/system/gonk \
$(NULL)
EXTRA_COMPONENTS = \

View File

@ -41,7 +41,7 @@
#include "jsapi.h"
#include "nsIInterfaceRequestorUtils.h"
using mozilla::dom::telephony::SystemWorkerManager;
using mozilla::dom::gonk::SystemWorkerManager;
namespace mozilla {
namespace dom {

View File

@ -75,13 +75,11 @@ LOCAL_INCLUDES += $(MOZ_QT_CFLAGS) \
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),android)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/android \
$(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/android
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/b2g \
$(NULL)
LOCAL_INCLUDES += -I$(topsrcdir)/dom/system/gonk
endif
EXPORTS += nsGeoPositionIPCSerialiser.h

View File

@ -62,7 +62,7 @@ DIRS = android
endif
ifdef MOZ_B2G_RIL
DIRS += b2g
DIRS += gonk
endif
CPPSRCS = \

View File

@ -38,7 +38,7 @@
#include "AudioManager.h"
#include <media/AudioSystem.h>
using namespace mozilla::dom::telephony;
using namespace mozilla::dom::gonk;
using namespace android;
NS_IMPL_ISUPPORTS1(AudioManager, nsIAudioManager)

View File

@ -48,7 +48,7 @@
namespace mozilla {
namespace dom {
namespace telephony {
namespace gonk {
class AudioManager : public nsIAudioManager
{

View File

@ -7,13 +7,13 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = dom/system/b2g
relativesrcdir = dom/system/gonk
include $(DEPTH)/config/autoconf.mk
MODULE = dom
LIBRARY_NAME = domsystemb2g_s
XPIDL_MODULE = dom_system_b2g
LIBRARY_NAME = domsystemgonk_s
XPIDL_MODULE = dom_system_gonk
LIBXUL_LIBRARY = 1
FORCE_STATIC_LIB = 1

View File

@ -55,8 +55,9 @@
#include "nsRadioInterfaceLayer.h"
#include "nsWifiWorker.h"
USING_TELEPHONY_NAMESPACE
USING_WORKERS_NAMESPACE
using namespace mozilla::dom::gonk;
using namespace mozilla::ipc;
namespace {

View File

@ -40,14 +40,20 @@
#ifndef mozilla_dom_system_b2g_systemworkermanager_h__
#define mozilla_dom_system_b2g_systemworkermanager_h__
#include "TelephonyCommon.h"
#include "nsIInterfaceRequestor.h"
#include "nsIObserver.h"
#include "nsAutoPtr.h"
#include "nsCOMPtr.h"
#include "nsDebug.h"
#include "nsDOMEventTargetHelper.h"
#include "nsStringGlue.h"
#include "nsTArray.h"
class nsIWorkerHolder;
BEGIN_TELEPHONY_NAMESPACE
namespace mozilla {
namespace dom {
namespace gonk {
class SystemWorkerManager : public nsIObserver,
public nsIInterfaceRequestor
@ -79,6 +85,8 @@ private:
bool mShutdown;
};
END_TELEPHONY_NAMESPACE
}
}
}
#endif // mozilla_dom_system_b2g_systemworkermanager_h__

View File

@ -63,10 +63,4 @@ XPIDLSRCS = \
nsIDOMCallEvent.idl \
$(NULL)
#LOCAL_INCLUDES = \
# -I$(topsrcdir)/dom/base \
# -I$(topsrcdir)/dom/system/b2g \
# -I$(topsrcdir)/content/events/src \
# $(NULL)
include $(topsrcdir)/config/rules.mk

Some files were not shown because too many files have changed in this diff Show More