merge fx-team to mozilla-central
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 23 Jan 2014 10:19:26 +0100
changeset 180812 96e031fede3f9e663e2eae3d944488f2d95ae132
parent 180796 d418cc97bacb83e47684134af5d496c583e67341 (current diff)
parent 180811 4200ecc6b162a660a687473ccaf2f8e20f47b689 (diff)
child 180836 1a75d37e1e39bf821513a907ab6ff50d7763333f
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge fx-team to mozilla-central
browser/base/content/browser.js
browser/base/content/browser.xul
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -260,17 +260,16 @@ toolbarpaletteitem > #personal-bookmarks
 #personal-bookmarks[cui-areatype="toolbar"].overflowedItem > #bookmarks-toolbar-placeholder {
   display: -moz-box;
 }
 
 #zoom-controls[cui-areatype="toolbar"]:not(.overflowedItem) > #zoom-reset-button > .toolbarbutton-text {
   display: -moz-box;
 }
 
-#wrapper-urlbar-container > #urlbar-container > #urlbar-wrapper > #urlbar > toolbarbutton,
 #urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
 #urlbar-reload-button[displaystop] {
   visibility: collapse;
 }
 
 #PanelUI-feeds > .feed-toolbarbutton:-moz-locale-dir(rtl) {
   direction: rtl;
 }
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -6428,20 +6428,20 @@ var gIdentityHandler = {
     let unknown = false;
     try {
       uri.host;
     } catch (e) { unknown = true; }
 
     // Chrome URIs however get special treatment. Some chrome URIs are
     // whitelisted to provide a positive security signal to the user.
     let chromeWhitelist = ["about:addons", "about:app-manager", "about:config",
-                           "about:crashes", "about:healthreport", "about:home",
-                           "about:newaddon", "about:permissions", "about:preferences",
-                           "about:privatebrowsing", "about:sessionstore",
-                           "about:support", "about:welcomeback"];
+                           "about:crashes", "about:customizing", "about:healthreport",
+                           "about:home", "about:newaddon", "about:permissions",
+                           "about:preferences", "about:privatebrowsing",
+                           "about:sessionstore", "about:support", "about:welcomeback"];
     let lowercaseSpec = uri.spec.toLowerCase();
     if (chromeWhitelist.some(function(whitelistedSpec) lowercaseSpec.startsWith(whitelistedSpec))) {
       this.setMode(this.IDENTITY_MODE_CHROMEUI);
     } else if (unknown) {
       this.setMode(this.IDENTITY_MODE_UNKNOWN);
     } else if (state & nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL) {
       this.setMode(this.IDENTITY_MODE_IDENTIFIED);
     } else if (state & nsIWebProgressListener.STATE_IS_SECURE) {
--- a/browser/components/customizableui/content/aboutCustomizing.xhtml
+++ b/browser/components/customizableui/content/aboutCustomizing.xhtml
@@ -13,11 +13,13 @@
   <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
   %browserDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml"
       disablefastfind="true">
 	<head>
 		<title>&customizeMode.tabTitle;</title>
+		<link rel="icon" type="image/x-icon"
+		      href="chrome://browser/skin/customizableui/customizeFavicon.ico"/>
 	</head>
 	<body></body>
 </html>
--- a/browser/devtools/scratchpad/scratchpad.js
+++ b/browser/devtools/scratchpad/scratchpad.js
@@ -977,16 +977,17 @@ var Scratchpad = {
         let chrome = Services.prefs.getBoolPref(DEVTOOLS_CHROME_ENABLED);
 
         if (chrome && modeline["-sp-context"] === "browser") {
           this.setBrowserContext();
         }
 
         this.editor.setText(content);
         this.editor.clearHistory();
+        this.dirty = false;
         document.getElementById("sp-cmd-revert").setAttribute("disabled", true);
       }
       else if (!aSilentError) {
         window.alert(this.strings.GetStringFromName("openFile.failed"));
       }
 
       if (aCallback) {
         aCallback.call(this, aStatus, content);
--- a/browser/devtools/scratchpad/test/browser_scratchpad_files.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_files.js
@@ -48,16 +48,19 @@ function fileImported(aStatus, aFileCont
      "the temporary file was imported successfully with Scratchpad");
 
   is(aFileContent, gFileContent,
      "received data is correct");
 
   is(gScratchpad.getText(), gFileContent,
      "the editor content is correct");
 
+  is(gScratchpad.dirty, false,
+     "the editor marks imported file as saved");
+
   // Save the file after changes.
   gFileContent += "// omg, saved!";
   gScratchpad.editor.setText(gFileContent);
 
   gScratchpad.exportToFile(gFile.QueryInterface(Ci.nsILocalFile), true, true,
                           fileExported);
 }
 
--- a/browser/metro/base/content/contenthandlers/ContextMenuHandler.js
+++ b/browser/metro/base/content/contenthandlers/ContextMenuHandler.js
@@ -160,16 +160,23 @@ var ContextMenuHandler = {
   _onCopy: function _onCopy() {
     if (Util.isTextInput(this._target)) {
       let edit = this._target.QueryInterface(Ci.nsIDOMNSEditableElement);
       if (edit) {
         edit.editor.copy();
       } else {
         Util.dumpLn("error: target element does not support nsIDOMNSEditableElement");
       }
+    } else if (Util.isEditableContent(this._target)) {
+      try {
+        this._target.ownerDocument.execCommand("copy", false);
+      } catch (ex) {
+        dump("ContextMenuHandler: exception copying from contentEditable: " +
+          ex.message + "\n");
+      }
     } else {
       let selectionText = this._previousState.string;
 
       Cc["@mozilla.org/widget/clipboardhelper;1"]
         .getService(Ci.nsIClipboardHelper).copyString(selectionText);
     }
     this.reset();
   },
--- a/browser/metro/base/tests/mochitest/browser_context_menu_tests.js
+++ b/browser/metro/base/tests/mochitest/browser_context_menu_tests.js
@@ -739,55 +739,142 @@ gTests.push({
     ok(ContextUI.tabbarVisible, "Tabbar is visible on context menu action.");
 
     ContextUI.dismiss();
     yield waitForCondition(() => !ContextUI.navbarVisible);
 
     // Case #2: Document isn't in design mode and text is selected.
     tabWindow.getSelection().selectAllChildren(testSpan);
 
-    let promise = waitForEvent(tabWindow.document, "popupshown");
+    let promise = waitForEvent(document, "popupshown");
     sendContextMenuClickToSelection(tabWindow);
     yield promise;
 
     checkContextUIMenuItemVisibility(["context-copy", "context-search"]);
 
     promise = waitForEvent(document, "popuphidden");
     ContextMenuUI.hide();
     yield promise;
 
     // Case #3: Document is in design mode and nothing is selected.
     tabWindow.document.designMode = "on";
     tabWindow.getSelection().removeAllRanges();
 
-    promise = waitForEvent(tabWindow.document, "popupshown");
+    promise = waitForEvent(document, "popupshown");
     sendContextMenuClickToElement(tabWindow, testSpan);
     yield promise;
 
     checkContextUIMenuItemVisibility(["context-select-all", "context-select"]);
 
     promise = waitForEvent(document, "popuphidden");
     ContextMenuUI.hide();
     yield promise;
 
     // Case #4: Document is in design mode and text is selected.
     tabWindow.getSelection().selectAllChildren(testSpan);
 
-    promise = waitForEvent(tabWindow.document, "popupshown");
+    promise = waitForEvent(document, "popupshown");
     sendContextMenuClickToSelection(tabWindow);
     yield promise;
 
     checkContextUIMenuItemVisibility(["context-cut", "context-copy",
                                       "context-select-all", "context-select",
                                       "context-search"]);
 
     promise = waitForEvent(document, "popuphidden");
     ContextMenuUI.hide();
     yield promise;
 
     Browser.closeTab(Browser.selectedTab, { forceClose: true });
   }
 });
 
+gTests.push({
+  desc: "Bug 961702 - 'Copy' context menu action does not copy rich content " +
+        "while document in design mode (or inside container that allows to " +
+        "edit its content)",
+  run: function test() {
+    info(chromeRoot + "browser_context_menu_tests_05.html");
+    yield addTab(chromeRoot + "browser_context_menu_tests_05.html");
+
+    purgeEventQueue();
+    emptyClipboard();
+    ContextUI.dismiss();
+
+    yield waitForCondition(() => !ContextUI.navbarVisible);
+
+    let tabWindow = Browser.selectedTab.browser.contentWindow;
+    let testDiv = tabWindow.document.getElementById("div1");
+
+    // Case #1: Document is in design mode.
+    tabWindow.document.designMode = "on";
+
+    let promise = waitForEvent(document, "popupshown");
+    sendContextMenuClickToElement(tabWindow, testDiv);
+    yield promise;
+
+    let selectAllMenuItem = document.getElementById("context-select-all");
+    promise = waitForEvent(document, "popuphidden");
+    sendNativeTap(selectAllMenuItem);
+    yield promise;
+
+    promise = waitForEvent(document, "popupshown");
+    sendContextMenuClickToSelection(tabWindow);
+    yield promise;
+
+    let copyMenuItem = document.getElementById("context-copy");
+    promise = waitForEvent(document, "popuphidden");
+    sendNativeTap(copyMenuItem);
+    yield promise;
+
+    // The wait is needed to give time to populate the clipboard.
+    let clipboardContent = "";
+    let contentToCopy = tabWindow.document.body.innerHTML;
+    yield waitForCondition(function () {
+      clipboardContent = SpecialPowers.getClipboardData("text/html");
+      return clipboardContent == contentToCopy;
+    });
+    ok(clipboardContent == contentToCopy, "Rich content copied.");
+
+    // Case #2: Container with editable content.
+    emptyClipboard();
+    tabWindow.document.designMode = "off";
+    tabWindow.getSelection().removeAllRanges();
+
+    promise = waitForEvent(tabWindow.document.body, "focus");
+    sendNativeTap(testDiv);
+    yield promise;
+
+    promise = waitForEvent(document, "popupshown");
+    sendContextMenuClickToElement(tabWindow, testDiv);
+    yield promise;
+
+    selectAllMenuItem = document.getElementById("context-select-all");
+    promise = waitForEvent(document, "popuphidden");
+    sendNativeTap(selectAllMenuItem);
+    yield promise;
+
+    promise = waitForEvent(document, "popupshown");
+    sendContextMenuClickToSelection(tabWindow);
+    yield promise;
+
+    copyMenuItem = document.getElementById("context-copy");
+    promise = waitForEvent(document, "popuphidden");
+    sendNativeTap(copyMenuItem);
+    yield promise;
+
+     // The wait is needed to give time to populate the clipboard.
+    clipboardContent = "";
+    contentToCopy = testDiv.innerHTML;
+    yield waitForCondition(function () {
+      clipboardContent = SpecialPowers.getClipboardData("text/html");
+      return clipboardContent == contentToCopy;
+    });
+    ok(clipboardContent == contentToCopy, "Rich content copied.");
+
+    Browser.closeTab(Browser.selectedTab, { forceClose: true });
+  }
+});
+
 function test() {
   setDevPixelEqualToPx();
   runTests();
 }
copy from browser/metro/base/tests/mochitest/browser_context_menu_tests_04.html
copy to browser/metro/base/tests/mochitest/browser_context_menu_tests_05.html
--- a/browser/metro/base/tests/mochitest/browser_context_menu_tests_04.html
+++ b/browser/metro/base/tests/mochitest/browser_context_menu_tests_05.html
@@ -1,15 +1,15 @@
 <!DOCTYPE html>
 <html>
   <head>
     <style>
     </style>
   </head>
 <body style="padding: 10px; margin: 10px;">
-  <div style="margin: 0; padding: 200px 0;">
-    <span id="text1">hello, I'm sorry but I <a id="text1-link" href="#test">must be going</a>.</span>
-  </div>
-  <div style="margin: 0; padding: 200px 0;">
-    <span id="text2"><a id="text2-link" href="#test">hello, I'm sorry but</a> I must be going.</span>
+  <span id="text1">Test text</span>
+  <div contenteditable="true" id="div1" style="border: 2px solid blue; width: 200px; height: 200px;">
+    <table>
+      <tr><td>Test content</td></tr>
+    </table>
   </div>
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/browser/metro/base/tests/mochitest/metro.ini
+++ b/browser/metro/base/tests/mochitest/metro.ini
@@ -1,14 +1,15 @@
 [DEFAULT]
 support-files =
   browser_context_menu_tests_01.html
   browser_context_menu_tests_02.html
   browser_context_menu_tests_03.html
   browser_context_menu_tests_04.html
+  browser_context_menu_tests_05.html
   browser_findbar.html
   browser_form_auto_complete.html
   browser_form_selects.html
   browser_link_click.html
   browser_onscreen_keyboard.html
   browser_progress_indicator.xul
   browser_selection_basic.html
   browser_selection_caretfocus.html
--- a/browser/themes/linux/jar.mn
+++ b/browser/themes/linux/jar.mn
@@ -22,16 +22,17 @@ browser.jar:
   skin/classic/browser/actionicon-tab.png
 * skin/classic/browser/browser.css
 * skin/classic/browser/browser-lightweightTheme.css
   skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
   skin/classic/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
   skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
   skin/classic/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)
+  skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
 * skin/classic/browser/engineManager.css
   skin/classic/browser/fullscreen-darknoise.png
   skin/classic/browser/Geolocation-16.png
   skin/classic/browser/Geolocation-64.png
   skin/classic/browser/identity.png
   skin/classic/browser/identity-icons-generic.png
   skin/classic/browser/identity-icons-https.png
   skin/classic/browser/identity-icons-https-ev.png
--- a/browser/themes/osx/jar.mn
+++ b/browser/themes/osx/jar.mn
@@ -22,16 +22,17 @@ browser.jar:
   skin/classic/browser/actionicon-tab@2x.png
 * skin/classic/browser/browser.css                          (browser.css)
 * skin/classic/browser/browser-lightweightTheme.css
   skin/classic/browser/click-to-play-warning-stripes.png
   skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
   skin/classic/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
   skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
   skin/classic/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)
+  skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
 * skin/classic/browser/engineManager.css                    (engineManager.css)
   skin/classic/browser/fullscreen-darknoise.png
   skin/classic/browser/Geolocation-16.png
   skin/classic/browser/Geolocation-16@2x.png
   skin/classic/browser/Geolocation-64.png
   skin/classic/browser/Geolocation-64@2x.png
   skin/classic/browser/home.png
   skin/classic/browser/identity.png
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c7bd843393e11b33e14e6074083497e1b9fa5799
GIT binary patch
literal 1084
zc${NkU}Ruo5D;JhgEB@21~nk9pa9`7U}9jH0~G5F@N?(olHvji@p^i=1OaJ~4gn4}
zASwU(e<F~QEOCt}3C>R|DNig)WpGT%PfAtr%uP&B4N6T+sVqF1YQw<5DB<bi7*cU-
zPOxLpAp?=xC7zL2xC_K%Pl`mWtYB)F%)crf(Ka_If%Trlxd(2sH(7n7&;ECw5i!B(
z{u%$exM%y9{9pPh@rwn6z|0p9Z1&8S=oIc=&vzz7xKr3a?w@hFO7Hc%0(HA<ul?P8
zmaV&zNi1Uh{R<+W1XfOQ3KV(K8XM<7+0y2G^R-=Z4qlzVAL@RxaTj1Y!}~suXZ;6}
z{+Z>9tC&(Fove?toGM*cxxUMmao4w_+kX61eW)OiZvS${0lT_6dqVXccz^o^pJV@f
z!KJ_W(Xx|k;v6^_Q>A9+xpGX=zU*>qb!p=+nSS-YUR}GHIcuyo2%p%*v+w<TkJsCC
z7nD9f?`>ilmhkoK&%&D@6!&>O=g)45XJlhIlbku>^<wdhpiuX8^>bP0l+c7F)Iss0
z01oxys;VzUhB}iIB-GD@o%Xx!AhOqV+M);!)zqt24r0Ar)pCj*to&b@9X70A@r(B_
z(~<2BH_DDC2MQ{buy!*fvKq3gcpOsV40`lsUSp?>B&YN-PIs$oHl^w3=2$2H{e8(l
zNo9uinaDJL*6!+OY@fxAmw$e)UED9Z@Ee2loMb=a$x`*xL|Nz8EV^!$q?hf#X|>bg
z^uM#$eK_;~#~S9lQl%2Rbb9=Kf>bWa$%}Qn-nv^UvSek$y7I00*LS@OQz);xHBq_3
zUhV_;<v%{cD+>efdA^^N8q2nx!AFX#)kX5);fEU*#BlstbkW0r>x_?opiWxQ+OWkj
z?|fLMIaHRU%n<6-Ka}uukL&E{+pk1ky#1@u<ju~{%e(8?0^eQI$%gJXnNB_Jy0J4n
zLFbu9w8PRM!A;ey$CCPl_`iJr8favBtLPa+4F7j;XC>`9#|8WOD^B%^i%LjK7qU)Y
z*&f?er08d{`EhK#i@siheX+yUtgBb&d8r=N<2@{py1nr96u<X-?=nAsF5YyaIQ`dA
zpUGn4&*smad{!>_*@N}FbPo6xo~&R!X7_w{xc&iyL%RMerau=eo}&BU+qZQy{k~Ss
z-E>?%@8(Y4S|e9O_m|NPyKPVPPxP=gORZV3U(@)OQO>o+hm|jeJ+PO1x;}C7#Ra>a
z99h^O6tI--lC70!-ncK``S!ZW%PRlto{kn<yKe1%t?#+F%d`WurbSsbG1UYW$q0)4
zIR59$hk&KCU#~8UZwU{0z|JMRqgD5rkjM{SR;#aKH6I?|Q1}qvz{pVH^(goLDb0V#
G=@S4aY{yXm
--- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css
+++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css
@@ -1,16 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %filter substitution
 
 %define menuPanelWidth 22.35em
-%define panelTextSize 1rem
 %define exitSubviewGutterWidth 38px
 %define buttonStateHover :not(:-moz-any([disabled],[checked="true"],[open],:active)):hover
 %define buttonStateActive :not([disabled]):-moz-any([open],[checked="true"],:hover:active)
 
 %include ../browser.inc
 
 .panel-subviews {
   background-image: linear-gradient(to bottom, white 1px, rgba(255, 255, 255, 0) 15px);
@@ -62,26 +61,18 @@
   padding: 0;
   box-shadow: none;
 }
 
 #PanelUI-contents {
   padding: .5em 0;
 }
 
-toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) > .toolbarbutton-text,
-.panelUI-grid .panel-combined-button > .toolbarbutton-text,
-.widget-overflow-list .toolbarbutton-menubutton-button > .toolbarbutton-text,
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-text {
-  font-size: @panelTextSize@;
-}
-
 .panelUI-grid .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text,
 .panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text {
-  font-size: @panelTextSize@;
   margin: 2px 0 0;
   text-align: center;
   -moz-hyphens: auto;
 }
 
 #wrapper-edit-controls:-moz-any([place="palette"],[place="panel"]) > #edit-controls,
 #wrapper-zoom-controls:-moz-any([place="palette"],[place="panel"]) > #zoom-controls {
   -moz-margin-start: 0;
--- a/browser/themes/windows/jar.mn
+++ b/browser/themes/windows/jar.mn
@@ -24,16 +24,17 @@ browser.jar:
         skin/classic/browser/actionicon-tab.png
 *       skin/classic/browser/browser.css
 *       skin/classic/browser/browser-lightweightTheme.css
         skin/classic/browser/click-to-play-warning-stripes.png
         skin/classic/browser/customizableui/background-noise-toolbar.png  (customizableui/background-noise-toolbar.png)
         skin/classic/browser/customizableui/customizeMode-gridTexture.png  (customizableui/customizeMode-gridTexture.png)
         skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png  (customizableui/customizeMode-separatorHorizontal.png)
         skin/classic/browser/customizableui/customizeMode-separatorVertical.png  (customizableui/customizeMode-separatorVertical.png)
+        skin/classic/browser/customizableui/customizeFavicon.ico  (../shared/customizableui/customizeFavicon.ico)
 *       skin/classic/browser/engineManager.css
         skin/classic/browser/fullscreen-darknoise.png
         skin/classic/browser/Geolocation-16.png
         skin/classic/browser/Geolocation-64.png
         skin/classic/browser/Info.png
         skin/classic/browser/identity.png
         skin/classic/browser/identity-icons-generic.png
         skin/classic/browser/identity-icons-https.png
--- a/gfx/2d/SourceSurfaceD2DTarget.cpp
+++ b/gfx/2d/SourceSurfaceD2DTarget.cpp
@@ -138,19 +138,24 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1R
     return nullptr;
   }
 
   D2D1_BITMAP_PROPERTIES props = D2D1::BitmapProperties(D2DPixelFormat(mFormat));
   hr = aRT->CreateSharedBitmap(IID_IDXGISurface, surf, &props, byRef(mBitmap));
 
   if (FAILED(hr)) {
     // This seems to happen for SurfaceFormat::A8 sometimes...
-    aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
-                      D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
-                      byRef(mBitmap));
+    hr = aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
+                           D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
+                           byRef(mBitmap));
+
+    if (FAILED(hr)) {
+      gfxWarning() << "Failed in CreateBitmap. Code: " << hr;
+      return nullptr;
+    }
 
     RefPtr<ID2D1RenderTarget> rt;
 
     if (mDrawTarget) {
       rt = mDrawTarget->mRT;
     }
 
     if (!rt) {
--- a/gfx/layers/d3d11/CompositorD3D11.cpp
+++ b/gfx/layers/d3d11/CompositorD3D11.cpp
@@ -680,18 +680,18 @@ CompositorD3D11::BeginFrame(const nsIntR
   NS_ASSERTION(mHwnd, "Couldn't find an HWND when initialising?");
   if (::IsIconic(mHwnd)) {
     *aRenderBoundsOut = Rect();
     return;
   }
 
   UpdateRenderTarget();
 
-  // Failed to create a render target.
-  if (!mDefaultRT ||
+  // Failed to create a render target or the view.
+  if (!mDefaultRT || !mDefaultRT->mRTView ||
       mSize.width == 0 || mSize.height == 0) {
     *aRenderBoundsOut = Rect();
     return;
   }
 
   mContext->IASetInputLayout(mAttachments->mInputLayout);
 
   ID3D11Buffer* buffer = mAttachments->mVertexBuffer;
--- a/mobile/android/base/AndroidManifest.xml.in
+++ b/mobile/android/base/AndroidManifest.xml.in
@@ -78,16 +78,18 @@
                  android:name="org.mozilla.gecko.GeckoApplication"
 		 android:hardwareAccelerated="true"
 #if MOZILLA_OFFICIAL
 		 android:debuggable="false">
 #else
 		 android:debuggable="true">
 #endif
 
+        <!-- If the windowSoftInputMode adjust* flag changes below, the
+             setSoftInputMode call in BrowserSearch#onStop must also be updated. -->
         <activity android:name=".App"
                   android:label="@MOZ_APP_DISPLAYNAME@"
                   android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
                   android:windowSoftInputMode="stateUnspecified|adjustResize"
                   android:launchMode="singleTask"
                   android:theme="@style/Gecko.App">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
--- a/mobile/android/base/home/BrowserSearch.java
+++ b/mobile/android/base/home/BrowserSearch.java
@@ -37,28 +37,28 @@ import android.text.TextUtils;
 import android.util.AttributeSet;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.view.ViewStub;
+import android.view.WindowManager;
 import android.view.WindowManager.LayoutParams;
 import android.view.animation.AccelerateInterpolator;
 import android.view.animation.Animation;
 import android.view.animation.TranslateAnimation;
 import android.widget.AdapterView;
 import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.TextView;
 
 import java.util.ArrayList;
 import java.util.EnumSet;
-import java.util.List;
 
 /**
  * Fragment that displays frecency search results in a ListView.
  */
 public class BrowserSearch extends HomeFragment
                            implements GeckoEventListener {
     // Logging tag name
     private static final String LOGTAG = "GeckoBrowserSearch";
@@ -105,19 +105,16 @@ public class BrowserSearch extends HomeF
     private boolean mSuggestionsEnabled;
 
     // Callbacks used for the search loader
     private CursorLoaderCallbacks mCursorLoaderCallbacks;
 
     // Callbacks used for the search suggestion loader
     private SuggestionLoaderCallbacks mSuggestionLoaderCallbacks;
 
-    // Inflater used by the adapter
-    private LayoutInflater mInflater;
-
     // Autocomplete handler used when filtering results
     private AutocompleteHandler mAutocompleteHandler;
 
     // On URL open listener
     private OnUrlOpenListener mUrlOpenListener;
 
     // On search listener
     private OnSearchListener mSearchListener;
@@ -172,25 +169,22 @@ public class BrowserSearch extends HomeF
         }
 
         try {
             mEditSuggestionListener = (OnEditSuggestionListener) activity;
         } catch (ClassCastException e) {
             throw new ClassCastException(activity.toString()
                     + " must implement BrowserSearch.OnEditSuggestionListener");
         }
-
-        mInflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
     }
 
     @Override
     public void onDetach() {
         super.onDetach();
 
-        mInflater = null;
         mAutocompleteHandler = null;
         mUrlOpenListener = null;
         mSearchListener = null;
         mEditSuggestionListener = null;
     }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
@@ -202,16 +196,33 @@ public class BrowserSearch extends HomeF
     @Override
     public void onDestroy() {
         super.onDestroy();
 
         mSearchEngines = null;
     }
 
     @Override
+    public void onStart() {
+        super.onStart();
+
+        // Adjusting the window size when showing the keyboard results in the underlying
+        // activity being painted when the keyboard is hidden (bug 933422). This can be
+        // prevented by not resizing the window.
+        getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+
+        getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
+    }
+
+    @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         // All list views are styled to look the same with a global activity theme.
         // If the style of the list changes, inflate it from an XML.
         mView = (LinearLayout) inflater.inflate(R.layout.browser_search, container, false);
         mList = (HomeListView) mView.findViewById(R.id.home_list_view);
 
         return mView;
     }
--- a/mobile/android/base/home/PanelManager.java
+++ b/mobile/android/base/home/PanelManager.java
@@ -16,17 +16,16 @@ import org.json.JSONObject;
 
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.preference.PreferenceManager;
 import android.text.TextUtils;
 import android.util.Log;
 
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
 public class PanelManager implements GeckoEventListener {
     private static final String LOGTAG = "GeckoPanelManager";
 
@@ -46,17 +45,17 @@ public class PanelManager implements Gec
 
     public interface RequestCallback {
         public void onComplete(List<PanelInfo> panelInfos);
     }
 
     private static AtomicInteger sRequestId = new AtomicInteger(0);
 
     // Stores set of pending request callbacks.
-    private static final Map<Integer, RequestCallback> sCallbacks = Collections.synchronizedMap(new HashMap<Integer, RequestCallback>());
+    private static final Map<Integer, RequestCallback> sCallbacks = new HashMap<Integer, RequestCallback>();
 
     /**
      * Asynchronously fetches list of available panels from Gecko.
      *
      * @param callback onComplete will be called on the UI thread.
      */
     public void requestAvailablePanels(RequestCallback callback) {
         final int requestId = sRequestId.getAndIncrement();
--- a/toolkit/themes/windows/global/popup.css
+++ b/toolkit/themes/windows/global/popup.css
@@ -128,18 +128,17 @@ panel[type="arrow"][side="right"] {
   transform: scaleX(-1);
   margin-left: -5px;
 }
 
 %ifdef XP_WIN
 @media (-moz-windows-default-theme) {
   .panel-arrowcontent {
     border-color: hsla(210,4%,10%,.2);
-    box-shadow: 0 3px 5px hsla(210,4%,10%,.1),
-                0 0 7px hsla(210,4%,10%,.1);
+    box-shadow: 0 0 4px hsla(210,4%,10%,.2);
   }
 
   .panel-arrow[side="top"],
   .panel-arrow[side="bottom"] {
     list-style-image: url("chrome://global/skin/arrow/panelarrow-vertical.svg");
   }
 
   .panel-arrow[side="left"],