Bug 499862. Need to flush out linebreaker stuff even if there are no mapped flows. r=smontagu
authorRobert O'Callahan <robert@ocallahan.org>
Tue, 23 Feb 2010 23:23:45 -0800
changeset 33717 60dce6cf3aaa5853fbf049f9d8b835c847004fde
parent 33716 b0ff8632d5cec8570634e035dc51259e332c8e0e
child 33718 377a9f8f62c26dded4dca2948ce2f891fc933eaa
push id1142
push usertimeless@mozdev.org
push dateTue, 09 Mar 2010 14:35:12 +0000
reviewerssmontagu
bugs499862
milestone1.9.2.2pre
Bug 499862. Need to flush out linebreaker stuff even if there are no mapped flows. r=smontagu a=beltzner
layout/generic/crashtests/499862-1.html
layout/generic/crashtests/crashtests.list
layout/generic/nsTextFrameThebes.cpp
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/499862-1.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<style>
+body::first-letter { float: left; }
+</style>
+</head>
+<body style="text-transform: capitalize;">T</body>
+</html>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -239,16 +239,17 @@ load 478170-1.html
 load 478185-1.html
 load 479938-1.html
 load 480345-1.html
 load 493111-1.html
 load 493118-1.html
 load 494332-1.html
 load 495875-1.html
 load 495875-2.html
+load 499862-1.html
 load 501535-1.html
 load 503961-1.xhtml
 load 503961-2.html
 load 508908-1.html
 load 505912-1.html
 # load 508115-1.html
 load 511482.html
 load 517968.html
--- a/layout/generic/nsTextFrameThebes.cpp
+++ b/layout/generic/nsTextFrameThebes.cpp
@@ -1181,19 +1181,16 @@ PRBool BuildTextRunsScanner::IsTextRunVa
 }
 
 /**
  * This gets called when we need to make a text run for the current list of
  * frames.
  */
 void BuildTextRunsScanner::FlushFrames(PRBool aFlushLineBreaks, PRBool aSuppressTrailingBreak)
 {
-  if (mMappedFlows.Length() == 0)
-    return;
-
   gfxTextRun* textRun = nsnull;
   if (!mMappedFlows.IsEmpty()) {
     if (!mSkipIncompleteTextRuns && mCurrentFramesAllSameTextRun &&
         ((mCurrentFramesAllSameTextRun->GetFlags() & nsTextFrameUtils::TEXT_INCOMING_WHITESPACE) != 0) ==
         ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_WHITESPACE) != 0) &&
         ((mCurrentFramesAllSameTextRun->GetFlags() & gfxTextRunWordCache::TEXT_INCOMING_ARABICCHAR) != 0) ==
         ((mCurrentRunContextInfo & nsTextFrameUtils::INCOMING_ARABICCHAR) != 0) &&
         IsTextRunValidForMappedFlows(mCurrentFramesAllSameTextRun)) {