Bug 913586 (Part 7) - Update Maybe users in layout. r=dbaron

--HG--
extra : rebase_source : 1bf45d1356d36269ca951b58ebf1e448313c55c5
This commit is contained in:
Seth Fowler 2014-08-13 15:42:15 -07:00
Родитель c617ac43cc
Коммит 983a3f905a
5 изменённых файлов: 21 добавлений и 22 удалений

Просмотреть файл

@ -1335,8 +1335,8 @@ nsRefreshDriver::StartTableRefresh(const uint32_t& aDelay,
ImageRequestParameters* parms =
static_cast<ImageRequestParameters*> (aUserArg);
if (!aData->mStartTime.empty()) {
TimeStamp& start = aData->mStartTime.ref();
if (aData->mStartTime) {
TimeStamp& start = *aData->mStartTime;
TimeDuration prev = parms->mPrevious - start;
TimeDuration curr = parms->mCurrent - start;
uint32_t prevMultiple = static_cast<uint32_t>(prev.ToMilliseconds()) / aDelay;
@ -1355,7 +1355,7 @@ nsRefreshDriver::StartTableRefresh(const uint32_t& aDelay,
// table to the main requests table.
parms->mDesired = parms->mCurrent;
aData->mEntries.EnumerateEntries(nsRefreshDriver::BeginRefreshingImages, parms);
aData->mStartTime.construct(parms->mCurrent);
aData->mStartTime.emplace(parms->mCurrent);
}
return PL_DHASH_NEXT;

Просмотреть файл

@ -395,13 +395,13 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
// reflow the legend only if needed
Maybe<nsHTMLReflowState> legendReflowState;
if (legend) {
legendReflowState.construct(aPresContext, aReflowState, legend,
legendReflowState.emplace(aPresContext, aReflowState, legend,
legendAvailSize);
}
if (reflowLegend) {
nsHTMLReflowMetrics legendDesiredSize(aReflowState);
ReflowChild(legend, aPresContext, legendDesiredSize, legendReflowState.ref(),
ReflowChild(legend, aPresContext, legendDesiredSize, *legendReflowState,
0, 0, NS_FRAME_NO_MOVE_FRAME, aStatus);
#ifdef NOISY_REFLOW
printf(" returned (%d, %d)\n",
@ -430,7 +430,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
}
FinishReflowChild(legend, aPresContext, legendDesiredSize,
&legendReflowState.ref(), 0, 0, NS_FRAME_NO_MOVE_FRAME);
legendReflowState.ptr(), 0, 0, NS_FRAME_NO_MOVE_FRAME);
} else if (!legend) {
mLegendRect.SetEmpty();
mLegendSpace = 0;
@ -529,7 +529,7 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext,
nsRect actualLegendRect(mLegendRect);
actualLegendRect.Deflate(legendMargin);
nsPoint actualLegendPos(actualLegendRect.TopLeft());
legendReflowState.ref().ApplyRelativePositioning(&actualLegendPos);
legendReflowState->ApplyRelativePositioning(&actualLegendPos);
legend->SetPosition(actualLegendPos);
nsContainerFrame::PositionFrameView(legend);
nsContainerFrame::PositionChildViews(legend);

Просмотреть файл

@ -1049,9 +1049,9 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
if (effectiveComputedBSize + blockDirExtras.BStartEnd(wm) <=
aReflowState.AvailableBSize()) {
mutableReflowState.construct(aReflowState);
mutableReflowState.ref().AvailableBSize() = NS_UNCONSTRAINEDSIZE;
reflowState = mutableReflowState.addr();
mutableReflowState.emplace(aReflowState);
mutableReflowState->AvailableBSize() = NS_UNCONSTRAINEDSIZE;
reflowState = mutableReflowState.ptr();
}
}

Просмотреть файл

@ -790,9 +790,9 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// For now, set the available block-size to unconstrained always.
LogicalSize availSize = mBlockReflowState->ComputedSize(frameWM);
availSize.BSize(frameWM) = NS_UNCONSTRAINEDSIZE;
reflowStateHolder.construct(mPresContext, *psd->mReflowState,
aFrame, availSize);
nsHTMLReflowState& reflowState = reflowStateHolder.ref();
reflowStateHolder.emplace(mPresContext, *psd->mReflowState,
aFrame, availSize);
nsHTMLReflowState& reflowState = *reflowStateHolder;
reflowState.mLineLayout = this;
reflowState.mFlags.mIsTopOfPage = mIsTopOfPage;
if (reflowState.ComputedWidth() == NS_UNCONSTRAINEDSIZE)
@ -852,8 +852,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
&savedOptionalBreakPriority);
if (!isText) {
aFrame->Reflow(mPresContext, metrics, reflowStateHolder.ref(),
aReflowStatus);
aFrame->Reflow(mPresContext, metrics, *reflowStateHolder, aReflowStatus);
} else {
static_cast<nsTextFrame*>(aFrame)->
ReflowText(*this, availableSpaceOnLine, psd->mReflowState->rendContext,
@ -974,7 +973,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// Tell the frame that we're done reflowing it
aFrame->DidReflow(mPresContext,
isText ? nullptr : reflowStateHolder.addr(),
isText ? nullptr : reflowStateHolder.ptr(),
nsDidReflowStatus::FINISHED);
if (aMetrics) {
@ -1010,7 +1009,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
// return now.
bool optionalBreakAfterFits;
NS_ASSERTION(isText ||
!reflowStateHolder.ref().IsFloating(),
!reflowStateHolder->IsFloating(),
"How'd we get a floated inline frame? "
"The frame ctor should've dealt with this.");
if (CanPlaceFrame(pfd, notSafeToBreak, continuingTextRun,

Просмотреть файл

@ -2595,8 +2595,8 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
if (parentContext) { \
parentdata_ = parentContext->Style##type_(); \
} else { \
maybeFakeParentData.construct ctorargs_; \
parentdata_ = maybeFakeParentData.addr(); \
maybeFakeParentData.emplace ctorargs_; \
parentdata_ = maybeFakeParentData.ptr(); \
} \
} \
if (aStartStruct) \
@ -2608,7 +2608,7 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
if (aRuleDetail != eRuleFullMixed && aRuleDetail != eRuleFullReset) { \
/* No question. We will have to inherit. Go ahead and init */ \
/* with inherited vals from parent. */ \
canStoreInRuleTree = false; \
canStoreInRuleTree = false; \
if (parentdata_) \
data_ = new (mPresContext) nsStyle##type_(*parentdata_); \
else \
@ -2663,8 +2663,8 @@ nsRuleNode::AdjustLogicalBoxProp(nsStyleContext* aContext,
if (parentContext) { \
parentdata_ = parentContext->Style##type_(); \
} else { \
maybeFakeParentData.construct ctorargs_; \
parentdata_ = maybeFakeParentData.addr(); \
maybeFakeParentData.emplace ctorargs_; \
parentdata_ = maybeFakeParentData.ptr(); \
} \
} \
bool canStoreInRuleTree = aCanStoreInRuleTree;