WebKit Bugzilla
Attachment 361088 Details for
Bug 194230
: Can't temporarily force light or dark appearance on a page in a WebView
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194230-20190204130457.patch (text/plain), 2.20 KB, created by
Timothy Hatcher
on 2019-02-04 13:04:57 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Timothy Hatcher
Created:
2019-02-04 13:04:57 PST
Size:
2.20 KB
patch
obsolete
>Subversion Revision: 240798 >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index b5cbcd383b0fea7b814eab8174c2ab7621ba095c..f5657fb1bfd41d312365bb621cf47f2cbe36a058 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,15 @@ >+2019-02-04 Timothy Hatcher <timothy@apple.com> >+ >+ Add WebView SPI to temporarily force light or dark appearance on a page. >+ https://bugs.webkit.org/show_bug.cgi?id=194230 >+ >+ Reviewed by Tim Horton. >+ >+ * WebView/WebView.mm: >+ (-[WebView _useDarkAppearance:]): Added. >+ (-[WebView _setUseDarkAppearance:]): Added. >+ * WebView/WebViewPrivate.h: >+ > 2019-01-28 Devin Rousso <drousso@apple.com> > > Web Inspector: provide a way to edit page WebRTC settings on a remote target >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 663093439161d2848e5d29e6fd9568918e8d852d..e6c482b6d8f69410079c5feb71ca367917133b80 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -2487,6 +2487,20 @@ - (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request > return newWindowWebView; > } > >+- (BOOL)_useDarkAppearance >+{ >+ if (!_private || !_private->page) >+ return NO; >+ return _private->page->useDarkAppearance(); >+} >+ >+- (void)_setUseDarkAppearance:(BOOL)useDarkAppearance >+{ >+ if (!_private || !_private->page) >+ return; >+ _private->page->setUseDarkAppearance(useDarkAppearance); >+} >+ > + (void)_setIconLoadingEnabled:(BOOL)enabled > { > iconLoadingEnabled = enabled; >diff --git a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >index 299fe677f2a7a6bdb3632e3b55f8f46cccfac9c8..c25ee83b432b735f7e8318aa0f5645a244efa83b 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >+++ b/Source/WebKitLegacy/mac/WebView/WebViewPrivate.h >@@ -322,6 +322,8 @@ typedef enum { > + (void)_setIconLoadingEnabled:(BOOL)enabled; > + (BOOL)_isIconLoadingEnabled; > >+@property (nonatomic, assign, setter=_setUseDarkAppearance:) BOOL _useDarkAppearance; >+ > - (WebInspector *)inspector; > > #if ENABLE_REMOTE_INSPECTOR
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194230
:
361075
| 361088