Merge Places and mozilla-central

This commit is contained in:
Marco Bonardo 2011-06-08 12:21:07 +02:00
commit fb336b165f
772 changed files with 19940 additions and 17836 deletions

View File

@ -313,8 +313,8 @@ AccHideEvent::
AccMutationEvent(::nsIAccessibleEvent::EVENT_HIDE, aTarget, aTargetNode)
{
mParent = mAccessible->GetParent();
mNextSibling = mAccessible->GetCachedNextSibling();
mPrevSibling = mAccessible->GetCachedPrevSibling();
mNextSibling = mAccessible->NextSibling();
mPrevSibling = mAccessible->PrevSibling();
}

View File

@ -152,7 +152,7 @@ AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
return;
}
nsAccessible* parentPrevSibling = parent->GetSiblingAtOffset(-1);
nsAccessible* parentPrevSibling = parent->PrevSibling();
if (!parentPrevSibling)
return;
@ -162,7 +162,7 @@ AccGroupInfo::AccGroupInfo(nsAccessible* aItem, PRUint32 aRole) :
// although the text does not appear to be rendered, GetRenderedText()
// says that it is so we need to skip past it to find the true
// previous sibling.
parentPrevSibling = parentPrevSibling->GetSiblingAtOffset(-1);
parentPrevSibling = parentPrevSibling->PrevSibling();
if (parentPrevSibling)
parentPrevSiblingRole = parentPrevSibling->Role();
}

View File

@ -341,16 +341,13 @@ static PRInt32
GetAccessModifierMask(nsIContent* aContent)
{
// use ui.key.generalAccessKey (unless it is -1)
PRInt32 accessKey = -1;
nsresult rv = Preferences::GetInt("ui.key.generalAccessKey", accessKey);
if (NS_SUCCEEDED(rv) && accessKey != -1) {
switch (accessKey) {
case nsIDOMKeyEvent::DOM_VK_SHIFT: return NS_MODIFIER_SHIFT;
case nsIDOMKeyEvent::DOM_VK_CONTROL: return NS_MODIFIER_CONTROL;
case nsIDOMKeyEvent::DOM_VK_ALT: return NS_MODIFIER_ALT;
case nsIDOMKeyEvent::DOM_VK_META: return NS_MODIFIER_META;
default: return 0;
}
switch (Preferences::GetInt("ui.key.generalAccessKey", -1)) {
case -1: break;
case nsIDOMKeyEvent::DOM_VK_SHIFT: return NS_MODIFIER_SHIFT;
case nsIDOMKeyEvent::DOM_VK_CONTROL: return NS_MODIFIER_CONTROL;
case nsIDOMKeyEvent::DOM_VK_ALT: return NS_MODIFIER_ALT;
case nsIDOMKeyEvent::DOM_VK_META: return NS_MODIFIER_META;
default: return 0;
}
// get the docShell to this DOMNode, return 0 on failure
@ -365,6 +362,7 @@ GetAccessModifierMask(nsIContent* aContent)
return 0;
// determine the access modifier used in this context
nsresult rv = NS_ERROR_FAILURE;
PRInt32 itemType, accessModifierMask = 0;
treeItem->GetItemType(&itemType);
switch (itemType) {
@ -452,6 +450,10 @@ NS_IMETHODIMP
nsAccessible::GetNextSibling(nsIAccessible **aNextSibling)
{
NS_ENSURE_ARG_POINTER(aNextSibling);
*aNextSibling = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsresult rv = NS_OK;
NS_IF_ADDREF(*aNextSibling = GetSiblingAtOffset(1, &rv));
@ -463,6 +465,10 @@ NS_IMETHODIMP
nsAccessible::GetPreviousSibling(nsIAccessible * *aPreviousSibling)
{
NS_ENSURE_ARG_POINTER(aPreviousSibling);
*aPreviousSibling = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsresult rv = NS_OK;
NS_IF_ADDREF(*aPreviousSibling = GetSiblingAtOffset(-1, &rv));
@ -605,7 +611,7 @@ nsresult nsAccessible::GetFullKeyName(const nsAString& aModifierName, const nsAS
if (!gKeyStringBundle ||
NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(aModifierName).get(),
getter_Copies(modifierName))) ||
NS_FAILED(gKeyStringBundle->GetStringFromName(PromiseFlatString(NS_LITERAL_STRING("MODIFIER_SEPARATOR")).get(),
NS_FAILED(gKeyStringBundle->GetStringFromName(NS_LITERAL_STRING("MODIFIER_SEPARATOR").get(),
getter_Copies(separator)))) {
return NS_ERROR_FAILURE;
}
@ -3168,39 +3174,21 @@ nsAccessible::EnsureChildren()
}
nsAccessible*
nsAccessible::GetSiblingAtOffset(PRInt32 aOffset, nsresult* aError)
nsAccessible::GetSiblingAtOffset(PRInt32 aOffset, nsresult* aError) const
{
if (IsDefunct()) {
if (aError)
*aError = NS_ERROR_FAILURE;
return nsnull;
}
nsAccessible *parent = GetParent();
if (!parent) {
if (!mParent || mIndexInParent == -1) {
if (aError)
*aError = NS_ERROR_UNEXPECTED;
return nsnull;
}
if (mIndexInParent == -1) {
if (aError)
*aError = NS_ERROR_UNEXPECTED;
if (aError && mIndexInParent + aOffset >= mParent->GetChildCount()) {
*aError = NS_OK; // fail peacefully
return nsnull;
}
if (aError) {
PRInt32 childCount = parent->GetChildCount();
if (mIndexInParent + aOffset >= childCount) {
*aError = NS_OK; // fail peacefully
return nsnull;
}
}
nsAccessible* child = parent->GetChildAt(mIndexInParent + aOffset);
nsAccessible* child = mParent->GetChildAt(mIndexInParent + aOffset);
if (aError && !child)
*aError = NS_ERROR_UNEXPECTED;

View File

@ -304,6 +304,14 @@ public:
*/
PRBool HasChildren() { return !!GetChildAt(0); }
/**
* Return next/previous sibling of the accessible.
*/
inline nsAccessible* NextSibling() const
{ return GetSiblingAtOffset(1); }
inline nsAccessible* PrevSibling() const
{ return GetSiblingAtOffset(-1); }
/**
* Return embedded accessible children count.
*/
@ -320,22 +328,23 @@ public:
PRInt32 GetIndexOfEmbeddedChild(nsAccessible* aChild);
/**
* Return cached accessible of parent-child relatives.
* Return number of content children/content child at index. The content
* child is created from markup in contrast to it's never constructed by its
* parent accessible (like treeitem accessibles for XUL trees).
*/
PRUint32 ContentChildCount() const { return mChildren.Length(); }
nsAccessible* ContentChildAt(PRUint32 aIndex) const
{ return mChildren.ElementAt(aIndex); }
/**
* Return true if children were initialized.
*/
nsAccessible* GetCachedNextSibling() const
{
return mParent ?
mParent->mChildren.SafeElementAt(mIndexInParent + 1, nsnull).get() : nsnull;
}
nsAccessible* GetCachedPrevSibling() const
{
return mParent ?
mParent->mChildren.SafeElementAt(mIndexInParent - 1, nsnull).get() : nsnull;
}
PRUint32 GetCachedChildCount() const { return mChildren.Length(); }
nsAccessible* GetCachedChildAt(PRUint32 aIndex) const { return mChildren.ElementAt(aIndex); }
inline bool AreChildrenCached() const
{ return !IsChildrenFlag(eChildrenUninitialized); }
/**
* Return true if the accessible is attached to tree.
*/
bool IsBoundToParent() const { return !!mParent; }
//////////////////////////////////////////////////////////////////////////////
@ -503,7 +512,7 @@ protected:
* Return sibling accessible at the given offset.
*/
virtual nsAccessible* GetSiblingAtOffset(PRInt32 aOffset,
nsresult *aError = nsnull);
nsresult *aError = nsnull) const;
/**
* Flags used to describe the state and type of children.

View File

@ -428,15 +428,9 @@ nsApplicationAccessible::CacheChildren()
}
nsAccessible*
nsApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset, nsresult* aError)
nsApplicationAccessible::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError) const
{
if (IsDefunct()) {
if (aError)
*aError = NS_ERROR_FAILURE;
return nsnull;
}
if (aError)
*aError = NS_OK; // fail peacefully

View File

@ -136,7 +136,7 @@ protected:
// nsAccessible
virtual void CacheChildren();
virtual nsAccessible* GetSiblingAtOffset(PRInt32 aOffset,
nsresult *aError = nsnull);
nsresult *aError = nsnull) const;
private:
nsCOMPtr<nsIXULAppInfo> mAppInfo;

View File

@ -1919,9 +1919,12 @@ nsDocAccessible::CacheChildrenInSubtree(nsAccessible* aRoot)
{
aRoot->EnsureChildren();
PRUint32 count = aRoot->GetChildCount();
for (PRUint32 idx = 0; idx < count; idx++) {
nsAccessible* child = aRoot->GetChildAt(idx);
// Make sure we create accessible tree defined in DOM only, i.e. if accessible
// provides specific tree (like XUL trees) then tree creation is handled by
// this accessible.
PRUint32 count = aRoot->ContentChildCount();
for (PRUint32 idx = 0; idx < count; idx++) {
nsAccessible* child = aRoot->ContentChildAt(idx);
NS_ASSERTION(child, "Illicit tree change while tree is created!");
// Don't cross document boundaries.
if (child && child->IsContent())
@ -1935,9 +1938,9 @@ nsDocAccessible::UncacheChildrenInSubtree(nsAccessible* aRoot)
if (aRoot->IsElement())
RemoveDependentIDsFor(aRoot);
PRUint32 count = aRoot->GetCachedChildCount();
PRUint32 count = aRoot->ContentChildCount();
for (PRUint32 idx = 0; idx < count; idx++)
UncacheChildrenInSubtree(aRoot->GetCachedChildAt(idx));
UncacheChildrenInSubtree(aRoot->ContentChildAt(idx));
if (aRoot->IsPrimaryForNode() &&
mNodeToAccessibleMap.Get(aRoot->GetNode()) == aRoot)
@ -1951,9 +1954,9 @@ nsDocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
// child gets shutdown then it removes itself from children array of its
//parent. Use jdx index to process the cases if child is not attached to the
// parent and as result doesn't remove itself from its children.
PRUint32 count = aAccessible->GetCachedChildCount();
PRUint32 count = aAccessible->ContentChildCount();
for (PRUint32 idx = 0, jdx = 0; idx < count; idx++) {
nsAccessible* child = aAccessible->GetCachedChildAt(jdx);
nsAccessible* child = aAccessible->ContentChildAt(jdx);
if (!child->IsBoundToParent()) {
NS_ERROR("Parent refers to a child, child doesn't refer to parent!");
jdx++;

View File

@ -971,7 +971,7 @@ nsXULTreeItemAccessibleBase::NativeState()
PRInt32
nsXULTreeItemAccessibleBase::GetIndexInParent() const
{
return mParent ? mParent->GetCachedChildCount() + mRow : -1;
return mParent ? mParent->ContentChildCount() + mRow : -1;
}
////////////////////////////////////////////////////////////////////////////////
@ -1008,15 +1008,8 @@ nsXULTreeItemAccessibleBase::DispatchClickEvent(nsIContent *aContent,
nsAccessible*
nsXULTreeItemAccessibleBase::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError)
nsresult* aError) const
{
if (IsDefunct()) {
if (aError)
*aError = NS_ERROR_FAILURE;
return nsnull;
}
if (aError)
*aError = NS_OK; // fail peacefully
@ -1172,20 +1165,13 @@ nsXULTreeColumnsAccessible::
nsAccessible*
nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError)
nsresult* aError) const
{
if (aOffset < 0)
return nsXULColumnsAccessible::GetSiblingAtOffset(aOffset, aError);
if (IsDefunct()) {
if (aError)
*aError = NS_ERROR_FAILURE;
return nsnull;
}
if (aError)
*aError = NS_OK; // fail peacefully
*aError = NS_OK; // fail peacefully
nsCOMPtr<nsITreeBoxObject> tree = nsCoreUtils::GetTreeBoxObject(mContent);
if (tree) {
@ -1195,7 +1181,7 @@ nsXULTreeColumnsAccessible::GetSiblingAtOffset(PRInt32 aOffset,
PRInt32 rowCount = 0;
treeView->GetRowCount(&rowCount);
if (rowCount > 0 && aOffset <= rowCount) {
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(mParent);
nsRefPtr<nsXULTreeAccessible> treeAcc = do_QueryObject(GetParent());
if (treeAcc)
return treeAcc->GetTreeItemAccessible(aOffset - 1);

View File

@ -235,7 +235,7 @@ protected:
// nsAccessible
virtual void DispatchClickEvent(nsIContent *aContent, PRUint32 aActionIndex);
virtual nsAccessible* GetSiblingAtOffset(PRInt32 aOffset,
nsresult *aError = nsnull);
nsresult *aError = nsnull) const;
// nsXULTreeItemAccessibleBase
@ -299,7 +299,7 @@ protected:
// nsAccessible
virtual nsAccessible* GetSiblingAtOffset(PRInt32 aOffset,
nsresult *aError = nsnull);
nsresult *aError = nsnull) const;
};
#endif

View File

@ -1244,17 +1244,10 @@ nsXULTreeGridCellAccessible::CellInvalidated()
nsAccessible*
nsXULTreeGridCellAccessible::GetSiblingAtOffset(PRInt32 aOffset,
nsresult* aError)
nsresult* aError) const
{
if (IsDefunct()) {
if (aError)
*aError = NS_ERROR_FAILURE;
return nsnull;
}
if (aError)
*aError = NS_OK; // fail peacefully
*aError = NS_OK; // fail peacefully
nsCOMPtr<nsITreeColumn> columnAtOffset(mColumn), column;
if (aOffset < 0) {
@ -1272,8 +1265,7 @@ nsXULTreeGridCellAccessible::GetSiblingAtOffset(PRInt32 aOffset,
if (!columnAtOffset)
return nsnull;
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(mParent);
nsRefPtr<nsXULTreeItemAccessibleBase> rowAcc = do_QueryObject(GetParent());
return rowAcc->GetCellAccessible(columnAtOffset);
}

View File

@ -182,7 +182,7 @@ public:
protected:
// nsAccessible
virtual nsAccessible* GetSiblingAtOffset(PRInt32 aOffset,
nsresult *aError = nsnull);
nsresult *aError = nsnull) const;
virtual void DispatchClickEvent(nsIContent *aContent, PRUint32 aActionIndex);
// nsXULTreeGridCellAccessible

View File

@ -72,33 +72,3 @@
padding: 0;
font-weight: bold;
}
#channelSelector {
margin-top: 10px;
}
#channelSelectorStart {
-moz-margin-start: 0;
}
#channelMenulist {
margin: 0;
}
.channel-description {
margin: 10px 0;
}
#detailsBox,
#channelSelector,
.channel-description {
-moz-transition: opacity 250ms;
}
#contentDeck:not([selectedIndex="0"]) > #detailsBox,
#contentDeck:not([selectedIndex="1"]) > #channelSelector,
#channelDescriptionDeck:not([selectedIndex="0"]) > #releaseDescription,
#channelDescriptionDeck:not([selectedIndex="1"]) > #betaDescription,
#channelDescriptionDeck:not([selectedIndex="2"]) > #auroraDescription {
opacity: 0;
}

View File

@ -88,7 +88,9 @@ function init(aEvent)
gAppUpdater = new appUpdater();
#endif
gChannelSelector.init();
let defaults = Services.prefs.getDefaultBranch("");
let channelLabel = document.getElementById("currentChannel");
channelLabel.value = defaults.getCharPref("app.update.channel");
#ifdef XP_MACOSX
// it may not be sized at this point, and we need its width to calculate its position
@ -573,72 +575,3 @@ appUpdater.prototype =
}
};
#endif
var gChannelSelector = {
validChannels: { release: 1, beta: 1, aurora: 1 },
init: function() {
try {
this.channelValue = Services.prefs.getCharPref("app.update.desiredChannel");
} catch (e) {
let defaults = Services.prefs.getDefaultBranch("");
this.channelValue = defaults.getCharPref("app.update.channel");
}
// Only show channel selector UI on valid update channels.
if (this.channelValue in this.validChannels) {
document.getElementById("currentChannelText").hidden = false;
this.setChannelLabel(this.channelValue);
this.setChannelMenuitem(this.channelValue);
}
},
selectChannel: function(aSelectedItem) {
document.getElementById("channelDescriptionDeck").selectedPanel =
document.getElementById(aSelectedItem.value + "Description");
document.getElementById("channelMenulist").setAttribute("aria-describedby",
aSelectedItem.value + "Description");
},
cancel: function() {
this.setChannelMenuitem(this.channelValue);
this.hide();
},
apply: function() {
this.channelValue = document.getElementById("channelMenulist").selectedItem.value;
this.setChannelLabel(this.channelValue);
// Change app update channel.
Services.prefs.setCharPref("app.update.desiredChannel", this.channelValue);
// Stop any downloads in progress
gAppUpdater.aus.pauseDownload();
// App updater will look at app.update.desiredChannel for new channel value
// and will clear it when the update is complete.
gAppUpdater.isChecking = true;
gAppUpdater.checker.checkForUpdates(gAppUpdater.updateCheckListener, true);
this.hide();
},
show: function() {
document.getElementById("contentDeck").selectedPanel =
document.getElementById("channelSelector");
},
hide: function() {
document.getElementById("contentDeck").selectedPanel =
document.getElementById("detailsBox");
},
setChannelLabel: function(aValue) {
let channelLabel = document.getElementById("currentChannel");
channelLabel.value = document.getElementById(aValue + "Menuitem").label;
},
setChannelMenuitem: function(aValue) {
document.getElementById("channelMenulist").selectedItem =
document.getElementById(aValue + "Menuitem");
}
}

View File

@ -80,85 +80,50 @@
<label id="distribution" class="text-blurb"/>
<label id="distributionId" class="text-blurb"/>
<!-- Make sure the selectedIndex attribute is always set so that the CSS
selectors for transitions work -->
<deck id="contentDeck" selectedIndex="0">
<vbox id="detailsBox" aria-describedby="communityDesc contributeDesc">
<vbox id="updateBox">
<vbox id="detailsBox" aria-describedby="communityDesc contributeDesc">
<vbox id="updateBox">
#ifdef MOZ_UPDATER
<deck id="updateDeck" orient="vertical">
<hbox id="updateButtonBox" align="center">
<button id="updateButton" align="start"
oncommand="gAppUpdater.buttonOnCommand();"/>
<spacer flex="1"/>
</hbox>
<hbox id="checkingForUpdates" align="center">
<image class="update-throbber"/><label>&update.checkingForUpdates;</label>
</hbox>
<hbox id="checkingAddonCompat" align="center">
<image class="update-throbber"/><label>&update.checkingAddonCompat;</label>
</hbox>
<hbox id="downloading" align="center">
<image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
</hbox>
<hbox id="downloadFailed" align="center">
<label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
</hbox>
<hbox id="adminDisabled" align="center">
<label>&update.adminDisabled;</label>
</hbox>
<hbox id="noUpdatesFound" align="center">
<label>&update.noUpdatesFound;</label>
</hbox>
<hbox id="manualUpdate" align="center">
<label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
</hbox>
</deck>
#endif
</vbox>
<description class="text-blurb" id="currentChannelText" hidden="true">
&channel.description.start;<label id="currentChannel"/>&channel.description.end;<label id="channelChangeLink" class="text-link" onclick="gChannelSelector.show();">&channel.change;</label>
</description>
<description class="text-blurb" id="communityDesc">
&community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" href="about:credits">&community.creditsLink;</label>&community.end2;
</description>
<description class="text-blurb" id="contributeDesc">
&contribute.start;<label class="text-link" href="http://www.mozilla.org/contribute/">&contribute.getInvolvedLink;</label>&contribute.end;
</description>
</vbox>
<vbox id="channelSelector">
<hbox pack="start" align="center">
<label id="channelSelectorStart">&channel.selector.start;</label>
<menulist id="channelMenulist" onselect="gChannelSelector.selectChannel(this.selectedItem);" aria-labelledby="channelSelectorStart channelMenulist channelSelectorEnd">
<menupopup>
<menuitem id="releaseMenuitem" label="Release" value="release"/>
<menuitem id="betaMenuitem" label="Beta" value="beta"/>
<menuseparator/>
<menuitem id="auroraMenuitem" label="Aurora" value="aurora"/>
</menupopup>
</menulist>
<label id="channelSelectorEnd">&channel.selector.end;</label>
</hbox>
<deck id="channelDescriptionDeck" selectedIndex="0">
<description id="releaseDescription" class="channel-description">&channel.release.description;</description>
<description id="betaDescription" class="channel-description">&channel.beta.description;</description>
<description id="auroraDescription" class="channel-description">&channel.aurora.description;</description>
<deck id="updateDeck" orient="vertical">
<hbox id="updateButtonBox" align="center">
<button id="updateButton" align="start"
oncommand="gAppUpdater.buttonOnCommand();"/>
<spacer flex="1"/>
</hbox>
<hbox id="checkingForUpdates" align="center">
<image class="update-throbber"/><label>&update.checkingForUpdates;</label>
</hbox>
<hbox id="checkingAddonCompat" align="center">
<image class="update-throbber"/><label>&update.checkingAddonCompat;</label>
</hbox>
<hbox id="downloading" align="center">
<image class="update-throbber"/><label>&update.downloading.start;</label><label id="downloadStatus"/><label>&update.downloading.end;</label>
</hbox>
<hbox id="downloadFailed" align="center">
<label>&update.failed.start;</label><label id="failedLink" class="text-link">&update.failed.linkText;</label><label>&update.failed.end;</label>
</hbox>
<hbox id="adminDisabled" align="center">
<label>&update.adminDisabled;</label>
</hbox>
<hbox id="noUpdatesFound" align="center">
<label>&update.noUpdatesFound;</label>
</hbox>
<hbox id="manualUpdate" align="center">
<label>&update.manual.start;</label><label id="manualLink" class="text-link"/><label>&update.manual.end;</label>
</hbox>
</deck>
<hbox id="channelSelectorButtons" pack="end">
#ifdef XP_UNIX
<button oncommand="gChannelSelector.cancel();" label="&channel.selector.cancelButton;"/>
<button oncommand="gChannelSelector.apply();" label="&channel.selector.applyButton;"/>
#else
<button oncommand="gChannelSelector.apply();" label="&channel.selector.applyButton;"/>
<button oncommand="gChannelSelector.cancel();" label="&channel.selector.cancelButton;"/>
#endif
</hbox>
</vbox>
</deck>
<description class="text-blurb" id="currentChannelText">
&channel.description.start;<label id="currentChannel"/>&channel.description.end;
</description>
<description class="text-blurb" id="communityDesc">
&community.start2;<label class="text-link" href="http://www.mozilla.org/">&community.mozillaLink;</label>&community.middle2;<label class="text-link" href="about:credits">&community.creditsLink;</label>&community.end2;
</description>
<description class="text-blurb" id="contributeDesc">
&contribute.start;<label class="text-link" href="http://www.mozilla.org/contribute/">&contribute.getInvolvedLink;</label>&contribute.end;
</description>
</vbox>
</vbox>
</hbox>
<vbox id="bottomBox">

View File

@ -191,7 +191,7 @@
<broadcaster id="isFrameImage"/>
<broadcaster id="singleFeedMenuitemState" disabled="true"/>
<broadcaster id="multipleFeedsMenuState" hidden="true"/>
<broadcaster id="tabviewGroupsNumber" groups="0"/>
<broadcaster id="tabviewGroupsNumber" groups="1"/>
#ifdef MOZ_SERVICES_SYNC
<broadcaster id="sync-setup-state"/>
<broadcaster id="sync-syncnow-state"/>

View File

@ -105,7 +105,7 @@ let TabView = {
data = sessionstore.getWindowValue(window, this.GROUPS_IDENTIFIER);
if (data) {
let parsedData = JSON.parse(data);
this.updateGroupNumberBroadcaster(parsedData.totalNumber || 0);
this.updateGroupNumberBroadcaster(parsedData.totalNumber || 1);
}
} catch (e) { }

View File

@ -2257,7 +2257,11 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup)
}
}
function getShortcutOrURI(aURL, aPostDataRef) {
function getShortcutOrURI(aURL, aPostDataRef, aMayInheritPrincipal) {
// Initialize outparam to false
if (aMayInheritPrincipal)
aMayInheritPrincipal.value = false;
var shortcutURL = null;
var keyword = aURL;
var param = "";
@ -2329,6 +2333,11 @@ function getShortcutOrURI(aURL, aPostDataRef) {
return aURL;
}
// This URL came from a bookmark, so it's safe to let it inherit the current
// document's principal.
if (aMayInheritPrincipal)
aMayInheritPrincipal.value = true;
return shortcutURL;
}
@ -2873,7 +2882,7 @@ var PrintPreviewListener = {
this._printPreviewTab = null;
},
_toggleAffectedChrome: function () {
gNavToolbox.hidden = gInPrintPreviewMode;
gNavToolbox.collapsed = gInPrintPreviewMode;
if (gInPrintPreviewMode)
this._hideChrome();

View File

@ -1334,9 +1334,9 @@
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
try {
b.loadURIWithFlags(aURI, flags, aReferrerURI, aCharset, aPostData);
} catch (ex) {
Cu.reportError(ex);
}
catch (ex) { }
}
// We start our browsers out as inactive, and then maintain

View File

@ -608,7 +608,7 @@ iQClass.prototype = {
});
this.css({
'-moz-transition-property': 'all', // TODO: just animate the properties we're changing
'-moz-transition-property': Object.keys(css).join(", "),
'-moz-transition-duration': (duration / 1000) + 's',
'-moz-transition-timing-function': easing
});

View File

@ -210,7 +210,7 @@ TabMatcher.prototype = {
_filterForUnmatches: function TabMatcher__filterForUnmatches(tabs) {
var self = this;
return tabs.filter(function(tab) {
var name = tab.$tabTitle[0].innerHTML;
let name = tab.$tabTitle[0].textContent;
let url = TabUtils.URLOf(tab);
return !name.match(self.term, "i") && !url.match(self.term, "i");
});
@ -230,17 +230,8 @@ TabMatcher.prototype = {
while (enumerator.hasMoreElements()) {
var win = enumerator.getNext();
// This function gets tabs from other windows, not from the current window
if (win != gWindow) {
// If TabView is around iterate over all tabs, else get the currently
// shown tabs...
let tvWindow = win.TabView.getContentWindow();
if (tvWindow)
allTabs = allTabs.concat(tvWindow.TabItems.getItems());
else
// win.gBrowser.tabs isn't a proper array, so we can't use concat
for (let i = 0; i < win.gBrowser.tabs.length; i++)
allTabs.push(win.gBrowser.tabs[i]);
}
if (win != gWindow)
allTabs.push.apply(allTabs, win.gBrowser.tabs);
}
return allTabs;
},

View File

@ -999,7 +999,7 @@ let UI = {
"redo",
#endif
#ifdef XP_MACOSX
"preferencesCmdMac", "minimizeWindow",
"preferencesCmdMac", "minimizeWindow", "hideThisAppCmdMac",
#endif
"newNavigator", "newNavigatorTab", "undo", "cut", "copy", "paste",
"selectAll", "find"
@ -1043,6 +1043,10 @@ let UI = {
Keys.meta = true;
function processBrowserKeys(evt) {
// let any keys with alt to pass through
if (evt.altKey)
return;
#ifdef XP_MACOSX
if (evt.metaKey) {
#else
@ -1077,6 +1081,7 @@ let UI = {
#ifdef XP_MACOSX
case self._browserKeys.preferencesCmdMac:
case self._browserKeys.minimizeWindow:
case self._browserKeys.hideThisAppCmdMac:
#endif
case self._browserKeys.newNavigator:
case self._browserKeys.newNavigatorTab:

View File

@ -173,6 +173,7 @@ _BROWSER_FILES = \
browser_bug647886.js \
browser_bug655584.js \
browser_findbarClose.js \
browser_keywordBookmarklets.js \
browser_contextSearchTabPosition.js \
browser_ctrlTab.js \
browser_customize_popupNotification.js \

View File

@ -61,6 +61,7 @@ function nextAsyncText(tab) {
var gotCloseEvent = false;
tab.addEventListener("TabClose", function () {
tab.removeEventListener("TabClose", arguments.callee, false);
info("got TabClose event");
gotCloseEvent = true;

View File

@ -52,9 +52,9 @@ function test() {
tabToDetach.linkedBrowser.contentDocument != event.target)
return;
if (!newWindow) {
gBrowser.removeEventListener("pageshow", onPageShow, false);
event.currentTarget.removeEventListener("pageshow", onPageShow, false);
if (!newWindow) {
// prepare the tab (set icon and busy state)
// we have to set these only after onState* notification, otherwise
// they're overriden
@ -65,12 +65,10 @@ function test() {
// detach and set the listener on the new window
newWindow = gBrowser.replaceTabWithWindow(tabToDetach);
// wait for gBrowser to come along
function onLoad(event) {
newWindow.gBrowser
.addEventListener("pageshow", onPageShow, false);
newWindow.addEventListener("load", function () {
newWindow.removeEventListener("load", arguments.callee, false);
}
newWindow.addEventListener("load", onLoad, false);
newWindow.gBrowser.addEventListener("pageshow", onPageShow, false);
}, false);
}, 0);
return;
}

View File

@ -9,14 +9,18 @@ function test() {
win.content.addEventListener("focus", function () {
win.content.removeEventListener("focus", arguments.callee, false);
win.gBrowser.selectedTab.addEventListener("TabClose", function () {
function onTabClose() {
ok(false, "shouldn't have gotten the TabClose event for the last tab");
}, false);
}
var tab = win.gBrowser.selectedTab;
tab.addEventListener("TabClose", onTabClose, false);
EventUtils.synthesizeKey("w", { accelKey: true }, win);
ok(win.closed, "accel+w closed the window immediately");
tab.removeEventListener("TabClose", onTabClose, false);
finish();
}, false);
}, false);

View File

@ -13,6 +13,7 @@ function test() {
var pageInfo = BrowserPageInfo(doc, "mediaTab", testImg);
pageInfo.addEventListener("load", function () {
pageInfo.removeEventListener("load", arguments.callee, true);
pageInfo.onFinished.push(function () {
executeSoon(function () {
var pageInfoImg = pageInfo.document.getElementById("thepreviewimage");

View File

@ -5,7 +5,9 @@ function test() {
let tab = gBrowser.addTab(testPath + "file_bug550565_popup.html");
tab.linkedBrowser.addEventListener('DOMContentLoaded', function() {
tab.linkedBrowser.addEventListener("DOMContentLoaded", function() {
tab.linkedBrowser.removeEventListener("DOMContentLoaded", arguments.callee, true);
let expectedIcon = testPath + "file_bug550565_favicon.ico";
is(gBrowser.getIcon(tab), expectedIcon, "Correct icon before pushState.");

View File

@ -16,8 +16,11 @@ function test() {
waitForExplicitFinish();
gBrowser.selectedBrowser.addEventListener("load", function () {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
is(gBrowser.userTypedValue, null, "userTypedValue is null as the page has loaded");
is(gURLBar.value, URI, "location bar value matches test URI as the page has loaded");
gBrowser.removeCurrentTab();
finish();
}, true);

View File

@ -20,8 +20,11 @@ function test() {
var tab = gBrowser.addTab("http://mochi.test:8888/");
var browser = gBrowser.getBrowserForTab(tab);
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);
gBrowser.removeTab(tab);
ok(isUndoCloseEnabled(), "Undo Close Tab should be enabled.");
finish();
}, true);
}

View File

@ -44,6 +44,7 @@ function test() {
// Verify that about:addons loads
waitForExplicitFinish();
gBrowser.selectedBrowser.addEventListener("load", function() {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
let browser = blanktab.linkedBrowser;
is(browser.currentURI.spec, "about:addons", "about:addons should load into blank tab.");
gBrowser.removeTab(blanktab);

View File

@ -27,10 +27,12 @@ function checkAnimationState() {
info("tab didn't close immediately, so the tab opening animation must have started moving");
info("waiting for the tab to close asynchronously");
tab.addEventListener("transitionend", function (event) {
if (event.propertyName == "max-width")
if (event.propertyName == "max-width") {
tab.removeEventListener("transitionend", arguments.callee, false);
executeSoon(function () {
ok(!tab.parentNode, "tab removed asynchronously");
finish();
});
}
}, false);
}

View File

@ -43,6 +43,8 @@ function test() {
Services.prefs.setBoolPref(backgroundPref, true);
function mainPart() {
newTab.linkedBrowser.removeEventListener("load", mainPart, true);
gBrowser.pinTab(newTab);
gBrowser.selectedTab = newTab;

View File

@ -5,16 +5,22 @@ function test() {
var gotTabAttrModified = false;
var gotTabClose = false;
tab.addEventListener("TabClose", function () {
function onTabClose() {
gotTabClose = true;
tab.addEventListener("TabAttrModified", onTabAttrModified, false);
}
tab.addEventListener("TabAttrModified", function () {
gotTabAttrModified = true;
}, false);
}, false);
function onTabAttrModified() {
gotTabAttrModified = true;
}
tab.addEventListener("TabClose", onTabClose, false);
gBrowser.removeTab(tab);
ok(gotTabClose, "should have got the TabClose event");
ok(!gotTabAttrModified, "shouldn't have got the TabAttrModified event after TabClose");
tab.removeEventListener("TabClose", onTabClose, false);
tab.removeEventListener("TabAttrModified", onTabAttrModified, false);
}

View File

@ -8,6 +8,7 @@ function test() {
ok(true, "duplicateTabIn opened a new window");
aSubject.addEventListener("load", function () {
aSubject.removeEventListener("load", arguments.callee, false);
executeSoon(function () {
aSubject.close();
finish();

View File

@ -10,6 +10,8 @@ function test() {
newWin.close();
});
newWin.addEventListener("load", function test_win_onLoad() {
newWin.removeEventListener("load", test_win_onLoad, false);
// Remove the URL bar
newWin.gURLBar.parentNode.removeChild(newWin.gURLBar);

View File

@ -11,9 +11,10 @@ function getPostDataString(aIS) {
return dataLines[dataLines.length-1];
}
function keywordResult(aURL, aPostData) {
function keywordResult(aURL, aPostData, aIsUnsafe) {
this.url = aURL;
this.postData = aPostData;
this.isUnsafe = aIsUnsafe;
}
function keyWordData() {}
@ -52,20 +53,20 @@ var testData = [
new keywordResult("http://bmget-nosearch/", null)],
[new searchKeywordData("searchget", "http://searchget/?search={searchTerms}", null, "foo4"),
new keywordResult("http://searchget/?search=foo4", null)],
new keywordResult("http://searchget/?search=foo4", null, true)],
[new searchKeywordData("searchpost", "http://searchpost/", "search={searchTerms}", "foo5"),
new keywordResult("http://searchpost/", "search=foo5")],
new keywordResult("http://searchpost/", "search=foo5", true)],
[new searchKeywordData("searchpostget", "http://searchpostget/?search1={searchTerms}", "search2={searchTerms}", "foo6"),
new keywordResult("http://searchpostget/?search1=foo6", "search2=foo6")],
new keywordResult("http://searchpostget/?search1=foo6", "search2=foo6", true)],
// Bookmark keywords that don't take parameters should not be activated if a
// parameter is passed (bug 420328).
[new bmKeywordData("bmget-noparam", "http://bmget-noparam/", null, "foo7"),
new keywordResult(null, null)],
new keywordResult(null, null, true)],
[new bmKeywordData("bmpost-noparam", "http://bmpost-noparam/", "not_a=param", "foo8"),
new keywordResult(null, null)],
new keywordResult(null, null, true)],
// Test escaping (%s = escaped, %S = raw)
// UTF-8 default
@ -82,6 +83,12 @@ var testData = [
// Explicitly-defined ISO-8859-1
[new bmKeywordData("bmget-escaping2", "http://bmget/?esc=%s&raw=%S&mozcharset=ISO-8859-1", null, "+/@"),
new keywordResult("http://bmget/?esc=%2B%2F%40&raw=+/@", null)],
// Test using a non-bmKeywordData object, to test the behavior of
// getShortcutOrURI for non-keywords (setupKeywords only adds keywords for
// bmKeywordData objects)
[{keyword: "http://gavinsharp.com"},
new keywordResult(null, null, true)]
];
function test() {
@ -94,12 +101,14 @@ function test() {
var query = data.keyword;
if (data.searchWord)
query += " " + data.searchWord;
var url = getShortcutOrURI(query, postData);
var mayInheritPrincipal = {};
var url = getShortcutOrURI(query, postData, mayInheritPrincipal);
// null result.url means we should expect the same query we sent in
var expected = result.url || query;
is(url, expected, "got correct URL for " + data.keyword);
is(getPostDataString(postData.value), result.postData, "got correct postData for " + data.keyword);
is(mayInheritPrincipal.value, !result.isUnsafe, "got correct mayInheritPrincipal for " + data.keyword);
}
cleanupKeywords();

View File

@ -0,0 +1,38 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
let bmFolder = Application.bookmarks.menu.addFolder("keyword-test");
let tab = gBrowser.selectedTab = gBrowser.addTab();
registerCleanupFunction (function () {
bmFolder.remove();
gBrowser.removeTab(tab);
});
let bm = bmFolder.addBookmark("bookmarklet", makeURI("javascript:1;"));
bm.keyword = "bm";
addPageShowListener(function () {
let originalPrincipal = gBrowser.contentPrincipal;
// Enter bookmarklet keyword in the URL bar
gURLBar.value = "bm";
gURLBar.focus();
EventUtils.synthesizeKey("VK_RETURN", {});
addPageShowListener(function () {
ok(gBrowser.contentPrincipal.equals(originalPrincipal), "javascript bookmarklet should inherit principal");
finish();
});
});
}
function addPageShowListener(func) {
gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
func();
});
}

View File

@ -3,7 +3,10 @@ function test() {
var tab = gBrowser.addTab();
gBrowser.selectedTab = tab;
tab.linkedBrowser.addEventListener("load", checkPageStyleMenu, true);
tab.linkedBrowser.addEventListener("load", function () {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
checkPageStyleMenu();
}, true);
let rootDir = getRootDirectory(gTestPath);
content.location = rootDir + "page_style_sample.html";
}

View File

@ -24,6 +24,9 @@ function test() {
if (++loadCount != 2)
return;
browser1.removeEventListener("load", check, true);
browser2.removeEventListener("load", check, true);
window.focus();
_browser_tabfocus_test_lastfocus = gURLBar;
@ -139,8 +142,8 @@ function test() {
EventUtils.synthesizeKey("VK_F6", { });
is(fm.focusedWindow, window, "switch document forward again with f6 when browser non-focusable");
window.addEventListener("focus", _browser_tabfocus_test_eventOccured, true);
window.addEventListener("blur", _browser_tabfocus_test_eventOccured, true);
window.removeEventListener("focus", _browser_tabfocus_test_eventOccured, true);
window.removeEventListener("blur", _browser_tabfocus_test_eventOccured, true);
// next, check whether navigating forward, focusing the urlbar and then
// navigating back maintains the focus in the urlbar.
@ -186,6 +189,7 @@ function _browser_tabfocus_navigation_test_eventOccured(event)
setTimeout(function () contentwin.history.back(), 0);
}
else if (contentwin.location.toString().indexOf("2") > 0) {
event.currentTarget.removeEventListener("pageshow", _browser_tabfocus_navigation_test_eventOccured, true);
is(window.document.activeElement, gURLBar.inputField, "urlbar still focused after navigating back");
gBrowser.removeCurrentTab();
gBrowser.removeCurrentTab();

View File

@ -42,6 +42,7 @@ function test() {
testWindow = OpenBrowserWindow();
testWindow.addEventListener("load", function() {
testWindow.removeEventListener("load", arguments.callee, false);
ok(true, "Load listener called");
executeSoon(function() {

View File

@ -18,12 +18,27 @@ function test() {
waitForExplicitFinish();
ok(gFindBar.hidden, "Find bar should not be visible");
run_test_1();
nextTest();
}
function run_test_1() {
load("about:config", function() {
let urls = [
"about:config",
"about:addons",
"about:permissions"
];
function nextTest() {
let url = urls.shift();
if (url) {
testFindDisabled(url, nextTest);
} else {
// Make sure the find bar is re-enabled after disabled page is closed.
testFindEnabled("about:blank", finish);
}
}
function testFindDisabled(url, cb) {
load(url, function() {
ok(gFindBar.hidden, "Find bar should not be visible");
EventUtils.synthesizeKey("/", {}, gTab.linkedBrowser.contentWindow);
ok(gFindBar.hidden, "Find bar should not be visible");
@ -33,31 +48,16 @@ function run_test_1() {
"Find command should be disabled");
gBrowser.removeTab(gTab);
run_test_2();
cb();
});
}
function run_test_2() {
load("about:addons", function() {
ok(gFindBar.hidden, "Find bar should not be visible");
EventUtils.synthesizeKey("/", {}, gTab.linkedBrowser.contentWindow);
ok(gFindBar.hidden, "Find bar should not be visible");
EventUtils.synthesizeKey("f", { accelKey: true });
ok(gFindBar.hidden, "Find bar should not be visible");
ok(document.getElementById("cmd_find").getAttribute("disabled"),
"Find command should be disabled");
gBrowser.removeTab(gTab);
run_test_3();
});
}
function run_test_3() {
load("about:blank", function() {
function testFindEnabled(url, cb) {
load(url, function() {
ok(!document.getElementById("cmd_find").getAttribute("disabled"),
"Find command should not be disabled");
gBrowser.removeTab(gTab);
finish();
cb();
});
}
}

View File

@ -144,6 +144,7 @@ _BROWSER_FILES = \
browser_tabview_bug651311.js \
browser_tabview_bug654941.js \
browser_tabview_bug656778.js \
browser_tabview_bug656913.js \
browser_tabview_dragdrop.js \
browser_tabview_exit_button.js \
browser_tabview_expander.js \

View File

@ -82,6 +82,8 @@ function zoomInAndOut(transitionsExpected, callback) {
ok(transitioned >= 0, "There can be transitions");
else
ok(!transitioned, "There should have been no transitions");
contentWindow.document.removeEventListener("transitionend", onTransitionEnd, false);
callback();
};

View File

@ -11,9 +11,11 @@ function test() {
let groupItem = cw.GroupItems.groupItems[0];
groupItem.setBounds(new cw.Rect(cw.innerWidth - 200, 0, 200, 200));
whenTabViewIsHidden(finish, win);
whenTabViewIsHidden(function () waitForFocus(finish), win);
let button = cw.document.getElementById("exit-button");
EventUtils.synthesizeMouseAtCenter(button, {}, cw);
waitForFocus(function () {
let button = cw.document.getElementById("exit-button");
EventUtils.synthesizeMouseAtCenter(button, {}, cw);
}, cw);
});
}

View File

@ -26,11 +26,27 @@ let state = {
function test() {
waitForExplicitFinish();
testOne();
}
function testOne() {
newWindowWithTabView(
function(win) {
testTwo();
win.close();
},
function(win) {
registerCleanupFunction(function() win.close());
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
"1", "There is one group");
});
}
function testTwo() {
newWindowWithState(state, function(win) {
registerCleanupFunction(function() win.close());
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
"2", "There are two groups");
waitForFocus(finish);
});

View File

@ -0,0 +1,45 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
// ----------
function test() {
waitForExplicitFinish();
let urlBase = "http://mochi.test:8888/browser/browser/base/content/test/tabview/";
let newTab = gBrowser.addTab(urlBase + "search1.html");
registerCleanupFunction(function() {
if (gBrowser.tabs[1])
gBrowser.removeTab(gBrowser.tabs[1]);
TabView.hide();
});
afterAllTabsLoaded(function() {
showTabView(function() {
hideTabView(function() {
newTab.linkedBrowser.loadURI(urlBase + "dummy_page.html");
newWindowWithTabView(function(win) {
registerCleanupFunction(function() win.close());
let contentWindow = win.TabView.getContentWindow();
EventUtils.synthesizeKey("d", { }, contentWindow);
EventUtils.synthesizeKey("u", { }, contentWindow);
EventUtils.synthesizeKey("m", { }, contentWindow);
let resultsElement = contentWindow.document.getElementById("results");
let childElements = resultsElement.childNodes;
is(childElements.length, 1, "There is one result element");
is(childElements[0].childNodes[1].textContent,
"This is a dummy test page",
"The label matches the title of dummy page");
finish();
});
});
});
});
}

View File

@ -9,11 +9,13 @@ function test() {
let windowTwo;
windowOne.addEventListener("load", function() {
windowOne.removeEventListener("load", arguments.callee, false);
windowOne.gBrowser.selectedBrowser.addEventListener("load", function() {
windowOne.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
windowTwo = openDialog(location, "", "chrome,all,dialog=no", "http://mochi.test:8888/");
windowTwo.addEventListener("load", function() {
windowTwo.removeEventListener("load", arguments.callee, false);
windowTwo.gBrowser.selectedBrowser.addEventListener("load", function() {
windowTwo.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
@ -145,4 +147,4 @@ function whenWindowObservesOnce(win, topic, func) {
}
}
windowWatcher.registerNotification(windowObserver);
}
}

View File

@ -260,6 +260,7 @@
return; // Do nothing for right clicks
var url = this.value;
var mayInheritPrincipal = false;
var postData = null;
var action = this._parseActionUrl(url);
@ -277,7 +278,7 @@
}
}
else {
[url, postData] = this._canonizeURL(aTriggeringEvent);
[url, postData, mayInheritPrincipal] = this._canonizeURL(aTriggeringEvent);
if (!url)
return;
}
@ -293,10 +294,13 @@
}
function loadCurrent() {
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
// Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from
// inheriting the currently loaded document's principal.
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
// inheriting the currently loaded document's principal, unless this
// URL is marked as safe to inherit (e.g. came from a bookmark
// keyword).
if (!mayInheritPrincipal)
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
gBrowser.loadURIWithFlags(url, flags, null, null, postData);
}
@ -339,7 +343,7 @@
<body><![CDATA[
var url = this.value;
if (!url)
return ["", null];
return ["", null, false];
// Only add the suffix when the URL bar value isn't already "URL-like",
// and only if we get a keyboard event, to match user expectations.
@ -402,9 +406,10 @@
}
var postData = {};
url = getShortcutOrURI(url, postData);
var mayInheritPrincipal = { value: false };
url = getShortcutOrURI(url, postData, mayInheritPrincipal);
return [url, postData.value];
return [url, postData.value, mayInheritPrincipal.value];
]]></body>
</method>

View File

@ -6,6 +6,5 @@ browser.jar:
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon128.png (../mozicon128.png)
content/branding/icon16.png (../default16.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -6,6 +6,5 @@ browser.jar:
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon128.png (../mozicon128.png)
content/branding/icon16.png (../default16.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -5,6 +5,5 @@ browser.jar:
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon128.png (../mozicon128.png)
content/branding/icon16.png (../default16.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -6,6 +6,5 @@ browser.jar:
content/branding/about-wordmark.png (about-wordmark.png)
content/branding/icon48.png (icon48.png)
content/branding/icon64.png (icon64.png)
content/branding/icon128.png (../mozicon128.png)
content/branding/icon16.png (../default16.png)
content/branding/aboutDialog.css (aboutDialog.css)

View File

@ -145,6 +145,15 @@ Site.prototype = {
* @return A boolean indicating whether or not a permission is set.
*/
getPermission: function Site_getPermission(aType, aResultObj) {
// Password saving isn't a nsIPermissionManager permission type, so handle
// it seperately.
if (aType == "password") {
aResultObj.value = this.loginSavingEnabled ?
Ci.nsIPermissionManager.ALLOW_ACTION :
Ci.nsIPermissionManager.DENY_ACTION;
return true;
}
let permissionValue;
if (TEST_EXACT_PERM_TYPES.indexOf(aType) == -1) {
permissionValue = Services.perms.testPermission(this.httpURI, aType);
@ -167,6 +176,13 @@ Site.prototype = {
* be one of the constants defined in nsIPermissionManager.
*/
setPermission: function Site_setPermission(aType, aPerm) {
// Password saving isn't a nsIPermissionManager permission type, so handle
// it seperately.
if (aType == "password") {
this.loginSavingEnabled = aPerm == Ci.nsIPermissionManager.ALLOW_ACTION;
return;
}
// Using httpURI is kind of bogus, but the permission manager stores the
// permission for the host, so the right thing happens in the end.
Services.perms.add(this.httpURI, aType, aPerm);
@ -463,11 +479,13 @@ let AboutPermissions = {
gSitesStmt.params.limit = this.PLACES_SITES_LIMIT;
gSitesStmt.executeAsync({
handleResult: function(aResults) {
AboutPermissions.startSitesListBatch();
let row;
while (row = aResults.getNextRow()) {
let host = row.getResultByName("host");
AboutPermissions.addHost(host);
}
AboutPermissions.endSitesListBatch();
},
handleError: function(aError) {
Cu.reportError("AboutPermissions: " + aError);
@ -484,6 +502,8 @@ let AboutPermissions = {
* them if they are not already stored in _sites.
*/
enumerateServices: function() {
this.startSitesListBatch();
let logins = Services.logins.getAllLogins();
logins.forEach(function(aLogin) {
try {
@ -515,6 +535,8 @@ let AboutPermissions = {
}
}
}
this.endSitesListBatch();
},
/**
@ -548,7 +570,19 @@ let AboutPermissions = {
});
aSite.listitem = item;
this.sitesList.appendChild(item);
(this._listFragment || this.sitesList).appendChild(item);
},
startSitesListBatch: function () {
if (!this._listFragment)
this._listFragment = document.createDocumentFragment();
},
endSitesListBatch: function () {
if (this._listFragment) {
this.sitesList.appendChild(this._listFragment);
this._listFragment = null;
}
},
/**
@ -656,25 +690,14 @@ let AboutPermissions = {
*/
updatePermission: function(aType) {
let allowItem = document.getElementById(aType + "-" + PermissionDefaults.ALLOW);
if (!this._selectedSite &&
this._noGlobalAllow.indexOf(aType) != -1) {
allowItem.hidden = true;
return;
}
allowItem.hidden = false;
allowItem.hidden = !this._selectedSite &&
this._noGlobalAllow.indexOf(aType) != -1;
let permissionMenulist = document.getElementById(aType + "-menulist");
let permissionValue;
if (!this._selectedSite) {
// If there is no selected site, we are updating the default permissions interface.
permissionValue = PermissionDefaults[aType];
} else if (aType == "password") {
// Services.logins.getLoginSavingEnabled already looks at the default
// permission, so we don't need to.
permissionValue = this._selectedSite.loginSavingEnabled ?
PermissionDefaults.ALLOW : PermissionDefaults.DENY;
} else {
let result = {};
permissionValue = this._selectedSite.getPermission(aType, result) ?
@ -691,9 +714,6 @@ let AboutPermissions = {
if (!this._selectedSite) {
// If there is no selected site, we are setting the default permission.
PermissionDefaults[permissionType] = permissionValue;
} else if (permissionType == "password") {
let isEnabled = permissionValue == PermissionDefaults.ALLOW;
this._selectedSite.loginSavingEnabled = isEnabled;
} else {
this._selectedSite.setPermission(permissionType, permissionValue);
}

View File

@ -52,6 +52,7 @@
id="permissions-page" title="&permissionsManager.title;"
onload="AboutPermissions.init();"
onunload="AboutPermissions.cleanUp();"
disablefastfind="true"
role="application">
<script type="application/javascript"
@ -163,7 +164,7 @@
</menupopup>
</menulist>
<button id="cookies-clear-all-button"
label="&cookie.clearAll;"
label="&cookie.removeAll;"
oncommand="Services.cookies.removeAll();"/>
<button id="cookies-manage-all-button"
label="&cookie.manage;"
@ -172,7 +173,7 @@
<hbox id="cookies-count" align="center">
<label id="cookies-label"/>
<button id="cookies-clear-button"
label="&cookie.clear;"
label="&cookie.remove;"
oncommand="AboutPermissions.clearCookies();"/>
<button id="cookies-manage-button"
label="&cookie.manage;"

View File

@ -187,8 +187,8 @@
<vbox id="historyCustomPane">
<separator class="thin"/>
<checkbox id="privateBrowsingAutoStart" class="indent"
label="&privateBrowsingPermanent.label;"
accesskey="&privateBrowsingPermanent.accesskey;"
label="&privateBrowsingPermanent2.label;"
accesskey="&privateBrowsingPermanent2.accesskey;"
preference="browser.privatebrowsing.autostart"/>
<vbox class="indent">

View File

@ -25,6 +25,11 @@ const TEST_PERMS = {
"popup": PERM_DENY
};
const NO_GLOBAL_ALLOW = [
"geo",
"indexedDB"
];
// number of managed permissions in the interface
const TEST_PERMS_COUNT = 5;
@ -143,6 +148,12 @@ var tests = [
ok(gBrowser.contentDocument.getElementById("cookies-count").hidden,
"cookies count is hidden");
// Test to make sure "Allow" items hidden for certain permission types
NO_GLOBAL_ALLOW.forEach(function(aType) {
let menuitem = gBrowser.contentDocument.getElementById(aType + "-" + PERM_ALLOW);
ok(menuitem.hidden, aType + " allow menuitem hidden for all sites");
});
runNextTest();
},
@ -195,6 +206,12 @@ var tests = [
ok(!gBrowser.contentDocument.getElementById("cookies-count").hidden,
"cookies count is not hidden");
// Test to make sure "Allow" items are *not* hidden for certain permission types
NO_GLOBAL_ALLOW.forEach(function(aType) {
let menuitem = gBrowser.contentDocument.getElementById(aType + "-" + PERM_ALLOW);
ok(!menuitem.hidden, aType + " allow menuitem not hidden for single site");
});
runNextTest();
},

View File

@ -63,6 +63,7 @@ function test() {
prefetchCert: true,
};
function testCheckbox() {
win.removeEventListener("load", testCheckbox, false);
Services.obs.addObserver(function (aSubject, aTopic, aData) {
Services.obs.removeObserver(arguments.callee, "cert-exception-ui-ready", false);
ok(win.gCert, "The certificate information should be available now");
@ -88,6 +89,7 @@ function test() {
prefetchCert: true,
};
function testCheckbox() {
win.removeEventListener("load", testCheckbox, false);
Services.obs.addObserver(function (aSubject, aTopic, aData) {
Services.obs.removeObserver(arguments.callee, "cert-exception-ui-ready", false);
ok(win.gCert, "The certificate information should be available now");

View File

@ -52,6 +52,7 @@ function test() {
let pageInfo1 = BrowserPageInfo();
pageInfo1.addEventListener("load", function () {
pageInfo1.removeEventListener("load", arguments.callee, false);
let tab2 = gBrowser.addTab();
gBrowser.selectedTab = tab2;
@ -61,8 +62,10 @@ function test() {
let pageInfo2 = BrowserPageInfo();
pageInfo2.addEventListener("load", function () {
pageInfo2.removeEventListener("load", arguments.callee, false);
pageInfo1.addEventListener("unload", function () {
pageInfo1.removeEventListener("unload", arguments.callee, false);
pageInfo1 = null;
ok(true, "Page info 1 being closed as expected");
if (!pageInfo2)
@ -70,6 +73,7 @@ function test() {
}, false);
pageInfo2.addEventListener("unload", function () {
pageInfo2.removeEventListener("unload", arguments.callee, false);
pageInfo2 = null;
ok(true, "Page info 2 being closed as expected");
if (!pageInfo1)

View File

@ -59,11 +59,14 @@ function test() {
pb.privateBrowsingEnabled = true;
browser = gBrowser.selectedBrowser;
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);
// setTimeout is needed here because the onload handler of about:privatebrowsing sets the focus
setTimeout(function() {
// ensure that the URL bar is focused inside the private browsing mode
is(document.commandDispatcher.focusedElement, gURLBar.inputField,
"URL Bar should be focused inside the private browsing mode");
// ensure that the URL bar is emptied inside the private browsing mode
is(gURLBar.value, "", "URL Bar should be empty inside the private browsing mode");
@ -71,9 +74,12 @@ function test() {
pb.privateBrowsingEnabled = false;
browser = gBrowser.selectedBrowser;
browser.addEventListener("load", function() {
browser.removeEventListener("load", arguments.callee, true);
// ensure that the URL bar is no longer focused after leaving the private browsing mode
isnot(document.commandDispatcher.focusedElement, gURLBar.inputField,
"URL Bar should no longer be focused after leaving the private browsing mode");
// ensure that the URL bar is no longer empty after leaving the private browsing mode
isnot(gURLBar.value, "", "URL Bar should no longer be empty after leaving the private browsing mode");

View File

@ -71,6 +71,8 @@ function test() {
let newWin = openDialog(location, "", "chrome,all,dialog=no", testURL);
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
newWin.gBrowser.selectedBrowser.addEventListener("load", function(aEvent) {
newWin.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
@ -102,6 +104,8 @@ function test() {
let restoredTabs = 0;
let expectedTabs = data.tabs.length;
newWin2.addEventListener("load", function(aEvent) {
newWin2.removeEventListener("load", arguments.callee, false);
newWin2.gBrowser.tabContainer.addEventListener("SSTabRestored", function(aEvent) {
if (++restoredTabs < expectedTabs)
return;
@ -160,6 +164,8 @@ function test() {
let url = "http://window" + windowsToOpen.length + ".example.com";
let win = openDialog(location, "", settings, url);
win.addEventListener("load", function(aEvent) {
win.removeEventListener("load", arguments.callee, false);
win.gBrowser.selectedBrowser.addEventListener("DOMContentLoaded", function(aEvent) {
win.gBrowser.selectedBrowser.removeEventListener("DOMContentLoaded", arguments.callee, true);
// the window _should_ have state with a tab of url, but it doesn't
@ -174,7 +180,7 @@ function test() {
});
});
}, true);
}, true);
}, false);
}
let windowsToOpen = [{isPopup: false},

View File

@ -48,11 +48,11 @@ function browserWindowsCount() {
function test() {
/** Test for Bug 461634 **/
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
// test setup
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
waitForExplicitFinish();
const REMEMBER = Date.now(), FORGET = Math.random();
let test_state = { windows: [{ "tabs": [{ "entries": [] }], _closedTabs: [
{ state: { entries: [{ url: "http://www.example.net/" }] }, title: FORGET },
@ -61,10 +61,10 @@ function test() {
{ state: { entries: [{ url: "http://www.example.net/" }] }, title: REMEMBER },
] }] };
let remember_count = 2;
function countByTitle(aClosedTabList, aTitle)
aClosedTabList.filter(function(aData) aData.title == aTitle).length;
function testForError(aFunction) {
try {
aFunction();
@ -74,14 +74,16 @@ function test() {
return ex.name == "NS_ERROR_ILLEGAL_VALUE";
}
}
// open a window and add the above closed tab list
let newWin = openDialog(location, "", "chrome,all,dialog=no");
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
gPrefService.setIntPref("browser.sessionstore.max_tabs_undo",
test_state.windows[0]._closedTabs.length);
ss.setWindowState(newWin, JSON.stringify(test_state), true);
let closedTabs = JSON.parse(ss.getClosedTabData(newWin));
is(closedTabs.length, test_state.windows[0]._closedTabs.length,
"Closed tab list has the expected length");
@ -90,7 +92,7 @@ function test() {
"The correct amout of tabs are to be forgotten");
is(countByTitle(closedTabs, REMEMBER), remember_count,
"Everything is set up.");
// all of the following calls with illegal arguments should throw NS_ERROR_ILLEGAL_VALUE
ok(testForError(function() ss.forgetClosedTab({}, 0)),
"Invalid window for forgetClosedTab throws");
@ -98,11 +100,11 @@ function test() {
"Invalid tab for forgetClosedTab throws");
ok(testForError(function() ss.forgetClosedTab(newWin, test_state.windows[0]._closedTabs.length + 1)),
"Invalid tab for forgetClosedTab throws");
// Remove third tab, then first tab
ss.forgetClosedTab(newWin, 2);
ss.forgetClosedTab(newWin, null);
closedTabs = JSON.parse(ss.getClosedTabData(newWin));
is(closedTabs.length, remember_count,
"The correct amout of tabs was removed");

View File

@ -47,11 +47,11 @@ function browserWindowsCount() {
function test() {
/** Test for Bug 464199 **/
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
// test setup
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
waitForExplicitFinish();
const REMEMBER = Date.now(), FORGET = Math.random();
let test_state = { windows: [{ "tabs": [{ "entries": [] }], _closedTabs: [
{ state: { entries: [{ url: "http://www.example.net/" }] }, title: FORGET },
@ -79,13 +79,15 @@ function test() {
extData: { "setTabValue": "http://example.net:80" } }, title: REMEMBER }
] }] };
let remember_count = 5;
function countByTitle(aClosedTabList, aTitle)
aClosedTabList.filter(function(aData) aData.title == aTitle).length;
// open a window and add the above closed tab list
let newWin = openDialog(location, "", "chrome,all,dialog=no");
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
gPrefService.setIntPref("browser.sessionstore.max_tabs_undo",
test_state.windows[0]._closedTabs.length);
ss.setWindowState(newWin, JSON.stringify(test_state), true);
@ -98,11 +100,11 @@ function test() {
"The correct amout of tabs are to be forgotten");
is(countByTitle(closedTabs, REMEMBER), remember_count,
"Everything is set up.");
let pb = Cc["@mozilla.org/privatebrowsing;1"].
getService(Ci.nsIPrivateBrowsingService);
pb.removeDataFromDomain("example.net");
closedTabs = JSON.parse(ss.getClosedTabData(newWin));
is(closedTabs.length, remember_count,
"The correct amout of tabs was removed");
@ -110,7 +112,7 @@ function test() {
"All tabs to be forgotten were indeed removed");
is(countByTitle(closedTabs, REMEMBER), remember_count,
"... and tabs to be remembered weren't.");
// clean up
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");

View File

@ -47,42 +47,44 @@ function browserWindowsCount() {
function test() {
/** Test for Bug 465223 **/
is(browserWindowsCount(), 1, "Only one browser window should be open initially");
// test setup
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
waitForExplicitFinish();
let uniqueKey1 = "bug 465223.1";
let uniqueKey2 = "bug 465223.2";
let uniqueValue1 = "unik" + Date.now();
let uniqueValue2 = "pi != " + Math.random();
// open a window and set a value on it
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
ss.setWindowValue(newWin, uniqueKey1, uniqueValue1);
let newState = { windows: [{ tabs:[{ entries: [] }], extData: {} }] };
newState.windows[0].extData[uniqueKey2] = uniqueValue2;
ss.setWindowState(newWin, JSON.stringify(newState), false);
is(newWin.gBrowser.tabs.length, 2,
"original tab wasn't overwritten");
is(ss.getWindowValue(newWin, uniqueKey1), uniqueValue1,
"window value wasn't overwritten when the tabs weren't");
is(ss.getWindowValue(newWin, uniqueKey2), uniqueValue2,
"new window value was correctly added");
newState.windows[0].extData[uniqueKey2] = uniqueValue1;
ss.setWindowState(newWin, JSON.stringify(newState), true);
is(newWin.gBrowser.tabs.length, 1,
"original tabs were overwritten");
is(ss.getWindowValue(newWin, uniqueKey1), "",
"window value was cleared");
is(ss.getWindowValue(newWin, uniqueKey2), uniqueValue1,
"window value was correctly overwritten");
// clean up
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");

View File

@ -57,6 +57,8 @@ function test() {
let newWin = openDialog(location, "_blank", "chrome,all,dialog=no");
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
let newState = { windows: [{
tabs: [{ entries: [] }],
_closedTabs: [{
@ -65,42 +67,42 @@ function test() {
}],
sizemode: "maximized"
}] };
let uniqueKey = "bug 477657";
let uniqueValue = "unik" + Date.now();
ss.setWindowValue(newWin, uniqueKey, uniqueValue);
is(ss.getWindowValue(newWin, uniqueKey), uniqueValue,
"window value was set before the window was overwritten");
ss.setWindowState(newWin, JSON.stringify(newState), true);
// use setTimeout(..., 0) to mirror sss_restoreWindowFeatures
setTimeout(function() {
is(ss.getWindowValue(newWin, uniqueKey), "",
"window value was implicitly cleared");
is(newWin.windowState, newWin.STATE_MAXIMIZED,
"the window was maximized");
is(JSON.parse(ss.getClosedTabData(newWin)).length, 1,
"the closed tab was added before the window was overwritten");
delete newState.windows[0]._closedTabs;
delete newState.windows[0].sizemode;
ss.setWindowState(newWin, JSON.stringify(newState), true);
setTimeout(function() {
is(JSON.parse(ss.getClosedTabData(newWin)).length, 0,
"closed tabs were implicitly cleared");
is(newWin.windowState, newWin.STATE_MAXIMIZED,
"the window remains maximized");
newState.windows[0].sizemode = "normal";
ss.setWindowState(newWin, JSON.stringify(newState), true);
setTimeout(function() {
isnot(newWin.windowState, newWin.STATE_MAXIMIZED,
"the window was explicitly unmaximized");
newWin.close();
is(browserWindowsCount(), 1, "Only one browser window should be open eventually");
finish();

View File

@ -66,6 +66,8 @@ function test() {
var theWin = openDialog(location, "", "chrome,all,dialog=no");
theWin.addEventListener("load", function () {
theWin.removeEventListener("load", arguments.callee, false);
executeSoon(function () {
var gotError = false;
try {

View File

@ -20,6 +20,7 @@ function test() {
var win = openDialog(location, "", "chrome,all,dialog=no");
win.addEventListener("load", function () {
win.removeEventListener("load", arguments.calle, false);
browserWindowsCount(2);
win.close();
browserWindowsCount(1);

View File

@ -37,10 +37,12 @@
function test() {
let tab1 = gBrowser.addTab("about:robots");
let tab2 = gBrowser.addTab("about:mozilla");
tab1.addEventListener("load", mainPart, true);
tab1.linkedBrowser.addEventListener("load", mainPart, true);
waitForExplicitFinish();
function mainPart() {
tab1.linkedBrowser.removeEventListener("load", mainPart, true);
// Tell the session storer that the tab is pinned
let newTabState = '{"entries":[{"url":"about:robots"}],"pinned":true,"userTypedValue":"Hello World!"}';
let ss = Cc["@mozilla.org/browser/sessionstore;1"]

View File

@ -5,6 +5,8 @@ function test() {
gBrowser.pinTab(tab1);
tab1.linkedBrowser.addEventListener("load", function () {
tab1.linkedBrowser.removeEventListener("load", arguments.callee, true);
var tab2 = gBrowser.addTab();
gBrowser.pinTab(tab2);

View File

@ -44,6 +44,7 @@ function openWinWithCb(cb, argURIs, expectedURIs) {
"chrome,all,dialog=no", argURIs.join("|"));
win.addEventListener("load", function () {
win.removeEventListener("load", arguments.callee, false);
info("the window loaded");
var expectedLoads = expectedURIs.length;

View File

@ -206,7 +206,10 @@ function onStateRestored(aSubject, aTopic, aData) {
if (shouldPinTab)
newWin.gBrowser.pinTab(newWin.gBrowser.selectedTab);
newWin.addEventListener("unload", onWindowUnloaded, false);
newWin.addEventListener("unload", function () {
newWin.removeEventListener("unload", arguments.callee, false);
onWindowUnloaded();
}, false);
// Open a new tab as well. On Windows/Linux this will be restored when the
// new window is opened below (in onWindowUnloaded). On OS X we'll just
// restore the pinned tabs, leaving the unpinned tab in the closedWindowsData.
@ -257,6 +260,8 @@ function onWindowUnloaded() {
newWin.removeEventListener("load", arguments.callee, false);
newWin.gBrowser.selectedBrowser.addEventListener("load", function () {
newWin.gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
// Good enough for checking the state
afterTestCallback(previousClosedWindowData, ss.getClosedWindowData());
afterTestCleanup(newWin);

View File

@ -73,6 +73,7 @@ function test() {
let newWin = openDialog(location, "", "chrome,all,dialog=no", "http://example.com");
newWin.addEventListener("load", function(aEvent) {
newWin.removeEventListener("load", arguments.callee, false);
newWin.gBrowser.addEventListener("load", function(aEvent) {
newWin.gBrowser.removeEventListener("load", arguments.callee, true);
@ -85,6 +86,8 @@ function test() {
newWin.close();
newWin.addEventListener("unload", function(aEvent) {
newWin.removeEventListener("unload", arguments.callee, false);
is(ss.getClosedWindowCount(), closedWindowCount + 1,
"increased closed window count");
is(browserWindowsCount(), 1, "there should be 1 window open currently");

View File

@ -292,11 +292,13 @@ function test_setBrowserState() {
// waitForBrowserState does it's own observing for windows, but doesn't attach
// the listeners we want here, so do it ourselves.
let newWindow;
function windowObserver(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
let newWindow = aSubject.QueryInterface(Ci.nsIDOMWindow);
newWindow = aSubject.QueryInterface(Ci.nsIDOMWindow);
newWindow.addEventListener("load", function() {
newWindow.removeEventListener("load", arguments.callee, false);
Services.ww.unregisterNotification(windowObserver);
windowEvents[getOuterWindowID(newWindow)] = { busyEventCount: 0, readyEventCount: 0 };
@ -332,6 +334,8 @@ function test_setBrowserState() {
"[test_setBrowserState] checked 2 windows");
window.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
window.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
newWindow.removeEventListener("SSWindowStateBusy", onSSWindowStateBusy, false);
newWindow.removeEventListener("SSWindowStateReady", onSSWindowStateReady, false);
runNextTest();
});
}
@ -357,6 +361,7 @@ function test_undoCloseWindow() {
reopenedWindow.addEventListener("load", function() {
reopenedWindow.removeEventListener("load", arguments.callee, false);
reopenedWindow.gBrowser.tabContainer.addEventListener("SSTabRestored", onSSTabRestored, false);
}, false);
});

View File

@ -4,6 +4,8 @@ const DG_OPTION_KEY = DG_BACKGROUND + "/picture_options";
const DG_DRAW_BG_KEY = DG_BACKGROUND + "/draw_background";
function onPageLoad() {
gBrowser.selectedBrowser.removeEventListener("load", onPageLoad, true);
var bs = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService);
var brandName = bs.createBundle("chrome://branding/locale/brand.properties").

View File

@ -165,7 +165,10 @@ var gWindowCatcher = {
this.windowsOpen++;
let win = subject.QueryInterface(Ci.nsIDOMWindow);
info("window catcher caught window opening: " + win.document.documentURI);
win.addEventListener("load", this.windowLoad.bind(this, win), false);
win.addEventListener("load", function () {
win.removeEventListener("load", arguments.callee, false);
gWindowCatcher.windowLoad(win);
}, false);
}
};
@ -357,7 +360,10 @@ function testShowNotification()
// Wait for any windows caught by the windowcatcher to close
gWindowCatcher.finish(function () {
button.click();
gBrowser.selectedBrowser.addEventListener("load", testNotificationURL, true);
gBrowser.selectedBrowser.addEventListener("load", function () {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
testNotificationURL();
}, true);
});
} else {
notifyBox.removeAllNotifications(true);

View File

@ -60,21 +60,3 @@
example: You are currently on the _Stable_ update channel. -->
<!ENTITY channel.description.start "You are currently on the ">
<!ENTITY channel.description.end " update channel. ">
<!ENTITY channel.change "Change">
<!ENTITY channel.release.description "Enjoy the tried and tested final release being used by hundreds of millions around the world. Stay in control of your online experience with super speed, easy customization and the latest Web technologies.">
<!ENTITY channel.beta.description "Experience cutting edge features with more stability. Provide feedback to help refine and polish what will be in the final release.">
<!ENTITY channel.aurora.description "Experience the newest innovations in an unstable environment that's not for the faint of heart. Provide feedback on features and performance to help determine what makes the final release.">
<!-- LOCALIZATION NOTE (channel.selector.start,channel.selector.end): channel.selector.start and
channel.selector.end create one sentence, with a channel selection menulist instered in between.
This is all in one line, so try to make the localized text short.
example: Switch to the [Stable] update channel. -->
<!ENTITY channel.selector.start "Switch to the">
<!ENTITY channel.selector.end "update channel.">
<!-- LOCALIZATION NOTE (channel.selector.applyButton): This button applies the user's choice to switch
to a new update channel and starts the application update process. -->
<!ENTITY channel.selector.applyButton "Apply and Update">
<!ENTITY channel.selector.cancelButton "Cancel">

View File

@ -23,5 +23,5 @@
<!ENTITY robots.errorTrailerDescText "And they have a plan.">
<!-- TV: Battlestar Galactica (2004 series). Common expletive referring to Cylons. -->
<!ENTITY robots.imgtitle "Frakkin' Toasters">
<!-- Book: Hitchiker's Guide To The Galaxy. Arthur presses a button and it warns him. -->
<!-- Book: Hitchhiker's Guide To The Galaxy. Arthur presses a button and it warns him. -->
<!ENTITY robots.dontpress "Please do not press this button again.">

View File

@ -22,9 +22,9 @@
<!ENTITY password.manage "Manage Passwords…">
<!ENTITY cookie.label "Set Cookies">
<!ENTITY cookie.clear "Clear Cookies">
<!ENTITY cookie.remove "Remove Cookies">
<!ENTITY cookie.manage "Manage Cookies…">
<!ENTITY cookie.clearAll "Clear All Cookies">
<!ENTITY cookie.removeAll "Remove All Cookies">
<!ENTITY geo.label "Share Location">

View File

@ -61,8 +61,8 @@
<!ENTITY dontrememberActions.clearHistory.label "clear all current history">
<!ENTITY dontrememberActions.post.label ".">
<!ENTITY privateBrowsingPermanent.label "Permanent Private Browsing mode">
<!ENTITY privateBrowsingPermanent.accesskey "P">
<!ENTITY privateBrowsingPermanent2.label "Always use private browsing mode">
<!ENTITY privateBrowsingPermanent2.accesskey "p">
<!ENTITY rememberHistory.label "Remember my browsing history">
<!ENTITY rememberHistory.accesskey "b">

View File

@ -63,4 +63,5 @@ externalProtocolLaunchBtn=Launch application
malwareBlocked=The site at %S has been reported as an attack site and has been blocked based on your security preferences.
phishingBlocked=The web site at %S has been reported as a web forgery designed to trick users into sharing personal or financial information.
cspFrameAncestorBlocked=This page has a content security policy that prevents it from being embedded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default in Firefox.

View File

@ -171,6 +171,10 @@ be temporary, and you can try again later.</li>
<!ENTITY cspFrameAncestorBlocked.title "Blocked by Content Security Policy">
<!ENTITY cspFrameAncestorBlocked.longDesc "<p>&brandShortName; prevented this page from loading in this way because the page has a content security policy that disallows it.</p>">
<!ENTITY corruptedContentError.title "Corrupted Content Error">
<!ENTITY corruptedContentError.longDesc "<p>The page you are trying to view cannot be shown because an error in the data transmission was detected.</p><ul><li>Please contact the website owners to inform them of this problem.</li></ul>">
<!ENTITY securityOverride.linkText "Or you can add an exception…">
<!ENTITY securityOverride.getMeOutOfHereButton "Get me out of here!">
<!ENTITY securityOverride.exceptionButtonLabel "Add Exception…">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

View File

@ -42,7 +42,6 @@ browser.jar:
skin/classic/browser/section_collapsed-rtl.png
skin/classic/browser/section_expanded.png
skin/classic/browser/Secure-Glyph-White.png
skin/classic/browser/Secure-background.gif
skin/classic/browser/Toolbar.png
skin/classic/browser/toolbarbutton-dropmarker.png
skin/classic/browser/urlbar-arrow.png

View File

@ -334,6 +334,7 @@ class Automation(object):
part = """\
user_pref("browser.console.showInPanel", true);
user_pref("browser.dom.window.dump.enabled", true);
user_pref("browser.firstrun.show.localepicker", false);
user_pref("dom.allow_scripts_to_close_windows", true);
user_pref("dom.disable_open_during_load", false);
user_pref("dom.max_script_run_time", 0); // no slow script dialogs

View File

@ -41,7 +41,7 @@
#include "elfxx.h"
template <class endian, typename R, typename T>
inline void Elf_Ehdr_Traits::swap(T &t, R &r)
void Elf_Ehdr_Traits::swap(T &t, R &r)
{
memcpy(r.e_ident, t.e_ident, sizeof(r.e_ident));
r.e_type = endian::swap(t.e_type);
@ -60,7 +60,7 @@ inline void Elf_Ehdr_Traits::swap(T &t, R &r)
}
template <class endian, typename R, typename T>
inline void Elf_Phdr_Traits::swap(T &t, R &r)
void Elf_Phdr_Traits::swap(T &t, R &r)
{
r.p_type = endian::swap(t.p_type);
r.p_offset = endian::swap(t.p_offset);
@ -73,7 +73,7 @@ inline void Elf_Phdr_Traits::swap(T &t, R &r)
}
template <class endian, typename R, typename T>
inline void Elf_Shdr_Traits::swap(T &t, R &r)
void Elf_Shdr_Traits::swap(T &t, R &r)
{
r.sh_name = endian::swap(t.sh_name);
r.sh_type = endian::swap(t.sh_type);
@ -88,14 +88,14 @@ inline void Elf_Shdr_Traits::swap(T &t, R &r)
}
template <class endian, typename R, typename T>
inline void Elf_Dyn_Traits::swap(T &t, R &r)
void Elf_Dyn_Traits::swap(T &t, R &r)
{
r.d_tag = endian::swap(t.d_tag);
r.d_un.d_val = endian::swap(t.d_un.d_val);
}
template <class endian, typename R, typename T>
inline void Elf_Sym_Traits::swap(T &t, R &r)
void Elf_Sym_Traits::swap(T &t, R &r)
{
r.st_name = endian::swap(t.st_name);
r.st_value = endian::swap(t.st_value);
@ -118,14 +118,14 @@ struct _Rel_info {
};
template <class endian, typename R, typename T>
inline void Elf_Rel_Traits::swap(T &t, R &r)
void Elf_Rel_Traits::swap(T &t, R &r)
{
r.r_offset = endian::swap(t.r_offset);
_Rel_info<endian>::swap(t.r_info, r.r_info);
}
template <class endian, typename R, typename T>
inline void Elf_Rela_Traits::swap(T &t, R &r)
void Elf_Rela_Traits::swap(T &t, R &r)
{
r.r_offset = endian::swap(t.r_offset);
_Rel_info<endian>::swap(t.r_info, r.r_info);

View File

@ -2799,7 +2799,9 @@ nsScriptSecurityManager::RequestCapability(nsIPrincipal* aPrincipal,
{
// Prompt user for permission to enable capability.
JSContext* cx = GetCurrentJSContext();
PRBool remember;
// The actual value is irrelevant but we shouldn't be handing out
// malformed JSBools to XPConnect.
PRBool remember = PR_FALSE;
if (CheckConfirmDialog(cx, aPrincipal, capability, &remember))
*canEnable = nsIPrincipal::ENABLE_GRANTED;
else

View File

@ -116,7 +116,7 @@ protected:
// Update the selected locale used by the chrome registry, and fire a
// notification about this change
virtual void UpdateSelectedLocale() = 0;
virtual nsresult UpdateSelectedLocale() = 0;
static void LogMessage(const char* aMsg, ...);
static void LogMessageWithContext(nsIURI* aURL, PRUint32 aLineNumber, PRUint32 flags,

View File

@ -368,12 +368,9 @@ nsChromeRegistryChrome::Observe(nsISupports *aSubject, const char *aTopic,
if (pref.EqualsLiteral(MATCH_OS_LOCALE_PREF) ||
pref.EqualsLiteral(SELECTED_LOCALE_PREF)) {
if (!mProfileLoaded) {
rv = SelectLocaleFromPref(prefs);
if (NS_FAILED(rv))
return rv;
}
FlushAllCaches();
rv = UpdateSelectedLocale();
if (NS_SUCCEEDED(rv) && mProfileLoaded)
FlushAllCaches();
}
else if (pref.EqualsLiteral(SELECTED_SKIN_PREF)) {
nsXPIDLCString provider;
@ -426,11 +423,12 @@ nsChromeRegistryChrome::CheckForNewChrome()
return NS_OK;
}
void nsChromeRegistryChrome::UpdateSelectedLocale()
nsresult nsChromeRegistryChrome::UpdateSelectedLocale()
{
nsresult rv = NS_OK;
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
if (prefs) {
nsresult rv = SelectLocaleFromPref(prefs);
rv = SelectLocaleFromPref(prefs);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsIObserverService> obsSvc =
mozilla::services::GetObserverService();
@ -439,6 +437,8 @@ void nsChromeRegistryChrome::UpdateSelectedLocale()
"selected-locale-has-changed", nsnull);
}
}
return rv;
}
static void

View File

@ -83,7 +83,7 @@ class nsChromeRegistryChrome : public nsChromeRegistry
PRUint32 number, void *arg);
nsresult SelectLocaleFromPref(nsIPrefBranch* prefs);
NS_OVERRIDE void UpdateSelectedLocale();
NS_OVERRIDE nsresult UpdateSelectedLocale();
NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
const nsCString& aProvider,
const nsCString& aPath);

View File

@ -278,9 +278,9 @@ nsChromeRegistryContent::GetXULOverlays(nsIURI *aChromeURL,
CONTENT_NOT_IMPLEMENTED();
}
void nsChromeRegistryContent::UpdateSelectedLocale()
nsresult nsChromeRegistryContent::UpdateSelectedLocale()
{
CONTENT_NOTREACHED();
CONTENT_NOT_IMPLEMENTED();
}
void

View File

@ -89,7 +89,7 @@ class nsChromeRegistryContent : public nsChromeRegistry
void RegisterResource(const ResourceMapping& aResource);
void RegisterOverride(const OverrideMapping& aOverride);
NS_OVERRIDE void UpdateSelectedLocale();
NS_OVERRIDE nsresult UpdateSelectedLocale();
NS_OVERRIDE nsIURI* GetBaseURIFromPackage(const nsCString& aPackage,
const nsCString& aProvider,
const nsCString& aPath);

View File

@ -253,7 +253,6 @@ MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@
MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
MOZ_MATHML = @MOZ_MATHML@
MOZ_CSS_ANIMATIONS = @MOZ_CSS_ANIMATIONS@
MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
MOZ_XTF = @MOZ_XTF@

View File

@ -2209,8 +2209,6 @@ ia64*-hpux*)
else
MOZ_OPTIMIZE_FLAGS="-Os -freorder-blocks -fno-reorder-functions -fno-omit-frame-pointer"
fi
# The Maemo builders don't know about this flag
MOZ_ARM_VFP_FLAGS="-mfpu=vfp"
;;
*-*linux*)
@ -3444,41 +3442,6 @@ AC_SUBST(XEXT_LIBS)
AC_SUBST(XT_LIBS)
AC_SUBST(XSS_LIBS)
if test "$CPU_ARCH" = "arm"; then
AC_MSG_CHECKING(for ARM SIMD support in compiler)
# We try to link so that this also fails when
# building with LTO.
AC_TRY_LINK([],
[asm("uqadd8 r1, r1, r2");],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
AC_DEFINE(HAVE_ARM_SIMD)
HAVE_ARM_SIMD=1
fi
AC_MSG_CHECKING(for ARM NEON support in compiler)
_SAVE_CFLAGS="$CFLAGS"
if test "$GNU_CC"; then
# gcc needs -mfpu=neon to recognize NEON instructions
CFLAGS="$CFLAGS -mfpu=neon -mfloat-abi=softfp"
fi
# We try to link so that this also fails when
# building with LTO.
AC_TRY_LINK([],
[asm("vadd.i8 d0, d0, d0");],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
AC_DEFINE(HAVE_ARM_NEON)
HAVE_ARM_NEON=1
fi
CFLAGS="$_SAVE_CFLAGS"
fi # CPU_ARCH = arm
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl = pthread support
dnl = Start by checking whether the system support pthreads
@ -4335,29 +4298,29 @@ dnl See if compiler supports some gcc-style attributes
AC_CACHE_CHECK(for __attribute__((always_inline)),
ac_cv_attribute_always_inline,
[AC_TRY_COMPILE([],
[inline void f(void) __attribute__((always_inline));],
[AC_TRY_COMPILE([inline void f(void) __attribute__((always_inline));],
[],
ac_cv_attribute_always_inline=yes,
ac_cv_attribute_always_inline=no)])
AC_CACHE_CHECK(for __attribute__((malloc)),
ac_cv_attribute_malloc,
[AC_TRY_COMPILE([],
[void* f(int) __attribute__((malloc));],
[AC_TRY_COMPILE([void* f(int) __attribute__((malloc));],
[],
ac_cv_attribute_malloc=yes,
ac_cv_attribute_malloc=no)])
AC_CACHE_CHECK(for __attribute__((warn_unused_result)),
ac_cv_attribute_warn_unused,
[AC_TRY_COMPILE([],
[int f(void) __attribute__((warn_unused_result));],
[AC_TRY_COMPILE([int f(void) __attribute__((warn_unused_result));],
[],
ac_cv_attribute_warn_unused=yes,
ac_cv_attribute_warn_unused=no)])
AC_CACHE_CHECK(for __attribute__((noreturn)),
ac_cv_attribute_noreturn,
[AC_TRY_COMPILE([],
[void f(void) __attribute__((noreturn));],
[AC_TRY_COMPILE([void f(void) __attribute__((noreturn));],
[],
ac_cv_attribute_noreturn=yes,
ac_cv_attribute_noreturn=no)])
@ -4802,7 +4765,6 @@ MOZ_OFFICIAL_BRANDING=
MOZ_FEEDS=1
MOZ_INSTALLER=1
MOZ_JSDEBUGGER=1
MOZ_MATHML=1
MOZ_CSS_ANIMATIONS=1
MOZ_MORK=
MOZ_MORKREADER=1
@ -4842,7 +4804,6 @@ MOZ_SPELLCHECK=1
MOZ_SPLASHSCREEN=
MOZ_STORAGE=1
MOZ_SVG_DLISTS=
MOZ_THUMB2=
MOZ_TIMELINE=
MOZ_TOOLKIT_SEARCH=1
MOZ_UI_LOCALE=en-US
@ -4894,7 +4855,6 @@ case "${target}" in
USE_ARM_KUSER=1
MOZ_INSTALLER=
NECKO_WIFI=
MOZ_THUMB2=1
MOZ_THEME_FASTSTRIPE=1
MOZ_TREE_FREETYPE=1
MOZ_MEMORY=1
@ -6408,17 +6368,6 @@ for extension in $MOZ_EXTENSIONS; do
fi
done
dnl ========================================================
dnl MathML on by default
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(mathml,
[ --disable-mathml Disable MathML support],
MOZ_MATHML=,
MOZ_MATHML=1 )
if test "$MOZ_MATHML"; then
AC_DEFINE(MOZ_MATHML)
fi
AC_DEFINE(MOZ_CSS_ANIMATIONS)
dnl ========================================================
@ -6976,8 +6925,6 @@ if test $MOZ_PLATFORM_MAEMO; then
AC_SUBST(MOZ_ENABLE_CONTENTACTION)
fi
fi
MOZ_THUMB2=1
fi
PKG_CHECK_MODULES(LIBLOCATION,liblocation, _LIB_FOUND=1, _LIB_FOUND=)
@ -7006,80 +6953,204 @@ if test $MOZ_PLATFORM_MAEMO; then
AC_SUBST(MOZ_PLATFORM_MAEMO_CFLAGS)
fi
dnl Setup default CPU arch for arm target
case "$target_cpu" in
arm*)
MOZ_ARM_ARCH=armv7
;;
dnl ========================================================
dnl = ARM toolchain tweaks
dnl ========================================================
dnl Defaults
case "${target}" in
arm-android-eabi)
MOZ_THUMB=yes
MOZ_ARCH=armv7-a
MOZ_FPU=vfp
MOZ_FLOAT_ABI=softfp
;;
arm*-*)
if test -n "$MOZ_PLATFORM_MAEMO"; then
MOZ_THUMB=no
MOZ_ARCH=armv7-a
MOZ_FLOAT_ABI=softfp
fi
if test "$MOZ_PLATFORM_MAEMO" = 6; then
MOZ_THUMB=yes
fi
;;
esac
dnl ========================================================
dnl = Enable building the Thumb2 instruction set
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(thumb2,
[ --enable-thumb2 Enable Thumb2 instruction set (implies ARMv7)],
MOZ_THUMB2=1,
MOZ_THUMB2=)
if test -n "$MOZ_THUMB2"; then
MOZ_ARM_ARCH=armv7
dnl Kept for compatibility with some buildbot mozconfig
MOZ_ARG_DISABLE_BOOL(thumb2, [], MOZ_THUMB=no, MOZ_THUMB=yes)
MOZ_ARG_WITH_STRING(thumb,
[ --with-thumb[[=yes|no|toolchain-default]]]
[ Use Thumb instruction set (-mthumb)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-thumb is not supported on non-GNU toolchains])
fi
MOZ_THUMB=$withval)
MOZ_ARG_WITH_STRING(thumb-interwork,
[ --with-thumb-interwork[[=yes|no|toolchain-default]]
Use Thumb/ARM instuctions interwork (-mthumb-interwork)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-thumb-interwork is not supported on non-GNU toolchains])
fi
MOZ_THUMB_INTERWORK=$withval)
MOZ_ARG_WITH_STRING(arch,
[ --with-arch=[[type|toolchain-default]]
Use specific CPU features (-march=type)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-arch is not supported on non-GNU toolchains])
fi
MOZ_ARCH=$withval)
MOZ_ARG_WITH_STRING(fpu,
[ --with-fpu=[[type|toolchain-default]]
Use specific FPU type (-mfpu=type)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-fpu is not supported on non-GNU toolchains])
fi
MOZ_FPU=$withval)
MOZ_ARG_WITH_STRING(float-abi,
[ --with-float-abi=[[type|toolchain-default]]
Use specific arm float ABI (-mfloat-abi=type)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-float-abi is not supported on non-GNU toolchains])
fi
MOZ_FLOAT_ABI=$withval)
MOZ_ARG_WITH_STRING(soft-float,
[ --with-soft-float[[=yes|no|toolchain-default]]
Use soft float library (-msoft-float)],
if test -z "$GNU_CC"; then
AC_MSG_ERROR([--with-soft-float is not supported on non-GNU toolchains])
fi
MOZ_SOFT_FLOAT=$withval)
case "$MOZ_ARCH" in
toolchain-default|"")
arch_flag=""
;;
*)
arch_flag="-march=$MOZ_ARCH"
;;
esac
case "$MOZ_THUMB" in
yes)
MOZ_THUMB2=1
thumb_flag="-mthumb"
;;
no)
MOZ_THUMB2=
thumb_flag="-marm"
;;
*)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$arch_flag"
AC_TRY_COMPILE([],[return sizeof(__thumb2__);],
MOZ_THUMB2=1,
MOZ_THUMB2=)
CFLAGS="$_SAVE_CFLAGS"
thumb_flag=""
;;
esac
if test "$MOZ_THUMB2" = 1; then
AC_DEFINE(MOZ_THUMB2)
fi
dnl ========================================================
dnl = Enable building for ARM specific CPU features
dnl ========================================================
MOZ_ARG_WITH_STRING(cpu-arch,
[ --with-cpu-arch=arch Use specific arm architecture CPU features, default armv7],
MOZ_ARM_ARCH=$withval)
case "$MOZ_THUMB_INTERWORK" in
yes)
thumb_interwork_flag="-mthumb-interwork"
;;
no)
thumb_interwork_flag="-mno-thumb-interwork"
;;
*) # toolchain-default
thumb_interwork_flag=""
;;
esac
if test -n "$MOZ_THUMB2"; then
case "$target_cpu" in
arm*)
if test "$MOZ_ARM_ARCH" != "armv7"; then
AC_MSG_ERROR([--enable-thumb2 is not compatible with cpu-arch=$MOZ_ARM_ARCH])
fi
if test "$GNU_CC"; then
AC_DEFINE(MOZ_THUMB2)
AC_DEFINE(MOZ_ARM_ARCH)
CFLAGS="$CFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
CXXFLAGS="$CXXFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
ASFLAGS="$ASFLAGS -march=armv7-a -mthumb -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
else
AC_MSG_ERROR([--enable-thumb2 is not supported for non-GNU toolchains])
fi
case "$MOZ_FPU" in
toolchain-default|"")
fpu_flag=""
;;
*)
AC_MSG_ERROR([--enable-thumb2 is not supported for non-ARM CPU architectures])
*)
fpu_flag="-mfpu=$MOZ_FPU"
;;
esac
elif test "$MOZ_ARM_ARCH" = "armv7"; then
case "$target_cpu" in
arm*)
if test "$GNU_CC"; then
AC_DEFINE(MOZ_ARM_ARCH)
CFLAGS="$CFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
CXXFLAGS="$CXXFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
ASFLAGS="$ASFLAGS -march=armv7-a -marm -mfloat-abi=softfp $MOZ_ARM_VFP_FLAGS"
else
AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-GNU toolchains])
fi
esac
case "$MOZ_FLOAT_ABI" in
toolchain-default|"")
float_abi_flag=""
;;
*)
AC_MSG_ERROR([--with-cpu-arch=armv7 is not supported for non-ARM CPU architectures])
*)
float_abi_flag="-mfloat-abi=$MOZ_FLOAT_ABI"
;;
esac
else
case "$target_cpu" in
arm*)
if test "$GNU_CC"; then
CFLAGS="$CFLAGS -march=armv5te -mthumb-interwork -msoft-float"
CXXFLAGS="$CXXFLAGS -march=armv5te -mthumb-interwork -msoft-float"
ASFLAGS="$ASFLAGS -march=armv5te -mthumb-interwork -msoft-float"
fi
;;
esac
esac
case "$MOZ_SOFT_FLOAT" in
yes)
soft_float_flag="-msoft-float"
;;
no)
soft_float_flag="-mno-soft-float"
;;
*) # toolchain-default
soft_float_flag=""
;;
esac
dnl Use echo to avoid accumulating space characters
all_flags=`echo $arch_flag $thumb_flag $thumb_interwork_flag $fpu_flag $float_abi_flag $soft_float_flag`
if test -n "$all_flags"; then
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$all_flags"
AC_MSG_CHECKING(whether the chosen combination of compiler flags ($all_flags) works)
AC_TRY_COMPILE([],[return 0;],
AC_MSG_RESULT([yes]),
AC_MSG_ERROR([no]))
CFLAGS="$_SAVE_CFLAGS $all_flags"
CXXFLAGS="$CXXFLAGS $all_flags"
ASFLAGS="$ASFLAGS $all_flags"
if test -n "$thumb_flag"; then
LDFLAGS="$LDFLAGS $thumb_flag"
fi
fi
AC_SUBST(MOZ_THUMB2)
AC_SUBST(MOZ_ARM_ARCH)
if test "$CPU_ARCH" = "arm"; then
AC_MSG_CHECKING(for ARM SIMD support in compiler)
# We try to link so that this also fails when
# building with LTO.
AC_TRY_LINK([],
[asm("uqadd8 r1, r1, r2");],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
AC_DEFINE(HAVE_ARM_SIMD)
HAVE_ARM_SIMD=1
fi
AC_MSG_CHECKING(for ARM NEON support in compiler)
# We try to link so that this also fails when
# building with LTO.
AC_TRY_LINK([],
[asm(".fpu neon\n vadd.i8 d0, d0, d0");],
result="yes", result="no")
AC_MSG_RESULT("$result")
if test "$result" = "yes"; then
AC_DEFINE(HAVE_ARM_NEON)
HAVE_ARM_NEON=1
fi
fi # CPU_ARCH = arm
AC_SUBST(HAVE_ARM_SIMD)
AC_SUBST(HAVE_ARM_NEON)
dnl ========================================================
dnl = faststripe theme
@ -7429,8 +7500,8 @@ MOZ_ARG_ENABLE_BOOL(wrap-malloc,
if test -n "$_WRAP_MALLOC"; then
if test "$GNU_CC"; then
WRAP_MALLOC_CFLAGS="${LDFLAGS} ${WRAP_MALLOC_CFLAGS} -Wl,--wrap -Wl,malloc -Wl,--wrap -Wl,calloc -Wl,--wrap -Wl,valloc -Wl,--wrap -Wl,free -Wl,--wrap -Wl,realloc -Wl,--wrap -Wl,memalign -Wl,--wrap -Wl,__builtin_new -Wl,--wrap -Wl,__builtin_vec_new -Wl,--wrap -Wl,__builtin_delete -Wl,--wrap -Wl,__builtin_vec_delete -Wl,--wrap -Wl,PR_Free -Wl,--wrap -Wl,PR_Malloc -Wl,--wrap -Wl,PR_Calloc -Wl,--wrap -Wl,PR_Realloc -Wl,--wrap -Wl,strdup -Wl,--wrap -Wl,strndup -Wl,--wrap -Wl,posix_memalign"
MKSHLIB='$(CXX) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB) -o $@'
MKCSHLIB='$(CC) $(DSO_LDOPTS) $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB) -o $@'
MKSHLIB="$MKSHLIB"' $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB)'
MKCSHLIB="$MKCSHLIB"' $(WRAP_MALLOC_CFLAGS) $(WRAP_MALLOC_LIB)'
fi
fi
@ -8749,7 +8820,6 @@ AC_SUBST(MOZ_UPDATE_XTERM)
AC_SUBST(MINIMO)
AC_SUBST(MOZ_PLATFORM_MAEMO)
AC_SUBST(MOZ_AUTH_EXTENSION)
AC_SUBST(MOZ_MATHML)
AC_SUBST(MOZ_CSS_ANIMATIONS)
AC_SUBST(MOZ_PERMISSIONS)
AC_SUBST(MOZ_XTF)
@ -9294,12 +9364,6 @@ unset CONFIG_FILES
# No need to run subconfigures when building with LIBXUL_SDK_DIR
if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then
if test -n "$MOZ_THUMB2"; then
_SUBDIR_CONFIG_ARGS="$_SUBDIR_CONFIG_ARGS --enable-thumb2"
fi
if test -n "$MOZ_ARM_ARCH"; then
_SUBDIR_CONFIG_ARGS="$_SUBDIR_CONFIG_ARGS --with-cpu-arch=$MOZ_ARM_ARCH"
fi
if test -n "$_WRAP_MALLOC"; then
_SUBDIR_CONFIG_ARGS="$_SUBDIR_CONFIG_ARGS --enable-wrap-malloc"
fi

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = content
PARALLEL_DIRS = base canvas events html smil svg xml xul xbl xslt
PARALLEL_DIRS = base canvas events html mathml smil svg xml xul xbl xslt
ifdef MOZ_MEDIA
PARALLEL_DIRS += media
@ -53,10 +53,6 @@ ifdef MOZ_XTF
PARALLEL_DIRS += xtf
endif
ifdef MOZ_MATHML
PARALLEL_DIRS += mathml
endif
ifdef ENABLE_TESTS
TOOL_DIRS += test
endif

View File

@ -111,11 +111,9 @@ already_AddRefed<nsGenericHTMLElement>
CreateHTMLElement(PRUint32 aNodeType, already_AddRefed<nsINodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser);
#ifdef MOZ_MATHML
nsresult
NS_NewMathMLElement(nsIContent** aResult,
already_AddRefed<nsINodeInfo> aNodeInfo);
#endif
#ifdef MOZ_XUL
nsresult

View File

@ -64,7 +64,6 @@ void ParseSize(PRInt64 aSize, PRInt64& aStart, PRInt64& aEnd);
class nsDOMFile : public nsIDOMFile,
public nsIXHRSendable,
public nsICharsetDetectionObserver,
public nsIJSNativeInitializer
{
public:
@ -100,9 +99,6 @@ public:
virtual ~nsDOMFile() {}
// from nsICharsetDetectionObserver
NS_IMETHOD Notify(const char *aCharset, nsDetectionConfident aConf);
// nsIJSNativeInitializer
NS_IMETHOD Initialize(nsISupports* aOwner,
JSContext* aCx,
@ -124,13 +120,6 @@ protected:
nsString mContentType;
bool mIsFullFile;
// Used during charset detection
nsCString mCharset;
nsresult GuessCharset(nsIInputStream *aStream,
nsACString &aCharset);
nsresult ConvertStream(nsIInputStream *aStream, const char *aCharset,
nsAString &aResult);
};
class nsDOMMemoryFile : public nsDOMFile

View File

@ -63,7 +63,7 @@ interface nsIDOMBlob : nsISupports
[optional] in DOMString contentType);
};
[scriptable, uuid(91c9ebd9-2a4a-4a38-9412-ef492a2799be)]
[scriptable, uuid(b096ef67-7b77-47f8-8e70-5d8ee36416bf)]
interface nsIDOMFile : nsIDOMBlob
{
readonly attribute DOMString name;
@ -71,14 +71,6 @@ interface nsIDOMFile : nsIDOMBlob
// This performs no security checks!
[noscript] readonly attribute DOMString mozFullPathInternal;
// These are all deprecated and not in spec. Will be removed in a future
// release
readonly attribute DOMString fileName;
readonly attribute unsigned long long fileSize;
DOMString getAsText(in DOMString encoding); // raises(FileException) on retrieval
DOMString getAsDataURL(); // raises(FileException) on retrieval
DOMString getAsBinary(); // raises(FileException) on retrieval
};
[scriptable, uuid(c4a77171-039b-4f84-97f9-820fb51626af)]

View File

@ -555,12 +555,6 @@ nsDOMAttribute::GetIsId(PRBool* aReturn)
return NS_OK;
}
NS_IMETHODIMP
nsDOMAttribute::GetSchemaTypeInfo(nsIDOM3TypeInfo** aReturn)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
PRBool
nsDOMAttribute::IsNodeOfType(PRUint32 aFlags) const
{

View File

@ -151,16 +151,16 @@ nsDOMMultipartBlob::MozSlice(PRInt64 aStart, PRInt64 aEnd,
aEnd = (PRInt64)thisLength;
}
// Modifies aStart and aEnd.
ParseSize((PRInt64)thisLength, aStart, aEnd);
// If we clamped to nothing we create an empty blob
nsTArray<nsCOMPtr<nsIDOMBlob> > blobs;
PRInt64 length = aEnd - aStart;
PRUint64 finalLength = length;
PRUint64 length = aEnd - aStart;
PRUint64 skipStart = aStart;
NS_ABORT_IF_FALSE(aStart + length <= thisLength, "Er, what?");
NS_ABORT_IF_FALSE(PRUint64(aStart) + length <= thisLength, "Er, what?");
// Prune the list of blobs if we can
PRUint32 i;
@ -172,7 +172,7 @@ nsDOMMultipartBlob::MozSlice(PRInt64 aStart, PRInt64 aEnd,
NS_ENSURE_SUCCESS(rv, rv);
if (skipStart < l) {
PRInt64 upperBound = NS_MIN<PRInt64>(l - skipStart, length);
PRUint64 upperBound = NS_MIN<PRUint64>(l - skipStart, length);
nsCOMPtr<nsIDOMBlob> firstBlob;
rv = mBlobs.ElementAt(i)->MozSlice(skipStart, skipStart + upperBound,
@ -212,7 +212,7 @@ nsDOMMultipartBlob::MozSlice(PRInt64 aStart, PRInt64 aEnd,
} else {
blobs.AppendElement(blob);
}
length -= NS_MIN<PRInt64>(l, length);
length -= NS_MIN<PRUint64>(l, length);
}
// we can create our blob now

View File

@ -142,7 +142,6 @@ NS_INTERFACE_MAP_BEGIN(nsDOMFile)
NS_INTERFACE_MAP_ENTRY(nsIDOMBlob)
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIDOMFile, mIsFullFile)
NS_INTERFACE_MAP_ENTRY(nsIXHRSendable)
NS_INTERFACE_MAP_ENTRY(nsICharsetDetectionObserver)
NS_INTERFACE_MAP_ENTRY(nsIJSNativeInitializer)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO_CONDITIONAL(File, mIsFullFile)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO_CONDITIONAL(Blob, !mIsFullFile)
@ -173,18 +172,6 @@ nsDOMFile::NewFile(nsISupports* *aNewObject)
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::GetFileName(nsAString &aFileName)
{
return GetName(aFileName);
}
NS_IMETHODIMP
nsDOMFile::GetFileSize(PRUint64 *aFileSize)
{
return GetSize(aFileSize);
}
NS_IMETHODIMP
nsDOMFile::GetName(nsAString &aFileName)
{
@ -358,231 +345,6 @@ nsDOMFile::GetInternalUrl(nsIPrincipal* aPrincipal, nsAString& aURL)
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::GetAsText(const nsAString &aCharset, nsAString &aResult)
{
aResult.Truncate();
nsCOMPtr<nsIInputStream> stream;
nsresult rv = GetInternalStream(getter_AddRefs(stream));
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
nsCAutoString charsetGuess;
if (!aCharset.IsEmpty()) {
CopyUTF16toUTF8(aCharset, charsetGuess);
} else {
rv = GuessCharset(stream, charsetGuess);
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
nsCOMPtr<nsISeekableStream> seekable = do_QueryInterface(stream);
if (!seekable) return NS_ERROR_FAILURE;
rv = seekable->Seek(nsISeekableStream::NS_SEEK_SET, 0);
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
}
nsCAutoString charset;
nsCOMPtr<nsICharsetAlias> alias =
do_GetService(NS_CHARSETALIAS_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
rv = alias->GetPreferred(charsetGuess, charset);
NS_ENSURE_SUCCESS(rv, rv);
return DOMFileResult(ConvertStream(stream, charset.get(), aResult));
}
NS_IMETHODIMP
nsDOMFile::GetAsDataURL(nsAString &aResult)
{
aResult.AssignLiteral("data:");
nsresult rv;
if (!mContentType.Length()) {
nsCOMPtr<nsIMIMEService> mimeService =
do_GetService(NS_MIMESERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCAutoString contentType;
rv = mimeService->GetTypeFromFile(mFile, contentType);
if (NS_SUCCEEDED(rv)) {
CopyUTF8toUTF16(contentType, mContentType);
}
}
if (mContentType.Length()) {
aResult.Append(mContentType);
} else {
aResult.AppendLiteral("application/octet-stream");
}
aResult.AppendLiteral(";base64,");
nsCOMPtr<nsIInputStream> stream;
rv = GetInternalStream(getter_AddRefs(stream));
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
char readBuf[4096];
PRUint32 leftOver = 0;
PRUint32 numRead;
do {
rv = stream->Read(readBuf + leftOver, sizeof(readBuf) - leftOver, &numRead);
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
PRUint32 numEncode = numRead + leftOver;
leftOver = 0;
if (numEncode == 0) break;
// unless this is the end of the file, encode in multiples of 3
if (numRead > 0) {
leftOver = numEncode % 3;
numEncode -= leftOver;
}
// out buffer should be at least 4/3rds the read buf, plus a terminator
char *base64 = PL_Base64Encode(readBuf, numEncode, nsnull);
if (!base64) {
return DOMFileResult(NS_ERROR_OUT_OF_MEMORY);
}
nsDependentCString str(base64);
PRUint32 strLen = str.Length();
PRUint32 oldLength = aResult.Length();
AppendASCIItoUTF16(str, aResult);
PR_Free(base64);
if (aResult.Length() - oldLength != strLen) {
return DOMFileResult(NS_ERROR_OUT_OF_MEMORY);
}
if (leftOver) {
memmove(readBuf, readBuf + numEncode, leftOver);
}
} while (numRead > 0);
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::GetAsBinary(nsAString &aResult)
{
aResult.Truncate();
nsCOMPtr<nsIInputStream> stream;
nsresult rv = GetInternalStream(getter_AddRefs(stream));
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
PRUint32 numRead;
do {
char readBuf[4096];
rv = stream->Read(readBuf, sizeof(readBuf), &numRead);
NS_ENSURE_SUCCESS(rv, DOMFileResult(rv));
PRUint32 oldLength = aResult.Length();
AppendASCIItoUTF16(Substring(readBuf, readBuf + numRead), aResult);
if (aResult.Length() - oldLength != numRead) {
return DOMFileResult(NS_ERROR_OUT_OF_MEMORY);
}
} while (numRead > 0);
return NS_OK;
}
nsresult
nsDOMFile::GuessCharset(nsIInputStream *aStream,
nsACString &aCharset)
{
if (!mCharset.IsEmpty()) {
aCharset = mCharset;
return NS_OK;
}
// First try the universal charset detector
nsCOMPtr<nsICharsetDetector> detector
= do_CreateInstance(NS_CHARSET_DETECTOR_CONTRACTID_BASE
"universal_charset_detector");
if (!detector) {
// No universal charset detector, try the default charset detector
const nsAdoptingCString& detectorName =
Preferences::GetLocalizedCString("intl.charset.detector");
if (!detectorName.IsEmpty()) {
nsCAutoString detectorContractID;
detectorContractID.AssignLiteral(NS_CHARSET_DETECTOR_CONTRACTID_BASE);
detectorContractID += detectorName;
detector = do_CreateInstance(detectorContractID.get());
}
}
nsresult rv;
if (detector) {
detector->Init(this);
PRBool done;
PRUint32 numRead;
do {
char readBuf[4096];
rv = aStream->Read(readBuf, sizeof(readBuf), &numRead);
NS_ENSURE_SUCCESS(rv, rv);
rv = detector->DoIt(readBuf, numRead, &done);
NS_ENSURE_SUCCESS(rv, rv);
} while (!done && numRead > 0);
rv = detector->Done();
NS_ENSURE_SUCCESS(rv, rv);
} else {
// no charset detector available, check the BOM
unsigned char sniffBuf[4];
PRUint32 numRead;
rv = aStream->Read(reinterpret_cast<char*>(sniffBuf),
sizeof(sniffBuf), &numRead);
NS_ENSURE_SUCCESS(rv, rv);
if (numRead >= 4 &&
sniffBuf[0] == 0x00 &&
sniffBuf[1] == 0x00 &&
sniffBuf[2] == 0xfe &&
sniffBuf[3] == 0xff) {
mCharset = "UTF-32BE";
} else if (numRead >= 4 &&
sniffBuf[0] == 0xff &&
sniffBuf[1] == 0xfe &&
sniffBuf[2] == 0x00 &&
sniffBuf[3] == 0x00) {
mCharset = "UTF-32LE";
} else if (numRead >= 2 &&
sniffBuf[0] == 0xfe &&
sniffBuf[1] == 0xff) {
mCharset = "UTF-16BE";
} else if (numRead >= 2 &&
sniffBuf[0] == 0xff &&
sniffBuf[1] == 0xfe) {
mCharset = "UTF-16LE";
} else if (numRead >= 3 &&
sniffBuf[0] == 0xef &&
sniffBuf[1] == 0xbb &&
sniffBuf[2] == 0xbf) {
mCharset = "UTF-8";
}
}
if (mCharset.IsEmpty()) {
// no charset detected, default to the system charset
nsCOMPtr<nsIPlatformCharset> platformCharset =
do_GetService(NS_PLATFORMCHARSET_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
rv = platformCharset->GetCharset(kPlatformCharsetSel_PlainTextInFile,
mCharset);
}
}
if (mCharset.IsEmpty()) {
// no sniffed or default charset, try UTF-8
mCharset.AssignLiteral("UTF-8");
}
aCharset = mCharset;
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::GetSendInfo(nsIInputStream** aBody,
nsACString& aContentType,
@ -606,14 +368,6 @@ nsDOMFile::GetSendInfo(nsIInputStream** aBody,
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::Notify(const char* aCharset, nsDetectionConfident aConf)
{
mCharset.Assign(aCharset);
return NS_OK;
}
NS_IMETHODIMP
nsDOMFile::Initialize(nsISupports* aOwner,
JSContext* aCx,
@ -674,42 +428,6 @@ nsDOMFile::Initialize(nsISupports* aOwner,
return NS_OK;
}
nsresult
nsDOMFile::ConvertStream(nsIInputStream *aStream,
const char *aCharset,
nsAString &aResult)
{
aResult.Truncate();
nsCOMPtr<nsIConverterInputStream> converterStream =
do_CreateInstance("@mozilla.org/intl/converter-input-stream;1");
if (!converterStream) return NS_ERROR_FAILURE;
nsresult rv = converterStream->Init
(aStream, aCharset,
8192,
nsIConverterInputStream::DEFAULT_REPLACEMENT_CHARACTER);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIUnicharInputStream> unicharStream =
do_QueryInterface(converterStream);
if (!unicharStream) return NS_ERROR_FAILURE;
PRUint32 numChars;
nsString result;
rv = unicharStream->ReadString(8192, result, &numChars);
while (NS_SUCCEEDED(rv) && numChars > 0) {
PRUint32 oldLength = aResult.Length();
aResult.Append(result);
if (aResult.Length() - oldLength != result.Length()) {
return NS_ERROR_OUT_OF_MEMORY;
}
rv = unicharStream->ReadString(8192, result, &numChars);
}
return rv;
}
// nsDOMMemoryFile Implementation
NS_IMETHODIMP
nsDOMMemoryFile::GetName(nsAString &aFileName)

View File

@ -1383,7 +1383,6 @@ GK_ATOM(to, "to")
GK_ATOM(XML, "XML")
#endif
#ifdef MOZ_MATHML
// internal MathML attributes: different from columnalign_, columnlines_,
// fontstyle_, rowalign_ and rowlines_
GK_ATOM(_moz_math_columnalign_, "_moz-math-columnalign")
@ -1667,7 +1666,6 @@ GK_ATOM(veryverythinmathspace_, "veryverythinmathspace")
GK_ATOM(voffset_, "voffset")
GK_ATOM(xref_, "xref")
GK_ATOM(math, "math") // the only one without an underscore
#endif
#ifndef DISABLE_XFORMS_HOOKS
GK_ATOM(avg, "avg")

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