mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 852501 part 11. Make FlushAccumulatedBlock infallible. r=dholbert
This commit is contained in:
parent
d6f028e002
commit
a75a81c666
@ -3715,10 +3715,8 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
while ((f = childItems.FirstChild()) != nullptr) {
|
||||
bool wrapFrame = IsInlineFrame(f) || IsFrameSpecial(f);
|
||||
if (!wrapFrame) {
|
||||
rv = FlushAccumulatedBlock(aState, content, newFrame,
|
||||
currentBlockItems, newItems);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
FlushAccumulatedBlock(aState, content, newFrame,
|
||||
currentBlockItems, newItems);
|
||||
}
|
||||
|
||||
childItems.RemoveFrame(f);
|
||||
@ -3728,8 +3726,8 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
newItems.AddChild(f);
|
||||
}
|
||||
}
|
||||
rv = FlushAccumulatedBlock(aState, content, newFrame,
|
||||
currentBlockItems, newItems);
|
||||
FlushAccumulatedBlock(aState, content, newFrame,
|
||||
currentBlockItems, newItems);
|
||||
|
||||
if (childItems.NotEmpty()) {
|
||||
// an error must have occurred, delete unprocessed frames
|
||||
@ -4546,7 +4544,7 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
|
||||
}
|
||||
|
||||
// MathML Mod - RBS
|
||||
nsresult
|
||||
void
|
||||
nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParentFrame,
|
||||
@ -4555,7 +4553,7 @@ nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
|
||||
{
|
||||
if (aBlockItems.IsEmpty()) {
|
||||
// Nothing to do
|
||||
return NS_OK;
|
||||
return;
|
||||
}
|
||||
|
||||
nsIAtom* anonPseudo = nsCSSAnonBoxes::mozMathMLAnonymousBlock;
|
||||
@ -4584,7 +4582,6 @@ nsCSSFrameConstructor::FlushAccumulatedBlock(nsFrameConstructorState& aState,
|
||||
NS_ASSERTION(aBlockItems.IsEmpty(), "What happened?");
|
||||
aBlockItems.Clear();
|
||||
aNewItems.AddChild(blockFrame);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Only <math> elements can be floated or positioned. All other MathML
|
||||
|
@ -1323,11 +1323,11 @@ private:
|
||||
* frame whose content is aContent and whose parent will be aParentFrame.
|
||||
* The anonymous block is added to aNewItems and aBlockItems is cleared.
|
||||
*/
|
||||
nsresult FlushAccumulatedBlock(nsFrameConstructorState& aState,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParentFrame,
|
||||
nsFrameItems& aBlockItems,
|
||||
nsFrameItems& aNewItems);
|
||||
void FlushAccumulatedBlock(nsFrameConstructorState& aState,
|
||||
nsIContent* aContent,
|
||||
nsIFrame* aParentFrame,
|
||||
nsFrameItems& aBlockItems,
|
||||
nsFrameItems& aNewItems);
|
||||
|
||||
// Function to find FrameConstructionData for aContent. Will return
|
||||
// null if aContent is not MathML.
|
||||
|
Loading…
Reference in New Issue
Block a user