зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1367711 - Bail out early when initializing ReflowInput for a placeholder frame, which has a trivial Reflow method. r=mats
This commit is contained in:
Родитель
5e2804200d
Коммит
18938a04a9
|
@ -391,6 +391,12 @@ ReflowInput::Init(nsPresContext* aPresContext,
|
|||
mStyleText = mFrame->StyleText();
|
||||
|
||||
LayoutFrameType type = mFrame->Type();
|
||||
if (type == mozilla::LayoutFrameType::Placeholder) {
|
||||
// Placeholders have a no-op Reflow method that doesn't need the rest of
|
||||
// this initialization, so we bail out early.
|
||||
ComputedBSize() = ComputedISize() = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
InitFrameType(type);
|
||||
InitCBReflowInput();
|
||||
|
|
|
@ -110,6 +110,10 @@ nsPlaceholderFrame::Reflow(nsPresContext* aPresContext,
|
|||
const ReflowInput& aReflowInput,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
// NOTE that the ReflowInput passed to this method is not fully initialized,
|
||||
// on the grounds that reflowing a placeholder is a rather trivial operation.
|
||||
// (See bug 1367711.)
|
||||
|
||||
#ifdef DEBUG
|
||||
// We should be getting reflowed before our out-of-flow.
|
||||
// If this is our first reflow, and our out-of-flow has already received its
|
||||
|
|
Загрузка…
Ссылка в новой задаче