Bug 74337

Summary: WebKit code shouldn't be calling applyCommand directly
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: HTML EditingAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, dcheng, enrica, mrobinson, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 74249    
Attachments:
Description Flags
cleanup darin: review+

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>