[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:12:36 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit e85e4a7f37381815d9875fd6db59f934b0eeadc6
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Dec 8 02:06:16 2002 +0000

    	This change fixes three bugs in list items.
    
    	(1) Stop implementing markers as floats.  This is simply
    	wrong.  The bullet doesn't affect the height of the line
    	box if it's a float, and it can also affect other
    	list items that follow the bullet's enclosing list item
    	(leading to odd staggered layout of lists).
    
    	(2) Relax the DTD.  It was trying to obey strict HTML, which
    	is hopeless in the case of lists.  Match the behavior of
    	both Gecko and the IEs (mac and win32)  and allow non-list
    	content to be inserted between list items without being
    	wrapped in its own list item.  Lists were making empty
    	items for whitespace in between items, and this stops that
    	and makes our lists behave much more like Gecko and the IEs.
    
    	(3) The bullet's min and max width weren't getting set, which
    	could lead to confused line width calculations when image
    	bullets were used.
    
            Reviewed by: gramps
    
    	* ChangeLog:
    	* khtml/html/dtd.cpp:
            (DOM::checkChild):
            * khtml/rendering/bidi.cpp:
            (RenderFlow::findNextLineBreak):
            * khtml/rendering/render_list.cpp:
            (RenderListItem::setStyle):
            (RenderListMarker::calcMinMaxWidth):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2967 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6c3046f..beef204 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,36 @@
+2002-12-07  David Hyatt  <hyatt at apple.com>
+
+	This change fixes three bugs in list items.  
+
+	(1) Stop implementing markers as floats.  This is simply
+	wrong.  The bullet doesn't affect the height of the line
+	box if it's a float, and it can also affect other
+	list items that follow the bullet's enclosing list item
+	(leading to odd staggered layout of lists).
+
+	(2) Relax the DTD.  It was trying to obey strict HTML, which
+	is hopeless in the case of lists.  Match the behavior of
+	both Gecko and the IEs (mac and win32)  and allow non-list 
+	content to be inserted between list items without being
+	wrapped in its own list item.  Lists were making empty
+	items for whitespace in between items, and this stops that
+	and makes our lists behave much more like Gecko and the IEs.
+
+	(3) The bullet's min and max width weren't getting set, which
+	could lead to confused line width calculations when image
+	bullets were used.
+	
+        Reviewed by: gramps
+
+	* ChangeLog:
+	* khtml/html/dtd.cpp:
+        (DOM::checkChild):
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::findNextLineBreak):
+        * khtml/rendering/render_list.cpp:
+        (RenderListItem::setStyle):
+        (RenderListMarker::calcMinMaxWidth):
+
 2002-12-07  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by: Maciej
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6c3046f..beef204 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,36 @@
+2002-12-07  David Hyatt  <hyatt at apple.com>
+
+	This change fixes three bugs in list items.  
+
+	(1) Stop implementing markers as floats.  This is simply
+	wrong.  The bullet doesn't affect the height of the line
+	box if it's a float, and it can also affect other
+	list items that follow the bullet's enclosing list item
+	(leading to odd staggered layout of lists).
+
+	(2) Relax the DTD.  It was trying to obey strict HTML, which
+	is hopeless in the case of lists.  Match the behavior of
+	both Gecko and the IEs (mac and win32)  and allow non-list 
+	content to be inserted between list items without being
+	wrapped in its own list item.  Lists were making empty
+	items for whitespace in between items, and this stops that
+	and makes our lists behave much more like Gecko and the IEs.
+
+	(3) The bullet's min and max width weren't getting set, which
+	could lead to confused line width calculations when image
+	bullets were used.
+	
+        Reviewed by: gramps
+
+	* ChangeLog:
+	* khtml/html/dtd.cpp:
+        (DOM::checkChild):
+        * khtml/rendering/bidi.cpp:
+        (RenderFlow::findNextLineBreak):
+        * khtml/rendering/render_list.cpp:
+        (RenderListItem::setStyle):
+        (RenderListMarker::calcMinMaxWidth):
+
 2002-12-07  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by: Maciej
diff --git a/WebCore/khtml/html/dtd.cpp b/WebCore/khtml/html/dtd.cpp
index d8fc784..6f00298 100644
--- a/WebCore/khtml/html/dtd.cpp
+++ b/WebCore/khtml/html/dtd.cpp
@@ -644,6 +644,8 @@ bool DOM::checkChild(ushort tagID, ushort childID)
     case ID_NOSCRIPT:
     case ID_CAPTION:
     case ID_MARQUEE:
+    case ID_UL:
+    case ID_OL:
         // DIV: _1 *
         return check_array(childID, tag_list_1);
     case ID_MAP:
@@ -663,11 +665,6 @@ bool DOM::checkChild(ushort tagID, ushort childID)
     case ID_DL:
         // DL: _6 +
         return check_array(childID, tag_list_6);
-    case ID_OL:
-    case ID_UL:
-        // OL: LI +
-        if(childID == ID_LI) return true;
-        return false;
     case ID_DIR:
     case ID_MENU:
         // (DIR|MENU): LI + - _3
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 6ec4ddd..242ec0f 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1220,6 +1220,26 @@ BidiIterator RenderFlow::findNextLineBreak(BidiIterator &start, QPtrList<BidiIte
             sawSpace = false;
             lastSpacePos = 0;
             trailingSpaceObject = 0;
+            
+            if (o->isListMarker() && o->style()->listStylePosition() == OUTSIDE) {
+                // The marker must not have an effect on whitespace at the start
+                // of the line.  We start ignoring spaces to make sure that any additional
+                // spaces we see will be discarded. 
+                //
+                // Optimize for a common case. If we can't find whitespace after the list
+                // item, then this is all moot. -dwh
+                RenderObject* next = Bidinext( start.par, o );
+                if (!m_pre && next && next->isText() && static_cast<RenderText*>(next)->stringLength() > 0 &&
+                      (static_cast<RenderText*>(next)->text()[0].direction() == QChar::DirWS ||
+                      static_cast<RenderText*>(next)->text()[0] == '\n')) {
+                    sawSpace = true;
+                    ignoringSpaces = true;
+                    BidiIterator* endMid = new (o->renderArena()) BidiIterator();
+                    endMid->obj = o;
+                    endMid->pos = 0;
+                    midpoints.append(endMid);
+                }
+            }
         } else if ( o->isText() ) {
             RenderText *t = static_cast<RenderText *>(o);
             int strlen = t->stringLength();
diff --git a/WebCore/khtml/rendering/render_list.cpp b/WebCore/khtml/rendering/render_list.cpp
index 06ba0e3..54a2f31 100644
--- a/WebCore/khtml/rendering/render_list.cpp
+++ b/WebCore/khtml/rendering/render_list.cpp
@@ -138,11 +138,7 @@ void RenderListItem::setStyle(RenderStyle *_style)
 #endif
     
     newStyle->inheritFrom(style());
-    if(newStyle->direction() == LTR)
-        newStyle->setFloating(FLEFT);
-    else
-        newStyle->setFloating(FRIGHT);
-
+   
     if(!m_marker && style()->listStyleType() != LNONE) {
 
         m_marker = new (renderArena()) RenderListMarker();
@@ -425,7 +421,8 @@ void RenderListMarker::calcMinMaxWidth()
         if(style()->listStylePosition() == INSIDE)
             m_width = m_listImage->pixmap().width() + 5;
         m_height = m_listImage->pixmap().height();
-	setMinMaxKnown();
+        m_minWidth = m_maxWidth = m_width;
+        setMinMaxKnown();
         return;
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list