From d725223bc4591d5e0f3a76cd8c96bd58c2f90108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 24 Jun 2020 13:30:45 +0000 Subject: [PATCH] Bug 1647871 - Remove nsIWidget::GetCompositionSize(). r=kats No longer called. This was done as an optimization for OOP iframes, but it affects the scrollport so it's clearly not sound (the visible rect shouldn't affect the layout scroll port). If very tall OOP iframes are a problem somehow, it's something that we need to deal with in another place. It was, in fact, removed for top-level remote iframes because of bug 1554861 and other regressions. Depends on D80731 Differential Revision: https://phabricator.services.mozilla.com/D80732 --- widget/PuppetWidget.cpp | 9 --------- widget/PuppetWidget.h | 2 -- widget/nsIWidget.h | 10 ---------- 3 files changed, 21 deletions(-) diff --git a/widget/PuppetWidget.cpp b/widget/PuppetWidget.cpp index 6bc1b794e13b..2891b469fb90 100644 --- a/widget/PuppetWidget.cpp +++ b/widget/PuppetWidget.cpp @@ -1156,15 +1156,6 @@ LayoutDeviceIntRect PuppetWidget::GetScreenBounds() { return LayoutDeviceIntRect(WidgetToScreenOffset(), mBounds.Size()); } -LayoutDeviceIntSize PuppetWidget::GetCompositionSize() { - Maybe visibleRect = - mBrowserChild ? mBrowserChild->GetVisibleRect() : Nothing(); - if (!visibleRect) { - return nsBaseWidget::GetCompositionSize(); - } - return visibleRect->Size(); -} - uint32_t PuppetWidget::GetMaxTouchPoints() const { return mBrowserChild ? mBrowserChild->MaxTouchPoints() : 0; } diff --git a/widget/PuppetWidget.h b/widget/PuppetWidget.h index 6c6dcfb3d897..00a8a0969313 100644 --- a/widget/PuppetWidget.h +++ b/widget/PuppetWidget.h @@ -248,8 +248,6 @@ class PuppetWidget : public nsBaseWidget, virtual LayoutDeviceIntRect GetScreenBounds() override; - virtual LayoutDeviceIntSize GetCompositionSize() override; - [[nodiscard]] virtual nsresult StartPluginIME( const mozilla::WidgetKeyboardEvent& aKeyboardEvent, int32_t aPanelX, int32_t aPanelY, nsString& aCommitted) override; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 035093be17aa..c98a25072744 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -939,16 +939,6 @@ class nsIWidget : public nsISupports { return GetClientBounds().Size(); } - /** - * Get the size of the bounds of this widget that will be visible when - * rendered. - * - * @return the width and height of the composition size of this widget. - */ - virtual LayoutDeviceIntSize GetCompositionSize() { - return GetBounds().Size(); - } - /** * Set the background color for this widget *