Bug 92364 - [WK2] WebPage::handleEditingKeyboardEvent does not check whether the node allows editing.
Summary: [WK2] WebPage::handleEditingKeyboardEvent does not check whether the node all...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mikhail Pozdnyakov
URL:
Keywords:
Depends on:
Blocks: 61838
  Show dependency treegraph
 
Reported: 2012-07-26 04:08 PDT by Mikhail Pozdnyakov
Modified: 2012-07-26 05:10 PDT (History)
3 users (show)

See Also:


Attachments
patch (1.57 KB, patch)
2012-07-26 04:14 PDT, Mikhail Pozdnyakov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Pozdnyakov 2012-07-26 04:08:37 PDT
WebPage::handleEditingKeyboardEvent does not check whether the node allows editing.
Affects the behavior of fast/events/key-events-in-input-button.html test.
Comment 1 Mikhail Pozdnyakov 2012-07-26 04:14:08 PDT
Created attachment 154607 [details]
patch
Comment 2 Kenneth Rohde Christiansen 2012-07-26 04:40:01 PDT
Comment on attachment 154607 [details]
patch

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

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2149
> +    // Don't allow text insertion for nodes that cannot edit.
> +    if (!frame->editor()->canEdit())

You might not always have an editor() either.
Comment 3 Mikhail Pozdnyakov 2012-07-26 04:46:40 PDT
(In reply to comment #2)
> (From update of attachment 154607 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154607&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2149
> > +    // Don't allow text insertion for nodes that cannot edit.
> > +    if (!frame->editor()->canEdit())
> 
> You might not always have an editor() either.

this function ends already with following:
    return frame->editor()->insertText(evt->keyEvent()->text(), evt);

and here is from Frame.h

    inline Editor* Frame::editor() const
    {
        return &m_editor;
    }
Comment 4 Kenneth Rohde Christiansen 2012-07-26 04:48:38 PDT
Ah maybe that changed then
Comment 5 WebKit Review Bot 2012-07-26 05:10:42 PDT
Comment on attachment 154607 [details]
patch

Clearing flags on attachment: 154607

Committed r123732: <http://trac.webkit.org/changeset/123732>
Comment 6 WebKit Review Bot 2012-07-26 05:10:46 PDT
All reviewed patches have been landed.  Closing bug.