Bug 1574107 - Remove nsIFrame::IsBlockInside since it's dead code. r=emilio
authorMats Palmgren <mats@mozilla.com>
Fri, 16 Aug 2019 06:29:59 +0000
changeset 488441 c9ece2f3ad559ed5a861b8b7c829bb6277c12fe7
parent 488440 e3f6e2f3e216b5504640481a25b2277e9882c474
child 488442 f9534a732e48d4b292da4dee06dbeff6586c698e
push id36444
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 16:24:18 +0000
treeherdermozilla-central@8a9e9189cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1574107
milestone70.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 1574107 - Remove nsIFrame::IsBlockInside since it's dead code. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D42088
layout/generic/nsIFrame.h
layout/generic/nsIFrameInlines.h
layout/style/nsStyleStruct.h
layout/style/nsStyleStructInlines.h
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -3951,17 +3951,16 @@ class nsIFrame : public nsQueryFrame {
   inline bool IsFlexOrGridItem() const;
   inline bool IsFlexOrGridContainer() const;
 
   /**
    * @return true if this frame is used as a table caption.
    */
   inline bool IsTableCaption() const;
 
-  inline bool IsBlockInside() const;
   inline bool IsBlockOutside() const;
   inline bool IsInlineOutside() const;
   inline mozilla::StyleDisplay GetDisplay() const;
   inline bool IsFloating() const;
   inline bool IsAbsPosContainingBlock() const;
   inline bool IsFixedPosContainingBlock() const;
   inline bool IsRelativelyPositioned() const;
   inline bool IsStickyPositioned() const;
--- a/layout/generic/nsIFrameInlines.h
+++ b/layout/generic/nsIFrameInlines.h
@@ -53,20 +53,16 @@ bool nsIFrame::IsStickyPositioned() cons
 }
 
 bool nsIFrame::IsAbsolutelyPositioned(
     const nsStyleDisplay* aStyleDisplay) const {
   const nsStyleDisplay* disp = StyleDisplayWithOptionalParam(aStyleDisplay);
   return disp->IsAbsolutelyPositioned(this);
 }
 
-bool nsIFrame::IsBlockInside() const {
-  return StyleDisplay()->IsBlockInside(this);
-}
-
 bool nsIFrame::IsBlockOutside() const {
   return StyleDisplay()->IsBlockOutside(this);
 }
 
 bool nsIFrame::IsInlineOutside() const {
   return StyleDisplay()->IsInlineOutside(this);
 }
 
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1618,27 +1618,16 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
     return DisplayInside(mDisplay);
   }
 
   static bool IsListItem(mozilla::StyleDisplay aDisplay) {
     return !!(uint16_t(aDisplay) & mozilla::STYLE_DISPLAY_LIST_ITEM_BIT);
   }
   bool IsListItem() const { return IsListItem(mDisplay); }
 
-  bool IsBlockInsideStyle() const {
-    return mozilla::StyleDisplay::Block == mDisplay ||
-           mozilla::StyleDisplay::ListItem == mDisplay ||
-           mozilla::StyleDisplay::InlineBlock == mDisplay ||
-           mozilla::StyleDisplay::TableCaption == mDisplay ||
-           mozilla::StyleDisplay::FlowRoot == mDisplay;
-    // Should TABLE_CELL be included here?  They have
-    // block frames nested inside of them.
-    // (But please audit all callers before changing.)
-  }
-
   bool IsInlineInsideStyle() const {
     auto inside = DisplayInside();
     return inside == mozilla::StyleDisplayInside::Inline ||
            inside == mozilla::StyleDisplayInside::Ruby ||
            inside == mozilla::StyleDisplayInside::RubyBase ||
            inside == mozilla::StyleDisplayInside::RubyBaseContainer ||
            inside == mozilla::StyleDisplayInside::RubyText ||
            inside == mozilla::StyleDisplayInside::RubyTextContainer;
@@ -1804,17 +1793,16 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   bool BreakAfter() const { return ShouldBreak(mBreakAfter); }
 
   // These are defined in nsStyleStructInlines.h.
 
   // The aContextFrame argument on each of these is the frame this
   // style struct is for.  If the frame is for SVG text, the return
   // value will be massaged to be something that makes sense for
   // SVG text.
-  inline bool IsBlockInside(const nsIFrame* aContextFrame) const;
   inline bool IsBlockOutside(const nsIFrame* aContextFrame) const;
   inline bool IsInlineOutside(const nsIFrame* aContextFrame) const;
   inline bool IsOriginalDisplayInlineOutside(
       const nsIFrame* aContextFrame) const;
   inline mozilla::StyleDisplay GetDisplay(const nsIFrame* aContextFrame) const;
   inline bool IsFloating(const nsIFrame* aContextFrame) const;
   inline bool IsRelativelyPositioned(const nsIFrame* aContextFrame) const;
   inline bool IsStickyPositioned(const nsIFrame* aContextFrame) const;
--- a/layout/style/nsStyleStructInlines.h
+++ b/layout/style/nsStyleStructInlines.h
@@ -49,25 +49,16 @@ bool nsStyleText::WhiteSpaceCanWrap(cons
          !aContextFrame->Style()->IsTextCombined();
 }
 
 bool nsStyleText::WordCanWrap(const nsIFrame* aContextFrame) const {
   NS_ASSERTION(aContextFrame->StyleText() == this, "unexpected aContextFrame");
   return WordCanWrapStyle() && !nsSVGUtils::IsInSVGTextSubtree(aContextFrame);
 }
 
-bool nsStyleDisplay::IsBlockInside(const nsIFrame* aContextFrame) const {
-  NS_ASSERTION(aContextFrame->StyleDisplay() == this,
-               "unexpected aContextFrame");
-  if (nsSVGUtils::IsInSVGTextSubtree(aContextFrame)) {
-    return aContextFrame->IsBlockFrame();
-  }
-  return IsBlockInsideStyle();
-}
-
 bool nsStyleDisplay::IsBlockOutside(const nsIFrame* aContextFrame) const {
   NS_ASSERTION(aContextFrame->StyleDisplay() == this,
                "unexpected aContextFrame");
   if (nsSVGUtils::IsInSVGTextSubtree(aContextFrame)) {
     return aContextFrame->IsBlockFrame();
   }
   return IsBlockOutsideStyle();
 }