Title: [200323] trunk/Source
Revision
200323
Author
[email protected]
Date
2016-05-02 09:15:57 -0700 (Mon, 02 May 2016)

Log Message

CSP: Add workaround for XtraMath
https://bugs.webkit.org/show_bug.cgi?id=157252

Reviewed by Andy Estes.

Source/WebCore:

* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isXtraMath): Added.

Source/WebKit/mac:

* WebView/WebView.mm:
(shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol): Allow * to match any protocol for
applicable versions of app XtraMath.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (200322 => 200323)


--- trunk/Source/WebCore/ChangeLog	2016-05-02 15:57:05 UTC (rev 200322)
+++ trunk/Source/WebCore/ChangeLog	2016-05-02 16:15:57 UTC (rev 200323)
@@ -1,5 +1,16 @@
 2016-05-02  Daniel Bates  <[email protected]>
 
+        CSP: Add workaround for XtraMath
+        https://bugs.webkit.org/show_bug.cgi?id=157252
+
+        Reviewed by Andy Estes.
+
+        * platform/RuntimeApplicationChecks.h:
+        * platform/RuntimeApplicationChecks.mm:
+        (WebCore::IOSApplication::isXtraMath): Added.
+
+2016-05-02  Daniel Bates  <[email protected]>
+
         DatabaseTracker::closeAllDatabases calls Database::close from the wrong thread
         https://bugs.webkit.org/show_bug.cgi?id=147672
         <rdar://problem/22357464>

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (200322 => 200323)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-05-02 15:57:05 UTC (rev 200322)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-05-02 16:15:57 UTC (rev 200323)
@@ -75,6 +75,7 @@
 bool isIBooks();
 WEBCORE_EXPORT bool isEcobee();
 WEBCORE_EXPORT bool isQuora();
+WEBCORE_EXPORT bool isXtraMath();
 
 } // IOSApplication
 

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm (200322 => 200323)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-05-02 15:57:05 UTC (rev 200322)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-05-02 16:15:57 UTC (rev 200323)
@@ -253,6 +253,12 @@
     return isQuora;
 }
 
+bool IOSApplication::isXtraMath()
+{
+    static bool isXtraMath = applicationBundleIsEqualTo("org.xtramath.mathfacts");
+    return isXtraMath;
+}
+
 #endif
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/mac/ChangeLog (200322 => 200323)


--- trunk/Source/WebKit/mac/ChangeLog	2016-05-02 15:57:05 UTC (rev 200322)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-05-02 16:15:57 UTC (rev 200323)
@@ -1,5 +1,16 @@
 2016-05-02  Daniel Bates  <[email protected]>
 
+        CSP: Add workaround for XtraMath
+        https://bugs.webkit.org/show_bug.cgi?id=157252
+
+        Reviewed by Andy Estes.
+
+        * WebView/WebView.mm:
+        (shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol): Allow * to match any protocol for
+        applicable versions of app XtraMath.
+
+2016-05-02  Daniel Bates  <[email protected]>
+
         DatabaseTracker::closeAllDatabases calls Database::close from the wrong thread
         https://bugs.webkit.org/show_bug.cgi?id=147672
         <rdar://problem/22357464>

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (200322 => 200323)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2016-05-02 15:57:05 UTC (rev 200322)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2016-05-02 16:15:57 UTC (rev 200323)
@@ -868,7 +868,7 @@
 static bool shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol()
 {
 #if PLATFORM(IOS)
-    static bool shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol = (IOSApplication::isEcobee() || IOSApplication::isQuora()) && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CONTENT_SECURITY_POLICY_SOURCE_STAR_PROTOCOL_RESTRICTION);
+    static bool shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol = (IOSApplication::isEcobee() || IOSApplication::isQuora() || IOSApplication::isXtraMath()) && !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_CONTENT_SECURITY_POLICY_SOURCE_STAR_PROTOCOL_RESTRICTION);
     return shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol;
 #else
     return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to