Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word...
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 00:49:14 +0000 (00:49 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2005 00:49:14 +0000 (00:49 +0000)
        Reviewed by kocienda.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Call updateLayout so caretMinOffset and caretMaxOffset return correct values.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8722 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp

index f9bfa163a53d636193551f93292e620399e9430d..9d22de93e42f862ec3cf36523a3965fb7b80be6c 100644 (file)
@@ -1,3 +1,12 @@
+2005-02-28  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/4024786> REGRESSION (Mail): "Smart paste" plain-text word into Blot leaves insertion point misplaced
+
+        Reviewed by kocienda.
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::ReplaceSelectionCommand::completeHTMLReplacement): Call updateLayout so caretMinOffset and caretMaxOffset return correct values.
+
 2005-02-28  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Ken.
index 3de26b8909fb81e7934a1082e42a72c5a8d2853b..d81e3c26849101819909cff95ad979b7aee90a46 100644 (file)
@@ -4748,6 +4748,8 @@ void ReplaceSelectionCommand::completeHTMLReplacement()
         firstLeaf = nextChild;
     }
     
+    // Call updateLayout so caretMinOffset and caretMaxOffset return correct values.
+    document()->updateLayout();
     Position start(firstLeaf, firstLeaf->caretMinOffset());
     Position end(lastLeaf, lastLeaf->caretMaxOffset());
     completeHTMLReplacement(start, end);