Skip to content
Permalink
Browse files
WebView._preferencesChanged should apply colorFilterEnabled preferenc…
…e before parsing user stylesheet

https://bugs.webkit.org/show_bug.cgi?id=185815
<rdar://problem/40310069>

Reviewed by Simon Fraser.

User stylesheet parsing may depend on the colorFilterEnabled preference.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):


Canonical link: https://commits.webkit.org/201275@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
anttijk committed May 21, 2018
1 parent df31166 commit 2a5112cb544754dc83c40736b9b7557c5faa19f0
Showing with 15 additions and 1 deletion.
  1. +13 −0 Source/WebKitLegacy/mac/ChangeLog
  2. +2 −1 Source/WebKitLegacy/mac/WebView/WebView.mm
@@ -1,3 +1,16 @@
2018-05-21 Antti Koivisto <antti@apple.com>

WebView._preferencesChanged should apply colorFilterEnabled preference before parsing user stylesheet
https://bugs.webkit.org/show_bug.cgi?id=185815
<rdar://problem/40310069>

Reviewed by Simon Fraser.

User stylesheet parsing may depend on the colorFilterEnabled preference.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

2018-05-18 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r231982.
@@ -2952,6 +2952,7 @@ - (void)_preferencesChanged:(WebPreferences *)preferences

settings.setPlugInSnapshottingEnabled([preferences plugInSnapshottingEnabled]);
settings.setHttpEquivEnabled([preferences httpEquivEnabled]);
settings.setColorFilterEnabled([preferences colorFilterEnabled]);

#if PLATFORM(MAC)
settings.setAcceleratedCompositingForFixedPositionEnabled(true);
@@ -2992,6 +2993,7 @@ - (void)_preferencesChanged:(WebPreferences *)preferences
#endif // PLATFORM(IOS)

#if PLATFORM(MAC)
// This parses the user stylesheet synchronously so anything that may affect it should be done first.
if ([preferences userStyleSheetEnabled]) {
NSString* location = [[preferences userStyleSheetLocation] _web_originalDataAsString];
if ([location isEqualToString:@"apple-dashboard://stylesheet"])
@@ -3061,7 +3063,6 @@ - (void)_preferencesChanged:(WebPreferences *)preferences

settings.setViewportFitEnabled([preferences viewportFitEnabled]);
settings.setConstantPropertiesEnabled([preferences constantPropertiesEnabled]);
settings.setColorFilterEnabled([preferences colorFilterEnabled]);
settings.setCrossOriginOptionsSupportEnabled([preferences crossOriginOptionsSupportEnabled]);

#if ENABLE(GAMEPAD)

0 comments on commit 2a5112c

Please sign in to comment.