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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:49:20 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8a1725d3f9711a8c16418aafc93f6a2f2af84ae4
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 30 18:48:49 2003 +0000

    	Fixed 3349598.  Deal gracefully with <li> items that
    	are not in a <ol> or <ul>, instead of crashing!
    
            Reviewed by Ken.
    
            * kwq/KWQKHTMLPart.mm:
            (listParent):
            (KWQKHTMLPart::attributedString):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4730 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8ba5bc1..e0ca4ce 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,14 @@
+2003-07-30  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3349598.  Deal gracefully with <li> items that
+	are not in a <ol> or <ul>, instead of crashing!
+
+        Reviewed by Ken.
+
+        * kwq/KWQKHTMLPart.mm:
+        (listParent):
+        (KWQKHTMLPart::attributedString):
+
 2003-07-29  Richard Williamson   <rjw at apple.com>
 
 	Use the new KURL getNSURL() method to create an NSURL.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8ba5bc1..e0ca4ce 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2003-07-30  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3349598.  Deal gracefully with <li> items that
+	are not in a <ol> or <ul>, instead of crashing!
+
+        Reviewed by Ken.
+
+        * kwq/KWQKHTMLPart.mm:
+        (listParent):
+        (KWQKHTMLPart::attributedString):
+
 2003-07-29  Richard Williamson   <rjw at apple.com>
 
 	Use the new KURL getNSURL() method to create an NSURL.
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 0449f09..c4f6e49 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1792,6 +1792,8 @@ static DOM::ElementImpl *listParent(DOM::ElementImpl *item)
     
     while (_id != ID_UL && _id != ID_OL) {
         item = static_cast<DOM::ElementImpl *>(item->parentNode());
+        if (!item)
+            break;
         _id = Node(item).elementId();
     }
     return item;
@@ -1908,39 +1910,41 @@ NSAttributedString *KWQKHTMLPart::attributedString(NodeImpl *_startNode, int sta
                             listItemLocations.append (info);
                             
                             listText += '\t';
-                            // Ick!  Avoid use of itemParent->id() which confuses ObjC++.
-                            if (Node(itemParent).elementId() == ID_UL) {
-                                // Always use bullets.  Perhaps we could use other characters
-                                // for square and disc type lists.
-                                listText += ((QChar)BULLET_CHAR);
-                                if ([font pointSize] > maxMarkerWidth)
-                                    maxMarkerWidth = [font pointSize];
-                            }
-                            else {
-                                khtml::RenderListItem *listRenderer = static_cast<khtml::RenderListItem*>(renderer);
-                                QString marker = listRenderer->markerStringValue();
-                                listText += marker;
-                                // Use AppKit metrics.  Will be rendered by AppKit.
-                                float markerWidth = [font widthOfString: marker.getNSString()];
-                                if (markerWidth > maxMarkerWidth)
-                                    maxMarkerWidth = markerWidth;
-                            }
-                            listText += ' ';
-                            listText += '\t';
+                            if (itemParent){
+                                // Ick!  Avoid use of itemParent->id() which confuses ObjC++.
+                                if (Node(itemParent).elementId() == ID_UL) {
+                                    // Always use bullets.  Perhaps we could use other characters
+                                    // for square and disc type lists.
+                                    listText += ((QChar)BULLET_CHAR);
+                                    if ([font pointSize] > maxMarkerWidth)
+                                        maxMarkerWidth = [font pointSize];
+                                }
+                                else {
+                                    khtml::RenderListItem *listRenderer = static_cast<khtml::RenderListItem*>(renderer);
+                                    QString marker = listRenderer->markerStringValue();
+                                    listText += marker;
+                                    // Use AppKit metrics.  Will be rendered by AppKit.
+                                    float markerWidth = [font widthOfString: marker.getNSString()];
+                                    if (markerWidth > maxMarkerWidth)
+                                        maxMarkerWidth = markerWidth;
+                                }
+                                listText += ' ';
+                                listText += '\t';
     
-                            NSMutableDictionary *attrs;
-        
-                            attrs = [[NSMutableDictionary alloc] init];
-                            [attrs setObject:font forKey:NSFontAttributeName];
-                            if (style && style->color().isValid())
-                                [attrs setObject:style->color().getNSColor() forKey:NSForegroundColorAttributeName];
-                            if (style && style->backgroundColor().isValid())
-                                [attrs setObject:style->backgroundColor().getNSColor() forKey:NSBackgroundColorAttributeName];
-        
-                            NSAttributedString *partialString = [[NSAttributedString alloc] initWithString:listText.getNSString() attributes:attrs];
-                            [attrs release];
-                            [result appendAttributedString: partialString];                
-                            [partialString release];
+                                NSMutableDictionary *attrs;
+            
+                                attrs = [[NSMutableDictionary alloc] init];
+                                [attrs setObject:font forKey:NSFontAttributeName];
+                                if (style && style->color().isValid())
+                                    [attrs setObject:style->color().getNSColor() forKey:NSForegroundColorAttributeName];
+                                if (style && style->backgroundColor().isValid())
+                                    [attrs setObject:style->backgroundColor().getNSColor() forKey:NSBackgroundColorAttributeName];
+            
+                                NSAttributedString *partialString = [[NSAttributedString alloc] initWithString:listText.getNSString() attributes:attrs];
+                                [attrs release];
+                                [result appendAttributedString: partialString];                
+                                [partialString release];
+                            }
                         }
                         break;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list