RESOLVED LATER 98577
Web Intents chromium API modifications to deliver dispatch hint when used w/ modifier keys
https://bugs.webkit.org/show_bug.cgi?id=98577
Summary Web Intents chromium API modifications to deliver dispatch hint when used w/ ...
Rachel Blum
Reported 2012-10-05 17:08:35 PDT
When Web Intents are invoked, the user should be able to give a hint that she wants to bypass the defaulting mechanism. (Currently by pressing Ctrl/Alt)
Attachments
Patch (11.57 KB, patch)
2012-10-05 17:13 PDT, Rachel Blum
no flags
Patch (11.53 KB, patch)
2012-10-08 17:16 PDT, Rachel Blum
no flags
Patch (11.60 KB, patch)
2012-10-08 17:24 PDT, Rachel Blum
no flags
Patch (11.61 KB, patch)
2012-10-16 11:46 PDT, Rachel Blum
no flags
Rachel Blum
Comment 1 2012-10-05 17:13:38 PDT
WebKit Review Bot
Comment 2 2012-10-05 17:17:01 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Darin Fisher (:fishd, Google)
Comment 3 2012-10-08 09:28:18 PDT
Comment on attachment 167419 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167419&action=review > Source/WebKit/chromium/public/WebFrameClient.h:396 > + virtual void dispatchIntent(WebFrame*, const WebIntentRequest&, WebKit::WebIntentDispatchHint) { } nit: no need for the WebKit:: prefix here > Source/WebKit/chromium/public/WebIntentDispatchHint.h:36 > +enum WebIntentDispatchHint { nit: I'm might recommend using the term "Disposition" here. enum WebIntentDisposition { WebIntentDispositionNormal, WebIntentDispositionBypassDefault }; Note: I would have liked to have used the name WebIntentDispositionDefault for the first value, but that would be confusing given the name of the second. The "Default" suffix is a very nice clue to the reader that this is the default value for an option. Is there another name for the second value that we could use instead? What about "ForcePicker"? > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:1637 > + int modifiers = WebViewImpl::currentInputEvent()->modifiers & WebInputEvent::InputModifiers; are you sure that currentInputEvent() is always non-null here? > Tools/ChangeLog:8 > + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). You need to delete this line or replace it with additional information about the change. > Tools/DumpRenderTree/chromium/WebViewHost.cpp:1422 > +void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& request, WebKit::WebIntentDispatchHint hint) nit: no WebKit:: prefix > Tools/DumpRenderTree/chromium/WebViewHost.cpp:1449 > + if (hint) oops > Tools/DumpRenderTree/chromium/WebViewHost.h:275 > + virtual void dispatchIntent(WebKit::WebFrame*, const WebKit::WebIntentRequest&, WebKit::WebIntentDispatchHint); nit: no WebKit:: prefix
Rachel Blum
Comment 4 2012-10-08 17:16:08 PDT
Rachel Blum
Comment 5 2012-10-08 17:24:54 PDT
Rachel Blum
Comment 6 2012-10-08 17:26:24 PDT
Comment on attachment 167419 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167419&action=review >> Source/WebKit/chromium/public/WebFrameClient.h:396 >> + virtual void dispatchIntent(WebFrame*, const WebIntentRequest&, WebKit::WebIntentDispatchHint) { } > > nit: no need for the WebKit:: prefix here Done. >> Source/WebKit/chromium/public/WebIntentDispatchHint.h:36 >> +enum WebIntentDispatchHint { > > nit: I'm might recommend using the term "Disposition" here. > > enum WebIntentDisposition { > WebIntentDispositionNormal, > WebIntentDispositionBypassDefault > }; > > Note: I would have liked to have used the name WebIntentDispositionDefault > for the first value, but that would be confusing given the name of the > second. The "Default" suffix is a very nice clue to the reader that this > is the default value for an option. Is there another name for the second > value that we could use instead? What about "ForcePicker"? Disposition is an already used term in WebIntents, with a slightly different meaning. ("Where is the content opened" as opposed to "what opens the content"). Going with "Selection" instead, plus hopefully a bit more clarity on the value names >> Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:1637 >> + int modifiers = WebViewImpl::currentInputEvent()->modifiers & WebInputEvent::InputModifiers; > > are you sure that currentInputEvent() is always non-null here? Added check >> Tools/ChangeLog:8 >> + Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!). > > You need to delete this line or replace it with additional information about the change. Done >> Tools/DumpRenderTree/chromium/WebViewHost.cpp:1449 >> + if (hint) > > oops Why oops? If you refer to the if itself, that's intentional, as to not break existing expectations when no hint is specified. Or am I missing something? >> Tools/DumpRenderTree/chromium/WebViewHost.h:275 >> + virtual void dispatchIntent(WebKit::WebFrame*, const WebKit::WebIntentRequest&, WebKit::WebIntentDispatchHint); > > nit: no WebKit:: prefix Looking at the rest of the header, it definitely looks like WebKit:: is required here :)
Darin Fisher (:fishd, Google)
Comment 7 2012-10-13 20:37:57 PDT
Comment on attachment 167657 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=167657&action=review > Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp:1641 > + if (modifiers == (WebInputEvent::ControlKey | WebInputEvent::AltKey)) This seems to be saying that both Control and Alt keys must be pressed. I think we usually avoid keyboard shortcuts that pair Control and Alt. See explanation here: http://blogs.msdn.com/b/oldnewthing/archive/2004/03/29/101121.aspx Maybe it would be enough to just test for either Control or Alt? > Tools/DumpRenderTree/chromium/WebViewHost.cpp:1449 > + if (hint) nit: need to delete this printf
Rachel Blum
Comment 8 2012-10-16 11:46:44 PDT
Rachel Blum
Comment 9 2012-10-16 11:48:44 PDT
(In reply to comment #8) > Created an attachment (id=168990) [details] > Patch Switch to Ctrl-Shift printf is part of DRT testing.
Rachel Blum
Comment 10 2012-10-18 18:16:47 PDT
Closed for now - waiting until this gets revisited
Eric Seidel (no email)
Comment 11 2013-01-04 00:50:23 PST
Comment on attachment 167419 [details] Patch Cleared review? from obsolete attachment 167419 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Eric Seidel (no email)
Comment 12 2013-01-04 00:50:49 PST
Comment on attachment 168990 [details] Patch Cleared review? from attachment 168990 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.