Backed out 5 changesets (bug 1330962) for failures in display-block-baselines-1.html and 315920-17.html
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 27 Jan 2017 20:30:07 -0800
changeset 378198 df2eaf8266636576c87eb183fd1f944d483a37f8
parent 378197 be835d18c74f3dc3298705525944f64bc6e7ee31
child 378199 1a2aba1ecb3c86c9a378cd600a41a1bacf5c30f4
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1330962, 315920
milestone54.0a1
backs out71c277105903ab35a7c71bba9ed167737c758d3d
8cfebee598a6cba317920f292bb4c5135c2e7947
2394701998b2c30d2277a2f3126b95397d681ca4
0b92b30ed1d352cf61ac2b3a6fb91a8ef925726a
cc7508381dc1aca4b73081470309c237739cffe2
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
Backed out 5 changesets (bug 1330962) for failures in display-block-baselines-1.html and 315920-17.html CLOSED TREE Backed out changeset 71c277105903 (bug 1330962) Backed out changeset 8cfebee598a6 (bug 1330962) Backed out changeset 2394701998b2 (bug 1330962) Backed out changeset 0b92b30ed1d3 (bug 1330962) Backed out changeset cc7508381dc1 (bug 1330962)
image/DrawResult.h
layout/forms/nsFieldSetFrame.cpp
layout/forms/nsFieldSetFrame.h
layout/forms/nsHTMLButtonControlFrame.cpp
layout/forms/nsHTMLButtonControlFrame.h
layout/forms/nsLegendFrame.h
layout/forms/nsTextControlFrame.cpp
layout/forms/nsTextControlFrame.h
layout/reftests/forms/display-block-baselines-1-ref.html
layout/reftests/forms/display-block-baselines-1.html
layout/reftests/forms/display-block-baselines-2-ref.html
layout/reftests/forms/display-block-baselines-2.html
layout/reftests/forms/display-block-baselines-3-ref.html
layout/reftests/forms/display-block-baselines-3.html
layout/reftests/forms/display-block-baselines-4-ref.html
layout/reftests/forms/display-block-baselines-4.html
layout/reftests/forms/display-block-baselines-5-ref.html
layout/reftests/forms/display-block-baselines-5.html
layout/reftests/forms/reftest.list
--- a/image/DrawResult.h
+++ b/image/DrawResult.h
@@ -1,17 +1,16 @@
 /* -*- 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 mozilla_image_DrawResult_h
 #define mozilla_image_DrawResult_h
 
-#include <cstdint> // for uint8_t
 #include "mozilla/Attributes.h"
 #include "mozilla/Likely.h"
 
 namespace mozilla {
 namespace image {
 
 /**
  * An enumeration representing the result of a drawing operation.
--- a/layout/forms/nsFieldSetFrame.cpp
+++ b/layout/forms/nsFieldSetFrame.cpp
@@ -1,31 +1,35 @@
 /* -*- 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/. */
 
 #include "nsFieldSetFrame.h"
 
+#include "mozilla/gfx/2D.h"
+#include "nsCSSAnonBoxes.h"
+#include "nsLayoutUtils.h"
+#include "nsLegendFrame.h"
+#include "nsCSSRendering.h"
 #include <algorithm>
-#include "mozilla/gfx/2D.h"
+#include "nsIFrame.h"
+#include "nsPresContext.h"
+#include "mozilla/RestyleManager.h"
+#include "nsGkAtoms.h"
+#include "nsStyleConsts.h"
+#include "nsDisplayList.h"
+#include "nsRenderingContext.h"
+#include "nsIScrollableFrame.h"
 #include "mozilla/Likely.h"
 #include "mozilla/Maybe.h"
-#include "nsCSSAnonBoxes.h"
-#include "nsCSSRendering.h"
-#include "nsDisplayList.h"
-#include "nsGkAtoms.h"
-#include "nsIFrameInlines.h"
-#include "nsLayoutUtils.h"
-#include "nsLegendFrame.h"
-#include "nsRenderingContext.h"
-#include "nsStyleConsts.h"
 
 using namespace mozilla;
 using namespace mozilla::gfx;
+using namespace mozilla::image;
 using namespace mozilla::layout;
 
 nsContainerFrame*
 NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
 {
   return new (aPresShell) nsFieldSetFrame(aContext);
 }
 
@@ -106,17 +110,17 @@ public:
   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) override;
   NS_DISPLAY_DECL_NAME("FieldSetBorder", TYPE_FIELDSET_BORDER_BACKGROUND)
 };
 
 void
 nsDisplayFieldSetBorder::Paint(nsDisplayListBuilder* aBuilder,
                                nsRenderingContext* aCtx)
 {
-  image::DrawResult result = static_cast<nsFieldSetFrame*>(mFrame)->
+  DrawResult result = static_cast<nsFieldSetFrame*>(mFrame)->
     PaintBorder(aBuilder, *aCtx, ToReferenceFrame(), mVisibleRect);
 
   nsDisplayItemGenericImageGeometry::UpdateDrawResult(this, result);
 }
 
 nsDisplayItemGeometry*
 nsDisplayFieldSetBorder::AllocateGeometry(nsDisplayListBuilder* aBuilder)
 {
@@ -203,17 +207,17 @@ nsFieldSetFrame::BuildDisplayList(nsDisp
   }
   // Put the inner frame's display items on the master list. Note that this
   // moves its border/background display items to our BorderBackground() list,
   // which isn't really correct, but it's OK because the inner frame is
   // anonymous and can't have its own border and background.
   contentDisplayItems.MoveTo(aLists);
 }
 
-image::DrawResult
+DrawResult
 nsFieldSetFrame::PaintBorder(
   nsDisplayListBuilder* aBuilder,
   nsRenderingContext& aRenderingContext,
   nsPoint aPt,
   const nsRect& aDirtyRect)
 {
   // If the border is smaller than the legend, move the border down
   // to be centered on the legend.  We call VisualBorderRectRelativeToSelf() to
@@ -619,55 +623,14 @@ nsFieldSetFrame::RemoveFrame(ChildListID
 a11y::AccType
 nsFieldSetFrame::AccessibleType()
 {
   return a11y::eHTMLGroupboxType;
 }
 #endif
 
 nscoord
-nsFieldSetFrame::GetLogicalBaseline(WritingMode aWM) const
-{
-  switch (StyleDisplay()->mDisplay) {
-    case mozilla::StyleDisplay::Grid:
-    case mozilla::StyleDisplay::InlineGrid:
-    case mozilla::StyleDisplay::Flex:
-    case mozilla::StyleDisplay::InlineFlex:
-      return BaselineBOffset(aWM, BaselineSharingGroup::eFirst,
-                             AlignmentContext::eInline);
-    default:
-      return BSize(aWM) - BaselineBOffset(aWM, BaselineSharingGroup::eLast,
-                                          AlignmentContext::eInline);
-  }
-}
-
-bool
-nsFieldSetFrame::GetVerticalAlignBaseline(WritingMode aWM,
-                                          nscoord* aBaseline) const
+nsFieldSetFrame::GetLogicalBaseline(WritingMode aWritingMode) const
 {
   nsIFrame* inner = GetInner();
-  MOZ_ASSERT(!inner->GetWritingMode().IsOrthogonalTo(aWM));
-  if (!inner->GetVerticalAlignBaseline(aWM, aBaseline)) {
-    return false;
-  }
-  nscoord innerBStart = inner->BStart(aWM, GetSize());
-  *aBaseline += innerBStart;
-  return true;
+  return inner->BStart(aWritingMode, GetParent()->GetSize()) +
+    inner->GetLogicalBaseline(aWritingMode);
 }
-
-bool
-nsFieldSetFrame::GetNaturalBaselineBOffset(WritingMode          aWM,
-                                           BaselineSharingGroup aBaselineGroup,
-                                           nscoord*             aBaseline) const
-{
-  nsIFrame* inner = GetInner();
-  MOZ_ASSERT(!inner->GetWritingMode().IsOrthogonalTo(aWM));
-  if (!inner->GetNaturalBaselineBOffset(aWM, aBaselineGroup, aBaseline)) {
-    return false;
-  }
-  nscoord innerBStart = inner->BStart(aWM, GetSize());
-  if (aBaselineGroup == BaselineSharingGroup::eFirst) {
-    *aBaseline += innerBStart;
-  } else {
-    *aBaseline += BSize(aWM) - (innerBStart + inner->BSize(aWM));
-  }
-  return true;
-}
--- a/layout/forms/nsFieldSetFrame.h
+++ b/layout/forms/nsFieldSetFrame.h
@@ -2,52 +2,46 @@
 /* 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 nsFieldSetFrame_h___
 #define nsFieldSetFrame_h___
 
 #include "mozilla/Attributes.h"
-#include "DrawResult.h"
+#include "imgIContainer.h"
 #include "nsContainerFrame.h"
 
 class nsFieldSetFrame final : public nsContainerFrame
 {
   typedef mozilla::image::DrawResult DrawResult;
 
 public:
   NS_DECL_FRAMEARENA_HELPERS
 
   explicit nsFieldSetFrame(nsStyleContext* aContext);
 
   nscoord
     GetIntrinsicISize(nsRenderingContext* aRenderingContext,
                       nsLayoutUtils::IntrinsicISizeType);
   virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;
   virtual nscoord GetPrefISize(nsRenderingContext* aRenderingContext) override;
+  virtual nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const override;
 
   /**
    * The area to paint box-shadows around.  It's the border rect except
    * when there's a <legend> we offset the y-position to the center of it.
    */
   virtual nsRect VisualBorderRectRelativeToSelf() const override;
 
   virtual void Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus) override;
                                
-  nscoord GetLogicalBaseline(mozilla::WritingMode aWM) const override;
-  bool GetVerticalAlignBaseline(mozilla::WritingMode aWM,
-                                nscoord* aBaseline) const override;
-  bool GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
-                                 BaselineSharingGroup aBaselineGroup,
-                                 nscoord* aBaseline) const override;
-
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsRect&           aDirtyRect,
                                 const nsDisplayListSet& aLists) override;
 
   DrawResult PaintBorder(nsDisplayListBuilder* aBuilder,
                          nsRenderingContext& aRenderingContext,
                          nsPoint aPt, const nsRect& aDirtyRect);
 
--- a/layout/forms/nsHTMLButtonControlFrame.cpp
+++ b/layout/forms/nsHTMLButtonControlFrame.cpp
@@ -332,57 +332,16 @@ nsHTMLButtonControlFrame::ReflowButtonCo
   } else {
     aButtonDesiredSize.SetBlockStartAscent(contentsDesiredSize.BlockStartAscent() +
                                            childPos.B(wm));
   }
 
   aButtonDesiredSize.SetOverflowAreasToDesiredBounds();
 }
 
-bool
-nsHTMLButtonControlFrame::GetVerticalAlignBaseline(mozilla::WritingMode aWM,
-                                                   nscoord* aBaseline) const
-{
-  nsIFrame* inner = mFrames.FirstChild();
-  if (MOZ_UNLIKELY(inner->GetWritingMode().IsOrthogonalTo(aWM))) {
-    return false;
-  }
-  if (!inner->GetVerticalAlignBaseline(aWM, aBaseline)) {
-    // <input type=color> has an empty block frame as inner frame
-    *aBaseline = inner->
-      SynthesizeBaselineBOffsetFromBorderBox(aWM, BaselineSharingGroup::eFirst);
-  }
-  nscoord innerBStart = inner->BStart(aWM, GetSize());
-  *aBaseline += innerBStart;
-  return true;
-}
-
-bool
-nsHTMLButtonControlFrame::GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
-                                         BaselineSharingGroup aBaselineGroup,
-                                         nscoord* aBaseline) const
-{
-  nsIFrame* inner = mFrames.FirstChild();
-  if (MOZ_UNLIKELY(inner->GetWritingMode().IsOrthogonalTo(aWM))) {
-    return false;
-  }
-  if (!inner->GetNaturalBaselineBOffset(aWM, aBaselineGroup, aBaseline)) {
-    // <input type=color> has an empty block frame as inner frame
-    *aBaseline = inner->
-      SynthesizeBaselineBOffsetFromBorderBox(aWM, aBaselineGroup);
-  }
-  nscoord innerBStart = inner->BStart(aWM, GetSize());
-  if (aBaselineGroup == BaselineSharingGroup::eFirst) {
-    *aBaseline += innerBStart;
-  } else {
-    *aBaseline += BSize(aWM) - (innerBStart + inner->BSize(aWM));
-  }
-  return true;
-}
-
 nsresult nsHTMLButtonControlFrame::SetFormProperty(nsIAtom* aName, const nsAString& aValue)
 {
   if (nsGkAtoms::value == aName) {
     return mContent->SetAttr(kNameSpaceID_None, nsGkAtoms::value,
                              aValue, true);
   }
   return NS_OK;
 }
--- a/layout/forms/nsHTMLButtonControlFrame.h
+++ b/layout/forms/nsHTMLButtonControlFrame.h
@@ -34,23 +34,16 @@ public:
 
   virtual nscoord GetPrefISize(nsRenderingContext *aRenderingContext) override;
 
   virtual void Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus) override;
 
-  bool GetVerticalAlignBaseline(mozilla::WritingMode aWM,
-                                nscoord* aBaseline) const override;
-
-  bool GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
-                                 BaselineSharingGroup aBaselineGroup,
-                                 nscoord* aBaseline) const override;
-
   virtual nsresult HandleEvent(nsPresContext* aPresContext, 
                                mozilla::WidgetGUIEvent* aEvent,
                                nsEventStatus* aEventStatus) override;
 
   virtual void Init(nsIContent*       aContent,
                     nsContainerFrame* aParent,
                     nsIFrame*         aPrevInFlow) override;
 
--- a/layout/forms/nsLegendFrame.h
+++ b/layout/forms/nsLegendFrame.h
@@ -4,18 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsLegendFrame_h___
 #define nsLegendFrame_h___
 
 #include "mozilla/Attributes.h"
 #include "nsBlockFrame.h"
 
-class nsLegendFrame final : public nsBlockFrame
-{
+class nsLegendFrame : public nsBlockFrame {
 public:
   NS_DECL_QUERYFRAME_TARGET(nsLegendFrame)
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS
 
   explicit nsLegendFrame(nsStyleContext* aContext) : nsBlockFrame(aContext) {}
 
   virtual void Reflow(nsPresContext*           aPresContext,
@@ -26,13 +25,13 @@ public:
   virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
 
   virtual nsIAtom* GetType() const override;
 
 #ifdef DEBUG_FRAME_DUMP
   virtual nsresult GetFrameName(nsAString& aResult) const override;
 #endif
 
-  int32_t GetLogicalAlign(mozilla::WritingMode aCBWM);
+  int32_t GetLogicalAlign(WritingMode aCBWM);
 };
 
 
 #endif // guard
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -100,17 +100,16 @@ public:
 private:
   nsTextControlFrame &mFrame;
   bool mFirstEntry;
 };
 #endif
 
 nsTextControlFrame::nsTextControlFrame(nsStyleContext* aContext)
   : nsContainerFrame(aContext)
-  , mFirstBaseline(NS_INTRINSIC_WIDTH_UNKNOWN)
   , mEditorHasBeenInitialized(false)
   , mIsProcessing(false)
   , mUsePlaceholder(false)
 #ifdef DEBUG
   , mInEditorInitialization(false)
 #endif
 {
 }
@@ -529,30 +528,30 @@ nsTextControlFrame::Reflow(nsPresContext
   LogicalSize
     finalSize(wm,
               aReflowInput.ComputedISize() +
               aReflowInput.ComputedLogicalBorderPadding().IStartEnd(wm),
               aReflowInput.ComputedBSize() +
               aReflowInput.ComputedLogicalBorderPadding().BStartEnd(wm));
   aDesiredSize.SetSize(wm, finalSize);
 
-  // Calculate the baseline and store it in mFirstBaseline.
+  // computation of the ascent wrt the input height
   nscoord lineHeight = aReflowInput.ComputedBSize();
   float inflation = nsLayoutUtils::FontSizeInflationFor(this);
   if (!IsSingleLineTextControl()) {
     lineHeight = ReflowInput::CalcLineHeight(GetContent(), StyleContext(),
-                                             NS_AUTOHEIGHT, inflation);
+                                                   NS_AUTOHEIGHT, inflation);
   }
   RefPtr<nsFontMetrics> fontMet =
     nsLayoutUtils::GetFontMetricsForFrame(this, inflation);
-  mFirstBaseline =
+  // now adjust for our borders and padding
+  aDesiredSize.SetBlockStartAscent(
     nsLayoutUtils::GetCenteredFontBaseline(fontMet, lineHeight,
                                            wm.IsLineInverted()) +
-    aReflowInput.ComputedLogicalBorderPadding().BStart(wm);
-  aDesiredSize.SetBlockStartAscent(mFirstBaseline);
+    aReflowInput.ComputedLogicalBorderPadding().BStart(wm));
 
   // overflow handling
   aDesiredSize.SetOverflowAreasToDesiredBounds();
   // perform reflow on all kids
   nsIFrame* kid = mFrames.FirstChild();
   while (kid) {
     ReflowTextControlChild(kid, aPresContext, aReflowInput, aStatus, aDesiredSize);
     kid = kid->GetNextSibling();
--- a/layout/forms/nsTextControlFrame.h
+++ b/layout/forms/nsTextControlFrame.h
@@ -57,39 +57,16 @@ public:
                   const mozilla::LogicalSize& aPadding,
                   ComputeSizeFlags            aFlags) override;
 
   virtual void Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus) override;
 
-  bool GetVerticalAlignBaseline(mozilla::WritingMode aWM,
-                                nscoord* aBaseline) const override
-  {
-    return GetNaturalBaselineBOffset(aWM, BaselineSharingGroup::eFirst, aBaseline);
-  }
-
-  bool GetNaturalBaselineBOffset(mozilla::WritingMode aWM,
-                                 BaselineSharingGroup aBaselineGroup,
-                                 nscoord* aBaseline) const override
-  {
-    if (!IsSingleLineTextControl()) {
-      return false;
-    }
-    NS_ASSERTION(mFirstBaseline != NS_INTRINSIC_WIDTH_UNKNOWN,
-                 "please call Reflow before asking for the baseline");
-    if (aBaselineGroup == BaselineSharingGroup::eFirst) {
-      *aBaseline = mFirstBaseline;
-    } else {
-      *aBaseline = BSize(aWM) - mFirstBaseline;
-    }
-    return true;
-  }
-
   virtual nsSize GetXULMinSize(nsBoxLayoutState& aBoxLayoutState) override;
   virtual bool IsXULCollapsed() override;
 
   virtual bool IsLeaf() const override;
   
 #ifdef ACCESSIBILITY
   virtual mozilla::a11y::AccType AccessibleType() override;
 #endif
@@ -105,24 +82,16 @@ public:
   virtual bool IsFrameOfType(uint32_t aFlags) const override
   {
     // nsStackFrame is already both of these, but that's somewhat bogus,
     // and we really mean it.
     return nsContainerFrame::IsFrameOfType(aFlags &
       ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock));
   }
 
-#ifdef DEBUG
-  void MarkIntrinsicISizesDirty() override
-  {
-    // Need another Reflow to have a correct baseline value again.
-    mFirstBaseline = NS_INTRINSIC_WIDTH_UNKNOWN;
-  }
-#endif
-
   // nsIAnonymousContentCreator
   virtual nsresult CreateAnonymousContent(nsTArray<ContentInfo>& aElements) override;
   virtual void AppendAnonymousContentTo(nsTArray<nsIContent*>& aElements,
                                         uint32_t aFilter) override;
 
   virtual void SetInitialChildList(ChildListID     aListID,
                                    nsFrameList&    aChildList) override;
 
@@ -326,20 +295,16 @@ private:
   mozilla::dom::Element* GetRootNodeAndInitializeEditor();
   nsresult GetRootNodeAndInitializeEditor(nsIDOMElement **aRootElement);
 
   void FinishedInitializer() {
     Properties().Delete(TextControlInitializer());
   }
 
 private:
-  // Our first baseline, or NS_INTRINSIC_WIDTH_UNKNOWN if we have a pending
-  // Reflow.
-  nscoord mFirstBaseline;
-
   // these packed bools could instead use the high order bits on mState, saving 4 bytes 
   bool mEditorHasBeenInitialized;
   bool mIsProcessing;
   // Keep track if we have asked a placeholder node creation.
   bool mUsePlaceholder;
 
 #ifdef DEBUG
   bool mInEditorInitialization;
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-1-ref.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Reference: Testcase #1 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-grid">
-    A<img class="block" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQoz2NgGAWjYBTAAAADEAABaJFtwwAAAABJRU5ErkJggg%3D%3D">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <input type="image" class="block" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQoz2NgGAWjYBTAAAADEAABaJFtwwAAAABJRU5ErkJggg%3D%3D">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><input type="text" value="text"></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><input type="text" value="text"></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><input type="text"></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><input class="no-theme" type="text" value="text"></div>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-1.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Testcase #1 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <img class="block" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQoz2NgGAWjYBTAAAADEAABaJFtwwAAAABJRU5ErkJggg%3D%3D">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input type="image" class="block" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQoz2NgGAWjYBTAAAADEAABaJFtwwAAAABJRU5ErkJggg%3D%3D">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block" type="text" value="text">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block scroll" type="text" value="text">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block" type="text">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block no-theme" type="text" value="text">
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-2-ref.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Reference: Testcase #2 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-  color: black;
-  text-align: start;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A<div>
-    <div style="display:inline-block"><input type="button" value="button"></div></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><button>button</button></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><input class="no-theme" type="button" value="button"></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <button class="no-theme">button-first<div style="font-size:10px">button-last</div></button>
-  </div>
-  B
-  <div class="no-theme" style="display:inline-block">button-first<div style="font-size:10px">button-last</div></div>
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <button class="no-theme" style="display:inline-grid">button-first<x style="font-size:10px">button-last</x></button>
-  </div>
-  B
-  <div class="no-theme" style="display:inline-grid">button-first<x style="font-size:10px">button-last</x></div>
-</div>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <input type="checkbox" class="block" checked>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <input type="radio" class="block" checked>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-2.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Testcase #2 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-  color: black;
-  text-align: start;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block" type="button" value="button">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <button class="block">button</button>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input class="block no-theme" type="button" value="button">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <button class="block no-theme">button-first<div style="font-size:10px">button-last</div></button>
-  </div>
-  B
-  <button class="no-theme">button-first<div style="font-size:10px">button-last</div></button>
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <button class="grid no-theme">button-first<x style="font-size:10px">button-last</x></button>
-  </div>
-  B
-  <button class="no-theme" style="display:inline-grid">button-first<x style="font-size:10px">button-last</x></button>
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input type="checkbox" class="block" checked>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input type="radio" class="block" checked>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-3-ref.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Reference: Testcase #3 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <textarea class="block">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <textarea class="block no-theme">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-grid">
-    A
-    <textarea class="block no-theme no-scroll">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><fieldset style="display:inline">fieldset-first<br>fieldset-last</fieldset></div>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-3.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Testcase #3 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <textarea class="block">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <textarea class="block no-theme">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <textarea class="block no-theme no-scroll">textarea</textarea>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <fieldset class="block">fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-4-ref.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Reference: Testcase #4 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <div style="display:inline-block"><fieldset style="display:inline"><legend>legend</legend>
-fieldset-first<br>fieldset-last</fieldset></div>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <fieldset style="display:inline-grid">grid-fieldset-first<x>grid-fieldset-last</x></fieldset>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <fieldset style="display:inline" class="no-theme">fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <fieldset style="display:inline" class="no-theme scroll">fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-4.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Testcase #4 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <fieldset class="block"><legend>legend</legend>
-fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <fieldset class="grid"><x style="order:2">grid-fieldset-last</x>grid-fieldset-first</fieldset>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <fieldset class="block no-theme">fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <fieldset class="block no-theme scroll">fieldset-first<br>fieldset-last</fieldset>
-  </div>
-  B
-</div>
-
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-5-ref.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Reference: Testcase #5 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <input type="color">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <input type="color" class="no-theme">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <select><option>select</select>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A<br>
-    <select class="no-theme"><option>select</select>
-  </div>
-  B
-</div>
-
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/forms/display-block-baselines-5.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
-  <meta charset="utf-8">
-  <title>Testcase #5 for bug 1330962</title>
-  <style type="text/css">
-html,body {
-  color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-* { font:16px/1 monospace; }
-
-.block { display: block; }
-.grid { display: grid; }
-
-.no-theme {
-     -moz-appearance: none;
-  -webkit-appearance: none;
-          appearance: none;
-  padding: 20px 0;
-  border: none;
-  background: white;
-}
-
-.scroll {
-  overflow-y: scroll;
-}
-
-.no-scroll {
-  overflow: visible;
-}
-
-  </style>
-</head>
-<body>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input type="color" class="block">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <input type="color" class="block no-theme">
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <select class="block"><option>select</select>
-  </div>
-  B
-</div>
-
-<div>
-  <div style="display:inline-block">
-    A
-    <select class="block no-theme"><option>select</select>
-  </div>
-  B
-</div>
-
-</body>
-</html>
--- a/layout/reftests/forms/reftest.list
+++ b/layout/reftests/forms/reftest.list
@@ -1,14 +1,9 @@
 fuzzy-if(skiaContent,1,10) HTTP(..) == text-control-baseline-1.html text-control-baseline-1-ref.html
-== display-block-baselines-1.html display-block-baselines-1-ref.html
-== display-block-baselines-2.html display-block-baselines-2-ref.html
-== display-block-baselines-3.html display-block-baselines-3-ref.html
-== display-block-baselines-4.html display-block-baselines-4-ref.html
-fuzzy-if(Android,4,8) == display-block-baselines-5.html display-block-baselines-5-ref.html
 
 # button element
 include button/reftest.list
 
 # legend element
 include legend/reftest.list
 
 # fieldset element