From 444453be47746a2d07b1f647194d4ec6271efb52 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Tue, 5 Jul 2011 09:09:09 -0400 Subject: [PATCH 1/8] Bug 662215 r=bz --- netwerk/base/src/nsURLHelper.cpp | 57 ++++++++++++++++++++++++++++---- netwerk/base/src/nsURLHelper.h | 3 +- 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/netwerk/base/src/nsURLHelper.cpp b/netwerk/base/src/nsURLHelper.cpp index 7693a78e544..3d6a54c0f3e 100644 --- a/netwerk/base/src/nsURLHelper.cpp +++ b/netwerk/base/src/nsURLHelper.cpp @@ -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') { - writing = PR_TRUE; - // append chars up to but not including *p - if (p > str) - result.Append(str, p - str); - str = p + 1; + 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 diff --git a/netwerk/base/src/nsURLHelper.h b/netwerk/base/src/nsURLHelper.h index 7c31cf32834..01d2fbae848 100644 --- a/netwerk/base/src/nsURLHelper.h +++ b/netwerk/base/src/nsURLHelper.h @@ -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 From d118338822141eef7e847baf5f51b5871fac5b5d Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Tue, 5 Jul 2011 09:38:45 -0400 Subject: [PATCH 2/8] Bug 668137 - Followup. Actually display vsize on Windows. r=khuey --- xpcom/base/nsMemoryReporterManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index c29bb82d0c3..41d5ad0225f 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -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 From 9399bf127d1c6a0c33ad085a5e3fccac4b170bff Mon Sep 17 00:00:00 2001 From: David Bolter Date: Tue, 5 Jul 2011 10:28:53 -0400 Subject: [PATCH 3/8] Bug 610650 - Change implementation of HTML5 landmark elements to conform to implementor guidelines; r=marcoz --- accessible/src/html/nsHyperTextAccessible.cpp | 9 ++++----- accessible/tests/mochitest/test_elm_landmarks.html | 8 ++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/accessible/src/html/nsHyperTextAccessible.cpp b/accessible/src/html/nsHyperTextAccessible.cpp index a0b45453cb6..51642768673 100644 --- a/accessible/src/html/nsHyperTextAccessible.cpp +++ b/accessible/src/html/nsHyperTextAccessible.cpp @@ -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; } diff --git a/accessible/tests/mochitest/test_elm_landmarks.html b/accessible/tests/mochitest/test_elm_landmarks.html index f0239725b85..2ed0863f904 100644 --- a/accessible/tests/mochitest/test_elm_landmarks.html +++ b/accessible/tests/mochitest/test_elm_landmarks.html @@ -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
like we do aria role article"> Mozilla Bug 613502 + + Mozilla Bug 610650 +


From 843bffeb0de5b3a64d4210c305ad580617379070 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=C3=A3o=20Gottwald?= 
Date: Tue, 5 Jul 2011 16:54:46 +0200
Subject: [PATCH 4/8] Bug 669178 - Remove InspectorUI.embeddedBrowserParents
 since it leaks content windows and is generally broken. r=robcee/gavin

---
 browser/base/content/inspector.js | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/browser/base/content/inspector.js b/browser/base/content/inspector.js
index 618f2f179ca..6cfda745fda 100644
--- a/browser/base/content/inspector.js
+++ b/browser/base/content/inspector.js
@@ -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.
-        return null;
-    } else if (!parentNode.localName) {
+      // parent is document element, but no window at defaultView.
+      return null;
+    }
+    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;
       }

From be59f679663d5971203a9e7a20e0a9579a3d33dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?D=C3=A3o=20Gottwald?= 
Date: Tue, 5 Jul 2011 16:57:32 +0200
Subject: [PATCH 5/8] Bug 667314 - Don't loop infinitely when closing the
 selected tab in the Ctrl+Tab panel. r=gavin

---
 browser/base/content/browser-tabPreviews.js  | 19 +++++++++----------
 browser/base/content/tabbrowser.xml          |  2 +-
 browser/base/content/test/browser_ctrlTab.js | 10 ++++++++++
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/browser/base/content/browser-tabPreviews.js b/browser/base/content/browser-tabPreviews.js
index 20bd6c7689f..6cde0582fdd 100644
--- a/browser/base/content/browser-tabPreviews.js
+++ b/browser/base/content/browser-tabPreviews.js
@@ -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);
diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml
index 24f8d8a4d40..42c19d53935 100644
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -96,7 +96,7 @@
         
       
       
diff --git a/browser/base/content/test/browser_ctrlTab.js b/browser/base/content/test/browser_ctrlTab.js
index 32622750a6e..9131e6ec667 100644
--- a/browser/base/content/test/browser_ctrlTab.js
+++ b/browser/base/content/test/browser_ctrlTab.js
@@ -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);
 

From 3223b9e259a2cd7b58971b6a7e0690c3f92670e4 Mon Sep 17 00:00:00 2001
From: Gavin Sharp 
Date: Tue, 5 Jul 2011 12:15:06 -0400
Subject: [PATCH 6/8] Bug 668134: telemetry notification should be disabled in
 the testing profile

--HG--
extra : rebase_source : 1d0dfa183b8228366af2cb06297d40a43a16285a
---
 build/automation.py.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build/automation.py.in b/build/automation.py.in
index 41b652ee00e..c67a9a88b25 100644
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -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

From 822098fe3180182b1cd67702228b3deeef187ec5 Mon Sep 17 00:00:00 2001
From: Boris Zbarsky 
Date: Tue, 5 Jul 2011 12:54:15 -0400
Subject: [PATCH 7/8] Added tag AURORA_BASE_20110705 for changeset 5eb553dd2cea

---
 .hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags b/.hgtags
index 3ee11aa0273..2aeaf2ede6d 100644
--- a/.hgtags
+++ b/.hgtags
@@ -66,3 +66,4 @@ a95d426422816513477e5863add1b00ac7041dcb AURORA_BASE_20110412
 9eae975b3d6fb7748fe5a3c0113d449b1c7cc0b2 AURORA_BASE_20110524
 138f593553b66c9f815e8f57870c19d6347f7702 UPDATE_PACKAGING_R14
 462c726144bc1fb45b61e774f64ac5d61b4e047c UPDATE_PACKAGING_R14
+5eb553dd2ceae5f88d80f27afc5ef3935c5d43b0 AURORA_BASE_20110705

From 7271e89ea87c0ff05d636aea1d59b67d2d177563 Mon Sep 17 00:00:00 2001
From: Boris Zbarsky 
Date: Tue, 5 Jul 2011 12:59:19 -0400
Subject: [PATCH 8/8] Version bump from 7.0a1 to 8.0a1

---
 browser/config/version.txt  | 2 +-
 config/milestone.txt        | 2 +-
 js/src/config/milestone.txt | 2 +-
 mobile/confvars.sh          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/browser/config/version.txt b/browser/config/version.txt
index 25a852bfe95..d486059b2d6 100644
--- a/browser/config/version.txt
+++ b/browser/config/version.txt
@@ -1 +1 @@
-7.0a1
+8.0a1
diff --git a/config/milestone.txt b/config/milestone.txt
index 81a286596b1..e824b136b9d 100644
--- a/config/milestone.txt
+++ b/config/milestone.txt
@@ -10,4 +10,4 @@
 # hardcoded milestones in the tree from these two files.
 #--------------------------------------------------------
 
-7.0a1
+8.0a1
diff --git a/js/src/config/milestone.txt b/js/src/config/milestone.txt
index 81a286596b1..e824b136b9d 100644
--- a/js/src/config/milestone.txt
+++ b/js/src/config/milestone.txt
@@ -10,4 +10,4 @@
 # hardcoded milestones in the tree from these two files.
 #--------------------------------------------------------
 
-7.0a1
+8.0a1
diff --git a/mobile/confvars.sh b/mobile/confvars.sh
index fce3e498b8c..4b5cbaeaeac 100644
--- a/mobile/confvars.sh
+++ b/mobile/confvars.sh
@@ -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