Summary: | Expand r209943 to suppress paste during provisional navigation as well | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||
Component: | New Bugs | Assignee: | Tim Horton <thorton> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | aestes, bfulgham, commit-queue, dbates, dino, sam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Tim Horton
2017-10-17 23:44:47 PDT
Created attachment 324101 [details]
Patch
Comment on attachment 324101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324101&action=review > Source/WebCore/editing/Editor.cpp:459 > + if (m_frame.mainFrame().loader().shouldSuppressKeyboardInput()) > + return false; Given that paste can be triggered from something that isn't the keyboard, this seems like a weird check here. That probably implies shouldSuppressKeyboardInput() needs a better name to indicate what it really wants. Comment on attachment 324101 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=324101&action=review >> Source/WebCore/editing/Editor.cpp:459 >> + return false; > > Given that paste can be triggered from something that isn't the keyboard, this seems like a weird check here. That probably implies shouldSuppressKeyboardInput() needs a better name to indicate what it really wants. Also, I think canPaste() gets called after we dispatch the paste events. Perhaps a better place for this would be in EditorCommands.cpp in enabledPaste? (In reply to Sam Weinig from comment #3) > Also, I think canPaste() gets called after we dispatch the paste events. > Perhaps a better place for this would be in EditorCommands.cpp in > enabledPaste? Ha, enabledPaste just calls canPaste() :). So it looks like it probably does block the paste events (but perhaps you should add a test for it). (In reply to Sam Weinig from comment #2) > Comment on attachment 324101 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=324101&action=review > > > Source/WebCore/editing/Editor.cpp:459 > > + if (m_frame.mainFrame().loader().shouldSuppressKeyboardInput()) > > + return false; > > Given that paste can be triggered from something that isn't the keyboard, > this seems like a weird check here. That probably implies > shouldSuppressKeyboardInput() needs a better name to indicate what it really > wants. Yes, that is true. (In reply to Sam Weinig from comment #4) > Ha, enabledPaste just calls canPaste() :). So it looks like it probably > does block the paste events (but perhaps you should add a test for it). I'll add that to the existing test. Created attachment 324181 [details]
Patch
Comment on attachment 324181 [details] Patch Clearing flags on attachment: 324181 Committed r223708: <https://trac.webkit.org/changeset/223708> All reviewed patches have been landed. Closing bug. |