mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout fix for bug 523468 due to crashing tests
This commit is contained in:
commit
7143e4ece9
@ -3670,17 +3670,6 @@ nsBlockFrame::DoReflowInlineFrames(nsBlockReflowState& aState,
|
|||||||
printf("Line reflow status = %s\n", LineReflowStatusNames[lineReflowStatus]);
|
printf("Line reflow status = %s\n", LineReflowStatusNames[lineReflowStatus]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (aLineLayout.GetDirtyNextLine()) {
|
|
||||||
nsBlockInFlowLineIterator iter(this, aLine, PR_FALSE);
|
|
||||||
if (iter.Next() && iter.GetLine()->IsInline()) {
|
|
||||||
iter.GetLine()->MarkDirty();
|
|
||||||
if (iter.GetContainer() != this) {
|
|
||||||
aState.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*aLineReflowStatus = lineReflowStatus;
|
*aLineReflowStatus = lineReflowStatus;
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
@ -3721,7 +3710,16 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
|||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (frameReflowStatus & NS_FRAME_REFLOW_NEXTINFLOW) {
|
if (frameReflowStatus & NS_FRAME_REFLOW_NEXTINFLOW) {
|
||||||
aLineLayout.SetDirtyNextLine();
|
// we need to ensure that the frame's nextinflow gets reflowed.
|
||||||
|
aState.mReflowStatus |= NS_FRAME_REFLOW_NEXTINFLOW;
|
||||||
|
nsBlockFrame* ourNext = static_cast<nsBlockFrame*>(GetNextInFlow());
|
||||||
|
if (ourNext && aFrame->GetNextInFlow()) {
|
||||||
|
PRBool isValid;
|
||||||
|
nsBlockInFlowLineIterator iter(ourNext, aFrame->GetNextInFlow(), &isValid);
|
||||||
|
if (isValid) {
|
||||||
|
iter.GetLine()->MarkDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
@ -3808,7 +3806,12 @@ nsBlockFrame::ReflowInlineFrame(nsBlockReflowState& aState,
|
|||||||
|
|
||||||
if (NS_INLINE_IS_BREAK_AFTER(frameReflowStatus) &&
|
if (NS_INLINE_IS_BREAK_AFTER(frameReflowStatus) &&
|
||||||
!aLineLayout.GetLineEndsInBR()) {
|
!aLineLayout.GetLineEndsInBR()) {
|
||||||
aLineLayout.SetDirtyNextLine();
|
// Mark next line dirty in case SplitLine didn't end up
|
||||||
|
// pushing any frames.
|
||||||
|
nsLineList_iterator next = aLine.next();
|
||||||
|
if (next != end_lines() && !next->IsBlock()) {
|
||||||
|
next->MarkDirty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,6 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
|
|||||||
InlineReflowState irs;
|
InlineReflowState irs;
|
||||||
irs.mPrevFrame = nsnull;
|
irs.mPrevFrame = nsnull;
|
||||||
irs.mLineContainer = lineContainer;
|
irs.mLineContainer = lineContainer;
|
||||||
irs.mLineLayout = aReflowState.mLineLayout;
|
|
||||||
irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow();
|
irs.mNextInFlow = (nsInlineFrame*) GetNextInFlow();
|
||||||
irs.mSetParentPointer = lazilySetParentPointer;
|
irs.mSetParentPointer = lazilySetParentPointer;
|
||||||
|
|
||||||
@ -669,7 +668,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
|||||||
aStatus = NS_FRAME_NOT_COMPLETE |
|
aStatus = NS_FRAME_NOT_COMPLETE |
|
||||||
NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER |
|
NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER |
|
||||||
(aStatus & NS_INLINE_BREAK_TYPE_MASK);
|
(aStatus & NS_INLINE_BREAK_TYPE_MASK);
|
||||||
PushFrames(aPresContext, aFrame, irs.mPrevFrame, irs);
|
PushFrames(aPresContext, aFrame, irs.mPrevFrame);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Preserve reflow status when breaking-before our first child
|
// Preserve reflow status when breaking-before our first child
|
||||||
@ -701,7 +700,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
|||||||
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
||||||
if (nextFrame) {
|
if (nextFrame) {
|
||||||
NS_FRAME_SET_INCOMPLETE(aStatus);
|
NS_FRAME_SET_INCOMPLETE(aStatus);
|
||||||
PushFrames(aPresContext, nextFrame, aFrame, irs);
|
PushFrames(aPresContext, nextFrame, aFrame);
|
||||||
}
|
}
|
||||||
else if (nsnull != GetNextInFlow()) {
|
else if (nsnull != GetNextInFlow()) {
|
||||||
// We must return an incomplete status if there are more child
|
// We must return an incomplete status if there are more child
|
||||||
@ -735,7 +734,7 @@ nsInlineFrame::ReflowInlineFrame(nsPresContext* aPresContext,
|
|||||||
if (!reflowingFirstLetter) {
|
if (!reflowingFirstLetter) {
|
||||||
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
nsIFrame* nextFrame = aFrame->GetNextSibling();
|
||||||
if (nextFrame) {
|
if (nextFrame) {
|
||||||
PushFrames(aPresContext, nextFrame, aFrame, irs);
|
PushFrames(aPresContext, nextFrame, aFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -767,9 +766,6 @@ nsInlineFrame::PullOneFrame(nsPresContext* aPresContext,
|
|||||||
nextInFlow->mFrames.RemoveFirstChild();
|
nextInFlow->mFrames.RemoveFirstChild();
|
||||||
mFrames.InsertFrame(this, irs.mPrevFrame, frame);
|
mFrames.InsertFrame(this, irs.mPrevFrame, frame);
|
||||||
isComplete = PR_FALSE;
|
isComplete = PR_FALSE;
|
||||||
if (irs.mLineLayout) {
|
|
||||||
irs.mLineLayout->SetDirtyNextLine();
|
|
||||||
}
|
|
||||||
nsHTMLContainerFrame::ReparentFrameView(aPresContext, frame, nextInFlow, this);
|
nsHTMLContainerFrame::ReparentFrameView(aPresContext, frame, nextInFlow, this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -784,8 +780,7 @@ nsInlineFrame::PullOneFrame(nsPresContext* aPresContext,
|
|||||||
void
|
void
|
||||||
nsInlineFrame::PushFrames(nsPresContext* aPresContext,
|
nsInlineFrame::PushFrames(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFromChild,
|
nsIFrame* aFromChild,
|
||||||
nsIFrame* aPrevSibling,
|
nsIFrame* aPrevSibling)
|
||||||
InlineReflowState& aState)
|
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aFromChild, "null pointer");
|
NS_PRECONDITION(aFromChild, "null pointer");
|
||||||
NS_PRECONDITION(aPrevSibling, "pushing first child");
|
NS_PRECONDITION(aPrevSibling, "pushing first child");
|
||||||
@ -799,9 +794,6 @@ nsInlineFrame::PushFrames(nsPresContext* aPresContext,
|
|||||||
// Add the frames to our overflow list (let our next in flow drain
|
// Add the frames to our overflow list (let our next in flow drain
|
||||||
// our overflow list when it is ready)
|
// our overflow list when it is ready)
|
||||||
SetOverflowFrames(aPresContext, mFrames.RemoveFramesAfter(aPrevSibling));
|
SetOverflowFrames(aPresContext, mFrames.RemoveFramesAfter(aPrevSibling));
|
||||||
if (aState.mLineLayout) {
|
|
||||||
aState.mLineLayout->SetDirtyNextLine();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -154,7 +154,6 @@ protected:
|
|||||||
nsIFrame* mPrevFrame;
|
nsIFrame* mPrevFrame;
|
||||||
nsInlineFrame* mNextInFlow;
|
nsInlineFrame* mNextInFlow;
|
||||||
nsIFrame* mLineContainer;
|
nsIFrame* mLineContainer;
|
||||||
nsLineLayout* mLineLayout;
|
|
||||||
PRPackedBool mSetParentPointer; // when reflowing child frame first set its
|
PRPackedBool mSetParentPointer; // when reflowing child frame first set its
|
||||||
// parent frame pointer
|
// parent frame pointer
|
||||||
|
|
||||||
@ -162,7 +161,6 @@ protected:
|
|||||||
mPrevFrame = nsnull;
|
mPrevFrame = nsnull;
|
||||||
mNextInFlow = nsnull;
|
mNextInFlow = nsnull;
|
||||||
mLineContainer = nsnull;
|
mLineContainer = nsnull;
|
||||||
mLineLayout = nsnull;
|
|
||||||
mSetParentPointer = PR_FALSE;
|
mSetParentPointer = PR_FALSE;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -198,8 +196,7 @@ protected:
|
|||||||
|
|
||||||
virtual void PushFrames(nsPresContext* aPresContext,
|
virtual void PushFrames(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFromChild,
|
nsIFrame* aFromChild,
|
||||||
nsIFrame* aPrevSibling,
|
nsIFrame* aPrevSibling);
|
||||||
InlineReflowState& aState);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -156,8 +156,7 @@ protected:
|
|||||||
#define LL_GOTLINEBOX 0x00001000
|
#define LL_GOTLINEBOX 0x00001000
|
||||||
#define LL_INFIRSTLETTER 0x00002000
|
#define LL_INFIRSTLETTER 0x00002000
|
||||||
#define LL_HASBULLET 0x00004000
|
#define LL_HASBULLET 0x00004000
|
||||||
#define LL_DIRTYNEXTLINE 0x00008000
|
#define LL_LASTFLAG LL_HASBULLET
|
||||||
#define LL_LASTFLAG LL_DIRTYNEXTLINE
|
|
||||||
|
|
||||||
void SetFlag(PRUint32 aFlag, PRBool aValue)
|
void SetFlag(PRUint32 aFlag, PRBool aValue)
|
||||||
{
|
{
|
||||||
@ -247,15 +246,6 @@ public:
|
|||||||
SetFlag(LL_INFIRSTLINE, aSetting);
|
SetFlag(LL_INFIRSTLINE, aSetting);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calling this during block reflow ensures that the next line of inlines
|
|
||||||
// will be marked dirty, if there is one.
|
|
||||||
void SetDirtyNextLine() {
|
|
||||||
SetFlag(LL_DIRTYNEXTLINE, PR_TRUE);
|
|
||||||
}
|
|
||||||
PRBool GetDirtyNextLine() {
|
|
||||||
return GetFlag(LL_DIRTYNEXTLINE);
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
|
||||||
nsPresContext* mPresContext;
|
nsPresContext* mPresContext;
|
||||||
|
@ -5987,7 +5987,14 @@ nsTextFrame::SetLength(PRInt32 aLength, nsLineLayout* aLineLayout)
|
|||||||
// and ChildIsDirty to handle a range of frames would be worse.
|
// and ChildIsDirty to handle a range of frames would be worse.
|
||||||
if (aLineLayout &&
|
if (aLineLayout &&
|
||||||
(end != f->mContentOffset || (f->GetStateBits() & NS_FRAME_IS_DIRTY))) {
|
(end != f->mContentOffset || (f->GetStateBits() & NS_FRAME_IS_DIRTY))) {
|
||||||
aLineLayout->SetDirtyNextLine();
|
const nsLineList::iterator* line = aLineLayout->GetLine();
|
||||||
|
nsBlockFrame* block = do_QueryFrame(aLineLayout->GetLineContainerFrame());
|
||||||
|
if (line && block) {
|
||||||
|
nsLineList::iterator next = line->next();
|
||||||
|
if (next != block->end_lines() && !next->IsBlock()) {
|
||||||
|
next->MarkDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end < f->mContentOffset) {
|
if (end < f->mContentOffset) {
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<body>
|
|
||||||
c<br>
|
|
||||||
da<br>
|
|
||||||
b
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,10 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html style="width:1px">
|
|
||||||
<body><span><span id="y"></span>a b</span>
|
|
||||||
<script>
|
|
||||||
var y = document.getElementById("y");
|
|
||||||
document.documentElement.offsetHeight;
|
|
||||||
y.appendChild(document.createTextNode("c d"));
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1330,6 +1330,5 @@ fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") == 488692-1.html 488692-1-ref.html # needs
|
|||||||
== 521539-1.html 521539-1-ref.html
|
== 521539-1.html 521539-1-ref.html
|
||||||
== 520421-1.html 520421-1-ref.html
|
== 520421-1.html 520421-1-ref.html
|
||||||
== 521685-1.html 521685-1-ref.html
|
== 521685-1.html 521685-1-ref.html
|
||||||
== 523096-1.html 523096-1-ref.html
|
|
||||||
== 523468-1.html 523468-1-ref.html
|
|
||||||
== 524175-1.html 524175-1-ref.html
|
== 524175-1.html 524175-1-ref.html
|
||||||
|
== 523096-1.html 523096-1-ref.html
|
||||||
|
Loading…
Reference in New Issue
Block a user