Bug 73984 - TypingCommand duplicates code to obtain the last typing command
Summary: TypingCommand duplicates code to obtain the last typing command
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks: 64414
  Show dependency treegraph
 
Reported: 2011-12-06 23:48 PST by Ryosuke Niwa
Modified: 2011-12-07 01:03 PST (History)
6 users (show)

See Also:


Attachments
cleanup (11.61 KB, patch)
2011-12-07 00:18 PST, Ryosuke Niwa
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2011-12-06 23:48:22 PST
Lots of code like:

    ASSERT(document);

    Frame* frame = document->frame();
    ASSERT(frame);

    EditCommand* lastEditCommand = frame->editor()->lastEditCommand();
    if (isOpenForMoreTypingCommand(lastEditCommand)) {

is duplicated throughout TypingCommand.
Comment 1 Ryosuke Niwa 2011-12-07 00:18:36 PST
Created attachment 118179 [details]
cleanup
Comment 2 Kent Tamura 2011-12-07 00:29:03 PST
Comment on attachment 118179 [details]
cleanup

Looks good.
Comment 3 Ryosuke Niwa 2011-12-07 00:55:40 PST
Thanks for the review!
Comment 4 Ryosuke Niwa 2011-12-07 01:03:58 PST
Committed r102225: <http://trac.webkit.org/changeset/102225>