[webkit-reviews] review granted: [Bug 208575] Add an SPI to allow UserStyleSheet injection to target a specific WKWebView : [Attachment 392433] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 4 10:55:15 PST 2020


Brady Eidson <beidson at apple.com> has granted Antoine Quint
<graouts at apple.com>'s request for review:
Bug 208575: Add an SPI to allow UserStyleSheet injection to target a specific
WKWebView
https://bugs.webkit.org/show_bug.cgi?id=208575

Attachment 392433: Patch

https://bugs.webkit.org/attachment.cgi?id=392433&action=review




--- Comment #5 from Brady Eidson <beidson at apple.com> ---
Comment on attachment 392433
  --> https://bugs.webkit.org/attachment.cgi?id=392433
Patch

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

> Source/WebKit/UIProcess/API/Cocoa/_WKUserStyleSheet.mm:53
> +- (instancetype)initWithSource:(NSString *)source forWKWebView:(WKWebView
*)webView forMainFrameOnly:(BOOL)forMainFrameOnly 
userContentWorld:(_WKUserContentWorld *)userContentWorld

Extra space here too

>> Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp:457
>> +		    page->injectUserStyleSheet(userStyleSheet);
> 
> Why do we need a separate way to inject a stylesheet?  Can't we just use the
existing way, but if there is a page id and it's different than the current
page id, do nothing?

I know the answer - WebCore page's don't know their page id, so the page id
check has to be up in WebKit.


More information about the webkit-reviews mailing list