WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
169422
Add WKURLSchemeHandler API for handling custom protocols
https://bugs.webkit.org/show_bug.cgi?id=169422
Summary
Add WKURLSchemeHandler API for handling custom protocols
Brady Eidson
Reported
2017-03-09 11:29:06 PST
Add WKURLSchemeHandler API for handling custom protocols
Attachments
Patch
(100.12 KB, patch)
2017-03-09 11:46 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(101.47 KB, patch)
2017-03-09 12:12 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(101.51 KB, patch)
2017-03-09 12:26 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(101.76 KB, patch)
2017-03-09 12:59 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(102.21 KB, patch)
2017-03-09 13:42 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(102.52 KB, patch)
2017-03-09 15:20 PST
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2017-03-09 11:29:14 PST
<
rdar://problem/17190141
>
Brady Eidson
Comment 2
2017-03-09 11:46:09 PST
Created
attachment 303942
[details]
Patch
WebKit Commit Bot
Comment 3
2017-03-09 11:49:01 PST
Attachment 303942
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:431: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:452: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 38 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 4
2017-03-09 11:52:55 PST
Comment on
attachment 303942
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303942&action=review
> Source/WebKit2/Shared/API/APIObject.h:123 > + URLSchemeHandlerTask,
Feels out of place here between the K and the M…
Tim Horton
Comment 5
2017-03-09 12:03:21 PST
Comment on
attachment 303942
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303942&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandler.h:44 > + represented by the url scheme handler task.
should URL in all these comments be capitalized?
> Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp:203 > + RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled by a UIProcess url scheme handler (frame = %p, resourceID = %" PRIu64 ")", resourceLoader.frame(), identifier);
URL url URL url URL
Brady Eidson
Comment 6
2017-03-09 12:06:07 PST
(In reply to
comment #5
)
> Comment on
attachment 303942
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=303942&action=review
> > > Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandler.h:44 > > + represented by the url scheme handler task. > > should URL in all these comments be capitalized?
Probably.
> > > Source/WebKit2/WebProcess/Network/WebLoaderStrategy.cpp:203 > > + RELEASE_LOG_IF_ALLOWED(resourceLoader, "scheduleLoad: URL will be handled by a UIProcess url scheme handler (frame = %p, resourceID = %" PRIu64 ")", resourceLoader.frame(), identifier); > > URL url URL url URL
See above.
Brady Eidson
Comment 7
2017-03-09 12:12:01 PST
Created
attachment 303946
[details]
Patch
WebKit Commit Bot
Comment 8
2017-03-09 12:13:44 PST
Attachment 303946
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:431: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:452: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 9
2017-03-09 12:26:11 PST
Created
attachment 303949
[details]
Patch
WebKit Commit Bot
Comment 10
2017-03-09 12:28:32 PST
Attachment 303949
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:431: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:452: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 11
2017-03-09 12:46:04 PST
Comment on
attachment 303949
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303949&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h:193 > +/* @abstract Returns the currently registered url scheme handler object for the given URL scheme.
tiny URL again.
> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:334 > + configuration->_urlSchemeHandlers.set([self._urlSchemeHandlers mutableCopyWithZone:zone]);
Isn't this a leak?
Brady Eidson
Comment 12
2017-03-09 12:59:49 PST
Created
attachment 303962
[details]
Patch
Brady Eidson
Comment 13
2017-03-09 13:00:55 PST
FWIW, I have a growing set of tests that I will be submitting in
https://bugs.webkit.org/show_bug.cgi?id=169434
WebKit Commit Bot
Comment 14
2017-03-09 13:01:24 PST
Attachment 303962
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:431: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:452: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 15
2017-03-09 13:06:13 PST
Comment on
attachment 303962
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303962&action=review
> Source/WebKit2/UIProcess/WebURLSchemeHandler.h:57 > + uint64_t m_identifier { 1 };
why?
Brady Eidson
Comment 16
2017-03-09 13:20:55 PST
(In reply to
comment #15
)
> Comment on
attachment 303962
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=303962&action=review
> > > Source/WebKit2/UIProcess/WebURLSchemeHandler.h:57 > > + uint64_t m_identifier { 1 }; > > why?
Because if you try to put 0 in a hash table you're gonna have a bad time. (But if your comment is that since we always initialize it in the c'tor with the next identifier so why bother with the default initializer.... good call. I just put the default in there very early on while testing)
Tim Horton
Comment 17
2017-03-09 13:29:46 PST
Comment on
attachment 303962
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303962&action=review
> Source/WebKit2/Shared/API/APIObject.h:123 > + URLSchemeHandlerTask,
As previously noted, this seems out of order in an otherwise sorted list.
> Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm:40 > + if (exceptionType == WebKit::WebURLSchemeHandlerTask::ExceptionType::TaskAlreadyStopped)
Should this be a switch so you catch new enum values?
> Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h:40 > +class WebURLSchemeHandlerTaskProxy {
Do all of your C++ classes want any MAKE_NONCOPYABLE or whatever?
Brady Eidson
Comment 18
2017-03-09 13:36:19 PST
(In reply to
comment #17
)
> Comment on
attachment 303962
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=303962&action=review
> > > Source/WebKit2/Shared/API/APIObject.h:123 > > + URLSchemeHandlerTask, > > As previously noted, this seems out of order in an otherwise sorted list.
Yup, leftover from the rename. Moved.
> > > Source/WebKit2/UIProcess/API/Cocoa/WKURLSchemeHandlerTask.mm:40 > > + if (exceptionType == WebKit::WebURLSchemeHandlerTask::ExceptionType::TaskAlreadyStopped) > > Should this be a switch so you catch new enum values?
Yup.
> > > Source/WebKit2/WebProcess/WebPage/WebURLSchemeHandlerTaskProxy.h:40 > > +class WebURLSchemeHandlerTaskProxy { > > Do all of your C++ classes want any MAKE_NONCOPYABLE or whatever?
Prolly. Thx!
Brady Eidson
Comment 19
2017-03-09 13:42:51 PST
Created
attachment 303981
[details]
Patch
WebKit Commit Bot
Comment 20
2017-03-09 13:44:52 PST
Attachment 303981
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:410: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:431: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:452: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
Brady Eidson
Comment 21
2017-03-09 15:20:29 PST
Created
attachment 303999
[details]
Patch
WebKit Commit Bot
Comment 22
2017-03-09 15:22:41 PST
Attachment 303999
[details]
did not pass style-queue: ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:36: Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:413: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:434: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:455: More than one command on the same line [whitespace/newline] [4] Total errors found: 4 in 39 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 23
2017-03-09 16:38:24 PST
Comment on
attachment 303999
[details]
Patch Clearing flags on attachment: 303999 Committed
r213686
: <
http://trac.webkit.org/changeset/213686
>
WebKit Commit Bot
Comment 24
2017-03-09 16:38:30 PST
All reviewed patches have been landed. Closing bug.
Brady Eidson
Comment 25
2017-03-09 17:00:24 PST
32-bit debug build fix in
https://trac.webkit.org/changeset/213693
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