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

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:53:00 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 5d0ce77e0c35d3e5617f6f5f923c4e88b4ad62fc
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 28 18:33:27 2004 +0000

            Reviewed by Maciej
    
            Fixed this bug:
    
            <rdar://problem/3690704> marking partly bold text italic across blocks wrongly extends the bold section
    
            * khtml/editing/htmlediting_impl.cpp:
            (khtml::ApplyStyleCommandImpl::doApply): Fixed loop that gathers up groups of nodes to
            pass off to the function that applies styles. While this is meant to be conservative in
            order to leave the DOM well-formed in all cases, it contained an error where the set
            of nodes to be styled together erroneously could include a node that was meant for
            the next set. Fixed.
            (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Unrelated change to remove DOM:: scope
            resolution qualifier. Unneeded here.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 04c299e..2f8f7f7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,20 @@
+2004-07-28  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Maciej
+        
+        Fixed this bug:
+        
+        <rdar://problem/3690704> marking partly bold text italic across blocks wrongly extends the bold section
+
+        * khtml/editing/htmlediting_impl.cpp:
+        (khtml::ApplyStyleCommandImpl::doApply): Fixed loop that gathers up groups of nodes to
+        pass off to the function that applies styles. While this is meant to be conservative in
+        order to leave the DOM well-formed in all cases, it contained an error where the set
+        of nodes to be styled together erroneously could include a node that was meant for 
+        the next set. Fixed.
+        (khtml::ApplyStyleCommandImpl::applyStyleIfNeeded): Unrelated change to remove DOM:: scope
+        resolution qualifier. Unneeded here.
+
 2004-07-28  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey.
diff --git a/WebCore/khtml/editing/htmlediting_impl.cpp b/WebCore/khtml/editing/htmlediting_impl.cpp
index 46a6779..746177a 100644
--- a/WebCore/khtml/editing/htmlediting_impl.cpp
+++ b/WebCore/khtml/editing/htmlediting_impl.cpp
@@ -655,13 +655,18 @@ void ApplyStyleCommandImpl::doApply()
             if (node->childNodeCount() == 0 && node->renderer() && node->renderer()->isInline()) {
                 NodeImpl *runStart = node;
                 while (1) {
-                    if (runStart->parentNode() != node->parentNode() || node->isHTMLElement() || node == end.node() || 
-                        (node->renderer() && !node->renderer()->isInline())) {
-                        applyStyleIfNeeded(runStart, node);
+                    NodeImpl *next = node->traverseNextNode();
+                    // Break if node is the end node, or if the next node does not fit in with
+                    // the current group.
+                    if (node == end.node() || 
+                        runStart->parentNode() != next->parentNode() || 
+                        next->isHTMLElement() || 
+                        (next->renderer() && !next->renderer()->isInline()))
                         break;
-                    }
-                    node = node->traverseNextNode();
+                    node = next;
                 }
+                // Now apply style to the run we found.
+                applyStyleIfNeeded(runStart, node);
             }
             if (node == end.node())
                 break;
@@ -811,7 +816,7 @@ void ApplyStyleCommandImpl::surroundNodeRangeWithElement(NodeImpl *startNode, No
     }
 }
 
-void ApplyStyleCommandImpl::applyStyleIfNeeded(DOM::NodeImpl *startNode, DOM::NodeImpl *endNode)
+void ApplyStyleCommandImpl::applyStyleIfNeeded(NodeImpl *startNode, NodeImpl *endNode)
 {
     StyleChange styleChange = computeStyleChange(Position(startNode, 0), style());
     int exceptionCode = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list