From 24c89150aea6794ec97e3a45493c27aa4009a519 Mon Sep 17 00:00:00 2001 From: "rbs%maths.uq.edu.au" Date: Tue, 12 Oct 2004 03:04:47 +0000 Subject: [PATCH] Text Zoom leaves misaligned overlapping text, b=128405, r=roc, sr=bz --- layout/generic/nsLineLayout.cpp | 11 ++++++++++- layout/html/base/src/nsLineLayout.cpp | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsLineLayout.cpp b/layout/generic/nsLineLayout.cpp index d99f5c110b75..91a88aac01fe 100644 --- a/layout/generic/nsLineLayout.cpp +++ b/layout/generic/nsLineLayout.cpp @@ -858,7 +858,16 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowReason reason = eReflowReason_Resize; if (NS_FRAME_FIRST_REFLOW & aFrame->GetStateBits()) { reason = eReflowReason_Initial; - } + } + else if (rs->reason == eReflowReason_Initial && + mBlockReflowState->reason == eReflowReason_StyleChange) { + // The frame we're about to reflow is an _old_ frame that was + // pushed inside a _new_ parent (overflow). + + // So we propagate the same 'style change' that led to creating + // the new overflow parent to which this frame is now the child + reason = eReflowReason_StyleChange; + } else if (rs->reason == eReflowReason_Incremental) { // XXX // XXXwaterson (above) previously used mBlockReflowState rather // than psd->mReflowState. diff --git a/layout/html/base/src/nsLineLayout.cpp b/layout/html/base/src/nsLineLayout.cpp index d99f5c110b75..91a88aac01fe 100644 --- a/layout/html/base/src/nsLineLayout.cpp +++ b/layout/html/base/src/nsLineLayout.cpp @@ -858,7 +858,16 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, nsReflowReason reason = eReflowReason_Resize; if (NS_FRAME_FIRST_REFLOW & aFrame->GetStateBits()) { reason = eReflowReason_Initial; - } + } + else if (rs->reason == eReflowReason_Initial && + mBlockReflowState->reason == eReflowReason_StyleChange) { + // The frame we're about to reflow is an _old_ frame that was + // pushed inside a _new_ parent (overflow). + + // So we propagate the same 'style change' that led to creating + // the new overflow parent to which this frame is now the child + reason = eReflowReason_StyleChange; + } else if (rs->reason == eReflowReason_Incremental) { // XXX // XXXwaterson (above) previously used mBlockReflowState rather // than psd->mReflowState.