Print backgrounds preference should be honored instead of WKWebViewConfiguration...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 19:01:23 +0000 (19:01 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2019 19:01:23 +0000 (19:01 +0000)
commite0feceeaeaaa3bdb7b09f286ba24ef570ff411dd
tree2325315e1d9015dac4871eb65f69344c2e90e5db
parentb90f8fe4a004aab33821000d6be7ed4bd9aa1636
Print backgrounds preference should be honored instead of WKWebViewConfiguration value
https://bugs.webkit.org/show_bug.cgi?id=194364
<rdar://problem/47627599>

Reviewed by Tim Horton.

Without this patch, changing the preference for printing the background has no effect.
This patch fixes that, and I verified it manually by checking "Print backgrounds" in Safari's print menu.
Unfortunately, the only way to test this is actually printing because only values from WebPageProxy::preferences
or WebPageProxy::configuration's preferences are exposed to the API, but values from WebPageProxy::preferencesStore
are used when printing.  Actually printing verifies this change fixes the bug.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm