Bug 178429

Summary: Expand r209943 to suppress paste during provisional navigation as well
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: 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 Flags
Patch
none
Patch none

Tim Horton
Reported 2017-10-17 23:44:47 PDT
Expand r209943 to suppress paste during provisional navigation as well
Attachments
Patch (18.78 KB, patch)
2017-10-17 23:45 PDT, Tim Horton
no flags
Patch (34.28 KB, patch)
2017-10-18 16:30 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2017-10-17 23:45:09 PDT
Sam Weinig
Comment 2 2017-10-18 02:25:31 PDT
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.
Sam Weinig
Comment 3 2017-10-18 05:26:22 PDT
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?
Sam Weinig
Comment 4 2017-10-18 05:28:24 PDT
(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).
Tim Horton
Comment 5 2017-10-18 10:47:16 PDT
(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.
Tim Horton
Comment 6 2017-10-18 16:30:39 PDT
WebKit Commit Bot
Comment 7 2017-10-19 13:43:45 PDT
Comment on attachment 324181 [details] Patch Clearing flags on attachment: 324181 Committed r223708: <https://trac.webkit.org/changeset/223708>
WebKit Commit Bot
Comment 8 2017-10-19 13:43:46 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2017-11-15 13:03:57 PST
Note You need to log in before you can comment on or make changes to this bug.