Title: [227403] branches/safari-605-branch/Source/WebKitLegacy/mac
Revision
227403
Author
jmarc...@apple.com
Date
2018-01-22 22:42:50 -0800 (Mon, 22 Jan 2018)

Log Message

Cherry-pick r227371. rdar://problem/36763183

Modified Paths

Diff

Modified: branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog (227402 => 227403)


--- branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog	2018-01-23 06:42:47 UTC (rev 227402)
+++ branches/safari-605-branch/Source/WebKitLegacy/mac/ChangeLog	2018-01-23 06:42:50 UTC (rev 227403)
@@ -1,5 +1,28 @@
 2018-01-22  Jason Marcell  <jmarc...@apple.com>
 
+        Cherry-pick r227371. rdar://problem/36763183
+
+    2018-01-22  Wenson Hsieh  <wenson_hs...@apple.com>
+
+            WebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElementEnabled state
+            https://bugs.webkit.org/show_bug.cgi?id=181960
+            <rdar://problem/36431678>
+
+            Reviewed by Tim Horton.
+
+            Mail's compose view is initialized via the -initSimpleHTMLDocumentWithStyle: codepath. This is intended to be
+            a fast path for initializing WebViews, which bypasses certain initialization steps present in the regular -init
+            path, such as calling -_preferencesChanged: to sync RuntimeEnabledFeatures with WebPreferences.
+
+            This means that even though we set -[WebPreferences attachmentElementEnabled] to YES for Mail, the value of the
+            RuntimeEnabledFeature isn't updated to match. To fix this, we explicitly invoke
+            RuntimeEnabledFeatures::setAttachmentElementEnabled here to make sure the value is in sync with WebPreferences.
+
+            * WebView/WebView.mm:
+            (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
+
+2018-01-22  Jason Marcell  <jmarc...@apple.com>
+
         Cherry-pick r227282. rdar://problem/36746077
 
     2018-01-21  Ryosuke Niwa  <rn...@webkit.org>

Modified: branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm (227402 => 227403)


--- branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm	2018-01-23 06:42:47 UTC (rev 227402)
+++ branches/safari-605-branch/Source/WebKitLegacy/mac/WebView/WebView.mm	2018-01-23 06:42:50 UTC (rev 227403)
@@ -1759,6 +1759,8 @@
     
     SecurityPolicy::setLocalLoadPolicy(SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData);
     
+    RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled);
+
     return self;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to