WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
86791
Add suggestions field to web intents API.
https://bugs.webkit.org/show_bug.cgi?id=86791
Summary
Add suggestions field to web intents API.
Greg Billock
Reported
2012-05-17 17:36:32 PDT
Add suggestions field to web intents API.
Attachments
Patch
(8.28 KB, patch)
2012-05-17 17:38 PDT
,
Greg Billock
no flags
Details
Formatted Diff
Diff
Patch
(8.55 KB, patch)
2012-05-18 12:51 PDT
,
Greg Billock
no flags
Details
Formatted Diff
Diff
Patch
(12.62 KB, patch)
2012-05-18 15:30 PDT
,
Greg Billock
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Greg Billock
Comment 1
2012-05-17 17:38:28 PDT
Created
attachment 142593
[details]
Patch
WebKit Review Bot
Comment 2
2012-05-17 17:42:44 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
.
Adam Barth
Comment 3
2012-05-17 18:08:54 PDT
Comment on
attachment 142593
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142593&action=review
Tests?
> Source/WebCore/Modules/intents/DeliveredIntent.cpp:52 > + : Intent(action, type, data, PassOwnPtr<MessagePortChannelArray>(), extras, KURL(), WTF::Vector<KURL>())
WTF::Vector -> Vector Vector.h has a "using" declaration in it.
> Source/WebCore/Modules/intents/Intent.cpp:56 > WTF::HashMap<String, String> extras; > KURL serviceUrl; > + WTF::Vector<KURL> suggestions;
These WTF prefixes aren't needed.
> Source/WebCore/Modules/intents/Intent.cpp:110 > + for (HashSet<AtomicString>::iterator iter = suggestionsStrings.begin(); > + iter != suggestionsStrings.end(); ++iter) {
You can put this on one line.
> Source/WebCore/Modules/intents/Intent.cpp:111 > + KURL suggestionURL = KURL(KURL(), *iter);
This is unlikely to be correct. Do you mean to resolve these URLs relative to some base URL? One approach is to add a [CallWith=ScriptExectionContext] to the IDL and to use that script execution to resolve the URL.
> Source/WebCore/Modules/intents/Intent.cpp:114 > + ec = SYNTAX_ERR; > + return 0;
Four-space indent.
> Source/WebCore/Modules/intents/Intent.cpp:116 > + suggestions.append(suggestionURL);
suggestionURL -> suggestedURL ?
Adam Barth
Comment 4
2012-05-17 18:09:44 PDT
Comment on
attachment 142593
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142593&action=review
> Source/WebCore/Modules/intents/Intent.cpp:55 > KURL serviceUrl;
Random style nit: serviceUrl should be serviceURL
Greg Billock
Comment 5
2012-05-18 12:49:01 PDT
Comment on
attachment 142593
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142593&action=review
>> Source/WebCore/Modules/intents/DeliveredIntent.cpp:52 >> + : Intent(action, type, data, PassOwnPtr<MessagePortChannelArray>(), extras, KURL(), WTF::Vector<KURL>()) > > WTF::Vector -> Vector > > Vector.h has a "using" declaration in it.
Done.
>> Source/WebCore/Modules/intents/Intent.cpp:55 >> KURL serviceUrl; > > Random style nit: serviceUrl should be serviceURL
Done.
>> Source/WebCore/Modules/intents/Intent.cpp:56 >> + WTF::Vector<KURL> suggestions; > > These WTF prefixes aren't needed.
Done.
>> Source/WebCore/Modules/intents/Intent.cpp:110 >> + iter != suggestionsStrings.end(); ++iter) { > > You can put this on one line.
Done.
>> Source/WebCore/Modules/intents/Intent.cpp:111 >> + KURL suggestionURL = KURL(KURL(), *iter); > > This is unlikely to be correct. Do you mean to resolve these URLs relative to some base URL? One approach is to add a [CallWith=ScriptExectionContext] to the IDL and to use that script execution to resolve the URL.
No, they're supposed to be absolute urls. (That's why I check validity after this.)
>> Source/WebCore/Modules/intents/Intent.cpp:114 >> + return 0; > > Four-space indent.
Oops! Fixed.
>> Source/WebCore/Modules/intents/Intent.cpp:116 >> + suggestions.append(suggestionURL); > > suggestionURL -> suggestedURL ?
Done.
Greg Billock
Comment 6
2012-05-18 12:51:09 PDT
Created
attachment 142766
[details]
Patch
Adam Barth
Comment 7
2012-05-18 12:54:05 PDT
Comment on
attachment 142766
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142766&action=review
> Source/WebCore/Modules/intents/Intent.cpp:107 > + WTF::HashSet<AtomicString> suggestionsStrings; > + WTF::Vector<KURL> suggestions;
I meant that you can drop the WTF prefixes everywhere. :)
Greg Billock
Comment 8
2012-05-18 13:24:24 PDT
Comment on
attachment 142766
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=142766&action=review
>> Source/WebCore/Modules/intents/Intent.cpp:107 >> + WTF::Vector<KURL> suggestions; > > I meant that you can drop the WTF prefixes everywhere. :)
Gah. I got most of them, but not these. Removing.
Greg Billock
Comment 9
2012-05-18 15:30:42 PDT
Created
attachment 142796
[details]
Patch
Greg Billock
Comment 10
2012-05-18 15:44:20 PDT
(In reply to
comment #9
)
> Created an attachment (id=142796) [details] > Patch
This adds the test as well.
Adam Barth
Comment 11
2012-05-20 15:50:29 PDT
Thanks!
WebKit Review Bot
Comment 12
2012-05-21 09:23:20 PDT
Comment on
attachment 142796
[details]
Patch Clearing flags on attachment: 142796 Committed
r117793
: <
http://trac.webkit.org/changeset/117793
>
WebKit Review Bot
Comment 13
2012-05-21 09:23:25 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug