diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
index 95dc6d3abaa7..56d585995567 100644
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -83,13 +83,9 @@ toolbar[printpreview="true"] {
}
%ifdef MENUBAR_CAN_AUTOHIDE
-#main-window[inFullscreen] > #titlebar {
+#main-window[inFullscreen] > #appmenu-button-container {
display: none;
}
-
-#titlebar {
- -moz-binding: url("chrome://global/content/bindings/general.xml#windowdragbox");
-}
%endif
toolbarpaletteitem[place="palette"] > toolbaritem > hbox[type="places"] {
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 5fca5d0e1770..27b471d3852e 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1320,15 +1320,6 @@ function prepareForStartup() {
// setup simple gestures support
gGestureSupport.init(true);
-
-#ifdef MENUBAR_CAN_AUTOHIDE
- // update the visibility of the titlebar buttons after the window is
- // displayed. (required by theme code.)
- window.addEventListener("MozAfterPaint", function () {
- window.removeEventListener("MozAfterPaint", arguments.callee, false);
- document.getElementById("titlebar-buttonbox").collapsed = false;
- }, false);
-#endif
}
function delayedStartup(isLoadingBlank, mustLoadSidebar) {
@@ -4769,20 +4760,13 @@ function updateAppButtonDisplay() {
window.menubar.visible &&
document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
- document.getElementById("titlebar").hidden = !displayAppButton;
+ document.getElementById("appmenu-button-container").hidden = !displayAppButton;
if (displayAppButton)
document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1");
else
document.documentElement.removeAttribute("chromemargin");
}
-
-function onTitlebarMaxClick() {
- if (window.windowState == window.STATE_MAXIMIZED)
- window.restore();
- else
- window.maximize();
-}
#endif
function displaySecurityInfo()
diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul
index 645b260d1bd6..c08cbed4cf51 100644
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -437,9 +437,7 @@
#ifdef MENUBAR_CAN_AUTOHIDE
-
-
-
-
+
#endif
#titlebar {
- -moz-appearance: -moz-window-titlebar-maximized;
-}
-
-#titlebar-content {
- margin-left: 15px;
- margin-right: 15px;
-}
-
-/* aesthetic - push the fx button off the top window border */
-@media not all and (-moz-windows-classic) {
- #main-window[sizemode="normal"] > #titlebar > #titlebar-content > #appmenu-button-container {
-%ifndef WINSTRIPE_AERO
- margin-top: 1px;
-%else
- margin-top: 2px;
+/* XXX: stop-gap until the button can be drawn in the title bar */
+%ifdef WINSTRIPE_AERO
+@media not all and (-moz-windows-compositor) {
%endif
+ #main-window[tabsontop="true"] > #appmenu-button-container > #appmenu-button {
+ position: relative !important;
+ margin-bottom: -1.6em !important;
}
-}
-
-#titlebar-buttonbox {
- -moz-appearance: -moz-window-button-box;
- -moz-box-align: start;
-}
-
-#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox {
- -moz-appearance: -moz-window-button-box-maximized;
-}
-
-/* titlebar command buttons */
-
-#titlebar-min {
- -moz-appearance: -moz-window-button-minimize;
-}
-
-#titlebar-max {
- -moz-appearance: -moz-window-button-maximize;
-}
-
-#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox > #titlebar-max {
- -moz-appearance: -moz-window-button-restore;
-}
-
-#titlebar-close {
- -moz-appearance: -moz-window-button-close;
-}
-
-@media not all and (-moz-windows-classic) {
- #titlebar-min {
- -moz-margin-end: 1px;
+ #navigator-toolbox[tabsontop="true"] > #toolbar-menubar[autohide="true"] {
+ position: relative !important;
+ background-color: -moz-dialog !important;
}
-
- #titlebar-max {
- -moz-margin-start: 1px;
- -moz-margin-end: 1px;
- }
-
- #titlebar-close {
- -moz-margin-start: 1px;
- -moz-margin-end: 0;
- }
-}
-
-@media all and (-moz-windows-classic) {
- #titlebar-close {
- -moz-margin-start: 2px !important;
+ #navigator-toolbox[tabsontop="true"] > #toolbar-menubar[autohide="true"] ~ #TabsToolbar:not([inFullscreen]) {
+ -moz-padding-start: 10em !important;
}
+%ifdef WINSTRIPE_AERO
}
+%endif
/* ::::: bookmark buttons ::::: */
diff --git a/content/html/document/src/nsHTMLFragmentContentSink.cpp b/content/html/document/src/nsHTMLFragmentContentSink.cpp
index 823ca70b9cd7..918d33ec4f2e 100644
--- a/content/html/document/src/nsHTMLFragmentContentSink.cpp
+++ b/content/html/document/src/nsHTMLFragmentContentSink.cpp
@@ -1100,6 +1100,10 @@ nsHTMLParanoidFragmentSink::CloseContainer(const nsHTMLTag aTag)
{
nsresult rv = NS_OK;
+ if (mIgnoreNextCloseHead && aTag == eHTMLTag_head) {
+ mIgnoreNextCloseHead = PR_FALSE;
+ return NS_OK;
+ }
if (mSkip) {
mSkip = PR_FALSE;
return rv;
@@ -1229,7 +1233,10 @@ nsHTMLParanoidFragmentSink::AddLeaf(const nsIParserNode& aNode)
nsresult rv = NS_OK;
- if (mSkip) {
+ // We need to explicitly skip adding leaf nodes in the paranoid sink,
+ // otherwise things like the textnode under get appended to
+ // the fragment itself, and won't be popped off in CloseContainer.
+ if (mSkip || mIgnoreNextCloseHead) {
return rv;
}
diff --git a/dom/plugins/PluginModuleParent.cpp b/dom/plugins/PluginModuleParent.cpp
index b136a4aefa8d..6859f7119ffa 100644
--- a/dom/plugins/PluginModuleParent.cpp
+++ b/dom/plugins/PluginModuleParent.cpp
@@ -54,6 +54,7 @@
#include "mozilla/plugins/BrowserStreamParent.h"
#include "PluginIdentifierParent.h"
+#include "nsAutoPtr.h"
#include "nsContentUtils.h"
#include "nsCRT.h"
#ifdef MOZ_CRASHREPORTER
@@ -69,6 +70,7 @@ using mozilla::ipc::SyncChannel;
using namespace mozilla::plugins;
static const char kTimeoutPref[] = "dom.ipc.plugins.timeoutSecs";
+static const char kLaunchTimeoutPref[] = "dom.ipc.plugins.processLaunchTimeoutSecs";
template<>
struct RunnableMethodTraits
@@ -84,15 +86,21 @@ PluginModuleParent::LoadModule(const char* aFilePath)
{
PLUGIN_LOG_DEBUG_FUNCTION;
+ PRInt32 prefSecs = nsContentUtils::GetIntPref(kLaunchTimeoutPref, 0);
+
// Block on the child process being launched and initialized.
- PluginModuleParent* parent = new PluginModuleParent(aFilePath);
- parent->mSubprocess->Launch();
+ nsAutoPtr parent(new PluginModuleParent(aFilePath));
+ bool launched = parent->mSubprocess->Launch(prefSecs * 1000);
+ if (!launched) {
+ // Need to set this so the destructor doesn't complain.
+ parent->mShutdown = true;
+ return nsnull;
+ }
parent->Open(parent->mSubprocess->GetChannel(),
parent->mSubprocess->GetChildProcessHandle());
TimeoutChanged(kTimeoutPref, parent);
-
- return parent;
+ return parent.forget();
}
diff --git a/dom/plugins/PluginProcessParent.cpp b/dom/plugins/PluginProcessParent.cpp
index 7ff4bd98f2d3..984fae82a502 100644
--- a/dom/plugins/PluginProcessParent.cpp
+++ b/dom/plugins/PluginProcessParent.cpp
@@ -68,11 +68,11 @@ PluginProcessParent::~PluginProcessParent()
}
bool
-PluginProcessParent::Launch()
+PluginProcessParent::Launch(PRInt32 timeoutMs)
{
vector args;
args.push_back(MungePluginDsoPath(mPluginFilePath));
- return SyncLaunch(args);
+ return SyncLaunch(args, timeoutMs);
}
void
diff --git a/dom/plugins/PluginProcessParent.h b/dom/plugins/PluginProcessParent.h
index fad22a4adb83..2755c2642fa3 100644
--- a/dom/plugins/PluginProcessParent.h
+++ b/dom/plugins/PluginProcessParent.h
@@ -61,9 +61,10 @@ public:
~PluginProcessParent();
/**
- * Synchronously launch the plugin process.
+ * Synchronously launch the plugin process. If the process fails to launch
+ * after timeoutMs, this method will return false.
*/
- bool Launch();
+ bool Launch(PRInt32 timeoutMs);
void Delete();
diff --git a/editor/libeditor/html/tests/test_bug520189.html b/editor/libeditor/html/tests/test_bug520189.html
index 8bf41534ba09..3b244b5f45e1 100644
--- a/editor/libeditor/html/tests/test_bug520189.html
+++ b/editor/libeditor/html/tests/test_bug520189.html
@@ -52,6 +52,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=520182
+
+