Title: [241163] branches/safari-607-branch/Source/WebKit
Revision
241163
Author
[email protected]
Date
2019-02-07 15:37:13 -0800 (Thu, 07 Feb 2019)

Log Message

Cherry-pick r241131. rdar://problem/47893578

    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

Modified Paths

Diff

Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (241162 => 241163)


--- branches/safari-607-branch/Source/WebKit/ChangeLog	2019-02-07 23:37:10 UTC (rev 241162)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog	2019-02-07 23:37:13 UTC (rev 241163)
@@ -1,5 +1,45 @@
 2019-02-07  Alan Coon  <[email protected]>
 
+        Cherry-pick r241131. rdar://problem/47893578
+
+    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
+
+    2019-02-07  Alex Christensen  <[email protected]>
+
+            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:]):
+
+2019-02-07  Alan Coon  <[email protected]>
+
         Cherry-pick r241124. rdar://problem/47893586
 
     Shrink and hyphenate safe browsing warning text on watchOS

Modified: branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (241162 => 241163)


--- branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-02-07 23:37:10 UTC (rev 241162)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm	2019-02-07 23:37:13 UTC (rev 241163)
@@ -582,7 +582,10 @@
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::suppressesIncrementalRenderingKey(), WebKit::WebPreferencesStore::Value(!![_configuration suppressesIncrementalRendering]));
 
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldRespectImageOrientationKey(), WebKit::WebPreferencesStore::Value(!![_configuration _respectsImageOrientation]));
+#if !PLATFORM(MAC)
+    // FIXME: Expose WKPreferences._shouldPrintBackgrounds on iOS, adopt it in all iOS clients, and remove this and WKWebViewConfiguration._printsBackgrounds.
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldPrintBackgroundsKey(), WebKit::WebPreferencesStore::Value(!![_configuration _printsBackgrounds]));
+#endif
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::incrementalRenderingSuppressionTimeoutKey(), WebKit::WebPreferencesStore::Value([_configuration _incrementalRenderingSuppressionTimeout]));
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::_javascript_MarkupEnabledKey(), WebKit::WebPreferencesStore::Value(!![_configuration _allowsJavaScriptMarkup]));
     pageConfiguration->preferenceValues().set(WebKit::WebPreferencesKey::shouldConvertPositionStyleOnCopyKey(), WebKit::WebPreferencesStore::Value(!![_configuration _convertsPositionStyleOnCopy]));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to