[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:29:44 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 01eff981608422baeb870fb0bb5485d5dd523a92
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 14 20:13:23 2003 +0000

    	Fix for ew.com, hrweb and arstechnica forums.  A <br> should
    	not create a nonempty line in the case where the previous line
    	didn't break cleanly.  The fix is to have a new boolean that
    	tracks how the previous line broke and to have <br> check that
    	to figure out if it should set the line to be non-empty.
    
            Reviewed by gramps
    
            * khtml/rendering/bidi.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3833 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ab01741..451918e 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,15 @@
+2003-03-13  David Hyatt  <hyatt at apple.com>
+
+	Fix for ew.com, hrweb and arstechnica forums.  A <br> should
+	not create a nonempty line in the case where the previous line
+	didn't break cleanly.  The fix is to have a new boolean that
+	tracks how the previous line broke and to have <br> check that
+	to figure out if it should set the line to be non-empty.
+	
+        Reviewed by gramps
+
+        * khtml/rendering/bidi.cpp:
+
 2003-03-13  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Trey.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ab01741..451918e 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,15 @@
+2003-03-13  David Hyatt  <hyatt at apple.com>
+
+	Fix for ew.com, hrweb and arstechnica forums.  A <br> should
+	not create a nonempty line in the case where the previous line
+	didn't break cleanly.  The fix is to have a new boolean that
+	tracks how the previous line broke and to have <br> check that
+	to figure out if it should set the line to be non-empty.
+	
+        Reviewed by gramps
+
+        * khtml/rendering/bidi.cpp:
+
 2003-03-13  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Trey.
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index a8bcc31..c8c876a 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -61,6 +61,7 @@ static uint sCurrMidpoint = 0;
 static bool betweenMidpoints = false;
 
 static bool isLineEmpty = true;
+static bool previousLineBrokeAtBR = true;
 static QChar::Direction dir;
 static bool adjustEmbeddding = false;
 static bool emptyRun = true;
@@ -1199,7 +1200,8 @@ static void buildCompactRuns(RenderObject* compactObj)
     
         betweenMidpoints = false;
         isLineEmpty = true;
-    
+        previousLineBrokeAtBR = true;
+        
         end = compactBlock->findNextLineBreak(start);
         if (!isLineEmpty)
             compactBlock->bidiReorderLine(start, end);
@@ -1286,6 +1288,8 @@ void RenderBlock::layoutInlineChildren(bool relayoutChildren)
         sCompactFirstBidiRun = sCompactLastBidiRun = 0;
         sCompactBidiRunCount = 0;
 
+        previousLineBrokeAtBR = true;
+        
         while( !end.atEnd() ) {
             start = end;
             betweenMidpoints = false;
@@ -1433,6 +1437,9 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start)
     RenderObject *last = o;
     int pos = start.pos;
 
+    bool prevLineBrokeCleanly = previousLineBrokeAtBR;
+    previousLineBrokeAtBR = false;
+    
     while( o ) {
 #ifdef DEBUG_LINEBREAKS
         kdDebug(6041) << "new object "<< o <<" width = " << w <<" tmpw = " << tmpW << endl;
@@ -1444,9 +1451,13 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start)
              
                 // A <br> always breaks a line, so don't let the line be collapsed
                 // away. Also, the space at the end of a line with a <br> does not
-                // get collapsed away. -dwh
-                isLineEmpty = false;
+                // get collapsed away.  It only does this if the previous line broke
+                // cleanly.  Otherwise the <br> has no effect on whether the line is
+                // empty or not.
+                if (prevLineBrokeCleanly)
+                    isLineEmpty = false;
                 trailingSpaceObject = 0;
+                previousLineBrokeAtBR = true;
                 
                 //check the clear status
                 EClear clear = o->style()->clear();
diff --git a/WebCore/khtml/rendering/render_line.cpp b/WebCore/khtml/rendering/render_line.cpp
index 7f12417..553fbca 100644
--- a/WebCore/khtml/rendering/render_line.cpp
+++ b/WebCore/khtml/rendering/render_line.cpp
@@ -447,8 +447,8 @@ void InlineFlowBox::shrinkBoxesWithNoTextChildren(int topPos, int bottomPos)
     if (!hasTextChildren()) {
         if (yPos() < topPos)
             setYPos(topPos);
-        if (height() > bottomPos - topPos)
-            setHeight(bottomPos - topPos);
+        if (yPos() + height() > bottomPos)
+            setHeight(bottomPos - yPos());
         if (baseline() > height())
             setBaseline(height());
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list