diff options
Diffstat (limited to 'unity-menubar.patch')
-rw-r--r-- | unity-menubar.patch | 90 |
1 files changed, 40 insertions, 50 deletions
diff --git a/unity-menubar.patch b/unity-menubar.patch index 2be5af7fa76e..ee88291d15cc 100644 --- a/unity-menubar.patch +++ b/unity-menubar.patch @@ -14,7 +14,7 @@ <menu id="file-menu" data-l10n-id="menu-file"> --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js -@@ -6463,11 +6463,17 @@ function onViewToolbarsPopupShowing(aEve +@@ -6373,11 +6373,17 @@ function onViewToolbarsPopupShowing(aEve let toolbarNodes = gNavToolbox.querySelectorAll("toolbar"); @@ -32,9 +32,9 @@ let menuItem = document.createXULElement("menuitem"); let hidingAttribute = toolbar.getAttribute("type") == "menubar" ? "autohide" : "collapsed"; ---- a/browser/components/places/content/places.xul -+++ b/browser/components/places/content/places.xul -@@ -166,7 +166,7 @@ +--- a/browser/components/places/content/places.xhtml ++++ b/browser/components/places/content/places.xhtml +@@ -171,7 +171,7 @@ <toolbarbutton type="menu" class="tabbable" onpopupshowing="document.getElementById('placeContent').focus()" #else @@ -45,7 +45,7 @@ id="organizeButton" label="&organize.label;" --- a/dom/xul/XULPopupElement.cpp +++ b/dom/xul/XULPopupElement.cpp -@@ -156,6 +156,10 @@ void XULPopupElement::GetState(nsString& +@@ -158,6 +158,10 @@ void XULPopupElement::GetState(nsString& // set this here in case there's no frame for the popup aState.AssignLiteral("closed"); @@ -56,7 +56,7 @@ nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(GetPrimaryFrame()); if (menuPopupFrame) { switch (menuPopupFrame->PopupState()) { -@@ -179,6 +183,11 @@ void XULPopupElement::GetState(nsString& +@@ -181,6 +185,11 @@ void XULPopupElement::GetState(nsString& break; } } @@ -70,7 +70,7 @@ nsINode* XULPopupElement::GetTriggerNode() const { --- a/dom/xul/moz.build +++ b/dom/xul/moz.build -@@ -82,6 +82,11 @@ LOCAL_INCLUDES += [ +@@ -83,6 +83,11 @@ LOCAL_INCLUDES += [ include('/ipc/chromium/chromium-config.mozbuild') @@ -97,7 +97,7 @@ 'components.conf', --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js -@@ -311,6 +311,9 @@ pref("dom.mouseevent.click.hack.use_lega +@@ -317,6 +317,9 @@ pref("dom.mouseevent.click.hack.use_lega // of content viewers to cache based on the amount of available memory. pref("browser.sessionhistory.max_total_viewers", -1); @@ -109,7 +109,7 @@ pref("ui.android.mouse_as_touch", 1); --- a/toolkit/content/xul.css +++ b/toolkit/content/xul.css -@@ -201,6 +201,13 @@ toolbar[type="menubar"] { +@@ -204,6 +204,13 @@ toolbar[type="menubar"] { } %endif @@ -125,10 +125,10 @@ } --- a/widget/gtk/moz.build +++ b/widget/gtk/moz.build -@@ -53,6 +53,15 @@ UNIFIED_SOURCES += [ - ] +@@ -55,6 +55,15 @@ UNIFIED_SOURCES += [ SOURCES += [ + 'MediaKeysEventSourceFactory.cpp', + 'nsDbusmenu.cpp', + 'nsMenu.cpp', # conflicts with X11 headers + 'nsMenuBar.cpp', @@ -141,7 +141,7 @@ 'nsWindow.cpp', # conflicts with X11 headers 'WaylandVsyncSource.cpp', # conflicts with X11 headers ] -@@ -130,6 +139,7 @@ FINAL_LIBRARY = 'xul' +@@ -132,6 +141,7 @@ FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ '/layout/base', '/layout/generic', @@ -319,7 +319,7 @@ +#endif /* __nsDbusmenu_h__ */ --- /dev/null +++ b/widget/gtk/nsMenu.cpp -@@ -0,0 +1,798 @@ +@@ -0,0 +1,797 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -336,7 +336,6 @@ +#include "mozilla/EventDispatcher.h" +#include "mozilla/GuardObjects.h" +#include "mozilla/MouseEvents.h" -+#include "mozilla/Move.h" +#include "mozilla/PresShell.h" +#include "mozilla/PresShellInlines.h" +#include "nsAutoPtr.h" @@ -1246,7 +1245,7 @@ +#endif /* __nsMenu_h__ */ --- /dev/null +++ b/widget/gtk/nsMenuBar.cpp -@@ -0,0 +1,550 @@ +@@ -0,0 +1,549 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -1261,7 +1260,6 @@ +#include "mozilla/dom/Event.h" +#include "mozilla/dom/KeyboardEvent.h" +#include "mozilla/dom/KeyboardEventBinding.h" -+#include "mozilla/Move.h" +#include "mozilla/Preferences.h" +#include "nsAutoPtr.h" +#include "nsContentUtils.h" @@ -1913,7 +1911,7 @@ +#endif /* __nsMenuBar_h__ */ --- /dev/null +++ b/widget/gtk/nsMenuContainer.cpp -@@ -0,0 +1,171 @@ +@@ -0,0 +1,170 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -1922,7 +1920,6 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/DebugOnly.h" -+#include "mozilla/Move.h" +#include "nsGkAtoms.h" +#include "nsIContent.h" + @@ -2160,7 +2157,7 @@ +#endif /* __nsMenuContainer_h__ */ --- /dev/null +++ b/widget/gtk/nsMenuItem.cpp -@@ -0,0 +1,764 @@ +@@ -0,0 +1,767 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -2174,7 +2171,6 @@ +#include "mozilla/dom/Element.h" +#include "mozilla/dom/KeyboardEventBinding.h" +#include "mozilla/dom/XULCommandEvent.h" -+#include "mozilla/Move.h" +#include "mozilla/Preferences.h" +#include "mozilla/TextEvents.h" +#include "nsAutoPtr.h" @@ -2744,6 +2740,10 @@ + for (uint32_t i = 0; i < count; ++i) { + nsIContent *sibling = parent->GetChildAt_Deprecated(i); + ++ if (sibling->IsComment()) { ++ continue; ++ } ++ + nsAutoString otherName; + sibling->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::name, + otherName); @@ -3099,16 +3099,16 @@ + +NS_IMPL_ISUPPORTS(nsMenuObjectIconLoader, imgINotificationObserver) + -+NS_IMETHODIMP ++void +nsMenuObjectIconLoader::Notify(imgIRequest *aProxy, + int32_t aType, const nsIntRect *aRect) +{ + if (!mOwner) { -+ return NS_OK; ++ return; + } + + if (aProxy != mImageRequest) { -+ return NS_ERROR_FAILURE; ++ return; + } + + if (aType == imgINotificationObserver::LOAD_COMPLETE) { @@ -3117,7 +3117,7 @@ + (status & imgIRequest::STATUS_ERROR)) { + mImageRequest->Cancel(NS_BINDING_ABORTED); + mImageRequest = nullptr; -+ return NS_ERROR_FAILURE; ++ return; + } + + nsCOMPtr<imgIContainer> image; @@ -3129,23 +3129,23 @@ + image->GetWidth(&width); + image->GetHeight(&height); + image->RequestDecodeForSize(nsIntSize(width, height), imgIContainer::FLAG_NONE); -+ return NS_OK; ++ return; + } + + if (aType == imgINotificationObserver::DECODE_COMPLETE) { + mImageRequest->Cancel(NS_BINDING_ABORTED); + mImageRequest = nullptr; -+ return NS_OK; ++ return; + } + + if (aType != imgINotificationObserver::FRAME_COMPLETE) { -+ return NS_OK; ++ return; + } + + nsCOMPtr<imgIContainer> img; + mImageRequest->GetImage(getter_AddRefs(img)); + if (!img) { -+ return NS_ERROR_FAILURE; ++ return; + } + + if (!mImageRect.IsEmpty()) { @@ -3158,7 +3158,7 @@ + + if (width <= 0 || height <= 0) { + mOwner->ClearIcon(); -+ return NS_OK; ++ return; + } + + if (width > 100 || height > 100) { @@ -3167,7 +3167,7 @@ + // GDbus helpfully aborts the application. Thank you :) + NS_WARNING("Icon data too large"); + mOwner->ClearIcon(); -+ return NS_OK; ++ return; + } + + GdkPixbuf *pixbuf = nsImageToPixbuf::ImageToPixbuf(img); @@ -3178,7 +3178,7 @@ + g_object_unref(pixbuf); + } + -+ return NS_OK; ++ return; +} + +void @@ -3455,7 +3455,7 @@ + if (aComputedStyle && + (aComputedStyle->StyleDisplay()->mDisplay == StyleDisplay::None || + aComputedStyle->StyleVisibility()->mVisible == -+ NS_STYLE_VISIBILITY_COLLAPSE)) { ++ StyleVisibility::Collapse)) { + vis = false; + } + @@ -3849,7 +3849,7 @@ +#endif /* __nsMenuObject_h__ */ --- /dev/null +++ b/widget/gtk/nsMenuSeparator.cpp -@@ -0,0 +1,84 @@ +@@ -0,0 +1,83 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -3858,7 +3858,6 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/Assertions.h" -+#include "mozilla/Move.h" +#include "nsAutoPtr.h" +#include "nsCRT.h" +#include "nsGkAtoms.h" @@ -4489,7 +4488,7 @@ +#endif /* __nsNativeMenuDocListener_h__ */ --- /dev/null +++ b/widget/gtk/nsNativeMenuService.cpp -@@ -0,0 +1,505 @@ +@@ -0,0 +1,504 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* vim:expandtab:shiftwidth=4:tabstop=4: + */ @@ -4498,7 +4497,6 @@ + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "mozilla/Assertions.h" -+#include "mozilla/Move.h" +#include "mozilla/Preferences.h" +#include "mozilla/UniquePtr.h" +#include "nsAutoPtr.h" @@ -5084,15 +5082,7 @@ +#endif /* __nsNativeMenuService_h__ */ --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp -@@ -74,6 +74,7 @@ - - #include "mozilla/Assertions.h" - #include "mozilla/Likely.h" -+#include "mozilla/Move.h" - #include "mozilla/Preferences.h" - #include "nsIPrefService.h" - #include "nsIServiceManager.h" -@@ -5486,6 +5487,10 @@ void nsWindow::HideWindowChrome(bool aSh +@@ -5793,6 +5793,10 @@ void nsWindow::HideWindowChrome(bool aSh SetWindowDecoration(aShouldHide ? eBorderStyle_none : mBorderStyle); } @@ -5105,7 +5095,7 @@ nsIRollupListener* rollupListener = GetActiveRollupListener(); --- a/widget/gtk/nsWindow.h +++ b/widget/gtk/nsWindow.h -@@ -40,6 +40,8 @@ +@@ -39,6 +39,8 @@ #include "IMContextWrapper.h" @@ -5114,7 +5104,7 @@ #undef LOG #ifdef MOZ_LOGGING -@@ -175,6 +177,8 @@ class nsWindow final : public nsBaseWidg +@@ -186,6 +188,8 @@ class nsWindow final : public nsBaseWidg nsIScreen* aTargetScreen = nullptr) override; virtual void HideWindowChrome(bool aShouldHide) override; @@ -5123,7 +5113,7 @@ /** * GetLastUserInputTime returns a timestamp for the most recent user input * event. This is intended for pointer grab requests (including drags). -@@ -671,6 +675,8 @@ class nsWindow final : public nsBaseWidg +@@ -712,6 +716,8 @@ class nsWindow final : public nsBaseWidg mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter; static CSDSupportLevel sCSDSupportLevel; @@ -5169,7 +5159,7 @@ import sys # Static atom definitions, used to generate nsGkAtomList.h. -@@ -2532,7 +2533,7 @@ STATIC_ATOMS = [ +@@ -2537,7 +2538,7 @@ STATIC_ATOMS = [ InheritingAnonBoxAtom("AnonBox_mozSVGForeignContent", ":-moz-svg-foreign-content"), InheritingAnonBoxAtom("AnonBox_mozSVGText", ":-moz-svg-text"), # END ATOMS @@ -5197,7 +5187,7 @@ if defined('MOZ_X11'): --- a/xpfe/appshell/AppWindow.cpp +++ b/xpfe/appshell/AppWindow.cpp -@@ -69,7 +69,7 @@ +@@ -66,7 +66,7 @@ # include "mozilla/XULStore.h" #endif |