Fix lists so that they properly participate in line layout as though they are text...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 22:19:36 +0000 (22:19 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Oct 2004 22:19:36 +0000 (22:19 +0000)
used) and as images (when image bullets are used).

        Reviewed by kocienda

        * khtml/rendering/render_list.cpp:
        (RenderListMarker::createInlineBox):
        * khtml/rendering/render_list.h:
        (khtml::ListMarkerBox:::InlineBox):
        (khtml::ListMarkerBox::isText):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7773 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_list.cpp
WebCore/khtml/rendering/render_list.h

index 40f2bc4bf772fbfed8f019ea3187ae1abedd0750..e8ea0525cef0f22f2e3b772b9f131ed8b5de06eb 100644 (file)
@@ -1,3 +1,16 @@
+2004-10-05  David Hyatt  <hyatt@apple.com>
+
+       Fix lists so that they properly participate in line layout as though they are text (when text bullets are
+       used) and as images (when image bullets are used).
+       
+        Reviewed by kocienda
+
+        * khtml/rendering/render_list.cpp:
+        (RenderListMarker::createInlineBox):
+        * khtml/rendering/render_list.h:
+        (khtml::ListMarkerBox:::InlineBox):
+        (khtml::ListMarkerBox::isText):
+
 2004-10-05  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Darin
index 060f3033f1252ae86fb3d3cb84fa0ce4ea5a3203..ba92f3efa9118cf5d93463c7b721912b49106737 100644 (file)
@@ -343,6 +343,13 @@ void RenderListMarker::setStyle(RenderStyle *s)
     }
 }
 
+InlineBox* RenderListMarker::createInlineBox(bool, bool isRootLineBox, bool)
+{
+    KHTMLAssert(!isRootLineBox);
+    ListMarkerBox* box = new (renderArena()) ListMarkerBox(this);
+    m_inlineBoxWrapper = box;
+    return box;
+}
 
 void RenderListMarker::paint(PaintInfo& i, int _tx, int _ty)
 {
index 658e2b1329a5462410cd26a2744abe03f5c5c222..6a3df87cf6276e3298b84c0af5c2494bee2c2d52 100644 (file)
@@ -56,6 +56,8 @@ public:
 
     virtual void calcWidth();
 
+    virtual InlineBox* createInlineBox(bool, bool, bool);
+
     virtual short lineHeight(bool b, bool isRootLineBox=false) const;
     virtual short baselinePosition(bool b, bool isRootLineBox=false) const;
     
@@ -79,6 +81,13 @@ protected:
     RenderListItem* m_listItem;
 };
 
+class ListMarkerBox : public InlineBox
+{
+public:
+    ListMarkerBox(RenderObject* obj) :InlineBox(obj) {}
+    virtual bool isText() const { return !static_cast<RenderListMarker*>(object())->listImage(); }
+};
+
 class RenderListItem : public RenderBlock
 {
 public: