Fix for 3710721 and 3504114, crashes because of bad ownership model for list markers.
[WebKit-https.git] / WebCore / khtml / rendering / render_list.cpp
index afcda0829d8473227b84e5020adce7a6ee98a4f8..a74df2c657cc47bb88c248edcd87242c08674ae8 100644 (file)
@@ -145,7 +145,6 @@ void RenderListItem::setStyle(RenderStyle *_style)
             m_marker = new (renderArena()) RenderListMarker(document());
             m_marker->setStyle(newStyle);
             m_marker->setListItem(this);
-            _markerInstalledInParent = false;
         }
         else
             m_marker->setStyle(newStyle);
@@ -162,7 +161,7 @@ RenderListItem::~RenderListItem()
 
 void RenderListItem::detach()
 {    
-    if (m_marker && !_markerInstalledInParent) {
+    if (m_marker) {
         m_marker->detach();
         m_marker = 0;
     }
@@ -246,7 +245,6 @@ void RenderListItem::updateMarkerLocation()
             if (!lineBoxParent)
                 lineBoxParent = this;
             lineBoxParent->addChild(m_marker, lineBoxParent->firstChild());
-            _markerInstalledInParent = true;
             if (!m_marker->minMaxKnown())
                 m_marker->calcMinMaxWidth();
             recalcMinMaxWidths();