Bug 54254 - webkit2 pages gobble up cmd-I as an editing command in some cases where it shouldn't
Summary: webkit2 pages gobble up cmd-I as an editing command in some cases where it sh...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Alice Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-02-10 15:54 PST by Alice Liu
Modified: 2011-06-18 12:41 PDT (History)
1 user (show)

See Also:


Attachments
patch (1.20 KB, patch)
2011-02-10 15:57 PST, Alice Liu
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alice Liu 2011-02-10 15:54:29 PST
In WebKit, [WebHTMLView _handleStyleKeyEquivalent] returned early if [WebHTMLView _canEdit] was false.  We're missing this early return case in WebKit2, in [WKView _handleStyleKeyEquivalent]

[WebHTMLView _canEdit] boils down to checking if the current selection is in an editable region.

<rdar://problem/8980859>
Comment 1 Alice Liu 2011-02-10 15:57:25 PST
Created attachment 82065 [details]
patch
Comment 2 Enrica Casucci 2011-02-10 16:00:43 PST
Comment on attachment 82065 [details]
patch

Looks good to me.
Comment 3 Darin Adler 2011-02-10 18:06:45 PST
Comment on attachment 82065 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=82065&action=review

> Source/WebKit2/UIProcess/API/mac/WKView.mm:992
> +    if (!_data->_page->selectionState().isContentEditable)

I think that longer term we might want this only if content is “richly” editable. No reason to enable these inside, say, an <input type=text>.
Comment 4 Darin Adler 2011-06-18 12:41:18 PDT
http://trac.webkit.org/changeset/78288