LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2007 06:15:21 +0000 (06:15 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2007 06:15:21 +0000 (06:15 +0000)
        Reviewed by ggaren

        Updated these expected results.  We now clear the
        selection inside a focused node *after* firing the
        mousedown event handler, which matches FF:
        * fast/forms/focus-selection-input-expected.txt:
        * fast/forms/focus-selection-textarea-expected.txt:

WebCore:

        Reviewed by ggaren

        <http://bugs.webkit.org/show_bug.cgi?id=13716>
        REGRESSION: Three new layout test failures

        Two failures are correct.  Updated their expected results.

        In fast/events/frame-tab-focus.html, as we advance
        through focusable nodes, we descend into a subframe
        to focus a node and then ascend out of it into the
        main frame to focus the next.  When we focus the main
        frame, the node in that frame that was previously
        focused and contains an inactive selection is focused
        momentarily because setCaretVisible tries to focus the
        node containing the caret.

        * page/Frame.cpp:
        (WebCore::Frame::setCaretVisible): Don't focus the
        node containing the caret. FocusController will focus
        the previously focused node (which will contain the
        caret) if necessary when the frame gains focus.

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

LayoutTests/ChangeLog
LayoutTests/fast/forms/focus-selection-input-expected.txt
LayoutTests/fast/forms/focus-selection-textarea-expected.txt
WebCore/ChangeLog
WebCore/page/Frame.cpp

index c8fb5467edb57be40d7b1b3de0936db4358ea796..ba68b8bc518a28735a38d95d051cd465d0a2fa3a 100644 (file)
@@ -1,3 +1,13 @@
+2007-05-14  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by ggaren
+        
+        Updated these expected results.  We now clear the
+        selection inside a focused node *after* firing the
+        mousedown event handler, which matches FF:
+        * fast/forms/focus-selection-input-expected.txt:
+        * fast/forms/focus-selection-textarea-expected.txt:
+
 2007-05-14  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by ggaren
index 3921fb47f138662dbcf249330d826f666e25e636..8e9747c8559a07c4bf54ca16dbd9b53f00b907a4 100644 (file)
@@ -6,8 +6,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV to 0 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > LABEL > BODY > HTML > #document to 5 of #text > LABEL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 0 of #text > DIV toDOMRange:range from 0 of #text > LABEL > BODY > HTML > #document to 5 of #text > LABEL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
index fc64f5d80e37b3f032e0f8ecb39344a102e3372c..55d3abe3f0469928cb6fe12bab471250b9bbb6f1 100644 (file)
@@ -6,8 +6,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV to 0 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > LABEL > BODY > HTML > #document to 5 of #text > LABEL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 0 of #text > DIV toDOMRange:range from 0 of #text > LABEL > BODY > HTML > #document to 5 of #text > LABEL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
index 6e5324375c99121fb0d99cc1aad06f40fc308a9f..370842a530b99ce74ea7ca21c4247fbb930cdb9d 100644 (file)
@@ -1,3 +1,27 @@
+2007-05-14  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by ggaren
+        
+        <http://bugs.webkit.org/show_bug.cgi?id=13716>
+        REGRESSION: Three new layout test failures
+        
+        Two failures are correct.  Updated their expected results.
+        
+        In fast/events/frame-tab-focus.html, as we advance
+        through focusable nodes, we descend into a subframe
+        to focus a node and then ascend out of it into the
+        main frame to focus the next.  When we focus the main 
+        frame, the node in that frame that was previously 
+        focused and contains an inactive selection is focused 
+        momentarily because setCaretVisible tries to focus the 
+        node containing the caret.
+
+        * page/Frame.cpp:
+        (WebCore::Frame::setCaretVisible): Don't focus the
+        node containing the caret. FocusController will focus
+        the previously focused node (which will contain the
+        caret) if necessary when the frame gains focus.
+        
 2007-05-14  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Brady.
index 7fb7a45e6f0d219d56e87b6e01cd27d9d3c3798d..ca062c695510f8a880872cfa6a636f6da59a2ecc 100644 (file)
@@ -569,8 +569,6 @@ void Frame::setCaretVisible(bool flag)
     if (d->m_caretVisible == flag)
         return;
     clearCaretRectIfNeeded();
-    if (flag)
-        setFocusedNodeIfNeeded();
     d->m_caretVisible = flag;
     selectionLayoutChanged();
 }