diff --git a/mozilla/layout/generic/nsLineLayout.cpp b/mozilla/layout/generic/nsLineLayout.cpp index 343af0d520c..361ccbdeb97 100644 --- a/mozilla/layout/generic/nsLineLayout.cpp +++ b/mozilla/layout/generic/nsLineLayout.cpp @@ -1040,6 +1040,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // the float. if (frameType) { if (nsLayoutAtoms::placeholderFrame == frameType) { + pfd->SetFlag(PFD_ISPLACEHOLDERFRAME, PR_TRUE); nsIFrame* outOfFlowFrame = ((nsPlaceholderFrame*)aFrame)->GetOutOfFlowFrame(); if (outOfFlowFrame) { // Make sure it's floated and not absolutely positioned @@ -2642,9 +2643,10 @@ nsLineLayout::TrimTrailingWhiteSpaceIn(PerSpanData* psd, return PR_TRUE; } } - else if (!pfd->GetFlag(PFD_ISTEXTFRAME)) { - // If we hit a frame on the end that's not text, then there is - // no trailing whitespace to trim. Stop the search. + else if (!pfd->GetFlag(PFD_ISTEXTFRAME) && + !pfd->GetFlag(PFD_ISPLACEHOLDERFRAME)) { + // If we hit a frame on the end that's not text and not a placeholder, + // then there is no trailing whitespace to trim. Stop the search. *aDeltaWidth = 0; return PR_TRUE; } diff --git a/mozilla/layout/generic/nsLineLayout.h b/mozilla/layout/generic/nsLineLayout.h index b4cfde44b84..7e5e5c4aa43 100644 --- a/mozilla/layout/generic/nsLineLayout.h +++ b/mozilla/layout/generic/nsLineLayout.h @@ -353,7 +353,8 @@ protected: #define PFD_ISLETTERFRAME 0x00000010 #define PFD_ISSTICKY 0x00000020 #define PFD_ISBULLET 0x00000040 -#define PFD_LASTFLAG PFD_ISBULLET +#define PFD_ISPLACEHOLDERFRAME 0x00000080 +#define PFD_LASTFLAG PFD_ISPLACEHOLDERFRAME PRPackedBool mFlags; diff --git a/mozilla/layout/html/base/src/nsLineLayout.cpp b/mozilla/layout/html/base/src/nsLineLayout.cpp index 343af0d520c..361ccbdeb97 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.cpp +++ b/mozilla/layout/html/base/src/nsLineLayout.cpp @@ -1040,6 +1040,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame, // the float. if (frameType) { if (nsLayoutAtoms::placeholderFrame == frameType) { + pfd->SetFlag(PFD_ISPLACEHOLDERFRAME, PR_TRUE); nsIFrame* outOfFlowFrame = ((nsPlaceholderFrame*)aFrame)->GetOutOfFlowFrame(); if (outOfFlowFrame) { // Make sure it's floated and not absolutely positioned @@ -2642,9 +2643,10 @@ nsLineLayout::TrimTrailingWhiteSpaceIn(PerSpanData* psd, return PR_TRUE; } } - else if (!pfd->GetFlag(PFD_ISTEXTFRAME)) { - // If we hit a frame on the end that's not text, then there is - // no trailing whitespace to trim. Stop the search. + else if (!pfd->GetFlag(PFD_ISTEXTFRAME) && + !pfd->GetFlag(PFD_ISPLACEHOLDERFRAME)) { + // If we hit a frame on the end that's not text and not a placeholder, + // then there is no trailing whitespace to trim. Stop the search. *aDeltaWidth = 0; return PR_TRUE; } diff --git a/mozilla/layout/html/base/src/nsLineLayout.h b/mozilla/layout/html/base/src/nsLineLayout.h index b4cfde44b84..7e5e5c4aa43 100644 --- a/mozilla/layout/html/base/src/nsLineLayout.h +++ b/mozilla/layout/html/base/src/nsLineLayout.h @@ -353,7 +353,8 @@ protected: #define PFD_ISLETTERFRAME 0x00000010 #define PFD_ISSTICKY 0x00000020 #define PFD_ISBULLET 0x00000040 -#define PFD_LASTFLAG PFD_ISBULLET +#define PFD_ISPLACEHOLDERFRAME 0x00000080 +#define PFD_LASTFLAG PFD_ISPLACEHOLDERFRAME PRPackedBool mFlags;