diff options
author | Moonchild <moonchild@palemoon.org> | 2021-05-03 12:26:37 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-05-03 12:26:37 +0000 |
commit | fc7a34ce36d66eb030094a0eb447c9ed61924e0e (patch) | |
tree | 70066c56efbbfe430472baac892e32a3bab4f04f /layout/base | |
parent | 1fef83db8258c812026d6e995d74fd2b565d7597 (diff) | |
download | aura-central-fc7a34ce36d66eb030094a0eb447c9ed61924e0e.tar.gz |
Issue mcp-graveyard/UXP%1751 -- Remove XP_MACOSX conditionals from /layout
Diffstat (limited to 'layout/base')
-rw-r--r-- | layout/base/nsCSSFrameConstructor.cpp | 33 | ||||
-rw-r--r-- | layout/base/nsCSSFrameConstructor.h | 4 | ||||
-rw-r--r-- | layout/base/nsPresContext.cpp | 14 | ||||
-rw-r--r-- | layout/base/nsPresShell.cpp | 2 |
4 files changed, 0 insertions, 53 deletions
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 9a0410d73..25a5e5810 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -1,5 +1,4 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -// vim:cindent:ts=2:et:sw=2: /* 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/. */ @@ -56,9 +55,6 @@ #include "nsXBLBinding.h" #include "nsContentUtils.h" #include "nsIScriptError.h" -#ifdef XP_MACOSX -#include "nsIDocShell.h" -#endif #include "ChildIterator.h" #include "nsError.h" #include "nsLayoutUtils.h" @@ -4334,11 +4330,7 @@ nsCSSFrameConstructor::FindXULTagData(Element* aElement, SIMPLE_XUL_CREATE(menu, NS_NewMenuFrame), SIMPLE_XUL_CREATE(menubutton, NS_NewMenuFrame), SIMPLE_XUL_CREATE(menuitem, NS_NewMenuItemFrame), -#ifdef XP_MACOSX - SIMPLE_TAG_CHAIN(menubar, nsCSSFrameConstructor::FindXULMenubarData), -#else SIMPLE_XUL_CREATE(menubar, NS_NewMenuBarFrame), -#endif /* XP_MACOSX */ SIMPLE_TAG_CHAIN(popupgroup, nsCSSFrameConstructor::FindPopupGroupData), SIMPLE_XUL_CREATE(iframe, NS_NewSubDocumentFrame), SIMPLE_XUL_CREATE(editor, NS_NewSubDocumentFrame), @@ -4413,31 +4405,6 @@ nsCSSFrameConstructor::FindXULDescriptionData(Element* aElement, return &sDescriptionData; } -#ifdef XP_MACOSX -/* static */ -const nsCSSFrameConstructor::FrameConstructionData* -nsCSSFrameConstructor::FindXULMenubarData(Element* aElement, - nsStyleContext* aStyleContext) -{ - nsCOMPtr<nsIDocShell> treeItem = - aStyleContext->PresContext()->GetDocShell(); - if (treeItem && nsIDocShellTreeItem::typeChrome == treeItem->ItemType()) { - nsCOMPtr<nsIDocShellTreeItem> parent; - treeItem->GetParent(getter_AddRefs(parent)); - if (!parent) { - // This is the root. Suppress the menubar, since on Mac - // window menus are not attached to the window. - static const FrameConstructionData sSuppressData = SUPPRESS_FCDATA(); - return &sSuppressData; - } - } - - static const FrameConstructionData sMenubarData = - SIMPLE_XUL_FCDATA(NS_NewMenuBarFrame); - return &sMenubarData; -} -#endif /* XP_MACOSX */ - /* static */ const nsCSSFrameConstructor::FrameConstructionData* nsCSSFrameConstructor::FindXULListBoxBodyData(Element* aElement, diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index abdfbf7ce..1df38b58a 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -1471,10 +1471,6 @@ private: FindXULLabelData(Element* aElement, nsStyleContext* aStyleContext); static const FrameConstructionData* FindXULDescriptionData(Element* aElement, nsStyleContext* aStyleContext); -#ifdef XP_MACOSX - static const FrameConstructionData* - FindXULMenubarData(Element* aElement, nsStyleContext* aStyleContext); -#endif /* XP_MACOSX */ static const FrameConstructionData* FindXULListBoxBodyData(Element* aElement, nsStyleContext* aStyleContext); static const FrameConstructionData* diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index f7be42b5f..8f3de7f78 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -2895,15 +2895,9 @@ nsRootPresContext::ComputePluginGeometryUpdates(nsIFrame* aFrame, aList->ComputeVisibilityForRoot(aBuilder, ®ion); } -#ifdef XP_MACOSX - // We control painting of Mac plugins, so just apply geometry updates now. - // This is not happening during a paint event. - ApplyPluginGeometryUpdates(); -#else if (XRE_IsParentProcess()) { InitApplyPluginGeometryTimer(); } -#endif } static void @@ -2939,8 +2933,6 @@ nsRootPresContext::CancelApplyPluginGeometryTimer() } } -#ifndef XP_MACOSX - static bool HasOverlap(const LayoutDeviceIntPoint& aOffset1, const nsTArray<LayoutDeviceIntRect>& aClipRects1, @@ -3025,8 +3017,6 @@ PluginGetGeometryUpdate(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins, } } -#endif // #ifndef XP_MACOSX - static void PluginDidSetGeometry(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins) { @@ -3043,7 +3033,6 @@ PluginDidSetGeometry(nsTHashtable<nsRefPtrHashKey<nsIContent>>& aPlugins) void nsRootPresContext::ApplyPluginGeometryUpdates() { -#ifndef XP_MACOSX CancelApplyPluginGeometryTimer(); nsTArray<nsIWidget::Configuration> configurations; @@ -3055,7 +3044,6 @@ nsRootPresContext::ApplyPluginGeometryUpdates() SortConfigurations(&configurations); widget->ConfigureChildren(configurations); } -#endif // #ifndef XP_MACOSX PluginDidSetGeometry(mRegisteredPlugins); } @@ -3063,7 +3051,6 @@ nsRootPresContext::ApplyPluginGeometryUpdates() void nsRootPresContext::CollectPluginGeometryUpdates(LayerManager* aLayerManager) { -#ifndef XP_MACOSX // Collect and pass plugin widget configurations down to the compositor // for transmission to the chrome process. NS_ASSERTION(aLayerManager, "layer manager is invalid!"); @@ -3086,7 +3073,6 @@ nsRootPresContext::CollectPluginGeometryUpdates(LayerManager* aLayerManager) clm->StorePluginWidgetConfigurations(configurations); } PluginDidSetGeometry(mRegisteredPlugins); -#endif // #ifndef XP_MACOSX } static void diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 87435f8cf..37475d959 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -8736,9 +8736,7 @@ PresShell::WillPaintWindow() return; } -#ifndef XP_MACOSX rootPresContext->ApplyPluginGeometryUpdates(); -#endif } void |