mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 826632. Part 1: Merge nsIViewManager into nsViewManager. r=tnikkel
--HG-- rename : view/public/nsIViewManager.h => view/public/nsViewManager.h extra : rebase_source : d00947c925b17f860fcdc0e12b1ec3cc31b7c630
This commit is contained in:
parent
15549f5c0e
commit
970988bc3c
@ -35,7 +35,7 @@
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsIURI.h"
|
||||
@ -1253,7 +1253,7 @@ DocAccessible::GetNativeWindow() const
|
||||
if (!mPresShell)
|
||||
return nullptr;
|
||||
|
||||
nsIViewManager* vm = mPresShell->GetViewManager();
|
||||
nsViewManager* vm = mPresShell->GetViewManager();
|
||||
if (!vm)
|
||||
return nullptr;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsObjCExceptions.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsEventMap.h"
|
||||
#include "nsArrayUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
@ -1653,7 +1653,7 @@ AccessibleWrap::GetHWNDFor(Accessible* aAccessible)
|
||||
nsIWidget* widget = frame->GetNearestWidget();
|
||||
if (widget && widget->IsVisible()) {
|
||||
nsIPresShell* shell = document->PresShell();
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> rootWidget;
|
||||
vm->GetRootWidget(getter_AddRefs(rootWidget));
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
@ -65,7 +65,7 @@ class nsIStyleRule;
|
||||
class nsIStyleSheet;
|
||||
class nsIURI;
|
||||
class nsIVariant;
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
class nsPresContext;
|
||||
class nsRange;
|
||||
class nsScriptLoader;
|
||||
@ -478,7 +478,7 @@ public:
|
||||
* presshell if the presshell should observe document mutations.
|
||||
*/
|
||||
virtual nsresult CreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsIPresShell** aInstancePtrResult) = 0;
|
||||
virtual void DeleteShell() = 0;
|
||||
|
@ -94,7 +94,7 @@
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsXBLInsertionPoint.h"
|
||||
#include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
|
||||
|
@ -93,7 +93,7 @@
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsIControllers.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsXBLInsertionPoint.h"
|
||||
#include "mozilla/css/StyleRule.h" /* For nsCSSSelectorList */
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
@ -1371,7 +1371,7 @@ nsContentSink::DidProcessATokenImpl()
|
||||
// Check if there's a pending event
|
||||
if (sPendingEventMode != 0 && !mHasPendingEvent &&
|
||||
(mDeflectedCount % sEventProbeRate) == 0) {
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
@ -1518,7 +1518,7 @@ nsContentSink::WillParseImpl(void)
|
||||
uint32_t currentTime = PR_IntervalToMicroseconds(PR_IntervalNow());
|
||||
|
||||
if (sEnablePerfMode == 0) {
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
|
||||
uint32_t lastEventTime;
|
||||
vm->GetLastUserEventTime(lastEventTime);
|
||||
|
@ -34,7 +34,7 @@ class nsIParser;
|
||||
class nsIAtom;
|
||||
class nsIChannel;
|
||||
class nsIContent;
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
class nsNodeInfoManager;
|
||||
class nsScriptLoader;
|
||||
class nsIApplicationCache;
|
||||
|
@ -115,7 +115,7 @@
|
||||
#include "nsTextEditorState.h"
|
||||
#include "nsIPluginHost.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsParserConstants.h"
|
||||
@ -6435,11 +6435,11 @@ nsContentUtils::WidgetForDocument(nsIDocument* aDoc)
|
||||
{
|
||||
nsIPresShell* shell = FindPresShellForDocument(aDoc);
|
||||
if (shell) {
|
||||
nsIViewManager* VM = shell->GetViewManager();
|
||||
nsViewManager* VM = shell->GetViewManager();
|
||||
if (VM) {
|
||||
nsView* rootView = VM->GetRootView();
|
||||
if (rootView) {
|
||||
nsView* displayRoot = nsIViewManager::GetDisplayRootFor(rootView);
|
||||
nsView* displayRoot = nsViewManager::GetDisplayRootFor(rootView);
|
||||
if (displayRoot) {
|
||||
return displayRoot->GetNearestWidget(nullptr);
|
||||
}
|
||||
|
@ -3119,7 +3119,7 @@ nsDocument::TryChannelCharset(nsIChannel *aChannel,
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsDocument::CreateShell(nsPresContext* aContext, nsIViewManager* aViewManager,
|
||||
nsDocument::CreateShell(nsPresContext* aContext, nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsIPresShell** aInstancePtrResult)
|
||||
{
|
||||
@ -3132,7 +3132,7 @@ nsDocument::CreateShell(nsPresContext* aContext, nsIViewManager* aViewManager,
|
||||
|
||||
nsresult
|
||||
nsDocument::doCreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode,
|
||||
nsIPresShell** aInstancePtrResult)
|
||||
{
|
||||
|
@ -568,7 +568,7 @@ public:
|
||||
* shared among multiple presentation shell's).
|
||||
*/
|
||||
virtual nsresult CreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsIPresShell** aInstancePtrResult);
|
||||
virtual void DeleteShell();
|
||||
@ -1076,7 +1076,7 @@ public:
|
||||
|
||||
protected:
|
||||
nsresult doCreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsViewManager* aViewManager, nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode,
|
||||
nsIPresShell** aInstancePtrResult);
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsLayoutStatics.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "nsIMEStateManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsRange.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIScrollable.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIContentViewer.h"
|
||||
|
@ -305,7 +305,7 @@ nsHTMLDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
||||
|
||||
nsresult
|
||||
nsHTMLDocument::CreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsIPresShell** aInstancePtrResult)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
nsIPrincipal* aPrincipal);
|
||||
|
||||
virtual nsresult CreateShell(nsPresContext* aContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsIPresShell** aInstancePtrResult);
|
||||
|
||||
|
@ -22,7 +22,7 @@ class nsIURI;
|
||||
class nsIContent;
|
||||
class nsINodeInfo;
|
||||
class nsIParser;
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
|
||||
typedef enum {
|
||||
eXMLContentSinkState_InProlog,
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include "mozilla/css/StyleRule.h"
|
||||
#include "nsIStyleSheet.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsIXULTemplateBuilder.h"
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsError.h"
|
||||
#include "nsMenuFrame.h"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsLayoutCID.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "nsIBoxObject.h"
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIContentViewer.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIDOMXULElement.h"
|
||||
|
@ -66,7 +66,7 @@
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScriptChannel.h"
|
||||
#include "nsIOfflineCacheUpdate.h"
|
||||
#include "nsITimedChannel.h"
|
||||
@ -3249,7 +3249,7 @@ PrintDocTree(nsIDocShellTreeItem * aParentNode, int aLevel)
|
||||
nsCOMPtr<nsIDOMWindow> domwin(doc->GetWindow());
|
||||
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
vm->GetWidget(getter_AddRefs(widget));
|
||||
}
|
||||
@ -5048,7 +5048,7 @@ nsDocShell::Repaint(bool aForce)
|
||||
nsCOMPtr<nsIPresShell> presShell =GetPresShell();
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
|
||||
nsIViewManager* viewManager = presShell->GetViewManager();
|
||||
nsViewManager* viewManager = presShell->GetViewManager();
|
||||
NS_ENSURE_TRUE(viewManager, NS_ERROR_FAILURE);
|
||||
|
||||
NS_ENSURE_SUCCESS(viewManager->InvalidateAllViews(), NS_ERROR_FAILURE);
|
||||
@ -5115,7 +5115,7 @@ nsDocShell::GetVisibility(bool * aVisibility)
|
||||
return NS_OK;
|
||||
|
||||
// get the view manager
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
|
||||
|
||||
// get the root view
|
||||
@ -7388,7 +7388,7 @@ nsDocShell::RestoreFromHistory()
|
||||
|
||||
nsCOMPtr<nsIPresShell> oldPresShell = GetPresShell();
|
||||
if (oldPresShell) {
|
||||
nsIViewManager *vm = oldPresShell->GetViewManager();
|
||||
nsViewManager *vm = oldPresShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsView *oldRootView = vm->GetRootView();
|
||||
|
||||
@ -7609,7 +7609,7 @@ nsDocShell::RestoreFromHistory()
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
|
||||
nsIViewManager *newVM = shell ? shell->GetViewManager() : nullptr;
|
||||
nsViewManager *newVM = shell ? shell->GetViewManager() : nullptr;
|
||||
nsView *newRootView = newVM ? newVM->GetRootView() : nullptr;
|
||||
|
||||
// Insert the new root view at the correct location in the view tree.
|
||||
@ -7625,7 +7625,7 @@ nsDocShell::RestoreFromHistory()
|
||||
rootViewSibling = nullptr;
|
||||
}
|
||||
if (rootViewParent && newRootView && newRootView->GetParent() != rootViewParent) {
|
||||
nsIViewManager *parentVM = rootViewParent->GetViewManager();
|
||||
nsViewManager *parentVM = rootViewParent->GetViewManager();
|
||||
if (parentVM) {
|
||||
// InsertChild(parent, child, sib, true) inserts the child after
|
||||
// sib in content order, which is before sib in view order. BUT
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "nsJSEnvironment.h"
|
||||
#include "nsJSUtils.h"
|
||||
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
|
||||
#include "nsIDOMHTMLCanvasElement.h"
|
||||
#include "gfxContext.h"
|
||||
@ -661,7 +661,7 @@ nsDOMWindowUtils::SendMouseEventCommon(const nsAString& aType,
|
||||
nsCOMPtr<nsIPresShell> presShell = presContext->PresShell();
|
||||
if (!presShell)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsIViewManager* viewManager = presShell->GetViewManager();
|
||||
nsViewManager* viewManager = presShell->GetViewManager();
|
||||
if (!viewManager)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsView* view = viewManager->GetRootView();
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsCaret.h"
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsFrameSelection.h"
|
||||
#include "mozilla/Selection.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
@ -1055,7 +1055,7 @@ nsFocusManager::EnsureCurrentWidgetFocused()
|
||||
if (docShell) {
|
||||
nsCOMPtr<nsIPresShell> presShell = docShell->GetPresShell();
|
||||
if (presShell) {
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
@ -1552,7 +1552,7 @@ nsFocusManager::Blur(nsPIDOMWindow* aWindowToClear,
|
||||
if (aAdjustWidgets && objectFrame && !sTestMode) {
|
||||
// note that the presshell's widget is being retrieved here, not the one
|
||||
// for the object frame.
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
@ -1726,7 +1726,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
|
||||
objectFrameWidget = objectFrame->GetWidget();
|
||||
}
|
||||
if (aAdjustWidgets && !objectFrameWidget && !sTestMode) {
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
@ -1812,7 +1812,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
|
||||
if (aAdjustWidgets && objectFrameWidget &&
|
||||
mFocusedWindow == aWindow && mFocusedContent == nullptr &&
|
||||
!sTestMode) {
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
@ -1974,7 +1974,7 @@ nsFocusManager::RaiseWindow(nsPIDOMWindow* aWindow)
|
||||
if (!presShell)
|
||||
return;
|
||||
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
|
@ -118,7 +118,7 @@
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsIPrompt.h"
|
||||
@ -11024,7 +11024,7 @@ nsGlobalChromeWindow::SetCursor(const nsAString& aCursor)
|
||||
nsCOMPtr<nsIPresShell> presShell = mDocShell->GetPresShell();
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
|
||||
nsIViewManager* vm = presShell->GetViewManager();
|
||||
nsViewManager* vm = presShell->GetViewManager();
|
||||
NS_ENSURE_TRUE(vm, NS_ERROR_FAILURE);
|
||||
|
||||
nsView* rootView = vm->GetRootView();
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsNetUtil.h"
|
||||
@ -883,7 +883,7 @@ TabParent::RecvGetWidgetNativeData(WindowsHandle* aValue)
|
||||
if (content) {
|
||||
nsIPresShell* shell = content->OwnerDoc()->GetShell();
|
||||
if (shell) {
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
nsCOMPtr<nsIWidget> widget;
|
||||
vm->GetRootWidget(getter_AddRefs(widget));
|
||||
if (widget) {
|
||||
|
@ -45,7 +45,7 @@ using mozilla::DefaultXDisplay;
|
||||
#include "nsIWebBrowserChrome.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIPluginWidget.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIDOMHTMLObjectElement.h"
|
||||
#include "nsIAppShell.h"
|
||||
@ -693,7 +693,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
void** pvalue = (void**)value;
|
||||
nsIViewManager* vm = mObjectFrame->PresContext()->GetPresShell()->GetViewManager();
|
||||
nsViewManager* vm = mObjectFrame->PresContext()->GetPresShell()->GetViewManager();
|
||||
if (!vm)
|
||||
return NS_ERROR_FAILURE;
|
||||
#if defined(XP_WIN)
|
||||
|
@ -61,7 +61,7 @@
|
||||
#include "imgIContainer.h"
|
||||
#include "nsContextMenuInfo.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
#include "nsIDOMDragEvent.h"
|
||||
@ -1443,7 +1443,7 @@ ChromeTooltipListener::sTooltipCallback(nsITimer *aTimer,
|
||||
|
||||
nsIWidget* widget = nullptr;
|
||||
if (shell) {
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsView* view = vm->GetRootView();
|
||||
if (view) {
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "nsIDOMWheelEvent.h"
|
||||
#include "nsView.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIContent.h"
|
||||
@ -89,7 +89,7 @@ private:
|
||||
static void StopPanningCallback(nsITimer *timer, void *closure);
|
||||
|
||||
nsCOMPtr<nsIWidget> mWidget;
|
||||
nsCOMPtr<nsIViewManager> mViewManager;
|
||||
nsCOMPtr<nsViewManager> mViewManager;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsTableOuterFrame.h"
|
||||
@ -12023,7 +12023,7 @@ nsCSSFrameConstructor::RebuildAllStyleData(nsChangeHint aExtraHint)
|
||||
return;
|
||||
|
||||
// Make sure that the viewmanager will outlive the presshell
|
||||
nsCOMPtr<nsIViewManager> vm = mPresShell->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> vm = mPresShell->GetViewManager();
|
||||
|
||||
// Processing the style changes could cause a flush that propagates to
|
||||
// the parent frame and thus destroys the pres shell.
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "nsIFrame.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsStyleContext.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "nsStyleConsts.h"
|
||||
#include "nsPoint.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsGkAtoms.h"
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "sampler.h"
|
||||
#include "nsAnimationManager.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "ImageLayers.h"
|
||||
#include "ImageContainer.h"
|
||||
#include "nsCanvasFrame.h"
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include "nsViewsCID.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
|
||||
#include "nsIPageSequenceFrame.h"
|
||||
@ -379,7 +379,7 @@ protected:
|
||||
// These return the current shell/prescontext etc.
|
||||
nsIPresShell* GetPresShell();
|
||||
nsPresContext* GetPresContext();
|
||||
nsIViewManager* GetViewManager();
|
||||
nsViewManager* GetViewManager();
|
||||
|
||||
void DetachFromTopLevelWidget();
|
||||
|
||||
@ -397,7 +397,7 @@ protected:
|
||||
// so they will be destroyed in the reverse order (pinkerton, scc)
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
nsCOMPtr<nsIWidget> mWindow; // may be null
|
||||
nsCOMPtr<nsIViewManager> mViewManager;
|
||||
nsCOMPtr<nsViewManager> mViewManager;
|
||||
nsRefPtr<nsPresContext> mPresContext;
|
||||
nsCOMPtr<nsIPresShell> mPresShell;
|
||||
|
||||
@ -1399,7 +1399,7 @@ nsDocumentViewer::Open(nsISupports *aState, nsISHEntry *aSHEntry)
|
||||
// If the old view is already attached to our parent, detach
|
||||
DetachFromTopLevelWidget();
|
||||
|
||||
nsIViewManager *vm = GetViewManager();
|
||||
nsViewManager *vm = GetViewManager();
|
||||
NS_ABORT_IF_FALSE(vm, "no view manager");
|
||||
nsView* v = vm->GetRootView();
|
||||
NS_ABORT_IF_FALSE(v, "no root view");
|
||||
@ -1546,7 +1546,7 @@ nsDocumentViewer::Destroy()
|
||||
|
||||
// Remove our root view from the view hierarchy.
|
||||
if (mPresShell) {
|
||||
nsIViewManager *vm = mPresShell->GetViewManager();
|
||||
nsViewManager *vm = mPresShell->GetViewManager();
|
||||
if (vm) {
|
||||
nsView *rootView = vm->GetRootView();
|
||||
|
||||
@ -1559,7 +1559,7 @@ nsDocumentViewer::Destroy()
|
||||
|
||||
nsView *rootViewParent = rootView->GetParent();
|
||||
if (rootViewParent) {
|
||||
nsIViewManager *parentVM = rootViewParent->GetViewManager();
|
||||
nsViewManager *parentVM = rootViewParent->GetViewManager();
|
||||
if (parentVM) {
|
||||
parentVM->RemoveChild(rootView);
|
||||
}
|
||||
@ -1806,7 +1806,7 @@ nsDocumentViewer::GetPresContext()
|
||||
return mPresContext;
|
||||
}
|
||||
|
||||
nsIViewManager*
|
||||
nsViewManager*
|
||||
nsDocumentViewer::GetViewManager()
|
||||
{
|
||||
return mViewManager;
|
||||
@ -4388,7 +4388,7 @@ nsDocumentViewer::InitializeForPrintPreview()
|
||||
}
|
||||
|
||||
void
|
||||
nsDocumentViewer::SetPrintPreviewPresentation(nsIViewManager* aViewManager,
|
||||
nsDocumentViewer::SetPrintPreviewPresentation(nsViewManager* aViewManager,
|
||||
nsPresContext* aPresContext,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ class nsStyleSet;
|
||||
class nsIPresShell;
|
||||
class nsPresContext;
|
||||
class nsIWidget;
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
|
||||
// {c6f255cf-cadd-4382-b57f-cd2a9874169b}
|
||||
#define NS_IDOCUMENT_VIEWER_PRINT_IID \
|
||||
@ -58,7 +58,7 @@ public:
|
||||
/**
|
||||
* Replaces the current presentation with print preview presentation.
|
||||
*/
|
||||
virtual void SetPrintPreviewPresentation(nsIViewManager* aViewManager,
|
||||
virtual void SetPrintPreviewPresentation(nsViewManager* aViewManager,
|
||||
nsPresContext* aPresContext,
|
||||
nsIPresShell* aPresShell) = 0;
|
||||
};
|
||||
@ -78,7 +78,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewerPrint,
|
||||
virtual void OnDonePrinting(); \
|
||||
virtual bool IsInitializedForPrintPreview(); \
|
||||
virtual void InitializeForPrintPreview(); \
|
||||
virtual void SetPrintPreviewPresentation(nsIViewManager* aViewManager, \
|
||||
virtual void SetPrintPreviewPresentation(nsViewManager* aViewManager, \
|
||||
nsPresContext* aPresContext, \
|
||||
nsIPresShell* aPresShell);
|
||||
|
||||
|
@ -44,7 +44,7 @@ class nsIDocument;
|
||||
class nsIFrame;
|
||||
class nsPresContext;
|
||||
class nsStyleSet;
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
class nsView;
|
||||
class nsRenderingContext;
|
||||
class nsIPageSequenceFrame;
|
||||
@ -176,7 +176,7 @@ protected:
|
||||
public:
|
||||
virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode) = 0;
|
||||
|
||||
@ -272,7 +272,7 @@ public:
|
||||
|
||||
nsPresContext* GetPresContext() const { return mPresContext; }
|
||||
|
||||
nsIViewManager* GetViewManager() const { return mViewManager; }
|
||||
nsViewManager* GetViewManager() const { return mViewManager; }
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
/**
|
||||
@ -1381,7 +1381,7 @@ protected:
|
||||
nsPresContext* mPresContext; // [STRONG]
|
||||
nsStyleSet* mStyleSet; // [OWNS]
|
||||
nsCSSFrameConstructor* mFrameConstructor; // [OWNS]
|
||||
nsIViewManager* mViewManager; // [WEAK] docViewer owns it so I don't have to
|
||||
nsViewManager* mViewManager; // [WEAK] docViewer owns it so I don't have to
|
||||
nsPresArena mFrameArena;
|
||||
nsFrameSelection* mSelection;
|
||||
// Pointer into mFrameConstructor - this is purely so that FrameManager() and
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsFrameManager.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsStyleChangeList.h"
|
||||
@ -826,7 +826,7 @@ nsPresContext::PreferenceChanged(const char* aPrefName)
|
||||
// Re-fetch the view manager's window dimensions in case there's a deferred
|
||||
// resize which hasn't affected our mVisibleArea yet
|
||||
nscoord oldWidthAppUnits, oldHeightAppUnits;
|
||||
nsIViewManager* vm = mShell->GetViewManager();
|
||||
nsViewManager* vm = mShell->GetViewManager();
|
||||
vm->GetWindowDimensions(&oldWidthAppUnits, &oldHeightAppUnits);
|
||||
float oldWidthDevPixels = oldWidthAppUnits/oldAppUnitsPerDevPixel;
|
||||
float oldHeightDevPixels = oldHeightAppUnits/oldAppUnitsPerDevPixel;
|
||||
|
@ -788,7 +788,7 @@ PresShell::~PresShell()
|
||||
nsresult
|
||||
PresShell::Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode)
|
||||
{
|
||||
@ -1857,7 +1857,7 @@ PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIViewManager> viewManagerDeathGrip = mViewManager;
|
||||
nsCOMPtr<nsViewManager> viewManagerDeathGrip = mViewManager;
|
||||
// Take this ref after viewManager so it'll make sure to go away first
|
||||
nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);
|
||||
|
||||
@ -1897,7 +1897,7 @@ PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight)
|
||||
|
||||
// Kick off a top-down reflow
|
||||
AUTO_LAYOUT_PHASE_ENTRY_POINT(GetPresContext(), Reflow);
|
||||
nsIViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
|
||||
nsViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
|
||||
|
||||
mDirtyRoots.RemoveElement(rootFrame);
|
||||
DoReflow(rootFrame, true);
|
||||
@ -3735,7 +3735,7 @@ PresShell::IsSafeToFlush() const
|
||||
|
||||
if (isSafeToFlush) {
|
||||
// Not safe if we are painting
|
||||
nsIViewManager* viewManager = GetViewManager();
|
||||
nsViewManager* viewManager = GetViewManager();
|
||||
if (viewManager) {
|
||||
bool isPainting = false;
|
||||
viewManager->IsPainting(isPainting);
|
||||
@ -3808,7 +3808,7 @@ PresShell::FlushPendingNotifications(mozilla::ChangesToFlush aFlush)
|
||||
|
||||
NS_ASSERTION(!isSafeToFlush || mViewManager, "Must have view manager");
|
||||
// Make sure the view manager stays alive.
|
||||
nsCOMPtr<nsIViewManager> viewManagerDeathGrip = mViewManager;
|
||||
nsCOMPtr<nsViewManager> viewManagerDeathGrip = mViewManager;
|
||||
if (isSafeToFlush && mViewManager) {
|
||||
// Processing pending notifications can kill us, and some callers only
|
||||
// hold weak refs when calling FlushPendingNotifications(). :(
|
||||
@ -5186,7 +5186,7 @@ PresShell::ProcessSynthMouseMoveEvent(bool aFromScroll)
|
||||
|
||||
// We always dispatch the event to the pres shell that contains the view that
|
||||
// the mouse is over. pointVM is the VM of that pres shell.
|
||||
nsIViewManager *pointVM = nullptr;
|
||||
nsViewManager *pointVM = nullptr;
|
||||
|
||||
// This could be a bit slow (traverses entire view hierarchy)
|
||||
// but it's OK to do it once per synthetic mouse event
|
||||
@ -7652,7 +7652,7 @@ PresShell::ProcessReflowCommands(bool aInterruptible)
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
WillDoReflow();
|
||||
AUTO_LAYOUT_PHASE_ENTRY_POINT(GetPresContext(), Reflow);
|
||||
nsIViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
|
||||
nsViewManager::AutoDisableRefresh refreshBlocker(mViewManager);
|
||||
|
||||
do {
|
||||
// Send an incremental reflow notification to the target frame.
|
||||
@ -8270,7 +8270,7 @@ PresShell::VerifyIncrementalReflow()
|
||||
nsIWidget* parentWidget = rootView->GetWidget();
|
||||
|
||||
// Create a new view manager.
|
||||
nsCOMPtr<nsIViewManager> vm = do_CreateInstance(kViewManagerCID);
|
||||
nsCOMPtr<nsViewManager> vm = do_CreateInstance(kViewManagerCID);
|
||||
NS_ENSURE_TRUE(vm, false);
|
||||
rv = vm->Init(dc);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
// nsIPresShell
|
||||
virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
|
||||
nsPresContext* aPresContext,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsStyleSet* aStyleSet,
|
||||
nsCompatibility aCompatMode);
|
||||
virtual NS_HIDDEN_(void) Destroy();
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "jsapi.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "sampler.h"
|
||||
#include "nsNPAPIPluginInstance.h"
|
||||
|
||||
@ -951,7 +951,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||
#endif
|
||||
|
||||
mViewManagerFlushIsPending = false;
|
||||
nsCOMPtr<nsIViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> vm = mPresContext->GetPresShell()->GetViewManager();
|
||||
vm->ProcessPendingUpdates();
|
||||
#ifdef DEBUG_INVALIDATIONS
|
||||
printf("Ending ProcessPendingUpdates\n");
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
#include "nsIDOMNode.h"
|
||||
@ -356,7 +356,7 @@ void
|
||||
nsComboboxControlFrame::ShowPopup(bool aShowPopup)
|
||||
{
|
||||
nsView* view = mDropdownFrame->GetView();
|
||||
nsIViewManager* viewManager = view->GetViewManager();
|
||||
nsViewManager* viewManager = view->GetViewManager();
|
||||
|
||||
if (aShowPopup) {
|
||||
nsRect rect = mDropdownFrame->GetRect();
|
||||
@ -510,7 +510,7 @@ nsComboboxControlFrame::ReflowDropdown(nsPresContext* aPresContext,
|
||||
// ensure we start off hidden
|
||||
if (GetStateBits() & NS_FRAME_FIRST_REFLOW) {
|
||||
nsView* view = mDropdownFrame->GetView();
|
||||
nsIViewManager* viewManager = view->GetViewManager();
|
||||
nsViewManager* viewManager = view->GetViewManager();
|
||||
viewManager->SetViewVisibility(view, nsViewVisibility_kHide);
|
||||
nsRect emptyRect(0, 0, 0, 0);
|
||||
viewManager->ResizeView(view, emptyRect);
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "nsIDOMHTMLSelectElement.h"
|
||||
#include "nsIDOMHTMLOptionElement.h"
|
||||
#include "nsComboboxControlFrame.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDOMHTMLOptGroupElement.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIPresShell.h"
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsCSSAnonBoxes.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIWidget.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsIServiceManager.h"
|
||||
@ -373,7 +373,7 @@ nsContainerFrame::PeekOffsetCharacter(bool aForward, int32_t* aOffset,
|
||||
|
||||
static nsresult
|
||||
ReparentFrameViewTo(nsIFrame* aFrame,
|
||||
nsIViewManager* aViewManager,
|
||||
nsViewManager* aViewManager,
|
||||
nsView* aNewParentView,
|
||||
nsView* aOldParentView)
|
||||
{
|
||||
@ -432,7 +432,7 @@ nsContainerFrame::CreateViewForFrame(nsIFrame* aFrame,
|
||||
nsView* parentView = aFrame->GetParent()->GetClosestView();
|
||||
NS_ASSERTION(parentView, "no parent with view");
|
||||
|
||||
nsIViewManager* viewManager = parentView->GetViewManager();
|
||||
nsViewManager* viewManager = parentView->GetViewManager();
|
||||
NS_ASSERTION(viewManager, "null view manager");
|
||||
|
||||
// Create a view
|
||||
@ -480,7 +480,7 @@ nsContainerFrame::PositionFrameView(nsIFrame* aKidFrame)
|
||||
return;
|
||||
|
||||
nsView* view = aKidFrame->GetView();
|
||||
nsIViewManager* vm = view->GetViewManager();
|
||||
nsViewManager* vm = view->GetViewManager();
|
||||
nsPoint pt;
|
||||
nsView* ancestorView = parentFrame->GetClosestView(&pt);
|
||||
|
||||
@ -607,7 +607,7 @@ nsContainerFrame::ReparentFrameViewList(nsPresContext* aPresContext,
|
||||
// same view sub-hierarchy. If they are then we don't have to do
|
||||
// anything
|
||||
if (oldParentView != newParentView) {
|
||||
nsIViewManager* viewManager = oldParentView->GetViewManager();
|
||||
nsViewManager* viewManager = oldParentView->GetViewManager();
|
||||
|
||||
// They're not so we need to reparent any child views
|
||||
for (nsFrameList::Enumerator e(aChildFrameList); !e.AtEnd(); e.Next()) {
|
||||
@ -656,7 +656,7 @@ nsContainerFrame::SyncWindowProperties(nsPresContext* aPresContext,
|
||||
if (!windowWidget || !IsTopLevelWidget(windowWidget))
|
||||
return;
|
||||
|
||||
nsIViewManager* vm = aView->GetViewManager();
|
||||
nsViewManager* vm = aView->GetViewManager();
|
||||
nsView* rootView = vm->GetRootView();
|
||||
|
||||
if (aView != rootView)
|
||||
@ -748,7 +748,7 @@ nsContainerFrame::SyncFrameViewAfterReflow(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (0 == (aFlags & NS_FRAME_NO_SIZE_VIEW)) {
|
||||
nsIViewManager* vm = aView->GetViewManager();
|
||||
nsViewManager* vm = aView->GetViewManager();
|
||||
|
||||
vm->ResizeView(aView, aVisualOverflowArea, true);
|
||||
}
|
||||
@ -768,7 +768,7 @@ nsContainerFrame::SyncFrameViewProperties(nsPresContext* aPresContext,
|
||||
return;
|
||||
}
|
||||
|
||||
nsIViewManager* vm = aView->GetViewManager();
|
||||
nsViewManager* vm = aView->GetViewManager();
|
||||
|
||||
if (nullptr == aStyleContext) {
|
||||
aStyleContext = aFrame->GetStyleContext();
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsTableOuterFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsCRT.h"
|
||||
@ -5289,7 +5289,7 @@ nsFrame::UpdateOverflow()
|
||||
|
||||
if ((flags & NS_FRAME_NO_SIZE_VIEW) == 0) {
|
||||
// Make sure the frame's view is properly sized.
|
||||
nsIViewManager* vm = view->GetViewManager();
|
||||
nsViewManager* vm = view->GetViewManager();
|
||||
vm->ResizeView(view, overflowAreas.VisualOverflow(), true);
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsStyleCoord.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIScrollable.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsGfxScrollFrame.h"
|
||||
#include "nsGkAtoms.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIDOMDragEvent.h"
|
||||
#include "nsPluginHost.h"
|
||||
@ -329,7 +329,7 @@ nsObjectFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
if (HasView()) {
|
||||
nsView* view = GetView();
|
||||
nsIViewManager* vm = view->GetViewManager();
|
||||
nsViewManager* vm = view->GetViewManager();
|
||||
if (vm) {
|
||||
nsViewVisibility visibility =
|
||||
IsHidden() ? nsViewVisibility_kHide : nsViewVisibility_kShow;
|
||||
@ -365,7 +365,7 @@ nsObjectFrame::PrepForDrawing(nsIWidget *aWidget)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsIViewManager* viewMan = view->GetViewManager();
|
||||
nsViewManager* viewMan = view->GetViewManager();
|
||||
// mark the view as hidden since we don't know the (x,y) until Paint
|
||||
// XXX is the above comment correct?
|
||||
viewMan->SetViewVisibility(view, nsViewVisibility_kHide);
|
||||
@ -593,7 +593,7 @@ nsObjectFrame::Reflow(nsPresContext* aPresContext,
|
||||
r.Deflate(aReflowState.mComputedBorderPadding);
|
||||
|
||||
if (mInnerView) {
|
||||
nsIViewManager* vm = mInnerView->GetViewManager();
|
||||
nsViewManager* vm = mInnerView->GetViewManager();
|
||||
vm->MoveViewTo(mInnerView, r.x, r.y);
|
||||
vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), r.Size()), true);
|
||||
}
|
||||
@ -884,7 +884,7 @@ nsObjectFrame::DidReflow(nsPresContext* aPresContext,
|
||||
|
||||
if (HasView()) {
|
||||
nsView* view = GetView();
|
||||
nsIViewManager* vm = view->GetViewManager();
|
||||
nsViewManager* vm = view->GetViewManager();
|
||||
if (vm)
|
||||
vm->SetViewVisibility(view, IsHidden() ? nsViewVisibility_kHide : nsViewVisibility_kShow);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsStyleCoord.h"
|
||||
#include "nsStyleContext.h"
|
||||
@ -674,7 +674,7 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (mInnerView) {
|
||||
nsIViewManager* vm = mInnerView->GetViewManager();
|
||||
nsViewManager* vm = mInnerView->GetViewManager();
|
||||
vm->MoveViewTo(mInnerView, offset.x, offset.y);
|
||||
vm->ResizeView(mInnerView, nsRect(nsPoint(0, 0), innerSize), true);
|
||||
}
|
||||
@ -958,7 +958,7 @@ InsertViewsInReverseOrder(nsView* aSibling, nsView* aParent)
|
||||
NS_PRECONDITION(aParent, "");
|
||||
NS_PRECONDITION(!aParent->GetFirstChild(), "inserting into non-empty list");
|
||||
|
||||
nsIViewManager* vm = aParent->GetViewManager();
|
||||
nsViewManager* vm = aParent->GetViewManager();
|
||||
while (aSibling) {
|
||||
nsView* next = aSibling->GetNextSibling();
|
||||
aSibling->SetNextSibling(nullptr);
|
||||
@ -1092,7 +1092,7 @@ nsSubDocumentFrame::EnsureInnerView()
|
||||
NS_ASSERTION(outerView, "Must have an outer view already");
|
||||
nsRect viewBounds(0, 0, 0, 0); // size will be fixed during reflow
|
||||
|
||||
nsIViewManager* viewMan = outerView->GetViewManager();
|
||||
nsViewManager* viewMan = outerView->GetViewManager();
|
||||
nsView* innerView = viewMan->CreateView(viewBounds, outerView);
|
||||
if (!innerView) {
|
||||
NS_ERROR("Could not create inner view");
|
||||
|
@ -90,7 +90,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsViewsCID.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIDeviceContextSpec.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsRenderingContext.h"
|
||||
|
||||
@ -3793,7 +3793,7 @@ DumpViews(nsIDocShell* aDocShell, FILE* out)
|
||||
fprintf(out, "docshell=%p \n", aDocShell);
|
||||
nsIPresShell* shell = nsPrintEngine::GetPresShellFor(aDocShell);
|
||||
if (shell) {
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsView* root = vm->GetRootView();
|
||||
if (root) {
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
@ -46,7 +46,7 @@ public:
|
||||
|
||||
nsRefPtr<nsPresContext> mPresContext;
|
||||
nsCOMPtr<nsIPresShell> mPresShell;
|
||||
nsCOMPtr<nsIViewManager> mViewManager;
|
||||
nsCOMPtr<nsViewManager> mViewManager;
|
||||
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
PrintObjectType mFrameType;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIFrame.h"
|
||||
|
||||
#include "nsILayoutDebugger.h"
|
||||
@ -55,7 +55,7 @@ pres_shell(nsIDocShell *aDocShell)
|
||||
return result.forget();
|
||||
}
|
||||
|
||||
static nsIViewManager*
|
||||
static nsViewManager*
|
||||
view_manager(nsIDocShell *aDocShell)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(pres_shell(aDocShell));
|
||||
@ -433,7 +433,7 @@ DumpViewsRecur(nsIDocShell* aDocShell, FILE* out)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(out, "docshell=%p \n", static_cast<void*>(aDocShell));
|
||||
nsCOMPtr<nsIViewManager> vm(view_manager(aDocShell));
|
||||
nsCOMPtr<nsViewManager> vm(view_manager(aDocShell));
|
||||
if (vm) {
|
||||
nsView* root = vm->GetRootView();
|
||||
if (root) {
|
||||
@ -524,7 +524,7 @@ nsLayoutDebuggingTools::DumpReflowStats()
|
||||
|
||||
void nsLayoutDebuggingTools::ForceRefresh()
|
||||
{
|
||||
nsCOMPtr<nsIViewManager> vm(view_manager(mDocShell));
|
||||
nsCOMPtr<nsViewManager> vm(view_manager(mDocShell));
|
||||
if (!vm)
|
||||
return;
|
||||
nsView* root = vm->GetRootView();
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsCSSRendering.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsBoxLayoutState.h"
|
||||
#include "nsStackLayout.h"
|
||||
#include "nsDisplayList.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsBoxLayoutState.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsDisplayList.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsScrollbarFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsITimer.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsCSSRendering.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsMenuFrame.h"
|
||||
#include "nsMenuBarFrame.h"
|
||||
@ -125,7 +125,7 @@ nsMenuPopupFrame::Init(nsIContent* aContent,
|
||||
// so we use the nsView::SetFloating() to tell the view manager
|
||||
// about that constraint.
|
||||
nsView* ourView = GetView();
|
||||
nsIViewManager* viewManager = ourView->GetViewManager();
|
||||
nsViewManager* viewManager = ourView->GetViewManager();
|
||||
viewManager->SetViewFloating(ourView, true);
|
||||
|
||||
mPopupType = ePopupTypePanel;
|
||||
@ -459,7 +459,7 @@ nsMenuPopupFrame::LayoutPopup(nsBoxLayoutState& aState, nsIFrame* aParentMenu, b
|
||||
}
|
||||
|
||||
if (isOpen) {
|
||||
nsIViewManager* viewManager = view->GetViewManager();
|
||||
nsViewManager* viewManager = view->GetViewManager();
|
||||
nsRect rect = GetRect();
|
||||
rect.x = rect.y = 0;
|
||||
viewManager->ResizeView(view, rect);
|
||||
@ -794,7 +794,7 @@ nsMenuPopupFrame::HidePopup(bool aDeselectMenu, nsPopupState aNewState)
|
||||
mHFlip = mVFlip = false;
|
||||
|
||||
nsView* view = GetView();
|
||||
nsIViewManager* viewManager = view->GetViewManager();
|
||||
nsViewManager* viewManager = view->GetViewManager();
|
||||
viewManager->SetViewVisibility(view, nsViewVisibility_kHide);
|
||||
|
||||
FireDOMEvent(NS_LITERAL_STRING("DOMMenuInactive"), mContent);
|
||||
@ -1919,7 +1919,7 @@ nsMenuPopupFrame::CreatePopupView()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIViewManager* viewManager = PresContext()->GetPresShell()->GetViewManager();
|
||||
nsViewManager* viewManager = PresContext()->GetPresShell()->GetViewManager();
|
||||
NS_ASSERTION(nullptr != viewManager, "null view manager");
|
||||
|
||||
// Create a view
|
||||
|
@ -90,7 +90,7 @@ enum FlipStyle {
|
||||
|
||||
nsIFrame* NS_NewMenuPopupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
class nsView;
|
||||
class nsMenuPopupFrame;
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsCSSFrameConstructor.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsITimer.h"
|
||||
#include "nsFocusManager.h"
|
||||
@ -2262,7 +2262,7 @@ nsXULMenuCommandEvent::Run()
|
||||
if (!pm)
|
||||
return NS_OK;
|
||||
|
||||
// The order of the nsIViewManager and nsIPresShell COM pointers is
|
||||
// The order of the nsViewManager and nsIPresShell COM pointers is
|
||||
// important below. We want the pres shell to get released before the
|
||||
// associated view manager on exit from this function.
|
||||
// See bug 54233.
|
||||
@ -2295,7 +2295,7 @@ nsXULMenuCommandEvent::Run()
|
||||
|
||||
nsPresContext* presContext = menuFrame->PresContext();
|
||||
nsCOMPtr<nsIPresShell> shell = presContext->PresShell();
|
||||
nsCOMPtr<nsIViewManager> kungFuDeathGrip = shell->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> kungFuDeathGrip = shell->GetViewManager();
|
||||
|
||||
// Deselect ourselves.
|
||||
if (mCloseMenuMode != CloseMenuMode_None)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsContainerFrame.h"
|
||||
#include "nsView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsBoxFrame.h"
|
||||
#include "nsBoxObject.h"
|
||||
|
@ -14,7 +14,7 @@ MODULE = view
|
||||
|
||||
EXPORTS = \
|
||||
nsView.h \
|
||||
nsIViewManager.h \
|
||||
nsViewManager.h \
|
||||
nsViewsCID.h \
|
||||
nsIScrollPositionListener.h \
|
||||
$(NULL)
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "nsIWidgetListener.h"
|
||||
#include <stdio.h>
|
||||
|
||||
class nsIViewManager;
|
||||
class nsViewManager;
|
||||
class nsIWidget;
|
||||
class nsIFrame;
|
||||
@ -59,7 +58,7 @@ enum nsViewVisibility {
|
||||
* view manager that owns the views.
|
||||
*
|
||||
* Most of the methods here are read-only. To set the corresponding properties
|
||||
* of a view, go through nsIViewManager.
|
||||
* of a view, go through nsViewManager.
|
||||
*/
|
||||
|
||||
class nsView MOZ_FINAL : public nsIWidgetListener
|
||||
@ -75,8 +74,8 @@ public:
|
||||
* view manager from somewhere else, do that instead.
|
||||
* @result the view manager
|
||||
*/
|
||||
nsIViewManager* GetViewManager() const
|
||||
{ return reinterpret_cast<nsIViewManager*>(mViewManager); }
|
||||
nsViewManager* GetViewManager() const
|
||||
{ return reinterpret_cast<nsViewManager*>(mViewManager); }
|
||||
nsViewManager* GetViewManagerInternal() const { return mViewManager; }
|
||||
|
||||
/**
|
||||
@ -460,13 +459,13 @@ private:
|
||||
// released if it points to any view in this view hierarchy.
|
||||
void InvalidateHierarchy(nsViewManager *aViewManagerParent);
|
||||
|
||||
nsViewManager *mViewManager;
|
||||
nsViewManager *mViewManager;
|
||||
nsView *mParent;
|
||||
nsIWidget *mWindow;
|
||||
nsIWidget *mWindow;
|
||||
nsView *mNextSibling;
|
||||
nsView *mFirstChild;
|
||||
nsIFrame *mFrame;
|
||||
nsRegion *mDirtyRegion;
|
||||
nsIFrame *mFrame;
|
||||
nsRegion *mDirtyRegion;
|
||||
int32_t mZIndex;
|
||||
nsViewVisibility mVis;
|
||||
// position relative our parent view origin but in our appunits
|
||||
|
@ -3,35 +3,54 @@
|
||||
* 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/. */
|
||||
|
||||
#ifndef nsIViewManager_h___
|
||||
#define nsIViewManager_h___
|
||||
#ifndef nsViewManager_h___
|
||||
#define nsViewManager_h___
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsView.h"
|
||||
#include "nsEvent.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsITimer.h"
|
||||
#include "prtime.h"
|
||||
#include "prinrval.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
class nsIWidget;
|
||||
struct nsRect;
|
||||
class nsRegion;
|
||||
class nsDeviceContext;
|
||||
class nsIPresShell;
|
||||
class nsView;
|
||||
|
||||
#define NS_IVIEWMANAGER_IID \
|
||||
{ 0x540610a6, 0x4fdd, 0x4ae3, \
|
||||
{ 0x9b, 0xdb, 0xa6, 0x4d, 0x8b, 0xca, 0x02, 0x0f } }
|
||||
|
||||
class nsIViewManager : public nsISupports
|
||||
class nsViewManager : public nsISupports
|
||||
{
|
||||
public:
|
||||
friend class nsView;
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IVIEWMANAGER_IID)
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsViewManager();
|
||||
virtual ~nsViewManager();
|
||||
|
||||
/**
|
||||
* Initialize the ViewManager
|
||||
* Note: this instance does not hold a reference to the presshell
|
||||
* because it holds a reference to this instance.
|
||||
* @result The result of the initialization, NS_OK if no errors
|
||||
*/
|
||||
NS_IMETHOD Init(nsDeviceContext* aContext) = 0;
|
||||
NS_IMETHOD Init(nsDeviceContext* aContext);
|
||||
|
||||
/**
|
||||
* Create an ordinary view
|
||||
@ -47,13 +66,13 @@ public:
|
||||
*/
|
||||
NS_IMETHOD_(nsView*) CreateView(const nsRect& aBounds,
|
||||
const nsView* aParent,
|
||||
nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow) = 0;
|
||||
nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow);
|
||||
|
||||
/**
|
||||
* Get the root of the view tree.
|
||||
* @result the root view
|
||||
*/
|
||||
NS_IMETHOD_(nsView*) GetRootView() = 0;
|
||||
NS_IMETHOD_(nsView*) GetRootView() { return mRootView; }
|
||||
|
||||
/**
|
||||
* Set the root of the view tree. Does not destroy the current root view.
|
||||
@ -61,7 +80,7 @@ public:
|
||||
* aView may have a widget (anything but printing) or may not (printing).
|
||||
* @param aView view to set as root
|
||||
*/
|
||||
NS_IMETHOD SetRootView(nsView *aView) = 0;
|
||||
NS_IMETHOD SetRootView(nsView *aView);
|
||||
|
||||
/**
|
||||
* Get the dimensions of the root window. The dimensions are in
|
||||
@ -69,7 +88,7 @@ public:
|
||||
* @param aWidth out parameter for width of window in twips
|
||||
* @param aHeight out parameter for height of window in twips
|
||||
*/
|
||||
NS_IMETHOD GetWindowDimensions(nscoord *aWidth, nscoord *aHeight) = 0;
|
||||
NS_IMETHOD GetWindowDimensions(nscoord *aWidth, nscoord *aHeight);
|
||||
|
||||
/**
|
||||
* Set the dimensions of the root window.
|
||||
@ -78,19 +97,19 @@ public:
|
||||
* @param aWidth of window in twips
|
||||
* @param aHeight of window in twips
|
||||
*/
|
||||
NS_IMETHOD SetWindowDimensions(nscoord aWidth, nscoord aHeight) = 0;
|
||||
NS_IMETHOD SetWindowDimensions(nscoord aWidth, nscoord aHeight);
|
||||
|
||||
/**
|
||||
* Do any resizes that are pending.
|
||||
*/
|
||||
NS_IMETHOD FlushDelayedResize(bool aDoReflow) = 0;
|
||||
NS_IMETHOD FlushDelayedResize(bool aDoReflow);
|
||||
|
||||
/**
|
||||
* Called to inform the view manager that the entire area of a view
|
||||
* is dirty and needs to be redrawn.
|
||||
* @param aView view to paint. should be root view
|
||||
*/
|
||||
NS_IMETHOD InvalidateView(nsView *aView) = 0;
|
||||
NS_IMETHOD InvalidateView(nsView *aView);
|
||||
|
||||
/**
|
||||
* Called to inform the view manager that some portion of a view is dirty and
|
||||
@ -99,12 +118,12 @@ public:
|
||||
* @param aView view to paint. should be root view
|
||||
* @param rect rect to mark as damaged
|
||||
*/
|
||||
NS_IMETHOD InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect) = 0;
|
||||
NS_IMETHOD InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect);
|
||||
|
||||
/**
|
||||
* Called to inform the view manager that it should invalidate all views.
|
||||
*/
|
||||
NS_IMETHOD InvalidateAllViews() = 0;
|
||||
NS_IMETHOD InvalidateAllViews();
|
||||
|
||||
/**
|
||||
* Called to dispatch an event to the appropriate view. Often called
|
||||
@ -115,7 +134,7 @@ public:
|
||||
* @param aStatus event handling status
|
||||
*/
|
||||
NS_IMETHOD DispatchEvent(nsGUIEvent *aEvent,
|
||||
nsView* aViewTarget, nsEventStatus* aStatus) = 0;
|
||||
nsView* aViewTarget, nsEventStatus* aStatus);
|
||||
|
||||
/**
|
||||
* Given a parent view, insert another view as its child.
|
||||
@ -133,7 +152,9 @@ public:
|
||||
* @param aAfter after or before in the document order
|
||||
*/
|
||||
NS_IMETHOD InsertChild(nsView *aParent, nsView *aChild, nsView *aSibling,
|
||||
bool aAfter) = 0;
|
||||
bool aAfter);
|
||||
|
||||
NS_IMETHOD InsertChild(nsView *aParent, nsView *aChild, int32_t aZIndex);
|
||||
|
||||
/**
|
||||
* Remove a specific child view from its parent. This will NOT remove its placeholder
|
||||
@ -142,7 +163,7 @@ public:
|
||||
* @param aParent parent view
|
||||
* @param aChild child view
|
||||
*/
|
||||
NS_IMETHOD RemoveChild(nsView *aChild) = 0;
|
||||
NS_IMETHOD RemoveChild(nsView *aChild);
|
||||
|
||||
/**
|
||||
* Move a view to the specified position, provided in parent coordinates.
|
||||
@ -153,7 +174,7 @@ public:
|
||||
* @param aX x value for new view position
|
||||
* @param aY y value for new view position
|
||||
*/
|
||||
NS_IMETHOD MoveViewTo(nsView *aView, nscoord aX, nscoord aY) = 0;
|
||||
NS_IMETHOD MoveViewTo(nsView *aView, nscoord aX, nscoord aY);
|
||||
|
||||
/**
|
||||
* Resize a view. In addition to setting the width and height, you can
|
||||
@ -168,7 +189,7 @@ public:
|
||||
* if false Repaint the union of the old and new rectangles.
|
||||
*/
|
||||
NS_IMETHOD ResizeView(nsView *aView, const nsRect &aRect,
|
||||
bool aRepaintExposedAreaOnly = false) = 0;
|
||||
bool aRepaintExposedAreaOnly = false);
|
||||
|
||||
/**
|
||||
* Set the visibility of a view. Hidden views have the effect of hiding
|
||||
@ -181,7 +202,7 @@ public:
|
||||
* @param aView view to change visibility state of
|
||||
* @param visible new visibility state
|
||||
*/
|
||||
NS_IMETHOD SetViewVisibility(nsView *aView, nsViewVisibility aVisible) = 0;
|
||||
NS_IMETHOD SetViewVisibility(nsView *aView, nsViewVisibility aVisible);
|
||||
|
||||
/**
|
||||
* Set the z-index of a view. Positive z-indices mean that a view
|
||||
@ -199,7 +220,7 @@ public:
|
||||
* true if the view should be topmost when compared with
|
||||
* other z-index:auto views.
|
||||
*/
|
||||
NS_IMETHOD SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex, bool aTopMost = false) = 0;
|
||||
NS_IMETHOD SetViewZIndex(nsView *aView, bool aAutoZIndex, int32_t aZindex, bool aTopMost = false);
|
||||
|
||||
/**
|
||||
* Set whether the view "floats" above all other views,
|
||||
@ -208,24 +229,24 @@ public:
|
||||
* this view. This is a hack, but it fixes some problems with
|
||||
* views that need to be drawn in front of all other views.
|
||||
*/
|
||||
NS_IMETHOD SetViewFloating(nsView *aView, bool aFloatingView) = 0;
|
||||
NS_IMETHOD SetViewFloating(nsView *aView, bool aFloatingView);
|
||||
|
||||
/**
|
||||
* Set the presshell associated with this manager
|
||||
* @param aPresShell - new presshell
|
||||
*/
|
||||
virtual void SetPresShell(nsIPresShell *aPresShell) = 0;
|
||||
virtual void SetPresShell(nsIPresShell *aPresShell) { mPresShell = aPresShell; }
|
||||
|
||||
/**
|
||||
* Get the pres shell associated with this manager
|
||||
*/
|
||||
virtual nsIPresShell* GetPresShell() = 0;
|
||||
virtual nsIPresShell* GetPresShell() { return mPresShell; }
|
||||
|
||||
/**
|
||||
* Get the device context associated with this manager
|
||||
* @result device context
|
||||
*/
|
||||
NS_IMETHOD GetDeviceContext(nsDeviceContext *&aContext) = 0;
|
||||
NS_IMETHOD GetDeviceContext(nsDeviceContext *&aContext);
|
||||
|
||||
/**
|
||||
* A stack class for disallowing changes that would enter painting. For
|
||||
@ -241,7 +262,7 @@ public:
|
||||
*/
|
||||
class NS_STACK_CLASS AutoDisableRefresh {
|
||||
public:
|
||||
AutoDisableRefresh(nsIViewManager* aVM) {
|
||||
AutoDisableRefresh(nsViewManager* aVM) {
|
||||
if (aVM) {
|
||||
mRootVM = aVM->IncrementDisableRefreshCount();
|
||||
}
|
||||
@ -255,21 +276,21 @@ public:
|
||||
AutoDisableRefresh(const AutoDisableRefresh& aOther);
|
||||
const AutoDisableRefresh& operator=(const AutoDisableRefresh& aOther);
|
||||
|
||||
nsCOMPtr<nsIViewManager> mRootVM;
|
||||
nsCOMPtr<nsViewManager> mRootVM;
|
||||
};
|
||||
|
||||
private:
|
||||
friend class AutoDisableRefresh;
|
||||
|
||||
virtual nsIViewManager* IncrementDisableRefreshCount() = 0;
|
||||
virtual void DecrementDisableRefreshCount() = 0;
|
||||
virtual nsViewManager* IncrementDisableRefreshCount();
|
||||
virtual void DecrementDisableRefreshCount();
|
||||
|
||||
public:
|
||||
/**
|
||||
* Retrieve the widget at the root of the nearest enclosing
|
||||
* view manager whose root view has a widget.
|
||||
*/
|
||||
NS_IMETHOD GetRootWidget(nsIWidget **aWidget) = 0;
|
||||
NS_IMETHOD GetRootWidget(nsIWidget **aWidget);
|
||||
|
||||
/**
|
||||
* Indicate whether the viewmanager is currently painting
|
||||
@ -277,7 +298,7 @@ public:
|
||||
* @param aPainting true if the viewmanager is painting
|
||||
* false otherwise
|
||||
*/
|
||||
NS_IMETHOD IsPainting(bool& aIsPainting)=0;
|
||||
NS_IMETHOD IsPainting(bool& aIsPainting);
|
||||
|
||||
/**
|
||||
* Retrieve the time of the last user event. User events
|
||||
@ -286,7 +307,7 @@ public:
|
||||
*
|
||||
* @param aTime Last user event time in microseconds
|
||||
*/
|
||||
NS_IMETHOD GetLastUserEventTime(uint32_t& aTime)=0;
|
||||
NS_IMETHOD GetLastUserEventTime(uint32_t& aTime);
|
||||
|
||||
/**
|
||||
* Find the nearest display root view for the view aView. This is the view for
|
||||
@ -298,14 +319,141 @@ public:
|
||||
* Flush the accumulated dirty region to the widget and update widget
|
||||
* geometry.
|
||||
*/
|
||||
virtual void ProcessPendingUpdates()=0;
|
||||
virtual void ProcessPendingUpdates();
|
||||
|
||||
/**
|
||||
* Just update widget geometry without flushing the dirty region
|
||||
*/
|
||||
virtual void UpdateWidgetGeometry() = 0;
|
||||
virtual void UpdateWidgetGeometry();
|
||||
|
||||
uint32_t AppUnitsPerDevPixel() const
|
||||
{
|
||||
return mContext->AppUnitsPerDevPixel();
|
||||
}
|
||||
nsView* GetRootViewImpl() const { return mRootView; }
|
||||
|
||||
private:
|
||||
static uint32_t gLastUserEventTime;
|
||||
|
||||
/* Update the cached RootViewManager pointer on this view manager. */
|
||||
void InvalidateHierarchy();
|
||||
void FlushPendingInvalidates();
|
||||
|
||||
void ProcessPendingUpdatesForView(nsView *aView,
|
||||
bool aFlushDirtyRegion = true);
|
||||
void FlushDirtyRegionToWidget(nsView* aView);
|
||||
/**
|
||||
* Call WillPaint() on all view observers under this vm root.
|
||||
*/
|
||||
void CallWillPaintOnObservers(bool aWillSendDidPaint);
|
||||
void ReparentChildWidgets(nsView* aView, nsIWidget *aNewWidget);
|
||||
void ReparentWidgets(nsView* aView, nsView *aParent);
|
||||
void InvalidateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedRegion);
|
||||
|
||||
void InvalidateViews(nsView *aView);
|
||||
|
||||
// aView is the view for aWidget and aRegion is relative to aWidget.
|
||||
void Refresh(nsView *aView, const nsIntRegion& aRegion, bool aWillSendDidPaint);
|
||||
|
||||
void InvalidateRectDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut);
|
||||
void InvalidateHorizontalBandDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut,
|
||||
nscoord aY1, nscoord aY2, bool aInCutOut);
|
||||
|
||||
// Utilities
|
||||
|
||||
bool IsViewInserted(nsView *aView);
|
||||
|
||||
/**
|
||||
* Intersects aRect with aView's bounds and then transforms it from aView's
|
||||
* coordinate system to the coordinate system of the widget attached to
|
||||
* aView.
|
||||
*/
|
||||
nsIntRect ViewToWidget(nsView *aView, const nsRect &aRect) const;
|
||||
|
||||
void DoSetWindowDimensions(nscoord aWidth, nscoord aHeight);
|
||||
|
||||
bool IsPainting() const {
|
||||
return RootViewManager()->mPainting;
|
||||
}
|
||||
|
||||
void SetPainting(bool aPainting) {
|
||||
RootViewManager()->mPainting = aPainting;
|
||||
}
|
||||
|
||||
nsresult InvalidateView(nsView *aView, const nsRect &aRect);
|
||||
|
||||
nsViewManager* RootViewManager() const { return mRootViewManager; }
|
||||
bool IsRootVM() const { return this == RootViewManager(); }
|
||||
|
||||
// Whether synchronous painting is allowed at the moment. For example,
|
||||
// widget geometry changes can cause synchronous painting, so they need to
|
||||
// be deferred while refresh is disabled.
|
||||
bool IsPaintingAllowed() { return RootViewManager()->mRefreshDisableCount == 0; }
|
||||
|
||||
void WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint);
|
||||
bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion,
|
||||
uint32_t aFlags);
|
||||
void DidPaintWindow();
|
||||
|
||||
// Call this when you need to let the viewmanager know that it now has
|
||||
// pending updates.
|
||||
void PostPendingUpdate();
|
||||
|
||||
nsRefPtr<nsDeviceContext> mContext;
|
||||
nsIPresShell *mPresShell;
|
||||
|
||||
// The size for a resize that we delayed until the root view becomes
|
||||
// visible again.
|
||||
nsSize mDelayedResize;
|
||||
|
||||
nsView *mRootView;
|
||||
// mRootViewManager is a strong ref unless it equals |this|. It's
|
||||
// never null (if we have no ancestors, it will be |this|).
|
||||
nsViewManager *mRootViewManager;
|
||||
|
||||
// The following members should not be accessed directly except by
|
||||
// the root view manager. Some have accessor functions to enforce
|
||||
// this, as noted.
|
||||
|
||||
int32_t mRefreshDisableCount;
|
||||
// Use IsPainting() and SetPainting() to access mPainting.
|
||||
bool mPainting;
|
||||
bool mRecursiveRefreshPending;
|
||||
bool mHasPendingWidgetGeometryChanges;
|
||||
bool mInScroll;
|
||||
|
||||
//from here to public should be static and locked... MMP
|
||||
static int32_t mVMCount; //number of viewmanagers
|
||||
|
||||
//list of view managers
|
||||
static nsVoidArray *gViewManagers;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIViewManager, NS_IVIEWMANAGER_IID)
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsViewManager, NS_IVIEWMANAGER_IID)
|
||||
|
||||
#endif // nsIViewManager_h___
|
||||
|
||||
/**
|
||||
Invalidation model:
|
||||
|
||||
1) Callers call into the view manager and ask it to invalidate a view.
|
||||
|
||||
2) The view manager finds the "right" widget for the view, henceforth called
|
||||
the root widget.
|
||||
|
||||
3) The view manager traverses descendants of the root widget and for each
|
||||
one that needs invalidation stores the rect to invalidate on the widget's
|
||||
view (batching).
|
||||
|
||||
4) The dirty region is flushed to the right widget when
|
||||
ProcessPendingUpdates is called from the RefreshDriver.
|
||||
|
||||
It's important to note that widgets associated to views outside this view
|
||||
manager can end up being invalidated during step 3. Therefore, the end of a
|
||||
view update batch really needs to traverse the entire view tree, to ensure
|
||||
that those invalidates happen.
|
||||
|
||||
To cope with this, invalidation processing and should only happen on the
|
||||
root viewmanager.
|
||||
*/
|
||||
|
||||
#endif // nsViewManager_h___
|
@ -1006,7 +1006,7 @@ nsView::HandleEvent(nsGUIEvent* aEvent, bool aUseAttachedEvents)
|
||||
}
|
||||
|
||||
if (view) {
|
||||
nsCOMPtr<nsIViewManager> vm = view->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> vm = view->GetViewManager();
|
||||
vm->DispatchEvent(aEvent, view, &result);
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ nsViewManager::~nsViewManager()
|
||||
mPresShell = nullptr;
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsViewManager, nsIViewManager)
|
||||
NS_IMPL_ISUPPORTS1(nsViewManager, nsViewManager)
|
||||
|
||||
// We don't hold a reference to the presentation context because it
|
||||
// holds a reference to us.
|
||||
@ -156,12 +156,6 @@ nsViewManager::CreateView(const nsRect& aBounds,
|
||||
return v;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsView*)
|
||||
nsViewManager::GetRootView()
|
||||
{
|
||||
return mRootView;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsViewManager::SetRootView(nsView *aView)
|
||||
{
|
||||
NS_PRECONDITION(!aView || aView->GetViewManager() == this,
|
||||
@ -278,7 +272,7 @@ static nsRegion ConvertRegionBetweenViews(const nsRegion& aIn,
|
||||
return out;
|
||||
}
|
||||
|
||||
nsView* nsIViewManager::GetDisplayRootFor(nsView* aView)
|
||||
nsView* nsViewManager::GetDisplayRootFor(nsView* aView)
|
||||
{
|
||||
nsView *displayRoot = aView;
|
||||
for (;;) {
|
||||
@ -571,7 +565,7 @@ ShouldIgnoreInvalidation(nsViewManager* aVM)
|
||||
if (!shell || shell->ShouldIgnoreInvalidation()) {
|
||||
return true;
|
||||
}
|
||||
nsView* view = aVM->GetRootViewImpl()->GetParent();
|
||||
nsView* view = aVM->GetRootView()->GetParent();
|
||||
aVM = view ? view->GetViewManagerInternal() : nullptr;
|
||||
}
|
||||
return false;
|
||||
@ -1107,7 +1101,7 @@ NS_IMETHODIMP nsViewManager::GetDeviceContext(nsDeviceContext *&aContext)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIViewManager*
|
||||
nsViewManager*
|
||||
nsViewManager::IncrementDisableRefreshCount()
|
||||
{
|
||||
if (!IsRootVM()) {
|
||||
|
@ -1,214 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
|
||||
|
||||
#ifndef nsViewManager_h___
|
||||
#define nsViewManager_h___
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsITimer.h"
|
||||
#include "prtime.h"
|
||||
#include "prinrval.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
|
||||
/**
|
||||
Invalidation model:
|
||||
|
||||
1) Callers call into the view manager and ask it to invalidate a view.
|
||||
|
||||
2) The view manager finds the "right" widget for the view, henceforth called
|
||||
the root widget.
|
||||
|
||||
3) The view manager traverses descendants of the root widget and for each
|
||||
one that needs invalidation stores the rect to invalidate on the widget's
|
||||
view (batching).
|
||||
|
||||
4) The dirty region is flushed to the right widget when
|
||||
ProcessPendingUpdates is called from the RefreshDriver.
|
||||
|
||||
It's important to note that widgets associated to views outside this view
|
||||
manager can end up being invalidated during step 3. Therefore, the end of a
|
||||
view update batch really needs to traverse the entire view tree, to ensure
|
||||
that those invalidates happen.
|
||||
|
||||
To cope with this, invalidation processing and should only happen on the
|
||||
root viewmanager.
|
||||
*/
|
||||
|
||||
class nsViewManager : public nsIViewManager {
|
||||
public:
|
||||
nsViewManager();
|
||||
|
||||
NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Init(nsDeviceContext* aContext);
|
||||
|
||||
NS_IMETHOD_(nsView*) CreateView(const nsRect& aBounds,
|
||||
const nsView* aParent,
|
||||
nsViewVisibility aVisibilityFlag = nsViewVisibility_kShow);
|
||||
|
||||
NS_IMETHOD_(nsView*) GetRootView();
|
||||
NS_IMETHOD SetRootView(nsView *aView);
|
||||
|
||||
NS_IMETHOD GetWindowDimensions(nscoord *width, nscoord *height);
|
||||
NS_IMETHOD SetWindowDimensions(nscoord width, nscoord height);
|
||||
NS_IMETHOD FlushDelayedResize(bool aDoReflow);
|
||||
|
||||
NS_IMETHOD InvalidateView(nsView *aView);
|
||||
NS_IMETHOD InvalidateViewNoSuppression(nsView *aView, const nsRect &aRect);
|
||||
NS_IMETHOD InvalidateAllViews();
|
||||
|
||||
NS_IMETHOD DispatchEvent(nsGUIEvent *aEvent,
|
||||
nsView* aTargetView, nsEventStatus* aStatus);
|
||||
|
||||
NS_IMETHOD InsertChild(nsView *parent, nsView *child, nsView *sibling,
|
||||
bool above);
|
||||
|
||||
NS_IMETHOD InsertChild(nsView *parent, nsView *child,
|
||||
int32_t zindex);
|
||||
|
||||
NS_IMETHOD RemoveChild(nsView *parent);
|
||||
|
||||
NS_IMETHOD MoveViewTo(nsView *aView, nscoord aX, nscoord aY);
|
||||
|
||||
NS_IMETHOD ResizeView(nsView *aView, const nsRect &aRect, bool aRepaintExposedAreaOnly = false);
|
||||
|
||||
NS_IMETHOD SetViewFloating(nsView *aView, bool aFloating);
|
||||
|
||||
NS_IMETHOD SetViewVisibility(nsView *aView, nsViewVisibility aVisible);
|
||||
|
||||
NS_IMETHOD SetViewZIndex(nsView *aView, bool aAuto, int32_t aZIndex, bool aTopMost=false);
|
||||
|
||||
virtual void SetPresShell(nsIPresShell *aPresShell) { mPresShell = aPresShell; }
|
||||
virtual nsIPresShell* GetPresShell() { return mPresShell; }
|
||||
|
||||
NS_IMETHOD GetDeviceContext(nsDeviceContext *&aContext);
|
||||
|
||||
virtual nsIViewManager* IncrementDisableRefreshCount();
|
||||
virtual void DecrementDisableRefreshCount();
|
||||
|
||||
NS_IMETHOD GetRootWidget(nsIWidget **aWidget);
|
||||
|
||||
NS_IMETHOD IsPainting(bool& aIsPainting);
|
||||
NS_IMETHOD GetLastUserEventTime(uint32_t& aTime);
|
||||
static uint32_t gLastUserEventTime;
|
||||
|
||||
/* Update the cached RootViewManager pointer on this view manager. */
|
||||
void InvalidateHierarchy();
|
||||
|
||||
virtual void ProcessPendingUpdates();
|
||||
virtual void UpdateWidgetGeometry();
|
||||
|
||||
protected:
|
||||
virtual ~nsViewManager();
|
||||
|
||||
private:
|
||||
|
||||
void FlushPendingInvalidates();
|
||||
void ProcessPendingUpdatesForView(nsView *aView,
|
||||
bool aFlushDirtyRegion = true);
|
||||
void FlushDirtyRegionToWidget(nsView* aView);
|
||||
/**
|
||||
* Call WillPaint() on all view observers under this vm root.
|
||||
*/
|
||||
void CallWillPaintOnObservers(bool aWillSendDidPaint);
|
||||
void ReparentChildWidgets(nsView* aView, nsIWidget *aNewWidget);
|
||||
void ReparentWidgets(nsView* aView, nsView *aParent);
|
||||
void InvalidateWidgetArea(nsView *aWidgetView, const nsRegion &aDamagedRegion);
|
||||
|
||||
void InvalidateViews(nsView *aView);
|
||||
|
||||
// aView is the view for aWidget and aRegion is relative to aWidget.
|
||||
void Refresh(nsView *aView, const nsIntRegion& aRegion, bool aWillSendDidPaint);
|
||||
|
||||
void InvalidateRectDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut);
|
||||
void InvalidateHorizontalBandDifference(nsView *aView, const nsRect& aRect, const nsRect& aCutOut,
|
||||
nscoord aY1, nscoord aY2, bool aInCutOut);
|
||||
|
||||
// Utilities
|
||||
|
||||
bool IsViewInserted(nsView *aView);
|
||||
|
||||
/**
|
||||
* Intersects aRect with aView's bounds and then transforms it from aView's
|
||||
* coordinate system to the coordinate system of the widget attached to
|
||||
* aView.
|
||||
*/
|
||||
nsIntRect ViewToWidget(nsView *aView, const nsRect &aRect) const;
|
||||
|
||||
void DoSetWindowDimensions(nscoord aWidth, nscoord aHeight);
|
||||
|
||||
bool IsPainting() const {
|
||||
return RootViewManager()->mPainting;
|
||||
}
|
||||
|
||||
void SetPainting(bool aPainting) {
|
||||
RootViewManager()->mPainting = aPainting;
|
||||
}
|
||||
|
||||
nsresult InvalidateView(nsView *aView, const nsRect &aRect);
|
||||
|
||||
public: // NOT in nsIViewManager, so private to the view module
|
||||
nsView* GetRootViewImpl() const { return mRootView; }
|
||||
nsViewManager* RootViewManager() const { return mRootViewManager; }
|
||||
bool IsRootVM() const { return this == RootViewManager(); }
|
||||
|
||||
// Whether synchronous painting is allowed at the moment. For example,
|
||||
// widget geometry changes can cause synchronous painting, so they need to
|
||||
// be deferred while refresh is disabled.
|
||||
bool IsPaintingAllowed() { return RootViewManager()->mRefreshDisableCount == 0; }
|
||||
|
||||
void WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint);
|
||||
bool PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion,
|
||||
uint32_t aFlags);
|
||||
void DidPaintWindow();
|
||||
|
||||
// Call this when you need to let the viewmanager know that it now has
|
||||
// pending updates.
|
||||
void PostPendingUpdate();
|
||||
|
||||
uint32_t AppUnitsPerDevPixel() const
|
||||
{
|
||||
return mContext->AppUnitsPerDevPixel();
|
||||
}
|
||||
|
||||
private:
|
||||
nsRefPtr<nsDeviceContext> mContext;
|
||||
nsIPresShell *mPresShell;
|
||||
|
||||
// The size for a resize that we delayed until the root view becomes
|
||||
// visible again.
|
||||
nsSize mDelayedResize;
|
||||
|
||||
nsView *mRootView;
|
||||
// mRootViewManager is a strong ref unless it equals |this|. It's
|
||||
// never null (if we have no ancestors, it will be |this|).
|
||||
nsViewManager *mRootViewManager;
|
||||
|
||||
// The following members should not be accessed directly except by
|
||||
// the root view manager. Some have accessor functions to enforce
|
||||
// this, as noted.
|
||||
|
||||
int32_t mRefreshDisableCount;
|
||||
// Use IsPainting() and SetPainting() to access mPainting.
|
||||
bool mPainting;
|
||||
bool mRecursiveRefreshPending;
|
||||
bool mHasPendingWidgetGeometryChanges;
|
||||
bool mInScroll;
|
||||
|
||||
//from here to public should be static and locked... MMP
|
||||
static int32_t mVMCount; //number of viewmanagers
|
||||
|
||||
//list of view managers
|
||||
static nsVoidArray *gViewManagers;
|
||||
};
|
||||
|
||||
#endif /* nsViewManager_h___ */
|
@ -23,7 +23,7 @@ using mozilla::unused;
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "nsIWidgetListener.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
|
||||
#include "nsRenderingContext.h"
|
||||
#include "nsIDOMSimpleGestureEvent.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsIRollupListener.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsILocalFileMac.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIFrame.h"
|
||||
|
||||
// This sets how opaque the drag image is
|
||||
@ -269,7 +269,7 @@ GetGtkWindow(nsIDOMDocument *aDocument)
|
||||
if (!presShell)
|
||||
return NULL;
|
||||
|
||||
nsCOMPtr<nsIViewManager> vm = presShell->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> vm = presShell->GetViewManager();
|
||||
if (!vm)
|
||||
return NULL;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsTransform2D.h"
|
||||
@ -75,7 +75,7 @@ nsNativeThemeGTK::RefreshWidgetWindow(nsIFrame* aFrame)
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsViewManager* vm = shell->GetViewManager();
|
||||
if (!vm)
|
||||
return;
|
||||
|
||||
|
@ -65,7 +65,7 @@ template<class T> class nsReadingIterator;
|
||||
#include "nsIDOMHTMLTextAreaElement.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsISelectionController.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsGUIEvent.h"
|
||||
|
||||
@ -3144,7 +3144,7 @@ TestApp::GetWidget(nsIWidget** aWidget)
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIViewManager> viewManager = presShell->GetViewManager();
|
||||
nsCOMPtr<nsViewManager> viewManager = presShell->GetViewManager();
|
||||
if (!viewManager) {
|
||||
return false;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "nsIDOMNode.h"
|
||||
#include "nsIDOMDragEvent.h"
|
||||
#include "nsISelection.h"
|
||||
|
Loading…
Reference in New Issue
Block a user