[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:02 UTC 2009


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

            Reviewed by Trey
    
            Only apply the typing style if it is non-null and has a length.
            This fixes a problem Trey noticed with my last checkin, where
            typed characters were placed in empty "typing style" spans.
    
            * khtml/editing/htmlediting_impl.cpp:
            (khtml::InputNewlineCommandImpl::doApply)
            (khtml::InputTextCommandImpl::prepareForTextInsertion)
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7143 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 2f8f7f7..b086a64 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
 2004-07-28  Ken Kocienda  <kocienda at apple.com>
 
+        Reviewed by Trey
+
+        Only apply the typing style if it is non-null and has a length.
+        This fixes a problem Trey noticed with my last checkin, where
+        typed characters were placed in empty "typing style" spans.
+
+        * khtml/editing/htmlediting_impl.cpp:
+        (khtml::InputNewlineCommandImpl::doApply)
+        (khtml::InputTextCommandImpl::prepareForTextInsertion)
+
+2004-07-28  Ken Kocienda  <kocienda at apple.com>
+
         Reviewed by Maciej
         
         Fixed this bug:
diff --git a/WebCore/khtml/editing/htmlediting_impl.cpp b/WebCore/khtml/editing/htmlediting_impl.cpp
index 746177a..9107032 100644
--- a/WebCore/khtml/editing/htmlediting_impl.cpp
+++ b/WebCore/khtml/editing/htmlediting_impl.cpp
@@ -1538,7 +1538,8 @@ void InputNewlineCommandImpl::doApply()
     NodeImpl *nodeToInsert = breakNode;
     
     // Handle the case where there is a typing style.
-    if (document()->part()->typingStyle()) {
+    CSSStyleDeclarationImpl *typingStyle = document()->part()->typingStyle();
+    if (typingStyle && typingStyle->length() > 0) {
         ElementImpl *styleElement = createTypingStyleElement();
         styleElement->appendChild(breakNode, exceptionCode);
         ASSERT(exceptionCode == 0);
@@ -1647,7 +1648,8 @@ Position InputTextCommandImpl::prepareForTextInsertion(bool adjustDownstream)
         NodeImpl *nodeToInsert = textNode;
 
         // Handle the case where there is a typing style.
-        if (document()->part()->typingStyle()) {
+        CSSStyleDeclarationImpl *typingStyle = document()->part()->typingStyle();
+        if (typingStyle && typingStyle->length() > 0) {
             int exceptionCode = 0;
             ElementImpl *styleElement = createTypingStyleElement();
             styleElement->appendChild(textNode, exceptionCode);
@@ -1679,7 +1681,8 @@ Position InputTextCommandImpl::prepareForTextInsertion(bool adjustDownstream)
     }
     else {
         // Handle the case where there is a typing style.
-        if (document()->part()->typingStyle()) {
+        CSSStyleDeclarationImpl *typingStyle = document()->part()->typingStyle();
+        if (typingStyle && typingStyle->length() > 0) {
             if (pos.node()->isTextNode() && pos.offset() > pos.node()->caretMinOffset() && pos.offset() < pos.node()->caretMaxOffset()) {
                 // Need to split current text node in order to insert a span.
                 TextImpl *text = static_cast<TextImpl *>(pos.node());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list