[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

ojan at chromium.org ojan at chromium.org
Wed Dec 22 11:39:04 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e627db3d664a7d05d46cf3ff14687eff442aab53
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 2 20:46:13 2010 +0000

    2010-07-20  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by Eric Seidel.
    
            focusing an unfocused contentEditable element should place the cursor at the beginning
            https://bugs.webkit.org/show_bug.cgi?id=42646
    
            r14666 made this change for the body and html elements, but not for all contentEditable
            elements. Doing this for all contentEditable elements matches all other browsers.
    
            * editing/deleting/5546763-expected.txt:
            * editing/deleting/in-visibly-empty-root.html:
            * editing/execCommand/4786404-1.html:
            * editing/execCommand/4786404-2.html:
            * editing/execCommand/remove-list-1-expected.txt:
            * editing/pasteboard/5601583-1.html:
            * editing/pasteboard/merge-end-1.html:
            * editing/pasteboard/merge-end-2.html:
            * editing/selection/move-begin-end-expected.txt:
            * editing/selection/move-begin-end.html:
            * editing/style/5279521.html:
            * platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt:
            * platform/mac/editing/input/text-input-controller-expected.txt:
            * platform/mac/editing/pasteboard/input-field-1-expected.checksum:
            * platform/mac/editing/pasteboard/input-field-1-expected.png:
            * platform/mac/editing/pasteboard/input-field-1-expected.txt:
            * platform/mac/editing/pasteboard/merge-end-1-expected.txt:
            * platform/mac/editing/pasteboard/merge-end-2-expected.txt:
            * platform/mac/editing/pasteboard/select-element-1-expected.txt:
            * platform/mac/fast/dom/focus-contenteditable-expected.checksum:
            * platform/mac/fast/dom/focus-contenteditable-expected.png:
            * platform/mac/fast/dom/focus-contenteditable-expected.txt:
            * platform/mac/fast/overflow/overflow-focus-ring-expected.checksum:
            * platform/mac/fast/overflow/overflow-focus-ring-expected.png:
            * platform/mac/fast/overflow/overflow-focus-ring-expected.txt:
    2010-07-20  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by Eric Seidel.
    
            focusing an unfocused contentEditable element should place the cursor at the beginning
            https://bugs.webkit.org/show_bug.cgi?id=42646
    
            r14666 made this change for the body and html elements, but not for all contentEditable
            elements. Doing this for all contentEditable elements matches all other browsers.
    
            * dom/Element.cpp:
            (WebCore::Element::updateFocusAppearance):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64488 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e8e9cf0..3d026a1 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,39 @@
+2010-07-20  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        focusing an unfocused contentEditable element should place the cursor at the beginning
+        https://bugs.webkit.org/show_bug.cgi?id=42646
+
+        r14666 made this change for the body and html elements, but not for all contentEditable
+        elements. Doing this for all contentEditable elements matches all other browsers.
+
+        * editing/deleting/5546763-expected.txt:
+        * editing/deleting/in-visibly-empty-root.html:
+        * editing/execCommand/4786404-1.html:
+        * editing/execCommand/4786404-2.html:
+        * editing/execCommand/remove-list-1-expected.txt:
+        * editing/pasteboard/5601583-1.html:
+        * editing/pasteboard/merge-end-1.html:
+        * editing/pasteboard/merge-end-2.html:
+        * editing/selection/move-begin-end-expected.txt:
+        * editing/selection/move-begin-end.html:
+        * editing/style/5279521.html:
+        * platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt:
+        * platform/mac/editing/input/text-input-controller-expected.txt:
+        * platform/mac/editing/pasteboard/input-field-1-expected.checksum:
+        * platform/mac/editing/pasteboard/input-field-1-expected.png:
+        * platform/mac/editing/pasteboard/input-field-1-expected.txt:
+        * platform/mac/editing/pasteboard/merge-end-1-expected.txt:
+        * platform/mac/editing/pasteboard/merge-end-2-expected.txt:
+        * platform/mac/editing/pasteboard/select-element-1-expected.txt:
+        * platform/mac/fast/dom/focus-contenteditable-expected.checksum:
+        * platform/mac/fast/dom/focus-contenteditable-expected.png:
+        * platform/mac/fast/dom/focus-contenteditable-expected.txt:
+        * platform/mac/fast/overflow/overflow-focus-ring-expected.checksum:
+        * platform/mac/fast/overflow/overflow-focus-ring-expected.png:
+        * platform/mac/fast/overflow/overflow-focus-ring-expected.txt:
+
 2010-08-02  Csaba Osztrogonác  <ossy at webkit.org>
 
         Unreviewed. Update Qt specific expected result after r64471.
diff --git a/LayoutTests/editing/deleting/5546763-expected.txt b/LayoutTests/editing/deleting/5546763-expected.txt
index 9be22c4..322ba06 100644
--- a/LayoutTests/editing/deleting/5546763-expected.txt
+++ b/LayoutTests/editing/deleting/5546763-expected.txt
@@ -1,8 +1,9 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 5 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > A > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/editing/deleting/in-visibly-empty-root.html b/LayoutTests/editing/deleting/in-visibly-empty-root.html
index c99dbe8..47edbd5 100644
--- a/LayoutTests/editing/deleting/in-visibly-empty-root.html
+++ b/LayoutTests/editing/deleting/in-visibly-empty-root.html
@@ -13,6 +13,7 @@
     var root = document.getElementById("editable-root");
     var square = document.getElementById("square");
     root.focus();
+    document.execCommand("SelectAll");
     document.execCommand("delete", "backward");
     if (!square.parentNode)
         document.getElementById("result").innerText = "FAIL: first delete removed the container";
diff --git a/LayoutTests/editing/execCommand/4786404-1.html b/LayoutTests/editing/execCommand/4786404-1.html
index 9c1aebf..c7d7b06 100644
--- a/LayoutTests/editing/execCommand/4786404-1.html
+++ b/LayoutTests/editing/execCommand/4786404-1.html
@@ -7,6 +7,7 @@
 var div = document.getElementById("div");
 div.focus();
 
+document.execCommand("SelectAll");
 document.execCommand("RemoveFormat");
 </script>
 </body>
diff --git a/LayoutTests/editing/execCommand/4786404-2.html b/LayoutTests/editing/execCommand/4786404-2.html
index 04d1a5a..c0abe23 100644
--- a/LayoutTests/editing/execCommand/4786404-2.html
+++ b/LayoutTests/editing/execCommand/4786404-2.html
@@ -7,6 +7,7 @@
 var div = document.getElementById("div");
 div.focus();
 
+document.execCommand("SelectAll");
 document.execCommand("RemoveFormat");
 </script>
 </body>
diff --git a/LayoutTests/editing/execCommand/remove-list-1-expected.txt b/LayoutTests/editing/execCommand/remove-list-1-expected.txt
index fb3f68a..78fc63c 100644
--- a/LayoutTests/editing/execCommand/remove-list-1-expected.txt
+++ b/LayoutTests/editing/execCommand/remove-list-1-expected.txt
@@ -1,8 +1,9 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 0 of LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 0 of LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document toDOMRange:range from 0 of LI > OL > DIV > BODY > HTML > #document to 60 of #text > LI > OL > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 60 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/editing/pasteboard/5601583-1.html b/LayoutTests/editing/pasteboard/5601583-1.html
index 6532d9e..d7c975e 100644
--- a/LayoutTests/editing/pasteboard/5601583-1.html
+++ b/LayoutTests/editing/pasteboard/5601583-1.html
@@ -8,6 +8,7 @@
 <script>
 copy = document.getElementById("copy");
 copy.focus();
+document.execCommand("SelectAll");
 document.execCommand("Copy");
 
 paste = document.getElementById("paste");
diff --git a/LayoutTests/editing/pasteboard/merge-end-1.html b/LayoutTests/editing/pasteboard/merge-end-1.html
index 319df35..178fd06 100644
--- a/LayoutTests/editing/pasteboard/merge-end-1.html
+++ b/LayoutTests/editing/pasteboard/merge-end-1.html
@@ -11,7 +11,6 @@ var s = window.getSelection();
 var e = document.getElementById("test");
 
 e.focus();
-s.setPosition(e, 0);
 moveSelectionForwardByCharacterCommand();
 insertHTMLCommand("<div>bar</div>baz");
 </script>
\ No newline at end of file
diff --git a/LayoutTests/editing/pasteboard/merge-end-2.html b/LayoutTests/editing/pasteboard/merge-end-2.html
index 65422a4..e5e094f 100644
--- a/LayoutTests/editing/pasteboard/merge-end-2.html
+++ b/LayoutTests/editing/pasteboard/merge-end-2.html
@@ -11,7 +11,6 @@ var s = window.getSelection();
 var e = document.getElementById("test");
 
 e.focus();
-s.setPosition(e, 0);
 moveSelectionForwardByCharacterCommand();
 insertHTMLCommand("<div>bar</div>baz");
 </script>
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/move-begin-end-expected.txt b/LayoutTests/editing/selection/move-begin-end-expected.txt
index 3840b6f..e5c7d57 100644
--- a/LayoutTests/editing/selection/move-begin-end-expected.txt
+++ b/LayoutTests/editing/selection/move-begin-end-expected.txt
@@ -1,8 +1,6 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/editing/selection/move-begin-end.html b/LayoutTests/editing/selection/move-begin-end.html
index 8b3408b..cf264c9 100644
--- a/LayoutTests/editing/selection/move-begin-end.html
+++ b/LayoutTests/editing/selection/move-begin-end.html
@@ -22,9 +22,6 @@ function runTest() {
     
     var area = document.getElementById('area');
     area.focus();
-    
-    // Position the caret at the beginning of the string.
-    eventSender.keyDown("leftArrow");
 
     // Now move to the end
     if (onMacPlatform)
diff --git a/LayoutTests/editing/style/5279521.html b/LayoutTests/editing/style/5279521.html
index 82195db..17a7079 100644
--- a/LayoutTests/editing/style/5279521.html
+++ b/LayoutTests/editing/style/5279521.html
@@ -4,5 +4,6 @@
 <script>
 var div = document.getElementById("div");
 div.focus();
+document.execCommand("SelectAll");
 document.execCommand("JustifyRight");
 </script>
diff --git a/LayoutTests/platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt b/LayoutTests/platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt
index e3c5386..b2a0121 100644
--- a/LayoutTests/platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt
+++ b/LayoutTests/platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt
@@ -2,7 +2,6 @@ ALERT: Successfully received AXSelectedTextChanged
 ALERT: Successfully received AXSelectedTextChanged
 ALERT: Successfully received AXSelectedTextChanged
 ALERT: Successfully received AXSelectedTextChanged
-ALERT: Successfully received AXSelectedTextChanged
 ALERT: Successfully received AXValueChanged
 conhello tent inside
 This tests that ARIA removing an element from a live region sends the correct notification.
diff --git a/LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt b/LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt
index ab0b397..ec1e5ba 100644
--- a/LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt
+++ b/LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt
@@ -1,8 +1,9 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: shouldInsertText:to be deleted replacingDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 13 of #text > DIV > BODY > HTML > #document to 13 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt
index b95aa50..7fea3a0 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/input-field-1-expected.txt
@@ -1,8 +1,9 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document toDOMRange:range from 2 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/pasteboard/merge-end-1-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/merge-end-1-expected.txt
index 9330939..6ecc55f 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/merge-end-1-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/merge-end-1-expected.txt
@@ -1,7 +1,6 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/pasteboard/merge-end-2-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/merge-end-2-expected.txt
index 962cfa9..db77ac2 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/merge-end-2-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/merge-end-2-expected.txt
@@ -1,7 +1,6 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/pasteboard/select-element-1-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/select-element-1-expected.txt
index 6cbc98e..212a212 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/select-element-1-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/select-element-1-expected.txt
@@ -1,8 +1,9 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document toDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.checksum b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.checksum
index 9a16f7e..5201fea 100644
--- a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.checksum
+++ b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.checksum
@@ -1 +1 @@
-44d9c6d8e23cc883d5d8c6ef7c77df1d
\ No newline at end of file
+4d80417edd32171a30d1bae9e6c6ff37
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.png b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.png
index f93b2ed..ad464a2 100644
Binary files a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.png and b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt
index da99a6d..3cfe3c0 100644
--- a/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt
+++ b/LayoutTests/platform/mac/fast/dom/focus-contenteditable-expected.txt
@@ -17,6 +17,5 @@ layer at (0,0) size 785x894
         RenderText {#text} at (0,0) size 78x18
           text run at (0,0) width 78: "Test Passed."
       RenderBlock {DIV} at (0,878) size 769x0
-selection start: position 0 of child 0 {#text} of child 5 {DIV} of body
-selection end:   position 19 of child 0 {#text} of child 5 {DIV} of body
+caret: position 0 of child 0 {#text} of child 5 {DIV} of body
 scrolled to 0,276
diff --git a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.checksum b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.checksum
index 20e5f4b..b4318a2 100644
--- a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.checksum
+++ b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.checksum
@@ -1 +1 @@
-3e94a655f09a4899cbd3f4ecee6275d1
\ No newline at end of file
+9ff8593259d6e2b537bf51a26e285ccc
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.png b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.png
index 647277f..4a62d74 100644
Binary files a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.png and b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.txt b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.txt
index 23b3224..a5cd7c0 100644
--- a/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.txt
+++ b/LayoutTests/platform/mac/fast/overflow/overflow-focus-ring-expected.txt
@@ -45,5 +45,4 @@ layer at (8,26) size 500x400 scrollWidth 501 scrollHeight 648
       text run at (0,594) width 500: "............................................................................................................................."
       text run at (0,612) width 500: "............................................................................................................................."
       text run at (0,630) width 212: "....................................................."
-selection start: position 0 of child 0 {#text} of child 1 {DIV} of body
-selection end:   position 4428 of child 0 {#text} of child 1 {DIV} of body
+caret: position 0 of child 0 {#text} of child 1 {DIV} of body
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4b6d9f1..efacc69 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-07-20  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        focusing an unfocused contentEditable element should place the cursor at the beginning
+        https://bugs.webkit.org/show_bug.cgi?id=42646
+
+        r14666 made this change for the body and html elements, but not for all contentEditable 
+        elements. Doing this for all contentEditable elements matches all other browsers.
+
+        * dom/Element.cpp:
+        (WebCore::Element::updateFocusAppearance):
+
 2010-08-02  Ryosuke Niwa  <rniwa at webkit.org>
 
         Reviewed by Kent Tamura.
diff --git a/WebCore/dom/Element.cpp b/WebCore/dom/Element.cpp
index d6b8d55..d90ae3c 100644
--- a/WebCore/dom/Element.cpp
+++ b/WebCore/dom/Element.cpp
@@ -1332,7 +1332,7 @@ void Element::updateFocusAppearance(bool /*restorePreviousSelection*/)
             return;
 
         // FIXME: We should restore the previous selection if there is one.
-        VisibleSelection newSelection = hasTagName(htmlTag) || hasTagName(bodyTag) ? VisibleSelection(Position(this, 0), DOWNSTREAM) : VisibleSelection::selectionFromContentsOfNode(this);
+        VisibleSelection newSelection = VisibleSelection(Position(this, 0), DOWNSTREAM);
         
         if (frame->shouldChangeSelection(newSelection)) {
             frame->selection()->setSelection(newSelection);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list