From 8a03d5d2ea54977f74839dc1296857d12e5ec13d Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 8 Nov 2005 18:20:47 +0000 Subject: [PATCH] Don't reframe leaf frames just because they don't have generated content that style says they should have -- leaves just don't have generated content. Bug 315541, r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@184305 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsFrameManager.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mozilla/layout/base/nsFrameManager.cpp b/mozilla/layout/base/nsFrameManager.cpp index bf14f6167fc..ddbb84aeade 100644 --- a/mozilla/layout/base/nsFrameManager.cpp +++ b/mozilla/layout/base/nsFrameManager.cpp @@ -1225,9 +1225,10 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext, if (!(aMinChange & nsChangeHint_ReconstructFrame)) { // Make sure not to do this for pseudo-frames -- those can't have :before - // or :after content. + // or :after content. Neither can non-elements or leaf frames. if (!pseudoTag && localContent && - localContent->IsContentOfType(nsIContent::eELEMENT)) { + localContent->IsContentOfType(nsIContent::eELEMENT) && + !aFrame->IsLeaf()) { // Check for a new :before pseudo and an existing :before // frame, but only if the frame is the first-in-flow. nsIFrame* prevInFlow = aFrame->GetPrevInFlow(); @@ -1250,11 +1251,12 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext, if (!(aMinChange & nsChangeHint_ReconstructFrame)) { // Make sure not to do this for pseudo-frames -- those can't have :before - // or :after content. + // or :after content. Neither can non-elements or leaf frames. if (!pseudoTag && localContent && - localContent->IsContentOfType(nsIContent::eELEMENT)) { + localContent->IsContentOfType(nsIContent::eELEMENT) && + !aFrame->IsLeaf()) { // Check for new :after content, but only if the frame is the - // first-in-flow. + // last-in-flow. nsIFrame* nextInFlow = aFrame->GetNextInFlow(); if (!nextInFlow) {