Merge mozilla-central to services-central.

This commit is contained in:
Richard Newman 2011-07-05 11:33:45 -07:00
commit b35e383e30
15 changed files with 96 additions and 48 deletions

View File

@ -66,3 +66,4 @@ a95d426422816513477e5863add1b00ac7041dcb AURORA_BASE_20110412
9eae975b3d6fb7748fe5a3c0113d449b1c7cc0b2 AURORA_BASE_20110524
138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R14
462c726144bc1fb45b61e774f64ac5d61b4e047c UPDATE_PACKAGING_R14
5eb553dd2ceae5f88d80f27afc5ef3935c5d43b0 AURORA_BASE_20110705

View File

@ -1255,19 +1255,18 @@ nsHyperTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttribute
}
// For the html landmark elements we expose them like we do aria landmarks to
// make AT navigation schemes "just work".
// make AT navigation schemes "just work". Note html:header is redundant as
// a landmark since it usually contains headings. We're not yet sure how the
// web will use html:footer but our best bet right now is as contentinfo.
if (mContent->Tag() == nsAccessibilityAtoms::nav)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
NS_LITERAL_STRING("navigation"));
else if (mContent->Tag() == nsAccessibilityAtoms::header)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
NS_LITERAL_STRING("banner"));
else if (mContent->Tag() == nsAccessibilityAtoms::footer)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
NS_LITERAL_STRING("contentinfo"));
else if (mContent->Tag() == nsAccessibilityAtoms::aside)
nsAccUtils::SetAccAttr(aAttributes, nsAccessibilityAtoms::xmlroles,
NS_LITERAL_STRING("note"));
NS_LITERAL_STRING("complementary"));
return NS_OK;
}

View File

@ -31,9 +31,8 @@
// Some AT may look for this
testAttrs("nav", {"xml-roles" : "navigation"}, true);
testAttrs("header", {"xml-roles" : "banner"}, true);
testAttrs("footer", {"xml-roles" : "contentinfo"}, true);
testAttrs("aside", {"xml-roles" : "note"}, true);
testAttrs("aside", {"xml-roles" : "complementary"}, true);
testAttrs("main", {"xml-roles" : "main"}, true); // ARIA override
// And some AT may look for this
@ -63,6 +62,11 @@
title="Map <article> like we do aria role article">
Mozilla Bug 613502
</a>
<a target="_blank"
href="https://bugzilla.mozilla.org/show_bug.cgi?id=610650"
title="Change implementation of HTML5 landmark elements to conform">
Mozilla Bug 610650
</a>
<p id="display"></p>
<div id="content" style="display: none"></div>
<pre id="test">

View File

@ -215,15 +215,17 @@ var ctrlTab = {
if (this._tabList)
return this._tabList;
let list = gBrowser.visibleTabs;
if (this._closing)
this.detachTab(this._closing, list);
// Using gBrowser.tabs instead of gBrowser.visibleTabs, as the latter
// exlcudes closing tabs, breaking the following loop in case the the
// selected tab is closing.
let list = Array.filter(gBrowser.tabs, function (tab) !tab.hidden);
// Rotate the list until the selected tab is first
while (!list[0].selected)
list.push(list.shift());
list = list.filter(function (tab) !tab.closing);
if (this.recentlyUsedLimit != 0) {
let recentlyUsedTabs = this._recentlyUsedTabs;
if (this.recentlyUsedLimit > 0)
@ -370,11 +372,10 @@ var ctrlTab = {
else
this._recentlyUsedTabs.push(aTab);
},
detachTab: function ctrlTab_detachTab(aTab, aTabs) {
var tabs = aTabs || this._recentlyUsedTabs;
var i = tabs.indexOf(aTab);
detachTab: function ctrlTab_detachTab(aTab) {
var i = this._recentlyUsedTabs.indexOf(aTab);
if (i >= 0)
tabs.splice(i, 1);
this._recentlyUsedTabs.splice(i, 1);
},
open: function ctrlTab_open() {
@ -498,10 +499,8 @@ var ctrlTab = {
return;
}
this._closing = aTab;
this._tabList = null;
this.updatePreviews();
this._closing = null;
if (this.selected.hidden)
this.advanceFocus(false);

View File

@ -701,14 +701,10 @@ var InspectorUI = {
if (parentNode.defaultView) {
return parentNode.defaultView.frameElement;
}
if (this.embeddedBrowserParents) {
let skipParent = this.embeddedBrowserParents[node];
// HTML element? could be iframe?
if (skipParent)
return skipParent;
} else // parent is document element, but no window at defaultView.
// parent is document element, but no window at defaultView.
return null;
} else if (!parentNode.localName) {
}
if (!parentNode.localName) {
return null;
}
return parentNode;
@ -722,11 +718,7 @@ var InspectorUI = {
if (node.contentDocument) {
// then the node is a frame
if (index == 0) {
if (!this.embeddedBrowserParents)
this.embeddedBrowserParents = {};
let skipChild = node.contentDocument.documentElement;
this.embeddedBrowserParents[skipChild] = node;
return skipChild; // the node's HTMLElement
return node.contentDocument.documentElement; // the node's HTMLElement
}
return null;
}
@ -736,11 +728,7 @@ var InspectorUI = {
if (svgDocument) {
// then the node is a frame
if (index == 0) {
if (!this.embeddedBrowserParents)
this.embeddedBrowserParents = {};
let skipChild = svgDocument.documentElement;
this.embeddedBrowserParents[skipChild] = node;
return skipChild; // the node's SVGElement
return svgDocument.documentElement; // the node's SVGElement
}
return null;
}

View File

@ -96,7 +96,7 @@
<getter><![CDATA[
return Array.filter(this.tabs, function(tab) {
return !tab.hidden && !tab.closing;
}, this);
});
]]></getter>
</property>
<field name="mURIFixup" readonly="true">

View File

@ -28,6 +28,16 @@ function test() {
releaseCtrl();
}
{ // test for bug 667314
let tabs = gBrowser.tabs.length;
pressCtrlTab();
pressCtrlTab(true);
EventUtils.synthesizeKey("w", { ctrlKey: true });
is(gBrowser.tabs.length, tabs - 1, "Ctrl+Tab -> Ctrl+W removes the selected tab");
releaseCtrl();
}
gBrowser.addTab();
checkTabs(3);
ctrlTabTest([2, 1, 0], 9, 1);

View File

@ -1 +1 @@
7.0a1
8.0a1

View File

@ -367,6 +367,7 @@ user_pref("security.warn_viewing_mixed", false);
user_pref("app.update.enabled", false);
user_pref("browser.panorama.experienced_first_run", true); // Assume experienced
user_pref("dom.w3c_touch_events.enabled", true);
user_pref("toolkit.telemetry.prompted", true);
// Only load extensions from the application and user profile
// AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION

View File

@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
7.0a1
8.0a1

View File

@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
7.0a1
8.0a1

View File

@ -38,7 +38,7 @@
MOZ_APP_NAME=fennec
MOZ_APP_UA_NAME=Fennec
MOZ_APP_VERSION=7.0a1
MOZ_APP_VERSION=8.0a1
MOZ_BRANDING_DIRECTORY=mobile/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/branding/official

View File

@ -589,15 +589,60 @@ net_FilterURIString(const char *str, nsACString& result)
p++;
}
// Don't strip from the scheme, because other code assumes everything
// up to the ':' is the scheme, and it's bad not to have it match.
// If there's no ':', strip.
PRBool found_colon = PR_FALSE;
const char *first = nsnull;
while (*p) {
if (*p == '\t' || *p == '\r' || *p == '\n') {
switch (*p) {
case '\t':
case '\r':
case '\n':
if (found_colon) {
writing = PR_TRUE;
// append chars up to but not including *p
if (p > str)
result.Append(str, p - str);
str = p + 1;
} else {
// remember where the first \t\r\n was in case we find no scheme
if (!first)
first = p;
}
break;
case ':':
found_colon = PR_TRUE;
break;
case '/':
case '@':
if (!found_colon) {
// colon also has to precede / or @ to be a scheme
found_colon = PR_TRUE; // not really, but means ok to strip
if (first) {
// go back and replace
p = first;
continue; // process *p again
}
}
break;
default:
break;
}
p++;
// At end, if there was no scheme, and we hit a control char, fix
// it up now.
if (!*p && first != nsnull && !found_colon) {
// TRICKY - to avoid duplicating code, we reset the loop back
// to the point we found something to do
p = first;
// This also stops us from looping after we finish
found_colon = PR_TRUE; // so we'll replace \t\r\n
}
}
// Remove trailing spaces if any

View File

@ -141,7 +141,8 @@ inline PRBool net_IsValidScheme(const nsAFlatCString &scheme)
* This function strips out all whitespace at the beginning and end of the URL
* and strips out \r, \n, \t from the middle of the URL. This makes it safe to
* call on things like javascript: urls or data: urls, where we may in fact run
* into whitespace that is not properly encoded.
* into whitespace that is not properly encoded. Note that stripping does not
* occur in the scheme portion itself.
*
* @param str the pointer to the string to filter. Must be non-null.
* @param result the out param to write to if filtering happens

View File

@ -141,7 +141,7 @@ static PRInt64 GetVsize()
if (!success)
return -1;
return s.ullTotalPhys - s.ullAvailPhys;
return s.ullTotalVirtual - s.ullAvailVirtual;
}
#if MOZ_WINSDK_TARGETVER >= MOZ_NTDDI_LONGHORN