[webkit-changes] [258803] trunk

2020-03-20 Thread pvollan
Title: [258803] trunk








Revision 258803
Author pvol...@apple.com
Date 2020-03-20 18:10:42 -0700 (Fri, 20 Mar 2020)


Log Message
[Cocoa] Deny access to database mapping service
https://bugs.webkit.org/show_bug.cgi?id=209339
Source/WebKit:



Reviewed by Brent Fulgham.

In order for the WebContent process to not have permantent access to the database mapping service,
this patch creates an extension for the service in the UI process, sends it to the WebContent
process, where it is consumed. Then, an API call is made which will map the database, and next the
WebContent process will revoke the extension. The WebContent process has then mapped the database,
and access to the database mapping service is no longer needed.

Tested by: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:



Reviewed by Brent Fulgham.

Disable the use of UTTypeRecord swizzling, since this is not needed with the new approach
of denying the database mapping service in this patch.

* wtf/PlatformUse.h:

LayoutTests:

Reviewed by Brent Fulgham.

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformUse.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/LayoutTests/ChangeLog (258802 => 258803)

--- trunk/LayoutTests/ChangeLog	2020-03-21 00:52:08 UTC (rev 258802)
+++ trunk/LayoutTests/ChangeLog	2020-03-21 01:10:42 UTC (rev 258803)
@@ -1,3 +1,13 @@
+2020-03-20  Per Arne Vollan  
+
+[Cocoa] Deny access to database mapping service
+https://bugs.webkit.org/show_bug.cgi?id=209339
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-03-20  David Kilzer  
 
 Content-Type & Nosniff Ignored on XML External Entity Resources


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (258802 => 258803)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-21 00:52:08 UTC (rev 258802)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-21 01:10:42 UTC (rev 258803)
@@ -24,3 +24,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.PowerManagement.control") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.mobileassetd") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.mobileassetd.v2") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.lsd.mapdb") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (258802 => 258803)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-21 00:52:08 UTC (rev 258802)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-21 01:10:42 UTC (rev 258803)
@@ -27,6 +27,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.PowerManagement.control\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.mobileassetd\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.mobileassetd.v2\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.lsd.mapdb\")");
 }
 
 


Modified: trunk/Source/WTF/ChangeLog (258802 => 258803)

--- trunk/Source/WTF/ChangeLog	2020-03-21 00:52:08 UTC (rev 258802)
+++ trunk/Source/WTF/ChangeLog	2020-03-21 01:10:42 UTC (rev 258803)
@@ -1,3 +1,16 @@
+2020-03-20  Per Arne Vollan  
+
+[Cocoa] Deny access to database mapping service
+https://bugs.webkit.org/show_bug.cgi?id=209339
+
+
+Reviewed by Brent Fulgham.
+
+

[webkit-changes] [258802] trunk/Source/WebKit

2020-03-20 Thread pvollan
Title: [258802] trunk/Source/WebKit








Revision 258802
Author pvol...@apple.com
Date 2020-03-20 17:52:08 -0700 (Fri, 20 Mar 2020)


Log Message
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=209003


Reviewed by Brent Fulgham.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (258801 => 258802)

--- trunk/Source/WebKit/ChangeLog	2020-03-21 00:38:45 UTC (rev 258801)
+++ trunk/Source/WebKit/ChangeLog	2020-03-21 00:52:08 UTC (rev 258802)
@@ -1,3 +1,13 @@
+2020-03-20  Per Arne Vollan  
+
+[iOS] Add telemetry for message filtering
+https://bugs.webkit.org/show_bug.cgi?id=209003
+
+
+Reviewed by Brent Fulgham.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-20  Daniel Bates  
 
 Have insertDictatedTextAsync() take an InsertTextOptions


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258801 => 258802)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-21 00:38:45 UTC (rev 258801)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-21 00:52:08 UTC (rev 258802)
@@ -1081,3 +1081,63 @@
 )
 )
 )
+
+(when (defined? 'syscall-mach)
+(allow syscall-mach (with report) (with telemetry))
+(allow syscall-mach
+(machtrap-number MSC__kernelrpc_mach_port_allocate_trap)
+(machtrap-number MSC__kernelrpc_mach_port_construct_trap)
+(machtrap-number MSC__kernelrpc_mach_port_deallocate_trap)
+(machtrap-number MSC__kernelrpc_mach_port_destruct_trap)
+(machtrap-number MSC__kernelrpc_mach_port_extract_member_trap)
+(machtrap-number MSC__kernelrpc_mach_port_get_attributes_trap)
+(machtrap-number MSC__kernelrpc_mach_port_guard_trap)
+(machtrap-number MSC__kernelrpc_mach_port_insert_member_trap)
+(machtrap-number MSC__kernelrpc_mach_port_insert_right_trap)
+(machtrap-number MSC__kernelrpc_mach_port_mod_refs_trap)
+(machtrap-number MSC__kernelrpc_mach_port_request_notification_trap)
+(machtrap-number MSC__kernelrpc_mach_port_type_trap)
+(machtrap-number MSC__kernelrpc_mach_vm_allocate_trap)
+(machtrap-number MSC__kernelrpc_mach_vm_deallocate_trap)
+(machtrap-number MSC__kernelrpc_mach_vm_map_trap)
+(machtrap-number MSC__kernelrpc_mach_vm_protect_trap)
+(machtrap-number MSC__kernelrpc_mach_vm_purgable_control_trap)
+(machtrap-number MSC_host_create_mach_voucher_trap)
+(machtrap-number MSC_host_self_trap)
+(machtrap-number MSC_mach_generate_activity_id)
+(machtrap-number MSC_mach_msg_trap)
+(machtrap-number MSC_mach_reply_port)
+(machtrap-number MSC_mach_voucher_extract_attr_recipe_trap)
+(machtrap-number MSC_mk_timer_arm)
+(machtrap-number MSC_mk_timer_arm_leeway)
+(machtrap-number MSC_mk_timer_cancel)
+(machtrap-number MSC_mk_timer_create)
+(machtrap-number MSC_mk_timer_destroy)
+(machtrap-number MSC_pid_for_task)
+(machtrap-number MSC_semaphore_signal_trap)
+(machtrap-number MSC_semaphore_timedwait_trap)
+(machtrap-number MSC_semaphore_wait_trap)
+(machtrap-number MSC_swtch_pri)
+(machtrap-number MSC_thread_get_special_reply_port)
+(machtrap-number MSC_thread_self_trap)
+)
+)
+
+(when (defined? 'mach-kernel-endpoint)
+(allow mach-kernel-endpoint
+(apply-message-filter
+(allow mach-message-send (with report) (with telemetry))
+)
+)
+)
+
+(when (defined? 'iokit-external-method)
+(allow iokit-open
+(apply-message-filter (with report) (with telemetry)
+(allow
+ iokit-external-method
+ iokit-async-external-method
+ iokit-external-trap)
+)
+)
+)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258726] trunk

2020-03-19 Thread pvollan
Title: [258726] trunk








Revision 258726
Author pvol...@apple.com
Date 2020-03-19 14:13:28 -0700 (Thu, 19 Mar 2020)


Log Message
[iOS] Deny mach lookup access to power service
https://bugs.webkit.org/show_bug.cgi?id=208460


Reviewed by Darin Adler.

Source/WebKit:

On iOS, deny mach lookup access to the power service in the WebContent process.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (258725 => 258726)

--- trunk/LayoutTests/ChangeLog	2020-03-19 21:03:29 UTC (rev 258725)
+++ trunk/LayoutTests/ChangeLog	2020-03-19 21:13:28 UTC (rev 258726)
@@ -1,3 +1,14 @@
+2020-03-19  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to power service
+https://bugs.webkit.org/show_bug.cgi?id=208460
+
+
+Reviewed by Darin Adler.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-03-19  Jason Lawrence  
 
 [ iOS wk2 ] http/tests/workers/service/service-worker-cache-api.https.html is flaky timing out.


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (258725 => 258726)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-19 21:03:29 UTC (rev 258725)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-19 21:13:28 UTC (rev 258726)
@@ -21,3 +21,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.uikit.viewservice") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.analyticsd") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.distributed_notifications@1v3") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.PowerManagement.control") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (258725 => 258726)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-19 21:03:29 UTC (rev 258725)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-19 21:13:28 UTC (rev 258726)
@@ -24,6 +24,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.uikit.viewservice\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.analyticsd\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.distributed_notifications@1v3\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.PowerManagement.control\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (258725 => 258726)

--- trunk/Source/WebKit/ChangeLog	2020-03-19 21:03:29 UTC (rev 258725)
+++ trunk/Source/WebKit/ChangeLog	2020-03-19 21:13:28 UTC (rev 258726)
@@ -1,3 +1,17 @@
+2020-03-19  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to power service
+https://bugs.webkit.org/show_bug.cgi?id=208460
+
+
+Reviewed by Darin Adler.
+
+On iOS, deny mach lookup access to the power service in the WebContent process.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-19  Tim Horton  
 
 Implement support for cursor interactions on iPad


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258725 => 258726)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-19 21:03:29 UTC (rev 258725)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-19 21:13:28 UTC (rev 258726)
@@ -832,7 +832,7 @@
 (allow mach-lookup (with report) (with telemetry)
(global-name "com.apple.webinspector"))
 
-(allow mach-lookup (with telemetry-backtrace)
+(deny mach-lookup (with telemetry-backtrace)
 (global-name "com.apple.PowerManagement.control"))
 
 (deny file-write-create (vnode-type SYMLINK))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258713] trunk/Source/WebKit

2020-03-19 Thread pvollan
Title: [258713] trunk/Source/WebKit








Revision 258713
Author pvol...@apple.com
Date 2020-03-19 10:59:26 -0700 (Thu, 19 Mar 2020)


Log Message
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925


Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (258712 => 258713)

--- trunk/Source/WebKit/ChangeLog	2020-03-19 17:51:59 UTC (rev 258712)
+++ trunk/Source/WebKit/ChangeLog	2020-03-19 17:59:26 UTC (rev 258713)
@@ -1,3 +1,17 @@
+2020-03-19  Per Arne Vollan  
+
+[iOS] Add telemetry for message filtering
+https://bugs.webkit.org/show_bug.cgi?id=208925
+
+
+Reviewed by Darin Adler.
+
+On iOS, add telemetry for message filtering in the WebContent process' sandbox.
+
+No new tests, no behavior change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-19  Charlie Turner  
 
 Fix many warnings with Clang 7.0 on GTK x86-64 in Debug.


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258712 => 258713)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-19 17:51:59 UTC (rev 258712)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-19 17:59:26 UTC (rev 258713)
@@ -1062,3 +1062,20 @@
 (syscall-number SYS_shared_region_map_and_slide_2_np) ;; 
 )
 )
+
+(when (defined? 'mach-bootstrap)
+(allow mach-bootstrap
+(apply-message-filter
+(allow xpc-message-send (with report) (with telemetry))
+(allow xpc-message-send (message-number 206))
+(allow xpc-message-send (message-number 207))
+(allow xpc-message-send (message-number 711))
+(allow xpc-message-send (message-number 712))
+(allow xpc-message-send (message-number 718))
+(allow xpc-message-send (message-number 800))
+(allow xpc-message-send (message-number 803))
+(allow xpc-message-send (message-number 804))
+(allow xpc-message-send (message-number 805))
+)
+)
+)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258557] trunk/Source

2020-03-17 Thread pvollan
Title: [258557] trunk/Source








Revision 258557
Author pvol...@apple.com
Date 2020-03-17 09:59:32 -0700 (Tue, 17 Mar 2020)


Log Message
[Cocoa] Disable CF prefs direct mode
https://bugs.webkit.org/show_bug.cgi?id=209166


Reviewed by Brent Fulgham.

Revert  by disabling the CF prefs direct mode feature,
since it caused performance regressions.

Source/WebKit:

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* UIProcess/Cocoa/PreferenceObserver.mm:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::grantAccessToPreferenceService):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.h:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Source/WTF:

* wtf/PlatformEnable.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformEnable.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WTF/ChangeLog (258556 => 258557)

--- trunk/Source/WTF/ChangeLog	2020-03-17 16:50:50 UTC (rev 258556)
+++ trunk/Source/WTF/ChangeLog	2020-03-17 16:59:32 UTC (rev 258557)
@@ -1,3 +1,16 @@
+2020-03-17  Per Arne Vollan  
+
+[Cocoa] Disable CF prefs direct mode
+https://bugs.webkit.org/show_bug.cgi?id=209166
+
+
+Reviewed by Brent Fulgham.
+
+Revert  by disabling the CF prefs direct mode feature,
+since it caused performance regressions.
+
+* wtf/PlatformEnable.h:
+
 2020-03-17  Philippe Normand  
 
 RELEASE_LOG should not be Cocoa specific


Modified: trunk/Source/WTF/wtf/PlatformEnable.h (258556 => 258557)

--- trunk/Source/WTF/wtf/PlatformEnable.h	2020-03-17 16:50:50 UTC (rev 258556)
+++ trunk/Source/WTF/wtf/PlatformEnable.h	2020-03-17 16:59:32 UTC (rev 258557)
@@ -871,4 +871,4 @@
 #error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
 #endif
 
-#define ENABLE_CFPREFS_DIRECT_MODE 1
+#define ENABLE_CFPREFS_DIRECT_MODE 0


Modified: trunk/Source/WebKit/ChangeLog (258556 => 258557)

--- trunk/Source/WebKit/ChangeLog	2020-03-17 16:50:50 UTC (rev 258556)
+++ trunk/Source/WebKit/ChangeLog	2020-03-17 16:59:32 UTC (rev 258557)
@@ -1,3 +1,27 @@
+2020-03-17  Per Arne Vollan  
+
+[Cocoa] Disable CF prefs direct mode
+https://bugs.webkit.org/show_bug.cgi?id=209166
+
+
+Reviewed by Brent Fulgham.
+
+Revert  by disabling the CF prefs direct mode feature,
+since it caused performance regressions.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+(WebKit::XPCServiceMain):
+* UIProcess/Cocoa/PreferenceObserver.mm:
+* UIProcess/Cocoa/WebPageProxyCocoa.mm:
+(WebKit::WebPageProxy::grantAccessToPreferenceService):
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+* UIProcess/WebProcessPool.h:
+* UIProcess/WebProcessProxy.h:
+* WebProcess/WebProcess.h:
+* WebProcess/WebProcess.messages.in:
+
 2020-03-17  Commit Queue  
 
 Unreviewed, reverting r258339.


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258556 => 258557)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-17 16:50:50 UTC (rev 258556)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-17 16:59:32 UTC (rev 258557)
@@ -536,6 +536,7 @@
 (allow mach-lookup
 (global-name "com.apple.logd")
 (global-name "com.apple.logd.events")
+(global-name "com.apple.cfprefsd.daemon")
 )
 
 (deny mach-lookup (with telemetry)


Modified: trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (258556 => 258557)

--- trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-17 16:50:50 UTC (rev 258556)
+++ trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-17 16:59:32 UTC (rev 258557)
@@ -114,6 +114,9 @@
 // Enable CFPrefs direct mode to avoid unsuccessfully attempting to connect to the daemon and getting blocked by the sandbox.
 

[webkit-changes] [258518] trunk

2020-03-16 Thread pvollan
Title: [258518] trunk








Revision 258518
Author pvol...@apple.com
Date 2020-03-16 14:11:00 -0700 (Mon, 16 Mar 2020)


Log Message
[macOS] Accessibility sandbox regressions
https://bugs.webkit.org/show_bug.cgi?id=209065
Source/WebCore/PAL:


Reviewed by Brent Fulgham.

Add Accessibility notification name.

* pal/spi/cocoa/NSAccessibilitySPI.h:

Source/WebKit:



Reviewed by Brent Fulgham.

When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility
is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent
sandbox needs to explicitly allow reading of the various plist files.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
* WebProcess/com.apple.WebProcess.sb.in:

Tools:


Reviewed by Brent Fulgham.

* TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm:
(TEST):
* TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm:
(TEST):

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (258517 => 258518)

--- trunk/Source/WebCore/PAL/ChangeLog	2020-03-16 20:54:58 UTC (rev 258517)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-03-16 21:11:00 UTC (rev 258518)
@@ -1,3 +1,14 @@
+2020-03-16  Per Arne Vollan  
+
+[macOS] Accessibility sandbox regressions
+https://bugs.webkit.org/show_bug.cgi?id=209065
+
+Reviewed by Brent Fulgham.
+
+Add Accessibility notification name.
+
+* pal/spi/cocoa/NSAccessibilitySPI.h:
+
 2020-03-13  Sergio Villar Senin  
 
 [WebXR] IDLs, stubs and build configuration for WPE


Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h (258517 => 258518)

--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h	2020-03-16 20:54:58 UTC (rev 258517)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h	2020-03-16 21:11:00 UTC (rev 258518)
@@ -54,6 +54,8 @@
 
 WTF_EXTERN_C_BEGIN
 
+extern NSString *const NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification;
+
 void NSAccessibilityHandleFocusChanged();
 void NSAccessibilityUnregisterUniqueIdForUIElement(id element);
 


Modified: trunk/Source/WebKit/ChangeLog (258517 => 258518)

--- trunk/Source/WebKit/ChangeLog	2020-03-16 20:54:58 UTC (rev 258517)
+++ trunk/Source/WebKit/ChangeLog	2020-03-16 21:11:00 UTC (rev 258518)
@@ -1,5 +1,21 @@
 2020-03-16  Per Arne Vollan  
 
+[macOS] Accessibility sandbox regressions
+https://bugs.webkit.org/show_bug.cgi?id=209065
+
+
+Reviewed by Brent Fulgham.
+
+When Accessibility is enabled, the WebContent process needs access to the preference service, since Accessibility
+is relying on some advanced features of the service. Also, when CF prefs direct mode is enabled, the WebContent
+sandbox needs to explicitly allow reading of the various plist files.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::registerNotificationObservers):
+* WebProcess/com.apple.WebProcess.sb.in:
+
+2020-03-16  Per Arne Vollan  
+
 [Cocoa] Crash under -[WKPreferenceObserver init]
 https://bugs.webkit.org/show_bug.cgi?id=209145
 


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258517 => 258518)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-16 20:54:58 UTC (rev 258517)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-16 21:11:00 UTC (rev 258518)
@@ -613,6 +613,10 @@
 #if !PLATFORM(IOS_FAMILY)
 // Listen for enhanced accessibility changes and propagate them to the WebProcess.
 m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
+#if ENABLE(CFPREFS_DIRECT_MODE)
+for (auto& process : m_processes)
+process->unblockPreferenceServiceIfNeeded();
+#endif
 setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]);
 }];
 
@@ -663,7 +667,9 @@
 #endif // PLATFORM(IOS)
 m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
 for (size_t i = 0; i < m_processes.size(); ++i) {
+#if ENABLE(CFPREFS_DIRECT_MODE)
 

[webkit-changes] [258515] trunk/Source/WebKit

2020-03-16 Thread pvollan
Title: [258515] trunk/Source/WebKit








Revision 258515
Author pvol...@apple.com
Date 2020-03-16 13:11:01 -0700 (Mon, 16 Mar 2020)


Log Message
[Cocoa] Crash under -[WKPreferenceObserver init]
https://bugs.webkit.org/show_bug.cgi?id=209145

Reviewed by Darin Adler.

Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.

No new tests, since I have not been able to reproduce.

* UIProcess/Cocoa/PreferenceObserver.mm:
(-[WKPreferenceObserver init]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258514 => 258515)

--- trunk/Source/WebKit/ChangeLog	2020-03-16 19:57:45 UTC (rev 258514)
+++ trunk/Source/WebKit/ChangeLog	2020-03-16 20:11:01 UTC (rev 258515)
@@ -1,3 +1,17 @@
+2020-03-16  Per Arne Vollan  
+
+[Cocoa] Crash under -[WKPreferenceObserver init]
+https://bugs.webkit.org/show_bug.cgi?id=209145
+
+Reviewed by Darin Adler.
+
+Handle the case when calling [NSUserDefaults initWithSuiteName:] did not succeed.
+
+No new tests, since I have not been able to reproduce.
+
+* UIProcess/Cocoa/PreferenceObserver.mm:
+(-[WKPreferenceObserver init]):
+
 2020-03-16  Brent Fulgham  
 
 Remove unused IPC messages from DrawingAreaProxy


Modified: trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm (258514 => 258515)

--- trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-16 19:57:45 UTC (rev 258514)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-16 20:11:01 UTC (rev 258515)
@@ -203,6 +203,10 @@
 
 for (auto domain : domains) {
 auto userDefaults = adoptNS([[WKUserDefaults alloc] initWithSuiteName:domain]);
+if (!userDefaults) {
+WTFLogAlways("Could not init user defaults instance for domain %s", String(domain).utf8().data());
+continue;
+}
 userDefaults.get()->m_observer = self;
 // Start observing a dummy key in order to make the preference daemon become aware of our NSUserDefaults instance.
 // This is to make sure we receive KVO notifications. We cannot use normal KVO techniques here, since we are looking






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258512] trunk/Source/WebKit

2020-03-16 Thread pvollan
Title: [258512] trunk/Source/WebKit








Revision 258512
Author pvol...@apple.com
Date 2020-03-16 12:50:59 -0700 (Mon, 16 Mar 2020)


Log Message
[Cocoa] Only set CF prefs direct mode for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209091


Reviewed by Brent Fulgham.

Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
for the WebContent process.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258511 => 258512)

--- trunk/Source/WebKit/ChangeLog	2020-03-16 18:49:48 UTC (rev 258511)
+++ trunk/Source/WebKit/ChangeLog	2020-03-16 19:50:59 UTC (rev 258512)
@@ -1,3 +1,17 @@
+2020-03-16  Per Arne Vollan  
+
+[Cocoa] Only set CF prefs direct mode for the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=209091
+
+
+Reviewed by Brent Fulgham.
+
+Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
+for the WebContent process.
+
+* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+(WebKit::XPCServiceMain):
+
 2020-03-16  David Kilzer  
 
 WebPage::GetDataSelectionForPasteboard should validate its `size` variable


Modified: trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (258511 => 258512)

--- trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-16 18:49:48 UTC (rev 258511)
+++ trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-16 19:50:59 UTC (rev 258512)
@@ -70,7 +70,6 @@
 else
 RELEASE_ASSERT_NOT_REACHED();
 
-
 typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t, xpc_object_t);
 InitializerFunction initializerFunctionPtr = reinterpret_cast(CFBundleGetFunctionPointerForName(webKitBundle, entryPointFunctionName));
 if (!initializerFunctionPtr) {
@@ -106,8 +105,17 @@
 xpc_connection_resume(peer);
 }
 
-int XPCServiceMain(int, const char**)
+int XPCServiceMain(int argc, const char** argv)
 {
+ASSERT(argc >= 1);
+ASSERT(argv[0]);
+#if ENABLE(CFPREFS_DIRECT_MODE)
+if (argc >= 1 && argv[0] && strstr(argv[0], "com.apple.WebKit.WebContent")) {
+// Enable CFPrefs direct mode to avoid unsuccessfully attempting to connect to the daemon and getting blocked by the sandbox.
+_CFPrefsSetDirectModeEnabled(YES);
+}
+#endif
+
 auto bootstrap = adoptOSObject(xpc_copy_bootstrap());
 #if PLATFORM(IOS_FAMILY)
 auto containerEnvironmentVariables = xpc_dictionary_get_value(bootstrap.get(), "ContainerEnvironmentVariables");
@@ -117,11 +125,6 @@
 });
 #endif
 
-#if ENABLE(CFPREFS_DIRECT_MODE)
-// Enable CF prefs direct mode to avoid connecting to the CF prefs daemon.
-_CFPrefsSetDirectModeEnabled(YES);
-#endif
-
 if (bootstrap) {
 #if PLATFORM(MAC)
 if (const char* webKitBundleVersion = xpc_dictionary_get_string(bootstrap.get(), "WebKitBundleVersion")) {






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258496] trunk/Source/WebKit

2020-03-16 Thread pvollan
Title: [258496] trunk/Source/WebKit








Revision 258496
Author pvol...@apple.com
Date 2020-03-16 08:26:05 -0700 (Mon, 16 Mar 2020)


Log Message
[iOS] Add telemetry for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208925


Reviewed by Darin Adler.

On iOS, add telemetry for message filtering in the WebContent process' sandbox.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (258495 => 258496)

--- trunk/Source/WebKit/ChangeLog	2020-03-16 15:19:53 UTC (rev 258495)
+++ trunk/Source/WebKit/ChangeLog	2020-03-16 15:26:05 UTC (rev 258496)
@@ -1,5 +1,19 @@
 2020-03-16  Per Arne Vollan  
 
+[iOS] Add telemetry for message filtering
+https://bugs.webkit.org/show_bug.cgi?id=208925
+
+
+Reviewed by Darin Adler.
+
+On iOS, add telemetry for message filtering in the WebContent process' sandbox.
+
+No new tests, no behavior change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
+2020-03-16  Per Arne Vollan  
+
 [Cocoa] Limit set of classes that can be decoded when a preference has changed
 https://bugs.webkit.org/show_bug.cgi?id=208012
 


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258495 => 258496)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-16 15:19:53 UTC (rev 258495)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-16 15:26:05 UTC (rev 258496)
@@ -1061,3 +1061,20 @@
 (syscall-number SYS_shared_region_map_and_slide_2_np) ;; 
 )
 )
+
+(when (defined? 'mach-bootstrap)
+(allow mach-bootstrap
+(apply-message-filter
+(allow xpc-message-send (with report) (with telemetry))
+(allow xpc-message-send (message-number 206))
+(allow xpc-message-send (message-number 207))
+(allow xpc-message-send (message-number 711))
+(allow xpc-message-send (message-number 712))
+(allow xpc-message-send (message-number 718))
+(allow xpc-message-send (message-number 800))
+(allow xpc-message-send (message-number 803))
+(allow xpc-message-send (message-number 804))
+(allow xpc-message-send (message-number 805))
+)
+)
+)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258495] trunk

2020-03-16 Thread pvollan
Title: [258495] trunk








Revision 258495
Author pvol...@apple.com
Date 2020-03-16 08:19:53 -0700 (Mon, 16 Mar 2020)


Log Message
[Cocoa] Limit set of classes that can be decoded when a preference has changed
https://bugs.webkit.org/show_bug.cgi?id=208012

Reviewed by Brent Fulgham.

Source/WebKit:

As a hardening measure, limit the set of ObjectiveC classes that can be decoded in the WebContent process
as a result of a preference change.

API tests: WebKit.PreferenceChangesDictionary
   WebKit.PreferenceChangesData
   WebKit.PreferenceChangesDate

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::notifyPreferencesChanged):

Tools:

* TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258494 => 258495)

--- trunk/Source/WebKit/ChangeLog	2020-03-16 13:15:52 UTC (rev 258494)
+++ trunk/Source/WebKit/ChangeLog	2020-03-16 15:19:53 UTC (rev 258495)
@@ -1,3 +1,20 @@
+2020-03-16  Per Arne Vollan  
+
+[Cocoa] Limit set of classes that can be decoded when a preference has changed
+https://bugs.webkit.org/show_bug.cgi?id=208012
+
+Reviewed by Brent Fulgham.
+
+As a hardening measure, limit the set of ObjectiveC classes that can be decoded in the WebContent process
+as a result of a preference change.
+
+API tests: WebKit.PreferenceChangesDictionary
+   WebKit.PreferenceChangesData
+   WebKit.PreferenceChangesDate
+
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::notifyPreferencesChanged):
+
 2020-03-16  youenn fablet  
 
 Unique origins should not be Potentially Trustworthy


Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (258494 => 258495)

--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-16 13:15:52 UTC (rev 258494)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-16 15:19:53 UTC (rev 258495)
@@ -912,11 +912,12 @@
 if (!encodedData)
 return;
 NSError *err = nil;
-auto object = retainPtr([NSKeyedUnarchiver unarchivedObjectOfClass:[NSObject class] fromData:encodedData.get() error:]);
+auto classes = [NSSet setWithArray:@[[NSString class], [NSNumber class], [NSDate class], [NSDictionary class], [NSArray class], [NSData class]]];
+id object = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:encodedData.get() error:];
 ASSERT(!err);
 if (err)
 return;
-[defaults setObject:object.get() forKey:key];
+[defaults setObject:object forKey:key];
 }
 
 void WebProcess::unblockPreferenceService(const SandboxExtension::Handle& handle)


Modified: trunk/Tools/ChangeLog (258494 => 258495)

--- trunk/Tools/ChangeLog	2020-03-16 13:15:52 UTC (rev 258494)
+++ trunk/Tools/ChangeLog	2020-03-16 15:19:53 UTC (rev 258495)
@@ -1,3 +1,13 @@
+2020-03-16  Per Arne Vollan  
+
+[Cocoa] Limit set of classes that can be decoded when a preference has changed
+https://bugs.webkit.org/show_bug.cgi?id=208012
+
+Reviewed by Brent Fulgham.
+
+* TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm:
+(TEST):
+
 2020-03-16  youenn fablet  
 
 Unique origins should not be Potentially Trustworthy


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm (258494 => 258495)

--- trunk/Tools/TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm	2020-03-16 13:15:52 UTC (rev 258494)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm	2020-03-16 15:19:53 UTC (rev 258495)
@@ -127,4 +127,104 @@
 ASSERT_TRUE([object isEqual:changedArray]);
 }
 
+TEST(WebKit, PreferenceChangesDictionary)
+{
+NSDictionary *dict = @{
+@"a" : @1,
+@"b" : @2,
+};
+
+auto userDefaults = adoptNS([[NSUserDefaults alloc] initWithSuiteName:@"com.apple.coremedia"]);
+[userDefaults.get() setObject:dict forKey:@"testkey"];
+
+auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+WKRetainPtr context = adoptWK(TestWebKitAPI::Util::createContextForInjectedBundleTest("InternalsInjectedBundleTest"));
+configuration.get().processPool = (WKProcessPool *)context.get();
+auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration.get() addToWindow:YES]);
+
+auto preferenceValue = [&] {
+return [webView stringByEvaluatingJavaScript:@"window.internals.encodedPreferenceValue(\"com.apple.coremedia\", \"testkey\")"];
+};
+
+preferenceValue();
+
+NSDictionary *changedDict = @{
+@"a" : @1,
+@"b" : @2,
+@"c" : @3,
+};
+[userDefaults.get() setObject:changedDict forKey:@"testkey"];
+
+auto encodedString = preferenceValue();
+auto encodedData = adoptNS([[NSData alloc] 

[webkit-changes] [258359] trunk

2020-03-12 Thread pvollan
Title: [258359] trunk








Revision 258359
Author pvol...@apple.com
Date 2020-03-12 14:36:08 -0700 (Thu, 12 Mar 2020)


Log Message
[macOS] _AXSApplicationAccessibilityEnabled should not be called
https://bugs.webkit.org/show_bug.cgi?id=208953

Reviewed by Brent Fulgham.

Source/WebCore:

The function _AXSApplicationAccessibilityEnabled and the notification kAXSApplicationAccessibilityEnabledNotification
exist on macOS, but they do not have the same behavior as on iOS, and should not be used in the same way. Using this
function and notification on macOS was introduced in , and this patch
partially reverts this behavior.

API test: WebKit.IsRemoteUIAppForAccessibility

* testing/Internals.cpp:
(WebCore::Internals::isRemoteUIAppForAccessibility):
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.mm:
(WebCore::Internals::isRemoteUIAppForAccessibility):

Source/WebCore/PAL:

Declare method to check if the process is a remote UI app for accessibility.

* pal/spi/cocoa/NSAccessibilitySPI.h:

Source/WebKit:

On macOS, stop using the function _AXSApplicationAccessibilityEnabled and listening to the notification
kAXSApplicationAccessibilityEnabledNotification, since they do not have the same behavior as on iOS.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):
(WebKit::WebProcess::unblockAccessibilityServer):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/AccessibilityRemoteUIApp.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (258358 => 258359)

--- trunk/Source/WebCore/ChangeLog	2020-03-12 21:33:42 UTC (rev 258358)
+++ trunk/Source/WebCore/ChangeLog	2020-03-12 21:36:08 UTC (rev 258359)
@@ -1,3 +1,24 @@
+2020-03-12  Per Arne Vollan  
+
+[macOS] _AXSApplicationAccessibilityEnabled should not be called
+https://bugs.webkit.org/show_bug.cgi?id=208953
+
+Reviewed by Brent Fulgham.
+
+The function _AXSApplicationAccessibilityEnabled and the notification kAXSApplicationAccessibilityEnabledNotification
+exist on macOS, but they do not have the same behavior as on iOS, and should not be used in the same way. Using this
+function and notification on macOS was introduced in , and this patch
+partially reverts this behavior.
+
+API test: WebKit.IsRemoteUIAppForAccessibility
+
+* testing/Internals.cpp:
+(WebCore::Internals::isRemoteUIAppForAccessibility):
+* testing/Internals.h:
+* testing/Internals.idl:
+* testing/Internals.mm:
+(WebCore::Internals::isRemoteUIAppForAccessibility):
+
 2020-03-12  Andres Gonzalez  
 
 Cache the ScrollView platformWidget to avoid [WebAccessibilityObjectWrapper scrollViewParent] hitting the main thread too often.


Modified: trunk/Source/WebCore/PAL/ChangeLog (258358 => 258359)

--- trunk/Source/WebCore/PAL/ChangeLog	2020-03-12 21:33:42 UTC (rev 258358)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-03-12 21:36:08 UTC (rev 258359)
@@ -1,3 +1,14 @@
+2020-03-12  Per Arne Vollan  
+
+[macOS] _AXSApplicationAccessibilityEnabled should not be called
+https://bugs.webkit.org/show_bug.cgi?id=208953
+
+Reviewed by Brent Fulgham.
+
+Declare method to check if the process is a remote UI app for accessibility.
+
+* pal/spi/cocoa/NSAccessibilitySPI.h:
+
 2020-03-11  Jer Noble  
 
 Adopt AVSampleBufferVideoOutput


Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h (258358 => 258359)

--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h	2020-03-12 21:33:42 UTC (rev 258358)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAccessibilitySPI.h	2020-03-12 21:36:08 UTC (rev 258359)
@@ -35,6 +35,7 @@
 
 @interface NSAccessibilityRemoteUIElement : NSObject
 
++ (BOOL)isRemoteUIApp;
 + (void)setRemoteUIApp:(BOOL)flag;
 + (NSData *)remoteTokenForLocalUIElement:(id)localUIElement;
 + (void)registerRemoteUIProcessIdentifier:(pid_t)pid;


Modified: 

[webkit-changes] [258304] trunk/Source/WebKit

2020-03-11 Thread pvollan
Title: [258304] trunk/Source/WebKit








Revision 258304
Author pvol...@apple.com
Date 2020-03-11 18:22:17 -0700 (Wed, 11 Mar 2020)


Log Message
[macOS] Register with accessibility when the WebContent process starts
https://bugs.webkit.org/show_bug.cgi?id=208960

Reviewed by Brent Fulgham.

When we reenabled CF prefs direct mode in , we started to register
with accessibility when we received a message to do so from the UI process. This would typically happen when the user
enabled accessibility. On macOS, this notification does not work the same way as on iOS, and it is assumed that
accessibility should always be enabled. Therefore we should go back to registering with accessibility on startup of
the WebContent process on macOS.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):
(WebKit::WebProcess::unblockAccessibilityServer):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258303 => 258304)

--- trunk/Source/WebKit/ChangeLog	2020-03-12 01:22:09 UTC (rev 258303)
+++ trunk/Source/WebKit/ChangeLog	2020-03-12 01:22:17 UTC (rev 258304)
@@ -1,3 +1,20 @@
+2020-03-11  Per Arne Vollan  
+
+[macOS] Register with accessibility when the WebContent process starts
+https://bugs.webkit.org/show_bug.cgi?id=208960
+
+Reviewed by Brent Fulgham.
+
+When we reenabled CF prefs direct mode in , we started to register
+with accessibility when we received a message to do so from the UI process. This would typically happen when the user
+enabled accessibility. On macOS, this notification does not work the same way as on iOS, and it is assumed that
+accessibility should always be enabled. Therefore we should go back to registering with accessibility on startup of
+the WebContent process on macOS.
+
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeProcess):
+(WebKit::WebProcess::unblockAccessibilityServer):
+
 2020-03-11  Don Olmstead  
 
 [GPUP] RemoteAudioDestination classes should require ENABLE(WEB_AUDIO)


Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (258303 => 258304)

--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-12 01:22:09 UTC (rev 258303)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-12 01:22:17 UTC (rev 258304)
@@ -528,6 +528,10 @@
 else
 m_processType = ProcessType::WebContent;
 
+#if PLATFORM(MAC)
+registerWithAccessibility();
+#endif
+
 #if USE(OS_STATE)
 registerWithStateDumper();
 #endif
@@ -976,9 +980,9 @@
 #if PLATFORM(IOS_FAMILY)
 bool ok = SandboxExtension::consumePermanently(handle);
 ASSERT_UNUSED(ok, ok);
-#endif
 
 registerWithAccessibility();
+#endif
 }
 
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258298] trunk/Source/WebKit

2020-03-11 Thread pvollan
Title: [258298] trunk/Source/WebKit








Revision 258298
Author pvol...@apple.com
Date 2020-03-11 16:58:38 -0700 (Wed, 11 Mar 2020)


Log Message
Unreviewed, reverting r258294.
https://bugs.webkit.org/show_bug.cgi?id=208957

Introduced API failure (Requested by perarne on #webkit).

Reverted changeset:

"[macOS] _AXSApplicationAccessibilityEnabled should not be
called"
https://bugs.webkit.org/show_bug.cgi?id=208953
https://trac.webkit.org/changeset/258294

Patch by Commit Queue  on 2020-03-11

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258297 => 258298)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 23:56:44 UTC (rev 258297)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 23:58:38 UTC (rev 258298)
@@ -1,3 +1,17 @@
+2020-03-11  Commit Queue  
+
+Unreviewed, reverting r258294.
+https://bugs.webkit.org/show_bug.cgi?id=208957
+
+Introduced API failure (Requested by perarne on #webkit).
+
+Reverted changeset:
+
+"[macOS] _AXSApplicationAccessibilityEnabled should not be
+called"
+https://bugs.webkit.org/show_bug.cgi?id=208953
+https://trac.webkit.org/changeset/258294
+
 2020-03-11  Kate Cheney  
 
 Add a parameter to allow ignoring app-bound domain categorization


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258297 => 258298)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 23:56:44 UTC (rev 258297)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 23:58:38 UTC (rev 258298)
@@ -455,10 +455,7 @@
 }
 
 #if ENABLE(CFPREFS_DIRECT_MODE)
-#if PLATFORM(IOS_FAMILY)
-if (_AXSApplicationAccessibilityEnabled())
-#endif
-{
+if (libAccessibilityLibrary() && _AXSApplicationAccessibilityEnabled()) {
 SandboxExtension::Handle preferencesExtensionHandle;
 SandboxExtension::createHandleForMachLookup("com.apple.cfprefsd.daemon", WTF::nullopt, preferencesExtensionHandle);
 parameters.preferencesExtensionHandle = WTFMove(preferencesExtensionHandle);


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (258297 => 258298)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 23:56:44 UTC (rev 258297)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 23:58:38 UTC (rev 258298)
@@ -46,6 +46,10 @@
 
 namespace WebKit {
 
+#if PLATFORM(MAC)
+SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
+#endif
+
 static const Seconds unexpectedActivityDuration = 10_s;
 
 const HashSet& WebProcessProxy::platformPathsWithAssumedReadAccess()
@@ -210,10 +214,12 @@
 {
 if (m_hasSentMessageToUnblockAccessibilityServer)
 return;
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(MAC)
+if (!WebKit::libAccessibilityLibrary())
+return;
+#endif
 if (!_AXSApplicationAccessibilityEnabled())
 return;
-#endif
 if (!processIdentifier())
 return;
 if (!canSendMessage())






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258294] trunk/Source/WebKit

2020-03-11 Thread pvollan
Title: [258294] trunk/Source/WebKit








Revision 258294
Author pvol...@apple.com
Date 2020-03-11 16:27:19 -0700 (Wed, 11 Mar 2020)


Log Message
[macOS] _AXSApplicationAccessibilityEnabled should not be called
https://bugs.webkit.org/show_bug.cgi?id=208953

Reviewed by Brent Fulgham.

This function should only be called on iOS, not on macOS.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258293 => 258294)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 22:42:08 UTC (rev 258293)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 23:27:19 UTC (rev 258294)
@@ -1,3 +1,17 @@
+2020-03-11  Per Arne Vollan  
+
+[macOS] _AXSApplicationAccessibilityEnabled should not be called
+https://bugs.webkit.org/show_bug.cgi?id=208953
+
+Reviewed by Brent Fulgham.
+
+This function should only be called on iOS, not on macOS.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
+
 2020-03-11  Jiewen Tan  
 
 [WebAuthn] Formalize the Keychain schema


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258293 => 258294)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 22:42:08 UTC (rev 258293)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 23:27:19 UTC (rev 258294)
@@ -455,7 +455,10 @@
 }
 
 #if ENABLE(CFPREFS_DIRECT_MODE)
-if (libAccessibilityLibrary() && _AXSApplicationAccessibilityEnabled()) {
+#if PLATFORM(IOS_FAMILY)
+if (_AXSApplicationAccessibilityEnabled())
+#endif
+{
 SandboxExtension::Handle preferencesExtensionHandle;
 SandboxExtension::createHandleForMachLookup("com.apple.cfprefsd.daemon", WTF::nullopt, preferencesExtensionHandle);
 parameters.preferencesExtensionHandle = WTFMove(preferencesExtensionHandle);


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (258293 => 258294)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 22:42:08 UTC (rev 258293)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 23:27:19 UTC (rev 258294)
@@ -46,10 +46,6 @@
 
 namespace WebKit {
 
-#if PLATFORM(MAC)
-SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
-#endif
-
 static const Seconds unexpectedActivityDuration = 10_s;
 
 const HashSet& WebProcessProxy::platformPathsWithAssumedReadAccess()
@@ -214,12 +210,10 @@
 {
 if (m_hasSentMessageToUnblockAccessibilityServer)
 return;
-#if PLATFORM(MAC)
-if (!WebKit::libAccessibilityLibrary())
+#if PLATFORM(IOS_FAMILY)
+if (!_AXSApplicationAccessibilityEnabled())
 return;
 #endif
-if (!_AXSApplicationAccessibilityEnabled())
-return;
 if (!processIdentifier())
 return;
 if (!canSendMessage())






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258289] trunk/Source/WebKit

2020-03-11 Thread pvollan
Title: [258289] trunk/Source/WebKit








Revision 258289
Author pvol...@apple.com
Date 2020-03-11 15:18:04 -0700 (Wed, 11 Mar 2020)


Log Message
[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
https://bugs.webkit.org/show_bug.cgi?id=208945

Unreviewed temporary compile fix.

* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258288 => 258289)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 22:01:20 UTC (rev 258288)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 22:18:04 UTC (rev 258289)
@@ -3,6 +3,16 @@
 [macOS] Crash under WebKit::WebProcessPool::platformInitialize()
 https://bugs.webkit.org/show_bug.cgi?id=208945
 
+Unreviewed temporary compile fix.
+
+* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
+
+2020-03-11  Per Arne Vollan  
+
+[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
+https://bugs.webkit.org/show_bug.cgi?id=208945
+
 Reviewed by Tim Horton.
 
 Check that accessibility library is present before attempting to call functions in it.


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (258288 => 258289)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 22:01:20 UTC (rev 258288)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 22:18:04 UTC (rev 258289)
@@ -44,12 +44,12 @@
 #import <_javascript_Core/RemoteInspectorConstants.h>
 #endif
 
-#if PLATFORM(COCOA)
+namespace WebKit {
+
+#if PLATFORM(MAC)
 SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
 #endif
 
-namespace WebKit {
-
 static const Seconds unexpectedActivityDuration = 10_s;
 
 const HashSet& WebProcessProxy::platformPathsWithAssumedReadAccess()
@@ -214,8 +214,10 @@
 {
 if (m_hasSentMessageToUnblockAccessibilityServer)
 return;
-if (!libAccessibilityLibrary())
+#if PLATFORM(MAC)
+if (!WebKit::libAccessibilityLibrary())
 return;
+#endif
 if (!_AXSApplicationAccessibilityEnabled())
 return;
 if (!processIdentifier())






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258288] trunk/Source/WebKit

2020-03-11 Thread pvollan
Title: [258288] trunk/Source/WebKit








Revision 258288
Author pvol...@apple.com
Date 2020-03-11 15:01:20 -0700 (Wed, 11 Mar 2020)


Log Message
[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
https://bugs.webkit.org/show_bug.cgi?id=208945

Reviewed by Tim Horton.

Check that accessibility library is present before attempting to call functions in it.

No new tests, since I am not able to reproduce.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258287 => 258288)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 21:57:33 UTC (rev 258287)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 22:01:20 UTC (rev 258288)
@@ -2,6 +2,22 @@
 
 [macOS] Crash under WebKit::WebProcessPool::platformInitialize()
 https://bugs.webkit.org/show_bug.cgi?id=208945
+
+Reviewed by Tim Horton.
+
+Check that accessibility library is present before attempting to call functions in it.
+
+No new tests, since I am not able to reproduce.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
+
+2020-03-11  Per Arne Vollan  
+
+[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
+https://bugs.webkit.org/show_bug.cgi?id=208945
 
 
 Reviewed by Brent Fulgham.


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258287 => 258288)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 21:57:33 UTC (rev 258287)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 22:01:20 UTC (rev 258288)
@@ -455,7 +455,7 @@
 }
 
 #if ENABLE(CFPREFS_DIRECT_MODE)
-if (_AXSApplicationAccessibilityEnabled()) {
+if (libAccessibilityLibrary() && _AXSApplicationAccessibilityEnabled()) {
 SandboxExtension::Handle preferencesExtensionHandle;
 SandboxExtension::createHandleForMachLookup("com.apple.cfprefsd.daemon", WTF::nullopt, preferencesExtensionHandle);
 parameters.preferencesExtensionHandle = WTFMove(preferencesExtensionHandle);


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (258287 => 258288)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 21:57:33 UTC (rev 258287)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-11 22:01:20 UTC (rev 258288)
@@ -44,6 +44,10 @@
 #import <_javascript_Core/RemoteInspectorConstants.h>
 #endif
 
+#if PLATFORM(COCOA)
+SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
+#endif
+
 namespace WebKit {
 
 static const Seconds unexpectedActivityDuration = 10_s;
@@ -210,6 +214,8 @@
 {
 if (m_hasSentMessageToUnblockAccessibilityServer)
 return;
+if (!libAccessibilityLibrary())
+return;
 if (!_AXSApplicationAccessibilityEnabled())
 return;
 if (!processIdentifier())






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258284] trunk/Source

2020-03-11 Thread pvollan
Title: [258284] trunk/Source








Revision 258284
Author pvol...@apple.com
Date 2020-03-11 14:25:24 -0700 (Wed, 11 Mar 2020)


Log Message
[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
https://bugs.webkit.org/show_bug.cgi?id=208945
Source/WebKit:



Reviewed by Brent Fulgham.

Check that accessibility library is present before attempting to use constants from it.

No new tests, since I am unable to reproduce.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

Source/WTF:


Reviewed by Brent Fulgham.

Add macro to optionally soft link library.

* wtf/cocoa/SoftLinking.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/cocoa/SoftLinking.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm




Diff

Modified: trunk/Source/WTF/ChangeLog (258283 => 258284)

--- trunk/Source/WTF/ChangeLog	2020-03-11 21:02:10 UTC (rev 258283)
+++ trunk/Source/WTF/ChangeLog	2020-03-11 21:25:24 UTC (rev 258284)
@@ -1,3 +1,14 @@
+2020-03-11  Per Arne Vollan  
+
+[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
+https://bugs.webkit.org/show_bug.cgi?id=208945
+
+Reviewed by Brent Fulgham.
+
+Add macro to optionally soft link library.
+
+* wtf/cocoa/SoftLinking.h:
+
 2020-03-11  Alex Christensen  
 
 Enable safe browsing warnings in Mac Catalyst WebKit


Modified: trunk/Source/WTF/wtf/cocoa/SoftLinking.h (258283 => 258284)

--- trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2020-03-11 21:02:10 UTC (rev 258283)
+++ trunk/Source/WTF/wtf/cocoa/SoftLinking.h	2020-03-11 21:25:24 UTC (rev 258284)
@@ -42,6 +42,16 @@
 return dylib; \
 }
 
+#define SOFT_LINK_LIBRARY_OPTIONAL(lib) \
+static void* lib##Library() \
+{ \
+static void* dylib = ^{ \
+void *result = dlopen("/usr/lib/" #lib ".dylib", RTLD_NOW); \
+return result; \
+}(); \
+return dylib; \
+}
+
 #define SOFT_LINK_FRAMEWORK(framework) \
 static void* framework##Library() \
 { \


Modified: trunk/Source/WebKit/ChangeLog (258283 => 258284)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 21:02:10 UTC (rev 258283)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 21:25:24 UTC (rev 258284)
@@ -1,3 +1,19 @@
+2020-03-11  Per Arne Vollan  
+
+[macOS] Crash under WebKit::WebProcessPool::platformInitialize()
+https://bugs.webkit.org/show_bug.cgi?id=208945
+
+
+Reviewed by Brent Fulgham.
+
+Check that accessibility library is present before attempting to use constants from it.
+
+No new tests, since I am unable to reproduce.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::registerNotificationObservers):
+(WebKit::WebProcessPool::unregisterNotificationObservers):
+
 2020-03-11  Alex Christensen  
 
 Enable safe browsing warnings in Mac Catalyst WebKit


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258283 => 258284)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 21:02:10 UTC (rev 258283)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-11 21:25:24 UTC (rev 258284)
@@ -118,6 +118,10 @@
 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());
 #endif
 
+#if PLATFORM(COCOA)
+SOFT_LINK_LIBRARY_OPTIONAL(libAccessibility)
+#endif
+
 #define WEBPROCESSPOOL_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - WebProcessPool::" fmt, this, ##__VA_ARGS__)
 
 namespace WebKit {
@@ -662,12 +666,14 @@
 #endif
 #endif // PLATFORM(IOS)
 #endif // !PLATFORM(IOS_FAMILY)
-m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
-for (size_t i = 0; i < m_processes.size(); ++i) {
-m_processes[i]->unblockPreferenceServiceIfNeeded();
-m_processes[i]->unblockAccessibilityServerIfNeeded();
-}
-}];
+if (libAccessibilityLibrary()) {
+m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
+for (size_t i = 0; i < m_processes.size(); ++i) {
+m_processes[i]->unblockPreferenceServiceIfNeeded();
+m_processes[i]->unblockAccessibilityServerIfNeeded();
+}
+}];
+}
 }
 
 void WebProcessPool::unregisterNotificationObservers()
@@ -692,7 +698,8 @@
 #endif
 #endif // PLATFORM(IOS)
 #endif // !PLATFORM(IOS_FAMILY)
-[[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()];
+if (m_accessibilityEnabledObserver.get())
+

[webkit-changes] [258252] trunk/Source/WebKit

2020-03-10 Thread pvollan
Title: [258252] trunk/Source/WebKit








Revision 258252
Author pvol...@apple.com
Date 2020-03-10 21:51:25 -0700 (Tue, 10 Mar 2020)


Log Message
[iOS] A syscall is denied by the sandbox
https://bugs.webkit.org/show_bug.cgi?id=208892


Reviewed by Brent Fulgham.

Add denied syscall to sandbox on iOS.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (258251 => 258252)

--- trunk/Source/WebKit/ChangeLog	2020-03-11 04:25:22 UTC (rev 258251)
+++ trunk/Source/WebKit/ChangeLog	2020-03-11 04:51:25 UTC (rev 258252)
@@ -1,3 +1,15 @@
+2020-03-10  Per Arne Vollan  
+
+[iOS] A syscall is denied by the sandbox
+https://bugs.webkit.org/show_bug.cgi?id=208892
+
+
+Reviewed by Brent Fulgham.
+
+Add denied syscall to sandbox on iOS.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-08  Darin Adler  
 
 Make TextIterator::range return a SimpleRange


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258251 => 258252)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-11 04:25:22 UTC (rev 258251)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-11 04:51:25 UTC (rev 258252)
@@ -1056,5 +1056,6 @@
 (syscall-number SYS_psynch_rw_rdlock) ;; 
 (syscall-number SYS_faccessat) ;; 
 (syscall-number SYS_objc_bp_assist_cfg_np) ;; 
+(syscall-number SYS_shared_region_map_and_slide_2_np) ;; 
 )
 )






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258174] trunk

2020-03-09 Thread pvollan
Title: [258174] trunk








Revision 258174
Author pvol...@apple.com
Date 2020-03-09 16:48:02 -0700 (Mon, 09 Mar 2020)


Log Message
[macOS] Notification observer is not removed
https://bugs.webkit.org/show_bug.cgi?id=208834

Reviewed by Tim Horton.

Source/WebKit:

The Accessibility notification observer is not being removed on macOS.

API test: WebKit.EnableAccessibilityCrash

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::unregisterNotificationObservers):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258173 => 258174)

--- trunk/Source/WebKit/ChangeLog	2020-03-09 23:47:18 UTC (rev 258173)
+++ trunk/Source/WebKit/ChangeLog	2020-03-09 23:48:02 UTC (rev 258174)
@@ -1,5 +1,19 @@
 2020-03-09  Per Arne Vollan  
 
+[macOS] Notification observer is not removed
+https://bugs.webkit.org/show_bug.cgi?id=208834
+
+Reviewed by Tim Horton.
+
+The Accessibility notification observer is not being removed on macOS.
+
+API test: WebKit.EnableAccessibilityCrash
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::unregisterNotificationObservers):
+
+2020-03-09  Per Arne Vollan  
+
 [iOS] Only map UTI from tags in Safari
 https://bugs.webkit.org/show_bug.cgi?id=208829
 


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258173 => 258174)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-09 23:47:18 UTC (rev 258173)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-09 23:48:02 UTC (rev 258174)
@@ -687,12 +687,12 @@
 #elif !PLATFORM(MACCATALYST)
 CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, static_cast(UIBacklightLevelChangedNotification) , nullptr);
 #if PLATFORM(IOS)
-[[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()];
 #if ENABLE(REMOTE_INSPECTOR)
 CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, CFSTR(WIRServiceEnabledNotification), nullptr);
 #endif
 #endif // PLATFORM(IOS)
 #endif // !PLATFORM(IOS_FAMILY)
+[[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()];
 }
 
 static CFURLStorageSessionRef privateBrowsingSession()


Modified: trunk/Tools/ChangeLog (258173 => 258174)

--- trunk/Tools/ChangeLog	2020-03-09 23:47:18 UTC (rev 258173)
+++ trunk/Tools/ChangeLog	2020-03-09 23:48:02 UTC (rev 258174)
@@ -1,3 +1,14 @@
+2020-03-09  Per Arne Vollan  
+
+[macOS] Notification observer is not removed
+https://bugs.webkit.org/show_bug.cgi?id=208834
+
+Reviewed by Tim Horton.
+
+* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+* TestWebKitAPI/Tests/WebKit/EnableAccessibility.mm: Added.
+(TEST):
+
 2020-03-06  Brian Burg  
 
 upload.py gets confused by git-svn checkouts, unable to upload test results from my desk build


Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (258173 => 258174)

--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-03-09 23:47:18 UTC (rev 258173)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-03-09 23:48:02 UTC (rev 258174)
@@ -883,6 +883,7 @@
 		C0ADBE9612FCA79B00D2C129 /* simple-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C0ADBE8412FCA6B600D2C129 /* simple-form.html */; };
 		C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */; };
 		C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */; };
+		C13D82D92416F13200A62793 /* EnableAccessibility.mm in Sources */ = {isa = PBXBuildFile; fileRef = C13D82D82416F13200A62793 /* EnableAccessibility.mm */; };
 		C145CC0C23DA5A1F003A5EEB /* MimeTypes.mm in Sources */ = {isa = PBXBuildFile; fileRef = C145CC0B23DA5A0F003A5EEB /* MimeTypes.mm */; };
 		C15CBB3023F1FF1A00300CC7 /* BacklightLevelNotification.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */; };
 		C15CBB3F23FB177A00300CC7 /* PreferenceChanges.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB3E23FB177A00300CC7 /* PreferenceChanges.mm */; };
@@ -2457,6 +2458,7 @@
 		C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */ = {isa = PBXFileReference; 

[webkit-changes] [258168] trunk/Source/WebKit

2020-03-09 Thread pvollan
Title: [258168] trunk/Source/WebKit








Revision 258168
Author pvol...@apple.com
Date 2020-03-09 15:35:04 -0700 (Mon, 09 Mar 2020)


Log Message
[iOS] Only map UTI from tags in Safari
https://bugs.webkit.org/show_bug.cgi?id=208829


Reviewed by Tim Horton.

Since this mapping caused regressions in other apps, only enable it for Safari as a temporary workaround.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258167 => 258168)

--- trunk/Source/WebKit/ChangeLog	2020-03-09 22:27:41 UTC (rev 258167)
+++ trunk/Source/WebKit/ChangeLog	2020-03-09 22:35:04 UTC (rev 258168)
@@ -1,5 +1,20 @@
 2020-03-09  Per Arne Vollan  
 
+[iOS] Only map UTI from tags in Safari
+https://bugs.webkit.org/show_bug.cgi?id=208829
+
+
+Reviewed by Tim Horton.
+
+Since this mapping caused regressions in other apps, only enable it for Safari as a temporary workaround.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeWebProcess):
+
+2020-03-09  Per Arne Vollan  
+
 Unreviewed build fix.
 
 * Shared/WebProcessCreationParameters.cpp:


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258167 => 258168)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-09 22:27:41 UTC (rev 258167)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-09 22:35:04 UTC (rev 258168)
@@ -432,7 +432,8 @@
 parameters.focusRingColor = RenderTheme::singleton().focusRingColor(OptionSet());
 parameters.localizedDeviceModel = localizedDeviceModel();
 #if USE(UTTYPE_SWIZZLER)
-parameters.vectorOfUTTypeItem = createVectorOfUTTypeItem();
+if (WebCore::IOSApplication::isMobileSafari())
+parameters.vectorOfUTTypeItem = createVectorOfUTTypeItem();
 #endif
 #endif
 


Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (258167 => 258168)

--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-09 22:27:41 UTC (rev 258167)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-03-09 22:35:04 UTC (rev 258168)
@@ -299,8 +299,10 @@
 #endif
 
 #if USE(UTTYPE_SWIZZLER)
-swizzleUTTypeRecord();
-setVectorOfUTTypeItem(WTFMove(parameters.vectorOfUTTypeItem));
+if (!parameters.vectorOfUTTypeItem.isEmpty()) {
+swizzleUTTypeRecord();
+setVectorOfUTTypeItem(WTFMove(parameters.vectorOfUTTypeItem));
+}
 #endif
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258162] trunk/Source/WebKit

2020-03-09 Thread pvollan
Title: [258162] trunk/Source/WebKit








Revision 258162
Author pvol...@apple.com
Date 2020-03-09 14:46:33 -0700 (Mon, 09 Mar 2020)


Log Message
Unreviewed build fix.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (258161 => 258162)

--- trunk/Source/WebKit/ChangeLog	2020-03-09 21:14:46 UTC (rev 258161)
+++ trunk/Source/WebKit/ChangeLog	2020-03-09 21:46:33 UTC (rev 258162)
@@ -1,3 +1,10 @@
+2020-03-09  Per Arne Vollan  
+
+Unreviewed build fix.
+
+* Shared/WebProcessCreationParameters.cpp:
+(WebKit::WebProcessCreationParameters::decode):
+
 2020-03-09  Jer Noble  
 
 [GPUP] Implement Legacy EME API in the GPU Process


Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (258161 => 258162)

--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-03-09 21:14:46 UTC (rev 258161)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-03-09 21:46:33 UTC (rev 258162)
@@ -498,7 +498,7 @@
 return false;
 
 #if USE(UTTYPE_SWIZZLER)
-Optional> vectorOfUTTypeItem;
+Optional> vectorOfUTTypeItem;
 decoder >> vectorOfUTTypeItem;
 if (!vectorOfUTTypeItem)
 return false;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258127] trunk/Source/WebCore

2020-03-08 Thread pvollan
Title: [258127] trunk/Source/WebCore








Revision 258127
Author pvol...@apple.com
Date 2020-03-08 18:32:25 -0700 (Sun, 08 Mar 2020)


Log Message
Unreviewed, speculative link fix.

* platform/cocoa/UTTypeRecordSwizzler.mm:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (258126 => 258127)

--- trunk/Source/WebCore/ChangeLog	2020-03-09 01:25:06 UTC (rev 258126)
+++ trunk/Source/WebCore/ChangeLog	2020-03-09 01:32:25 UTC (rev 258127)
@@ -4,6 +4,12 @@
 
 * platform/cocoa/UTTypeRecordSwizzler.mm:
 
+2020-03-08  Per Arne Vollan  
+
+Unreviewed, speculative link fix.
+
+* platform/cocoa/UTTypeRecordSwizzler.mm:
+
 2020-03-08  Konstantin Tokarev  
 
 [CMake] Unreviewed build fix for Mac port


Modified: trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm (258126 => 258127)

--- trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm	2020-03-09 01:25:06 UTC (rev 258126)
+++ trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm	2020-03-09 01:32:25 UTC (rev 258127)
@@ -32,6 +32,7 @@
 
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258126] trunk/Source/WebCore

2020-03-08 Thread pvollan
Title: [258126] trunk/Source/WebCore








Revision 258126
Author pvol...@apple.com
Date 2020-03-08 18:25:06 -0700 (Sun, 08 Mar 2020)


Log Message
Unreviewed, speculative link fix.

* platform/cocoa/UTTypeRecordSwizzler.mm:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (258125 => 258126)

--- trunk/Source/WebCore/ChangeLog	2020-03-09 01:03:34 UTC (rev 258125)
+++ trunk/Source/WebCore/ChangeLog	2020-03-09 01:25:06 UTC (rev 258126)
@@ -1,3 +1,9 @@
+2020-03-08  Per Arne Vollan  
+
+Unreviewed, speculative link fix.
+
+* platform/cocoa/UTTypeRecordSwizzler.mm:
+
 2020-03-08  Konstantin Tokarev  
 
 [CMake] Unreviewed build fix for Mac port


Modified: trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm (258125 => 258126)

--- trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm	2020-03-09 01:03:34 UTC (rev 258125)
+++ trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm	2020-03-09 01:25:06 UTC (rev 258126)
@@ -36,6 +36,7 @@
 #import 
 #import 
 #import 
+#import 
 #import 
 
 __attribute__((visibility("default")))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258121] trunk/Source/WTF

2020-03-08 Thread pvollan
Title: [258121] trunk/Source/WTF








Revision 258121
Author pvol...@apple.com
Date 2020-03-08 17:27:34 -0700 (Sun, 08 Mar 2020)


Log Message
Unreviewed build fix.

* wtf/PlatformUse.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformUse.h




Diff

Modified: trunk/Source/WTF/ChangeLog (258120 => 258121)

--- trunk/Source/WTF/ChangeLog	2020-03-08 23:52:40 UTC (rev 258120)
+++ trunk/Source/WTF/ChangeLog	2020-03-09 00:27:34 UTC (rev 258121)
@@ -1,5 +1,11 @@
 2020-03-08  Per Arne Vollan  
 
+Unreviewed build fix.
+
+* wtf/PlatformUse.h:
+
+2020-03-08  Per Arne Vollan  
+
 [iOS] Mapping to UTI from tag and tag class should be performed in the UI process
 https://bugs.webkit.org/show_bug.cgi?id=208783
 


Modified: trunk/Source/WTF/wtf/PlatformUse.h (258120 => 258121)

--- trunk/Source/WTF/wtf/PlatformUse.h	2020-03-08 23:52:40 UTC (rev 258120)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2020-03-09 00:27:34 UTC (rev 258121)
@@ -321,6 +321,6 @@
 #define USE_CTFONTTRANSFORMGLYPHSWITHLANGUAGE 1
 #endif
 
-#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 14
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 14
 #define USE_UTTYPE_SWIZZLER 1
 #endif






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258120] trunk

2020-03-08 Thread pvollan
Title: [258120] trunk








Revision 258120
Author pvol...@apple.com
Date 2020-03-08 16:52:40 -0700 (Sun, 08 Mar 2020)


Log Message
[iOS] Mapping to UTI from tag and tag class should be performed in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208783

Reviewed by Brent Fulgham.

Source/WebCore:

This mapping should be done in the UI process, since it is using a system service that will no longer be available
in the WebContent process. To achieve this, the method +[UTTypeRecord typeRecordWithTagOverride] is swizzled in
the WebContent process, and is using the cached mapping sent from the UI process.

API test: WebKit.UTIFromTag

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/UTTypeRecordSwizzler.h: Added.
(WebCore::UTTypeItem::encode const):
(WebCore::UTTypeItem::decode):
* platform/cocoa/UTTypeRecordSwizzler.mm: Added.
(-[WebUTTypeRecord setIdentifier:]):
(WebCore::vectorOfUTTypeRecords):
(WebCore::typeRecordWithTagOverride):
(WebCore::createVectorOfUTTypeItem):
(WebCore::setVectorOfUTTypeItem):
(WebCore::swizzleUTTypeRecord):
* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::UTIFromTag):
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromTag):
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.mm:
(WebCore::Internals::getUTIFromTag):

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cocoa/NSUTTypeRecordSPI.h: Added.

Source/WebKit:

Send mapping from tag/tag class to UTI from the UI process to the WebContent process as part of the WebProcess
creation parameters. Also, issue some mach-lookup extensions to the WebContent process if Accessibility is
enabled.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

* wtf/PlatformUse.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformUse.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/network/mac/UTIUtilities.h
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/PAL/pal/spi/cocoa/NSUTTypeRecordSPI.h
trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.h
trunk/Source/WebCore/platform/cocoa/UTTypeRecordSwizzler.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit/UTIFromTag.mm




Diff

Modified: trunk/Source/WTF/ChangeLog (258119 => 258120)

--- trunk/Source/WTF/ChangeLog	2020-03-08 23:23:03 UTC (rev 258119)
+++ trunk/Source/WTF/ChangeLog	2020-03-08 23:52:40 UTC (rev 258120)
@@ -1,3 +1,12 @@
+2020-03-08  Per Arne Vollan  
+
+[iOS] Mapping to UTI from tag and tag class should be performed in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208783
+
+Reviewed by Brent Fulgham.
+
+* wtf/PlatformUse.h:
+
 2020-03-08  Wenson Hsieh  
 
 Lazily generate CGPaths for some simple types of paths, such as arcs and lines


Modified: trunk/Source/WTF/wtf/PlatformUse.h (258119 => 258120)

--- trunk/Source/WTF/wtf/PlatformUse.h	2020-03-08 23:23:03 UTC (rev 258119)
+++ trunk/Source/WTF/wtf/PlatformUse.h	2020-03-08 23:52:40 UTC (rev 258120)
@@ -320,3 +320,7 @@
 #if PLATFORM(COCOA) && !(PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101600)
 #define USE_CTFONTTRANSFORMGLYPHSWITHLANGUAGE 1
 #endif
+
+#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 14
+#define USE_UTTYPE_SWIZZLER 1
+#endif


Modified: trunk/Source/WebCore/ChangeLog (258119 => 258120)

--- trunk/Source/WebCore/ChangeLog	2020-03-08 23:23:03 UTC (rev 258119)
+++ trunk/Source/WebCore/ChangeLog	2020-03-08 23:52:40 UTC (rev 258120)
@@ -1,3 +1,37 @@
+2020-03-08  Per Arne Vollan  
+
+[iOS] Mapping to UTI from tag and tag class should be performed in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208783
+
+Reviewed by Brent Fulgham.
+
+This mapping should be 

[webkit-changes] [258119] trunk/Source/WebKit

2020-03-08 Thread pvollan
Title: [258119] trunk/Source/WebKit








Revision 258119
Author pvol...@apple.com
Date 2020-03-08 16:23:03 -0700 (Sun, 08 Mar 2020)


Log Message
REGRESSION (r258064): API tests intermittently crashing under WebKit::registerDefaultsOverride
https://bugs.webkit.org/show_bug.cgi?id=208784


Reviewed by Darin Adler.

Speculative crash fix; swizzle [NSUserDefaults registerDefaults:] on the main thread, instead of on a worker thread.

No new tests, since I have not been able to reproduce this issue.

* UIProcess/Cocoa/PreferenceObserver.h:
* UIProcess/Cocoa/PreferenceObserver.mm:
(registerDefaultsOverride):
(+[WKPreferenceObserver swizzleRegisterDefaults]):
(-[WKPreferenceObserver init]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (258118 => 258119)

--- trunk/Source/WebKit/ChangeLog	2020-03-08 23:13:45 UTC (rev 258118)
+++ trunk/Source/WebKit/ChangeLog	2020-03-08 23:23:03 UTC (rev 258119)
@@ -1,3 +1,23 @@
+2020-03-08  Per Arne Vollan  
+
+REGRESSION (r258064): API tests intermittently crashing under WebKit::registerDefaultsOverride
+https://bugs.webkit.org/show_bug.cgi?id=208784
+
+
+Reviewed by Darin Adler.
+
+Speculative crash fix; swizzle [NSUserDefaults registerDefaults:] on the main thread, instead of on a worker thread.
+
+No new tests, since I have not been able to reproduce this issue.
+
+* UIProcess/Cocoa/PreferenceObserver.h:
+* UIProcess/Cocoa/PreferenceObserver.mm:
+(registerDefaultsOverride):
+(+[WKPreferenceObserver swizzleRegisterDefaults]):
+(-[WKPreferenceObserver init]):
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitialize):
+
 2020-03-08  Wenson Hsieh  
 
 Lazily generate CGPaths for some simple types of paths, such as arcs and lines


Modified: trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h (258118 => 258119)

--- trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h	2020-03-08 23:13:45 UTC (rev 258118)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h	2020-03-08 23:23:03 UTC (rev 258119)
@@ -46,5 +46,6 @@
 Vector> m_userDefaults;
 }
 + (id)sharedInstance;
++ (void)swizzleRegisterDefaults;
 - (void)preferenceDidChange:(NSString *)domain key:(NSString *)key encodedValue:(NSString *)encodedValue;
 @end


Modified: trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm (258118 => 258119)

--- trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-08 23:13:45 UTC (rev 258118)
+++ trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-08 23:23:03 UTC (rev 258119)
@@ -36,7 +36,8 @@
 static void registerDefaultsOverride(id self, SEL selector, NSDictionary *dictionary)
 {
 registeringDefaults = true;
-wtfCallIMP(registerDefaultsOriginal, self, selector, dictionary);
+if (registerDefaultsOriginal)
+wtfCallIMP(registerDefaultsOriginal, self, selector, dictionary);
 registeringDefaults = false;
 }
 
@@ -100,11 +101,17 @@
 return instance;
 }
 
++ (void)swizzleRegisterDefaults
+{
+static std::once_flag onceFlag;
+std::call_once(onceFlag, [] {
+Method registerDefaultsMethod = class_getInstanceMethod(objc_getClass("NSUserDefaults"), @selector(registerDefaults:));
+registerDefaultsOriginal = method_setImplementation(registerDefaultsMethod, (IMP)registerDefaultsOverride);
+});
+}
+
 - (instancetype)init
 {
-Method registerDefaultsMethod = class_getInstanceMethod(objc_getClass("NSUserDefaults"), @selector(registerDefaults:));
-registerDefaultsOriginal = method_setImplementation(registerDefaultsMethod, (IMP)registerDefaultsOverride);
-
 std::initializer_list domains = {
 @"com.apple.Accessibility",
 #if PLATFORM(IOS_FAMILY)


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258118 => 258119)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-08 23:13:45 UTC (rev 258118)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-08 23:23:03 UTC (rev 258119)
@@ -175,6 +175,7 @@
 setLegacyCustomProtocolManagerClient(makeUnique());
 
 #if ENABLE(CFPREFS_DIRECT_MODE)
+[WKPreferenceObserver swizzleRegisterDefaults];
 dispatch_async(dispatch_get_global_queue(QOS_CLASS_BACKGROUND, 0), ^{
 // Start observing preference changes.
 [WKPreferenceObserver sharedInstance];






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [258064] trunk

2020-03-06 Thread pvollan
Title: [258064] trunk








Revision 258064
Author pvol...@apple.com
Date 2020-03-06 22:58:10 -0800 (Fri, 06 Mar 2020)


Log Message
[Cocoa] Re-enable CFPrefs direct mode
https://bugs.webkit.org/show_bug.cgi?id=208690

Reviewed by Brent Fulgham.

Source/WebKit:

This patch re-enabled CF prefs direct mode on iOS and macOS, and addresses performance issues and Accessibility issues
with the original patch. Performance issues are addressed by creating the NSUserDefaults objects in the UI process on
a non-main thread, while the Accessibility issues are fixed by issuing an extension to the preferences service when
Accessibility is enabled.

API test: WebKit.GrantAccessPreferencesService

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _grantAccessToPreferenceService]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/PreferenceObserver.mm:
(registerDefaultsOverride):
(-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]):
(-[WKPreferenceObserver init]):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::grantAccessToPreferenceService):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitialize):
(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::registerNotificationObservers):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
(WebKit::WebProcessProxy::unblockPreferenceServiceIfNeeded):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::unblockAccessibilityServer): Deleted.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::platformInitializeProcess):
(WebKit::WebProcess::unblockPreferenceService):
(WebKit::WebProcess::unblockAccessibilityServer):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

* wtf/PlatformEnable.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm: Added.
(TEST):
* TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:
(TestWebKitAPI::TEST):

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformEnable.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
trunk/Source/WebKit/UIProcess/ios/WebProcessProxyIOS.mm
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
trunk/Tools/TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm


Added Paths

trunk/Source/WebKit/Platform/spi/Cocoa/AccessibilitySupportSPI.h
trunk/Tools/TestWebKitAPI/Tests/WebKit/GrantAccessToPreferencesService.mm


Removed Paths

trunk/Source/WebKit/Platform/spi/ios/AccessibilitySupportSPI.h




Diff

Modified: trunk/Source/WTF/ChangeLog (258063 => 258064)

--- trunk/Source/WTF/ChangeLog	2020-03-07 06:28:57 UTC (rev 258063)
+++ trunk/Source/WTF/ChangeLog	2020-03-07 06:58:10 UTC (rev 258064)
@@ -1,3 +1,12 @@
+2020-03-06  Per Arne Vollan  
+
+[Cocoa] Re-enable CFPrefs direct mode
+https://bugs.webkit.org/show_bug.cgi?id=208690
+
+Reviewed by Brent Fulgham.
+
+* wtf/PlatformEnable.h:
+
 2020-03-06  Peng Liu  
 
 Use the feature flags mechanism to give default feature preference values


Modified: trunk/Source/WTF/wtf/PlatformEnable.h (258063 => 258064)

--- 

[webkit-changes] [258013] trunk/Source/WebKit

2020-03-06 Thread pvollan
Title: [258013] trunk/Source/WebKit








Revision 258013
Author pvol...@apple.com
Date 2020-03-06 11:57:41 -0800 (Fri, 06 Mar 2020)


Log Message
[iOS] Adopt entitlement to avoid treating webcontent as a trusted binary in some cases
https://bugs.webkit.org/show_bug.cgi?id=208668

Reviewed by Brent Fulgham.

On iOS, adopt entitlement to avoid treating the WebContent process as a trusted binary in some cases.

* Scripts/process-entitlements.sh:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Scripts/process-entitlements.sh




Diff

Modified: trunk/Source/WebKit/ChangeLog (258012 => 258013)

--- trunk/Source/WebKit/ChangeLog	2020-03-06 19:28:35 UTC (rev 258012)
+++ trunk/Source/WebKit/ChangeLog	2020-03-06 19:57:41 UTC (rev 258013)
@@ -1,3 +1,14 @@
+2020-03-06  Per Arne Vollan  
+
+[iOS] Adopt entitlement to avoid treating webcontent as a trusted binary in some cases
+https://bugs.webkit.org/show_bug.cgi?id=208668
+
+Reviewed by Brent Fulgham.
+
+On iOS, adopt entitlement to avoid treating the WebContent process as a trusted binary in some cases.
+
+* Scripts/process-entitlements.sh:
+
 2020-03-06  Simon Fraser  
 
 Move synchronousScrollingReasons to ScrollingTreeScrollingNode


Modified: trunk/Source/WebKit/Scripts/process-entitlements.sh (258012 => 258013)

--- trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-03-06 19:28:35 UTC (rev 258012)
+++ trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-03-06 19:57:41 UTC (rev 258013)
@@ -131,6 +131,7 @@
 plistbuddy Add :com.apple.QuartzCore.secure-mode bool YES
 plistbuddy Add :com.apple.QuartzCore.webkit-end-points bool YES
 plistbuddy Add :com.apple.mediaremote.set-playback-state bool YES
+plistbuddy Add :com.apple.pac.shared_region_id string WebContent
 plistbuddy Add :com.apple.private.allow-explicit-graphics-priority bool YES
 plistbuddy Add :com.apple.private.coremedia.extensions.audiorecording.allow bool YES
 plistbuddy Add :com.apple.private.coremedia.pidinheritance.allow bool YES






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257879] trunk/Source/WebKit

2020-03-04 Thread pvollan
Title: [257879] trunk/Source/WebKit








Revision 257879
Author pvol...@apple.com
Date 2020-03-04 14:03:26 -0800 (Wed, 04 Mar 2020)


Log Message
Partially revert r256756, since it introduced bugs related to Accessibility.


Unreviewed partial revert of r256756.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (257878 => 257879)

--- trunk/Source/WebKit/ChangeLog	2020-03-04 21:56:55 UTC (rev 257878)
+++ trunk/Source/WebKit/ChangeLog	2020-03-04 22:03:26 UTC (rev 257879)
@@ -1,3 +1,13 @@
+2020-03-04  Per Arne Vollan  
+
+Partially revert r256756, since it introduced bugs related to Accessibility.
+
+
+Unreviewed partial revert of r256756.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2020-03-03  Jiewen Tan  
 
 [WebAuthn] Implement -[_WKWebAuthenticationPanelDelegate panel:decidePolicyForLocalAuthenticatorWithCompletionHandler:] SPI


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257878 => 257879)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-04 21:56:55 UTC (rev 257878)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-04 22:03:26 UTC (rev 257879)
@@ -536,6 +536,7 @@
 (allow mach-lookup
 (global-name "com.apple.logd")
 (global-name "com.apple.logd.events")
+(global-name "com.apple.cfprefsd.daemon")
 )
 
 (deny mach-lookup (with telemetry)


Modified: trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in (257878 => 257879)

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-03-04 21:56:55 UTC (rev 257878)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-03-04 22:03:26 UTC (rev 257879)
@@ -643,6 +643,7 @@
 (with report) (with telemetry)
 #endif
 (global-name "com.apple.PowerManagement.control")
+(global-name "com.apple.cfprefsd.daemon")
 (global-name "com.apple.coreservices.launchservicesd")
 (global-name "com.apple.lsd.mapdb")
 (global-name "com.apple.tccd")






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257875] trunk/Source

2020-03-04 Thread pvollan
Title: [257875] trunk/Source








Revision 257875
Author pvol...@apple.com
Date 2020-03-04 13:26:22 -0800 (Wed, 04 Mar 2020)


Log Message
[Cocoa] Add enable flag to disable direct mode for preferences
https://bugs.webkit.org/show_bug.cgi?id=208588

Reviewed by Brent Fulgham.

Source/WebKit:

Add an enable flag for this feature so it can be toggled, and turn it off.

No new tests, since this patch is reverting to previous behavior covered by existing tests.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

* wtf/PlatformEnable.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/PlatformEnable.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WTF/ChangeLog (257874 => 257875)

--- trunk/Source/WTF/ChangeLog	2020-03-04 21:17:31 UTC (rev 257874)
+++ trunk/Source/WTF/ChangeLog	2020-03-04 21:26:22 UTC (rev 257875)
@@ -1,3 +1,12 @@
+2020-03-04  Per Arne Vollan  
+
+[Cocoa] Add enable flag to disable direct mode for preferences
+https://bugs.webkit.org/show_bug.cgi?id=208588
+
+Reviewed by Brent Fulgham.
+
+* wtf/PlatformEnable.h:
+
 2020-03-03  Megan Gardner  
 
 Build Fix


Modified: trunk/Source/WTF/wtf/PlatformEnable.h (257874 => 257875)

--- trunk/Source/WTF/wtf/PlatformEnable.h	2020-03-04 21:17:31 UTC (rev 257874)
+++ trunk/Source/WTF/wtf/PlatformEnable.h	2020-03-04 21:26:22 UTC (rev 257875)
@@ -871,3 +871,5 @@
 #if ENABLE(WEBGL2) && !ENABLE(WEBGL)
 #error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
 #endif
+
+#define ENABLE_CFPREFS_DIRECT_MODE 0


Modified: trunk/Source/WebKit/ChangeLog (257874 => 257875)

--- trunk/Source/WebKit/ChangeLog	2020-03-04 21:17:31 UTC (rev 257874)
+++ trunk/Source/WebKit/ChangeLog	2020-03-04 21:26:22 UTC (rev 257875)
@@ -1,3 +1,28 @@
+2020-03-04  Per Arne Vollan  
+
+[Cocoa] Add enable flag to disable direct mode for preferences
+https://bugs.webkit.org/show_bug.cgi?id=208588
+
+Reviewed by Brent Fulgham.
+
+Add an enable flag for this feature so it can be toggled, and turn it off.
+
+No new tests, since this patch is reverting to previous behavior covered by existing tests.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+(WebKit::XPCServiceMain):
+* Shared/WebProcessCreationParameters.cpp:
+(WebKit::WebProcessCreationParameters::encode const):
+(WebKit::WebProcessCreationParameters::decode):
+* Shared/WebProcessCreationParameters.h:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeWebProcess):
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2020-03-04  Fujii Hironori  
 
 Unreviewed build fix for WinCairo


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257874 => 257875)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-04 21:17:31 UTC (rev 257874)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-04 21:26:22 UTC (rev 257875)
@@ -846,7 +846,7 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open" "com.apple.mobileassetd" "com.apple.mobileassetd.v2" "com.apple.frontboard.systemappservices" "com.apple.iconservices" "com.apple.webinspector" "com.apple.PowerManagement.control"
+(global-name 

[webkit-changes] [257828] trunk

2020-03-03 Thread pvollan
Title: [257828] trunk








Revision 257828
Author pvol...@apple.com
Date 2020-03-03 21:13:01 -0800 (Tue, 03 Mar 2020)


Log Message
[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208415

Reviewed by Brent Fulgham.

Source/WebCore:

This is currently done in the WebContent process, but since this is using a system service which will be closed,
this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
and send it to the WebContent process.

API test: WebKit.UTIFromMIMEType

* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::mapUTIFromMIMEType):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
(WebCore::cacheUTIFromMimeType):
(WebCore::UTIFromMIMEType):
(WebCore::mimeTypes):
(WebCore::createUTIFromMIMETypeMap):
(WebCore::setUTIFromMIMETypeMap):
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.mm:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mapping between MIME types and UTI types to the WebContent process as part of the Web
process creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/UTIUtilities.h
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (257827 => 257828)

--- trunk/Source/WebCore/ChangeLog	2020-03-04 05:00:35 UTC (rev 257827)
+++ trunk/Source/WebCore/ChangeLog	2020-03-04 05:13:01 UTC (rev 257828)
@@ -1,3 +1,32 @@
+2020-03-03  Per Arne Vollan  
+
+[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208415
+
+Reviewed by Brent Fulgham.
+
+This is currently done in the WebContent process, but since this is using a system service which will be closed,
+this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
+and send it to the WebContent process.
+
+API test: WebKit.UTIFromMIMEType
+
+* platform/network/mac/UTIUtilities.h:
+* platform/network/mac/UTIUtilities.mm:
+(WebCore::mapUTIFromMIMEType):
+(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+(WebCore::cacheUTIFromMimeType):
+(WebCore::UTIFromMIMEType):
+(WebCore::mimeTypes):
+(WebCore::createUTIFromMIMETypeMap):
+(WebCore::setUTIFromMIMETypeMap):
+* testing/Internals.cpp:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.mm:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-03-03  Wenson Hsieh  
 
 Path::m_path should be a RetainPtr on platforms that use CoreGraphics


Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.h (257827 => 257828)

--- trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-04 05:00:35 UTC (rev 257827)
+++ trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-04 05:13:01 UTC (rev 257828)
@@ -23,17 +23,17 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef UTIUtilities_h
-#define UTIUtilities_h
+#pragma once
 
-#import 
-#import 
+#include 
 
 namespace WebCore {
+
 WEBCORE_EXPORT String MIMETypeFromUTI(const String&);
 String MIMETypeFromUTITree(const String&);
 WEBCORE_EXPORT String UTIFromMIMEType(const String&);
 bool isDeclaredUTI(const String&);
+
+WEBCORE_EXPORT void setUTIFromMIMETypeMap(HashMap&&);
+WEBCORE_EXPORT const HashMap& createUTIFromMIMETypeMap();
 }
-
-#endif // UTIUtilities_h


Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm (257827 => 257828)

--- 

[webkit-changes] [257802] trunk/Source/WebKitLegacy/win

2020-03-03 Thread pvollan
Title: [257802] trunk/Source/WebKitLegacy/win








Revision 257802
Author pvol...@apple.com
Date 2020-03-03 14:19:57 -0800 (Tue, 03 Mar 2020)


Log Message
[Win] API header file has USE macro
https://bugs.webkit.org/show_bug.cgi?id=208534

Reviewed by Brent Fulgham.

USE macros should not be used in API header files.

* WebKitCOMAPI.h:

Modified Paths

trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebKitCOMAPI.h




Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (257801 => 257802)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2020-03-03 22:11:29 UTC (rev 257801)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2020-03-03 22:19:57 UTC (rev 257802)
@@ -1,3 +1,14 @@
+2020-03-03  Per Arne Vollan  
+
+[Win] API header file has USE macro
+https://bugs.webkit.org/show_bug.cgi?id=208534
+
+Reviewed by Brent Fulgham.
+
+USE macros should not be used in API header files.
+
+* WebKitCOMAPI.h:
+
 2020-03-03  Devin Rousso  
 
 Web Inspector: setting the frontend appearance doesn't update the window when undocked


Modified: trunk/Source/WebKitLegacy/win/WebKitCOMAPI.h (257801 => 257802)

--- trunk/Source/WebKitLegacy/win/WebKitCOMAPI.h	2020-03-03 22:11:29 UTC (rev 257801)
+++ trunk/Source/WebKitLegacy/win/WebKitCOMAPI.h	2020-03-03 22:19:57 UTC (rev 257802)
@@ -42,10 +42,8 @@
 // This bypasses CoCreateInstance entirely, so registry keys and isolated COM manifests aren't needed.
 HRESULT WEBKIT_API WebKitCreateInstance(REFCLSID, IUnknown* pUnkOuter, REFIID, _COM_Outptr_ void** ppvObject);
 
-#if USE(CF)
 typedef struct __CFBundle* CFBundleRef;
 CFBundleRef WEBKIT_API webKitBundle();
-#endif
 
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257797] trunk/Source/WebKit

2020-03-03 Thread pvollan
Title: [257797] trunk/Source/WebKit








Revision 257797
Author pvol...@apple.com
Date 2020-03-03 13:12:51 -0800 (Tue, 03 Mar 2020)


Log Message
[iOS] Add entitlement for message filtering
https://bugs.webkit.org/show_bug.cgi?id=208526


Reviewed by Brent Fulgham.

On iOS, an entitlement is needed to enable message filtering.

* Scripts/process-entitlements.sh:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Scripts/process-entitlements.sh




Diff

Modified: trunk/Source/WebKit/ChangeLog (257796 => 257797)

--- trunk/Source/WebKit/ChangeLog	2020-03-03 21:08:50 UTC (rev 257796)
+++ trunk/Source/WebKit/ChangeLog	2020-03-03 21:12:51 UTC (rev 257797)
@@ -1,3 +1,15 @@
+2020-03-03  Per Arne Vollan  
+
+[iOS] Add entitlement for message filtering
+https://bugs.webkit.org/show_bug.cgi?id=208526
+
+
+Reviewed by Brent Fulgham.
+
+On iOS, an entitlement is needed to enable message filtering.
+
+* Scripts/process-entitlements.sh:
+
 2020-03-03  Jiten Mehta  
 
 Adopt HTTP Alternative Services Storage


Modified: trunk/Source/WebKit/Scripts/process-entitlements.sh (257796 => 257797)

--- trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-03-03 21:08:50 UTC (rev 257796)
+++ trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-03-03 21:12:51 UTC (rev 257797)
@@ -136,6 +136,7 @@
 plistbuddy Add :com.apple.private.coremedia.pidinheritance.allow bool YES
 plistbuddy Add :com.apple.private.memorystatus bool YES
 plistbuddy Add :com.apple.private.network.socket-delegate bool YES
+plistbuddy Add :com.apple.private.security.message-filter bool YES
 plistbuddy Add :com.apple.private.webinspector.allow-remote-inspection bool YES
 plistbuddy Add :com.apple.private.webinspector.proxy-application bool YES
 plistbuddy Add :dynamic-codesigning bool YES






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257754] trunk

2020-03-02 Thread pvollan
Title: [257754] trunk








Revision 257754
Author pvol...@apple.com
Date 2020-03-02 18:37:35 -0800 (Mon, 02 Mar 2020)


Log Message
[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208415

Reviewed by Brent Fulgham.

Source/WebCore:

This is currently done in the WebContent process, but since this is using a system service which will be closed,
this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
and send it to the WebContent process.

API test: WebKit.UTIFromMIMEType

* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::mapUTIFromMIMEType):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
(WebCore::cacheUTIFromMimeType):
(WebCore::UTIFromMIMEType):
(WebCore::mimeTypes):
(WebCore::createUTIFromMIMETypeMap):
(WebCore::setUTIFromMIMETypeMap):
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.mm:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mapping between MIME types and UTI types to the WebContent process as part of the Web
process creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/UTIUtilities.h
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (257753 => 257754)

--- trunk/Source/WebCore/ChangeLog	2020-03-03 02:33:23 UTC (rev 257753)
+++ trunk/Source/WebCore/ChangeLog	2020-03-03 02:37:35 UTC (rev 257754)
@@ -1,3 +1,32 @@
+2020-03-02  Per Arne Vollan  
+
+[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208415
+
+Reviewed by Brent Fulgham.
+
+This is currently done in the WebContent process, but since this is using a system service which will be closed,
+this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
+and send it to the WebContent process.
+
+API test: WebKit.UTIFromMIMEType
+
+* platform/network/mac/UTIUtilities.h:
+* platform/network/mac/UTIUtilities.mm:
+(WebCore::mapUTIFromMIMEType):
+(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+(WebCore::cacheUTIFromMimeType):
+(WebCore::UTIFromMIMEType):
+(WebCore::mimeTypes):
+(WebCore::createUTIFromMIMETypeMap):
+(WebCore::setUTIFromMIMETypeMap):
+* testing/Internals.cpp:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.mm:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-03-02  Zalan Bujtas  
 
 Frame::layerTreeAsText should make sure that all the frames are clean and up-to-date


Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.h (257753 => 257754)

--- trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-03 02:33:23 UTC (rev 257753)
+++ trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-03 02:37:35 UTC (rev 257754)
@@ -23,17 +23,18 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef UTIUtilities_h
-#define UTIUtilities_h
+#pragma once
 
-#import 
-#import 
+#include 
 
 namespace WebCore {
+
 WEBCORE_EXPORT String MIMETypeFromUTI(const String&);
 String MIMETypeFromUTITree(const String&);
 WEBCORE_EXPORT String UTIFromMIMEType(const String&);
 bool isDeclaredUTI(const String&);
+
+WEBCORE_EXPORT void setUTIFromMIMETypeMap(HashMap&&);
+WEBCORE_EXPORT const HashMap& createUTIFromMIMETypeMap();
+WEBCORE_EXPORT const Vector& mimeTypes();
 }
-
-#endif // UTIUtilities_h


Modified: 

[webkit-changes] [257750] trunk/Source/WebKit

2020-03-02 Thread pvollan
Title: [257750] trunk/Source/WebKit








Revision 257750
Author pvol...@apple.com
Date 2020-03-02 17:01:51 -0800 (Mon, 02 Mar 2020)


Log Message
Unreviewed sandbox compile fix.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (257749 => 257750)

--- trunk/Source/WebKit/ChangeLog	2020-03-03 00:59:09 UTC (rev 257749)
+++ trunk/Source/WebKit/ChangeLog	2020-03-03 01:01:51 UTC (rev 257750)
@@ -1,3 +1,9 @@
+2020-03-02  Per Arne Vollan  
+
+Unreviewed sandbox compile fix.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-02  Daniel Bates  
 
 Annotate editable elements with hit test order


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257749 => 257750)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-03 00:59:09 UTC (rev 257749)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-03 01:01:51 UTC (rev 257750)
@@ -538,7 +538,7 @@
 (global-name "com.apple.logd.events")
 )
 
-(deny mach-lookup (with report) (with telemetry)
+(deny mach-lookup (with telemetry)
 (global-name "com.apple.distributed_notifications@1v3"))
 
 (allow ipc-posix-shm-read*






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257725] trunk

2020-03-02 Thread pvollan
Title: [257725] trunk








Revision 257725
Author pvol...@apple.com
Date 2020-03-02 12:21:33 -0800 (Mon, 02 Mar 2020)


Log Message
[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208415

Reviewed by Brent Fulgham.

Source/WebCore:

This is currently done in the WebContent process, but since this is using a system service which will be closed,
this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
and send it to the WebContent process.

API test: WebKit.UTIFromMIMEType

* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::mapUTIFromMIMEType):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
(WebCore::cacheUTIFromMimeType):
(WebCore::UTIFromMIMEType):
(WebCore::mimeTypes):
(WebCore::createUTIFromMIMETypeMap):
(WebCore::setUTIFromMIMETypeMap):
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.mm:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mapping between MIME types and UTI types to the WebContent process as part of the Web
process creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/UTIUtilities.h
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (257724 => 257725)

--- trunk/Source/WebCore/ChangeLog	2020-03-02 20:07:42 UTC (rev 257724)
+++ trunk/Source/WebCore/ChangeLog	2020-03-02 20:21:33 UTC (rev 257725)
@@ -1,3 +1,32 @@
+2020-03-02  Per Arne Vollan  
+
+[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208415
+
+Reviewed by Brent Fulgham.
+
+This is currently done in the WebContent process, but since this is using a system service which will be closed,
+this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
+and send it to the WebContent process.
+
+API test: WebKit.UTIFromMIMEType
+
+* platform/network/mac/UTIUtilities.h:
+* platform/network/mac/UTIUtilities.mm:
+(WebCore::mapUTIFromMIMEType):
+(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+(WebCore::cacheUTIFromMimeType):
+(WebCore::UTIFromMIMEType):
+(WebCore::mimeTypes):
+(WebCore::createUTIFromMIMETypeMap):
+(WebCore::setUTIFromMIMETypeMap):
+* testing/Internals.cpp:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.mm:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-03-02  Daniel Bates  
 
 Page::editableElementsInRect() should find nested editable elements and return found elements in paint order


Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.h (257724 => 257725)

--- trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-02 20:07:42 UTC (rev 257724)
+++ trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-02 20:21:33 UTC (rev 257725)
@@ -23,17 +23,18 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef UTIUtilities_h
-#define UTIUtilities_h
+#pragma once
 
-#import 
-#import 
+#include 
 
 namespace WebCore {
+
 WEBCORE_EXPORT String MIMETypeFromUTI(const String&);
 String MIMETypeFromUTITree(const String&);
 WEBCORE_EXPORT String UTIFromMIMEType(const String&);
 bool isDeclaredUTI(const String&);
+
+WEBCORE_EXPORT void setUTIFromMIMETypeMap(HashMap&&);
+WEBCORE_EXPORT const HashMap& createUTIFromMIMETypeMap();
+WEBCORE_EXPORT const Vector& mimeTypes();
 }
-
-#endif // UTIUtilities_h


Modified: 

[webkit-changes] [257723] trunk

2020-03-02 Thread pvollan
Title: [257723] trunk








Revision 257723
Author pvol...@apple.com
Date 2020-03-02 11:57:15 -0800 (Mon, 02 Mar 2020)


Log Message
[iOS] Deny mach lookup access to distributed notifications in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=208455

Reviewed by Brent Fulgham.

Source/WebKit:

On iOS, deny mach lookup access to the service "com.apple.distributed_notifications@1v3" in the WebContent process.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (257722 => 257723)

--- trunk/LayoutTests/ChangeLog	2020-03-02 19:54:43 UTC (rev 257722)
+++ trunk/LayoutTests/ChangeLog	2020-03-02 19:57:15 UTC (rev 257723)
@@ -1,3 +1,13 @@
+2020-03-02  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to distributed notifications in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=208455
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-03-02  Doug Kelly  
 
 ASSERT(m_column != unsetColumnIndex) in RenderTable::cellBefore


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (257722 => 257723)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-02 19:54:43 UTC (rev 257722)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-03-02 19:57:15 UTC (rev 257723)
@@ -20,3 +20,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.tccd") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.uikit.viewservice") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.analyticsd") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.distributed_notifications@1v3") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (257722 => 257723)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-02 19:54:43 UTC (rev 257722)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-03-02 19:57:15 UTC (rev 257723)
@@ -23,6 +23,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.tccd\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.uikit.viewservice\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.analyticsd\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.distributed_notifications@1v3\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (257722 => 257723)

--- trunk/Source/WebKit/ChangeLog	2020-03-02 19:54:43 UTC (rev 257722)
+++ trunk/Source/WebKit/ChangeLog	2020-03-02 19:57:15 UTC (rev 257723)
@@ -1,3 +1,16 @@
+2020-03-02  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to distributed notifications in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=208455
+
+Reviewed by Brent Fulgham.
+
+On iOS, deny mach lookup access to the service "com.apple.distributed_notifications@1v3" in the WebContent process.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-03-02  Jacob Uphoff  
 
 Unreviewed, rolling out r257687.


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257722 => 257723)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-02 19:54:43 UTC (rev 257722)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-02 19:57:15 UTC (rev 257723)
@@ -538,7 +538,7 @@
 (global-name "com.apple.logd.events")
 )
 
-(allow mach-lookup (with report) (with telemetry)
+(deny mach-lookup (with report) (with telemetry)
 (global-name "com.apple.distributed_notifications@1v3"))
 
 (allow ipc-posix-shm-read*






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257687] trunk

2020-02-29 Thread pvollan
Title: [257687] trunk








Revision 257687
Author pvol...@apple.com
Date 2020-02-29 19:32:16 -0800 (Sat, 29 Feb 2020)


Log Message
[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=208415

Reviewed by Brent Fulgham.

Source/WebCore:

This is currently done in the WebContent process, but since this is using a system service which will be closed,
this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
and send it to the WebContent process.

API test: WebKit.UTIFromMIMEType

* platform/network/mac/UTIUtilities.h:
* platform/network/mac/UTIUtilities.mm:
(WebCore::mapUTIFromMIMEType):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
(WebCore::cacheUTIFromMimeType):
(WebCore::UTIFromMIMEType):
(WebCore::mimeTypes):
(WebCore::createUTIFromMIMETypeMap):
(WebCore::setUTIFromMIMETypeMap):
* testing/Internals.cpp:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.mm:
(WebCore::Internals::getUTIFromMIMEType):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mapping between MIME types and UTI types to the WebContent process as part of the Web
process creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/UTIUtilities.h
trunk/Source/WebCore/platform/network/mac/UTIUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/UTIFromMIMEType.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (257686 => 257687)

--- trunk/Source/WebCore/ChangeLog	2020-03-01 01:36:29 UTC (rev 257686)
+++ trunk/Source/WebCore/ChangeLog	2020-03-01 03:32:16 UTC (rev 257687)
@@ -1,3 +1,32 @@
+2020-02-29  Per Arne Vollan  
+
+[Cocoa] Mapping from MIME type to UTI type should be done in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=208415
+
+Reviewed by Brent Fulgham.
+
+This is currently done in the WebContent process, but since this is using a system service which will be closed,
+this mapping should be moved to the UI process. The UI process will create this mapping for a set of mime types,
+and send it to the WebContent process.
+
+API test: WebKit.UTIFromMIMEType
+
+* platform/network/mac/UTIUtilities.h:
+* platform/network/mac/UTIUtilities.mm:
+(WebCore::mapUTIFromMIMEType):
+(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):
+(WebCore::cacheUTIFromMimeType):
+(WebCore::UTIFromMIMEType):
+(WebCore::mimeTypes):
+(WebCore::createUTIFromMIMETypeMap):
+(WebCore::setUTIFromMIMETypeMap):
+* testing/Internals.cpp:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.mm:
+(WebCore::Internals::getUTIFromMIMEType):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-02-29  Zalan Bujtas  
 
 [LFC][BFC] Consolidate precomputeVerticalPositionForAncestors and precomputeVerticalPosition


Modified: trunk/Source/WebCore/platform/network/mac/UTIUtilities.h (257686 => 257687)

--- trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-01 01:36:29 UTC (rev 257686)
+++ trunk/Source/WebCore/platform/network/mac/UTIUtilities.h	2020-03-01 03:32:16 UTC (rev 257687)
@@ -23,17 +23,18 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef UTIUtilities_h
-#define UTIUtilities_h
+#pragma once
 
-#import 
-#import 
+#include 
 
 namespace WebCore {
+
 WEBCORE_EXPORT String MIMETypeFromUTI(const String&);
 String MIMETypeFromUTITree(const String&);
 WEBCORE_EXPORT String UTIFromMIMEType(const String&);
 bool isDeclaredUTI(const String&);
+
+WEBCORE_EXPORT void setUTIFromMIMETypeMap(HashMap&&);
+WEBCORE_EXPORT const HashMap& createUTIFromMIMETypeMap();
+WEBCORE_EXPORT const Vector& mimeTypes();
 }
-
-#endif // UTIUtilities_h


Modified: 

[webkit-changes] [257611] trunk

2020-02-27 Thread pvollan
Title: [257611] trunk








Revision 257611
Author pvol...@apple.com
Date 2020-02-27 18:44:40 -0800 (Thu, 27 Feb 2020)


Log Message
[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
https://bugs.webkit.org/show_bug.cgi?id=208146

Reviewed by Brent Fulgham.

Source/WebKit:

We are still seeing some accesses from the WebContent process to a small set of services. Since we do not currently have
backtraces for these accesses, make a speculative patch, where we issue these extension for all apps except Safari.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup-mail.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (257610 => 257611)

--- trunk/LayoutTests/ChangeLog	2020-02-28 02:41:58 UTC (rev 257610)
+++ trunk/LayoutTests/ChangeLog	2020-02-28 02:44:40 UTC (rev 257611)
@@ -1,3 +1,13 @@
+2020-02-27  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup-mail.html:
+
 2020-02-27  Ben Nham  
 
 REGRESSION (r257391-257396): [ iOS ] imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/scroll-restoration-order.html is failing


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt (257610 => 257611)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-28 02:41:58 UTC (rev 257610)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-28 02:44:40 UTC (rev 257611)
@@ -4,4 +4,7 @@
 
 
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.lsd.open") is true
-
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.mobileassetd") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.iconservices") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.PowerManagement.control") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", ""com.apple.frontboard.systemappservices"") is true


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html (257610 => 257611)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-28 02:41:58 UTC (rev 257610)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-28 02:44:40 UTC (rev 257611)
@@ -7,6 +7,10 @@
 
 if (window.internals) {
 shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.lsd.open\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.mobileassetd\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.iconservices\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.PowerManagement.control\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.frontboard.systemappservices\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (257610 => 257611)

--- trunk/Source/WebKit/ChangeLog	2020-02-28 02:41:58 UTC (rev 257610)
+++ trunk/Source/WebKit/ChangeLog	2020-02-28 02:44:40 UTC (rev 257611)
@@ -1,5 +1,27 @@
 2020-02-27  Per Arne Vollan  
 
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+We are still seeing some accesses 

[webkit-changes] [257610] trunk/Source/WebKit

2020-02-27 Thread pvollan
Title: [257610] trunk/Source/WebKit








Revision 257610
Author pvol...@apple.com
Date 2020-02-27 18:41:58 -0800 (Thu, 27 Feb 2020)


Log Message
[iOS] The GPU process never runs as a foreground process
https://bugs.webkit.org/show_bug.cgi?id=208250

Reviewed by Chris Dumez.

Currently, the GPU process always runs in the background, and never goes into the foreground mode, which is required for media
playback on iOS. This is addressed by creating a layer in the GPU process, whose context ID is used to create a visibility
propagation view in the UI process. This is done in the same way as it is done for the WebContent process. This makes it
possible for the system to determine the visibility of the GPU process. In addition, create foreground process assertions
when media is being played.

No new tests, covered by existing tests.

* GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* GPUProcess/GPUProcess.h:
* GPUProcess/ios/GPUProcessIOS.mm:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):
* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::didCreateContextForVisibilityPropagation):
(WebKit::GPUProcessProxy::contextIDForVisibilityPropagation const):
* UIProcess/GPU/GPUProcessProxy.h:
* UIProcess/GPU/GPUProcessProxy.messages.in:
* UIProcess/PageClient.h:
(WebKit::PageClient::didCreateContextInGPUProcessForVisibilityPropagation):
(WebKit::PageClient::gpuProcessCrashed):
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::gpuProcessCrashed):
(WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
(WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::gpuProcessCrashed):
(WebKit::WebProcessProxy::didCreateContextInGPUProcessForVisibilityPropagation):
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didCreateContextInGPUProcessForVisibilityPropagation):
(WebKit::PageClientImpl::gpuProcessCrashed):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
(-[WKContentView _setupVisibilityPropagationViewForGPUProcess]):
(-[WKContentView _removeVisibilityPropagationViewForGPUProcess]):
(-[WKContentView _gpuProcessCrashed]):
(-[WKContentView _gpuProcessDidCreateContextForVisibilityPropagation]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/GPUProcess/GPUProcess.cpp
trunk/Source/WebKit/GPUProcess/GPUProcess.h
trunk/Source/WebKit/GPUProcess/ios/GPUProcessIOS.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h
trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.messages.in
trunk/Source/WebKit/UIProcess/PageClient.h
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h
trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
trunk/Source/WebKit/UIProcess/ios/WKContentView.h
trunk/Source/WebKit/UIProcess/ios/WKContentView.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (257609 => 257610)

--- trunk/Source/WebKit/ChangeLog	2020-02-28 02:27:14 UTC (rev 257609)
+++ trunk/Source/WebKit/ChangeLog	2020-02-28 02:41:58 UTC (rev 257610)
@@ -1,3 +1,57 @@
+2020-02-27  Per Arne Vollan  
+
+[iOS] The GPU process never runs as a foreground process
+https://bugs.webkit.org/show_bug.cgi?id=208250
+
+Reviewed by Chris Dumez.
+
+Currently, the GPU process always runs in the background, and never goes into the foreground mode, which is required for media
+playback on iOS. This is addressed by creating a layer in the GPU process, whose context ID is used to create a visibility
+propagation view in the UI process. This is done in the same way as it is done for the WebContent process. This makes it
+possible for the system to determine the visibility of the GPU process. In addition, create foreground process assertions
+when media is being played.
+
+No new tests, covered by existing tests.
+
+* GPUProcess/GPUProcess.cpp:
+(WebKit::GPUProcess::initializeGPUProcess):
+* GPUProcess/GPUProcess.h:
+* GPUProcess/ios/GPUProcessIOS.mm:
+* UIProcess/Cocoa/WebPageProxyCocoa.mm:
+(WebKit::WebPageProxy::didCreateContextInGPUProcessForVisibilityPropagation):
+* 

[webkit-changes] [257595] trunk

2020-02-27 Thread pvollan
Title: [257595] trunk








Revision 257595
Author pvol...@apple.com
Date 2020-02-27 15:45:15 -0800 (Thu, 27 Feb 2020)


Log Message
[Win] Fix AppleWin build
https://bugs.webkit.org/show_bug.cgi?id=208330

Reviewed by Don Olmstead.

Set framework headers directory for AppleWin build.

* Source/cmake/target/TargetJavaScriptCore.cmake:
* Source/cmake/target/TargetWTF.cmake:

Modified Paths

trunk/ChangeLog
trunk/Source/cmake/target/TargetJavaScriptCore.cmake
trunk/Source/cmake/target/TargetWTF.cmake




Diff

Modified: trunk/ChangeLog (257594 => 257595)

--- trunk/ChangeLog	2020-02-27 23:42:28 UTC (rev 257594)
+++ trunk/ChangeLog	2020-02-27 23:45:15 UTC (rev 257595)
@@ -1,3 +1,15 @@
+2020-02-27  Per Arne Vollan  
+
+[Win] Fix AppleWin build
+https://bugs.webkit.org/show_bug.cgi?id=208330
+
+Reviewed by Don Olmstead.
+
+Set framework headers directory for AppleWin build.
+
+* Source/cmake/target/TargetJavaScriptCore.cmake:
+* Source/cmake/target/TargetWTF.cmake:
+
 2020-02-27  Don Olmstead  
 
 [CMake] Add WebKit::PAL target


Modified: trunk/Source/cmake/target/TargetJavaScriptCore.cmake (257594 => 257595)

--- trunk/Source/cmake/target/TargetJavaScriptCore.cmake	2020-02-27 23:42:28 UTC (rev 257594)
+++ trunk/Source/cmake/target/TargetJavaScriptCore.cmake	2020-02-27 23:45:15 UTC (rev 257595)
@@ -12,6 +12,9 @@
 # Should add Apple::CoreFoundation here when https://bugs.webkit.org/show_bug.cgi?id=205085 lands
 INTERFACE_LINK_LIBRARIES "WebKit::WTF;ICU::data;ICU::i18n;ICU::uc"
 )
+set(_javascript_Core_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/../include/private/_javascript_Core")
+set(_javascript_Core_PRIVATE_FRAMEWORK_HEADERS_DIR ${_javascript_Core_FRAMEWORK_HEADERS_DIR})
+
 target_include_directories(WebKit::_javascript_Core INTERFACE
 ${_javascript_Core_FRAMEWORK_HEADERS_DIR}
 ${_javascript_Core_PRIVATE_FRAMEWORK_HEADERS_DIR}


Modified: trunk/Source/cmake/target/TargetWTF.cmake (257594 => 257595)

--- trunk/Source/cmake/target/TargetWTF.cmake	2020-02-27 23:42:28 UTC (rev 257594)
+++ trunk/Source/cmake/target/TargetWTF.cmake	2020-02-27 23:45:15 UTC (rev 257595)
@@ -12,6 +12,7 @@
 # Should add Apple::CoreFoundation here when https://bugs.webkit.org/show_bug.cgi?id=205085 lands
 INTERFACE_LINK_LIBRARIES "ICU::data;ICU::i18n;ICU::uc"
 )
+set(WTF_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/../include/private/WTF")
 target_include_directories(WebKit::WTF INTERFACE
 ${WTF_FRAMEWORK_HEADERS_DIR}
 )






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257575] trunk

2020-02-27 Thread pvollan
Title: [257575] trunk








Revision 257575
Author pvol...@apple.com
Date 2020-02-27 10:48:36 -0800 (Thu, 27 Feb 2020)


Log Message
[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
https://bugs.webkit.org/show_bug.cgi?id=208146

Reviewed by Brent Fulgham.

Source/WebKit:

We are still seeing some accesses from the WebContent process to a small set of services. Since we do not currently have
backtraces for these accesses, make a speculative patch, where we issue these extension for all apps except Safari.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup-mail.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (257574 => 257575)

--- trunk/LayoutTests/ChangeLog	2020-02-27 18:18:46 UTC (rev 257574)
+++ trunk/LayoutTests/ChangeLog	2020-02-27 18:48:36 UTC (rev 257575)
@@ -1,3 +1,13 @@
+2020-02-27  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup-mail.html:
+
 2020-02-27  Carlos Alberto Lopez Perez  
 
 [CSS Backgrounds] Skip WPT tests always crashing in Debug.


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt (257574 => 257575)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-27 18:18:46 UTC (rev 257574)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-27 18:48:36 UTC (rev 257575)
@@ -4,4 +4,7 @@
 
 
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.lsd.open") is true
-
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.mobileassetd") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.iconservices") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.PowerManagement.control") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", ""com.apple.frontboard.systemappservices"") is true


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html (257574 => 257575)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-27 18:18:46 UTC (rev 257574)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-27 18:48:36 UTC (rev 257575)
@@ -7,6 +7,10 @@
 
 if (window.internals) {
 shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.lsd.open\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.mobileassetd\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.iconservices\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.PowerManagement.control\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.frontboard.systemappservices\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (257574 => 257575)

--- trunk/Source/WebKit/ChangeLog	2020-02-27 18:18:46 UTC (rev 257574)
+++ trunk/Source/WebKit/ChangeLog	2020-02-27 18:48:36 UTC (rev 257575)
@@ -1,3 +1,25 @@
+2020-02-27  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+We are still seeing some accesses from the WebContent process to a small set of services. Since we do not currently 

[webkit-changes] [257508] trunk

2020-02-26 Thread pvollan
Title: [257508] trunk








Revision 257508
Author pvol...@apple.com
Date 2020-02-26 13:38:40 -0800 (Wed, 26 Feb 2020)


Log Message
[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
https://bugs.webkit.org/show_bug.cgi?id=208146

Reviewed by Brent Fulgham.

Source/WebKit:

We are still seeing some accesses from the WebContent process to a small set of services. Since we do not currently have
backtraces for these accesses, make a speculative patch, where we issue these extension for all apps except Safari.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup-mail.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (257507 => 257508)

--- trunk/LayoutTests/ChangeLog	2020-02-26 21:30:58 UTC (rev 257507)
+++ trunk/LayoutTests/ChangeLog	2020-02-26 21:38:40 UTC (rev 257508)
@@ -1,3 +1,13 @@
+2020-02-26  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup-mail.html:
+
 2020-02-26  Nikos Mouchtaris  
 
 Regression r257289: fast/web-share/share-with-files.html is missing expected results


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt (257507 => 257508)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-26 21:30:58 UTC (rev 257507)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-02-26 21:38:40 UTC (rev 257508)
@@ -4,4 +4,7 @@
 
 
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.lsd.open") is true
-
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.mobileassetd") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.iconservices") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.PowerManagement.control") is true
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", ""com.apple.frontboard.systemappservices"") is true


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html (257507 => 257508)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-26 21:30:58 UTC (rev 257507)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-02-26 21:38:40 UTC (rev 257508)
@@ -7,6 +7,10 @@
 
 if (window.internals) {
 shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.lsd.open\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.mobileassetd\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.iconservices\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.PowerManagement.control\")");
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.frontboard.systemappservices\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (257507 => 257508)

--- trunk/Source/WebKit/ChangeLog	2020-02-26 21:30:58 UTC (rev 257507)
+++ trunk/Source/WebKit/ChangeLog	2020-02-26 21:38:40 UTC (rev 257508)
@@ -1,3 +1,25 @@
+2020-02-26  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extensions to the WebContent process for a set of specific services
+https://bugs.webkit.org/show_bug.cgi?id=208146
+
+Reviewed by Brent Fulgham.
+
+We are still seeing some accesses from the WebContent process to a small set of services. Since we do 

[webkit-changes] [257288] trunk

2020-02-24 Thread pvollan
Title: [257288] trunk








Revision 257288
Author pvol...@apple.com
Date 2020-02-24 17:08:05 -0800 (Mon, 24 Feb 2020)


Log Message
[Win] Fix AppleWin build.
https://bugs.webkit.org/show_bug.cgi?id=208164

Unreviewed build fix.

Allow a warning which happens when building with older SDKs.


* Source/cmake/OptionsMSVC.cmake:

Modified Paths

trunk/ChangeLog
trunk/Source/cmake/OptionsMSVC.cmake




Diff

Modified: trunk/ChangeLog (257287 => 257288)

--- trunk/ChangeLog	2020-02-25 01:03:46 UTC (rev 257287)
+++ trunk/ChangeLog	2020-02-25 01:08:05 UTC (rev 257288)
@@ -1,3 +1,14 @@
+2020-02-24  Per Arne Vollan  
+
+[Win] Fix AppleWin build.
+https://bugs.webkit.org/show_bug.cgi?id=208164
+
+Unreviewed build fix.
+
+Allow a warning which happens when building with older SDKs.
+
+* Source/cmake/OptionsMSVC.cmake:
+
 2020-02-20  Carlos Alberto Lopez Perez  
 
 [GTK][WPE] Not set ccache compiler prefix if ccache its already the compiler binary in path.


Modified: trunk/Source/cmake/OptionsMSVC.cmake (257287 => 257288)

--- trunk/Source/cmake/OptionsMSVC.cmake	2020-02-25 01:03:46 UTC (rev 257287)
+++ trunk/Source/cmake/OptionsMSVC.cmake	2020-02-25 01:08:05 UTC (rev 257288)
@@ -4,7 +4,7 @@
 /wd4309 /wd4344 /wd4355 /wd4389 /wd4396 /wd4456 /wd4457 /wd4458 /wd4459
 /wd4481 /wd4503 /wd4505 /wd4510 /wd4512 /wd4530 /wd4610 /wd4611 /wd4646
 /wd4702 /wd4706 /wd4722 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011
-/wd6031 /wd6211 /wd6246 /wd6255 /wd6387
+/wd6031 /wd6211 /wd6246 /wd6255 /wd6387 /wd4091
 )
 
 # Create pdb files for debugging purposes, also for Release builds






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257264] trunk/Source/WebKit

2020-02-24 Thread pvollan
Title: [257264] trunk/Source/WebKit








Revision 257264
Author pvol...@apple.com
Date 2020-02-24 15:18:59 -0800 (Mon, 24 Feb 2020)


Log Message
[iOS] Use one telemetry decoration for each sandbox rule
https://bugs.webkit.org/show_bug.cgi?id=207897

Reviewed by Brent Fulgham.

Currently, we are using the decorations '(with telemetry)' and '(with telemetry-backtrace)' for some sandbox rules
in the WebContent process' sandbox. Only one of the two decorations should be used.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (257263 => 257264)

--- trunk/Source/WebKit/ChangeLog	2020-02-24 23:15:15 UTC (rev 257263)
+++ trunk/Source/WebKit/ChangeLog	2020-02-24 23:18:59 UTC (rev 257264)
@@ -1,3 +1,17 @@
+2020-02-24  Per Arne Vollan  
+
+[iOS] Use one telemetry decoration for each sandbox rule
+https://bugs.webkit.org/show_bug.cgi?id=207897
+
+Reviewed by Brent Fulgham.
+
+Currently, we are using the decorations '(with telemetry)' and '(with telemetry-backtrace)' for some sandbox rules
+in the WebContent process' sandbox. Only one of the two decorations should be used.
+
+No new tests, no behavior change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-02-24  Chris Dumez  
 
 Temporarily disable in-process cookie cache as it seems to be causing hangs on iOS


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257263 => 257264)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-24 23:15:15 UTC (rev 257263)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-24 23:18:59 UTC (rev 257264)
@@ -115,7 +115,7 @@
 (allow file-read* asset-access-filter)
 (if (memq 'with-media-playback options)
 (play-media asset-access-filter))
-(allow mach-lookup (with telemetry-backtrace) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace)
(global-name "com.apple.mobileassetd" "com.apple.mobileassetd.v2"))
 (mobile-preferences-read "com.apple.MobileAsset")))
 
@@ -353,7 +353,7 @@
 "com.apple.mt"
 "com.apple.preferences.sounds")
 
-(allow mach-lookup (with telemetry-backtrace) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace)
 (global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
 )
 
@@ -544,7 +544,7 @@
 (allow ipc-posix-shm-read*
(ipc-posix-name-prefix "apple.cfprefs."))
  
-(allow mach-lookup (with telemetry-backtrace) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace)
 (global-name "com.apple.lsd.open")
 (global-name "com.apple.lsd.mapdb"))
 
@@ -669,7 +669,7 @@
 ;;  LaunchServices app icons
 (allow file-read*
 (well-known-system-group-container-subpath "/systemgroup.com.apple.lsd.iconscache"))
-(allow mach-lookup (with telemetry-backtrace) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace)
 (xpc-service-name "com.apple.iconservices")
 (global-name "com.apple.iconservices"))
 
@@ -828,7 +828,7 @@
 (allow mach-lookup (with report) (with telemetry)
(global-name "com.apple.webinspector"))
 
-(allow mach-lookup (with telemetry-backtrace) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace)
 (global-name "com.apple.PowerManagement.control"))
 
 (deny file-write-create (vnode-type SYMLINK))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257151] trunk/Source/WebKit

2020-02-21 Thread pvollan
Title: [257151] trunk/Source/WebKit








Revision 257151
Author pvol...@apple.com
Date 2020-02-21 11:21:18 -0800 (Fri, 21 Feb 2020)


Log Message
[iOS] Issue extension of CoreMedia service to the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=208066


Reviewed by Geoffrey Garen.

This service should also be added to the sandbox of the GPU process.

No new tests, covered by existing tests.

* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::mediaRelatedMachServices):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (257150 => 257151)

--- trunk/Source/WebKit/ChangeLog	2020-02-21 19:03:29 UTC (rev 257150)
+++ trunk/Source/WebKit/ChangeLog	2020-02-21 19:21:18 UTC (rev 257151)
@@ -1,3 +1,20 @@
+2020-02-21  Per Arne Vollan  
+
+[iOS] Issue extension of CoreMedia service to the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=208066
+
+
+Reviewed by Geoffrey Garen.
+
+This service should also be added to the sandbox of the GPU process.
+
+No new tests, covered by existing tests.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb:
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::mediaRelatedMachServices):
+
 2020-02-21  Wenson Hsieh  
 
 [macOS] Large form controls are rendered at the wrong NSControlSize


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb (257150 => 257151)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb	2020-02-21 19:03:29 UTC (rev 257150)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb	2020-02-21 19:21:18 UTC (rev 257151)
@@ -152,6 +152,7 @@
(global-name "com.apple.coremedia.samplebufferrendersynchronizer.xpc")
(global-name "com.apple.coremedia.sandboxserver.xpc")
(global-name "com.apple.coremedia.systemcontroller.xpc")
+   (global-name "com.apple.coremedia.visualcontext.xpc")
(global-name "com.apple.coremedia.volumecontroller.xpc"))
 
 (allow mach-lookup (with report) (with telemetry)


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (257150 => 257151)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-21 19:03:29 UTC (rev 257150)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-21 19:21:18 UTC (rev 257151)
@@ -860,7 +860,7 @@
 "com.apple.coremedia.routediscoverer.xpc" "com.apple.coremedia.routingcontext.xpc" "com.apple.coremedia.routingsessionmanager.xpc"
 "com.apple.coremedia.samplebufferaudiorenderer.xpc" "com.apple.coremedia.samplebufferrendersynchronizer.xpc" "com.apple.coremedia.sandboxserver.xpc"
 "com.apple.coremedia.sts" "com.apple.coremedia.systemcontroller.xpc" "com.apple.coremedia.videoqueue" "com.apple.coremedia.volumecontroller.xpc"
-"com.apple.mediaremoted.xpc"
+"com.apple.coremedia.visualcontext.xpc" "com.apple.mediaremoted.xpc"
 ;;; FIXME(207716): End services to remove.
 )))
 


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (257150 => 257151)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-02-21 19:03:29 UTC (rev 257150)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-02-21 19:21:18 UTC (rev 257151)
@@ -250,7 +250,8 @@
 "com.apple.coremedia.samplebufferaudiorenderer.xpc", "com.apple.coremedia.samplebufferrendersynchronizer.xpc",
 "com.apple.coremedia.sandboxserver.xpc", "com.apple.coremedia.sts",
 "com.apple.coremedia.systemcontroller.xpc", "com.apple.coremedia.videoqueue",
-"com.apple.airplay.apsynccontroller.xpc", "com.apple.audio.AURemoteIOServer"
+"com.apple.coremedia.visualcontext.xpc", "com.apple.airplay.apsynccontroller.xpc",
+"com.apple.audio.AURemoteIOServer"
 #endif
 #if PLATFORM(MAC)
 "com.apple.coremedia.endpointstream.xpc", "com.apple.coremedia.endpointplaybacksession.xpc",






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257135] trunk/Source/WebKit

2020-02-21 Thread pvollan
Title: [257135] trunk/Source/WebKit








Revision 257135
Author pvol...@apple.com
Date 2020-02-21 08:27:53 -0800 (Fri, 21 Feb 2020)


Log Message
[iOS] Fix media related sandbox issues in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=208033

Reviewed by Eric Carlson.

The mach lookup sandbox extension to 'com.apple.tccd' needs to be created with the method SandboxExtension::createHandleForMachLookup.
The file read-write sandbox extension to the media cache directory needs to be created with the parent folder of the actual cache folder,
since the media frameworks also seem to access files there.

No new tests, covered by existing tests.

* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::singleton):
(WebKit::gpuProcessSessionParameters):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (257134 => 257135)

--- trunk/Source/WebKit/ChangeLog	2020-02-21 16:20:55 UTC (rev 257134)
+++ trunk/Source/WebKit/ChangeLog	2020-02-21 16:27:53 UTC (rev 257135)
@@ -1,3 +1,20 @@
+2020-02-21  Per Arne Vollan  
+
+[iOS] Fix media related sandbox issues in the GPU process
+https://bugs.webkit.org/show_bug.cgi?id=208033
+
+Reviewed by Eric Carlson.
+
+The mach lookup sandbox extension to 'com.apple.tccd' needs to be created with the method SandboxExtension::createHandleForMachLookup.
+The file read-write sandbox extension to the media cache directory needs to be created with the parent folder of the actual cache folder,
+since the media frameworks also seem to access files there.
+
+No new tests, covered by existing tests.
+
+* UIProcess/GPU/GPUProcessProxy.cpp:
+(WebKit::GPUProcessProxy::singleton):
+(WebKit::gpuProcessSessionParameters):
+
 2020-02-20  Peng Liu  
 
 [Media in GPU process] Synchronize the properties of video layers in the GPU process with the hosting layer in the web process


Modified: trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp (257134 => 257135)

--- trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp	2020-02-21 16:20:55 UTC (rev 257134)
+++ trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp	2020-02-21 16:27:53 UTC (rev 257135)
@@ -107,7 +107,7 @@
 SandboxExtension::createHandleForGenericExtension("com.apple.webkit.microphone", parameters.microphoneSandboxExtensionHandle);
 #if PLATFORM(IOS)
 if (needsCameraSandboxExtension || needsMicrophoneSandboxExtension)
-SandboxExtension::createHandleForGenericExtension("com.apple.tccd", parameters.tccSandboxExtensionHandle);
+SandboxExtension::createHandleForMachLookup("com.apple.tccd", WTF::nullopt, parameters.tccSandboxExtensionHandle);
 #endif
 #endif
 // Initialize the GPU process.
@@ -281,8 +281,13 @@
 
 parameters.mediaCacheDirectory = store.resolvedMediaCacheDirectory();
 SandboxExtension::Handle mediaCacheDirectoryExtensionHandle;
-if (!parameters.mediaCacheDirectory.isEmpty())
-SandboxExtension::createHandleWithoutResolvingPath(parameters.mediaCacheDirectory, SandboxExtension::Type::ReadWrite, parameters.mediaCacheDirectorySandboxExtensionHandle);
+if (!parameters.mediaCacheDirectory.isEmpty()) {
+String parentFolder = parameters.mediaCacheDirectory;
+auto position = parentFolder.reverseFind("/");
+if (position != notFound)
+parentFolder = parentFolder.substring(0, position);
+SandboxExtension::createHandleWithoutResolvingPath(parentFolder, SandboxExtension::Type::ReadWrite, parameters.mediaCacheDirectorySandboxExtensionHandle);
+}
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA)
 parameters.mediaKeysStorageDirectory = store.resolvedMediaKeysDirectory();






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [257029] trunk/Source

2020-02-19 Thread pvollan
Title: [257029] trunk/Source








Revision 257029
Author pvol...@apple.com
Date 2020-02-19 18:43:58 -0800 (Wed, 19 Feb 2020)


Log Message
[iOS] Rename NSUserDefaultsSPI.h
https://bugs.webkit.org/show_bug.cgi?id=207977

Source/WebCore/PAL:

Reviewed by Brent Fulgham.

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cocoa/NSUserDefaultsSPI.h: Removed.
* pal/spi/cocoa/UserDefaultsSPI.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/NSUserDefaultsSPI.h.

Source/WebKit:

Reviewed by Brent Fulgham.

No new tests, no behavior change.

* UIProcess/Cocoa/PreferenceObserver.h:

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h


Added Paths

trunk/Source/WebCore/PAL/pal/spi/cocoa/UserDefaultsSPI.h


Removed Paths

trunk/Source/WebCore/PAL/pal/spi/cocoa/NSUserDefaultsSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (257028 => 257029)

--- trunk/Source/WebCore/PAL/ChangeLog	2020-02-20 02:33:45 UTC (rev 257028)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-02-20 02:43:58 UTC (rev 257029)
@@ -1,3 +1,15 @@
+2020-02-19  Per Arne Vollan  
+
+[iOS] Rename NSUserDefaultsSPI.h
+https://bugs.webkit.org/show_bug.cgi?id=207977
+
+
+Reviewed by Brent Fulgham.
+
+* PAL.xcodeproj/project.pbxproj:
+* pal/spi/cocoa/NSUserDefaultsSPI.h: Removed.
+* pal/spi/cocoa/UserDefaultsSPI.h: Copied from Source/WebCore/PAL/pal/spi/cocoa/NSUserDefaultsSPI.h.
+
 2020-02-17  Chris Dumez  
 
 [WK2][Cocoa] Implement in-WebProcess cookie cache to avoid sync IPC for document.cookie in most cases


Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (257028 => 257029)

--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2020-02-20 02:33:45 UTC (rev 257028)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2020-02-20 02:43:58 UTC (rev 257029)
@@ -164,7 +164,7 @@
 		A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */; };
 		A3C66CDC1F462D6A009E6EE9 /* SessionID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */; };
 		A3C66CDD1F462D6A009E6EE9 /* SessionID.h in Headers */ = {isa = PBXBuildFile; fileRef = A3C66CDB1F462D6A009E6EE9 /* SessionID.h */; };
-		C15CBB3523F3548A00300CC7 /* NSUserDefaultsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = C15CBB3223F34A1200300CC7 /* NSUserDefaultsSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		C15CBB3523F3548A00300CC7 /* UserDefaultsSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = C15CBB3223F34A1200300CC7 /* UserDefaultsSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CDACB3602387425B0018D7CE /* MediaToolboxSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDACB35E23873E480018D7CE /* MediaToolboxSoftLink.cpp */; };
 		CDACB361238742740018D7CE /* MediaToolboxSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = CDACB35F23873E480018D7CE /* MediaToolboxSoftLink.h */; };
 		CDF91113220E4EEC001EA39E /* CelestialSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF91112220E4EEC001EA39E /* CelestialSPI.h */; };
@@ -341,7 +341,7 @@
 		A3AB6E631F3D217F009C14B1 /* SystemSleepListenerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemSleepListenerMac.mm; sourceTree = ""; };
 		A3C66CDA1F462D6A009E6EE9 /* SessionID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SessionID.cpp; sourceTree = ""; };
 		A3C66CDB1F462D6A009E6EE9 /* SessionID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionID.h; sourceTree = ""; };
-		C15CBB3223F34A1200300CC7 /* NSUserDefaultsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSUserDefaultsSPI.h; sourceTree = ""; };
+		C15CBB3223F34A1200300CC7 /* UserDefaultsSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserDefaultsSPI.h; sourceTree = ""; };
 		C2147A4A1EFD0AA600056FA5 /* CopyPALHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyPALHeaders.xcconfig; sourceTree = ""; };
 		CDACB35E23873E480018D7CE /* MediaToolboxSoftLink.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MediaToolboxSoftLink.cpp; sourceTree = ""; };
 		CDACB35F23873E480018D7CE /* MediaToolboxSoftLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MediaToolboxSoftLink.h; sourceTree = ""; };
@@ -445,7 +445,6 @@
 0C2DA1361F3BEB4900DBC317 /* NSURLConnectionSPI.h */,
 0C2DA1371F3BEB4900DBC317 /* NSURLDownloadSPI.h */,
 0C2DA1381F3BEB4900DBC317 /* NSURLFileTypeMappingsSPI.h */,
-C15CBB3223F34A1200300CC7 /* NSUserDefaultsSPI.h */,
 570AB8F820AF6E3D00B8BE87 /* 

[webkit-changes] [256839] trunk

2020-02-18 Thread pvollan
Title: [256839] trunk








Revision 256839
Author pvol...@apple.com
Date 2020-02-18 10:27:01 -0800 (Tue, 18 Feb 2020)


Log Message
Move [UIDevice currentDevice] calls to UI process
https://bugs.webkit.org/show_bug.cgi?id=204320

Reviewed by Darin Adler.

Source/WebCore:

Calling [UIDevice currentDevice] will cause the runningboard daemon to be accessed. Since this service will be removed from
the WebContent sandbox, these calls should be moved to the UI process. The function exernalDeviceDisplayNameForPlayer in
MediaPlayerPrivateAVFoundationObjC.mm is calling [[PAL::getUIDeviceClass() currentDevice] localizedModel], which should be
moved to the UI process.

API test: WebKit.LocalizedDeviceName

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::exernalDeviceDisplayNameForPlayer):
* platform/ios/LocalizedDeviceModel.h: Added.
* platform/ios/LocalizedDeviceModel.mm: Added.
(WebCore::cachedLocalizedDeviceModel):
(WebCore::localizedDeviceModel):
(WebCore::setLocalizedDeviceModel):

Source/WebKit:

Get the localized device name in the UI process, and send it to the WebContent process as part of the
process creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/LocalizedDeviceModel.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/SourcesCocoa.txt
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/platform/ios/LocalizedDeviceModel.h
trunk/Source/WebCore/platform/ios/LocalizedDeviceModel.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit/LocalizedDeviceModel.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (256838 => 256839)

--- trunk/Source/WebCore/ChangeLog	2020-02-18 18:19:13 UTC (rev 256838)
+++ trunk/Source/WebCore/ChangeLog	2020-02-18 18:27:01 UTC (rev 256839)
@@ -1,3 +1,27 @@
+2020-02-18  Per Arne Vollan  
+
+Move [UIDevice currentDevice] calls to UI process
+https://bugs.webkit.org/show_bug.cgi?id=204320
+
+Reviewed by Darin Adler.
+
+Calling [UIDevice currentDevice] will cause the runningboard daemon to be accessed. Since this service will be removed from
+the WebContent sandbox, these calls should be moved to the UI process. The function exernalDeviceDisplayNameForPlayer in
+MediaPlayerPrivateAVFoundationObjC.mm is calling [[PAL::getUIDeviceClass() currentDevice] localizedModel], which should be
+moved to the UI process.
+
+API test: WebKit.LocalizedDeviceName
+
+* SourcesCocoa.txt:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+(WebCore::exernalDeviceDisplayNameForPlayer):
+* platform/ios/LocalizedDeviceModel.h: Added.
+* platform/ios/LocalizedDeviceModel.mm: Added.
+(WebCore::cachedLocalizedDeviceModel):
+(WebCore::localizedDeviceModel):
+(WebCore::setLocalizedDeviceModel):
+
 2020-02-18  Youenn Fablet  
 
 Use more ObjectIdentifier in WebRTC MDNS register


Modified: trunk/Source/WebCore/SourcesCocoa.txt (256838 => 256839)

--- trunk/Source/WebCore/SourcesCocoa.txt	2020-02-18 18:19:13 UTC (rev 256838)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2020-02-18 18:27:01 UTC (rev 256839)
@@ -399,6 +399,7 @@
 platform/ios/LegacyTileLayer.mm
 platform/ios/LegacyTileLayerPool.mm
 platform/ios/LocalCurrentTraitCollection.mm
+platform/ios/LocalizedDeviceModel.mm
 platform/ios/LowPowerModeNotifierIOS.mm
 platform/ios/PasteboardIOS.mm
 platform/ios/PlatformEventFactoryIOS.mm @no-unify


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (256838 => 256839)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-02-18 18:19:13 UTC (rev 256838)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-02-18 18:27:01 UTC (rev 256839)
@@ -4796,6 +4796,7 @@
 		E323CFFA1E5AF6AF00F0B4A0 /* JSDOMConvertPromise.h in Headers */ = {isa = PBXBuildFile; fileRef = E323CFF91E5AF6A500F0B4A0 /* JSDOMConvertPromise.h */; settings = {ATTRIBUTES = (Private, ); }; 

[webkit-changes] [256756] trunk

2020-02-17 Thread pvollan
Title: [256756] trunk








Revision 256756
Author pvol...@apple.com
Date 2020-02-17 11:50:16 -0800 (Mon, 17 Feb 2020)


Log Message
Use CF prefs direct mode in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=203420

Reviewed by Brent Fulgham.

Source/WebCore:

Add Internals functions to read preferences.

API tests: Tests added in PreferenceChanges.mm.

* testing/Internals.cpp:
(WebCore::Internals::readPreferenceInteger):
(WebCore::Internals::encodedPreferenceValue):
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.mm:
(WebCore::Internals::encodedPreferenceValue):

Source/WebCore/PAL:

Add SPI to enable CF prefs direct mode and declare method called when preference are changed.

* PAL.xcodeproj/project.pbxproj:
* pal/spi/cf/CFUtilitiesSPI.h:
* pal/spi/cocoa/NSUserDefaultsSPI.h: Added.

Source/WebKit:

Enable CF prefs direct mode, in order to avoid connecting to the CF prefs daemon in the WebContent process.
In direct mode, the prefs files will be accessed directly, and not through the CF prefs daemon. A preference
observer is added in the UI process, which will notify the WebContent process about preferences changes to a
domain. After a preference change, the WebContent process will set the new preference value for the changed
key/domain.

API tests: Tests added in PreferenceChanges.mm.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* UIProcess/Cocoa/PreferenceObserver.h: Added.
(__attribute__):
* UIProcess/Cocoa/PreferenceObserver.mm: Added.
(-[WKUserDefaults _notifyObserversOfChangeFromValuesForKeys:toValuesForKeys:]):
(-[WKUserDefaults observeValueForKeyPath:ofObject:change:context:]):
(-[WKUserDefaults initWithSuiteName:]):
(+[WKPreferenceObserver sharedInstance]):
(-[WKPreferenceObserver init]):
(-[WKPreferenceObserver preferenceDidChange:key:encodedValue:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::notifyPreferencesChanged):
* UIProcess/WebProcessPool.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::notifyPreferencesChanged):
* WebProcess/com.apple.WebProcess.sb.in:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj
trunk/Source/WebCore/PAL/pal/spi/cf/CFUtilitiesSPI.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebCore/testing/Internals.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/PAL/pal/spi/cocoa/NSUserDefaultsSPI.h
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.h
trunk/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit/PreferenceChanges.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (256755 => 256756)

--- trunk/Source/WebCore/ChangeLog	2020-02-17 19:40:48 UTC (rev 256755)
+++ trunk/Source/WebCore/ChangeLog	2020-02-17 19:50:16 UTC (rev 256756)
@@ -1,3 +1,22 @@
+2020-02-17  Per Arne Vollan  
+
+Use CF prefs direct mode in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=203420
+
+Reviewed by Brent Fulgham.
+
+Add Internals functions to read preferences.
+
+API tests: Tests added in PreferenceChanges.mm.
+
+* testing/Internals.cpp:
+(WebCore::Internals::readPreferenceInteger):
+(WebCore::Internals::encodedPreferenceValue):
+* testing/Internals.h:
+* testing/Internals.idl:
+* testing/Internals.mm:
+(WebCore::Internals::encodedPreferenceValue):
+
 2020-02-17  Youenn Fablet  
 
 Do not send the client URL to network process


Modified: trunk/Source/WebCore/PAL/ChangeLog (256755 => 256756)

--- trunk/Source/WebCore/PAL/ChangeLog	2020-02-17 19:40:48 UTC (rev 256755)
+++ trunk/Source/WebCore/PAL/ChangeLog	2020-02-17 19:50:16 UTC (rev 256756)
@@ -1,3 +1,16 @@
+2020-02-17  Per Arne Vollan  
+
+Use CF prefs direct mode in the WebContent process
+  

[webkit-changes] [256742] trunk/Source

2020-02-17 Thread pvollan
Title: [256742] trunk/Source








Revision 256742
Author pvol...@apple.com
Date 2020-02-17 10:29:33 -0800 (Mon, 17 Feb 2020)


Log Message
Mach lookup to com.apple.webinspector should not be allowed in WebKit's WebContent process
https://bugs.webkit.org/show_bug.cgi?id=203214

Reviewed by Brent Fulgham.

Source/_javascript_Core:

Add static flag in RemoteInspector to indicate whether a sandbox extension is needed. The remote inspector will only be
started if the sandbox extension is not needed. Only the WebContent process will need a sandbox extension, since this
patch removes mach access to 'com.apple.webinspector' for this process. Also add name and domain for the
'Enable Remote Inspector' setting, since this will be used in the UI process.

* inspector/remote/RemoteInspector.cpp:
* inspector/remote/RemoteInspector.h:
* inspector/remote/RemoteInspectorConstants.h:
* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::singleton):

Source/WebKit:

If the Web inspector is enabled when the WebContent process is started, a sandbox extension is created
for 'com.apple.webinspector' and a message is sent to the WebContent process, where the extension will
be consumed, and the remote Web inspector will be started. The same happens if Web inspector is enabled
by the user while Safari is running. When RemoteInspector::singleton() is called in the UI process there
is no need for an extension, since access to the Web inspector daemon is already allowed.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::backlightLevelDidChangeCallback):
(WebKit::WebProcessPool::remoteWebInspectorEnabledCallback):
(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):
* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::enableRemoteInspectorIfNeeded):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::mayBecomeUnresponsive):
* UIProcess/WebProcessProxy.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::enableRemoteWebInspector):
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp
trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.h
trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorConstants.h
trunk/Source/_javascript_Core/inspector/remote/cocoa/RemoteInspectorCocoa.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (256741 => 256742)

--- trunk/Source/_javascript_Core/ChangeLog	2020-02-17 18:23:54 UTC (rev 256741)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-02-17 18:29:33 UTC (rev 256742)
@@ -1,3 +1,21 @@
+2020-02-17  Per Arne Vollan  
+
+Mach lookup to com.apple.webinspector should not be allowed in WebKit's WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=203214
+
+Reviewed by Brent Fulgham.
+
+Add static flag in RemoteInspector to indicate whether a sandbox extension is needed. The remote inspector will only be
+started if the sandbox extension is not needed. Only the WebContent process will need a sandbox extension, since this
+patch removes mach access to 'com.apple.webinspector' for this process. Also add name and domain for the
+'Enable Remote Inspector' setting, since this will be used in the UI process.
+
+* inspector/remote/RemoteInspector.cpp:
+* inspector/remote/RemoteInspector.h:
+* inspector/remote/RemoteInspectorConstants.h:
+* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
+(Inspector::RemoteInspector::singleton):
+
 2020-02-16  Fujii Hironori  
 
 Remove remaining WTF_EXPORT and WTF_IMPORT by replacing them with WTF_EXPORT_DECLARATION and WTF_IMPORT_DECLARATION


Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp (256741 => 256742)

--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspector.cpp	

[webkit-changes] [256740] trunk/Source/WebKit

2020-02-17 Thread pvollan
Title: [256740] trunk/Source/WebKit








Revision 256740
Author pvol...@apple.com
Date 2020-02-17 10:18:40 -0800 (Mon, 17 Feb 2020)


Log Message
[iOS] Add telemetry with backtrace for specific rules
https://bugs.webkit.org/show_bug.cgi?id=207494

Reviewed by Brent Fulgham.

For specific sandbox mach lookup rules in the WebContent process, add telemetry with backtrace.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (256739 => 256740)

--- trunk/Source/WebKit/ChangeLog	2020-02-17 18:02:00 UTC (rev 256739)
+++ trunk/Source/WebKit/ChangeLog	2020-02-17 18:18:40 UTC (rev 256740)
@@ -1,3 +1,16 @@
+2020-02-17  Per Arne Vollan  
+
+[iOS] Add telemetry with backtrace for specific rules
+https://bugs.webkit.org/show_bug.cgi?id=207494
+
+Reviewed by Brent Fulgham.
+
+For specific sandbox mach lookup rules in the WebContent process, add telemetry with backtrace.
+
+No new tests, no behavior change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-02-17  Antti Koivisto  
 
 [macOS] Add trace points for layer flush runloop observer


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (256739 => 256740)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-17 18:02:00 UTC (rev 256739)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-17 18:18:40 UTC (rev 256740)
@@ -115,7 +115,7 @@
 (allow file-read* asset-access-filter)
 (if (memq 'with-media-playback options)
 (play-media asset-access-filter))
-(allow mach-lookup (with report) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace) (with telemetry)
(global-name "com.apple.mobileassetd" "com.apple.mobileassetd.v2"))
 (mobile-preferences-read "com.apple.MobileAsset")))
 
@@ -353,7 +353,7 @@
 "com.apple.mt"
 "com.apple.preferences.sounds")
 
-(allow mach-lookup (with report) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace) (with telemetry)
 (global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
 )
 
@@ -544,7 +544,7 @@
 (allow ipc-posix-shm-read*
(ipc-posix-name-prefix "apple.cfprefs."))
  
-(allow mach-lookup (with report) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace) (with telemetry)
 (global-name "com.apple.lsd.open")
 (global-name "com.apple.lsd.mapdb"))
 
@@ -669,7 +669,7 @@
 ;;  LaunchServices app icons
 (allow file-read*
 (well-known-system-group-container-subpath "/systemgroup.com.apple.lsd.iconscache"))
-(allow mach-lookup (with report) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace) (with telemetry)
 (xpc-service-name "com.apple.iconservices")
 (global-name "com.apple.iconservices"))
 
@@ -828,7 +828,7 @@
 (allow mach-lookup
(global-name "com.apple.webinspector"))
 
-(allow mach-lookup (with report) (with telemetry)
+(allow mach-lookup (with telemetry-backtrace) (with telemetry)
 (global-name "com.apple.PowerManagement.control"))
 
 (deny file-write-create (vnode-type SYMLINK))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [256531] trunk

2020-02-13 Thread pvollan
Title: [256531] trunk








Revision 256531
Author pvol...@apple.com
Date 2020-02-13 12:22:05 -0800 (Thu, 13 Feb 2020)


Log Message
[iOS] Check if PIP is supported in the UI process
https://bugs.webkit.org/show_bug.cgi?id=207406

Reviewed by Brent Fulgham.

Source/WebCore:

This is currently being checked in the WebProcess, but since this check is initiating communication with the frontboard
service which will be blocked, this check should be moved to the UI process. In the UI process, this is checked when
starting a new WebContent process, and sent to the WebContent process as part of the process creation parameters. The
WebContent is storing the received value.

API test: WebKit.PictureInPictureSupport

* platform/PictureInPictureSupport.h:
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(WebCore::setSupportsPictureInPicture):
(WebCore::supportsPictureInPicture):
* testing/Internals.cpp:
(WebCore::Internals::supportsPictureInPicture):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

When starting a new WebContent process, check if PIP is supported, and pass the results to the newly created
WebContent process.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/PictureInPictureSupport.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/PictureInPictureSupport.h
trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/PictureInPictureSupport.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (256530 => 256531)

--- trunk/Source/WebCore/ChangeLog	2020-02-13 19:47:29 UTC (rev 256530)
+++ trunk/Source/WebCore/ChangeLog	2020-02-13 20:22:05 UTC (rev 256531)
@@ -1,3 +1,26 @@
+2020-02-13  Per Arne Vollan  
+
+[iOS] Check if PIP is supported in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=207406
+
+Reviewed by Brent Fulgham.
+
+This is currently being checked in the WebProcess, but since this check is initiating communication with the frontboard
+service which will be blocked, this check should be moved to the UI process. In the UI process, this is checked when
+starting a new WebContent process, and sent to the WebContent process as part of the process creation parameters. The
+WebContent is storing the received value.
+
+API test: WebKit.PictureInPictureSupport
+
+* platform/PictureInPictureSupport.h:
+* platform/ios/VideoFullscreenInterfaceAVKit.mm:
+(WebCore::setSupportsPictureInPicture):
+(WebCore::supportsPictureInPicture):
+* testing/Internals.cpp:
+(WebCore::Internals::supportsPictureInPicture):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-02-13  Benjamin Nham  
 
 Allow use of proxies in MiniBrowser


Modified: trunk/Source/WebCore/platform/PictureInPictureSupport.h (256530 => 256531)

--- trunk/Source/WebCore/platform/PictureInPictureSupport.h	2020-02-13 19:47:29 UTC (rev 256530)
+++ trunk/Source/WebCore/platform/PictureInPictureSupport.h	2020-02-13 20:22:05 UTC (rev 256531)
@@ -28,6 +28,7 @@
 namespace WebCore {
 
 #if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
+WEBCORE_EXPORT void setSupportsPictureInPicture(bool);
 WEBCORE_EXPORT bool supportsPictureInPicture();
 #else
 constexpr bool supportsPictureInPicture() { return false; }


Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (256530 => 256531)

--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2020-02-13 19:47:29 UTC (rev 256530)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2020-02-13 20:22:05 UTC (rev 256531)
@@ -1503,9 +1503,18 @@
 
 #endif // HAVE(AVKIT)
 
+static Optional isPictureInPictureSupported;
+
+void WebCore::setSupportsPictureInPicture(bool isSupported)
+{
+isPictureInPictureSupported = isSupported;
+}
+
 bool WebCore::supportsPictureInPicture()
 {
 #if PLATFORM(IOS_FAMILY) && HAVE(AVKIT) && !PLATFORM(WATCHOS)
+if (isPictureInPictureSupported.hasValue())

[webkit-changes] [256455] trunk

2020-02-12 Thread pvollan
Title: [256455] trunk








Revision 256455
Author pvol...@apple.com
Date 2020-02-12 10:49:42 -0800 (Wed, 12 Feb 2020)


Log Message

Source/WebKit:
Pages that trigger a redirect will sometimes be left blank
https://bugs.webkit.org/show_bug.cgi?id=207614
rdar://problem/59077740

Patch by Simon Fraser  on 2020-02-12
Reviewed by Tim Horton.

TiledCoreAnimationDrawingArea::setRootCompositingGraphicsLayer() can be called when the layer tree
is frozen, in which case we stash away the layer in m_pendingRootLayer to be parented later at flush
time. However, this sequence of calls had a bug:

setRootCompositingGraphicsLayer() when frozen
-> stash in m_pendingRootLayer
setRootCompositingGraphicsLayer() when not frozen
-> set the root layer
flushLayers()
-> set the root layer to the (old) m_pendingRootLayer

So we need to clear m_pendingRootLayer at step 2.

Very timing dependent, hard to test.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):

LayoutTests:
[iOS] Deny mach lookup access to analytics service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207482

Reviewed by Darin Adler.

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (256454 => 256455)

--- trunk/LayoutTests/ChangeLog	2020-02-12 18:48:24 UTC (rev 256454)
+++ trunk/LayoutTests/ChangeLog	2020-02-12 18:49:42 UTC (rev 256455)
@@ -1,3 +1,13 @@
+2020-02-12  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to analytics service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207482
+
+Reviewed by Darin Adler.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-02-12  Jacob Uphoff  
 
 [ iOS ] http/tests/security/strip-referrer-to-origin-for-third-party-redirects-in-private-mode.html is flaky timing out


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (256454 => 256455)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-12 18:48:24 UTC (rev 256454)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-12 18:49:42 UTC (rev 256455)
@@ -19,3 +19,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.aggregated") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.tccd") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.uikit.viewservice") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.analyticsd") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (256454 => 256455)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-12 18:48:24 UTC (rev 256454)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-12 18:49:42 UTC (rev 256455)
@@ -22,6 +22,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.aggregated\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.tccd\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.uikit.viewservice\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.analyticsd\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (256454 => 256455)

--- trunk/Source/WebKit/ChangeLog	2020-02-12 18:48:24 UTC (rev 256454)
+++ trunk/Source/WebKit/ChangeLog	2020-02-12 18:49:42 UTC (rev 256455)
@@ -26,6 +26,19 @@
 
 2020-02-12  Per Arne Vollan  
 
+[iOS] Deny mach lookup access to analytics service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207482
+
+Reviewed by Darin Adler.
+
+As part of sandbox hardening work, this service should be denied in the WebContent process' sandbox.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
+2020-02-12  Per Arne Vollan  
+
 [iOS] Deny mach lookup access to view service in the WebContent process
 https://bugs.webkit.org/show_bug.cgi?id=207487
 


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (256454 => 256455)

--- 

[webkit-changes] [256450] trunk

2020-02-12 Thread pvollan
Title: [256450] trunk








Revision 256450
Author pvol...@apple.com
Date 2020-02-12 10:40:04 -0800 (Wed, 12 Feb 2020)


Log Message
[iOS] Deny mach lookup access to view service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207487
Source/WebKit:



Reviewed by Darin Adler.

As part of sandbox hardening, mach lookup access to com.apple.uikit.viewservice should be denied.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:


Reviewed by Darin Adler.

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (256449 => 256450)

--- trunk/LayoutTests/ChangeLog	2020-02-12 18:36:05 UTC (rev 256449)
+++ trunk/LayoutTests/ChangeLog	2020-02-12 18:40:04 UTC (rev 256450)
@@ -1,3 +1,13 @@
+2020-02-12  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to view service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207487
+
+Reviewed by Darin Adler.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-02-12  Jacob Uphoff  
 
 [ iOS ] http/tests/security/cross-frame-access-private-browsing.html is a flay timeout


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (256449 => 256450)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-12 18:36:05 UTC (rev 256449)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-12 18:40:04 UTC (rev 256450)
@@ -18,3 +18,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.system.logger") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.aggregated") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.tccd") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.uikit.viewservice") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (256449 => 256450)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-12 18:36:05 UTC (rev 256449)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-12 18:40:04 UTC (rev 256450)
@@ -21,6 +21,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.system.logger\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.aggregated\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.tccd\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.uikit.viewservice\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (256449 => 256450)

--- trunk/Source/WebKit/ChangeLog	2020-02-12 18:36:05 UTC (rev 256449)
+++ trunk/Source/WebKit/ChangeLog	2020-02-12 18:40:04 UTC (rev 256450)
@@ -1,3 +1,17 @@
+2020-02-12  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to view service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207487
+
+
+Reviewed by Darin Adler.
+
+As part of sandbox hardening, mach lookup access to com.apple.uikit.viewservice should be denied.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-02-12  Alex Christensen  
 
 Make _WKResourceLoadDelegate.h able to be included before other headers


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (256449 => 256450)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-12 18:36:05 UTC (rev 256449)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-12 18:40:04 UTC (rev 256450)
@@ -422,10 +422,6 @@
 (allow mach-lookup
 (global-name "com.apple.CARenderServer"))
 
-(allow mach-lookup (with report) (with telemetry)
-(global-name-regex #"^com\.apple\.uikit\.viewservice\..+")
-)
-
 ; UIKit-required IOKit nodes.
 (allow iokit-open  (with report) (with telemetry)
 (iokit-user-client-class "AppleJPEGDriverUserClient")






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [256371] trunk

2020-02-11 Thread pvollan
Title: [256371] trunk








Revision 256371
Author pvol...@apple.com
Date 2020-02-11 14:22:23 -0800 (Tue, 11 Feb 2020)


Log Message
[iOS] Deny mach lookup access to the tccd service in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=207488

Reviewed by Darin Adler.

Source/WebKit:

As part of sandbox hardening, deny mach lookup access to the tccd service.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (256370 => 256371)

--- trunk/LayoutTests/ChangeLog	2020-02-11 22:13:15 UTC (rev 256370)
+++ trunk/LayoutTests/ChangeLog	2020-02-11 22:22:23 UTC (rev 256371)
@@ -1,3 +1,13 @@
+2020-02-11  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to the tccd service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207488
+
+Reviewed by Darin Adler.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-02-11  Jason Lawrence  
 
 [ iOS wk2 ] http/wpt/beacon/cors/crossorigin-arraybufferview-no-preflight.html is flaky failing.


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (256370 => 256371)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-11 22:13:15 UTC (rev 256370)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-02-11 22:22:23 UTC (rev 256371)
@@ -17,4 +17,4 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.powerlog.plxpclogger.xpc") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.system.logger") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.aggregated") is false
-
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.tccd") is false


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (256370 => 256371)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-11 22:13:15 UTC (rev 256370)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-02-11 22:22:23 UTC (rev 256371)
@@ -20,6 +20,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.powerlog.plxpclogger.xpc\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.system.logger\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.aggregated\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.tccd\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (256370 => 256371)

--- trunk/Source/WebKit/ChangeLog	2020-02-11 22:13:15 UTC (rev 256370)
+++ trunk/Source/WebKit/ChangeLog	2020-02-11 22:22:23 UTC (rev 256371)
@@ -1,3 +1,16 @@
+2020-02-11  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to the tccd service in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=207488
+
+Reviewed by Darin Adler.
+
+As part of sandbox hardening, deny mach lookup access to the tccd service.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-02-11  Eric Carlson  
 
 Support in-band VTT captions when loading media in the GPU Process


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (256370 => 256371)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-11 22:13:15 UTC (rev 256370)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-02-11 22:22:23 UTC (rev 256371)
@@ -605,8 +605,7 @@
 (global-name "com.apple.cfprefsd.daemon"))
 
 (allow mach-lookup (with report) (with telemetry)
-(global-name "com.apple.distributed_notifications@1v3")
-(global-name "com.apple.tccd"))
+(global-name "com.apple.distributed_notifications@1v3"))
 
 (allow ipc-posix-shm-read*
(ipc-posix-name-prefix "apple.cfprefs."))






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [256234] trunk

2020-02-10 Thread pvollan
Title: [256234] trunk








Revision 256234
Author pvol...@apple.com
Date 2020-02-10 17:46:03 -0800 (Mon, 10 Feb 2020)


Log Message
[iOS] Crash when granting access to asset services
https://bugs.webkit.org/show_bug.cgi?id=207520
Source/WebKit:



Reviewed by Brent Fulgham.

Pass correct handle when calling SandboxExtension::createHandleForMachLookup.

API test: WebKit.GrantAccessToMobileAssetsCrash

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::grantAccessToAssetServices):

Tools:

Reviewed by Brent Fulgham.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (256233 => 256234)

--- trunk/Source/WebKit/ChangeLog	2020-02-11 01:13:01 UTC (rev 256233)
+++ trunk/Source/WebKit/ChangeLog	2020-02-11 01:46:03 UTC (rev 256234)
@@ -1,3 +1,18 @@
+2020-02-10  Per Arne Vollan  
+
+[iOS] Crash when granting access to asset services
+https://bugs.webkit.org/show_bug.cgi?id=207520
+
+
+Reviewed by Brent Fulgham.
+
+Pass correct handle when calling SandboxExtension::createHandleForMachLookup.
+
+API test: WebKit.GrantAccessToMobileAssetsCrash
+
+* UIProcess/ios/WebPageProxyIOS.mm:
+(WebKit::WebPageProxy::grantAccessToAssetServices):
+
 2020-02-10  David Kilzer  
 
 WebKit::WebProcessPool::initializeClassesForParameterCoding() should keep a copy of CString


Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (256233 => 256234)

--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-02-11 01:13:01 UTC (rev 256233)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2020-02-11 01:46:03 UTC (rev 256234)
@@ -1519,7 +1519,7 @@
 {
 SandboxExtension::Handle mobileAssetHandle, mobileAssetHandleV2;
 SandboxExtension::createHandleForMachLookup("com.apple.mobileassetd", WTF::nullopt, mobileAssetHandle);
-SandboxExtension::createHandleForMachLookup("com.apple.mobileassetd.v2", WTF::nullopt, mobileAssetHandle);
+SandboxExtension::createHandleForMachLookup("com.apple.mobileassetd.v2", WTF::nullopt, mobileAssetHandleV2);
 process().send(Messages::WebProcess::GrantAccessToAssetServices(mobileAssetHandle, mobileAssetHandleV2), 0);
 }
 


Modified: trunk/Tools/ChangeLog (256233 => 256234)

--- trunk/Tools/ChangeLog	2020-02-11 01:13:01 UTC (rev 256233)
+++ trunk/Tools/ChangeLog	2020-02-11 01:46:03 UTC (rev 256234)
@@ -1,3 +1,14 @@
+2020-02-10  Per Arne Vollan  
+
+[iOS] Crash when granting access to asset services
+https://bugs.webkit.org/show_bug.cgi?id=207520
+
+Reviewed by Brent Fulgham.
+
+* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+* TestWebKitAPI/Tests/WebKit/GrantAccessToMobileAssets.mm: Added.
+(TEST):
+
 2020-02-10  Chris Dumez  
 
 [DRT] InternalSettingsGenerated::resetToConsistentState() may override TestOptions


Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (256233 => 256234)

--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-02-11 01:13:01 UTC (rev 256233)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-02-11 01:46:03 UTC (rev 256234)
@@ -996,6 +996,7 @@
 		E38A0D351FD50CC300E98C8B /* Threading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38A0D341FD50CBC00E98C8B /* Threading.cpp */; };
 		E38D65CA23A45FAA0063D69A /* PackedRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38D65C823A45FA90063D69A /* PackedRef.cpp */; };
 		E38D65CB23A45FAA0063D69A /* PackedRefPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38D65C923A45FA90063D69A /* PackedRefPtr.cpp */; };
+		E394AE6F23F2303E005B4936 /* GrantAccessToMobileAssets.mm in Sources */ = {isa = PBXBuildFile; fileRef = E394AE6E23F2303E005B4936 /* GrantAccessToMobileAssets.mm */; };
 		E3A1E77F21B25B39008C6007 /* URLParserTextEncoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3A1E77E21B25B39008C6007 /* URLParserTextEncoding.cpp */; };
 		E3A1E78221B25B7A008C6007 /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3A1E78021B25B79008C6007 /* URL.cpp */; };
 		E3A1E78521B25B91008C6007 /* URLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3A1E78421B25B91008C6007 /* URLParser.cpp */; };
@@ -2569,6 +2570,7 @@
 		E38A0D341FD50CBC00E98C8B /* Threading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Threading.cpp; sourceTree = ""; };
 		E38D65C823A45FA90063D69A /* PackedRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PackedRef.cpp; sourceTree = ""; };
 		

[webkit-changes] [256225] trunk

2020-02-10 Thread pvollan
Title: [256225] trunk








Revision 256225
Author pvol...@apple.com
Date 2020-02-10 15:49:15 -0800 (Mon, 10 Feb 2020)


Log Message
[watchOS] Notification listener is never unregistered
https://bugs.webkit.org/show_bug.cgi?id=207459
Source/WebKit:



Reviewed by Maciej Stachowiak.

On watchOS, the backlight changed notification is registered in WebProcessPool::registerNotificationObservers(),
but not unregistered in WebProcessPool::unregisterNotificationObservers().

API test: WebKit.BacklightLevelNotificationCrash

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::unregisterNotificationObservers):

Tools:

Reviewed by Maciej Stachowiak.

Add a test which tests that posting a backlight level change notification will not cause a crash.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (256224 => 256225)

--- trunk/Source/WebKit/ChangeLog	2020-02-10 23:46:36 UTC (rev 256224)
+++ trunk/Source/WebKit/ChangeLog	2020-02-10 23:49:15 UTC (rev 256225)
@@ -1,3 +1,19 @@
+2020-02-10  Per Arne Vollan  
+
+[watchOS] Notification listener is never unregistered
+https://bugs.webkit.org/show_bug.cgi?id=207459
+
+
+Reviewed by Maciej Stachowiak.
+
+On watchOS, the backlight changed notification is registered in WebProcessPool::registerNotificationObservers(),
+but not unregistered in WebProcessPool::unregisterNotificationObservers().
+
+API test: WebKit.BacklightLevelNotificationCrash
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::unregisterNotificationObservers):
+
 2020-02-10  James Howard  
 
 Standard gamepad mapping for GameControllerGamepads


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (256224 => 256225)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-02-10 23:46:36 UTC (rev 256224)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-02-10 23:49:15 UTC (rev 256225)
@@ -572,9 +572,11 @@
 #endif
 [[NSNotificationCenter defaultCenter] removeObserver:m_activationObserver.get()];
 [[NSNotificationCenter defaultCenter] removeObserver:m_deactivationObserver.get()];
-#elif PLATFORM(IOS)
+#elif !PLATFORM(MACCATALYST)
 CFNotificationCenterRemoveObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, static_cast(UIBacklightLevelChangedNotification) , nullptr);
+#if PLATFORM(IOS)
 [[NSNotificationCenter defaultCenter] removeObserver:m_accessibilityEnabledObserver.get()];
+#endif // PLATFORM(IOS)
 #endif // !PLATFORM(IOS_FAMILY)
 }
 


Modified: trunk/Tools/ChangeLog (256224 => 256225)

--- trunk/Tools/ChangeLog	2020-02-10 23:46:36 UTC (rev 256224)
+++ trunk/Tools/ChangeLog	2020-02-10 23:49:15 UTC (rev 256225)
@@ -1,3 +1,16 @@
+2020-02-10  Per Arne Vollan  
+
+[watchOS] Notification listener is never unregistered
+https://bugs.webkit.org/show_bug.cgi?id=207459
+
+Reviewed by Maciej Stachowiak.
+
+Add a test which tests that posting a backlight level change notification will not cause a crash.
+
+* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+* TestWebKitAPI/Tests/WebKit/BacklightLevelNotification.mm: Added.
+(TEST):
+
 2020-02-10  James Howard  
 
 Standard gamepad mapping for GameControllerGamepads


Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (256224 => 256225)

--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-02-10 23:46:36 UTC (rev 256224)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2020-02-10 23:49:15 UTC (rev 256225)
@@ -875,6 +875,7 @@
 		C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */; };
 		C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */; };
 		C145CC0C23DA5A1F003A5EEB /* MimeTypes.mm in Sources */ = {isa = PBXBuildFile; fileRef = C145CC0B23DA5A0F003A5EEB /* MimeTypes.mm */; };
+		C15CBB3023F1FF1A00300CC7 /* BacklightLevelNotification.mm in Sources */ = {isa = PBXBuildFile; fileRef = C15CBB2F23F1FF1A00300CC7 /* BacklightLevelNotification.mm */; };
 		C1692DCA23D10DAE006E88F7 /* Battery.mm in Sources */ = {isa = PBXBuildFile; fileRef = C1692DC923D10DAE006E88F7 /* Battery.mm */; };
 		C20F88A72295B96700D610FA /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 

[webkit-changes] [255874] trunk/Source

2020-02-05 Thread pvollan
Title: [255874] trunk/Source








Revision 255874
Author pvol...@apple.com
Date 2020-02-05 16:06:20 -0800 (Wed, 05 Feb 2020)


Log Message
[iOS] Do not create sandbox reports when the UI process cannot issue extensions to diagnostics service
https://bugs.webkit.org/show_bug.cgi?id=207279

Source/WebKit:

Reviewed by Brent Fulgham.

Do not create sandbox reports when the UI process cannot issue mach extensions to the diagnostics service.
The majority of clients are capable of doing this.

No new tests, since it is not trivial to test if no sandbox reports are generated for a violation.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::create):
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
(WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
(WebKit::SandboxExtension::createHandleForMachLookup):
* Shared/SandboxExtension.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):

Source/WTF:

Reviewed by Brent Fulgham.

Add flag which avoids generating sandbox reports.

* wtf/spi/darwin/SandboxSPI.h:

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
trunk/Source/WebKit/Shared/SandboxExtension.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm




Diff

Modified: trunk/Source/WTF/ChangeLog (255873 => 255874)

--- trunk/Source/WTF/ChangeLog	2020-02-05 23:57:44 UTC (rev 255873)
+++ trunk/Source/WTF/ChangeLog	2020-02-06 00:06:20 UTC (rev 255874)
@@ -1,3 +1,15 @@
+2020-02-05  Per Arne Vollan  
+
+[iOS] Do not create sandbox reports when the UI process cannot issue extensions to diagnostics service
+https://bugs.webkit.org/show_bug.cgi?id=207279
+
+
+Reviewed by Brent Fulgham.
+
+Add flag which avoids generating sandbox reports.
+
+* wtf/spi/darwin/SandboxSPI.h:
+
 2020-02-05  Alex Christensen  
 
 Make WKWebView._negotiatedLegacyTLS accurate when loading main resouorce from network or cache


Modified: trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h (255873 => 255874)

--- trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h	2020-02-05 23:57:44 UTC (rev 255873)
+++ trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h	2020-02-06 00:06:20 UTC (rev 255874)
@@ -59,6 +59,8 @@
 extern const char *const APP_SANDBOX_READ_WRITE;
 extern const enum sandbox_filter_type SANDBOX_CHECK_NO_REPORT;
 
+extern const uint32_t SANDBOX_EXTENSION_NO_REPORT;
+
 char *sandbox_extension_issue_file(const char *extension_class, const char *path, uint32_t flags);
 char *sandbox_extension_issue_generic(const char *extension_class, uint32_t flags);
 #if HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN)


Modified: trunk/Source/WebKit/ChangeLog (255873 => 255874)

--- trunk/Source/WebKit/ChangeLog	2020-02-05 23:57:44 UTC (rev 255873)
+++ trunk/Source/WebKit/ChangeLog	2020-02-06 00:06:20 UTC (rev 255874)
@@ -1,3 +1,25 @@
+2020-02-05  Per Arne Vollan  
+
+[iOS] Do not create sandbox reports when the UI process cannot issue extensions to diagnostics service
+https://bugs.webkit.org/show_bug.cgi?id=207279
+
+
+Reviewed by Brent Fulgham.
+
+Do not create sandbox reports when the UI process cannot issue mach extensions to the diagnostics service.
+The majority of clients are capable of doing this.
+
+No new tests, since it is not trivial to test if no sandbox reports are generated for a violation.
+
+* Shared/Cocoa/SandboxExtensionCocoa.mm:
+(WebKit::SandboxExtensionImpl::create):
+(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
+(WebKit::SandboxExtensionImpl::SandboxExtensionImpl):
+(WebKit::SandboxExtension::createHandleForMachLookup):
+* Shared/SandboxExtension.h:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+
 2020-02-05  Chris Dumez  
 
 [IPC hardening] Protect against bad identifier in CacheStorageEngineConnection::reference() / dereference()


Modified: trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (255873 => 255874)

--- trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-02-05 23:57:44 UTC (rev 255873)
+++ trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm	2020-02-06 00:06:20 UTC (rev 255874)
@@ -40,9 +40,9 @@
 class SandboxExtensionImpl {
 WTF_MAKE_FAST_ALLOCATED;
 public:
-static std::unique_ptr create(const char* path, SandboxExtension::Type type, Optional auditToken = WTF::nullopt)
+static std::unique_ptr create(const char* path, SandboxExtension::Type type, Optional auditToken = WTF::nullopt, OptionSet flags = SandboxExtension::Flags::Default)
 {
-std::unique_ptr impl { new SandboxExtensionImpl(path, type, auditToken) };
+std::unique_ptr impl { new SandboxExtensionImpl(path, type, auditToken, flags) };
 if 

[webkit-changes] [255457] trunk

2020-01-30 Thread pvollan
Title: [255457] trunk








Revision 255457
Author pvol...@apple.com
Date 2020-01-30 14:13:23 -0800 (Thu, 30 Jan 2020)


Log Message
[iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled
https://bugs.webkit.org/show_bug.cgi?id=205443
Source/WebCore:

Reviewed by Brent Fulgham.

Get focus ring color in the UI process since getting this color will communicate with the frontboard daemon.

Test: fast/sandbox/ios/focus-ring-color.html

* rendering/RenderTheme.h:
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::cachedFocusRingColor):
(WebCore::RenderThemeIOS::platformFocusRingColor const):
(WebCore::RenderThemeIOS::setFocusRingColor):
* testing/Internals.cpp:
(WebCore::Internals::focusRingColor):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:



Reviewed by Brent Fulgham.

When support for the html attachment element is enabled, issue a mach lookup extension to the frontboard and icon service
for the WebContent process, since these daemons are being contacted when icons for attachments are being queried. Also,
retrieve the focus ring color in the UI process, since getting this color requires access to the frontboard daemon.

Test: fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

Reviewed by Brent Fulgham.

* fast/sandbox/ios/focus-ring-color-expected.txt: Added.
* fast/sandbox/ios/focus-ring-color.html: Added.
* fast/sandbox/ios/sandbox-mach-lookup-attachment-element-expected.txt: Added.
* fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/rendering/RenderTheme.h
trunk/Source/WebCore/rendering/RenderThemeIOS.h
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp
trunk/Source/WebKit/Shared/WebPageCreationParameters.h
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm


Added Paths

trunk/LayoutTests/fast/sandbox/ios/focus-ring-color-expected.txt
trunk/LayoutTests/fast/sandbox/ios/focus-ring-color.html
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-attachment-element-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html




Diff

Modified: trunk/LayoutTests/ChangeLog (255456 => 255457)

--- trunk/LayoutTests/ChangeLog	2020-01-30 21:52:52 UTC (rev 255456)
+++ trunk/LayoutTests/ChangeLog	2020-01-30 22:13:23 UTC (rev 255457)
@@ -1,3 +1,15 @@
+2020-01-30  Per Arne Vollan  
+
+[iOS] Issue mach sandbox extension to the frontboard and icon service when the attachment element is enabled
+https://bugs.webkit.org/show_bug.cgi?id=205443
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/focus-ring-color-expected.txt: Added.
+* fast/sandbox/ios/focus-ring-color.html: Added.
+* fast/sandbox/ios/sandbox-mach-lookup-attachment-element-expected.txt: Added.
+* fast/sandbox/ios/sandbox-mach-lookup-attachment-element.html: Added.
+
 2020-01-30  Alexey Shvayka  
 
 Incomplete braced quantifiers should be banned in Unicode patterns only


Added: trunk/LayoutTests/fast/sandbox/ios/focus-ring-color-expected.txt (0 => 255457)

--- trunk/LayoutTests/fast/sandbox/ios/focus-ring-color-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/focus-ring-color-expected.txt	2020-01-30 22:13:23 UTC (rev 255457)
@@ -0,0 +1,7 @@
+Test that the focus ring color is as expected.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.focusRingColor() is 'rgb(0, 122, 255)'
+


Added: trunk/LayoutTests/fast/sandbox/ios/focus-ring-color.html (0 => 255457)

--- trunk/LayoutTests/fast/sandbox/ios/focus-ring-color.html	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/focus-ring-color.html	2020-01-30 22:13:23 UTC (rev 255457)
@@ -0,0 +1,14 @@
+
+
+
+
+description('Test that the 

[webkit-changes] [255386] trunk

2020-01-29 Thread pvollan
Title: [255386] trunk








Revision 255386
Author pvol...@apple.com
Date 2020-01-29 14:38:35 -0800 (Wed, 29 Jan 2020)


Log Message
[iOS] Deny mach lookup access to aggregate service
https://bugs.webkit.org/show_bug.cgi?id=206710


Reviewed by Darin Adler.

Source/WebKit:

Tighten sandbox by denying access to this service.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (255385 => 255386)

--- trunk/LayoutTests/ChangeLog	2020-01-29 22:22:43 UTC (rev 255385)
+++ trunk/LayoutTests/ChangeLog	2020-01-29 22:38:35 UTC (rev 255386)
@@ -1,3 +1,14 @@
+2020-01-29  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to aggregate service
+https://bugs.webkit.org/show_bug.cgi?id=206710
+
+
+Reviewed by Darin Adler.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2020-01-29  Wenson Hsieh  
 
 [iPadOS] Select popovers on amazon.com sometimes dismiss immediately after appearing


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (255385 => 255386)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-01-29 22:22:43 UTC (rev 255385)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2020-01-29 22:38:35 UTC (rev 255386)
@@ -20,4 +20,5 @@
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.pluginkit.pkd") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.powerlog.plxpclogger.xpc") is false
 PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.system.logger") is false
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.aggregated") is false
 


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (255385 => 255386)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-01-29 22:22:43 UTC (rev 255385)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2020-01-29 22:38:35 UTC (rev 255386)
@@ -23,6 +23,7 @@
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.pluginkit.pkd\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.powerlog.plxpclogger.xpc\")");
 shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.system.logger\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.aggregated\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (255385 => 255386)

--- trunk/Source/WebKit/ChangeLog	2020-01-29 22:22:43 UTC (rev 255385)
+++ trunk/Source/WebKit/ChangeLog	2020-01-29 22:38:35 UTC (rev 255386)
@@ -1,3 +1,17 @@
+2020-01-29  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to aggregate service
+https://bugs.webkit.org/show_bug.cgi?id=206710
+
+
+Reviewed by Darin Adler.
+
+Tighten sandbox by denying access to this service.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2020-01-29  Wenson Hsieh  
 
 [iPadOS] Select popovers on amazon.com sometimes dismiss immediately after appearing


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (255385 => 255386)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-29 22:22:43 UTC (rev 255385)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-29 22:38:35 UTC (rev 255386)
@@ -595,7 +595,6 @@
 (global-name "com.apple.cfprefsd.daemon"))
 
 (allow mach-lookup (with report) (with telemetry)
-(global-name "com.apple.aggregated")
 (global-name "com.apple.distributed_notifications@1v3")
 (global-name "com.apple.tccd"))
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [255119] trunk

2020-01-25 Thread pvollan
Title: [255119] trunk








Revision 255119
Author pvol...@apple.com
Date 2020-01-25 08:51:34 -0800 (Sat, 25 Jan 2020)


Log Message
[Cocoa] Media mime types map should be created in the UI process
https://bugs.webkit.org/show_bug.cgi?id=206478

Reviewed by Darin Adler.

Source/WebCore:

Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
creation parameters.

API test: WebKit.MimeTypes

* platform/MIMETypeRegistry.cpp:
(WebCore::overriddenMimeTypesMap):
(WebCore::commonMediaTypes):
(WebCore::commonMimeTypesMap):
(WebCore::typesForCommonExtension):
* platform/MIMETypeRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::mediaMIMETypeForExtension):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mime type map from the UI process to the WebContent process as part of the
WebProcess creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
trunk/Source/WebCore/platform/MIMETypeRegistry.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/MimeTypes.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (255118 => 255119)

--- trunk/Source/WebCore/ChangeLog	2020-01-25 15:57:09 UTC (rev 255118)
+++ trunk/Source/WebCore/ChangeLog	2020-01-25 16:51:34 UTC (rev 255119)
@@ -1,3 +1,27 @@
+2020-01-25  Per Arne Vollan  
+
+[Cocoa] Media mime types map should be created in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=206478
+
+Reviewed by Darin Adler.
+
+Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
+This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
+creation parameters.
+
+API test: WebKit.MimeTypes
+
+* platform/MIMETypeRegistry.cpp:
+(WebCore::overriddenMimeTypesMap):
+(WebCore::commonMediaTypes):
+(WebCore::commonMimeTypesMap):
+(WebCore::typesForCommonExtension):
+* platform/MIMETypeRegistry.h:
+* testing/Internals.cpp:
+(WebCore::Internals::mediaMIMETypeForExtension):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-01-25  Zalan Bujtas  
 
 [LFC][IFC] Layout logic should be driven by the type of the inline box


Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.cpp (255118 => 255119)

--- trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-25 15:57:09 UTC (rev 255118)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-25 16:51:34 UTC (rev 255119)
@@ -274,98 +274,104 @@
 return unsupportedTextMIMETypes;
 }
 
-static const Vector* typesForCommonExtension(const String& extension)
+Optional, ASCIICaseInsensitiveHash>>& overriddenMimeTypesMap()
 {
-static const auto map = makeNeverDestroyed([] {
-struct TypeExtensionPair {
-ASCIILiteral type;
-ASCIILiteral extension;
-};
+static NeverDestroyed, ASCIICaseInsensitiveHash>>> map;
+return map;
+}
 
-// A table of common media MIME types and file extentions used when a platform's
-// specific MIME type lookup doesn't have a match for a media file extension.
-static const TypeExtensionPair commonMediaTypes[] = {
-// Ogg
-{ "application/ogg"_s, "ogx"_s },
-{ "audio/ogg"_s, "ogg"_s },
-{ "audio/ogg"_s, "oga"_s },
-{ "video/ogg"_s, "ogv"_s },
+const std::initializer_list& commonMediaTypes()
+{
+// A table of common media MIME types and file extensions used when a platform's
+// specific MIME type lookup doesn't have a match for a media file extension.
+static std::initializer_list commonMediaTypes = {
+// Ogg
+{ "application/ogg"_s, "ogx"_s },
+{ "audio/ogg"_s, "ogg"_s },
+{ 

[webkit-changes] [255081] trunk

2020-01-24 Thread pvollan
Title: [255081] trunk








Revision 255081
Author pvol...@apple.com
Date 2020-01-24 10:53:04 -0800 (Fri, 24 Jan 2020)


Log Message
Unreviewed, rolling out r255050.

Introduced crashes on bots

Reverted changeset:

"[Cocoa] Media mime types map should be created in the UI
process"
https://bugs.webkit.org/show_bug.cgi?id=206478
https://trac.webkit.org/changeset/255050

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
trunk/Source/WebCore/platform/MIMETypeRegistry.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Removed Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/MimeTypes.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (255080 => 255081)

--- trunk/Source/WebCore/ChangeLog	2020-01-24 18:40:19 UTC (rev 255080)
+++ trunk/Source/WebCore/ChangeLog	2020-01-24 18:53:04 UTC (rev 255081)
@@ -1,3 +1,16 @@
+2020-01-24  Per Arne Vollan  
+
+Unreviewed, rolling out r255050.
+
+Introduced crashes on bots
+
+Reverted changeset:
+
+"[Cocoa] Media mime types map should be created in the UI
+process"
+https://bugs.webkit.org/show_bug.cgi?id=206478
+https://trac.webkit.org/changeset/255050
+
 2020-01-24  Andres Gonzalez  
 
 Implementation of AXIsolatedObject::isStaticText and isLandmark methods.


Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.cpp (255080 => 255081)

--- trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-24 18:40:19 UTC (rev 255080)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-24 18:53:04 UTC (rev 255081)
@@ -274,18 +274,98 @@
 return unsupportedTextMIMETypes;
 }
 
-Optional, ASCIICaseInsensitiveHash>>& overriddenMimeTypesMap()
+static const Vector* typesForCommonExtension(const String& extension)
 {
-static NeverDestroyed, ASCIICaseInsensitiveHash>>> map;
-return map;
-}
+static const auto map = makeNeverDestroyed([] {
+struct TypeExtensionPair {
+ASCIILiteral type;
+ASCIILiteral extension;
+};
 
-const HashMap, ASCIICaseInsensitiveHash>& commonMimeTypesMap()
-{
-ASSERT(isMainThread());
-static NeverDestroyed, ASCIICaseInsensitiveHash>> mimeTypesMap = [] {
+// A table of common media MIME types and file extentions used when a platform's
+// specific MIME type lookup doesn't have a match for a media file extension.
+static const TypeExtensionPair commonMediaTypes[] = {
+// Ogg
+{ "application/ogg"_s, "ogx"_s },
+{ "audio/ogg"_s, "ogg"_s },
+{ "audio/ogg"_s, "oga"_s },
+{ "video/ogg"_s, "ogv"_s },
+
+// Annodex
+{ "application/annodex"_s, "anx"_s },
+{ "audio/annodex"_s, "axa"_s },
+{ "video/annodex"_s, "axv"_s },
+{ "audio/speex"_s, "spx"_s },
+
+// WebM
+{ "video/webm"_s, "webm"_s },
+{ "audio/webm"_s, "webm"_s },
+
+// MPEG
+{ "audio/mpeg"_s, "m1a"_s },
+{ "audio/mpeg"_s, "m2a"_s },
+{ "audio/mpeg"_s, "m1s"_s },
+{ "audio/mpeg"_s, "mpa"_s },
+{ "video/mpeg"_s, "mpg"_s },
+{ "video/mpeg"_s, "m15"_s },
+{ "video/mpeg"_s, "m1s"_s },
+{ "video/mpeg"_s, "m1v"_s },
+{ "video/mpeg"_s, "m75"_s },
+{ "video/mpeg"_s, "mpa"_s },
+{ "video/mpeg"_s, "mpeg"_s },
+{ "video/mpeg"_s, "mpm"_s },
+{ "video/mpeg"_s, "mpv"_s },
+
+// MPEG playlist
+{ "application/vnd.apple.mpegurl"_s, "m3u8"_s },
+{ "application/mpegurl"_s, "m3u8"_s },
+{ "application/x-mpegurl"_s, "m3u8"_s },
+{ "audio/mpegurl"_s, "m3url"_s },
+{ "audio/x-mpegurl"_s, "m3url"_s },
+{ "audio/mpegurl"_s, "m3u"_s },
+{ "audio/x-mpegurl"_s, "m3u"_s },
+
+// MPEG-4
+{ "video/x-m4v"_s, "m4v"_s },
+{ "audio/x-m4a"_s, "m4a"_s },
+{ "audio/x-m4b"_s, "m4b"_s },
+{ "audio/x-m4p"_s, "m4p"_s },
+{ "audio/mp4"_s, "m4a"_s },
+
+// MP3
+{ "audio/mp3"_s, "mp3"_s },
+{ "audio/x-mp3"_s, "mp3"_s },
+{ "audio/x-mpeg"_s, "mp3"_s },
+
+// MPEG-2
+{ "video/x-mpeg2"_s, "mp2"_s },
+{ "video/mpeg2"_s, "vob"_s },
+{ "video/mpeg2"_s, "mod"_s },
+{ "video/m2ts"_s, "m2ts"_s },
+{ "video/x-m2ts"_s, "m2t"_s },
+

[webkit-changes] [255050] trunk

2020-01-23 Thread pvollan
Title: [255050] trunk








Revision 255050
Author pvol...@apple.com
Date 2020-01-23 19:18:55 -0800 (Thu, 23 Jan 2020)


Log Message
[Cocoa] Media mime types map should be created in the UI process
https://bugs.webkit.org/show_bug.cgi?id=206478

Reviewed by Darin Adler.

Source/WebCore:

Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
creation parameters.

API test: WebKit.MimeTypes

* platform/MIMETypeRegistry.cpp:
(WebCore::overriddenMimeTypesMap):
(WebCore::commonMediaTypes):
(WebCore::commonMimeTypesMap):
(WebCore::typesForCommonExtension):
* platform/MIMETypeRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::mediaMIMETypeForExtension):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Send the mime type map from the UI process to the WebContent process as part of the
WebProcess creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/MimeTypes.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/MIMETypeRegistry.cpp
trunk/Source/WebCore/platform/MIMETypeRegistry.h
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Tools/TestWebKitAPI/Tests/WebKit/MimeTypes.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (255049 => 255050)

--- trunk/Source/WebCore/ChangeLog	2020-01-24 03:11:08 UTC (rev 255049)
+++ trunk/Source/WebCore/ChangeLog	2020-01-24 03:18:55 UTC (rev 255050)
@@ -1,3 +1,27 @@
+2020-01-23  Per Arne Vollan  
+
+[Cocoa] Media mime types map should be created in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=206478
+
+Reviewed by Darin Adler.
+
+Creating this map in the WebContent process will access the launch services daemon, which will be blocked.
+This patch creates the map in the UI process and sends it to the WebContent process as part of the WebProcess
+creation parameters.
+
+API test: WebKit.MimeTypes
+
+* platform/MIMETypeRegistry.cpp:
+(WebCore::overriddenMimeTypesMap):
+(WebCore::commonMediaTypes):
+(WebCore::commonMimeTypesMap):
+(WebCore::typesForCommonExtension):
+* platform/MIMETypeRegistry.h:
+* testing/Internals.cpp:
+(WebCore::Internals::mediaMIMETypeForExtension):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-01-22  Darin Adler  
 
 Remove some unneeded definitions from Platform.h family headers


Modified: trunk/Source/WebCore/platform/MIMETypeRegistry.cpp (255049 => 255050)

--- trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-24 03:11:08 UTC (rev 255049)
+++ trunk/Source/WebCore/platform/MIMETypeRegistry.cpp	2020-01-24 03:18:55 UTC (rev 255050)
@@ -274,98 +274,18 @@
 return unsupportedTextMIMETypes;
 }
 
-static const Vector* typesForCommonExtension(const String& extension)
+Optional, ASCIICaseInsensitiveHash>>& overriddenMimeTypesMap()
 {
-static const auto map = makeNeverDestroyed([] {
-struct TypeExtensionPair {
-ASCIILiteral type;
-ASCIILiteral extension;
-};
+static NeverDestroyed, ASCIICaseInsensitiveHash>>> map;
+return map;
+}
 
-// A table of common media MIME types and file extentions used when a platform's
-// specific MIME type lookup doesn't have a match for a media file extension.
-static const TypeExtensionPair commonMediaTypes[] = {
-// Ogg
-{ "application/ogg"_s, "ogx"_s },
-{ "audio/ogg"_s, "ogg"_s },
-{ "audio/ogg"_s, "oga"_s },
-{ "video/ogg"_s, "ogv"_s },
-
-// Annodex
-{ "application/annodex"_s, "anx"_s },
-{ "audio/annodex"_s, "axa"_s },
-{ "video/annodex"_s, "axv"_s },
-{ "audio/speex"_s, "spx"_s },
-
-// WebM
-{ "video/webm"_s, "webm"_s },
-{ "audio/webm"_s, "webm"_s },
-
-// MPEG
-{ "audio/mpeg"_s, "m1a"_s },
-   

[webkit-changes] [255038] trunk/Source/WebKit

2020-01-23 Thread pvollan
Title: [255038] trunk/Source/WebKit








Revision 255038
Author pvol...@apple.com
Date 2020-01-23 14:13:53 -0800 (Thu, 23 Jan 2020)


Log Message
[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=206551

Reviewed by Brent Fulgham.

Add SPI to grant and revoke access to asset services in the WebContent process.

No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
create an API test for simulator, but the simulator has no sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::grantAccessToAssetServices):
(WebKit::WebPageProxy::revokeAccessToAssetServices):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::grantAccessToAssetServices):
(WebKit::WebProcess::revokeAccessToAssetServices):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (255037 => 255038)

--- trunk/Source/WebKit/ChangeLog	2020-01-23 21:51:37 UTC (rev 255037)
+++ trunk/Source/WebKit/ChangeLog	2020-01-23 22:13:53 UTC (rev 255038)
@@ -1,3 +1,30 @@
+2020-01-23  Per Arne Vollan  
+
+[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=206551
+
+Reviewed by Brent Fulgham.
+
+Add SPI to grant and revoke access to asset services in the WebContent process.
+
+No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
+create an API test for simulator, but the simulator has no sandbox.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* UIProcess/API/Cocoa/WKWebViewPrivate.h:
+* UIProcess/API/ios/WKWebViewIOS.mm:
+(-[WKWebView _grantAccessToAssetServices]):
+(-[WKWebView _revokeAccessToAssetServices]):
+* UIProcess/WebPageProxy.h:
+* UIProcess/ios/WebPageProxyIOS.mm:
+(WebKit::WebPageProxy::grantAccessToAssetServices):
+(WebKit::WebPageProxy::revokeAccessToAssetServices):
+* WebProcess/WebProcess.h:
+* WebProcess/WebProcess.messages.in:
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::grantAccessToAssetServices):
+(WebKit::WebProcess::revokeAccessToAssetServices):
+
 2020-01-23  Brent Fulgham  
 
 [iOS] Remove access to 'awd' directories


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (255037 => 255038)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-23 21:51:37 UTC (rev 255037)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-23 22:13:53 UTC (rev 255038)
@@ -924,7 +924,7 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open")))
+(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open" "com.apple.mobileassetd" "com.apple.mobileassetd.v2")))
 
 (allow mach-lookup
 (require-all


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (255037 => 255038)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-01-23 21:51:37 UTC (rev 255037)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-01-23 22:13:53 UTC (rev 255038)
@@ -487,6 +487,9 @@
 
 - (UIView *)_fullScreenPlaceholderView WK_API_AVAILABLE(ios(12.0));
 
+- (void)_grantAccessToAssetServices WK_API_AVAILABLE(ios(WK_IOS_TBA));
+- (void)_revokeAccessToAssetServices WK_API_AVAILABLE(ios(WK_IOS_TBA));
+
 @end
 
 @interface WKWebView () 


Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (255037 => 255038)

--- 

[webkit-changes] [254995] trunk

2020-01-23 Thread pvollan
Title: [254995] trunk








Revision 254995
Author pvol...@apple.com
Date 2020-01-23 12:10:47 -0800 (Thu, 23 Jan 2020)


Log Message
[Cocoa] Broker access to the PowerManagement API
https://bugs.webkit.org/show_bug.cgi?id=206373
Source/WebCore:

Reviewed by Darin Adler.

Code to determine if device has battery should be executed in the UI process.

API test: WebKit.SystemHasBattery

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/SystemBattery.h: Added.
* platform/cocoa/SystemBattery.mm: Added.
(WebCore::setSystemHasBattery):
(WebCore::systemHasBattery):
* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
(WebCore::systemHasBattery): Deleted.
* testing/Internals.cpp:
(WebCore::Internals::systemHasBattery const):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:



Reviewed by Darin Adler.

Send flag indicating whether device has battery to the WebContent process as part of the
WebProcess creation parameters.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

Reviewed by Darin Adler.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/Battery.mm: Added.
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebCore/platform/cocoa/SystemBattery.h
trunk/Source/WebCore/platform/cocoa/SystemBattery.mm
trunk/Tools/TestWebKitAPI/Tests/WebKit/Battery.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (254994 => 254995)

--- trunk/Source/WebCore/ChangeLog	2020-01-23 19:56:38 UTC (rev 254994)
+++ trunk/Source/WebCore/ChangeLog	2020-01-23 20:10:47 UTC (rev 254995)
@@ -1,3 +1,26 @@
+2020-01-23  Per Arne Vollan  
+
+[Cocoa] Broker access to the PowerManagement API
+https://bugs.webkit.org/show_bug.cgi?id=206373
+
+Reviewed by Darin Adler.
+
+Code to determine if device has battery should be executed in the UI process.
+
+API test: WebKit.SystemHasBattery
+
+* WebCore.xcodeproj/project.pbxproj:
+* platform/cocoa/SystemBattery.h: Added.
+* platform/cocoa/SystemBattery.mm: Added.
+(WebCore::setSystemHasBattery):
+(WebCore::systemHasBattery):
+* platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
+(WebCore::systemHasBattery): Deleted.
+* testing/Internals.cpp:
+(WebCore::Internals::systemHasBattery const):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2020-01-23  Antoine Quint  
 
 [Web Animations] Make AnimationList ref-counted


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (254994 => 254995)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-01-23 19:56:38 UTC (rev 254994)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2020-01-23 20:10:47 UTC (rev 254995)
@@ -3980,6 +3980,8 @@
 		C105DA640F3AA6B8001DD44F /* TextEncodingDetector.h in Headers */ = {isa = PBXBuildFile; fileRef = C105DA630F3AA6B8001DD44F /* TextEncodingDetector.h */; };
 		C11A9ECE21403A5C00CFB20A /* SwitchingGPUClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C11A9ECD21403A5C00CFB20A /* SwitchingGPUClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		C14938072234551A000CD707 /* SpeechSynthesisClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C149380522342719000CD707 /* SpeechSynthesisClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		C1692DD223D23ABD006E88F7 /* SystemBattery.mm in Sources */ = {isa = PBXBuildFile; fileRef = C1692DD123D23ABD006E88F7 /* SystemBattery.mm */; };
+		C1692DD523D23E08006E88F7 /* SystemBattery.h in Headers */ = {isa = PBXBuildFile; fileRef = C1692DD423D23AE0006E88F7 /* SystemBattery.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		C1E1D236203DF15400584665 /* ScreenProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = C1E1D235203DF15400584665 /* ScreenProperties.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		C2015C0A1BE6FEB200822389 /* FontVariantBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */; };
 		

[webkit-changes] [254990] trunk/Source/WebKit

2020-01-23 Thread pvollan
Title: [254990] trunk/Source/WebKit








Revision 254990
Author pvol...@apple.com
Date 2020-01-23 11:09:02 -0800 (Thu, 23 Jan 2020)


Log Message
[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=206551

Reviewed by Brent Fulgham.

Add SPI to grant and revoke access to asset services in the WebContent process.

No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
create an API test for simulator, but the simulator has no sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _grantAccessToAssetServices]):
(-[WKWebView _revokeAccessToAssetServices]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::grantAccessToAssetServices):
(WebKit::WebPageProxy::revokeAccessToAssetServices):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::grantAccessToAssetServices):
(WebKit::WebProcess::revokeAccessToAssetServices):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (254989 => 254990)

--- trunk/Source/WebKit/ChangeLog	2020-01-23 19:05:24 UTC (rev 254989)
+++ trunk/Source/WebKit/ChangeLog	2020-01-23 19:09:02 UTC (rev 254990)
@@ -1,5 +1,32 @@
 2020-01-23  Per Arne Vollan  
 
+[iOS] Make it possible for WebKit clients to enable connections to asset services in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=206551
+
+Reviewed by Brent Fulgham.
+
+Add SPI to grant and revoke access to asset services in the WebContent process.
+
+No new tests, since this should have an API test, but API tests are not running on iOS devices. We could
+create an API test for simulator, but the simulator has no sandbox.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* UIProcess/API/Cocoa/WKWebViewPrivate.h:
+* UIProcess/API/ios/WKWebViewIOS.mm:
+(-[WKWebView _grantAccessToAssetServices]):
+(-[WKWebView _revokeAccessToAssetServices]):
+* UIProcess/WebPageProxy.h:
+* UIProcess/ios/WebPageProxyIOS.mm:
+(WebKit::WebPageProxy::grantAccessToAssetServices):
+(WebKit::WebPageProxy::revokeAccessToAssetServices):
+* WebProcess/WebProcess.h:
+* WebProcess/WebProcess.messages.in:
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::grantAccessToAssetServices):
+(WebKit::WebProcess::revokeAccessToAssetServices):
+
+2020-01-23  Per Arne Vollan  
+
 [iOS] Camera is lost during WebRTC demo
 https://bugs.webkit.org/show_bug.cgi?id=206613
 


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (254989 => 254990)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-23 19:05:24 UTC (rev 254989)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-01-23 19:09:02 UTC (rev 254990)
@@ -934,7 +934,7 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open")))
+(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd" "com.apple.lsd.open" "com.apple.mobileassetd" "com.apple.mobileassetd.v2")))
 
 (allow mach-lookup
 (require-all


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (254989 => 254990)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-01-23 19:05:24 UTC (rev 254989)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h	2020-01-23 19:09:02 UTC (rev 254990)
@@ -487,6 +487,9 @@
 
 - (UIView *)_fullScreenPlaceholderView WK_API_AVAILABLE(ios(12.0));
 
+- (void)_grantAccessToAssetServices WK_API_AVAILABLE(ios(WK_IOS_TBA));
+- (void)_revokeAccessToAssetServices WK_API_AVAILABLE(ios(WK_IOS_TBA));
+
 @end
 
 @interface WKWebView () 


Modified: 

[webkit-changes] [254851] trunk/LayoutTests

2020-01-21 Thread pvollan
Title: [254851] trunk/LayoutTests








Revision 254851
Author pvol...@apple.com
Date 2020-01-21 07:38:05 -0800 (Tue, 21 Jan 2020)


Log Message
Layout Test fast/xmlhttprequest/xmlhttprequest-multiple-sync-xhr-during-unload.html is failing
https://bugs.webkit.org/show_bug.cgi?id=206515

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (254850 => 254851)

--- trunk/LayoutTests/ChangeLog	2020-01-21 13:30:42 UTC (rev 254850)
+++ trunk/LayoutTests/ChangeLog	2020-01-21 15:38:05 UTC (rev 254851)
@@ -1,3 +1,12 @@
+2020-01-21  Per Arne Vollan  
+
+Layout Test fast/xmlhttprequest/xmlhttprequest-multiple-sync-xhr-during-unload.html is failing
+https://bugs.webkit.org/show_bug.cgi?id=206515
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
 2020-01-21  Cathie Chen  
 
 Add support for scroll behavior relies on ScrollAnimation of the Web process


Modified: trunk/LayoutTests/platform/win/TestExpectations (254850 => 254851)

--- trunk/LayoutTests/platform/win/TestExpectations	2020-01-21 13:30:42 UTC (rev 254850)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-01-21 15:38:05 UTC (rev 254851)
@@ -4525,3 +4525,5 @@
 webkit.org/b/205856 storage/indexeddb/IDBTransaction-page-cache.html [ Pass Timeout ]
 
 webkit.org/b/206165 fast/dom/Range/getBoundingClientRect.html [ Failure ]
+
+webkit.org/b/206515 fast/xmlhttprequest/xmlhttprequest-multiple-sync-xhr-during-unload.html [ Failure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254681] trunk

2020-01-16 Thread pvollan
Title: [254681] trunk








Revision 254681
Author pvol...@apple.com
Date 2020-01-16 07:56:57 -0800 (Thu, 16 Jan 2020)


Log Message
[Win] Fix AppleWin build
https://bugs.webkit.org/show_bug.cgi?id=206299

Reviewed by Brent Fulgham.

.:

This patch has been created by don.olmst...@sony.com and pvol...@apple.com. Add target files for WTF and
_javascript_Core. Also, to make sure headers are copied to the forwarding headers directory, add the CMake
keywork ALL when adding custom target for copying files.

* Source/cmake/TargetJavaScriptCore.cmake: Added.
* Source/cmake/TargetWTF.cmake: Added.
* Source/cmake/WebKitMacros.cmake:

Source/_javascript_Core:

Include required target. Build internal builds with VS2019.

* CMakeLists.txt:
* _javascript_Core.vcxproj/_javascript_Core.proj:

Source/WebCore:

Include required targets. Build internal builds with VS2019.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.proj:

Source/WebKitLegacy:

Include required targets. Build internal builds with VS2019.

* CMakeLists.txt:
* WebKitLegacy.vcxproj/WebKitLegacy.proj:

Source/WTF:

Build internal builds with VS2019.

* WTF.vcxproj/WTF.proj:

Modified Paths

trunk/ChangeLog
trunk/Source/_javascript_Core/CMakeLists.txt
trunk/Source/_javascript_Core/ChangeLog
trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.proj
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/WTF.vcxproj/WTF.proj
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.vcxproj/WebCore.proj
trunk/Source/WebKitLegacy/CMakeLists.txt
trunk/Source/WebKitLegacy/ChangeLog
trunk/Source/WebKitLegacy/WebKitLegacy.vcxproj/WebKitLegacy.proj
trunk/Source/cmake/WebKitMacros.cmake


Added Paths

trunk/Source/cmake/target/TargetJavaScriptCore.cmake
trunk/Source/cmake/target/TargetWTF.cmake




Diff

Modified: trunk/ChangeLog (254680 => 254681)

--- trunk/ChangeLog	2020-01-16 15:43:23 UTC (rev 254680)
+++ trunk/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
@@ -1,3 +1,18 @@
+2020-01-16  Per Arne Vollan  
+
+[Win] Fix AppleWin build
+https://bugs.webkit.org/show_bug.cgi?id=206299
+
+Reviewed by Brent Fulgham.
+
+This patch has been created by don.olmst...@sony.com and pvol...@apple.com. Add target files for WTF and
+_javascript_Core. Also, to make sure headers are copied to the forwarding headers directory, add the CMake
+keywork ALL when adding custom target for copying files.
+
+* Source/cmake/TargetJavaScriptCore.cmake: Added.
+* Source/cmake/TargetWTF.cmake: Added.
+* Source/cmake/WebKitMacros.cmake:
+
 2020-01-10  Dean Jackson  
 
 [WebGL] Clarify USE_OPENGL_ES_3


Modified: trunk/Source/_javascript_Core/CMakeLists.txt (254680 => 254681)

--- trunk/Source/_javascript_Core/CMakeLists.txt	2020-01-16 15:43:23 UTC (rev 254680)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2020-01-16 15:56:57 UTC (rev 254681)
@@ -1,5 +1,6 @@
 cmake_minimum_required(VERSION 3.10)
 include(WebKitCommon)
+include(target/TargetWTF)
 set_property(DIRECTORY . PROPERTY FOLDER "_javascript_Core")
 
 list(APPEND _javascript_Core_UNIFIED_SOURCE_LIST_FILES


Modified: trunk/Source/_javascript_Core/ChangeLog (254680 => 254681)

--- trunk/Source/_javascript_Core/ChangeLog	2020-01-16 15:43:23 UTC (rev 254680)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
@@ -1,3 +1,15 @@
+2020-01-16  Per Arne Vollan  
+
+[Win] Fix AppleWin build
+https://bugs.webkit.org/show_bug.cgi?id=206299
+
+Reviewed by Brent Fulgham.
+
+Include required target. Build internal builds with VS2019.
+
+* CMakeLists.txt:
+* _javascript_Core.vcxproj/_javascript_Core.proj:
+
 2020-01-16  Caio Lima  
 
 [JSC] 32-bit platforms should use a PC base register


Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.proj (254680 => 254681)

--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.proj	2020-01-16 15:43:23 UTC (rev 254680)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.proj	2020-01-16 15:56:57 UTC (rev 254681)
@@ -54,9 +54,9 @@
   
 
 
-	
+	
 	
-	
+	
 	
   
 


Modified: trunk/Source/WTF/ChangeLog (254680 => 254681)

--- trunk/Source/WTF/ChangeLog	2020-01-16 15:43:23 UTC (rev 254680)
+++ trunk/Source/WTF/ChangeLog	2020-01-16 15:56:57 UTC (rev 254681)
@@ -1,3 +1,14 @@
+2020-01-16  Per Arne Vollan  
+
+[Win] Fix AppleWin build
+https://bugs.webkit.org/show_bug.cgi?id=206299
+
+Reviewed by Brent Fulgham.
+
+Build internal builds with VS2019.
+
+* WTF.vcxproj/WTF.proj:
+
 2020-01-15  Sam Weinig  
 
 Platform.h is out of control Part 5: Split HAVE_* macro definitions out of Platform.h and into a new PlatformHave.h


Modified: trunk/Source/WTF/WTF.vcxproj/WTF.proj (254680 => 254681)

--- trunk/Source/WTF/WTF.vcxproj/WTF.proj	2020-01-16 15:43:23 UTC (rev 254680)
+++ 

[webkit-changes] [254550] trunk/Source/WebKit

2020-01-14 Thread pvollan
Title: [254550] trunk/Source/WebKit








Revision 254550
Author pvol...@apple.com
Date 2020-01-14 17:47:40 -0800 (Tue, 14 Jan 2020)


Log Message
REGRESSION(iOS 13): createMediaElementSource not working
https://bugs.webkit.org/show_bug.cgi?id=203435

Reviewed by David Kilzer.

The WebContent process is missing an entitlement according to logs.

* Scripts/process-entitlements.sh:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Scripts/process-entitlements.sh




Diff

Modified: trunk/Source/WebKit/ChangeLog (254549 => 254550)

--- trunk/Source/WebKit/ChangeLog	2020-01-15 01:45:15 UTC (rev 254549)
+++ trunk/Source/WebKit/ChangeLog	2020-01-15 01:47:40 UTC (rev 254550)
@@ -1,3 +1,14 @@
+2020-01-14  Per Arne Vollan  
+
+REGRESSION(iOS 13): createMediaElementSource not working
+https://bugs.webkit.org/show_bug.cgi?id=203435
+
+Reviewed by David Kilzer.
+
+The WebContent process is missing an entitlement according to logs.
+
+* Scripts/process-entitlements.sh:
+
 2020-01-14  Brent Fulgham  
 
 Expand WebContent process sandbox with additional syscall


Modified: trunk/Source/WebKit/Scripts/process-entitlements.sh (254549 => 254550)

--- trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-01-15 01:45:15 UTC (rev 254549)
+++ trunk/Source/WebKit/Scripts/process-entitlements.sh	2020-01-15 01:47:40 UTC (rev 254550)
@@ -103,6 +103,7 @@
 plistbuddy Add :com.apple.QuartzCore.webkit-end-points bool YES
 plistbuddy Add :com.apple.locationd.authorizeapplications bool YES
 plistbuddy Add :com.apple.locationd.effective_bundle bool YES
+plistbuddy Add :com.apple.mediaremote.set-playback-state bool YES
 plistbuddy Add :com.apple.private.allow-explicit-graphics-priority bool YES
 plistbuddy Add :com.apple.private.coremedia.extensions.audiorecording.allow bool YES
 plistbuddy Add :com.apple.private.coremedia.pidinheritance.allow bool YES






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254373] trunk

2020-01-10 Thread pvollan
Title: [254373] trunk








Revision 254373
Author pvol...@apple.com
Date 2020-01-10 15:39:54 -0800 (Fri, 10 Jan 2020)


Log Message
Map CSS value ID to system color in the UI process
https://bugs.webkit.org/show_bug.cgi?id=204314

Reviewed by Dean Jackson.

Source/WebCore:

Currently, RenderThemeIOS is mapping CSS value IDs to system colors in the WebContent process. This mapping leads to
invoking selectors on UITraitCollection and UIColor, which will send messages to the runningboard daemon. Since we
will be blocking access to this daemon in the WebContent process, this mapping should be moved to the UI process.
The UI process will create a mapping between CSS value IDs and system colors, and pass it to the WebContent process.

Test: fast/css/ios/system-color-for-css-value.html

* WebCore.xcodeproj/project.pbxproj:
* css/StyleColor.h:
* css/parser/CSSPropertyParser.h:
* rendering/CSSValueKey.h: Added.
(WebCore::operator==):
(WebCore::CSSValueKey::encode const):
(WebCore::CSSValueKey::decode):
(WebCore::CSSValueKey::hash const):
(WTF::CSSValueKeyHash::hash):
(WTF::CSSValueKeyHash::equal):
(WTF::HashTraits::emptyValue):
(WTF::HashTraits::constructDeletedValue):
(WTF::HashTraits::isDeletedValue):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::cssValueIDSelectorList):
(WebCore::systemColorFromCSSValueID):
(WebCore::globalCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::getOrCreateCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::setCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::systemColor const):
* testing/Internals.cpp:
(WebCore::Internals::systemColorForCSSValue):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Create mapping between CSS value IDs and system colors in the UI process and send to the WebContent process
on process startup.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

LayoutTests:

* TestExpectations:
* fast/css/ios: Added.
* fast/css/ios/system-color-for-css-value-expected.txt: Added.
* fast/css/ios/system-color-for-css-value.html: Added.
* platform/ios/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/ios/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/css/StyleColor.h
trunk/Source/WebCore/css/parser/CSSPropertyParser.h
trunk/Source/WebCore/rendering/RenderThemeIOS.h
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm


Added Paths

trunk/LayoutTests/fast/css/ios/
trunk/LayoutTests/fast/css/ios/system-color-for-css-value-expected.txt
trunk/LayoutTests/fast/css/ios/system-color-for-css-value.html
trunk/Source/WebCore/rendering/CSSValueKey.h




Diff

Modified: trunk/LayoutTests/ChangeLog (254372 => 254373)

--- trunk/LayoutTests/ChangeLog	2020-01-10 23:29:41 UTC (rev 254372)
+++ trunk/LayoutTests/ChangeLog	2020-01-10 23:39:54 UTC (rev 254373)
@@ -1,3 +1,16 @@
+2020-01-09  Per Arne Vollan  
+
+Map CSS value ID to system color in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=204314
+
+Reviewed by Dean Jackson.
+
+* TestExpectations:
+* fast/css/ios: Added.
+* fast/css/ios/system-color-for-css-value-expected.txt: Added.
+* fast/css/ios/system-color-for-css-value.html: Added.
+* platform/ios/TestExpectations:
+
 2020-01-10  Pablo Saavedra  
 
 [WPE][GTK] Gardening after r254357


Modified: trunk/LayoutTests/TestExpectations (254372 => 254373)

--- trunk/LayoutTests/TestExpectations	2020-01-10 23:29:41 UTC (rev 254372)
+++ trunk/LayoutTests/TestExpectations	2020-01-10 23:39:54 UTC (rev 254373)
@@ -23,6 +23,7 @@
 editing/selection/ios [ Skip ]
 editing/undo-manager [ Skip ]
 tiled-drawing [ Skip ]
+fast/css/ios [ Skip ]
 fast/css/watchos [ Skip ]
 fast/dom/Window/watchos [ Skip ]
 fast/forms/select/mac-wk2 [ Skip ]


Added: trunk/LayoutTests/fast/css/ios/system-color-for-css-value-expected.txt (0 => 254373)

--- trunk/LayoutTests/fast/css/ios/system-color-for-css-value-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/css/ios/system-color-for-css-value-expected.txt	2020-01-10 23:39:54 UTC (rev 254373)
@@ -0,0 +1,41 @@
+Test that system colors for CSS values are correct.
+
+On success, 

[webkit-changes] [254127] trunk/LayoutTests

2020-01-07 Thread pvollan
Title: [254127] trunk/LayoutTests








Revision 254127
Author pvol...@apple.com
Date 2020-01-07 07:34:23 -0800 (Tue, 07 Jan 2020)


Log Message
Layout Test storage/indexeddb/IDBTransaction-page-cache.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=205856

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (254126 => 254127)

--- trunk/LayoutTests/ChangeLog	2020-01-07 15:29:45 UTC (rev 254126)
+++ trunk/LayoutTests/ChangeLog	2020-01-07 15:34:23 UTC (rev 254127)
@@ -1,5 +1,14 @@
 2020-01-07  Per Arne Vollan  
 
+Layout Test storage/indexeddb/IDBTransaction-page-cache.html is flaky
+https://bugs.webkit.org/show_bug.cgi?id=205856
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
+2020-01-07  Per Arne Vollan  
+
 Layout Test http/wpt/css/css-highlight-api/highlight-text-across-elements.html is failing
 https://bugs.webkit.org/show_bug.cgi?id=205855
 


Modified: trunk/LayoutTests/platform/win/TestExpectations (254126 => 254127)

--- trunk/LayoutTests/platform/win/TestExpectations	2020-01-07 15:29:45 UTC (rev 254126)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-01-07 15:34:23 UTC (rev 254127)
@@ -4511,3 +4511,5 @@
 webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text-cascade.html [ ImageOnlyFailure ]
 webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text-replace.html [ ImageOnlyFailure ]
 webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text.html [ ImageOnlyFailure ]
+
+webkit.org/b/205856 storage/indexeddb/IDBTransaction-page-cache.html [ Pass Timeout ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254126] trunk/LayoutTests

2020-01-07 Thread pvollan
Title: [254126] trunk/LayoutTests








Revision 254126
Author pvol...@apple.com
Date 2020-01-07 07:29:45 -0800 (Tue, 07 Jan 2020)


Log Message
Layout Test http/wpt/css/css-highlight-api/highlight-text-across-elements.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205855

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (254125 => 254126)

--- trunk/LayoutTests/ChangeLog	2020-01-07 14:49:43 UTC (rev 254125)
+++ trunk/LayoutTests/ChangeLog	2020-01-07 15:29:45 UTC (rev 254126)
@@ -1,3 +1,12 @@
+2020-01-07  Per Arne Vollan  
+
+Layout Test http/wpt/css/css-highlight-api/highlight-text-across-elements.html is failing
+https://bugs.webkit.org/show_bug.cgi?id=205855
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
 2020-01-06  Fujii Hironori  
 
 ComplexTextController::offsetForPosition returns a wrong offset for a glyph boundary in a RTL text


Modified: trunk/LayoutTests/platform/win/TestExpectations (254125 => 254126)

--- trunk/LayoutTests/platform/win/TestExpectations	2020-01-07 14:49:43 UTC (rev 254125)
+++ trunk/LayoutTests/platform/win/TestExpectations	2020-01-07 15:29:45 UTC (rev 254126)
@@ -4506,3 +4506,8 @@
 webkit.org/b/205272 js/integer-division-neg2tothe32-by-neg1.html [ Failure ]
 
 webkit.org/b/205273 imported/blink/fast/sub-pixel/negative-composited-offset.html [ Pass ImageOnlyFailure ]
+
+webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text-across-elements.html [ ImageOnlyFailure ]
+webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text-cascade.html [ ImageOnlyFailure ]
+webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text-replace.html [ ImageOnlyFailure ]
+webkit.org/b/205855 http/wpt/css/css-highlight-api/highlight-text.html [ ImageOnlyFailure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254101] trunk/Source/WebKit

2020-01-06 Thread pvollan
Title: [254101] trunk/Source/WebKit








Revision 254101
Author pvol...@apple.com
Date 2020-01-06 17:06:34 -0800 (Mon, 06 Jan 2020)


Log Message
[iOS] Get display level in the UI process for all iOS platforms
https://bugs.webkit.org/show_bug.cgi?id=205835


Reviewed by Brent Fulgham.

This was previously only done for iOS, but should be done for all iOS platforms.

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::registerNotificationObservers):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebProcessPool.h:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebProcessPool.h
trunk/Source/WebKit/WebProcess/WebProcess.h
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (254100 => 254101)

--- trunk/Source/WebKit/ChangeLog	2020-01-07 00:52:56 UTC (rev 254100)
+++ trunk/Source/WebKit/ChangeLog	2020-01-07 01:06:34 UTC (rev 254101)
@@ -1,3 +1,22 @@
+2020-01-06  Per Arne Vollan  
+
+[iOS] Get display level in the UI process for all iOS platforms
+https://bugs.webkit.org/show_bug.cgi?id=205835
+
+
+Reviewed by Brent Fulgham.
+
+This was previously only done for iOS, but should be done for all iOS platforms.
+
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::registerNotificationObservers):
+* UIProcess/WebProcessPool.cpp:
+(WebKit::WebProcessPool::initializeNewWebProcess):
+* UIProcess/WebProcessPool.h:
+* WebProcess/WebProcess.h:
+* WebProcess/WebProcess.messages.in:
+* WebProcess/cocoa/WebProcessCocoa.mm:
+
 2020-01-06  Eric Carlson  
 
 Add some of the remote media player messages needed for video playback


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (254100 => 254101)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-01-07 00:52:56 UTC (rev 254100)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-01-07 01:06:34 UTC (rev 254101)
@@ -102,7 +102,7 @@
 static NSString * const WebKitLogCookieInformationDefaultsKey = @"WebKitLogCookieInformation";
 #endif
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS_FAMILY)
 SOFT_LINK_PRIVATE_FRAMEWORK(BackBoardServices)
 SOFT_LINK(BackBoardServices, BKSDisplayBrightnessGetCurrent, float, (), ());
 #endif
@@ -482,7 +482,7 @@
 return WTF::hasEntitlement(ensureNetworkProcess().connection()->xpcConnection(), entitlement.utf8().data());
 }
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS_FAMILY)
 float WebProcessPool::displayBrightness()
 {
 return BKSDisplayBrightnessGetCurrent();
@@ -541,12 +541,14 @@
 m_deactivationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSApplicationDidResignActiveNotification object:NSApp queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
 setApplicationIsActive(false);
 }];
-#elif PLATFORM(IOS)
+#else
 CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), this, backlightLevelDidChangeCallback, static_cast(UIBacklightLevelChangedNotification), nullptr, CFNotificationSuspensionBehaviorCoalesce);
+#if PLATFORM(IOS)
 m_accessibilityEnabledObserver = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge id)kAXSApplicationAccessibilityEnabledNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *) {
 for (size_t i = 0; i < m_processes.size(); ++i)
 m_processes[i]->unblockAccessibilityServerIfNeeded();
 }];
+#endif // PLATFORM(IOS)
 #endif // !PLATFORM(IOS_FAMILY)
 }
 


Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (254100 => 254101)

--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-01-07 00:52:56 UTC (rev 254100)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-01-07 01:06:34 UTC (rev 254101)
@@ -1062,7 +1062,7 @@
 process.send(Messages::WebProcess::PrewarmGlobally(), 0);
 }
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS_FAMILY)
 process.send(Messages::WebProcess::BacklightLevelDidChange(displayBrightness()), 0);
 #endif
 


Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.h (254100 => 254101)

--- trunk/Source/WebKit/UIProcess/WebProcessPool.h	2020-01-07 00:52:56 UTC (rev 254100)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.h	2020-01-07 01:06:34 UTC (rev 254101)
@@ -605,7 +605,7 @@
 
 void updateBackForwardCacheCapacity();
 
-#if PLATFORM(IOS)
+#if PLATFORM(IOS_FAMILY)
 static float displayBrightness();
 static void backlightLevelDidChangeCallback(CFNotificationCenterRef, void *observer, CFStringRef name, const void *, CFDictionaryRef 

[webkit-changes] [254099] trunk/Source/WebCore

2020-01-06 Thread pvollan
Title: [254099] trunk/Source/WebCore








Revision 254099
Author pvol...@apple.com
Date 2020-01-06 16:49:32 -0800 (Mon, 06 Jan 2020)


Log Message
[iOS] Only prewarm fonts with valid font names
https://bugs.webkit.org/show_bug.cgi?id=205822

Reviewed by Brent Fulgham.

The font names ".SF NS Text" and ".SF NS Display" are not valid on iOS, and should not be prewarmed.

No new tests, no behavior change.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::prewarmGlobally):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (254098 => 254099)

--- trunk/Source/WebCore/ChangeLog	2020-01-07 00:34:53 UTC (rev 254098)
+++ trunk/Source/WebCore/ChangeLog	2020-01-07 00:49:32 UTC (rev 254099)
@@ -1,3 +1,17 @@
+2020-01-06  Per Arne Vollan  
+
+[iOS] Only prewarm fonts with valid font names
+https://bugs.webkit.org/show_bug.cgi?id=205822
+
+Reviewed by Brent Fulgham.
+
+The font names ".SF NS Text" and ".SF NS Display" are not valid on iOS, and should not be prewarmed.
+
+No new tests, no behavior change.
+
+* platform/graphics/cocoa/FontCacheCoreText.cpp:
+(WebCore::FontCache::prewarmGlobally):
+
 2020-01-06  Peng Liu  
 
 Build (unified) failure after adding source files to support media in GPU process


Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (254098 => 254099)

--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-01-07 00:34:53 UTC (rev 254098)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-01-07 00:49:32 UTC (rev 254099)
@@ -1694,8 +1694,10 @@
 return;
 
 Vector families = std::initializer_list {
+#if PLATFORM(MAC) || PLATFORM(MACCATALYST)
 ".SF NS Text"_s,
 ".SF NS Display"_s,
+#endif
 "Arial"_s,
 "Helvetica"_s,
 "Helvetica Neue"_s,






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254067] trunk/Source/WebCore

2020-01-06 Thread pvollan
Title: [254067] trunk/Source/WebCore








Revision 254067
Author pvol...@apple.com
Date 2020-01-06 11:16:18 -0800 (Mon, 06 Jan 2020)


Log Message
REGRESSION(r247626): Introduced memory regression
https://bugs.webkit.org/show_bug.cgi?id=205815

Unreviewed rollout of https://trac.webkit.org/changeset/247626/webkit.

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::prewarmGlobally):
(WebCore::fontFamiliesForPrewarming): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (254066 => 254067)

--- trunk/Source/WebCore/ChangeLog	2020-01-06 19:00:42 UTC (rev 254066)
+++ trunk/Source/WebCore/ChangeLog	2020-01-06 19:16:18 UTC (rev 254067)
@@ -1,3 +1,14 @@
+2020-01-06  Per Arne Vollan  
+
+REGRESSION(r247626): Introduced memory regression
+https://bugs.webkit.org/show_bug.cgi?id=205815
+
+Unreviewed rollout of https://trac.webkit.org/changeset/247626/webkit.
+
+* platform/graphics/cocoa/FontCacheCoreText.cpp:
+(WebCore::FontCache::prewarmGlobally):
+(WebCore::fontFamiliesForPrewarming): Deleted.
+
 2020-01-06  Yusuke Suzuki  
 
 [WebCore] Shrink sizeof(RuleFeature)


Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (254066 => 254067)

--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-01-06 19:00:42 UTC (rev 254066)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2020-01-06 19:16:18 UTC (rev 254067)
@@ -1688,9 +1688,12 @@
 });
 }
 
-static Vector& fontFamiliesForPrewarming()
+void FontCache::prewarmGlobally()
 {
-static NeverDestroyed> families = std::initializer_list {
+if (MemoryPressureHandler::singleton().isUnderMemoryPressure())
+return;
+
+Vector families = std::initializer_list {
 ".SF NS Text"_s,
 ".SF NS Display"_s,
 "Arial"_s,
@@ -1700,17 +1703,9 @@
 "Times"_s,
 "Times New Roman"_s,
 };
-return families;
-}
 
-void FontCache::prewarmGlobally()
-{
-if (MemoryPressureHandler::singleton().isUnderMemoryPressure())
-return;
-
 FontCache::PrewarmInformation prewarmInfo;
-prewarmInfo.seenFamilies = fontFamiliesForPrewarming();
-prewarmInfo.fontNamesRequiringSystemFallback = fontFamiliesForPrewarming();
+prewarmInfo.seenFamilies = WTFMove(families);
 FontCache::singleton().prewarm(prewarmInfo);
 }
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [254052] trunk

2020-01-06 Thread pvollan
Title: [254052] trunk








Revision 254052
Author pvol...@apple.com
Date 2020-01-06 08:03:44 -0800 (Mon, 06 Jan 2020)


Log Message
[iOS] Issue mach lookup extension to launch services daemon for Mail
https://bugs.webkit.org/show_bug.cgi?id=205316

Reviewed by Brent Fulgham.

Source/WebCore:

Export function getting bundle identifier.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* platform/RuntimeApplicationChecks.h:

Source/WebKit:

Issue mach lookup extension to "com.apple.lsd.open" for Mail, since this service will be removed from the WebContent sandbox.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* UIProcess/API/Cocoa/WKWebViewTesting.mm:
(+[WKWebView _setApplicationBundleIdentifier:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

Add test option to set bundle identifier. Using this, WebKitTestRunner can pretend to be any client, e.g. Mail.

Test: fast/sandbox/ios/sandbox-mach-lookup-mail.html

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::setApplicationBundleIdentifier):

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt: Added.
* fast/sandbox/ios/sandbox-mach-lookup-mail.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/RuntimeApplicationChecks.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/WebKitTestRunner/TestController.cpp
trunk/Tools/WebKitTestRunner/TestController.h
trunk/Tools/WebKitTestRunner/TestOptions.h
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm


Added Paths

trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html




Diff

Modified: trunk/LayoutTests/ChangeLog (254051 => 254052)

--- trunk/LayoutTests/ChangeLog	2020-01-06 15:02:13 UTC (rev 254051)
+++ trunk/LayoutTests/ChangeLog	2020-01-06 16:03:44 UTC (rev 254052)
@@ -1,3 +1,13 @@
+2020-01-06  Per Arne Vollan  
+
+[iOS] Issue mach lookup extension to launch services daemon for Mail
+https://bugs.webkit.org/show_bug.cgi?id=205316
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt: Added.
+* fast/sandbox/ios/sandbox-mach-lookup-mail.html: Added.
+
 2020-01-05  Zalan Bujtas  
 
 [SLL] Generate runs for preserved new lines


Added: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt (0 => 254052)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail-expected.txt	2020-01-06 16:03:44 UTC (rev 254052)
@@ -0,0 +1,7 @@
+Regression tests for mach lookup sandbox changes for Mail on iOS
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.hasSandboxMachLookupAccessToGlobalName("com.apple.WebKit.WebContent", "com.apple.lsd.open") is true
+


Added: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html (0 => 254052)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-mail.html	2020-01-06 16:03:44 UTC (rev 254052)
@@ -0,0 +1,14 @@
+
+
+
+
+description('Regression tests for mach lookup sandbox changes for Mail on iOS');
+
+if (window.internals) {
+shouldBeTrue("internals.hasSandboxMachLookupAccessToGlobalName(\"com.apple.WebKit.WebContent\", \"com.apple.lsd.open\")");
+}
+
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (254051 => 254052)

--- trunk/Source/WebCore/ChangeLog	2020-01-06 15:02:13 UTC (rev 254051)
+++ trunk/Source/WebCore/ChangeLog	2020-01-06 16:03:44 UTC (rev 254052)
@@ -1,3 +1,16 @@
+2020-01-06  Per 

[webkit-changes] [253784] trunk/Source

2019-12-19 Thread pvollan
Title: [253784] trunk/Source








Revision 253784
Author pvol...@apple.com
Date 2019-12-19 13:20:33 -0800 (Thu, 19 Dec 2019)


Log Message
REGRESSION (r253530): Incorrect colors in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=205457

Unreviewed rollout of r253530.


Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* rendering/CSSValueKey.h: Removed.
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::systemColor const):
(WebCore::cssValueIDSelectorList): Deleted.
(WebCore::systemColorFromCSSValueID): Deleted.
(WebCore::globalCSSValueToSystemColorMap): Deleted.
(WebCore::RenderThemeIOS::getOrCreateCSSValueToSystemColorMap): Deleted.
(WebCore::RenderThemeIOS::setCSSValueToSystemColorMap): Deleted.

Source/WebKit:

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/rendering/RenderThemeIOS.h
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm


Removed Paths

trunk/Source/WebCore/rendering/CSSValueKey.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (253783 => 253784)

--- trunk/Source/WebCore/ChangeLog	2019-12-19 21:18:39 UTC (rev 253783)
+++ trunk/Source/WebCore/ChangeLog	2019-12-19 21:20:33 UTC (rev 253784)
@@ -1,3 +1,21 @@
+2019-12-19  Per Arne Vollan  
+
+REGRESSION (r253530): Incorrect colors in Dark Mode
+https://bugs.webkit.org/show_bug.cgi?id=205457
+
+Unreviewed rollout of r253530.
+
+* WebCore.xcodeproj/project.pbxproj:
+* rendering/CSSValueKey.h: Removed.
+* rendering/RenderThemeIOS.h:
+* rendering/RenderThemeIOS.mm:
+(WebCore::RenderThemeIOS::systemColor const):
+(WebCore::cssValueIDSelectorList): Deleted.
+(WebCore::systemColorFromCSSValueID): Deleted.
+(WebCore::globalCSSValueToSystemColorMap): Deleted.
+(WebCore::RenderThemeIOS::getOrCreateCSSValueToSystemColorMap): Deleted.
+(WebCore::RenderThemeIOS::setCSSValueToSystemColorMap): Deleted.
+
 2019-12-19  James Darpinian  
 
 ANGLE: Fix last WebGL conformance regressions


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (253783 => 253784)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-19 21:18:39 UTC (rev 253783)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-19 21:20:33 UTC (rev 253784)
@@ -4797,7 +4797,6 @@
 		E3B2F0ED1D7F4CA300B0C9D1 /* LoadableScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E71D7F35EC00B0C9D1 /* LoadableScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E3B2F0EE1D7F4CA900B0C9D1 /* LoadableScriptClient.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E81D7F35EC00B0C9D1 /* LoadableScriptClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E3B2F0F01D7F4CB500B0C9D1 /* LoadableClassicScript.h in Headers */ = {isa = PBXBuildFile; fileRef = E3B2F0E41D7F35EC00B0C9D1 /* LoadableClassicScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		E3BBC24723835526006EC39F /* CSSValueKey.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BBC2452383551A006EC39F /* CSSValueKey.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		E3C99A091DC3D41C00794AD3 /* DOMJITCheckDOM.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C99A081DC3D41700794AD3 /* DOMJITCheckDOM.h */; };
 		E3C9AECB2113149900419B92 /* JSMicrotaskCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C9AEC92113147400419B92 /* JSMicrotaskCallback.h */; };
 		E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = E3E4E2A61E3B16FC0023BB8A /* ScriptElementCachedScriptFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -15130,7 +15129,6 @@
 		E3B2F0E81D7F35EC00B0C9D1 /* LoadableScriptClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadableScriptClient.h; sourceTree = ""; };
 		E3B2F0E91D7F3D3C00B0C9D1 /* LoadableScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadableScript.cpp; sourceTree = ""; };
 		E3B7C0621DC3415A001FB0B8 /* JSDocumentDOMJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentDOMJIT.cpp; sourceTree = ""; };
-		E3BBC2452383551A006EC39F /* CSSValueKey.h */ = {isa = 

[webkit-changes] [253663] trunk/Source/WebKit

2019-12-17 Thread pvollan
Title: [253663] trunk/Source/WebKit








Revision 253663
Author pvol...@apple.com
Date 2019-12-17 17:54:54 -0800 (Tue, 17 Dec 2019)


Log Message
Unreviewed build fix after r253661.

* UIProcess/ios/forms/WKFileUploadPanel.mm:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm


Added Paths

trunk/Source/WebKit/Shared/UserInterfaceIdiom.h
trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm


Removed Paths

trunk/Source/WebKit/Shared/UserInterfaceIdiom.h
trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (253662 => 253663)

--- trunk/Source/WebKit/ChangeLog	2019-12-18 01:36:02 UTC (rev 253662)
+++ trunk/Source/WebKit/ChangeLog	2019-12-18 01:54:54 UTC (rev 253663)
@@ -1,5 +1,11 @@
 2019-12-17  Per Arne Vollan  
 
+Unreviewed build fix after r253661.
+
+* UIProcess/ios/forms/WKFileUploadPanel.mm:
+
+2019-12-17  Per Arne Vollan  
+
 [iOS] The WebContent process should not use API to get the user interface idiom
 https://bugs.webkit.org/show_bug.cgi?id=205236
 


Deleted: trunk/Source/WebKit/Shared/UserInterfaceIdiom.h (253662 => 253663)

--- trunk/Source/WebKit/Shared/UserInterfaceIdiom.h	2019-12-18 01:36:02 UTC (rev 253662)
+++ trunk/Source/WebKit/Shared/UserInterfaceIdiom.h	2019-12-18 01:54:54 UTC (rev 253663)
@@ -1,37 +0,0 @@
-/*
-* Copyright (C) 2019 Apple Inc. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions
-* are met:
-* 1. Redistributions of source code must retain the above copyright
-*notice, this list of conditions and the following disclaimer.
-* 2. Redistributions in binary form must reproduce the above copyright
-*notice, this list of conditions and the following disclaimer in the
-*documentation and/or other materials provided with the distribution.
-*
-* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
-* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-* THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#pragma once
-
-#if PLATFORM(IOS_FAMILY)
-
-namespace WebKit {
-
-bool currentUserInterfaceIdiomIsPad();
-void setCurrentUserInterfaceIdiomIsPad(bool);
-
-}
-
-#endif


Added: trunk/Source/WebKit/Shared/UserInterfaceIdiom.h (0 => 253663)

--- trunk/Source/WebKit/Shared/UserInterfaceIdiom.h	(rev 0)
+++ trunk/Source/WebKit/Shared/UserInterfaceIdiom.h	2019-12-18 01:54:54 UTC (rev 253663)
@@ -0,0 +1,37 @@
+/*
+* Copyright (C) 2019 Apple Inc. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+*notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+*notice, this list of conditions and the following disclaimer in the
+*documentation and/or other materials provided with the distribution.
+*
+* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+* THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#pragma once
+
+#if PLATFORM(IOS_FAMILY)
+
+namespace WebKit {
+
+bool currentUserInterfaceIdiomIsPad();
+void setCurrentUserInterfaceIdiomIsPad(bool);
+
+}
+
+#endif


Deleted: trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm (253662 => 253663)

--- trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm	2019-12-18 01:36:02 UTC (rev 253662)
+++ trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm	2019-12-18 01:54:54 UTC (rev 253663)
@@ -1,76 +0,0 @@
-/*
-* Copyright (C) 2019 

[webkit-changes] [253661] trunk/Source/WebKit

2019-12-17 Thread pvollan
Title: [253661] trunk/Source/WebKit








Revision 253661
Author pvol...@apple.com
Date 2019-12-17 17:32:40 -0800 (Tue, 17 Dec 2019)


Log Message
[iOS] The WebContent process should not use API to get the user interface idiom
https://bugs.webkit.org/show_bug.cgi?id=205236

Reviewed by Brent Fulgham.

This should be done in the UI process, since using the API in the WebContent process will connect to daemons
we intend to block access to. Add a flag to the process creation parameters which indicates whether the user
interface idiom is iPad or not. This flag will be set on the UI process side, and on the WebContent process
side, this flag will be read and cached for later use.

No new tests, covered by existing tests.

* Platform/spi/ios/UIKitSPI.h:
(currentUserInterfaceIdiomIsPad): Deleted.
* Shared/UserInterfaceIdiom.h: Added.
* Shared/UserInterfaceIdiom.mm: Added.
(WebKit::userInterfaceIdiomIsPad):
(WebKit::currentUserInterfaceIdiomIsPad):
(WebKit::setCurrentUserInterfaceIdiomIsPad):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/ios/WebPreferencesDefaultValuesIOS.mm:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/ios/SmartMagnificationController.mm:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession setAccessoryViewCustomButtonTitle:]):
(-[WKContentView endEditingAndUpdateFocusAppearanceWithReason:]):
(-[WKContentView _shouldShowAutomaticKeyboardUIIgnoringInputMode]):
(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _updateAccessory]):
(shouldShowKeyboardForElement):
(-[WKContentView _shouldUseLegacySelectPopoverDismissalBehavior]):
* UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
* UIProcess/ios/forms/WKFormColorControl.mm:
(-[WKFormColorControl initWithView:]):
* UIProcess/ios/forms/WKFormColorPicker.mm:
* UIProcess/ios/forms/WKFormInputControl.mm:
* UIProcess/ios/forms/WKFormSelectControl.mm:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/UIProcess/ios/SmartMagnificationController.mm
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
trunk/Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
trunk/Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm
trunk/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm
trunk/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm
trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectControl.mm
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm


Added Paths

trunk/Source/WebKit/Shared/UserInterfaceIdiom.h
trunk/Source/WebKit/Shared/UserInterfaceIdiom.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (253660 => 253661)

--- trunk/Source/WebKit/ChangeLog	2019-12-18 00:47:20 UTC (rev 253660)
+++ trunk/Source/WebKit/ChangeLog	2019-12-18 01:32:40 UTC (rev 253661)
@@ -1,3 +1,52 @@
+2019-12-17  Per Arne Vollan  
+
+[iOS] The WebContent process should not use API to get the user interface idiom
+https://bugs.webkit.org/show_bug.cgi?id=205236
+
+Reviewed by Brent Fulgham.
+
+This should be done in the UI process, since using the API in the WebContent process will connect to daemons
+we intend to block access to. Add a flag to the process creation parameters which indicates whether the user
+interface idiom is iPad or not. This flag will be set on the UI process side, and on the WebContent process
+side, this flag will be read and cached for later use.
+
+No new tests, covered by existing tests.
+
+* Platform/spi/ios/UIKitSPI.h:
+(currentUserInterfaceIdiomIsPad): Deleted.
+* Shared/UserInterfaceIdiom.h: Added.
+* Shared/UserInterfaceIdiom.mm: Added.
+(WebKit::userInterfaceIdiomIsPad):
+(WebKit::currentUserInterfaceIdiomIsPad):
+(WebKit::setCurrentUserInterfaceIdiomIsPad):
+* Shared/WebProcessCreationParameters.cpp:
+(WebKit::WebProcessCreationParameters::encode const):
+(WebKit::WebProcessCreationParameters::decode):
+* Shared/WebProcessCreationParameters.h:
+* Shared/ios/WebPreferencesDefaultValuesIOS.mm:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+   

[webkit-changes] [253595] trunk/Source/WebKit

2019-12-16 Thread pvollan
Title: [253595] trunk/Source/WebKit








Revision 253595
Author pvol...@apple.com
Date 2019-12-16 16:02:50 -0800 (Mon, 16 Dec 2019)


Log Message
[iOS] Issue mach lookup extension to diagnostics daemon
https://bugs.webkit.org/show_bug.cgi?id=205292

Reviewed by Brent Fulgham.

For internal installs, issue a mach lookup extension to the diagnostics daemon.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::isInternalInstall):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (253594 => 253595)

--- trunk/Source/WebKit/ChangeLog	2019-12-17 00:02:04 UTC (rev 253594)
+++ trunk/Source/WebKit/ChangeLog	2019-12-17 00:02:50 UTC (rev 253595)
@@ -1,3 +1,23 @@
+2019-12-16  Per Arne Vollan  
+
+[iOS] Issue mach lookup extension to diagnostics daemon
+https://bugs.webkit.org/show_bug.cgi?id=205292
+
+Reviewed by Brent Fulgham.
+
+For internal installs, issue a mach lookup extension to the diagnostics daemon.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* Shared/WebProcessCreationParameters.cpp:
+(WebKit::WebProcessCreationParameters::encode const):
+(WebKit::WebProcessCreationParameters::decode):
+* Shared/WebProcessCreationParameters.h:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::isInternalInstall):
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeWebProcess):
+
 2019-12-16  Daniel Bates  
 
 Reproducible case of backwards nextParagraph returning a position ahead of the input position


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (253594 => 253595)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-17 00:02:04 UTC (rev 253594)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-17 00:02:50 UTC (rev 253595)
@@ -968,7 +968,7 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI")))
+(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI" "com.apple.diagnosticd")))
 
 (allow mach-lookup
 (require-all


Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (253594 => 253595)

--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2019-12-17 00:02:04 UTC (rev 253594)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2019-12-17 00:02:50 UTC (rev 253595)
@@ -163,6 +163,7 @@
 #if PLATFORM(IOS)
 encoder << compilerServiceExtensionHandle;
 encoder << contentFilterExtensionHandle;
+encoder << diagnosticsExtensionHandle;
 #endif
 
 #if PLATFORM(COCOA)
@@ -417,6 +418,12 @@
 if (!contentFilterExtensionHandle)
 return false;
 parameters.contentFilterExtensionHandle = WTFMove(*contentFilterExtensionHandle);
+
+Optional> diagnosticsExtensionHandle;
+decoder >> diagnosticsExtensionHandle;
+if (!diagnosticsExtensionHandle)
+return false;
+parameters.diagnosticsExtensionHandle = WTFMove(*diagnosticsExtensionHandle);
 #endif
 
 #if PLATFORM(COCOA)


Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (253594 => 253595)

--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2019-12-17 00:02:04 UTC (rev 253594)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2019-12-17 00:02:50 UTC (rev 253595)
@@ -205,6 +205,7 @@
 #if PLATFORM(IOS)
 Optional compilerServiceExtensionHandle;
 Optional contentFilterExtensionHandle;
+Optional diagnosticsExtensionHandle;
 #endif
 
 #if PLATFORM(COCOA)


Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (253594 => 253595)

--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2019-12-17 00:02:04 UTC (rev 253594)
+++ 

[webkit-changes] [253564] trunk/Tools

2019-12-16 Thread pvollan
Title: [253564] trunk/Tools








Revision 253564
Author pvol...@apple.com
Date 2019-12-16 10:39:10 -0800 (Mon, 16 Dec 2019)


Log Message
Unreviewed build fix for tvOS after r253440.

* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm




Diff

Modified: trunk/Tools/ChangeLog (253563 => 253564)

--- trunk/Tools/ChangeLog	2019-12-16 18:29:25 UTC (rev 253563)
+++ trunk/Tools/ChangeLog	2019-12-16 18:39:10 UTC (rev 253564)
@@ -1,3 +1,9 @@
+2019-12-16  Per Arne Vollan  
+
+Unreviewed build fix for tvOS after r253440.
+
+* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
+
 2019-12-16  youenn fablet  
 
 Consider top-level context whose origin is unique as insecure


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm (253563 => 253564)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm	2019-12-16 18:29:25 UTC (rev 253563)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm	2019-12-16 18:39:10 UTC (rev 253564)
@@ -25,6 +25,8 @@
 
 #import "config.h"
 
+#if ENABLE(CONTENT_FILTERING)
+
 #import "ContentFiltering.h"
 #import "MockContentFilterSettings.h"
 #import "PlatformUtilities.h"
@@ -452,3 +454,5 @@
 #endif
 }
 }
+
+#endif // ENABLE(CONTENT_FILTERING)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253552] trunk/LayoutTests

2019-12-16 Thread pvollan
Title: [253552] trunk/LayoutTests








Revision 253552
Author pvol...@apple.com
Date 2019-12-16 07:47:55 -0800 (Mon, 16 Dec 2019)


Log Message
Layout test imported/blink/fast/sub-pixel/negative-composited-offset.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=205273

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (253551 => 253552)

--- trunk/LayoutTests/ChangeLog	2019-12-16 15:41:31 UTC (rev 253551)
+++ trunk/LayoutTests/ChangeLog	2019-12-16 15:47:55 UTC (rev 253552)
@@ -1,5 +1,14 @@
 2019-12-16  Per Arne Vollan  
 
+Layout test imported/blink/fast/sub-pixel/negative-composited-offset.html is flaky
+https://bugs.webkit.org/show_bug.cgi?id=205273
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
+2019-12-16  Per Arne Vollan  
+
 Layout Test js/integer-division-neg2tothe32-by-neg1.html is failing
 https://bugs.webkit.org/show_bug.cgi?id=205272
 


Modified: trunk/LayoutTests/platform/win/TestExpectations (253551 => 253552)

--- trunk/LayoutTests/platform/win/TestExpectations	2019-12-16 15:41:31 UTC (rev 253551)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-12-16 15:47:55 UTC (rev 253552)
@@ -4501,3 +4501,5 @@
 webkit.org/b/204974 http/tests/xmlhttprequest/sync-xhr-in-unload.html [ Failure ]
 
 webkit.org/b/205272 js/integer-division-neg2tothe32-by-neg1.html [ Failure ]
+
+webkit.org/b/205273 imported/blink/fast/sub-pixel/negative-composited-offset.html [ Pass ImageOnlyFailure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253551] trunk/LayoutTests

2019-12-16 Thread pvollan
Title: [253551] trunk/LayoutTests








Revision 253551
Author pvol...@apple.com
Date 2019-12-16 07:41:31 -0800 (Mon, 16 Dec 2019)


Log Message
Layout Test js/integer-division-neg2tothe32-by-neg1.html is failing
https://bugs.webkit.org/show_bug.cgi?id=205272

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (253550 => 253551)

--- trunk/LayoutTests/ChangeLog	2019-12-16 14:49:10 UTC (rev 253550)
+++ trunk/LayoutTests/ChangeLog	2019-12-16 15:41:31 UTC (rev 253551)
@@ -1,3 +1,12 @@
+2019-12-16  Per Arne Vollan  
+
+Layout Test js/integer-division-neg2tothe32-by-neg1.html is failing
+https://bugs.webkit.org/show_bug.cgi?id=205272
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
 2019-12-16  youenn fablet  
 
 SecurityOrigin should be unique for null blob URLs that have been unregistered


Modified: trunk/LayoutTests/platform/win/TestExpectations (253550 => 253551)

--- trunk/LayoutTests/platform/win/TestExpectations	2019-12-16 14:49:10 UTC (rev 253550)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-12-16 15:41:31 UTC (rev 253551)
@@ -4499,3 +4499,5 @@
 webkit.org/b/204795 fast/layoutformattingcontext/flow-integration-basic.html [ Failure ]
 
 webkit.org/b/204974 http/tests/xmlhttprequest/sync-xhr-in-unload.html [ Failure ]
+
+webkit.org/b/205272 js/integer-division-neg2tothe32-by-neg1.html [ Failure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253530] trunk/Source

2019-12-14 Thread pvollan
Title: [253530] trunk/Source








Revision 253530
Author pvol...@apple.com
Date 2019-12-14 15:37:15 -0800 (Sat, 14 Dec 2019)


Log Message
Map CSS value ID to system color in the UI process
https://bugs.webkit.org/show_bug.cgi?id=204314

Source/WebCore:

Reviewed by Brent Fulgham.

Currently, RenderThemeIOS is mapping CSS value IDs to system colors in the WebContent process. This mapping leads to
invoking selectors on UITraitCollection and UIColor, which will send messages to the runningboard daemon. Since we
will be blocking access to this daemon in the WebContent process, this mapping should be moved to the UI process.
The UI process will create a mapping between CSS value IDs and system colors, and pass it to the WebContent process.

No new tests, covered by existing tests.

* WebCore.xcodeproj/project.pbxproj:
* rendering/CSSValueKey.h: Added.
(WebCore::operator==):
(WebCore::CSSValueKey::encode const):
(WebCore::CSSValueKey::decode):
(WebCore::CSSValueKey::hash const):
(WTF::CSSValueKeyHash::hash):
(WTF::CSSValueKeyHash::equal):
(WTF::HashTraits::emptyValue):
(WTF::HashTraits::constructDeletedValue):
(WTF::HashTraits::isDeletedValue):
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::cssValueIDSelectorList):
(WebCore::systemColorFromCSSValueID):
(WebCore::globalCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::createCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::setCSSValueToSystemColorMap):
(WebCore::RenderThemeIOS::systemColor const):

Source/WebKit:

Reviewed by Brent Fulgham.

Create mapping between CSS value IDs and system colors in the UI process and send to the WebContent process
on process startup.

No new tests, covered by existing tests.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/rendering/RenderThemeIOS.h
trunk/Source/WebCore/rendering/RenderThemeIOS.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm


Added Paths

trunk/Source/WebCore/rendering/CSSValueKey.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (253529 => 253530)

--- trunk/Source/WebCore/ChangeLog	2019-12-14 23:20:45 UTC (rev 253529)
+++ trunk/Source/WebCore/ChangeLog	2019-12-14 23:37:15 UTC (rev 253530)
@@ -1,3 +1,38 @@
+2019-12-14  Per Arne Vollan  
+
+Map CSS value ID to system color in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=204314
+
+
+Reviewed by Brent Fulgham.
+
+Currently, RenderThemeIOS is mapping CSS value IDs to system colors in the WebContent process. This mapping leads to
+invoking selectors on UITraitCollection and UIColor, which will send messages to the runningboard daemon. Since we
+will be blocking access to this daemon in the WebContent process, this mapping should be moved to the UI process.
+The UI process will create a mapping between CSS value IDs and system colors, and pass it to the WebContent process.
+
+No new tests, covered by existing tests.
+
+* WebCore.xcodeproj/project.pbxproj:
+* rendering/CSSValueKey.h: Added.
+(WebCore::operator==):
+(WebCore::CSSValueKey::encode const):
+(WebCore::CSSValueKey::decode):
+(WebCore::CSSValueKey::hash const):
+(WTF::CSSValueKeyHash::hash):
+(WTF::CSSValueKeyHash::equal):
+(WTF::HashTraits::emptyValue):
+(WTF::HashTraits::constructDeletedValue):
+(WTF::HashTraits::isDeletedValue):
+* rendering/RenderThemeIOS.h:
+* rendering/RenderThemeIOS.mm:
+(WebCore::cssValueIDSelectorList):
+(WebCore::systemColorFromCSSValueID):
+(WebCore::globalCSSValueToSystemColorMap):
+(WebCore::RenderThemeIOS::createCSSValueToSystemColorMap):
+(WebCore::RenderThemeIOS::setCSSValueToSystemColorMap):
+(WebCore::RenderThemeIOS::systemColor const):
+
 2019-12-14  Zalan Bujtas  
 
 [LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/break-spaces-003.html


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (253529 => 253530)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-14 23:20:45 UTC (rev 253529)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-14 23:37:15 UTC (rev 253530)
@@ -4794,6 +4794,7 @@
 		E3B2F0ED1D7F4CA300B0C9D1 /* LoadableScript.h in Headers */ = {isa = PBXBuildFile; 

[webkit-changes] [253529] trunk

2019-12-14 Thread pvollan
Title: [253529] trunk








Revision 253529
Author pvol...@apple.com
Date 2019-12-14 15:20:45 -0800 (Sat, 14 Dec 2019)


Log Message
[iOS] Deny mach lookup access to "*.viewservice" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=205240

Reviewed by Brent Fulgham.

Source/WebKit:

As part of sandbox hardening in the WebContent process, mach lookup access to “*.viewservice” should be removed.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

LayoutTests:

* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
* fast/sandbox/ios/sandbox-mach-lookup.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/LayoutTests/ChangeLog (253528 => 253529)

--- trunk/LayoutTests/ChangeLog	2019-12-14 21:49:11 UTC (rev 253528)
+++ trunk/LayoutTests/ChangeLog	2019-12-14 23:20:45 UTC (rev 253529)
@@ -1,3 +1,13 @@
+2019-12-14  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to "*.viewservice" in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=205240
+
+Reviewed by Brent Fulgham.
+
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt:
+* fast/sandbox/ios/sandbox-mach-lookup.html:
+
 2019-12-13  Myles C. Maxfield  
 
 [watchOS] Apple.com is rendered in Times New Roman


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (253528 => 253529)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2019-12-14 21:49:11 UTC (rev 253528)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2019-12-14 23:20:45 UTC (rev 253529)
@@ -4,4 +4,5 @@
 
 
 PASS internals.hasSandboxMachLookupAccessToXPCServiceName("com.apple.WebKit.WebContent", "com.apple.apple-extension-service") is false
+PASS internals.hasSandboxMachLookupAccessToXPCServiceName("com.apple.WebKit.WebContent", "com.apple.viewservice") is false
 


Modified: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (253528 => 253529)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2019-12-14 21:49:11 UTC (rev 253528)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2019-12-14 23:20:45 UTC (rev 253529)
@@ -7,6 +7,7 @@
 
 if (window.internals) {
 shouldBeFalse("internals.hasSandboxMachLookupAccessToXPCServiceName(\"com.apple.WebKit.WebContent\", \"com.apple.apple-extension-service\")");
+shouldBeFalse("internals.hasSandboxMachLookupAccessToXPCServiceName(\"com.apple.WebKit.WebContent\", \"com.apple.viewservice\")");
 }
 
 


Modified: trunk/Source/WebKit/ChangeLog (253528 => 253529)

--- trunk/Source/WebKit/ChangeLog	2019-12-14 21:49:11 UTC (rev 253528)
+++ trunk/Source/WebKit/ChangeLog	2019-12-14 23:20:45 UTC (rev 253529)
@@ -1,3 +1,16 @@
+2019-12-14  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to "*.viewservice" in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=205240
+
+Reviewed by Brent Fulgham.
+
+As part of sandbox hardening in the WebContent process, mach lookup access to “*.viewservice” should be removed.
+
+Test: fast/sandbox/ios/sandbox-mach-lookup.html
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2019-12-14  Chris Dumez  
 
 WebSWServerConnection::startFetch() should never fail synchronously


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (253528 => 253529)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-14 21:49:11 UTC (rev 253528)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-14 23:20:45 UTC (rev 253529)
@@ -443,7 +443,6 @@
 
 (allow mach-lookup (with report) (with telemetry)
 (global-name-regex #"^com\.apple\.uikit\.viewservice\..+")
-(xpc-service-name-regex #"\.viewservice$") ;; 
 )
 
 ; UIKit-required IOKit nodes.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253488] trunk

2019-12-13 Thread pvollan
Title: [253488] trunk








Revision 253488
Author pvol...@apple.com
Date 2019-12-13 11:07:51 -0800 (Fri, 13 Dec 2019)


Log Message
[iOS] Deny mach lookup access to "*.apple-extension-service" in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=205134


Reviewed by Brent Fulgham.

Source/WebCore:

Add method to Internals checking mach lookup access to a given XPC service name.

Test: fast/sandbox/ios/sandbox-mach-lookup.html

* testing/Internals.cpp:
(WebCore::Internals::hasSandboxMachLookupAccessToXPCServiceName):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

Remove mach lookup access to "*.apple-extension-service" in the sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Source/WTF:

Add enum value for the XPC service name filter type.

* wtf/spi/darwin/SandboxSPI.h:

LayoutTests:

Add test for mach lookup access to "*.apple-extension-service".

* TestExpectations:
* fast/sandbox: Added.
* fast/sandbox/ios: Added.
* fast/sandbox/ios/sandbox-mach-lookup-expected.txt: Added.
* fast/sandbox/ios/sandbox-mach-lookup.html: Added.
* platform/ios-device-wk2/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/TestExpectations
trunk/LayoutTests/platform/ios-device-wk2/TestExpectations
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/spi/darwin/SandboxSPI.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb


Added Paths

trunk/LayoutTests/fast/sandbox/
trunk/LayoutTests/fast/sandbox/ios/
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt
trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html




Diff

Modified: trunk/LayoutTests/ChangeLog (253487 => 253488)

--- trunk/LayoutTests/ChangeLog	2019-12-13 18:58:04 UTC (rev 253487)
+++ trunk/LayoutTests/ChangeLog	2019-12-13 19:07:51 UTC (rev 253488)
@@ -1,3 +1,20 @@
+2019-12-13  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to "*.apple-extension-service" in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=205134
+
+
+Reviewed by Brent Fulgham.
+
+Add test for mach lookup access to "*.apple-extension-service".
+
+* TestExpectations:
+* fast/sandbox: Added.
+* fast/sandbox/ios: Added.
+* fast/sandbox/ios/sandbox-mach-lookup-expected.txt: Added.
+* fast/sandbox/ios/sandbox-mach-lookup.html: Added.
+* platform/ios-device-wk2/TestExpectations:
+
 2019-12-13  youenn fablet  
 
 Help debugging flaky http/tests/cache-storage/page-cache-domcachestorage-pending-promise.html


Modified: trunk/LayoutTests/TestExpectations (253487 => 253488)

--- trunk/LayoutTests/TestExpectations	2019-12-13 18:58:04 UTC (rev 253487)
+++ trunk/LayoutTests/TestExpectations	2019-12-13 19:07:51 UTC (rev 253488)
@@ -28,6 +28,7 @@
 fast/forms/select/mac-wk2 [ Skip ]
 fast/forms/textarea/ios [ Skip ]
 fast/forms/watchos [ Skip ]
+fast/sandbox/ios [ Skip ]
 fast/viewport/watchos [ Skip ]
 fast/visual-viewport/watchos [ Skip ]
 fast/visual-viewport/tiled-drawing [ Skip ]


Added: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt (0 => 253488)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup-expected.txt	2019-12-13 19:07:51 UTC (rev 253488)
@@ -0,0 +1,7 @@
+Regression tests for mach lookup sandbox changes on iOS
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS internals.hasSandboxMachLookupAccessToXPCServiceName("com.apple.WebKit.WebContent", "com.apple.apple-extension-service") is false
+


Added: trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html (0 => 253488)

--- trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	(rev 0)
+++ trunk/LayoutTests/fast/sandbox/ios/sandbox-mach-lookup.html	2019-12-13 19:07:51 UTC (rev 253488)
@@ -0,0 +1,14 @@
+
+
+
+
+description('Regression tests for mach lookup sandbox changes on iOS');
+
+if (window.internals) {
+shouldBeFalse("internals.hasSandboxMachLookupAccessToXPCServiceName(\"com.apple.WebKit.WebContent\", \"com.apple.apple-extension-service\")");
+}
+
+
+
+


Modified: trunk/LayoutTests/platform/ios-device-wk2/TestExpectations (253487 => 253488)

--- trunk/LayoutTests/platform/ios-device-wk2/TestExpectations	2019-12-13 18:58:04 UTC (rev 253487)
+++ trunk/LayoutTests/platform/ios-device-wk2/TestExpectations	2019-12-13 19:07:51 UTC (rev 253488)
@@ -3,3 +3,4 @@
 # See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
 #
 
+fast/sandbox/ios [ Pass ]


Modified: trunk/Source/WTF/ChangeLog (253487 => 253488)

--- trunk/Source/WTF/ChangeLog	2019-12-13 18:58:04 UTC (rev 253487)
+++ 

[webkit-changes] [253471] trunk/Source/WebKit

2019-12-13 Thread pvollan
Title: [253471] trunk/Source/WebKit








Revision 253471
Author pvol...@apple.com
Date 2019-12-13 08:02:25 -0800 (Fri, 13 Dec 2019)


Log Message
[iOS] The AGX compiler service is incorrectly listed as a global name in sandbox
https://bugs.webkit.org/show_bug.cgi?id=205189

Reviewed by Brent Fulgham.

It should be a XPC service name.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (253470 => 253471)

--- trunk/Source/WebKit/ChangeLog	2019-12-13 15:18:48 UTC (rev 253470)
+++ trunk/Source/WebKit/ChangeLog	2019-12-13 16:02:25 UTC (rev 253471)
@@ -1,3 +1,14 @@
+2019-12-13  Per Arne Vollan  
+
+[iOS] The AGX compiler service is incorrectly listed as a global name in sandbox
+https://bugs.webkit.org/show_bug.cgi?id=205189
+
+Reviewed by Brent Fulgham.
+
+It should be a XPC service name.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2019-12-12  Simon Fraser  
 
 Move WKWebView code related to testing to new files, with new private "for testing" headers.


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (253470 => 253471)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-13 15:18:48 UTC (rev 253470)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-13 16:02:25 UTC (rev 253471)
@@ -970,8 +970,13 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.AGXCompilerService" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI")))
+(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.nehelper" "com.apple.nesessionmanager.content-filter" "com.apple.uikit.viewservice.com.apple.WebContentFilter.remoteUI")))
 
+(allow mach-lookup
+(require-all
+(extension "com.apple.webkit.extension.mach")
+(xpc-service-name-prefix "com.apple.AGXCompilerService")))
+
 (media-capture-support)
 
 ;; These services have been identified as unused during living-on.






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253454] trunk/Source/WebKit

2019-12-12 Thread pvollan
Title: [253454] trunk/Source/WebKit








Revision 253454
Author pvol...@apple.com
Date 2019-12-12 16:26:20 -0800 (Thu, 12 Dec 2019)


Log Message
[iOS] Add sandbox telemetry to mach lookup rules in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=205175

Reviewed by Brent Fulgham.

We have already added telemetry to many mach lookup rules, but some were missing telemetry.

No new tests, no behavior change.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb




Diff

Modified: trunk/Source/WebKit/ChangeLog (253453 => 253454)

--- trunk/Source/WebKit/ChangeLog	2019-12-13 00:20:57 UTC (rev 253453)
+++ trunk/Source/WebKit/ChangeLog	2019-12-13 00:26:20 UTC (rev 253454)
@@ -1,3 +1,16 @@
+2019-12-12  Per Arne Vollan  
+
+[iOS] Add sandbox telemetry to mach lookup rules in the WebContent process
+https://bugs.webkit.org/show_bug.cgi?id=205175
+
+Reviewed by Brent Fulgham.
+
+We have already added telemetry to many mach lookup rules, but some were missing telemetry.
+
+No new tests, no behavior change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2019-12-12  Sihui Liu  
 
 IndexedDB: make WebIDBServer a MessageReceiver to replace WebIDBConnection


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (253453 => 253454)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-13 00:20:57 UTC (rev 253453)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-13 00:26:20 UTC (rev 253454)
@@ -626,11 +626,12 @@
 (allow mach-lookup
 (global-name "com.apple.logd")
 (global-name "com.apple.logd.events")
-(global-name "com.apple.distributed_notifications@1v3")
-(global-name "com.apple.aggregated")
 (global-name "com.apple.cfprefsd.daemon"))
 
 (allow mach-lookup (with report) (with telemetry)
+(global-name "com.apple.aggregated")
+(global-name "com.apple.distributed_notifications@1v3")
+(global-name "com.apple.pluginkit.pkd")
 (global-name "com.apple.tccd"))
 
 (allow ipc-posix-shm-read*
@@ -753,7 +754,7 @@
 (home-subpath "/Library/Caches/com.apple.keyboards"))
 
 ;; Power logging
-(allow mach-lookup
+(allow mach-lookup (with report) (with telemetry)
 (global-name "com.apple.powerlog.plxpclogger.xpc")) ;;  
 
 (mobile-preferences-read
@@ -944,9 +945,12 @@
 
 ;; Various services required by CFNetwork and other frameworks
 (allow mach-lookup
-(global-name "com.apple.PowerManagement.control")
 (global-name "com.apple.analyticsd"))
 
+(allow mach-lookup (with report) (with telemetry)
+(global-name "com.apple.cookied")
+(global-name "com.apple.PowerManagement.control"))
+
 (deny file-write-create (vnode-type SYMLINK))
 (deny file-read-xattr file-write-xattr (xattr-regex #"^com\.apple\.security\.private\."))
 






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253440] trunk

2019-12-12 Thread pvollan
Title: [253440] trunk








Revision 253440
Author pvol...@apple.com
Date 2019-12-12 11:09:12 -0800 (Thu, 12 Dec 2019)


Log Message
[iOS] Deny mach lookup access to content filter service in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=205077

Reviewed by Brent Fulgham.

Source/WebCore:

Add a global flag to ParentalControlsContentFilter to indicate whether the Web content filter extension has
been consumed. If the flag has been set, there is no need to check [WebFilterEvaluator isManagedSession],
since the flag will tell if filtering is required.

The API test ContentFiltering.LazilyLoadPlatformFrameworks has been modified to pass after this change.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/ParentalControlsContentFilter.h:
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::enabled):
(WebCore::ParentalControlsContentFilter::setHasConsumedSandboxExtension):

Source/WebKit:

Mach lookup access to the content filter service in the WebContent process is only needed if
[WebFilterEvaluator isManagedSession] evaluates to true. If this is the case, issue the needed
mach lookup sandbox extension to the WebContent process, where it will be consumed.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

With this patch, the WebContentAnalysis framework will not be loaded in the WebContent process unless
[WebFilterEvaluator isManagedSession] returns YES. Swizzle this method to return YES in the UI process.

* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(isManagedSession):
(TEST):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.h
trunk/Source/WebCore/platform/cocoa/ParentalControlsContentFilter.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (253439 => 253440)

--- trunk/Source/WebCore/ChangeLog	2019-12-12 18:45:50 UTC (rev 253439)
+++ trunk/Source/WebCore/ChangeLog	2019-12-12 19:09:12 UTC (rev 253440)
@@ -1,3 +1,22 @@
+2019-12-12  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to content filter service in the WebContent sandbox
+https://bugs.webkit.org/show_bug.cgi?id=205077
+
+Reviewed by Brent Fulgham.
+
+Add a global flag to ParentalControlsContentFilter to indicate whether the Web content filter extension has
+been consumed. If the flag has been set, there is no need to check [WebFilterEvaluator isManagedSession],
+since the flag will tell if filtering is required.
+
+The API test ContentFiltering.LazilyLoadPlatformFrameworks has been modified to pass after this change.
+
+* WebCore.xcodeproj/project.pbxproj:
+* platform/cocoa/ParentalControlsContentFilter.h:
+* platform/cocoa/ParentalControlsContentFilter.mm:
+(WebCore::ParentalControlsContentFilter::enabled):
+(WebCore::ParentalControlsContentFilter::setHasConsumedSandboxExtension):
+
 2019-12-12  Zalan Bujtas  
 
 [LFC][IFC] Fix fast/text/whitespace/023.html


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (253439 => 253440)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-12 18:45:50 UTC (rev 253439)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-12 19:09:12 UTC (rev 253440)
@@ -2995,7 +2995,7 @@
 		A17FEE641F8893220021E811 /* PaymentSessionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A17FEE631F8893220021E811 /* PaymentSessionBase.h */; };
 		A180AD5B219F81B000DC039A /* WebCoreAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */; };
 		A185B42A1E8211A100DC9118 /* LegacyPreviewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A185B4281E8211A100DC9118 /* LegacyPreviewLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */; };
+		A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 

[webkit-changes] [253357] trunk/Source

2019-12-10 Thread pvollan
Title: [253357] trunk/Source








Revision 253357
Author pvol...@apple.com
Date 2019-12-10 17:35:14 -0800 (Tue, 10 Dec 2019)


Log Message
[iOS] Calls to the device motion API should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=204770

Reviewed by Brent Fulgham.

Source/WebCore:

The device motion API on iOS is communicating with iohideventsystem. Since mach lookup to this daemon
will be closed, the calls to this API should be moved from the WebContent process to the UI process.
This patch implements forwarding of the device orientation requests to the UI process through the
class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in
modern WebKit. This class implements forwarding of the requests to the UI process, and receives
device orientation updates from the UI process. An instance of this class will be shared by all
device orientation clients on a page, and passed as part of the page configuration parameters. On
the UI process side, the class WebDeviceOrientationUpdateProviderProxy attached to the Web page
proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager
Objective-C class, and send device orientation updates back to the Web process. Also, use a weak
hash set of clients in WebDeviceOrientationUpdateProvider.

No new tests, covered by existing tests.

* dom/Document.cpp:
* platform/ios/DeviceMotionClientIOS.h:
* platform/ios/DeviceMotionClientIOS.mm:
(WebCore::DeviceMotionClientIOS::DeviceMotionClientIOS):
(WebCore::DeviceMotionClientIOS::startUpdating):
(WebCore::DeviceMotionClientIOS::stopUpdating):
(WebCore::DeviceMotionClientIOS::deviceMotionControllerDestroyed):
* platform/ios/DeviceOrientationClientIOS.mm:
(WebCore::DeviceOrientationClientIOS::startUpdating):
(WebCore::DeviceOrientationClientIOS::stopUpdating):
(WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed):
* platform/ios/DeviceOrientationUpdateProvider.h:
* platform/ios/MotionManagerClient.h:
(WebCore::MotionManagerClient::orientationChanged):
(WebCore::MotionManagerClient::motionChanged):
* platform/ios/WebCoreMotionManager.h:
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager addMotionClient:]):
(-[WebCoreMotionManager removeMotionClient:]):
(-[WebCoreMotionManager checkClientStatus]):
(-[WebCoreMotionManager sendAccelerometerData:]):
(-[WebCoreMotionManager sendMotionData:withHeading:]):

Source/WebKit:

The class WebDeviceOrientationUpdateProviderProxy will handle messages to start and stop updating device motion
in the UI process. Also, add a message to update the device motion in the WebContent process. In the UI process,
the device motion API is called through the already existing WebCoreMotionManager class.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h:
* UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in:
* UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm:
(WebKit::WebDeviceOrientationUpdateProviderProxy::startUpdatingDeviceMotion):
(WebKit::WebDeviceOrientationUpdateProviderProxy::stopUpdatingDeviceMotion):
(WebKit::WebDeviceOrientationUpdateProviderProxy::motionChanged):
* WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp:
(WebKit::WebDeviceOrientationUpdateProvider::startUpdatingDeviceOrientation):
(WebKit::WebDeviceOrientationUpdateProvider::stopUpdatingDeviceOrientation):
(WebKit::WebDeviceOrientationUpdateProvider::startUpdatingDeviceMotion):
(WebKit::WebDeviceOrientationUpdateProvider::stopUpdatingDeviceMotion):
(WebKit::WebDeviceOrientationUpdateProvider::deviceOrientationChanged):
(WebKit::WebDeviceOrientationUpdateProvider::deviceMotionChanged):
(WebKit::WebDeviceOrientationUpdateProvider::startUpdating): Deleted.
(WebKit::WebDeviceOrientationUpdateProvider::stopUpdating): Deleted.
* WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h:
* WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/platform/ios/DeviceMotionClientIOS.h
trunk/Source/WebCore/platform/ios/DeviceMotionClientIOS.mm
trunk/Source/WebCore/platform/ios/DeviceOrientationClientIOS.mm
trunk/Source/WebCore/platform/ios/DeviceOrientationUpdateProvider.h
trunk/Source/WebCore/platform/ios/MotionManagerClient.h
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.h
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp

[webkit-changes] [253355] trunk/Tools

2019-12-10 Thread pvollan
Title: [253355] trunk/Tools








Revision 253355
Author pvol...@apple.com
Date 2019-12-10 17:19:00 -0800 (Tue, 10 Dec 2019)


Log Message
Fix API test failure after r253351
https://bugs.webkit.org/show_bug.cgi?id=205089

Reviewed by Brent Fulgham.

With the patch landed in r253351, the NetworkExtension framework will not be loaded in the WebContent process unless
[NEFilterSource filterRequired] returns YES. Swizzle this method to return YES in the UI process.

* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
(filterRequired):
(TEST):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm




Diff

Modified: trunk/Tools/ChangeLog (253354 => 253355)

--- trunk/Tools/ChangeLog	2019-12-10 23:59:25 UTC (rev 253354)
+++ trunk/Tools/ChangeLog	2019-12-11 01:19:00 UTC (rev 253355)
@@ -1,3 +1,17 @@
+2019-12-10  Per Arne Vollan  
+
+Fix API test failure after r253351
+https://bugs.webkit.org/show_bug.cgi?id=205089
+
+Reviewed by Brent Fulgham.
+
+With the patch landed in r253351, the NetworkExtension framework will not be loaded in the WebContent process unless
+[NEFilterSource filterRequired] returns YES. Swizzle this method to return YES in the UI process.
+
+* TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm:
+(filterRequired):
+(TEST):
+
 2019-12-10  Chris Dumez  
 
 Gyroscope (DeviceMotion related) permission cannot be requested in WKWebView unless the client app sets a WKUIDelegate


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm (253354 => 253355)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm	2019-12-10 23:59:25 UTC (rev 253354)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentFiltering.mm	2019-12-11 01:19:00 UTC (rev 253355)
@@ -38,8 +38,13 @@
 #import 
 #import 
 #import 
+#import 
 #import 
+#import 
 
+SOFT_LINK_FRAMEWORK_OPTIONAL(NetworkExtension);
+SOFT_LINK_CLASS_OPTIONAL(NetworkExtension, NEFilterSource);
+
 using Decision = WebCore::MockContentFilterSettings::Decision;
 using DecisionPoint = WebCore::MockContentFilterSettings::DecisionPoint;
 
@@ -375,8 +380,17 @@
 
 @end
 
+static BOOL filterRequired(id self, SEL _cmd)
+{
+return YES;
+}
+
 TEST(ContentFiltering, LazilyLoadPlatformFrameworks)
 {
+// Swizzle [NEFilterSource filterRequired] to return YES in the UI process since NetworkExtension will not be loaded otherwise.
+Method method = class_getClassMethod(getNEFilterSourceClass(), @selector(filterRequired));
+method_setImplementation(method, reinterpret_cast(filterRequired));
+
 @autoreleasepool {
 auto controller = adoptNS([[LazilyLoadPlatformFrameworksController alloc] init]);
 [controller expectParentalControlsLoaded:NO networkExtensionLoaded:NO];






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253353] trunk/Source/WebCore

2019-12-10 Thread pvollan
Title: [253353] trunk/Source/WebCore








Revision 253353
Author pvol...@apple.com
Date 2019-12-10 15:39:13 -0800 (Tue, 10 Dec 2019)


Log Message
Make it possible to add regression tests for blocked XPC services
https://bugs.webkit.org/show_bug.cgi?id=204967

Reviewed by Brent Fulgham.

On macOS and iOS, it should be possible to add regression tests for blocked mach services. Add a method
to Internals, which checks whether a given process has access to mach lookup for a given global service
name. Currently, the only supported process is the WebContent process since the PIDs of other processes
are not readily available in Internals, but support for other processes will be added when needed.

No new tests, since this patch is in preparation for adding regression tests for sandbox changes.

* testing/Internals.cpp:
(WebCore::Internals::hasSandboxMachLookupAccessToGlobalName):
* testing/Internals.h:
* testing/Internals.idl:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/testing/Internals.cpp
trunk/Source/WebCore/testing/Internals.h
trunk/Source/WebCore/testing/Internals.idl




Diff

Modified: trunk/Source/WebCore/ChangeLog (253352 => 253353)

--- trunk/Source/WebCore/ChangeLog	2019-12-10 23:28:18 UTC (rev 253352)
+++ trunk/Source/WebCore/ChangeLog	2019-12-10 23:39:13 UTC (rev 253353)
@@ -1,3 +1,22 @@
+2019-12-10  Per Arne Vollan  
+
+Make it possible to add regression tests for blocked XPC services
+https://bugs.webkit.org/show_bug.cgi?id=204967
+
+Reviewed by Brent Fulgham.
+
+On macOS and iOS, it should be possible to add regression tests for blocked mach services. Add a method
+to Internals, which checks whether a given process has access to mach lookup for a given global service
+name. Currently, the only supported process is the WebContent process since the PIDs of other processes
+are not readily available in Internals, but support for other processes will be added when needed.
+
+No new tests, since this patch is in preparation for adding regression tests for sandbox changes.
+
+* testing/Internals.cpp:
+(WebCore::Internals::hasSandboxMachLookupAccessToGlobalName):
+* testing/Internals.h:
+* testing/Internals.idl:
+
 2019-12-10  Sihui Liu  
 
 IndexedDB: remove timer for completed operation in IDBTransaction


Modified: trunk/Source/WebCore/testing/Internals.cpp (253352 => 253353)

--- trunk/Source/WebCore/testing/Internals.cpp	2019-12-10 23:28:18 UTC (rev 253352)
+++ trunk/Source/WebCore/testing/Internals.cpp	2019-12-10 23:39:13 UTC (rev 253353)
@@ -303,6 +303,10 @@
 #include "GraphicsContext3DManager.h"
 #endif
 
+#if PLATFORM(COCOA)
+#import 
+#endif
+
 using JSC::CallData;
 using JSC::CallType;
 using JSC::CodeBlock;
@@ -5342,4 +5346,19 @@
 return InternalsSetLike::create();
 }
 
+bool Internals::hasSandboxMachLookupAccessToGlobalName(const String& process, const String& service)
+{
+#if PLATFORM(COCOA)
+pid_t pid;
+if (process == "com.apple.WebKit.WebContent")
+pid = getpid();
+else
+RELEASE_ASSERT_NOT_REACHED();
+
+return !sandbox_check(pid, "mach-lookup", static_cast(SANDBOX_FILTER_GLOBAL_NAME | SANDBOX_CHECK_NO_REPORT), service.utf8().data());
+#else
+return false;
+#endif
+}
+
 } // namespace WebCore


Modified: trunk/Source/WebCore/testing/Internals.h (253352 => 253353)

--- trunk/Source/WebCore/testing/Internals.h	2019-12-10 23:28:18 UTC (rev 253352)
+++ trunk/Source/WebCore/testing/Internals.h	2019-12-10 23:39:13 UTC (rev 253353)
@@ -912,6 +912,8 @@
 
 Ref createInternalsSetLike();
 Ref createInternalsMapLike();
+
+bool hasSandboxMachLookupAccessToGlobalName(const String& process, const String& service);
 
 String highlightPseudoElementColor(const String& highlightName, Element&);
 


Modified: trunk/Source/WebCore/testing/Internals.idl (253352 => 253353)

--- trunk/Source/WebCore/testing/Internals.idl	2019-12-10 23:28:18 UTC (rev 253352)
+++ trunk/Source/WebCore/testing/Internals.idl	2019-12-10 23:39:13 UTC (rev 253353)
@@ -823,4 +823,6 @@
 InternalsSetLike createInternalsSetLike();
 
 DOMString highlightPseudoElementColor(DOMString highlightName, Element element);
+
+boolean hasSandboxMachLookupAccessToGlobalName(DOMString process, DOMString service);
 };






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253351] trunk/Source

2019-12-10 Thread pvollan
Title: [253351] trunk/Source








Revision 253351
Author pvol...@apple.com
Date 2019-12-10 15:21:41 -0800 (Tue, 10 Dec 2019)


Log Message
[iOS] Deny mach lookup access to network extension services in the WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=203929

Reviewed by Brent Fulgham.

Source/WebCore:

Add a global flag to NetworkExtensionContentFilter to indicate whether network extension sandbox extensions have
been consumed. If the flag has been set, there is no need to check NEFilterSource.filterRequired, since the flag
will tell if filtering is required. Checking NEFilterSource.filterRequired will lead to other mach lookups which
we are trying to avoid.

The test ContentFiltering.LazilyLoadPlatformFrameworks has been modified.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/NetworkExtensionContentFilter.h:
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::enabled):

Source/WebKit:

Mach lookup access to network extension services in the WebContent process is only needed if
NEFilterSource.filterRequired is true. If this is the case, issue the needed mach lookup
sandbox extensions to the WebContent process, where they will be consumed. Eventually, all
the content filtering code should be moved to the Networking process, but since this is a
bigger undertaking, we can issue extensions in the meantime to strengthen the sandbox.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.h
trunk/Source/WebCore/platform/cocoa/NetworkExtensionContentFilter.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebCore/ChangeLog (253350 => 253351)

--- trunk/Source/WebCore/ChangeLog	2019-12-10 23:08:04 UTC (rev 253350)
+++ trunk/Source/WebCore/ChangeLog	2019-12-10 23:21:41 UTC (rev 253351)
@@ -1,3 +1,22 @@
+2019-12-10  Per Arne Vollan  
+
+[iOS] Deny mach lookup access to network extension services in the WebContent sandbox
+https://bugs.webkit.org/show_bug.cgi?id=203929
+
+Reviewed by Brent Fulgham.
+
+Add a global flag to NetworkExtensionContentFilter to indicate whether network extension sandbox extensions have
+been consumed. If the flag has been set, there is no need to check NEFilterSource.filterRequired, since the flag
+will tell if filtering is required. Checking NEFilterSource.filterRequired will lead to other mach lookups which
+we are trying to avoid.
+
+The test ContentFiltering.LazilyLoadPlatformFrameworks has been modified.
+
+* WebCore.xcodeproj/project.pbxproj:
+* platform/cocoa/NetworkExtensionContentFilter.h:
+* platform/cocoa/NetworkExtensionContentFilter.mm:
+(WebCore::NetworkExtensionContentFilter::enabled):
+
 2019-12-10  Commit Queue  
 
 Unreviewed, rolling out r253321.


Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (253350 => 253351)

--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-10 23:08:04 UTC (rev 253350)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-12-10 23:21:41 UTC (rev 253351)
@@ -2972,7 +2972,7 @@
 		A14832CF187F684700DA63A6 /* WebCoreThreadSystemInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = A14832A1187F508700DA63A6 /* WebCoreThreadSystemInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A1491DA31F859D870095F5D4 /* PaymentSession.h in Headers */ = {isa = PBXBuildFile; fileRef = A1491DA21F859D870095F5D4 /* PaymentSession.h */; };
 		A149786F1ABAF33800CEF7E4 /* ContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A149786D1ABAF33800CEF7E4 /* ContentFilter.h */; };
-		A14978711ABAF3A500CEF7E4 /* PlatformContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */; };
+		A14978711ABAF3A500CEF7E4 /* PlatformContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A14978701ABAF3A500CEF7E4 /* PlatformContentFilter.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A14BB0A01F9813B800605A35 /* MockPayment.h 

[webkit-changes] [253296] trunk/Source/WebCore

2019-12-09 Thread pvollan
Title: [253296] trunk/Source/WebCore








Revision 253296
Author pvol...@apple.com
Date 2019-12-09 11:23:10 -0800 (Mon, 09 Dec 2019)


Log Message
Unreviewed, speculative tvOS build fix after r253231.

* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager sendMotionData:withHeading:]):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (253295 => 253296)

--- trunk/Source/WebCore/ChangeLog	2019-12-09 18:37:11 UTC (rev 253295)
+++ trunk/Source/WebCore/ChangeLog	2019-12-09 19:23:10 UTC (rev 253296)
@@ -1,3 +1,10 @@
+2019-12-09  Per Arne Vollan  
+
+Unreviewed, speculative tvOS build fix after r253231.
+
+* platform/ios/WebCoreMotionManager.mm:
+(-[WebCoreMotionManager sendMotionData:withHeading:]):
+
 2019-12-09  Zalan Bujtas  
 
 [LFC][IFC] fix fast/text/simple-lines-multiple-renderers-break.html


Modified: trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm (253295 => 253296)

--- trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm	2019-12-09 18:37:11 UTC (rev 253295)
+++ trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm	2019-12-09 19:23:10 UTC (rev 253296)
@@ -248,7 +248,7 @@
 
 CMAttitude* attitude = newMotion.attitude;
 
-Vector> orientationClients;
+Vector> orientationClients;
 orientationClients.reserveInitialCapacity(m_deviceOrientationClients.computeSize());
 for (auto& client : m_deviceOrientationClients)
 orientationClients.uncheckedAppend(makeWeakPtr());






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253239] trunk/LayoutTests

2019-12-06 Thread pvollan
Title: [253239] trunk/LayoutTests








Revision 253239
Author pvol...@apple.com
Date 2019-12-06 21:16:00 -0800 (Fri, 06 Dec 2019)


Log Message
Layout Test http/tests/xmlhttprequest/sync-xhr-in-unload.html is failing
https://bugs.webkit.org/show_bug.cgi?id=204974

Unreviewed test gardening.

* platform/win/TestExpectations:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/win/TestExpectations




Diff

Modified: trunk/LayoutTests/ChangeLog (253238 => 253239)

--- trunk/LayoutTests/ChangeLog	2019-12-07 04:35:59 UTC (rev 253238)
+++ trunk/LayoutTests/ChangeLog	2019-12-07 05:16:00 UTC (rev 253239)
@@ -1,3 +1,12 @@
+2019-12-06  Per Arne Vollan  
+
+Layout Test http/tests/xmlhttprequest/sync-xhr-in-unload.html is failing
+https://bugs.webkit.org/show_bug.cgi?id=204974
+
+Unreviewed test gardening.
+
+* platform/win/TestExpectations:
+
 2019-12-06  Jonathan Bedard  
 
 Unreviewed, rolling out r253148.


Modified: trunk/LayoutTests/platform/win/TestExpectations (253238 => 253239)

--- trunk/LayoutTests/platform/win/TestExpectations	2019-12-07 04:35:59 UTC (rev 253238)
+++ trunk/LayoutTests/platform/win/TestExpectations	2019-12-07 05:16:00 UTC (rev 253239)
@@ -4493,3 +4493,5 @@
 webkit.org/b/204794 webanimations/accelerated-animation-removal-upon-transition-completion.html [ Timeout ]
 
 webkit.org/b/204795 fast/layoutformattingcontext/flow-integration-basic.html [ Failure ]
+
+webkit.org/b/204974 http/tests/xmlhttprequest/sync-xhr-in-unload.html [ Failure ]






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253236] trunk/Source/JavaScriptCore

2019-12-06 Thread pvollan
Title: [253236] trunk/Source/_javascript_Core








Revision 253236
Author pvol...@apple.com
Date 2019-12-06 19:50:47 -0800 (Fri, 06 Dec 2019)


Log Message
Unreviewed build fix. Initialize local variable.

* API/tests/testapi.cpp:
(TestAPI::promiseUnhandledRejection):

Modified Paths

trunk/Source/_javascript_Core/API/tests/testapi.cpp
trunk/Source/_javascript_Core/ChangeLog




Diff

Modified: trunk/Source/_javascript_Core/API/tests/testapi.cpp (253235 => 253236)

--- trunk/Source/_javascript_Core/API/tests/testapi.cpp	2019-12-07 02:49:32 UTC (rev 253235)
+++ trunk/Source/_javascript_Core/API/tests/testapi.cpp	2019-12-07 03:50:47 UTC (rev 253236)
@@ -524,7 +524,7 @@
 
 void TestAPI::promiseUnhandledRejection()
 {
-JSObjectRef reject;
+JSObjectRef reject = nullptr;
 JSValueRef exception = nullptr;
 static auto promise = JSObjectMakeDeferredPromise(context, nullptr, , );
 check(!exception, "creating a (reject-only) deferred promise should not throw");


Modified: trunk/Source/_javascript_Core/ChangeLog (253235 => 253236)

--- trunk/Source/_javascript_Core/ChangeLog	2019-12-07 02:49:32 UTC (rev 253235)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-12-07 03:50:47 UTC (rev 253236)
@@ -1,3 +1,10 @@
+2019-12-06  Per Arne Vollan  
+
+Unreviewed build fix. Initialize local variable.
+
+* API/tests/testapi.cpp:
+(TestAPI::promiseUnhandledRejection):
+
 2019-12-06  Joonghun Park  
 
 Unreviewed. Change the format string portable by using "%" PRIx64






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253231] trunk/Source

2019-12-06 Thread pvollan
Title: [253231] trunk/Source








Revision 253231
Author pvol...@apple.com
Date 2019-12-06 16:19:22 -0800 (Fri, 06 Dec 2019)


Log Message
[iOS] Calls to device orientation API should be done in the UI process
https://bugs.webkit.org/show_bug.cgi?id=204720

Reviewed by Alex Christensen.

Source/WebCore:

The device orientation API on iOS is communicating with locationd. Since mach lookup to this daemon
will be closed, the calls to this API should be moved from the WebContent process to the UI process.
This patch implements forwarding of the device orientation requests to the UI process through a new
class, DeviceOrientationUpdateProvider, which is subclassed by WebDeviceOrientationUpdateProvider in
modern WebKit. This class implements forwarding of the requests to the UI process, and receives
device orientation updates from the UI process. An instance of this class will be shared by all
device orientation clients on a page, and passed as part of the page configuration parameters. On
the UI process side, a new class WebDeviceOrientationUpdateProviderProxy attached to the Web page
proxy is taking care of calling the device orientation API through the existing WebCoreMotionManager
Objective-C class, and send device orientation updates back to the Web process. Also, use a weak
hash set of orientation clients in WebCoreMotionManager.

* WebCore.xcodeproj/project.pbxproj:
* dom/DeviceOrientationClient.h:
* dom/Document.cpp:
* page/Page.cpp:
(WebCore::m_deviceOrientationUpdateProvider):
(WebCore::m_applicationManifest): Deleted.
* page/Page.h:
(WebCore::Page::deviceOrientationUpdateProvider const):
* page/PageConfiguration.h:
* platform/ios/DeviceOrientationClientIOS.h:
* platform/ios/DeviceOrientationClientIOS.mm:
(WebCore::DeviceOrientationClientIOS::DeviceOrientationClientIOS):
(WebCore::DeviceOrientationClientIOS::startUpdating):
(WebCore::DeviceOrientationClientIOS::stopUpdating):
(WebCore::DeviceOrientationClientIOS::deviceOrientationControllerDestroyed):
* platform/ios/WebCoreMotionManager.h:
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager addOrientationClient:]):
(-[WebCoreMotionManager removeOrientationClient:]):
(-[WebCoreMotionManager checkClientStatus]):
(-[WebCoreMotionManager sendMotionData:withHeading:]):

Source/WebKit:

Add a new class, WebDeviceOrientationUpdateProviderProxy, to handle messages to start and stop updating device orientation
in the UI process. Also, add a message to update the device orientation in the WebContent process. In the UI process, the
device orientation API is called through the already existing WebCoreMotionManager class.

* DerivedSources-input.xcfilelist:
* DerivedSources-output.xcfilelist:
* DerivedSources.make:
* UIProcess/WebPageProxy.cpp:
(WebKit::m_webDeviceOrientationUpdateProviderProxy):
(WebKit::m_resetRecentCrashCountTimer): Deleted.
* UIProcess/WebPageProxy.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_overriddenMediaType):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/dom/DeviceOrientationClient.h
trunk/Source/WebCore/dom/Document.cpp
trunk/Source/WebCore/page/Page.cpp
trunk/Source/WebCore/page/Page.h
trunk/Source/WebCore/page/PageConfiguration.h
trunk/Source/WebCore/platform/ios/DeviceOrientationClientIOS.h
trunk/Source/WebCore/platform/ios/DeviceOrientationClientIOS.mm
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.h
trunk/Source/WebCore/platform/ios/WebCoreMotionManager.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/DerivedSources-input.xcfilelist
trunk/Source/WebKit/DerivedSources-output.xcfilelist
trunk/Source/WebKit/DerivedSources.make
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.h
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp


Added Paths

trunk/Source/WebCore/platform/ios/DeviceOrientationUpdateProvider.h
trunk/Source/WebCore/platform/ios/MotionManagerClient.h
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.h
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.messages.in
trunk/Source/WebKit/UIProcess/ios/WebDeviceOrientationUpdateProviderProxy.mm
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.cpp
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.h
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebDeviceOrientationUpdateProvider.messages.in




Diff

Modified: trunk/Source/WebCore/ChangeLog (253230 => 253231)

--- trunk/Source/WebCore/ChangeLog	2019-12-07 00:11:47 UTC (rev 253230)
+++ trunk/Source/WebCore/ChangeLog	2019-12-07 00:19:22 UTC (rev 253231)
@@ -1,3 +1,44 @@
+2019-12-06  Per Arne Vollan  
+
+[iOS] Calls to device orientation API should be done in the UI process
+https://bugs.webkit.org/show_bug.cgi?id=204720
+
+Reviewed by Alex Christensen.
+
+The 

[webkit-changes] [253130] trunk/Source/WebKit

2019-12-04 Thread pvollan
Title: [253130] trunk/Source/WebKit








Revision 253130
Author pvol...@apple.com
Date 2019-12-04 16:27:49 -0800 (Wed, 04 Dec 2019)


Log Message
Unreviewed fix for failure to create sandbox extension on macOS after r253011. This should be iOS only.


* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h




Diff

Modified: trunk/Source/WebKit/ChangeLog (253129 => 253130)

--- trunk/Source/WebKit/ChangeLog	2019-12-05 00:23:59 UTC (rev 253129)
+++ trunk/Source/WebKit/ChangeLog	2019-12-05 00:27:49 UTC (rev 253130)
@@ -1,5 +1,13 @@
 2019-12-04  Per Arne Vollan  
 
+Unreviewed fix for failure to create sandbox extension on macOS after r253011. This should be iOS only.
+
+* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):
+* UIProcess/UserMediaPermissionRequestManagerProxy.h:
+
+2019-12-04  Per Arne Vollan  
+
 [iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService"
 https://bugs.webkit.org/show_bug.cgi?id=203915
 


Modified: trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp (253129 => 253130)

--- trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp	2019-12-05 00:23:59 UTC (rev 253129)
+++ trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp	2019-12-05 00:27:49 UTC (rev 253130)
@@ -241,7 +241,7 @@
 ++m_hasPendingCapture;
 
 SandboxExtension::Handle handle;
-#if HAVE(SANDBOX_ISSUE_MACH_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN)
+#if PLATFORM(IOS)
 if (!m_hasCreatedSandboxExtensionForTCCD) {
 SandboxExtension::createHandleForMachLookup("com.apple.tccd", m_page.process().connection()->getAuditToken(), handle);
 m_hasCreatedSandboxExtensionForTCCD = true;


Modified: trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h (253129 => 253130)

--- trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h	2019-12-05 00:23:59 UTC (rev 253129)
+++ trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h	2019-12-05 00:27:49 UTC (rev 253130)
@@ -154,7 +154,7 @@
 const void* m_logIdentifier;
 #endif
 bool m_hasFilteredDeviceList { false };
-#if HAVE(SANDBOX_ISSUE_MACH_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN)
+#if PLATFORM(IOS)
 bool m_hasCreatedSandboxExtensionForTCCD { false };
 #endif
 uint64_t m_hasPendingCapture { 0 };






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [253127] trunk/Source/WebKit

2019-12-04 Thread pvollan
Title: [253127] trunk/Source/WebKit








Revision 253127
Author pvol...@apple.com
Date 2019-12-04 16:07:39 -0800 (Wed, 04 Dec 2019)


Log Message
[iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService"
https://bugs.webkit.org/show_bug.cgi?id=203915

Reviewed by Brent Fulgham.

Only a few iPad models need access to "com.apple.AGXCompilerService” in the WebContent process.
The UI process should issue this mach extension for these iPad models.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::deviceHasAGXCompilerService):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (253126 => 253127)

--- trunk/Source/WebKit/ChangeLog	2019-12-04 23:34:24 UTC (rev 253126)
+++ trunk/Source/WebKit/ChangeLog	2019-12-05 00:07:39 UTC (rev 253127)
@@ -1,3 +1,24 @@
+2019-12-04  Per Arne Vollan  
+
+[iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService"
+https://bugs.webkit.org/show_bug.cgi?id=203915
+
+Reviewed by Brent Fulgham.
+
+Only a few iPad models need access to "com.apple.AGXCompilerService” in the WebContent process.
+The UI process should issue this mach extension for these iPad models.
+ 
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* Shared/WebProcessCreationParameters.cpp:
+(WebKit::WebProcessCreationParameters::encode const):
+(WebKit::WebProcessCreationParameters::decode):
+* Shared/WebProcessCreationParameters.h:
+* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+(WebKit::deviceHasAGXCompilerService):
+(WebKit::WebProcessPool::platformInitializeWebProcess):
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeWebProcess):
+
 2019-12-04  Kate Cheney  
 
 Expose basic ITP data from the database for future API/SPI use


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (253126 => 253127)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-04 23:34:24 UTC (rev 253126)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2019-12-05 00:07:39 UTC (rev 253127)
@@ -285,8 +285,10 @@
 (allow sysctl-read
(sysctl-name #"kern.bootsessionuuid"))
 
+(allow mach-lookup (with report) (with telemetry)
+(xpc-service-name-prefix "com.apple.AGXCompilerService"))
+
 (allow mach-lookup
-   (xpc-service-name-prefix "com.apple.AGXCompilerService")
;; 
(xpc-service-name "com.apple.MTLCompilerService"))
 
@@ -964,7 +966,7 @@
 (allow mach-lookup
 (require-all
 (extension "com.apple.webkit.extension.mach")
-(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd")))
+(global-name "com.apple.iphone.axserver-systemwide" "com.apple.tccd" "com.apple.AGXCompilerService")))
 
 (media-capture-support)
 


Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (253126 => 253127)

--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2019-12-04 23:34:24 UTC (rev 253126)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2019-12-05 00:07:39 UTC (rev 253127)
@@ -158,6 +158,10 @@
 #endif
 
 encoder << websiteDataStoreParameters;
+
+#if PLATFORM(IOS)
+encoder << compilerServiceExtensionHandle;
+#endif
 }
 
 bool WebProcessCreationParameters::decode(IPC::Decoder& decoder, WebProcessCreationParameters& parameters)
@@ -388,6 +392,14 @@
 return false;
 parameters.websiteDataStoreParameters = WTFMove(*websiteDataStoreParameters);
 
+#if PLATFORM(IOS)
+Optional> compilerServiceExtensionHandle;
+decoder >> compilerServiceExtensionHandle;
+if (!compilerServiceExtensionHandle)
+return false;
+parameters.compilerServiceExtensionHandle = WTFMove(*compilerServiceExtensionHandle);
+#endif
+
 return true;
 }
 


Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (253126 => 253127)

--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2019-12-04 23:34:24 UTC (rev 253126)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2019-12-05 00:07:39 UTC (rev 

<    2   3   4   5   6   7   8   9   10   11   >