Skip to content

Commit

Permalink
Backed out 2 changesets (bug 1506687) for causing mochitest mass fail…
Browse files Browse the repository at this point in the history
…ures. CLOSED TREE

Backed out changeset f93f179fb3b4 (bug 1506687)
Backed out changeset d8230f3fdd2c (bug 1506687)
  • Loading branch information
CosminSabou committed Nov 17, 2018
1 parent 1f1188e commit 06a105e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 161 deletions.
1 change: 0 additions & 1 deletion dom/chrome-webidl/Flex.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ enum FlexItemClampState {
interface FlexItemValues
{
readonly attribute Node? node;
readonly attribute DOMRectReadOnly frameRect;
readonly attribute double mainBaseSize;
readonly attribute double mainDeltaSize;
readonly attribute double mainMinSize;
Expand Down
17 changes: 1 addition & 16 deletions dom/flex/FlexItemValues.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
namespace mozilla {
namespace dom {

NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FlexItemValues, mParent, mNode,
mFrameRect)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FlexItemValues, mParent)
NS_IMPL_CYCLE_COLLECTING_ADDREF(FlexItemValues)
NS_IMPL_CYCLE_COLLECTING_RELEASE(FlexItemValues)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FlexItemValues)
Expand Down Expand Up @@ -50,14 +49,6 @@ FlexItemValues::FlexItemValues(FlexLineValues* aParent,
// going to keep it around.
mNode = aItem->mNode;

// Since mNode might be null, we associate the mFrameRect with
// our parent.
mFrameRect = new DOMRectReadOnly(mParent,
nsPresContext::AppUnitsToDoubleCSSPixels(aItem->mFrameRect.X()),
nsPresContext::AppUnitsToDoubleCSSPixels(aItem->mFrameRect.Y()),
nsPresContext::AppUnitsToDoubleCSSPixels(aItem->mFrameRect.Width()),
nsPresContext::AppUnitsToDoubleCSSPixels(aItem->mFrameRect.Height()));

// Convert app unit sizes to css pixel sizes.
mMainBaseSize = nsPresContext::AppUnitsToDoubleCSSPixels(
aItem->mMainBaseSize);
Expand Down Expand Up @@ -85,12 +76,6 @@ FlexItemValues::GetNode() const
return mNode;
}

DOMRectReadOnly*
FlexItemValues::FrameRect() const
{
return mFrameRect;
}

double
FlexItemValues::MainBaseSize() const
{
Expand Down
2 changes: 0 additions & 2 deletions dom/flex/FlexItemValues.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class FlexItemValues : public nsISupports
}

nsINode* GetNode() const;
DOMRectReadOnly* FrameRect() const;
double MainBaseSize() const;
double MainDeltaSize() const;
double MainMinSize() const;
Expand All @@ -51,7 +50,6 @@ class FlexItemValues : public nsISupports
protected:
RefPtr<FlexLineValues> mParent;
RefPtr<nsINode> mNode;
RefPtr<DOMRectReadOnly> mFrameRect;

// These sizes are all CSS pixel units.
double mMainBaseSize;
Expand Down
3 changes: 1 addition & 2 deletions dom/flex/test/chrome.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[chrome/test_flex_axis_directions.html]
[chrome/test_flex_item_clamp.html]
[chrome/test_flex_item_rect.html]
[chrome/test_flex_items.html]
[chrome/test_flex_item_clamp.html]
[chrome/test_flex_lines.html]
124 changes: 0 additions & 124 deletions dom/flex/test/chrome/test_flex_item_rect.html

This file was deleted.

24 changes: 9 additions & 15 deletions layout/generic/nsFlexContainerFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4849,9 +4849,14 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,

itemInfo->mNode = content;

// itemInfo->mMainBaseSize and mMainDeltaSize will be filled out
// in ResolveFlexibleLengths(). Other measurements will be captured
// at the end of this function.
// mMainBaseSize and itemInfo->mMainDeltaSize will
// be filled out in ResolveFlexibleLengths().

// Other FlexItem properties can be captured now.
itemInfo->mMainMinSize = item->GetMainMinSize();
itemInfo->mMainMaxSize = item->GetMainMaxSize();
itemInfo->mCrossMinSize = item->GetCrossMinSize();
itemInfo->mCrossMaxSize = item->GetCrossMaxSize();
}
}
}
Expand Down Expand Up @@ -5256,7 +5261,7 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,

NS_FRAME_SET_TRUNCATION(aStatus, aReflowInput, aDesiredSize)

// Finally update our line and item measurements in our containerInfo.
// Finally update our line sizing values in our containerInfo.
if (MOZ_UNLIKELY(containerInfo)) {
lineIndex = 0;
for (const FlexLine* line = lines.getFirst(); line;
Expand All @@ -5266,17 +5271,6 @@ nsFlexContainerFrame::DoFlexLayout(nsPresContext* aPresContext,
lineInfo.mCrossSize = line->GetLineCrossSize();
lineInfo.mFirstBaselineOffset = line->GetFirstBaselineOffset();
lineInfo.mLastBaselineOffset = line->GetLastBaselineOffset();

uint32_t itemIndex = 0;
for (const FlexItem* item = line->GetFirstItem(); item;
item = item->getNext(), ++itemIndex) {
ComputedFlexItemInfo& itemInfo = lineInfo.mItems[itemIndex];
itemInfo.mFrameRect = item->Frame()->GetRect();
itemInfo.mMainMinSize = item->GetMainMinSize();
itemInfo.mMainMaxSize = item->GetMainMaxSize();
itemInfo.mCrossMinSize = item->GetCrossMinSize();
itemInfo.mCrossMaxSize = item->GetCrossMaxSize();
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion layout/generic/nsFlexContainerFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ nsContainerFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell,
struct ComputedFlexItemInfo
{
nsCOMPtr<nsINode> mNode;
nsRect mFrameRect;
/**
* mMainBaseSize is a measure of the size of the item in the main
* axis before the flex sizing algorithm is applied. In the spec,
Expand Down

0 comments on commit 06a105e

Please sign in to comment.