Bug 74337 - WebKit code shouldn't be calling applyCommand directly
Summary: WebKit code shouldn't be calling applyCommand directly
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: 74249
  Show dependency treegraph
 
Reported: 2011-12-12 14:28 PST by Ryosuke Niwa
Modified: 2011-12-12 14:53 PST (History)
5 users (show)

See Also:


Attachments
cleanup (12.86 KB, patch)
2011-12-12 14:36 PST, Ryosuke Niwa
darin: 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-12 14:28:20 PST
CompositeEditCommands are implementation-details in WebCore and shouldn't be exposed to WebKit layer.
Comment 1 Ryosuke Niwa 2011-12-12 14:36:26 PST
Created attachment 118851 [details]
cleanup
Comment 2 Darin Adler 2011-12-12 14:41:52 PST
Comment on attachment 118851 [details]
cleanup

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

> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2246
> +    bool selectReplacement = true;
> +    bool smartReplace = 0;
> +    return frame->editor()->replaceSelectionWithText(text, selectReplacement, smartReplace);

We should change this to flags or enums, longer term. Also, we should use false instead of 0.
Comment 3 Ryosuke Niwa 2011-12-12 14:48:45 PST
Comment on attachment 118851 [details]
cleanup

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

Thanks for the review!

>> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:2246
>> +    return frame->editor()->replaceSelectionWithText(text, selectReplacement, smartReplace);
> 
> We should change this to flags or enums, longer term. Also, we should use false instead of 0.

Oops, 0 was my mistake. Will fix.

> Source/WebKit/chromium/src/WebFrameImpl.cpp:1125
> +    bool selectReplacement = true;

Oops, this should be false also. Will fix before landing it.
Comment 4 Ryosuke Niwa 2011-12-12 14:53:39 PST
Committed r102627: <http://trac.webkit.org/changeset/102627>