Bug 155219 - Add a baseURL parameter to _WKUserStyleSheet
Summary: Add a baseURL parameter to _WKUserStyleSheet
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on: 155317
Blocks: 155488
  Show dependency treegraph
 
Reported: 2016-03-08 21:57 PST by Sam Weinig
Modified: 2016-03-15 03:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (112.13 KB, patch)
2016-03-09 15:59 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (111.47 KB, patch)
2016-03-09 17:55 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (111.87 KB, patch)
2016-03-10 09:30 PST, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (113.00 KB, patch)
2016-03-14 12:47 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (113.04 KB, patch)
2016-03-14 12:59 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (113.50 KB, patch)
2016-03-14 13:33 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (113.59 KB, patch)
2016-03-14 16:10 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (114.37 KB, patch)
2016-03-14 16:56 PDT, Sam Weinig
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2016-03-08 21:57:29 PST
Add a baseURL parameter to _WKUserStyleSheet
Comment 1 Jessie Berlin 2016-03-09 14:11:51 PST
rdar://problem/24932574
Comment 2 Sam Weinig 2016-03-09 15:59:51 PST
Created attachment 273499 [details]
Patch
Comment 3 WebKit Commit Bot 2016-03-09 16:02:12 PST
Attachment 273499 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:400:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:408:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebCore/page/UserContentController.h:63:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/page/UserContentController.h:64:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/loader/EmptyClients.cpp:106:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/page/UserContentProvider.h:81:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.h:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5208:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5215:  Missing space before {  [whitespace/braces] [5]
Total errors found: 13 in 42 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Sam Weinig 2016-03-09 17:55:59 PST
Created attachment 273522 [details]
Patch
Comment 5 WebKit Commit Bot 2016-03-09 17:58:51 PST
Attachment 273522 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:400:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:408:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebCore/page/UserContentController.h:63:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/page/UserContentController.h:64:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/loader/EmptyClients.cpp:106:  "virtual" is redundant since function is already declared as "override"  [readability/inheritance] [4]
ERROR: Source/WebCore/page/UserContentProvider.h:81:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.h:41:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5212:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5219:  Missing space before {  [whitespace/braces] [5]
Total errors found: 13 in 42 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Tim Horton 2016-03-09 19:24:57 PST
Comment on attachment 273522 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=273522&action=review

Seems pretty reasonable. Needs an API test. And a bunch of build fixes.

> Source/WebCore/page/UserMessageHandlersNamespace.cpp:-60
> -    const auto* userMessageHandlerDescriptors = userContentController->userMessageHandlerDescriptors();

We use this map again further down, this is why the build is broken. At least, one of the reasons.

> Source/WebKit2/WebProcess/UserContent/WebUserContentController.h:41
> +    class CompiledContentExtension;

unindent
Comment 7 Sam Weinig 2016-03-10 09:30:41 PST
Created attachment 273575 [details]
Patch
Comment 8 WebKit Commit Bot 2016-03-10 09:33:17 PST
Attachment 273575 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5220:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 42 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 Sam Weinig 2016-03-10 10:24:37 PST
Committed r197943: <http://trac.webkit.org/changeset/197943>
Comment 10 Ryan Haddad 2016-03-10 11:44:49 PST
This change appears to have broken the Windows build
<https://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/76263>

C:\cygwin\home\buildbot\slave\win-release\build\Source\WebKit\win\WebView.cpp(2942): error C2039: 'userContentController': is not a member of 'WebCore::PageConfiguration' [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebKit\WebKit.vcxproj]
  C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\DerivedSources\ForwardingHeaders\WebCore/PageConfiguration.h(59): note: see declaration of 'WebCore::PageConfiguration'
C:\cygwin\home\buildbot\slave\win-release\build\Source\WebKit\win\WebView.cpp(3862): error C2039: 'setUserContentController': is not a member of 'WebCore::Page' [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebKit\WebKit.vcxproj]
  c:\cygwin\home\buildbot\slave\win-release\build\webkitbuild\release\derivedsources\forwardingheaders\webcore\UserContentProvider.h(48): note: see declaration of 'WebCore::Page'
Comment 11 WebKit Commit Bot 2016-03-10 12:27:59 PST
Re-opened since this is blocked by bug 155317
Comment 12 Sam Weinig 2016-03-14 12:47:01 PDT
Created attachment 274002 [details]
Patch
Comment 13 WebKit Commit Bot 2016-03-14 12:49:59 PDT
Attachment 274002 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5234:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 43 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Sam Weinig 2016-03-14 12:59:46 PDT
Created attachment 274006 [details]
Patch
Comment 15 WebKit Commit Bot 2016-03-14 13:01:56 PDT
Attachment 274006 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5234:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 43 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Sam Weinig 2016-03-14 13:33:44 PDT
Created attachment 274012 [details]
Patch
Comment 17 WebKit Commit Bot 2016-03-14 13:36:21 PDT
Attachment 274012 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5234:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 Sam Weinig 2016-03-14 16:10:50 PDT
Created attachment 274046 [details]
Patch
Comment 19 WebKit Commit Bot 2016-03-14 16:13:54 PDT
Attachment 274046 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5234:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 20 Sam Weinig 2016-03-14 16:56:25 PDT
Created attachment 274054 [details]
Patch
Comment 21 WebKit Commit Bot 2016-03-14 16:58:13 PDT
Attachment 274054 [details] did not pass style-queue:


ERROR: Source/WebCore/page/UserContentController.cpp:75:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebCore/page/UserContentController.cpp:102:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:410:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:418:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:305:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp:353:  More than one command on the same line  [whitespace/newline] [4]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5227:  Missing space before {  [whitespace/braces] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.cpp:5234:  Missing space before {  [whitespace/braces] [5]
Total errors found: 8 in 45 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 22 Sam Weinig 2016-03-14 17:48:24 PDT
Committed r198180: <http://trac.webkit.org/changeset/198180>
Comment 23 Gyuyoung Kim 2016-03-15 03:40:01 PDT
(In reply to comment #22)
> Committed r198180: <http://trac.webkit.org/changeset/198180>

r198180 broke EFL build. I fix it in Bug 155488.