mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
2c79eebb23
229 changed files with 212 additions and 23172 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -8736,9 +8736,7 @@ PresShell::WillPaintWindow()
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef XP_MACOSX
|
||||
rootPresContext->ApplyPluginGeometryUpdates();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue