Bug 1438026 - Part 4: Remove the old nsPresState code completely, r=baku
authorNika Layzell <nika@thelayzells.com>
Fri, 02 Mar 2018 13:19:22 -0500
changeset 412752 e1fab4fd5afa8e38eeac19caab7c3b2be0872148
parent 412751 f394ca4f80af5fd29edab09afc6893112c808b15
child 412753 47c477fefd3b83f5888a558b546a92d525d1cbd1
push id33818
push userapavel@mozilla.com
push dateWed, 11 Apr 2018 14:36:40 +0000
treeherdermozilla-central@cfe6399e142c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1438026
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1438026 - Part 4: Remove the old nsPresState code completely, r=baku
layout/base/moz.build
layout/base/nsPresState.h
xpcom/base/ErrorList.py
--- a/layout/base/moz.build
+++ b/layout/base/moz.build
@@ -54,17 +54,16 @@ EXPORTS += [
     'nsIPercentBSizeObserver.h',
     'nsIPresShell.h',
     'nsIPresShellInlines.h',
     'nsIReflowCallback.h',
     'nsLayoutUtils.h',
     'nsPresArena.h',
     'nsPresArenaObjectList.h',
     'nsPresContext.h',
-    'nsPresState.h',
     'nsQuoteList.h',
     'nsRefreshDriver.h',
     'nsStyleChangeList.h',
     'nsStyleSheetService.h',
     'ScrollbarStyles.h',
     'StackArena.h',
     'TouchManager.h',
     'Units.h',
deleted file mode 100644
--- a/layout/base/nsPresState.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-/*
- * a piece of state that is stored in session history when the document
- * is not
- */
-
-#ifndef nsPresState_h_
-#define nsPresState_h_
-
-#include "nsPoint.h"
-#include "gfxPoint.h"
-#include "nsAutoPtr.h"
-
-class nsPresState
-{
-public:
-  nsPresState()
-    : mContentData(nullptr)
-    , mScrollState(0, 0)
-    , mAllowScrollOriginDowngrade(true)
-    , mResolution(1.0)
-    , mScaleToResolution(false)
-    , mDisabledSet(false)
-    , mDisabled(false)
-    , mDroppedDown(false)
-  {}
-
-  void SetScrollState(const nsPoint& aState)
-  {
-    mScrollState = aState;
-  }
-
-  nsPoint GetScrollPosition() const
-  {
-    return mScrollState;
-  }
-
-  void SetAllowScrollOriginDowngrade(bool aAllowScrollOriginDowngrade)
-  {
-    mAllowScrollOriginDowngrade = aAllowScrollOriginDowngrade;
-  }
-
-  bool GetAllowScrollOriginDowngrade()
-  {
-    return mAllowScrollOriginDowngrade;
-  }
-
-  void SetResolution(float aSize)
-  {
-    mResolution = aSize;
-  }
-
-  float GetResolution() const
-  {
-    return mResolution;
-  }
-
-  void SetScaleToResolution(bool aScaleToResolution)
-  {
-    mScaleToResolution = aScaleToResolution;
-  }
-
-  bool GetScaleToResolution() const
-  {
-    return mScaleToResolution;
-  }
-
-  void ClearNonScrollState()
-  {
-    mContentData = nullptr;
-    mDisabledSet = false;
-  }
-
-  bool GetDisabled() const
-  {
-    return mDisabled;
-  }
-
-  void SetDisabled(bool aDisabled)
-  {
-    mDisabled = aDisabled;
-    mDisabledSet = true;
-  }
-
-  bool IsDisabledSet() const
-  {
-    return mDisabledSet;
-  }
-
-  nsISupports* GetStateProperty() const
-  {
-    return mContentData;
-  }
-
-  void SetStateProperty(nsISupports *aProperty)
-  {
-    mContentData = aProperty;
-  }
-
-  void SetDroppedDown(bool aDroppedDown)
-  {
-    mDroppedDown = aDroppedDown;
-  }
-
-  bool GetDroppedDown() const
-  {
-    return mDroppedDown;
-  }
-
-// MEMBER VARIABLES
-protected:
-  nsCOMPtr<nsISupports> mContentData;
-  nsPoint mScrollState;
-  bool mAllowScrollOriginDowngrade;
-  float mResolution;
-  bool mScaleToResolution;
-  bool mDisabledSet;
-  bool mDisabled;
-  bool mDroppedDown;
-};
-
-#endif /* nsPresState_h_ */
--- a/xpcom/base/ErrorList.py
+++ b/xpcom/base/ErrorList.py
@@ -469,21 +469,16 @@ with modules["PLUGINS"]:
 # =======================================================================
 with modules["LAYOUT"]:
     # Return code for nsITableLayout
     errors["NS_TABLELAYOUT_CELL_NOT_FOUND"] = SUCCESS(0)
     # Return code for SheetLoadData::VerifySheetReadyToParse
     errors["NS_OK_PARSE_SHEET"] = SUCCESS(1)
     # Return code for nsFrame::GetNextPrevLineFromeBlockFrame
     errors["NS_POSITION_BEFORE_TABLE"] = SUCCESS(3)
-    # Return codes for nsPresState::GetProperty()
-    # Returned if the property exists
-    errors["NS_STATE_PROPERTY_EXISTS"] = errors["NS_OK"]
-    # Returned if the property does not exist
-    errors["NS_STATE_PROPERTY_NOT_THERE"] = SUCCESS(5)
 
 
 
 # =======================================================================
 # 9: NS_ERROR_MODULE_HTMLPARSER
 # =======================================================================
 with modules["HTMLPARSER"]:
     errors["NS_ERROR_HTMLPARSER_CONTINUE"] = errors["NS_OK"]