From f8299a3c22d930da79c689be68383f54ecd4c9fe Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 22 May 2014 16:39:46 -0400 Subject: [PATCH] Backed out changeset f1068bf18e64 (bug 978913) for bustage on most platforms. CLOSED TREE --- dom/ipc/PBrowser.ipdl | 6 ------ dom/ipc/TabChild.cpp | 11 ----------- dom/ipc/TabChild.h | 2 -- dom/ipc/TabParent.cpp | 11 ----------- dom/ipc/TabParent.h | 1 - layout/base/nsPresContext.cpp | 32 -------------------------------- widget/xpwidgets/PuppetWidget.h | 5 ----- 7 files changed, 68 deletions(-) diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index bd997660d7a7..8143c3052ffa 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -503,12 +503,6 @@ child: */ SetIsDocShellActive(bool aIsActive); - /** - * Tell the child that the UI resolution changed for the containing - * window. - */ - UIResolutionChanged(); - /* * FIXME: write protocol! diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index aebdeded95eb..6f2babbedc06 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -2733,17 +2733,6 @@ TabChild::OnHideTooltip() return NS_OK; } -bool -TabChild::RecvUIResolutionChanged() -{ - static_cast(mWidget.get())->ClearBackingScaleCache(); - nsCOMPtr document(GetDocument()); - nsCOMPtr presShell = document->GetShell(); - nsRefPtr presContext = presShell->GetPresContext(); - presContext->UIResolutionChanged(); - return true; -} - TabChildGlobal::TabChildGlobal(TabChildBase* aTabChild) : mTabChild(aTabChild) { diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index adbdb315bfbe..ebe21c809f9c 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -456,8 +456,6 @@ public: return GetFrom(docShell); } - virtual bool RecvUIResolutionChanged() MOZ_OVERRIDE; - protected: virtual PRenderFrameChild* AllocPRenderFrameChild(ScrollingBehavior* aScrolling, TextureFactoryIdentifier* aTextureFactoryIdentifier, diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 971d7ededdfa..dd2a95c8c24d 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -509,17 +509,6 @@ TabParent::UpdateFrame(const FrameMetrics& aFrameMetrics) } } -void -TabParent::UIResolutionChanged() -{ - if (!mIsDestroyed) { - // TryCacheDPIAndScale()'s cache is keyed off of - // mDPI being greater than 0, so this invalidates it. - mDPI = -1; - unused << SendUIResolutionChanged(); - } -} - void TabParent::AcknowledgeScrollUpdate(const ViewID& aScrollId, const uint32_t& aScrollGeneration) { diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index c0a0026d1a0a..6cb86dd593bc 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -198,7 +198,6 @@ public: void Show(const nsIntSize& size); void UpdateDimensions(const nsRect& rect, const nsIntSize& size); void UpdateFrame(const layers::FrameMetrics& aFrameMetrics); - void UIResolutionChanged(); void AcknowledgeScrollUpdate(const ViewID& aScrollId, const uint32_t& aScrollGeneration); void HandleDoubleTap(const CSSPoint& aPoint, int32_t aModifiers, diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 015d645ba7bd..cc607135038a 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -49,14 +49,11 @@ #include "mozilla/dom/MediaQueryList.h" #include "nsSMILAnimationController.h" #include "mozilla/css/ImageLoader.h" -#include "mozilla/dom/PBrowserParent.h" #include "mozilla/dom/TabChild.h" -#include "mozilla/dom/TabParent.h" #include "nsRefreshDriver.h" #include "Layers.h" #include "nsIDOMEvent.h" #include "gfxPrefs.h" -#include "nsIDOMChromeWindow.h" #include "nsContentUtils.h" #include "nsCxPusher.h" @@ -1771,35 +1768,6 @@ nsPresContext::UIResolutionChangedInternal() AppUnitsPerDevPixelChanged(); } - nsCOMPtr chromeWindow(do_QueryInterface(mDocument->GetWindow())); - nsCOMPtr windowMM; - if (chromeWindow) { - chromeWindow->GetMessageManager(getter_AddRefs(windowMM)); - } - if (windowMM) { - uint32_t tabChildCount = 0; - windowMM->GetChildCount(&tabChildCount); - for (uint32_t j = 0; j < tabChildCount; ++j) { - nsCOMPtr childMM; - windowMM->GetChildAt(j, getter_AddRefs(childMM)); - if (!childMM) { - continue; - } - nsCOMPtr tabMM = do_QueryInterface(childMM); - - mozilla::dom::ipc::MessageManagerCallback* cb = - static_cast(tabMM.get())->GetCallback(); - if (cb) { - nsFrameLoader* fl = static_cast(cb); - PBrowserParent* remoteBrowser = fl->GetRemoteBrowser(); - TabParent* remote = static_cast(remoteBrowser); - if (remote) { - remote->UIResolutionChanged(); - } - } - } - } - mDocument->EnumerateSubDocuments(UIResolutionChangedSubdocumentCallback, nullptr); } diff --git a/widget/xpwidgets/PuppetWidget.h b/widget/xpwidgets/PuppetWidget.h index 589022e88957..f2e85e710ceb 100644 --- a/widget/xpwidgets/PuppetWidget.h +++ b/widget/xpwidgets/PuppetWidget.h @@ -183,11 +183,6 @@ public: virtual bool NeedsPaint() MOZ_OVERRIDE; virtual TabChild* GetOwningTabChild() MOZ_OVERRIDE { return mTabChild; } - virtual void ClearBackingScaleCache() - { - mDPI = -1; - mDefaultScale = -1; - } private: nsresult Paint();