WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225615
Promote `-[WKWebView _pageExtendedBackgroundColor]` SPI to `-[WKWebView underPageBackgroundColor]` API
https://bugs.webkit.org/show_bug.cgi?id=225615
Summary
Promote `-[WKWebView _pageExtendedBackgroundColor]` SPI to `-[WKWebView under...
Devin Rousso
Reported
2021-05-10 14:32:37 PDT
.
Attachments
Patch
(71.43 KB, patch)
2021-05-10 15:02 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(71.00 KB, patch)
2021-05-10 18:40 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Patch] logging for EWS
(76.05 KB, patch)
2021-05-11 12:28 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Patch] logging for EWS
(76.91 KB, patch)
2021-05-11 16:19 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Patch] logging for EWS
(75.30 KB, patch)
2021-05-11 20:45 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
[Patch] logging for EWS
(76.27 KB, patch)
2021-05-12 00:51 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(72.28 KB, patch)
2021-05-12 11:32 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(74.12 KB, patch)
2021-05-14 13:44 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2021-05-10 14:32:55 PDT
<
rdar://problem/76568094
>
Devin Rousso
Comment 2
2021-05-10 15:02:01 PDT
Created
attachment 428209
[details]
Patch
Wenson Hsieh
Comment 3
2021-05-10 16:46:40 PDT
Comment on
attachment 428209
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=428209&action=review
> Source/WebCore/page/Page.cpp:2577 > + if (auto* frameView = mainFrame().view()) { > + if (auto* renderView = frameView->renderView()) {
Nit - `if (auto … = makeRefPtr(…))`
> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 > + return webView.underPageBackgroundColor.CGColor;
We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`.
> Source/WebKit/UIProcess/WebPageProxy.cpp:8622 > +#if !PLATFORM(MAC) && !PLATFORM(IOS_FAMILY)
Nit - !PLATFORM(COCOA)?
> Source/WebKit/UIProcess/WebPageProxy.h:2661 > + bool m_pendingUnderPageBackgroundColorOverrideToDispatch { false };
Nit - m_hasPendingUnderPageBackgroundColorOverrideToDispatch? (The current name makes it sound like it should be a `Color` or `Optional<Color>`)
Devin Rousso
Comment 4
2021-05-10 16:57:14 PDT
Comment on
attachment 428209
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=428209&action=review
>> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 >> + return webView.underPageBackgroundColor.CGColor; > > We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`.
Is it ever actually possible for a `WKWebView` to not have a `_page`?
Wenson Hsieh
Comment 5
2021-05-10 17:04:49 PDT
Comment on
attachment 428209
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=428209&action=review
>>> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:493 >>> + return webView.underPageBackgroundColor.CGColor; >> >> We seem to have lost the null check for `webView->_page` here, since `-underPageBackgroundColor` dereferences `_page`. > > Is it ever actually possible for a `WKWebView` to not have a `_page`?
`_page` is set very early on when initializing the web view, but it might be theoretically possible for a WebKit client to call into API that requires `_page` before this happens... Potentially something like trying to `-setBackgroundColor` before calling into the superclass initializer?
Devin Rousso
Comment 6
2021-05-10 18:40:08 PDT
Created
attachment 428234
[details]
Patch
Devin Rousso
Comment 7
2021-05-11 12:28:34 PDT
Created
attachment 428306
[details]
[Patch] logging for EWS
Devin Rousso
Comment 8
2021-05-11 16:19:23 PDT
Created
attachment 428326
[details]
[Patch] logging for EWS
Devin Rousso
Comment 9
2021-05-11 20:45:34 PDT
Created
attachment 428339
[details]
[Patch] logging for EWS
Devin Rousso
Comment 10
2021-05-12 00:51:59 PDT
Created
attachment 428352
[details]
[Patch] logging for EWS
Devin Rousso
Comment 11
2021-05-12 11:32:20 PDT
Created
attachment 428391
[details]
Patch
EWS
Comment 12
2021-05-14 13:35:33 PDT
Tools/Scripts/svn-apply failed to apply
attachment 428391
[details]
to trunk. Please resolve the conflicts and upload a new patch.
Devin Rousso
Comment 13
2021-05-14 13:44:49 PDT
Created
attachment 428651
[details]
Patch
EWS
Comment 14
2021-05-14 14:34:54 PDT
Committed
r277505
(
237736@main
): <
https://commits.webkit.org/237736@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 428651
[details]
.
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