Commit 326297bd authored by Alexandru Michis's avatar Alexandru Michis
Browse files

Backed out changeset e41bfdf79fb8 (bug 1665476) for causing windows mochitest...

Backed out changeset e41bfdf79fb8 (bug 1665476) for causing windows mochitest failures in test_windowminmaxsize.xhtml

CLOSED TREE
parent bbca45e8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@
#include "nsCSSPropertyIDSet.h"
#include "nsCSSProps.h"             // For nsCSSProps::PropHasFlags
#include "nsCSSPseudoElements.h"    // For PseudoStyleType
#include "nsCSSRendering.h"         // For IsCanvasFrame
#include "nsDOMMutationObserver.h"  // For nsAutoAnimationMutationBatch
#include "nsIFrame.h"
#include "nsIFrameInlines.h"
@@ -2051,7 +2052,7 @@ KeyframeEffect::MatchForCompositor KeyframeEffect::IsMatchForCompositor(
    // We don't yet support off-main-thread background-color animations on
    // canvas frame or on <body> which genarate nsDisplayCanvasBackgroundColor
    // or nsDisplaySolidColor display item.
    if (aFrame->IsCanvasFrame() ||
    if (nsCSSRendering::IsCanvasFrame(aFrame) ||
        (aFrame->GetContent() &&
         aFrame->GetContent()->IsHTMLElement(nsGkAtoms::body))) {
      return KeyframeEffect::MatchForCompositor::No;
+2 −0
Original line number Diff line number Diff line
@@ -466,6 +466,8 @@ void APZCCallbackHelper::InitializeRootDisplayport(PresShell* aPresShell) {
      DisplayPortUtils::SetDisplayPortBaseIfNotSet(content, *baseRect);
    }

    // Note that we also set the base rect that goes with these margins in
    // nsRootBoxFrame::BuildDisplayList.
    DisplayPortUtils::SetDisplayPortMargins(
        content, aPresShell, DisplayPortMargins::Empty(content),
        DisplayPortUtils::ClearMinimalDisplayPortProperty::Yes, 0);
+1 −1
Original line number Diff line number Diff line
@@ -5216,7 +5216,7 @@ void PresShell::AddCanvasBackgroundColorItem(
  // cases (it will usually be a viewport frame when we have a canvas frame in
  // the (sub)tree).
  if (!(aFlags & AddCanvasBackgroundColorFlags::ForceDraw) &&
      !aFrame->IsViewportFrame() && !aFrame->IsPageContentFrame()) {
      !nsCSSRendering::IsCanvasFrame(aFrame)) {
    return;
  }

+19 −5
Original line number Diff line number Diff line
@@ -214,6 +214,9 @@ static FrameCtorDebugFlags gFlags[] = {

//------------------------------------------------------------------

nsContainerFrame* NS_NewRootBoxFrame(PresShell* aPresShell,
                                     ComputedStyle* aStyle);

nsContainerFrame* NS_NewDocElementBoxFrame(PresShell* aPresShell,
                                           ComputedStyle* aStyle);

@@ -2592,7 +2595,7 @@ void nsCSSFrameConstructor::SetUpDocElementContainingBlock(
  Galley presentation, XUL

      ViewportFrame [fixed-cb]
        nsCanvasFrame [abs-cb]
        nsRootBoxFrame
          root element frame (nsDocElementBoxFrame)

  Print presentation, non-XUL
@@ -2629,7 +2632,7 @@ void nsCSSFrameConstructor::SetUpDocElementContainingBlock(
    mRootElementFrame is "root element frame".  This is the primary frame for
      the root element.
    mDocElementContainingBlock is the parent of mRootElementFrame
      (i.e. nsCanvasFrame)
      (i.e. nsCanvasFrame or nsRootBoxFrame)
    mPageSequenceFrame is the nsPageSequenceFrame, or null if there isn't
      one
  */
@@ -2672,10 +2675,21 @@ void nsCSSFrameConstructor::SetUpDocElementContainingBlock(
      static_cast<nsContainerFrame*>(GetRootFrame());
  ComputedStyle* viewportPseudoStyle = viewportFrame->Style();

  nsContainerFrame* rootFrame =
    NS_NewCanvasFrame(mPresShell, viewportPseudoStyle);
  PseudoStyleType rootPseudo = PseudoStyleType::canvas;
  nsContainerFrame* rootFrame = nullptr;

#ifdef MOZ_XUL
  if (aDocElement->IsXULElement()) {
    // pass a temporary stylecontext, the correct one will be set later
    rootFrame = NS_NewRootBoxFrame(mPresShell, viewportPseudoStyle);
  } else
#endif
  {
    // pass a temporary stylecontext, the correct one will be set later
    rootFrame = NS_NewCanvasFrame(mPresShell, viewportPseudoStyle);
    mHasRootAbsPosContainingBlock = true;
  }

  PseudoStyleType rootPseudo = PseudoStyleType::canvas;
  mDocElementContainingBlock = rootFrame;

  // --------- IF SCROLLABLE WRAP IN SCROLLFRAME --------
+3 −1
Original line number Diff line number Diff line
@@ -203,7 +203,9 @@ bool nsFrameIterator::IsDone() { return mOffEdge != 0; }

void nsFrameIterator::First() { mCurrent = mStart; }

static bool IsRootFrame(nsIFrame* aFrame) { return aFrame->IsCanvasFrame(); }
static bool IsRootFrame(nsIFrame* aFrame) {
  return aFrame->IsCanvasFrame() || aFrame->IsXULRootFrame();
}

void nsFrameIterator::Last() {
  nsIFrame* result;
Loading