Changeset 15487 in webkit


Ignore:
Timestamp:
Jul 17, 2006 12:38:48 PM (18 years ago)
Author:
justing
Message:

LayoutTests:

Reviewed by levi

  • editing/selection/drag-to-contenteditable-iframe-expected.txt:
  • editing/selection/subframe-with-selection-expected.txt:

WebKit:

Reviewed by levi


Rolled the first fix for:
<http://bugzilla.opendarwin.org/show_bug.cgi?id=9642>
GMail Editor: Operations that use drop down menus blow away the selection
back in and removed the call to _clearSelectionInOtherFrames from
-[WebHTMLView becomeFirstResponder] to fix the bug.

  • WebView/WebHTMLView.m: (-[NSArray maintainsInactiveSelection]): (-[NSArray becomeFirstResponder]):
  • WebView/WebView.m: (-[WebView maintainsInactiveSelection]):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r15485 r15487  
     12006-07-14  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by levi
     4
     5        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
     6        * editing/selection/subframe-with-selection-expected.txt:
     7
    182006-07-17  Maciej Stachowiak  <mjs@apple.com>
    29
  • trunk/WebKit/ChangeLog

    r15452 r15487  
     12006-07-17  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by levi
     4       
     5        Rolled the first fix for:
     6        <http://bugzilla.opendarwin.org/show_bug.cgi?id=9642>
     7        GMail Editor: Operations that use drop down menus blow away the selection
     8        back in and removed the call to _clearSelectionInOtherFrames from
     9        -[WebHTMLView becomeFirstResponder] to fix the bug.
     10
     11        * WebView/WebHTMLView.m:
     12        (-[NSArray maintainsInactiveSelection]):
     13        (-[NSArray becomeFirstResponder]):
     14        * WebView/WebView.m:
     15        (-[WebView maintainsInactiveSelection]):
     16
    1172006-07-15  Darin Adler  <darin@apple.com>
    218
  • trunk/WebKit/WebView/WebHTMLView.m

    r15452 r15487  
    22062206- (BOOL)maintainsInactiveSelection
    22072207{
    2208     // This method helps to determing whether the view should maintain
    2209     // an inactive selection when the view is not first responder.
     2208    // This method helps to determine whether the WebHTMLView should maintain
     2209    // an inactive selection when it's not first responder.
    22102210    // Traditionally, these views have not maintained such selections,
    22112211    // clearing them when the view was not first responder. However,
     
    22142214    //                            when they're not firstResponder"
    22152215    // it was decided to add a switch to act more like an NSTextView.
    2216     // For now, however, the view only acts in this way when the
    2217     // web view is set to be editable. This will maintain traditional
    2218     // behavior for WebKit clients dating back to before this change,
    2219     // and will likely be a decent switch for the long term, since
    2220     // clients to ste the web view to be editable probably want it
    2221     // to act like a "regular" Cocoa view in terms of its selection
    2222     // behavior.
    22232216    id nextResponder = [[self window] _newFirstResponderAfterResigning];
    22242217
     
    22412234        return YES;
    22422235
    2243     if (![[self _webView] maintainsInactiveSelection])
    2244         return NO;
    2245    
    2246     // editable views lose selection when losing first responder status
    2247     // to a widget in the same page, but not otherwise
    2248     BOOL loseSelection = [nextResponder isKindOfClass:[NSView class]]
    2249         && [nextResponder isDescendantOf:[self _webView]];
    2250 
    2251     return !loseSelection;
     2236    return [[self _webView] maintainsInactiveSelection] || [[self _bridge] isSelectionEditable];
    22522237}
    22532238
     
    29932978    if (view)
    29942979        [[self window] makeFirstResponder:view];
    2995     [[self _frame] _clearSelectionInOtherFrames];
    29962980    [self _updateActiveState];
    29972981    [self _updateFontPanel];
  • trunk/WebKit/WebView/WebView.m

    r15441 r15487  
    30493049- (BOOL)maintainsInactiveSelection
    30503050{
    3051     return [self isEditable];
     3051    return NO;
    30523052}
    30533053
Note: See TracChangeset for help on using the changeset viewer.