Changeset 24499 in webkit


Ignore:
Timestamp:
Jul 20, 2007 5:38:20 PM (17 years ago)
Author:
justing
Message:

LayoutTests:

Reviewed by Darin.


<rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it

  • editing/selection/5109817-expected.checksum: Added.
  • editing/selection/5109817-expected.png: Added.
  • editing/selection/5109817-expected.txt: Added.
  • editing/selection/5109817.html: Added.

WebCore:

Reviewed by Darin.

<rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it


  • bridge/EditorClient.h: Removed a client method for enabling/disabling word selection on right clicks.
  • editing/Editor.cpp: Ditto.
  • editing/Editor.h:
  • page/EventHandler.cpp: (WebCore::EventHandler::sendContextMenuEvent): Select the word underneath the mouse regardless of whether its editable.

WebKit:

Reviewed by Darin.


<rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm: Removed the method for enabling/disabling word selection on right click.
  • WebView/WebView.mm: Ditto.
  • WebView/WebViewPrivate.h: Removed the getter/setter entirely, it was in a private Category for Mail, but wasn't used by Mail on Tiger or Leopard, they apparently implement word selection on their own.

win:

Reviewed by Darin.


<rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it

  • WebEditorClient.cpp: Removed the now unused selectWordBeforeMenuEvent().
  • WebEditorClient.h:
Location:
trunk
Files:
4 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24497 r24499  
     12007-07-20  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Darin.
     4       
     5        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
     6
     7        * editing/selection/5109817-expected.checksum: Added.
     8        * editing/selection/5109817-expected.png: Added.
     9        * editing/selection/5109817-expected.txt: Added.
     10        * editing/selection/5109817.html: Added.
     11
    1122007-07-21  Antti  <antti@apple.com>
    213
  • trunk/WebCore/ChangeLog

    r24498 r24499  
     12007-07-20  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Darin.
     4
     5        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
     6       
     7        * bridge/EditorClient.h: Removed a client method for enabling/disabling
     8        word selection on right clicks.
     9        * editing/Editor.cpp: Ditto.
     10        * editing/Editor.h:
     11        * page/EventHandler.cpp:
     12        (WebCore::EventHandler::sendContextMenuEvent): Select the
     13        word underneath the mouse regardless of whether its editable.
     14
    1152007-07-20  Ada Chan  <adachan@apple.com>
    216
  • trunk/WebCore/bridge/EditorClient.h

    r21311 r24499  
    7676    virtual int spellCheckerDocumentTag() = 0;
    7777   
    78     virtual bool selectWordBeforeMenuEvent() = 0;
    7978    virtual bool isEditable() = 0;
    8079
  • trunk/WebCore/editing/Editor.cpp

    r24175 r24499  
    716716    if (client() && client()->shouldApplyStyle(style, m_frame->selectionController()->toRange().get()))
    717717        applyParagraphStyle(style, editingAction);
    718 }
    719 
    720 bool Editor::selectWordBeforeMenuEvent() const
    721 {
    722     return client() && client()->selectWordBeforeMenuEvent();
    723718}
    724719
  • trunk/WebCore/editing/Editor.h

    r24085 r24499  
    145145    bool selectionStartHasStyle(CSSStyleDeclaration*) const;
    146146
    147     bool selectWordBeforeMenuEvent() const;
    148147    bool clientIsEditable() const;
    149148   
  • trunk/WebCore/page/EventHandler.cpp

    r24465 r24499  
    13071307    MouseEventWithHitTestResults mev = doc->prepareMouseEvent(HitTestRequest(false, true), viewportPos, event);
    13081308
    1309     if (!m_frame->selectionController()->contains(viewportPos) &&
    1310             (m_frame->editor()->selectWordBeforeMenuEvent() || m_frame->editor()->clientIsEditable()
    1311             || (mev.targetNode() && mev.targetNode()->isContentEditable()))) {
     1309    if (!m_frame->selectionController()->contains(viewportPos)) {
    13121310        m_mouseDownMayStartSelect = true; // context menu events are always allowed to perform a selection
    13131311        selectClosestWordFromMouseEvent(mev);
  • trunk/WebKit/ChangeLog

    r24489 r24499  
     12007-07-20  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Darin.
     4       
     5        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
     6
     7        * WebCoreSupport/WebEditorClient.h:
     8        * WebCoreSupport/WebEditorClient.mm: Removed the method
     9        for enabling/disabling word selection on right click.
     10        * WebView/WebView.mm: Ditto.
     11        * WebView/WebViewPrivate.h: Removed the getter/setter entirely,
     12        it was in a private Category for Mail, but wasn't used by Mail
     13        on Tiger or Leopard, they apparently implement word selection on
     14        their own.
     15
    1162007-07-20  Timothy Hatcher  <timothy@apple.com>
    217
  • trunk/WebKit/WebCoreSupport/WebEditorClient.h

    r21318 r24499  
    4949
    5050    virtual bool smartInsertDeleteEnabled();
    51     virtual bool selectWordBeforeMenuEvent();
    5251    virtual bool isEditable();
    5352
  • trunk/WebKit/WebCoreSupport/WebEditorClient.mm

    r21757 r24499  
    196196{
    197197    return [m_webView spellCheckerDocumentTag];
    198 }
    199 
    200 bool WebEditorClient::selectWordBeforeMenuEvent()
    201 {
    202     return [m_webView _selectWordBeforeMenuEvent];
    203198}
    204199
  • trunk/WebKit/WebView/WebView.mm

    r24422 r24499  
    324324    BOOL dashboardBehaviorAllowWheelScrolling;
    325325   
    326     BOOL selectWordBeforeMenuEvent;
    327    
    328326    // WebKit has both a global plug-in database and a separate, per WebView plug-in database. Dashboard uses the per WebView database.
    329327    WebPluginDatabase *pluginDatabase;
     
    35053503}
    35063504
    3507 - (BOOL)_selectWordBeforeMenuEvent
    3508 {
    3509     return _private->selectWordBeforeMenuEvent;
    3510 }
    3511 
    3512 - (void)_setSelectWordBeforeMenuEvent:(BOOL)flag
    3513 {
    3514     _private->selectWordBeforeMenuEvent = flag;
    3515 }
    3516 
    35173505- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle
    35183506{
  • trunk/WebKit/WebView/WebViewPrivate.h

    r23774 r24499  
    450450@interface WebView (WebViewEditingInMail)
    451451- (void)_insertNewlineInQuotedContent;
    452 - (BOOL)_selectWordBeforeMenuEvent;
    453 - (void)_setSelectWordBeforeMenuEvent:(BOOL)flag;
    454452- (void)_replaceSelectionWithNode:(DOMNode *)node matchStyle:(BOOL)matchStyle;
    455453@end
  • trunk/WebKit/win/ChangeLog

    r24494 r24499  
     12007-07-20  Justin Garcia  <justin.garcia@apple.com>
     2
     3        Reviewed by Darin.
     4       
     5        <rdar://problem/5109817> Ctrl-click on word in non-editable text doesn't select it
     6
     7        * WebEditorClient.cpp: Removed the now unused selectWordBeforeMenuEvent().
     8        * WebEditorClient.h:
     9
    1102007-07-20  Ada Chan  <adachan@apple.com>
    211
  • trunk/WebKit/win/WebEditorClient.cpp

    r24469 r24499  
    604604}
    605605
    606 bool WebEditorClient::selectWordBeforeMenuEvent()
    607 {
    608     return false;
    609 }
    610 
    611606bool WebEditorClient::isEditable()
    612607{
  • trunk/WebKit/win/WebEditorClient.h

    r23455 r24499  
    5050    virtual int spellCheckerDocumentTag();
    5151
    52     virtual bool selectWordBeforeMenuEvent();
    5352    virtual bool isEditable();
    5453
Note: See TracChangeset for help on using the changeset viewer.