[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 08:30:46 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit cd7e8b52798f4f9d91b379dfed2021a46e1ffae7
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Mar 25 18:53:33 2004 +0000

    	Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
    	parents get deleted.  r=john
    
    	Fix for .value not being settable on selects.  r=darin
    
            * khtml/html/html_formimpl.cpp:
            (HTMLSelectElementImpl::setValue):
            * khtml/rendering/render_block.cpp:
            (khtml::RenderBlock::removeChildrenFromLineBoxes):
            (khtml::RenderBlock::removeChild):
            * khtml/rendering/render_block.h:
            * khtml/rendering/render_line.cpp:
            (InlineFlowBox::removeChild):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index e105084..76243e6 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2004-03-25  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3570700, crash in inlineBox::isDirty.  Make sure line boxes null out parent pointers when those
+	parents get deleted.  r=john
+
+	Fix for .value not being settable on selects.  r=darin
+	
+        * khtml/html/html_formimpl.cpp:
+        (HTMLSelectElementImpl::setValue):
+        * khtml/rendering/render_block.cpp:
+        (khtml::RenderBlock::removeChildrenFromLineBoxes):
+        (khtml::RenderBlock::removeChild):
+        * khtml/rendering/render_block.h:
+        * khtml/rendering/render_line.cpp:
+        (InlineFlowBox::removeChild):
+        
 2004-03-25  Darin Adler  <darin at apple.com>
 
         Fix by Kristin Webster, reviewed by me.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index ff2832b..0441aca 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -2107,11 +2107,16 @@ DOMString HTMLSelectElementImpl::value( )
     return DOMString("");
 }
 
-void HTMLSelectElementImpl::setValue(DOMStringImpl* /*value*/)
+void HTMLSelectElementImpl::setValue(DOMStringImpl* value)
 {
-    // ### find the option with value() matching the given parameter
+    // find the option with value() matching the given parameter
     // and make it the current selection.
-    kdWarning() << "Unimplemented HTMLSelectElementImpl::setValue called" << endl;
+    QMemArray<HTMLGenericFormElementImpl*> items = listItems();
+    for (unsigned i = 0; i < items.size(); i++)
+        if (items[i]->id() == ID_OPTION && static_cast<HTMLOptionElementImpl*>(items[i])->value() == value) {
+            static_cast<HTMLOptionElementImpl*>(items[i])->setSelected(true);
+            return;
+        }
 }
 
 QString HTMLSelectElementImpl::state( )
diff --git a/WebCore/khtml/rendering/render_block.cpp b/WebCore/khtml/rendering/render_block.cpp
index 5c5c24f..37334bc 100644
--- a/WebCore/khtml/rendering/render_block.cpp
+++ b/WebCore/khtml/rendering/render_block.cpp
@@ -256,6 +256,17 @@ void RenderBlock::makeChildrenNonInline(RenderObject *insertionPoint)
     }
 }
 
+void RenderBlock::removeChildrenFromLineBoxes()
+{
+    // In the case where we do a collapse/merge from the destruction
+    // of a block in between two anonymous blocks with inlines (see removeChild in render_block.cpp),
+    // we have line boxes that need to have their parents nulled.
+    KHTMLAssert(!documentBeingDestroyed());
+    for (InlineFlowBox* box = m_firstLineBox; box; box = box->nextFlowBox())
+        for (InlineBox* child = box->firstChild(); child; child = child->nextOnLine())
+            child->remove();
+}
+
 void RenderBlock::removeChild(RenderObject *oldChild)
 {
     // If this child is a block, and if our previous and next siblings are
@@ -267,6 +278,9 @@ void RenderBlock::removeChild(RenderObject *oldChild)
     if (!documentBeingDestroyed() && !isInline() && !oldChild->isInline() && !oldChild->continuation() &&
         prev && prev->isAnonymousBlock() && prev->childrenInline() &&
         next && next->isAnonymousBlock() && next->childrenInline()) {
+        // Clean up the line box children inside |next|.
+        static_cast<RenderBlock*>(next)->removeChildrenFromLineBoxes();
+        
         // Take all the children out of the |next| block and put them in
         // the |prev| block.
         RenderObject* o = next->firstChild();
diff --git a/WebCore/khtml/rendering/render_block.h b/WebCore/khtml/rendering/render_block.h
index 3a61df7..1c32daf 100644
--- a/WebCore/khtml/rendering/render_block.h
+++ b/WebCore/khtml/rendering/render_block.h
@@ -198,7 +198,8 @@ public:
     
 protected:
     void newLine();
-
+    void removeChildrenFromLineBoxes();
+    
 protected:
     struct FloatingObject {
         enum Type {
diff --git a/WebCore/khtml/rendering/render_line.cpp b/WebCore/khtml/rendering/render_line.cpp
index fdce20b..6e9c6dc 100644
--- a/WebCore/khtml/rendering/render_line.cpp
+++ b/WebCore/khtml/rendering/render_line.cpp
@@ -210,6 +210,8 @@ void InlineFlowBox::removeChild(InlineBox* child)
         child->nextOnLine()->setPrevOnLine(child->prevOnLine());
     if (child->prevOnLine())
         child->prevOnLine()->setNextOnLine(child->nextOnLine());
+    
+    child->setParent(0);
 }
 
 void InlineFlowBox::deleteLine(RenderArena* arena)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list