Summary: | Implement "Use Selection for Find" in WebKit2 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Maciej Stachowiak <mjs> | ||||||||
Component: | New Bugs | Assignee: | Maciej Stachowiak <mjs> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | eric | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Other | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Maciej Stachowiak
2010-12-09 00:38:16 PST
Created attachment 76022 [details]
Patch
Comment on attachment 76022 [details]
Patch
Does it makes sense to move WebKit1 over to using this as well?
(In reply to comment #2) > Does it makes sense to move WebKit1 over to using this as well? I thought about it, but I'm not sure that would simplify the WebKit Classic implementation overall. It doesn't benefit much from being able to reuse editor command machinery, which in the WebKit2 case handles the magic of asynchronous menu validation. Created attachment 76024 [details]
Patch
Comment on attachment 76024 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=76024&action=review r=me if you change enabledCopy to enabledTake… > WebCore/editing/EditorCommand.cpp:1510 > + { "TakeFindStringFromSelection", { executeTakeFindStringFromSelection, supportedFromMenuOrKeyBinding, enabledCopy, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } }, I think you meant to use enabledTakeFindFromSelection here, not enabledCopy. > WebCore/editing/mac/EditorMac.mm:200 > + systemBeep(); Not sure it’s better to call the cross-platform function here, since this is Mac code, and you can just NSBeep() without incurring the #import cost. > WebCore/editing/mac/EditorMac.mm:204 > + NSString* nsSelectedText = m_frame->displayStringModifiedByEncoding(selectedText()); Misplaced star. Created attachment 76026 [details]
Patch
Attachment 76024 [details] did not build on mac: Build output: http://queues.webkit.org/results/6955005 Comment on attachment 76026 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=76026&action=review > WebCore/editing/mac/EditorMac.mm:204 > + NSString* nsSelectedText = m_frame->displayStringModifiedByEncoding(selectedText()); Should be NSString *nsSelectedText Committed r73621: <http://trac.webkit.org/changeset/73621> |