[webkit-changes] [295304] trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig

2022-06-06 Thread bfulgham
Title: [295304] trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig








Revision 295304
Author bfulg...@apple.com
Date 2022-06-06 16:47:49 -0700 (Mon, 06 Jun 2022)


Log Message
Framework Mismatch Crash when loading any page if CaptivePortal mode enabled
rdar://89925654

Reviewed by Tim Horton.

Code signing flags were improperly set for the CaptivePortal process. This patch instructs the build
system to treat CaptivePortal code signing the same as Normal WebContent process builds.

* Source/WebKit/Configurations/BaseXPCService.xcconfig:

Canonical link: https://commits.webkit.org/251346@main

Modified Paths

trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig




Diff

Modified: trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig (295303 => 295304)

--- trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig	2022-06-06 23:23:59 UTC (rev 295303)
+++ trunk/Source/WebKit/Configurations/BaseXPCService.xcconfig	2022-06-06 23:47:49 UTC (rev 295304)
@@ -85,6 +85,7 @@
 
 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_$(WK_XPC_SERVICE_VARIANT)) --entitlements $(WK_PROCESSED_XCENT_FILE);
 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_ = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_Normal);
+WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_CaptivePortal = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_Normal);
 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_Normal = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_Normal_VALIDATION_$(WK_LIBRARY_VALIDATION_ENABLED));
 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_macfamily_VARIANT_Normal_VALIDATION_YES = -o library;
 WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS_iosdevicefamily = --entitlements $(WK_PROCESSED_XCENT_FILE);






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


[webkit-changes] [295456] trunk

2022-06-10 Thread bfulgham
Title: [295456] trunk








Revision 295456
Author bfulg...@apple.com
Date 2022-06-10 10:29:29 -0700 (Fri, 10 Jun 2022)


Log Message
[ macOS ][ iOS ] TestWebKitAPI.SOAuthorizationSubFrame.InterceptionError is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=241421


Reviewed by Kate Cheney.

This test was timing out for the same reason as SOAuthorizationSubFrame.InterceptionErrorWithReferrer,
which Pascoe fixed in Bug 239311.

This change modifies all 'waitForMessage'-based tests to use the message listener delegate to
avoid the race conditions identified. I also changed the method swizzling code to remove
a bunch of copy/paste code that had to be kept in sync.

With these changes I can run the tests 1000 times on simulator without a timeout.

* Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm:
(-[WKSOAuthorizationDelegate authorization:didCompleteWithError:]): Only emit an error log message
when there is an actual error. We pass through this flow in normal cases where a site wants to
use the web fallback instead of AppSSO based on user input.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationScriptMessageHandler extendExpectations:]):
(-[TestSOAuthorizationScriptMessageHandler resetExpectations:]):
(TestWebKitAPI::TEST):

Canonical link: https://commits.webkit.org/251462@main

Modified Paths

trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm




Diff

Modified: trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm (295455 => 295456)

--- trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm	2022-06-10 17:09:37 UTC (rev 295455)
+++ trunk/Source/WebKit/UIProcess/Cocoa/SOAuthorization/WKSOAuthorizationDelegate.mm	2022-06-10 17:29:29 UTC (rev 295456)
@@ -129,7 +129,8 @@
 {
 ASSERT(RunLoop::isMain());
 WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization:didCompleteWithError: (authorization = %p, _session = %p)", authorization, _session.get());
-LOG_ERROR("Could not complete AppSSO: %d", error.code);
+if (error.code)
+LOG_ERROR("Could not complete AppSSO operation. Error: %d", error.code);
 if (!_session) {
 WKSOAUTHORIZATIONDELEGATE_RELEASE_LOG("authorization:didCompleteWithError: No session, so returning early.");
 ASSERT_NOT_REACHED();


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm (295455 => 295456)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm	2022-06-10 17:09:37 UTC (rev 295455)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm	2022-06-10 17:29:29 UTC (rev 295456)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -260,6 +260,19 @@
 return self;
 }
 
+- (void)extendExpectations:(NSArray *)additionalMessages
+{
+_expectedMessages = [_expectedMessages arrayByAddingObjectsFromArray:additionalMessages];
+allMessagesReceived = false;
+}
+
+- (void)resetExpectations:(NSArray *)expectedMessages
+{
+_messages = adoptNS([[NSMutableArray alloc] init]);
+_expectedMessages = expectedMessages;
+allMessagesReceived = false;
+}
+
 - (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
 {
 auto curIndex = [_messages count];
@@ -370,6 +383,16 @@
 EXPECT_EQ(((NSNumber *)[gAuthorization authorizationOptions][SOAuthorizationOptionInitiatingAction]).intValue, initiatingAction);
 }
 
+#define SWIZZLE_SOAUTH(SOAuthClass) \
+ClassMethodSwizzler swizzler1(SOAuthClass, @selector(canPerformAuthorizationWithURL:responseCode:), reinterpret_cast(overrideCanPerformAuthorizationWithURL)); \
+InstanceMethodSwizzler swizzler2(SOAuthClass, @selector(setDelegate:), reinterpret_cast(overrideSetDelegate)); \
+InstanceMethodSwizzler swizzler3(SOAuthClass, @selector(beginAuthorizationWithURL:httpHeaders:httpBody:), reinterpret_cast(overrideBeginAuthorizationWithURL)); \
+InstanceMethodSwizzler swizzler4(SOAuthClass, @selector(cancelAuthorization), reinterpret_cast(overrideCancelAuthorization)); \
+InstanceMethodSwizzler swizzler5(SOAuthClass, @selector(getAuthorizationHintsWithURL:responseCode:completion:), reinterpret_cast(overrideGetAuthorizationHintsWithURL));
+
+#define SWIZZLE_AKAUTH() \
+ClassMethodSwizzler swizzler6([AKAuthorizationController class], @selector(isURLFromAppleOwnedDomain:), reinterpret_cast(overrideIsURLFromAppleOwnedDomain)); \
+
 namespace TestWebKitAPI {
 
 TEST(SOAuthorizationRedirect, NoInterceptions)
@@ -391,10 +414,7 @@
 TEST(SOAuthorizationRedirect, DisableSSO)
 {
 resetState();
-ClassMethodSwizzler swiz

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

2022-06-17 Thread bfulgham
Title: [295648] trunk/Source/WebKit








Revision 295648
Author bfulg...@apple.com
Date 2022-06-17 16:47:50 -0700 (Fri, 17 Jun 2022)


Log Message
Avoid using hardware JPEG decoding in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=241560


Reviewed by Simon Fraser.

This patch switches the file thumbnail logic in WebKit to use PNG, rather than JPEG.
This provides two benefits: (1) it uses a better image format for this use case,
and (2) it avoids attempts by CoreGraphics to perform hardware JPEG decoding in the
WebContent process, which is prohibited by the current sandbox.

* Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]): Switch to using UIImagePNGRepresentation.
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):

Canonical link: https://commits.webkit.org/251653@main

Modified Paths

trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp




Diff

Modified: trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm (295647 => 295648)

--- trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2022-06-17 23:18:36 UTC (rev 295647)
+++ trunk/Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.mm	2022-06-17 23:47:50 UTC (rev 295648)
@@ -436,8 +436,8 @@
 for (NSURL *fileURL in fileURLs)
 filenames.uncheckedAppend(String::fromUTF8(fileURL.fileSystemRepresentation));
 
-NSData *jpeg = UIImageJPEGRepresentation(iconImage, 1.0);
-RefPtr iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast([jpeg bytes]), [jpeg length])));
+NSData *png = UIImagePNGRepresentation(iconImage);
+RefPtr iconImageDataRef = adoptRef(toImpl(WKDataCreate(reinterpret_cast([png bytes]), [png length])));
 
 _listener->chooseFiles(filenames, displayString, iconImageDataRef.get());
 [self _dispatchDidDismiss];


Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (295647 => 295648)

--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-06-17 23:18:36 UTC (rev 295647)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2022-06-17 23:47:50 UTC (rev 295648)
@@ -4969,7 +4969,7 @@
 if (!iconData.empty()) {
 RetainPtr dataRef = adoptCF(CFDataCreate(nullptr, iconData.data(), iconData.size()));
 RetainPtr imageProviderRef = adoptCF(CGDataProviderCreateWithCFData(dataRef.get()));
-RetainPtr imageRef = adoptCF(CGImageCreateWithJPEGDataProvider(imageProviderRef.get(), nullptr, true, kCGRenderingIntentDefault));
+RetainPtr imageRef = adoptCF(CGImageCreateWithPNGDataProvider(imageProviderRef.get(), nullptr, true, kCGRenderingIntentDefault));
 icon = Icon::createIconForImage(WTFMove(imageRef));
 }
 






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


[webkit-changes] [221017] trunk

2017-08-22 Thread bfulgham
Title: [221017] trunk








Revision 221017
Author bfulg...@apple.com
Date 2017-08-22 09:22:22 -0700 (Tue, 22 Aug 2017)


Log Message
Disable access to secure cookies if an HTTPS site loads mixed content
https://bugs.webkit.org/show_bug.cgi?id=157053


Patch by Brent Fulgham   and Pranjal Jumde  on 2017-08-22
Reviewed by Dan Bates.

Source/WebCore:

Tests: http/tests/security/mixedContent/insecure-css-with-secure-cookies.html
   http/tests/security/mixedContent/insecure-image-with-securecookie-block.html
   http/tests/security/mixedContent/insecure-image-with-securecookie.html
   http/tests/security/mixedContent/insecure-script-with-secure-cookies.html
   http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block.html
   http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies.html

* dom/SecurityContext.h: 
(WebCore::SecurityContext::secureCookiesAccessed): Added.
(WebCore::SecurityContext::setSecureCookiesAccessed): Added.
* loader/CookieJar.cpp:
(WebCore::cookies): Pass Document as non-const so we can call 'setSecureCookiesAccessed' if necessary.
* loader/CookieJar.h:
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::canRunInsecureContent): Updated checks to avoid running insecure content
if secure cookies were accessed. 
* platform/CookiesStrategy.h:
(WebCore::CookiesStrategy::cookiesForDOM): Pass new argument indicating whether secure cookies should be included in the response.
* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
(copyCookiesForURLWithFirstPartyURL): Revise to accept new 'IncludeSecureCookiesOrNot' argument.
(WebCore::cookiesForSession): Updated to accept new 'IncludeSecureCookiesOrNot' argument. Also determine if secure cookies were
included in the response, and return this to the caller.
(WebCore::cookieRequestHeaderFieldValue): Revise for new 'copyCookiesForURLWithFirstPartyURL' signature.
(WebCore::getRawCookies): Ditto.
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession): Updated checks to keep track of secure cookies and filter out secure cookies if insecure content
was accessed.
(WebCore::cookiesForDOM): Update for new arguments and to return a pair.
(WebCore::cookieRequestHeaderFieldValue): Ditto.

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Pass new arguments needed by WebCore.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Updated the CookiesForDOM message with the new foundMixedContent
argument and the new didAccessSecureCookies reply.
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Drive-by fix to use the right message.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM): Check and return whether secure cookies were accessed. Accept a new argument
indicating whether secure cookies should be included in the response.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookiesForDOM): Check and return whether secure cookies were accessed. Accept a new argument
indicating whether secure cookies should be included in the response.

LayoutTests:

* http/tests/security/mixedContent/insecure-css-with-secure-cookies-expected.txt: Added.
* http/tests/security/mixedContent/insecure-css-with-secure-cookies.html: Added.
* http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies.html: Added.
* http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.
* http/tests/security/mixedContent/insecure-image-with-securecookie-block-expected.txt: Added.
* http/tests/security/mixedContent/insecure-image-with-securecookie-block.html: Added.
* http/tests/security/mixedContent/insecure-image-with-securecookie-expected.txt: Added.
* http/tests/security/mixedContent/insecure-image-with-securecookie.html: Added.
* http/tests/security/mixedContent/insecure-script-with-secure-cookies-expected.txt: Added.
* http/tests/security/mixedContent/insecure-script-with-secure-cookies.html: Added.
* http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block-expected.txt: Added.
* http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-block.html: Added.
* http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies-expected.txt: Added.
* http/tests/security/mixedContent/redirect-https-to-http-image-secure-cookies.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-css-secure-cookies.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-executable-css-with-secure-cookies.html: Added.
* http/tests/security/mixedContent/resources/frame-with-insecure-image-

[webkit-changes] [221033] trunk

2017-08-22 Thread bfulgham
Title: [221033] trunk








Revision 221033
Author bfulg...@apple.com
Date 2017-08-22 12:54:09 -0700 (Tue, 22 Aug 2017)


Log Message
Ensure media controls host exists before using it
https://bugs.webkit.org/show_bug.cgi?id=175833


Reviewed by Jer Noble.

Source/WebCore:

Although we ensure that the media controls shadow root exists before updating the text track
container, we don't check that the media controls host has been created yet. We do check
and create in other places in HTMLMediaElement.

Tests: media/track/track-display-before-controls-crash.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateTextTrackDisplay): 

LayoutTests:

* media/track/track-display-before-controls-crash-expected.txt: Added.
* media/track/track-display-before-controls-crash.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp


Added Paths

trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt
trunk/LayoutTests/media/track/track-display-before-controls-crash.html




Diff

Modified: trunk/LayoutTests/ChangeLog (221032 => 221033)

--- trunk/LayoutTests/ChangeLog	2017-08-22 19:22:48 UTC (rev 221032)
+++ trunk/LayoutTests/ChangeLog	2017-08-22 19:54:09 UTC (rev 221033)
@@ -1,3 +1,14 @@
+2017-08-22  Brent Fulgham  
+
+Ensure media controls host exists before using it
+https://bugs.webkit.org/show_bug.cgi?id=175833
+
+
+Reviewed by Jer Noble.
+
+* media/track/track-display-before-controls-crash-expected.txt: Added.
+* media/track/track-display-before-controls-crash.html: Added.
+
 2017-08-22  Chris Dumez  
 
Unreviewed, beacon/contentextensions is only expected to work on Sierra+.


Added: trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt (0 => 221033)

--- trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt	2017-08-22 19:54:09 UTC (rev 221033)
@@ -0,0 +1,9 @@
+Tests triggering track display before media controls are created. Test passes if it does not crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/media/track/track-display-before-controls-crash.html (0 => 221033)

--- trunk/LayoutTests/media/track/track-display-before-controls-crash.html	(rev 0)
+++ trunk/LayoutTests/media/track/track-display-before-controls-crash.html	2017-08-22 19:54:09 UTC (rev 221033)
@@ -0,0 +1,20 @@
+
+
+
+
+description("Tests triggering track display before media controls are created. Test passes if it does not crash.");
+
+
+
+
+
+
+
+Test Track 1
+
+
+
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (221032 => 221033)

--- trunk/Source/WebCore/ChangeLog	2017-08-22 19:22:48 UTC (rev 221032)
+++ trunk/Source/WebCore/ChangeLog	2017-08-22 19:54:09 UTC (rev 221033)
@@ -1,3 +1,20 @@
+2017-08-22  Brent Fulgham  
+
+Ensure media controls host exists before using it
+https://bugs.webkit.org/show_bug.cgi?id=175833
+
+
+Reviewed by Jer Noble.
+
+Although we ensure that the media controls shadow root exists before updating the text track
+container, we don't check that the media controls host has been created yet. We do check
+and create in other places in HTMLMediaElement.
+
+Tests: media/track/track-display-before-controls-crash.html
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::updateTextTrackDisplay): 
+
 2017-08-22  Youenn Fablet  
 
 [Cache API] Optimize whitespace trimming in Vary header values


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (221032 => 221033)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-08-22 19:22:48 UTC (rev 221032)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-08-22 19:54:09 UTC (rev 221033)
@@ -5967,6 +5967,8 @@
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
 ensureMediaControlsShadowRoot();
 ASSERT(m_mediaControlsHost);
+if (!m_mediaControlsHost)
+m_mediaControlsHost = MediaControlsHost::create(this);
 m_mediaControlsHost->updateTextTrackContainer();
 #else
 if (!hasMediaControls() && !createMediaControls())






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


[webkit-changes] [221034] trunk/LayoutTests

2017-08-22 Thread bfulgham
Title: [221034] trunk/LayoutTests








Revision 221034
Author bfulg...@apple.com
Date 2017-08-22 12:56:39 -0700 (Tue, 22 Aug 2017)


Log Message
Unreviewed test fix after r221017.

I forgot to check-in the expected result!

* http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.

Modified Paths

trunk/LayoutTests/ChangeLog


Added Paths

trunk/LayoutTests/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt




Diff

Modified: trunk/LayoutTests/ChangeLog (221033 => 221034)

--- trunk/LayoutTests/ChangeLog	2017-08-22 19:54:09 UTC (rev 221033)
+++ trunk/LayoutTests/ChangeLog	2017-08-22 19:56:39 UTC (rev 221034)
@@ -1,5 +1,13 @@
 2017-08-22  Brent Fulgham  
 
+Unreviewed test fix after r221017.
+
+I forgot to check-in the expected result!
+
+* http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt: Added.
+
+2017-08-22  Brent Fulgham  
+
 Ensure media controls host exists before using it
 https://bugs.webkit.org/show_bug.cgi?id=175833
 


Added: trunk/LayoutTests/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt (0 => 221034)

--- trunk/LayoutTests/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt	(rev 0)
+++ trunk/LayoutTests/http/tests/security/mixedContent/insecure-executable-css-with-secure-cookies-expected.txt	2017-08-22 19:56:39 UTC (rev 221034)
@@ -0,0 +1,12 @@
+main frame - didFinishDocumentLoadForFrame
+main frame - didStartProvisionalLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+main frame - didCommitLoadForFrame
+CONSOLE MESSAGE: line 6: secureCookie=yes
+CONSOLE MESSAGE: [blocked] The page at https://127.0.0.1:8443/security/mixedContent/resources/frame-with-insecure-executable-css-with-secure-cookies.html was not allowed to run insecure content from http://127.0.0.1:8080/security/resources/insecure.css.
+
+main frame - didFinishDocumentLoadForFrame
+main frame - didHandleOnloadEventsForFrame
+main frame - didFinishLoadForFrame
+This test opens a window that loads a secure style sheet with insecure content after reading secure cookies. This should block loading of the insecure content since secure cookie was read.






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


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

2017-08-22 Thread bfulgham
Title: [221035] trunk/Source/WebKitLegacy/win








Revision 221035
Author bfulg...@apple.com
Date 2017-08-22 13:09:38 -0700 (Tue, 22 Aug 2017)


Log Message
Unreviewed build fix after r221017.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM): Update for new signature.
* WebCoreSupport/WebPlatformStrategies.h:

Modified Paths

trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h




Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (221034 => 221035)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-22 19:56:39 UTC (rev 221034)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-22 20:09:38 UTC (rev 221035)
@@ -1,3 +1,11 @@
+2017-08-22  Brent Fulgham  
+
+Unreviewed build fix after r221017.
+
+* WebCoreSupport/WebPlatformStrategies.cpp:
+(WebPlatformStrategies::cookiesForDOM): Update for new signature.
+* WebCoreSupport/WebPlatformStrategies.h:
+
 2017-08-22  Alex Christensen  
 
 Remove ChromeClient::scrollbarsModeDidChange


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (221034 => 221035)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-22 19:56:39 UTC (rev 221034)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-22 20:09:38 UTC (rev 221035)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2011, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -70,9 +70,9 @@
 return new BlobRegistryImpl;
 }
 
-String WebPlatformStrategies::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
+std::pair WebPlatformStrategies::cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies includeSecureCookies) override
 {
-return WebCore::cookiesForDOM(session, firstParty, url);
+return WebCore::cookiesForDOM(session, firstParty, url, includeSecureCookies);
 }
 
 void WebPlatformStrategies::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieString)


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h (221034 => 221035)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h	2017-08-22 19:56:39 UTC (rev 221034)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h	2017-08-22 20:09:38 UTC (rev 221035)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2011, 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -45,7 +45,7 @@
 virtual WebCore::BlobRegistry* createBlobRegistry();
 
 // WebCore::CookiesStrategy
-virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
+std::pair cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies) override;
 virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
 virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
 virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);






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


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

2017-08-22 Thread bfulgham
Title: [221038] trunk/Source/WebKitLegacy/win








Revision 221038
Author bfulg...@apple.com
Date 2017-08-22 13:19:31 -0700 (Tue, 22 Aug 2017)


Log Message
Unreviewed build fix after r221017.

Correct copy/paste error.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookiesForDOM):

Modified Paths

trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp




Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (221037 => 221038)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-22 20:13:54 UTC (rev 221037)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-22 20:19:31 UTC (rev 221038)
@@ -2,7 +2,16 @@
 
 Unreviewed build fix after r221017.
 
+Correct copy/paste error.
+
 * WebCoreSupport/WebPlatformStrategies.cpp:
+(WebPlatformStrategies::cookiesForDOM):
+
+2017-08-22  Brent Fulgham  
+
+Unreviewed build fix after r221017.
+
+* WebCoreSupport/WebPlatformStrategies.cpp:
 (WebPlatformStrategies::cookiesForDOM): Update for new signature.
 * WebCoreSupport/WebPlatformStrategies.h:
 


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (221037 => 221038)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-22 20:13:54 UTC (rev 221037)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-22 20:19:31 UTC (rev 221038)
@@ -70,7 +70,7 @@
 return new BlobRegistryImpl;
 }
 
-std::pair WebPlatformStrategies::cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies includeSecureCookies) override
+std::pair WebPlatformStrategies::cookiesForDOM(const WebCore::NetworkStorageSession& session, const WebCore::URL& firstParty, const WebCore::URL& url, WebCore::IncludeSecureCookies includeSecureCookies)
 {
 return WebCore::cookiesForDOM(session, firstParty, url, includeSecureCookies);
 }






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


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

2017-08-22 Thread bfulgham
Title: [221050] trunk/Source/WebCore








Revision 221050
Author bfulg...@apple.com
Date 2017-08-22 14:54:40 -0700 (Tue, 22 Aug 2017)


Log Message
Correct SOUP and cURL builds after r221017.
https://bugs.webkit.org/show_bug.cgi?id=175846

Reviewed by Michael Catanzaro.

Correct the method signatures for 'cookiesForDOM' on the SOUP and cURL backends.
Note that these ports will need to add specific logic to find/filter secure cookies
if requested by the caller.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::CookieJarCurlFileSystem::cookiesForDOM):
(WebCore::cookiesForDOM):
* platform/network/curl/CookieJarCurl.h:
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookiesForDOM):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp
trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h
trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221049 => 221050)

--- trunk/Source/WebCore/ChangeLog	2017-08-22 21:37:59 UTC (rev 221049)
+++ trunk/Source/WebCore/ChangeLog	2017-08-22 21:54:40 UTC (rev 221050)
@@ -1,3 +1,21 @@
+2017-08-22  Brent Fulgham  
+
+Correct SOUP and cURL builds after r221017.
+https://bugs.webkit.org/show_bug.cgi?id=175846
+
+Reviewed by Michael Catanzaro.
+
+Correct the method signatures for 'cookiesForDOM' on the SOUP and cURL backends.
+Note that these ports will need to add specific logic to find/filter secure cookies
+if requested by the caller.
+
+* platform/network/curl/CookieJarCurl.cpp:
+(WebCore::CookieJarCurlFileSystem::cookiesForDOM):
+(WebCore::cookiesForDOM):
+* platform/network/curl/CookieJarCurl.h:
+* platform/network/soup/CookieJarSoup.cpp:
+(WebCore::cookiesForDOM):
+
 2017-08-22  Chris Dumez  
 
 [EnabledBySetting] in WebIDL uses Document but does not include Document.h


Modified: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp (221049 => 221050)

--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp	2017-08-22 21:37:59 UTC (rev 221049)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp	2017-08-22 21:54:40 UTC (rev 221050)
@@ -287,9 +287,10 @@
 return cookies;
 }
 
-String CookieJarCurlFileSystem::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
+std::pair CookieJarCurlFileSystem::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, IncludeSecureCookies)
 {
-return cookiesForSession(session, firstParty, url, false);
+// FIXME: This should filter secure cookies out if the caller requests it.
+return { cookiesForSession(session, firstParty, url, false), false };
 }
 
 String CookieJarCurlFileSystem::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
@@ -336,9 +337,9 @@
 
 // dispatcher functions
 
-String cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
+std::pair cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, IncludeSecureCookies includeSecureCookies)
 {
-return CurlContext::singleton().cookieJar().cookiesForDOM(session, firstParty, url);
+return CurlContext::singleton().cookieJar().cookiesForDOM(session, firstParty, url, includeSecureCookies);
 }
 
 void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& value)


Modified: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h (221049 => 221050)

--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h	2017-08-22 21:37:59 UTC (rev 221049)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h	2017-08-22 21:54:40 UTC (rev 221050)
@@ -28,7 +28,7 @@
 
 class CookieJarCurl {
 public:
-virtual String cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
+virtual std::pair cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, IncludeSecureCookies) = 0;
 virtual void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, const String&) = 0;
 virtual bool cookiesEnabled(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
 virtual String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
@@ -41,7 +41,7 @@
 };
 
 class CookieJarCurlFileSystem : public CookieJarCurl {
-String cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&) override;
+std::pair cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, IncludeSecureCookies) override;
 void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const URL&, const String&) override;
 bool cookiesEnabled(const NetworkStorageSession&, const URL& firstParty, co

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

2017-08-22 Thread bfulgham
Title: [221056] trunk/Source/WebCore








Revision 221056
Author bfulg...@apple.com
Date 2017-08-22 16:46:29 -0700 (Tue, 22 Aug 2017)


Log Message
Correct SOUP builds after r221017 and r221050.
https://bugs.webkit.org/show_bug.cgi?id=175846

Reviewed by Michael Catanzaro.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookiesForDOM): Revise return type.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (221055 => 221056)

--- trunk/Source/WebCore/ChangeLog	2017-08-22 23:15:05 UTC (rev 221055)
+++ trunk/Source/WebCore/ChangeLog	2017-08-22 23:46:29 UTC (rev 221056)
@@ -1,5 +1,15 @@
 2017-08-22  Brent Fulgham  
 
+Correct SOUP builds after r221017 and r221050.
+https://bugs.webkit.org/show_bug.cgi?id=175846
+
+Reviewed by Michael Catanzaro.
+
+* platform/network/soup/CookieJarSoup.cpp:
+(WebCore::cookiesForDOM): Revise return type.
+
+2017-08-22  Brent Fulgham  
+
 Correct SOUP and cURL builds after r221017.
 https://bugs.webkit.org/show_bug.cgi?id=175846
 


Modified: trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp (221055 => 221056)

--- trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp	2017-08-22 23:15:05 UTC (rev 221055)
+++ trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp	2017-08-22 23:46:29 UTC (rev 221056)
@@ -90,8 +90,8 @@
 
 std::pair cookiesForDOM(const NetworkStorageSession& session, const URL&, const URL& url, IncludeSecureCookies)
 {
-// FIXME: SOUP concept of secure cookies should be filtered here.
-return cookiesForSession(session, url, false);
+// FIXME(175850): SOUP concept of secure cookies should be filtered here.
+return { cookiesForSession(session, url, false), false };
 }
 
 String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& /*firstParty*/, const URL& url)






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


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

2017-08-22 Thread bfulgham
Title: [221061] trunk/Source/WebKit








Revision 221061
Author bfulg...@apple.com
Date 2017-08-22 18:05:22 -0700 (Tue, 22 Aug 2017)


Log Message
Relax keychain access to permit users to permanently allow client certificates
https://bugs.webkit.org/show_bug.cgi?id=175857


Reviewed by Alex Christensen.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (221060 => 221061)

--- trunk/Source/WebKit/ChangeLog	2017-08-23 00:32:55 UTC (rev 221060)
+++ trunk/Source/WebKit/ChangeLog	2017-08-23 01:05:22 UTC (rev 221061)
@@ -1,3 +1,14 @@
+2017-08-22  Brent Fulgham  
+
+Relax keychain access to permit users to permanently allow client certificates
+https://bugs.webkit.org/show_bug.cgi?id=175857
+
+
+Reviewed by Alex Christensen.
+
+* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2017-08-22  Chris Dumez  
 
 Introduce a new CompletionHandler type and use it for NetworkDataTaskClient's completion handlers to help catch bugs


Modified: trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in (221060 => 221061)

--- trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2017-08-23 00:32:55 UTC (rev 221060)
+++ trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2017-08-23 01:05:22 UTC (rev 221061)
@@ -165,7 +165,7 @@
 
 ;; FIXME: This should be removed when  is fixed.
 ;; Restrict AppSandboxed processes from creating /Library/Keychains, but allow access to the contents of /Library/Keychains:
-(allow file-read-data file-read-metadata file-write-data
+(allow file-read-data file-read-metadata file-write-create file-write-data
 (subpath "/Library/Keychains")
 (home-subpath "/Library/Keychains"))
 


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-08-23 00:32:55 UTC (rev 221060)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-08-23 01:05:22 UTC (rev 221061)
@@ -430,7 +430,7 @@
 
 ;; FIXME: This should be removed when  is fixed.
 ;; Restrict AppSandboxed processes from creating /Library/Keychains, but allow access to the contents of /Library/Keychains:
-(allow file-read-data file-read-metadata file-write-data
+(allow file-read-data file-read-metadata file-write-create file-write-data
 (subpath "/Library/Keychains"))
 
 ;; Do permit creating per-user keychains






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


[webkit-changes] [221077] trunk

2017-08-23 Thread bfulgham
Title: [221077] trunk








Revision 221077
Author bfulg...@apple.com
Date 2017-08-23 09:25:21 -0700 (Wed, 23 Aug 2017)


Log Message
Ensure media controls host exists before using it
https://bugs.webkit.org/show_bug.cgi?id=175833


Reviewed by Jer Noble.

Source/WebCore:

Although we ensure that the media controls shadow root exists before updating the text track
container, we don't check that the media controls host has been created yet. We do check
and create in other places in HTMLMediaElement.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateTextTrackDisplay): 

LayoutTests:

* media/track/track-display-before-controls-crash-expected.txt: Added.
* media/track/track-display-before-controls-crash.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/html/HTMLMediaElement.cpp


Added Paths

trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt
trunk/LayoutTests/media/track/track-display-before-controls-crash.html




Diff

Modified: trunk/LayoutTests/ChangeLog (221076 => 221077)

--- trunk/LayoutTests/ChangeLog	2017-08-23 16:21:43 UTC (rev 221076)
+++ trunk/LayoutTests/ChangeLog	2017-08-23 16:25:21 UTC (rev 221077)
@@ -1,3 +1,14 @@
+2017-08-23  Brent Fulgham  
+
+Ensure media controls host exists before using it
+https://bugs.webkit.org/show_bug.cgi?id=175833
+
+
+Reviewed by Jer Noble.
+
+* media/track/track-display-before-controls-crash-expected.txt: Added.
+* media/track/track-display-before-controls-crash.html: Added.
+
 2017-08-23  Carlos Alberto Lopez Perez  
 
 [WPE] Some event handlers not working.


Added: trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt (0 => 221077)

--- trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt	(rev 0)
+++ trunk/LayoutTests/media/track/track-display-before-controls-crash-expected.txt	2017-08-23 16:25:21 UTC (rev 221077)
@@ -0,0 +1,9 @@
+Tests triggering track display before media controls are created. Test passes if it does not crash.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/media/track/track-display-before-controls-crash.html (0 => 221077)

--- trunk/LayoutTests/media/track/track-display-before-controls-crash.html	(rev 0)
+++ trunk/LayoutTests/media/track/track-display-before-controls-crash.html	2017-08-23 16:25:21 UTC (rev 221077)
@@ -0,0 +1,20 @@
+
+
+
+
+description("Tests triggering track display before media controls are created. Test passes if it does not crash.");
+
+
+
+
+
+
+
+Test Track 1
+
+
+
+
+
+


Modified: trunk/Source/WebCore/ChangeLog (221076 => 221077)

--- trunk/Source/WebCore/ChangeLog	2017-08-23 16:21:43 UTC (rev 221076)
+++ trunk/Source/WebCore/ChangeLog	2017-08-23 16:25:21 UTC (rev 221077)
@@ -1,3 +1,18 @@
+2017-08-23  Brent Fulgham  
+
+Ensure media controls host exists before using it
+https://bugs.webkit.org/show_bug.cgi?id=175833
+
+
+Reviewed by Jer Noble.
+
+Although we ensure that the media controls shadow root exists before updating the text track
+container, we don't check that the media controls host has been created yet. We do check
+and create in other places in HTMLMediaElement.
+
+* html/HTMLMediaElement.cpp:
+(WebCore::HTMLMediaElement::updateTextTrackDisplay): 
+
 2017-08-23  Carlos Alberto Lopez Perez  
 
 [WPE] Some event handlers not working.


Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (221076 => 221077)

--- trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-08-23 16:21:43 UTC (rev 221076)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp	2017-08-23 16:25:21 UTC (rev 221077)
@@ -5966,7 +5966,8 @@
 {
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
 ensureMediaControlsShadowRoot();
-ASSERT(m_mediaControlsHost);
+if (!m_mediaControlsHost)
+m_mediaControlsHost = MediaControlsHost::create(this);
 m_mediaControlsHost->updateTextTrackContainer();
 #else
 if (!hasMediaControls() && !createMediaControls())






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


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

2017-08-25 Thread bfulgham
Title: [221202] trunk/Source/WebCore








Revision 221202
Author bfulg...@apple.com
Date 2017-08-25 13:10:51 -0700 (Fri, 25 Aug 2017)


Log Message
REGRESSION(r221017): Quip stuck in a perpetual loading loop
https://bugs.webkit.org/show_bug.cgi?id=175991


Reviewed by Daniel Bates.

This is a quick fix to return proper function to WebKit. I'll relate a follow-up fix that
addresses WebSockets more completely.

* platform/network/mac/CookieJarMac.mm:
(WebCore::cookieRequestHeaderFieldValue): Don't hard code a value of 'No' for returning secure
cookies. HTTPS connection should get secure cookies.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (221201 => 221202)

--- trunk/Source/WebCore/ChangeLog	2017-08-25 20:09:31 UTC (rev 221201)
+++ trunk/Source/WebCore/ChangeLog	2017-08-25 20:10:51 UTC (rev 221202)
@@ -1,3 +1,18 @@
+2017-08-25  Brent Fulgham  
+
+REGRESSION(r221017): Quip stuck in a perpetual loading loop
+https://bugs.webkit.org/show_bug.cgi?id=175991
+
+
+Reviewed by Daniel Bates.
+
+This is a quick fix to return proper function to WebKit. I'll relate a follow-up fix that
+addresses WebSockets more completely.
+
+* platform/network/mac/CookieJarMac.mm:
+(WebCore::cookieRequestHeaderFieldValue): Don't hard code a value of 'No' for returning secure
+cookies. HTTPS connection should get secure cookies.
+
 2017-08-25  Youenn Fablet  
 
 Add support for ReadableStream storage in FetchBody


Modified: trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm (221201 => 221202)

--- trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm	2017-08-25 20:09:31 UTC (rev 221201)
+++ trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm	2017-08-25 20:10:51 UTC (rev 221202)
@@ -178,7 +178,8 @@
 String cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
 {
 bool ignore = false;
-return cookiesForSession(session, firstParty, url, IncludeHTTPOnly, IncludeSecureCookies::No, ignore);
+auto includeSecureCookies = url.protocolIs("https") ? IncludeSecureCookies::Yes : IncludeSecureCookies::No;
+return cookiesForSession(session, firstParty, url, IncludeHTTPOnly, includeSecureCookies, ignore);
 }
 
 void setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const URL& url, const String& cookieStr)






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


[webkit-changes] [221275] trunk

2017-08-28 Thread bfulgham
Title: [221275] trunk








Revision 221275
Author bfulg...@apple.com
Date 2017-08-28 15:08:34 -0700 (Mon, 28 Aug 2017)


Log Message
Disable access to secure cookies if an HTTPS site loads mixed content (Part 2: Header Requests)
https://bugs.webkit.org/show_bug.cgi?id=175992


Reviewed by Daniel Bates.

Source/WebCore:

The original work in Bug 157053 did not properly handle the case of websockets. This patch completes
the changes to secure cookie handling to make sure websockets are also protected.

Tests: http/tests/websocket/tests/hybi/secure-cookie-insecure-connection.pl
   http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl

* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::clientHandshakeRequest): Remove 'const' declaration so we can work with
a mutable Document object. This allows us to mark the Document as having accessed secure cookies.
(WebCore::WebSocketChannel::clientHandshakeRequest const): Deleted.
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeMessage): Ditto.
(WebCore::WebSocketHandshake::clientHandshakeRequest): Ditto.
(WebCore::WebSocketHandshake::clientHandshakeMessage const): Deleted.
(WebCore::WebSocketHandshake::clientHandshakeRequest const): Deleted.
* Modules/websockets/WebSocketHandshake.h:
* loader/CookieJar.cpp:
(WebCore::cookies): Small naming cleanup.
(WebCore::cookieRequestHeaderFieldValue): Pass a flag indicating whether secure cookies should be
included in the result or not. Set the document flag indicating secure cookies were accessed (if
they were), and return the resulting cookie string.
* loader/CookieJar.h:
* platform/CookiesStrategy.h:
* platform/network/CacheValidation.cpp:
(WebCore::headerValueForVary): Revise to pass a flag indicating whether secure cookies should be included
or not.
* platform/network/PlatformCookieJar.h:
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::doesContainSecureCookies): Added helper method.
(WebCore::cookiesForDOM): Revise to use new helper function.
(WebCore::cookieRequestHeaderFieldValue): Revise to accept a flag indicating if secure cookies should
be included in the result. Return a pair consisting of the cookie string, and a flag indicating whether
secure cookies were accessed or not.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::CookieJarCurlFileSystem::cookieRequestHeaderFieldValue): Ditto.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
* platform/network/curl/CookieJarCurl.h:
* platform/network/mac/CookieJarMac.mm:
(WebCore::cookiesForSession): Ditto.
(WebCore::cookiesForDOM): Update for new 'cookiesForSession' signature.
(WebCore::cookieRequestHeaderFieldValue): Ditto.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::cookieRequestHeaderFieldValue): Revise to accept a flag indicating if secure cookies should
be included in the result. Return a pair consisting of the cookie string, and a flag indicating whether
secure cookies were accessed or not.

Source/WebKit:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM): Use a better label than 'result'.
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): Modify to accept a flag
indicating if secure cookies should be included, and return a pair containing the resulting
cookie string and a boolean indicating if secure cookies were accessed.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Ditto.
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Ditto.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): Ditto.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookieRequestHeaderFieldValue): Modify to accept a flag indicating if secure
cookies should be included, and return a pair containing the resulting cookie string and a boolean
indicating if secure cookies were accessed.

LayoutTests:

* http/tests/websocket/tests/hybi/secure-cookie-insecure-connection-expected.txt: Added.
* http/tests/websocket/tests/hybi/secure-cookie-insecure-connection.pl: Added.
* http/tests/websocket/tests/hybi/secure-cookie-secure-connection-expected.txt: Added.
* http/tests/websocket/tests/hybi/secure-cookie-secure-connection.pl: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp
trunk/Source/WebCore/Modules/websockets/WebSocketChannel.h
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.h
trunk/Source/WebCore/loader/CookieJar.cpp
trunk/Source/WebCore/loader/CookieJar.h
trunk/Source/WebCore/platform/CookiesStrategy.h
trunk/Source/

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

2017-08-28 Thread bfulgham
Title: [221278] trunk/Source/WebKitLegacy/win








Revision 221278
Author bfulg...@apple.com
Date 2017-08-28 15:46:02 -0700 (Mon, 28 Aug 2017)


Log Message
Unreviewed build fix after r221275.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookieRequestHeaderFieldValue): Correct return type and arguments
to match new API.

Modified Paths

trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp




Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (221277 => 221278)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-28 22:38:13 UTC (rev 221277)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-28 22:46:02 UTC (rev 221278)
@@ -1,3 +1,11 @@
+2017-08-28  Brent Fulgham  
+
+Unreviewed build fix after r221275.
+
+* WebCoreSupport/WebPlatformStrategies.cpp:
+(WebPlatformStrategies::cookieRequestHeaderFieldValue): Correct return type and arguments
+to match new API.
+
 2017-08-28  Per Arne Vollan  
 
 [Win] The test http/tests/misc/policy-delegate-called-twice.html is crashing.


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (221277 => 221278)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-28 22:38:13 UTC (rev 221277)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-28 22:46:02 UTC (rev 221278)
@@ -85,9 +85,9 @@
 return WebCore::cookiesEnabled(session, firstParty, url);
 }
 
-String WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url)
+std::pair WebPlatformStrategies::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const URL& url, WebCore::IncludeSecureCookies includeSecureCookies)
 {
-return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
+return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url, includeSecureCookies);
 }
 
 String WebPlatformStrategies::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const URL& url)






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


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

2017-08-28 Thread bfulgham
Title: [221289] trunk/Source/WebKitLegacy/win








Revision 221289
Author bfulg...@apple.com
Date 2017-08-28 21:33:36 -0700 (Mon, 28 Aug 2017)


Log Message
Unreviewed build fix #2 after r221275.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::cookieRequestHeaderFieldValue): Correct return type and arguments
to match new API.
* WebCoreSupport/WebPlatformStrategies.h: Update signatures.

Modified Paths

trunk/Source/WebKitLegacy/win/ChangeLog
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h




Diff

Modified: trunk/Source/WebKitLegacy/win/ChangeLog (221288 => 221289)

--- trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-29 02:59:18 UTC (rev 221288)
+++ trunk/Source/WebKitLegacy/win/ChangeLog	2017-08-29 04:33:36 UTC (rev 221289)
@@ -1,5 +1,14 @@
 2017-08-28  Brent Fulgham  
 
+Unreviewed build fix #2 after r221275.
+
+* WebCoreSupport/WebPlatformStrategies.cpp:
+(WebPlatformStrategies::cookieRequestHeaderFieldValue): Correct return type and arguments
+to match new API.
+* WebCoreSupport/WebPlatformStrategies.h: Update signatures.
+
+2017-08-28  Brent Fulgham  
+
 Unreviewed build fix after r221275.
 
 * WebCoreSupport/WebPlatformStrategies.cpp:


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (221288 => 221289)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-29 02:59:18 UTC (rev 221288)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp	2017-08-29 04:33:36 UTC (rev 221289)
@@ -90,10 +90,10 @@
 return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url, includeSecureCookies);
 }
 
-String WebPlatformStrategies::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const URL& url)
+std::pair WebPlatformStrategies::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const URL& url, WebCore::IncludeSecureCookies includeSecureCookies)
 {
 auto& session = sessionID.isEphemeral() ? WebFrameNetworkingContext::ensurePrivateBrowsingSession() : NetworkStorageSession::defaultStorageSession();
-return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url);
+return WebCore::cookieRequestHeaderFieldValue(session, firstParty, url, includeSecureCookies);
 }
 
 bool WebPlatformStrategies::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const URL& url, Vector& rawCookies)


Modified: trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h (221288 => 221289)

--- trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h	2017-08-29 02:59:18 UTC (rev 221288)
+++ trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.h	2017-08-29 04:33:36 UTC (rev 221289)
@@ -48,8 +48,8 @@
 std::pair cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies) override;
 virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, const String&);
 virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
-virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
-virtual String cookieRequestHeaderFieldValue(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&);
+std::pair cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies) override;
+std::pair cookieRequestHeaderFieldValue(PAL::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, WebCore::IncludeSecureCookies) override;
 virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector&);
 virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
 };






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


[webkit-changes] [221337] trunk

2017-08-29 Thread bfulgham
Title: [221337] trunk








Revision 221337
Author bfulg...@apple.com
Date 2017-08-29 19:54:31 -0700 (Tue, 29 Aug 2017)


Log Message
ResourceLoadStatistics logic does not understand custom WebsiteData stores
https://bugs.webkit.org/show_bug.cgi?id=176037


Reviewed by Alex Christensen.

Source/WebKit:

The NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains always notifies the default website
data store about observations it has made. This should be revised so that WebKit clients that register
custom data stores through the WKWebsiteDataStores API can be assured that observations made in one session
do not manipulate data from another session.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains): Use the passed sessionID to locate
the correct NetworkStorageSession to notify about the new partitioning data.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Accept new argument.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::updateCookiePartitioningForTopPrivatelyOwnedDomains): Include the WebsiteDataStore's
session ID in the message to update cookie partition data.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST): Update for ResourceLoadStatistics directories.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221336 => 221337)

--- trunk/Source/WebKit/ChangeLog	2017-08-30 02:40:03 UTC (rev 221336)
+++ trunk/Source/WebKit/ChangeLog	2017-08-30 02:54:31 UTC (rev 221337)
@@ -1,3 +1,25 @@
+2017-08-29  Brent Fulgham  
+
+ResourceLoadStatistics logic does not understand custom WebsiteData stores
+https://bugs.webkit.org/show_bug.cgi?id=176037
+
+
+Reviewed by Alex Christensen.
+
+The NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains always notifies the default website
+data store about observations it has made. This should be revised so that WebKit clients that register
+custom data stores through the WKWebsiteDataStores API can be assured that observations made in one session
+do not manipulate data from another session.
+
+* NetworkProcess/NetworkProcess.cpp:
+(WebKit::NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains): Use the passed sessionID to locate
+the correct NetworkStorageSession to notify about the new partitioning data.
+* NetworkProcess/NetworkProcess.h:
+* NetworkProcess/NetworkProcess.messages.in: Accept new argument.
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::updateCookiePartitioningForTopPrivatelyOwnedDomains): Include the WebsiteDataStore's
+session ID in the message to update cookie partition data.
+
 2017-08-29  Alex Christensen  
 
 Automatically determine if a class has a modern decoder


Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (221336 => 221337)

--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2017-08-30 02:40:03 UTC (rev 221336)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2017-08-30 02:54:31 UTC (rev 221337)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -319,9 +319,10 @@
 }
 
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
-void NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains(const Vector& domainsToRemove, const Vector& domainsToAdd,  bool shouldClearFirst)
+void NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains(PAL::SessionID sessionID, const Vector& domainsToRemove, const Vector& domainsToAdd,  bool shouldClearFirst)
 {
-NetworkStorageSession::defaultStorageSession().setShouldPartitionCookiesForHosts(domainsToRemove, domainsToAdd, shouldClearFirst);
+if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
+networkStorageSession->setShouldPartitionCookiesForHosts(domainsToRemove, domainsToAdd, shouldClearFirst);
 }
 #endif
 


Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (221336 => 221337)

--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h	2017-08-30 02:40:03 UT

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

2017-08-30 Thread bfulgham
Title: [221412] trunk/Source/WebKit








Revision 221412
Author bfulg...@apple.com
Date 2017-08-30 19:32:21 -0700 (Wed, 30 Aug 2017)


Log Message
Fix whitespace and formatting
https://bugs.webkit.org/show_bug.cgi?id=176134

Reviewed by Sam Weinig.

Bring the file formatting into compliance with WebKit Coding Style.

* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
(-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
(-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221411 => 221412)

--- trunk/Source/WebKit/ChangeLog	2017-08-31 02:02:12 UTC (rev 221411)
+++ trunk/Source/WebKit/ChangeLog	2017-08-31 02:32:21 UTC (rev 221412)
@@ -1,3 +1,24 @@
+2017-08-30  Brent Fulgham  
+
+Fix whitespace and formatting
+https://bugs.webkit.org/show_bug.cgi?id=176134
+
+Reviewed by Sam Weinig.
+
+Bring the file formatting into compliance with WebKit Coding Style.
+
+* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+(-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
+(-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
+(-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
+(-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
+(-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
+(-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
+(-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
+(-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
+(-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
+(-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
+
 2017-08-30  Youenn Fablet  
 
 Remove the list of removed caches from CacheStorageEngine


Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm (221411 => 221412)

--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm	2017-08-31 02:02:12 UTC (rev 221411)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm	2017-08-31 02:32:21 UTC (rev 221412)
@@ -44,38 +44,46 @@
 RetainPtr _resourceLoadStatisticsDirectoryURL;
 }
 
--(NSURL *)_webStorageDirectory {
+- (NSURL *)_webStorageDirectory
+{
 return _webStorageDirectoryURL.get();
 }
 
--(void)_setWebStorageDirectory:(NSURL *)url {
+- (void)_setWebStorageDirectory:(NSURL *)url
+{
 checkURLArgument(url);
 _webStorageDirectoryURL = adoptNS([url copy]);
 }
 
--(NSURL *)_indexedDBDatabaseDirectory {
+- (NSURL *)_indexedDBDatabaseDirectory
+{
 return _indexedDBDatabaseDirectoryURL.get();
 }
 
--(void)_setIndexedDBDatabaseDirectory:(NSURL *)url {
+- (void)_setIndexedDBDatabaseDirectory:(NSURL *)url
+{
 checkURLArgument(url);
 _indexedDBDatabaseDirectoryURL = adoptNS([url copy]);
 }
 
--(NSURL *)_webSQLDatabaseDirectory {
+- (NSURL *)_webSQLDatabaseDirectory
+{
 return _webSQLDatabaseDirectoryURL.get();
 }
 
--(void)_setWebSQLDatabaseDirectory:(NSURL *)url {
+- (void)_setWebSQLDatabaseDirectory:(NSURL *)url
+{
 checkURLArgument(url);
 _webSQLDatabaseDirectoryURL = adoptNS([url copy]);
 }
 
--(NSURL *)_cookieStorageFile {
+- (NSURL *)_cookieStorageFile
+{
 return _cookieStorageFileURL.get();
 }
 
--(void)_setCookieStorageFile:(NSURL *)url {
+- (void)_setCookieStorageFile:(NSURL *)url
+{
 checkURLArgument(url);
 if ([url hasDirectoryPath])
 [NSException raise:NSInvalidArgumentException format:@"The cookie storage path must point to a file, not a directory."];
@@ -83,11 +91,13 @@
 _cookieStorageFileURL = adoptNS([url copy]);
 }
 
--(NSURL *)_resourceLoadStatisticsDirectory {
+- (NSURL *)_resourceLoadStatisticsDirectory
+{
 return _resourceLoadStatisticsDirectoryURL.get();
 }
 
--(void)_setResourceLoadStatisticsDirectory:(NSURL *)url {
+- (void)_setResourceLoadStatisticsDirectory:(NSURL *)url
+{
 checkURLArgument(url);
 _resourceLoadStatisticsDirectoryURL = adoptNS([url copy]);
 }






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


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

2017-09-03 Thread bfulgham
Title: [221570] trunk/Source/WebKit








Revision 221570
Author bfulg...@apple.com
Date 2017-09-03 22:58:15 -0700 (Sun, 03 Sep 2017)


Log Message
[WK2][iOS] Remove unnecessary IOHIDEventServiceFastPathUserClient access
https://bugs.webkit.org/show_bug.cgi?id=175947


Reviewed by Darin Adler.

* 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 (221569 => 221570)

--- trunk/Source/WebKit/ChangeLog	2017-09-04 04:08:46 UTC (rev 221569)
+++ trunk/Source/WebKit/ChangeLog	2017-09-04 05:58:15 UTC (rev 221570)
@@ -1,3 +1,13 @@
+2017-09-03  Brent Fulgham  
+
+[WK2][iOS] Remove unnecessary IOHIDEventServiceFastPathUserClient access
+https://bugs.webkit.org/show_bug.cgi?id=175947
+
+
+Reviewed by Darin Adler.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2017-09-03  Dan Bernstein  
 
 WKContentViewInteraction.mm includes redundant declaration of UIPreviewItemController's presentationSecondaryGestureRecognizer


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-09-04 04:08:46 UTC (rev 221569)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-09-04 05:58:15 UTC (rev 221570)
@@ -111,9 +111,6 @@
 (allow mach-lookup
 (global-name "com.apple.coremedia.customurlloader.xpc"))
 
-(allow iokit-open
-(iokit-user-client-class "IOHIDEventServiceFastPathUserClient")) ; 
-
 ;; Media capture, microphone access
 (with-filter (extension "com.apple.webkit.microphone")
 (allow device-microphone))






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


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

2017-09-05 Thread bfulgham
Title: [221632] trunk/Source/WebKit








Revision 221632
Author bfulg...@apple.com
Date 2017-09-05 13:41:31 -0700 (Tue, 05 Sep 2017)


Log Message
Use a single network storage session for stateless connections
https://bugs.webkit.org/show_bug.cgi?id=176386


Reviewed by Alex Christensen.

Change the name of 'm_dataTaskMapWithoutCredentials' to 'm_dataTaskMapWithoutState'
to reflect that the data tasks do not involve credential or cookie storage. Ditto for
the change from 'm_sessionWIthoutCredentialStorage' to 'm_statelessSession'.

This update should not change behavior, unless some stateless sessions were depending
on cookies to be persistent (which would be a bug!)

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Update for new variable names.
(WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa): Ditto.
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Update the configuration to block
cookies as well.
(WebKit::NetworkSessionCocoa::invalidateAndCancel): Update for new names.
(WebKit::NetworkSessionCocoa::clearCredentials): Ditto.
(WebKit::NetworkSessionCocoa::dataTaskForIdentifier): Ditto.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (221631 => 221632)

--- trunk/Source/WebKit/ChangeLog	2017-09-05 20:19:30 UTC (rev 221631)
+++ trunk/Source/WebKit/ChangeLog	2017-09-05 20:41:31 UTC (rev 221632)
@@ -1,3 +1,29 @@
+2017-09-05  Brent Fulgham  
+
+Use a single network storage session for stateless connections
+https://bugs.webkit.org/show_bug.cgi?id=176386
+
+
+Reviewed by Alex Christensen.
+
+Change the name of 'm_dataTaskMapWithoutCredentials' to 'm_dataTaskMapWithoutState'
+to reflect that the data tasks do not involve credential or cookie storage. Ditto for
+the change from 'm_sessionWIthoutCredentialStorage' to 'm_statelessSession'.
+
+This update should not change behavior, unless some stateless sessions were depending
+on cookies to be persistent (which would be a bug!)
+
+* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Update for new variable names.
+(WebKit::NetworkDataTaskCocoa::~NetworkDataTaskCocoa): Ditto.
+* NetworkProcess/cocoa/NetworkSessionCocoa.h:
+* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+(WebKit::NetworkSessionCocoa::NetworkSessionCocoa): Update the configuration to block
+cookies as well.
+(WebKit::NetworkSessionCocoa::invalidateAndCancel): Update for new names.
+(WebKit::NetworkSessionCocoa::clearCredentials): Ditto.
+(WebKit::NetworkSessionCocoa::dataTaskForIdentifier): Ditto.
+
 2017-09-05  Yousuke Kimoto  
 
 [WinCairo] Add Network Process files for wincairo webkit


Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (221631 => 221632)

--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2017-09-05 20:19:30 UTC (rev 221631)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2017-09-05 20:41:31 UTC (rev 221632)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -116,9 +116,9 @@
 ASSERT(!cocoaSession.m_dataTaskMapWithCredentials.contains([m_task taskIdentifier]));
 cocoaSession.m_dataTaskMapWithCredentials.add([m_task taskIdentifier], this);
 } else {
-m_task = [cocoaSession.m_sessionWithoutCredentialStorage dataTaskWithRequest:nsRequest];
-ASSERT(!cocoaSession.m_dataTaskMapWithoutCredentials.contains([m_task taskIdentifier]));
-cocoaSession.m_dataTaskMapWithoutCredentials.add([m_task taskIdentifier], this);
+m_task = [cocoaSession.m_statelessSession dataTaskWithRequest:nsRequest];
+ASSERT(!cocoaSession.m_dataTaskMapWithoutState.contains([m_task taskIdentifier]));
+cocoaSession.m_dataTaskMapWithoutState.add([m_task taskIdentifier], this);
 }
 LOG(NetworkSession, "%llu Creating NetworkDataTask with URL %s", [m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
 
@@ -144,8 +144,8 @@
 ASSERT(cocoaSession.m_dataTaskMapWithCredentials.get([m_task taskIdentifier]) == this);
 cocoaSession.m_dataTaskMapWithCredentials.remove([m_task taskIdentifier]);
 } else {
-ASSERT(cocoaSession.m_dataTaskMapWithoutCredentials.get([m_task taskIdentifier]) == this);
-cocoaSession.m_dataTaskMapWith

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

2017-09-05 Thread bfulgham
Title: [221647] trunk/Source/WebKit








Revision 221647
Author bfulg...@apple.com
Date 2017-09-05 16:36:59 -0700 (Tue, 05 Sep 2017)


Log Message
Relax keychain access to permit users to permanently allow client certificates
https://bugs.webkit.org/show_bug.cgi?id=175857


Reviewed by Alex Christensen.

Further relax the write permissions on the user's Keychain directory to support local certificates.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (221646 => 221647)

--- trunk/Source/WebKit/ChangeLog	2017-09-05 23:33:49 UTC (rev 221646)
+++ trunk/Source/WebKit/ChangeLog	2017-09-05 23:36:59 UTC (rev 221647)
@@ -1,3 +1,16 @@
+2017-09-05  Brent Fulgham  
+
+Relax keychain access to permit users to permanently allow client certificates
+https://bugs.webkit.org/show_bug.cgi?id=175857
+
+
+Reviewed by Alex Christensen.
+
+Further relax the write permissions on the user's Keychain directory to support local certificates.
+
+* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2017-09-05  Youenn Fablet  
 
 Cache Storage Engine should not mix different origin caches


Modified: trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in (221646 => 221647)

--- trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2017-09-05 23:33:49 UTC (rev 221646)
+++ trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2017-09-05 23:36:59 UTC (rev 221647)
@@ -165,7 +165,7 @@
 
 ;; FIXME: This should be removed when  is fixed.
 ;; Restrict AppSandboxed processes from creating /Library/Keychains, but allow access to the contents of /Library/Keychains:
-(allow file-read-data file-read-metadata file-write-create file-write-data
+(allow file-read-data file-read-metadata file-write*
 (subpath "/Library/Keychains")
 (home-subpath "/Library/Keychains"))
 


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-09-05 23:33:49 UTC (rev 221646)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-09-05 23:36:59 UTC (rev 221647)
@@ -430,7 +430,7 @@
 
 ;; FIXME: This should be removed when  is fixed.
 ;; Restrict AppSandboxed processes from creating /Library/Keychains, but allow access to the contents of /Library/Keychains:
-(allow file-read-data file-read-metadata file-write-create file-write-data
+(allow file-read-data file-read-metadata file-write*
 (subpath "/Library/Keychains"))
 
 ;; Do permit creating per-user keychains






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


[webkit-changes] [221683] trunk

2017-09-06 Thread bfulgham
Title: [221683] trunk








Revision 221683
Author bfulg...@apple.com
Date 2017-09-06 10:30:50 -0700 (Wed, 06 Sep 2017)


Log Message
Deny third-party cookie creation for prevalent resources without interaction
https://bugs.webkit.org/show_bug.cgi?id=175232


Reviewed by Alex Christensen.

Source/WebCore:

Prior to Intelligent Tracking Prevention, WebKit would deny the ability to create a third party cookie if the user's
settings prohibited it. Due to the internal mechanics of cookie partitioning, we now accept the third party cookie,
but destroy it at some arbitrary moment which is difficult for websites to work with.

This patch revises WebKit so that attempts to set third party cookies without user interaction fails immediately,
which is what sites are expecting from Safari.

Tests: http/tests/loading/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::shouldPartitionCookies const): Revise for new naming.
(WebCore::NetworkStorageSession::shouldAllowThirdPartyCookies const): Allow third party cookies when the
user interaction property applies.
(WebCore::NetworkStorageSession::shouldBlockCookies const): Deny cookies for origins that are not allowed by
user interaction, and that are not being partitioned.
(WebCore::NetworkStorageSession::setPrevalentDomainsWithAndWithoutInteraction): Revise for new naming, and
to track prevalent origins with and without user interaction.
(WebCore::NetworkStorageSession::setShouldPartitionCookiesForHosts): Renamed to setPrevalentDomainsWithAndWithoutInteraction.
(WebCore::NetworkStorageSession::removePrevalentDomains): New helper function for testing.

Source/WebKit:

Prior to Intelligent Tracking Prevention, WebKit would deny the ability to create a third party cookie if the user's
settings prohibited it. Due to the internal mechanics of cookie partitioning, we now accept the third party cookie,
but destroy it at some arbitrary moment which is difficult for websites to work with.

This patch revises WebKit so that attempts to set third party cookies without user interaction fails immediately,
which is what sites are expecting from Safari.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::updatePrevalentDomainsWithAndWithoutInteraction):
(WebKit::NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains): Renamed to updatePrevalentDomainsWithAndWithoutInteraction.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Renamed the UpdateCookiePartitioningForTopPrivatelyOwnedDomains message
to UpdatePrevalentDomainsWithAndWithoutInteraction.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Recognize cases where a network session should block cookies, and
use the stateless session so we fail immediately when attempting an invalid cookie set operation.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(WebKit::WKWebsiteDataStore::_resourceLoadStatisticsSetShouldPartitionCookies): Use new helper function to clear partitioning state.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore): Update for revised naming.
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning): Track domains with and without interaction so that we can recognize
domains that should be immediately blocked from setting cookies.
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioningForDomains): Update for revised naming.
(WebKit::WebResourceLoadStatisticsStore::scheduleClearPartitioningStateForDomains): Added helper function for testing.
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::updatePrevalentDomainsWithAndWithoutInteraction): Update for revised naming.
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback): Ditto.
(WebKit::WebsiteDataStore::updateCookiePartitioningForTopPrivatelyOwnedDomains): Renamed to updatePrevalentDomainsWithAndWithoutInteraction.
* UIProcess/WebsiteData/WebsiteDataStore.h:

LayoutTests:

* http/tests/loading/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/third-party-cookie-with-and-without-user-interaction.html: Added.
* platform/mac-highsierra-wk2/TestExpectations: Add new test expectation.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/mac-highsierra-wk2/TestExpectations
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkPr

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

2018-01-10 Thread bfulgham
Title: [226742] trunk/Source/WebKit








Revision 226742
Author bfulg...@apple.com
Date 2018-01-10 16:06:55 -0800 (Wed, 10 Jan 2018)


Log Message
Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
https://bugs.webkit.org/show_bug.cgi?id=181452


Reviewed by Chris Dumez.

We forgot to use a 'protectedThis' back in r225006 for one of the lambdas used by
the WebsiteDataStore for processing.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (226741 => 226742)

--- trunk/Source/WebKit/ChangeLog	2018-01-10 23:41:36 UTC (rev 226741)
+++ trunk/Source/WebKit/ChangeLog	2018-01-11 00:06:55 UTC (rev 226742)
@@ -1,3 +1,17 @@
+2018-01-10  Brent Fulgham  
+
+Use protectedThis for the 'updatePrevalentDomainsToPartitionOrBlockCookies' lambda
+https://bugs.webkit.org/show_bug.cgi?id=181452
+
+
+Reviewed by Chris Dumez.
+
+We forgot to use a 'protectedThis' back in r225006 for one of the lambdas used by
+the WebsiteDataStore for processing.
+
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
+
 2018-01-09  John Wilander  
 
 Storage Access API: Turn feature on by default in WebPreferences.yaml


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (226741 => 226742)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2018-01-10 23:41:36 UTC (rev 226741)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2018-01-11 00:06:55 UTC (rev 226742)
@@ -1401,7 +1401,7 @@
 }
 
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
-m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(m_configuration.resourceLoadStatisticsDirectory, WTFMove(callback), [this] (const Vector& domainsToPartition, const Vector& domainsToBlock, const Vector& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst) {
+m_resourceLoadStatistics = WebResourceLoadStatisticsStore::create(m_configuration.resourceLoadStatisticsDirectory, WTFMove(callback), [this, protectedThis = makeRef(*this)] (const Vector& domainsToPartition, const Vector& domainsToBlock, const Vector& domainsToNeitherPartitionNorBlock, ShouldClearFirst shouldClearFirst) {
 updatePrevalentDomainsToPartitionOrBlockCookies(domainsToPartition, domainsToBlock, domainsToNeitherPartitionNorBlock, shouldClearFirst);
 }, [this, protectedThis = makeRef(*this)] (const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler&& callback) {
 hasStorageAccessForFrameHandler(resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));






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


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

2018-01-18 Thread bfulgham
Title: [227146] trunk/Source/WebKit








Revision 227146
Author bfulg...@apple.com
Date 2018-01-18 09:49:44 -0800 (Thu, 18 Jan 2018)


Log Message
REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
https://bugs.webkit.org/show_bug.cgi?id=181797


Reviewed by Eric Carlson.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for
'com.apple.lookup.shared' to support DataDetectors.

Modified Paths

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




Diff

Modified: trunk/Source/WebKit/ChangeLog (227145 => 227146)

--- trunk/Source/WebKit/ChangeLog	2018-01-18 17:37:28 UTC (rev 227145)
+++ trunk/Source/WebKit/ChangeLog	2018-01-18 17:49:44 UTC (rev 227146)
@@ -1,3 +1,14 @@
+2018-01-18  Brent Fulgham  
+
+REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
+https://bugs.webkit.org/show_bug.cgi?id=181797
+
+
+Reviewed by Eric Carlson.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for
+'com.apple.lookup.shared' to support DataDetectors.
+
 2018-01-17  John Wilander  
 
 Resource Load Statistics: Block cookies for prevalent resources without user interaction


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-18 17:37:28 UTC (rev 227145)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-18 17:49:44 UTC (rev 227146)
@@ -135,7 +135,9 @@
 ;  Weather(1038) deny file-read-data ~/Library/Preferences/com.apple.keyboard.plist
 "com.apple.keyboard"
 ; 
-"com.apple.Preferences")
+"com.apple.Preferences"
+"com.apple.lookup.shared" ; Needed for DataDetector (Spotlight) support
+)
 
 ;;  Need read access to /var/mobile/Library/Fonts to all apps
 (allow file-read*






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


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

2018-01-22 Thread bfulgham
Title: [227345] trunk/Source/WebKit








Revision 227345
Author bfulg...@apple.com
Date 2018-01-22 11:25:21 -0800 (Mon, 22 Jan 2018)


Log Message
[macOS, iOS] Allow accss to AVFoundation preference
https://bugs.webkit.org/show_bug.cgi?id=181937


Reviewed by Eric Carlson.

Grant access to the 'com.apple.avfoundation.frecents' preference.

* 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 (227344 => 227345)

--- trunk/Source/WebKit/ChangeLog	2018-01-22 19:16:52 UTC (rev 227344)
+++ trunk/Source/WebKit/ChangeLog	2018-01-22 19:25:21 UTC (rev 227345)
@@ -1,3 +1,16 @@
+2018-01-22  Brent Fulgham  
+
+[macOS, iOS] Allow accss to AVFoundation preference
+https://bugs.webkit.org/show_bug.cgi?id=181937
+
+
+Reviewed by Eric Carlson.
+
+Grant access to the 'com.apple.avfoundation.frecents' preference.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-01-22  Brady Eidson  
 
 In WebKit2, make the MessagePortChannelRegistry live in the UI process.


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-22 19:16:52 UTC (rev 227344)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-22 19:25:21 UTC (rev 227345)
@@ -312,6 +312,7 @@
 "com.apple.LaunchServices"
 "com.apple.WebFoundation"
 "com.apple.mobileipod"
+"com.apple.avfoundation.frecents" ;; 
 "com.apple.avfoundation.videoperformancehud" ;; 
 "com.apple.voiceservices.logging")
 


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-01-22 19:16:52 UTC (rev 227344)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-01-22 19:25:21 UTC (rev 227345)
@@ -457,6 +457,7 @@
 "com.apple.ServicesMenu.Services" ;; Needed for NSAttributedString 
 "com.apple.WebFoundation"
 "com.apple.avfoundation"
+"com.apple.avfoundation.frecents" ;; 
 "com.apple.avfoundation.videoperformancehud" ;; 
 "com.apple.coremedia"
 "com.apple.crypto"






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


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

2018-01-22 Thread bfulgham
Title: [227349] trunk/Source/WebKit








Revision 227349
Author bfulg...@apple.com
Date 2018-01-22 13:01:12 -0800 (Mon, 22 Jan 2018)


Log Message
[iOS] REGRESSION (r225763): Allow access to power logging features
https://bugs.webkit.org/show_bug.cgi?id=181938


Reviewed by Eric Carlson.

I denied access to the powerlog facility in r225763, not realizing that it
gets activated in certain logging scenarios. This patch reverts this 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 (227348 => 227349)

--- trunk/Source/WebKit/ChangeLog	2018-01-22 20:22:43 UTC (rev 227348)
+++ trunk/Source/WebKit/ChangeLog	2018-01-22 21:01:12 UTC (rev 227349)
@@ -1,5 +1,18 @@
 2018-01-22  Brent Fulgham  
 
+[iOS] REGRESSION (r225763): Allow access to power logging features
+https://bugs.webkit.org/show_bug.cgi?id=181938
+
+
+Reviewed by Eric Carlson.
+
+I denied access to the powerlog facility in r225763, not realizing that it
+gets activated in certain logging scenarios. This patch reverts this change.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
+2018-01-22  Brent Fulgham  
+
 [macOS, iOS] Allow accss to AVFoundation preference
 https://bugs.webkit.org/show_bug.cgi?id=181937
 


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-22 20:22:43 UTC (rev 227348)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-01-22 21:01:12 UTC (rev 227349)
@@ -128,6 +128,10 @@
 ;; 
 (allow mach-lookup (xpc-service-name-regex #"\.viewservice$"))
 
+;; Power logging
+(allow mach-lookup
+(global-name "com.apple.powerlog.plxpclogger.xpc")) ;;  
+
 (mobile-preferences-read
 "com.apple.EmojiPreferences"
 ;  com.apple.InputModePreferences






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


[webkit-changes] [227755] trunk/Source

2018-01-29 Thread bfulgham
Title: [227755] trunk/Source








Revision 227755
Author bfulg...@apple.com
Date 2018-01-29 14:00:58 -0800 (Mon, 29 Jan 2018)


Log Message
Add telemetry to track storage access API adoption
https://bugs.webkit.org/show_bug.cgi?id=182197


Reviewed by Chris Dumez.
Source/WebCore:


Part 1: Add telemetry for the user interaction case

This patch adds telemetry to track how frequently third-party cookies are
used in a first party context due to user interaction. This will help
understand cases where the new Storage Access API can help, and to help
us understand if we have considered relevant use cases in its design.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Let the observer
know the first party interaction duration.
(WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Added.
(WebCore::ResourceLoadObserver::logFrameNavigation): Note when a third party 
resource is accessed as a first party due to user interaction. 
(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::encode const): Handle new fields.
(WebCore::ResourceLoadStatistics::decode): Ditto.
* loader/ResourceLoadStatistics.h:

Source/WebKit:


Part 1: Add telemetry for the user interaction case

This patch adds telemetry to track how frequently third-party cookies are
used in a first party context due to user interaction. This will help
understand cases where the new Storage Access API can help, and to help
us understand if we have considered relevant use cases in its design.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::sortedPrevalentResourceTelemetry): Update for new telemetry.
(WebKit::submitTopList): Update for new data types.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Handle the partitioning time
passed from the UIProcess.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.h
trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp
trunk/Source/WebCore/loader/ResourceLoadStatistics.h
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/UIProcess/WebResourceLoadStatisticsTelemetry.cpp
trunk/Source/WebKit/WebProcess/WebProcess.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (227754 => 227755)

--- trunk/Source/WebCore/ChangeLog	2018-01-29 21:58:31 UTC (rev 227754)
+++ trunk/Source/WebCore/ChangeLog	2018-01-29 22:00:58 UTC (rev 227755)
@@ -1,3 +1,31 @@
+2018-01-29  Brent Fulgham  
+
+Add telemetry to track storage access API adoption
+https://bugs.webkit.org/show_bug.cgi?id=182197
+
+
+Reviewed by Chris Dumez.
+
+Part 1: Add telemetry for the user interaction case
+
+This patch adds telemetry to track how frequently third-party cookies are
+used in a first party context due to user interaction. This will help
+understand cases where the new Storage Access API can help, and to help
+us understand if we have considered relevant use cases in its design.
+
+* loader/ResourceLoadObserver.cpp:
+(WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Let the observer
+know the first party interaction duration.
+(WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Added.
+(WebCore::ResourceLoadObserver::logFrameNavigation): Note when a third party 
+resource is accessed as a first party due to user interaction. 
+(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
+* loader/ResourceLoadObserver.h:
+* loader/ResourceLoadStatistics.cpp:
+(WebCore::ResourceLoadStatistics::encode const): Handle new fields.
+(WebCore::ResourceLoadStatistics::decode): Ditto.
+* loader/ResourceLoadStatistics.h:
+
 2018-01-29  Antti Koivisto  
 
 CalcExpressionBlendLength::evaluate hits stack limit


Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (227754 => 227755)

--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-01-29 21:58:31 UTC (rev 227754)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-01-29 22:00:58 UTC (rev 227755)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source an

[webkit-changes] [227790] trunk/Source

2018-01-30 Thread bfulgham
Title: [227790] trunk/Source








Revision 227790
Author bfulg...@apple.com
Date 2018-01-30 09:44:41 -0800 (Tue, 30 Jan 2018)


Log Message
Add telemetry to track storage access API adoption
https://bugs.webkit.org/show_bug.cgi?id=182197


Reviewed by Chris Dumez.

Source/WebCore:

Partial roll-out of r227755.

The original patch assumed the WebContent process kept track of user interaction. This is
only tracked in the UIProcess, so we can get rid of some of the logging code adding in
r227755.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Deleted.
(WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Deleted.
* loader/ResourceLoadObserver.h:

Source/WebKit:

This patch also handled aggregating the counts in the UIProcess, which has access to
the right data.

The original patch assumed the WebContent process kept track of user interaction. This is
only tracked in the UIProcess, so we can get rid of some of the logging code adding in
r227755.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const): Rollout of r227755 changes not
needed to track the statistics.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::wasAccessedAsFirstPartyDueToUserInteraction): Moved from
the WebContent process, which does not keep track of user interaction.
(WebKit::WebResourceLoadStatisticsStore::mergeStatistics): Aggregate counts while processing
the statistics.
* UIProcess/WebResourceLoadStatisticsStore.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.h
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/UIProcess/WebResourceLoadStatisticsStore.cpp
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h
trunk/Source/WebKit/WebProcess/WebProcess.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (227789 => 227790)

--- trunk/Source/WebCore/ChangeLog	2018-01-30 17:21:49 UTC (rev 227789)
+++ trunk/Source/WebCore/ChangeLog	2018-01-30 17:44:41 UTC (rev 227790)
@@ -1,3 +1,24 @@
+2018-01-30  Brent Fulgham  
+
+Add telemetry to track storage access API adoption
+https://bugs.webkit.org/show_bug.cgi?id=182197
+
+
+Reviewed by Chris Dumez.
+
+Partial roll-out of r227755.
+
+The original patch assumed the WebContent process kept track of user interaction. This is
+only tracked in the UIProcess, so we can get rid of some of the logging code adding in
+r227755.
+
+* loader/ResourceLoadObserver.cpp:
+(WebCore::ResourceLoadObserver::logFrameNavigation):
+(WebCore::ResourceLoadObserver::logSubresourceLoading):
+(WebCore::ResourceLoadObserver::setTimeToLivePartitionFree): Deleted.
+(WebCore::ResourceLoadObserver::wasAccessedWithinInteractionWindow const): Deleted.
+* loader/ResourceLoadObserver.h:
+
 2018-01-30  Chris Dumez  
 
 Make sure we never create a WebSWClientConnection with an invalid sessionID


Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (227789 => 227790)

--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-01-30 17:21:49 UTC (rev 227789)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-01-30 17:44:41 UTC (rev 227790)
@@ -132,16 +132,6 @@
 return WallTime::fromRawSeconds(std::floor(time.secondsSinceEpoch() / timestampResolution) * timestampResolution.seconds());
 }
 
-void ResourceLoadObserver::setTimeToLivePartitionFree(Seconds value)
-{
-m_timeToLiveCookiePartitionFree = value;
-}
-
-bool ResourceLoadObserver::wasAccessedWithinInteractionWindow(const ResourceLoadStatistics& statistic) const
-{
-return WallTime::now() <= statistic.mostRecentUserInteractionTime + m_timeToLiveCookiePartitionFree;
-}
-
 void ResourceLoadObserver::logFrameNavigation(const Frame& frame, const Frame& topFrame, const ResourceRequest& newRequest, const URL& redirectUrl)
 {
 ASSERT(frame.document());
@@ -181,8 +171,6 @@
 && !(areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain))) {
 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
 targetStatistics.lastSeen = reduceTimeResolution(WallTime::now());
- 

[webkit-changes] [227860] trunk/Source

2018-01-30 Thread bfulgham
Title: [227860] trunk/Source








Revision 227860
Author bfulg...@apple.com
Date 2018-01-30 15:12:03 -0800 (Tue, 30 Jan 2018)


Log Message
Add telemetry to track storage access API adoption
https://bugs.webkit.org/show_bug.cgi?id=182197


Reviewed by Chris Dumez.

Part 2: Add telemetry for the Storage Access API case

Source/WebCore:

Adds a new convenience method to identify origin/page/frame combinations that
have been granted access to the Storage Access API. This is used for debug
logging in the NetworkProcess. It is not used in production builds.

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::hasStorageAccessForFrame const): Added.

Source/WebKit:

This change increments a counter when an origin is loaded in a first part context because
it was granted Storage Access API permissions.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::logCookieInformation const): Add logging to indicate
loads that happened with the Storage Access API enabled.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::requestStorageAccess): Increment counter for
loads using the new API.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (227859 => 227860)

--- trunk/Source/WebCore/ChangeLog	2018-01-30 23:05:57 UTC (rev 227859)
+++ trunk/Source/WebCore/ChangeLog	2018-01-30 23:12:03 UTC (rev 227860)
@@ -1,3 +1,21 @@
+2018-01-30  Brent Fulgham  
+
+Add telemetry to track storage access API adoption
+https://bugs.webkit.org/show_bug.cgi?id=182197
+
+
+Reviewed by Chris Dumez.
+
+Part 2: Add telemetry for the Storage Access API case
+
+Adds a new convenience method to identify origin/page/frame combinations that
+have been granted access to the Storage Access API. This is used for debug
+logging in the NetworkProcess. It is not used in production builds.
+
+* platform/network/NetworkStorageSession.h:
+* platform/network/cf/NetworkStorageSessionCFNet.cpp:
+(WebCore::NetworkStorageSession::hasStorageAccessForFrame const): Added.
+
 2018-01-30  Ryosuke Niwa  
 
 Release assert in updateLayout() via AXObjectCache::childrenChanged


Modified: trunk/Source/WebCore/platform/network/NetworkStorageSession.h (227859 => 227860)

--- trunk/Source/WebCore/platform/network/NetworkStorageSession.h	2018-01-30 23:05:57 UTC (rev 227859)
+++ trunk/Source/WebCore/platform/network/NetworkStorageSession.h	2018-01-30 23:12:03 UTC (rev 227860)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -99,6 +99,7 @@
 WEBCORE_EXPORT void setPrevalentDomainsToPartitionOrBlockCookies(const Vector& domainsToPartition, const Vector& domainsToBlock, const Vector& domainsToNeitherPartitionNorBlock, bool clearFirst);
 WEBCORE_EXPORT void removePrevalentDomains(const Vector& domains);
 WEBCORE_EXPORT bool hasStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID) const;
+WEBCORE_EXPORT bool hasStorageAccessForFrame(const ResourceRequest&, uint64_t frameID, uint64_t pageID) const;
 WEBCORE_EXPORT void grantStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID);
 WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID);
 WEBCORE_EXPORT void removeStorageAccessForAllFramesOnPage(uint64_t pageID);


Modified: trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp (227859 => 227860)

--- trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp	2018-01-30 23:05:57 UTC (rev 227859)
+++ trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp	2018-01-30 23:12:03 UTC (rev 227860)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -296,6 +296,14 @@
 return it2->value == resourceDomain;
 }
 
+bool NetworkStorageSession::hasStorageAccessForFrame(const ResourceRequest& request, uint64_t frameID, uint64_t pageID) const
+{
+if (!cookieStoragePartitioningEnabled)
+return false;
+
+return hasStorageAccess

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

2018-01-31 Thread bfulgham
Title: [227939] trunk/Source/WebKit








Revision 227939
Author bfulg...@apple.com
Date 2018-01-31 15:56:11 -0800 (Wed, 31 Jan 2018)


Log Message
REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
https://bugs.webkit.org/show_bug.cgi?id=182354


Reviewed by Ryosuke Niwa.

The Database process was renamed to Storage, but it's sandbox was not updated.

* Configurations/WebKit.xcconfig: Update for sandbox rename.
* DerivedSources.make: Ditto.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Removed.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Copied from Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
* StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Removed.
* StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Copied from StorageProcess/mac/com.apple.WebKit.Databases.sb.in.
* WebKit.xcodeproj/project.pbxproj: Update for sandbox rename.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/WebKit.xcconfig
trunk/Source/WebKit/DerivedSources.make
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb
trunk/Source/WebKit/StorageProcess/mac/com.apple.WebKit.Storage.sb.in


Removed Paths

trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb
trunk/Source/WebKit/StorageProcess/mac/com.apple.WebKit.Databases.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (227938 => 227939)

--- trunk/Source/WebKit/ChangeLog	2018-01-31 23:41:37 UTC (rev 227938)
+++ trunk/Source/WebKit/ChangeLog	2018-01-31 23:56:11 UTC (rev 227939)
@@ -1,3 +1,21 @@
+2018-01-31  Brent Fulgham  
+
+REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
+https://bugs.webkit.org/show_bug.cgi?id=182354
+
+
+Reviewed by Ryosuke Niwa.
+
+The Database process was renamed to Storage, but it's sandbox was not updated.
+
+* Configurations/WebKit.xcconfig: Update for sandbox rename.
+* DerivedSources.make: Ditto.
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Removed.
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Copied from Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb.
+* StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Removed.
+* StorageProcess/mac/com.apple.WebKit.Storage.sb.in: Copied from StorageProcess/mac/com.apple.WebKit.Databases.sb.in.
+* WebKit.xcodeproj/project.pbxproj: Update for sandbox rename.
+
 2018-01-31  Michael Catanzaro  
 
 REGRESSION(r227223): http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html, http/tests/resourceLoadStatistics/grandfathering.html timing out on GTK, WPE


Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (227938 => 227939)

--- trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-01-31 23:41:37 UTC (rev 227938)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig	2018-01-31 23:56:11 UTC (rev 227939)
@@ -71,7 +71,7 @@
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,mac/WebKit2.order;
 
 EXCLUDED_SOURCE_FILE_NAMES = Resources/ios/*;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.Databases.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb;
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = PluginProcessShim.dylib SecItemShim.dylib WebProcessShim.dylib *.pdf Resources/mac/* com.apple.WebKit.Storage.sb com.apple.WebKit.NetworkProcess.sb com.apple.WebProcess.sb com.apple.WebKit.plugin-common.sb PlugInSandboxProfiles/*.sb;
 
 INSTALLHDRS_SCRIPT_PHASE = YES;
 


Modified: trunk/Source/WebKit/DerivedSources.make (227938 => 227939)

--- trunk/Source/WebKit/DerivedSources.make	2018-01-31 23:41:37 UTC (rev 227938)
+++ trunk/Source/WebKit/DerivedSources.make	2018-01-31 23:56:11 UTC (rev 227939)
@@ -228,7 +228,7 @@
 
 SANDBOX_PROFILES = \
 	com.apple.WebProcess.sb \
-	com.apple.WebKit.Databases.sb \
+	com.apple.WebKit.Storage.sb \
 	com.apple.WebKit.plugin-common.sb \
 	com.apple.WebKit.NetworkProcess.sb
 


Deleted: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb (227938 => 227939)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb	2018-01-31 23:41:37 UTC (rev 227938)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb	2018-01-31 23:56:11 UTC (rev 227939)
@@ -1,45 +0,0 @@
-; Copyright (C) 2014 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 f

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

2018-01-31 Thread bfulgham
Title: [227941] trunk/Source/WebKit








Revision 227941
Author bfulg...@apple.com
Date 2018-01-31 16:03:05 -0800 (Wed, 31 Jan 2018)


Log Message
Follow-up to r227939.
https://bugs.webkit.org/show_bug.cgi?id=182354


Make sure the correct sandbox is used on iOS as well.

* StorageProcess/ios/StorageProcessIOS.mm:
(WebKit::StorageProcess::initializeSandbox):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/StorageProcess/ios/StorageProcessIOS.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (227940 => 227941)

--- trunk/Source/WebKit/ChangeLog	2018-02-01 00:00:45 UTC (rev 227940)
+++ trunk/Source/WebKit/ChangeLog	2018-02-01 00:03:05 UTC (rev 227941)
@@ -1,5 +1,16 @@
 2018-01-31  Brent Fulgham  
 
+Follow-up to r227939.
+https://bugs.webkit.org/show_bug.cgi?id=182354
+
+
+Make sure the correct sandbox is used on iOS as well.
+
+* StorageProcess/ios/StorageProcessIOS.mm:
+(WebKit::StorageProcess::initializeSandbox):
+
+2018-01-31  Brent Fulgham  
+
 REGRESSION(r220094): com.apple.WebKit.Storage lost its sandbox
 https://bugs.webkit.org/show_bug.cgi?id=182354
 


Modified: trunk/Source/WebKit/StorageProcess/ios/StorageProcessIOS.mm (227940 => 227941)

--- trunk/Source/WebKit/StorageProcess/ios/StorageProcessIOS.mm	2018-02-01 00:00:45 UTC (rev 227940)
+++ trunk/Source/WebKit/StorageProcess/ios/StorageProcessIOS.mm	2018-02-01 00:03:05 UTC (rev 227941)
@@ -53,7 +53,7 @@
 #if ENABLE_MANUAL_DATABASE_SANDBOXING
 // Need to override the default, because service has a different bundle ID.
 NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")];
-sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebKit.Databases" ofType:@"sb"]);
+sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebKit.Storage" ofType:@"sb"]);
 ChildProcess::initializeSandbox(parameters, sandboxParameters);
 #endif
 }






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


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

2018-02-01 Thread bfulgham
Title: [227991] trunk/Source/WebKit








Revision 227991
Author bfulg...@apple.com
Date 2018-02-01 16:54:43 -0800 (Thu, 01 Feb 2018)


Log Message
Improve NetworkResourceLogger to report blocked (versus non-partitioned) cookies
https://bugs.webkit.org/show_bug.cgi?id=182408


Reviewed by Chris Dumez.

Update the logging method to report blocked origins, rather than logging them as non-partitioned
loads that have no cookies or other content.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::logCookieInformation const):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (227990 => 227991)

--- trunk/Source/WebKit/ChangeLog	2018-02-02 00:40:31 UTC (rev 227990)
+++ trunk/Source/WebKit/ChangeLog	2018-02-02 00:54:43 UTC (rev 227991)
@@ -1,3 +1,17 @@
+2018-02-01  Brent Fulgham  
+
+Improve NetworkResourceLogger to report blocked (versus non-partitioned) cookies
+https://bugs.webkit.org/show_bug.cgi?id=182408
+
+
+Reviewed by Chris Dumez.
+
+Update the logging method to report blocked origins, rather than logging them as non-partitioned
+loads that have no cookies or other content.
+
+* NetworkProcess/NetworkResourceLoader.cpp:
+(WebKit::NetworkResourceLoader::logCookieInformation const):
+
 2018-02-01  David Kilzer  
 
 REGRESSION (r222824): UI process crashes in WebKit::WebBackForwardList::backItem const


Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (227990 => 227991)

--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2018-02-02 00:40:31 UTC (rev 227990)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp	2018-02-02 00:54:43 UTC (rev 227991)
@@ -717,10 +717,31 @@
 
 void NetworkResourceLoader::logCookieInformation() const
 {
+ASSERT(shouldLogCookieInformation());
+
 auto networkStorageSession = WebCore::NetworkStorageSession::storageSession(sessionID());
 ASSERT(networkStorageSession);
 
+#define LOCAL_LOG(str, ...) \
+RELEASE_LOG_IF_ALLOWED("logCookieInformation: pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ": " str, pageID(), frameID(), identifier(), ##__VA_ARGS__)
+
+auto escapeForJSON = [](String s) {
+return s.replace('\\', "").replace('"', "\\\"");
+};
+
 auto url = ""
+if (networkStorageSession->shouldBlockCookies(originalRequest())) {
+auto escapedURL = escapeForJSON(url.string());
+auto escapedReferrer = escapeForJSON(originalRequest().httpReferrer());
+
+LOCAL_LOG(R"({ "url": "%{public}s",)", escapedURL.utf8().data());
+LOCAL_LOG(R"(  "partition": "%{public}s",)", "BLOCKED");
+LOCAL_LOG(R"(  "hasStorageAccess": %{public}s,)", "false");
+LOCAL_LOG(R"(  "referer": "%{public}s",)", escapedReferrer.utf8().data());
+LOCAL_LOG(R"(  "cookies": []})");
+return;
+}
+
 auto partition = WebCore::URL(ParsedURLString, networkStorageSession->cookieStoragePartition(originalRequest(), frameID(), pageID()));
 bool hasStorageAccessForFrame = networkStorageSession->hasStorageAccessForFrame(originalRequest(), frameID(), pageID());
 
@@ -728,13 +749,6 @@
 bool result = WebCore::getRawCookies(*networkStorageSession, partition, url, frameID(), pageID(), cookies);
 
 if (result) {
-#define LOCAL_LOG(str, ...) \
-RELEASE_LOG_IF_ALLOWED("logCookieInformation: pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ": " str, pageID(), frameID(), identifier(), ##__VA_ARGS__)
-
-auto escapeForJSON = [](String s) {
-s.replace('\\', "").replace('"', "\\\"");
-return s;
-};
 auto escapedURL = escapeForJSON(url.string());
 auto escapedPartition = escapeForJSON(partition.string());
 auto escapedReferrer = escapeForJSON(originalRequest().httpReferrer());






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


[webkit-changes] [228111] trunk/Source

2018-02-05 Thread bfulgham
Title: [228111] trunk/Source








Revision 228111
Author bfulg...@apple.com
Date 2018-02-05 12:03:48 -0800 (Mon, 05 Feb 2018)


Log Message
Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
https://bugs.webkit.org/show_bug.cgi?id=182455


Reviewed by Chris Dumez.

Source/WebCore:

After this refactoring, a convenience method I added in r227860 is no longer needed.
This patch removes this dead code.

* platform/network/NetworkStorageSession.h: Export 'cookieStoragePartition' so it can
be used in WebKit.
* platform/network/cf/NetworkStorageSessionCFNet.cpp: 
(WebCore::NetworkStorageSession::hasStorageAccessForFrame): Deleted unused method.

Source/WebKit:

Refactor "logCookieInformation" so that it can be used for resource loads and DOM cookie
manipulation. Place the generally useful logic in a static method that can be invoked
from other places in the NetworkProcess.

Call the new refactored method from NetworkConnectionToWebProcess::setCookiesFromDOM so
we can perform logging there as well.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): Call the new logging method
(when enabled).
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::shouldLogCookieInformation): Changed to static method.
(WebKit::escapeForJSON): Made a static function so it could be shared between multiple
methods.
(WebKit::NetworkResourceLoader::logCookieInformation const): Refactor into two methods.
(WebKit::NetworkResourceLoader::logCookieInformation): Ditto.
(WebKit::NetworkResourceLoader::shouldLogCookieInformation const): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): Switch to user-enabled release logging
to track partitioning and blocking behavior.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/network/NetworkStorageSession.h
trunk/Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.h
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (228110 => 228111)

--- trunk/Source/WebCore/ChangeLog	2018-02-05 19:43:35 UTC (rev 228110)
+++ trunk/Source/WebCore/ChangeLog	2018-02-05 20:03:48 UTC (rev 228111)
@@ -1,3 +1,19 @@
+2018-02-02  Brent Fulgham  
+
+Improve NetworkResourceLoader logging so it can be used for 'setCookiesFromDOM'
+https://bugs.webkit.org/show_bug.cgi?id=182455
+
+
+Reviewed by Chris Dumez.
+
+After this refactoring, a convenience method I added in r227860 is no longer needed.
+This patch removes this dead code.
+
+* platform/network/NetworkStorageSession.h: Export 'cookieStoragePartition' so it can
+be used in WebKit.
+* platform/network/cf/NetworkStorageSessionCFNet.cpp: 
+(WebCore::NetworkStorageSession::hasStorageAccessForFrame): Deleted unused method.
+
 2018-02-05  Antti Koivisto  
 
 Make ASSERT_WITH_SECURITY_IMPLICATION in CachedResourceClientWalker::next a release assert


Modified: trunk/Source/WebCore/platform/network/NetworkStorageSession.h (228110 => 228111)

--- trunk/Source/WebCore/platform/network/NetworkStorageSession.h	2018-02-05 19:43:35 UTC (rev 228110)
+++ trunk/Source/WebCore/platform/network/NetworkStorageSession.h	2018-02-05 20:03:48 UTC (rev 228111)
@@ -101,11 +101,10 @@
 WEBCORE_EXPORT String cookieStoragePartition(const ResourceRequest&, std::optional frameID, std::optional pageID) const;
 WEBCORE_EXPORT bool shouldBlockCookies(const ResourceRequest&) const;
 bool shouldBlockCookies(const URL& firstPartyForCookies, const URL& resource) const;
-String cookieStoragePartition(const URL& firstPartyForCookies, const URL& resource, std::optional frameID, std::optional pageID) const;
+WEBCORE_EXPORT String cookieStoragePartition(const URL& firstPartyForCookies, const URL& resource, std::optional frameID, std::optional pageID) const;
 WEBCORE_EXPORT void setPrevalentDomainsToPartitionOrBlockCookies(const Vector& domainsToPartition, const Vector& domainsToBlock, const Vector& domainsToNeitherPartitionNorBlock, bool clearFirst);
 WEBCORE_EXPORT void removePrevalentDomains(const Vector& domains);
 WEBCORE_EXPORT bool hasStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID) const;
-WEBCORE_EXPORT bool hasStorageAccessForFrame(const ResourceRequest&, uint64_t frameID, uint64_t pageID) const;
 WEBCORE_EXPORT Vector getAllStorageAccessEntries() const;
 WEBCORE_EXPORT void grantStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID,

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

2018-02-05 Thread bfulgham
Title: [228135] trunk/Source/WebKit








Revision 228135
Author bfulg...@apple.com
Date 2018-02-05 15:31:22 -0800 (Mon, 05 Feb 2018)


Log Message
[iOS] Storage process is using the wrong sandbox profile filename
https://bugs.webkit.org/show_bug.cgi?id=182500


Reviewed by David Kilzer.

The iOS entitlements file was still referencing the old Databases sandbox profile, even though the
process has been renamed 'Storage'.

* Configurations/Databases-iOS.entitlements:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/Databases-iOS.entitlements




Diff

Modified: trunk/Source/WebKit/ChangeLog (228134 => 228135)

--- trunk/Source/WebKit/ChangeLog	2018-02-05 23:23:28 UTC (rev 228134)
+++ trunk/Source/WebKit/ChangeLog	2018-02-05 23:31:22 UTC (rev 228135)
@@ -1,3 +1,16 @@
+2018-02-05  Brent Fulgham  
+
+[iOS] Storage process is using the wrong sandbox profile filename
+https://bugs.webkit.org/show_bug.cgi?id=182500
+
+
+Reviewed by David Kilzer.
+
+The iOS entitlements file was still referencing the old Databases sandbox profile, even though the
+process has been renamed 'Storage'.
+
+* Configurations/Databases-iOS.entitlements:
+
 2018-02-05  Ryosuke Niwa  
 
 Add DoNotProcessIncomingMessagesWhenWaitingForSyncReply to GetPlugins and RootViewToScreen


Modified: trunk/Source/WebKit/Configurations/Databases-iOS.entitlements (228134 => 228135)

--- trunk/Source/WebKit/Configurations/Databases-iOS.entitlements	2018-02-05 23:23:28 UTC (rev 228134)
+++ trunk/Source/WebKit/Configurations/Databases-iOS.entitlements	2018-02-05 23:31:22 UTC (rev 228135)
@@ -4,7 +4,7 @@
 
 	seatbelt-profiles
 	
-		com.apple.WebKit.Databases
+		com.apple.WebKit.Storage
 	
 
 






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


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

2018-02-06 Thread bfulgham
Title: [228197] trunk/Source/WebKit








Revision 228197
Author bfulg...@apple.com
Date 2018-02-06 15:16:02 -0800 (Tue, 06 Feb 2018)


Log Message
[macOS] Correct sandbox violation triggered by Chase.com
https://bugs.webkit.org/show_bug.cgi?id=182519


Reviewed by Eric Carlson.

Hitting a sandbox violation when attempting to check status of IOAV*En/Decode support.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (228196 => 228197)

--- trunk/Source/WebKit/ChangeLog	2018-02-06 23:10:52 UTC (rev 228196)
+++ trunk/Source/WebKit/ChangeLog	2018-02-06 23:16:02 UTC (rev 228197)
@@ -1,3 +1,15 @@
+2018-02-06  Brent Fulgham  
+
+[macOS] Correct sandbox violation triggered by Chase.com
+https://bugs.webkit.org/show_bug.cgi?id=182519
+
+
+Reviewed by Eric Carlson.
+
+Hitting a sandbox violation when attempting to check status of IOAV*En/Decode support.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-02-06  Jeff Miller  
 
 Add WKNavigationDelegate SPI to tell the client when an insecure plug-in is blocked


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-06 23:10:52 UTC (rev 228196)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-06 23:16:02 UTC (rev 228197)
@@ -238,6 +238,7 @@
 (iokit-property-regex #"^IOAudioEngineNum(ActiveUserClients|SampleFramesPerBuffer)")
 (iokit-property "IOAudioSampleRate")
 (iokit-property "IOAudioStreamSampleFormatByteOrder")
+(iokit-property-regex #"^IOAV(.*)(De|En)code$")
 (iokit-property "IOBusyInterest")
 (iokit-property "IOCFPlugInTypes")
 (iokit-property "IOChildIndex")






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


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

2018-02-07 Thread bfulgham
Title: [228244] trunk/Source/WebKit








Revision 228244
Author bfulg...@apple.com
Date 2018-02-07 14:53:35 -0800 (Wed, 07 Feb 2018)


Log Message
Improve NetworkResourceLoader logging to capture redirect cases
https://bugs.webkit.org/show_bug.cgi?id=182573


Reviewed by Chris Dumez.

Add logging for cookie partitioning or blocking during redirects.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (228243 => 228244)

--- trunk/Source/WebKit/ChangeLog	2018-02-07 22:33:10 UTC (rev 228243)
+++ trunk/Source/WebKit/ChangeLog	2018-02-07 22:53:35 UTC (rev 228244)
@@ -1,3 +1,16 @@
+2018-02-07  Brent Fulgham  
+
+Improve NetworkResourceLoader logging to capture redirect cases
+https://bugs.webkit.org/show_bug.cgi?id=182573
+
+
+Reviewed by Chris Dumez.
+
+Add logging for cookie partitioning or blocking during redirects.
+
+* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
+
 2018-02-07  John Wilander  
 
 Restrict Referer to just the origin for third parties in private mode and third parties ITP blocks cookies for in regular mode


Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (228243 => 228244)

--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2018-02-07 22:33:10 UTC (rev 228243)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2018-02-07 22:53:35 UTC (rev 228244)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -328,8 +328,13 @@
 bool shouldBlockCookies = false;
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING)
 shouldBlockCookies = m_session->networkStorageSession().shouldBlockCookies(request);
+#if !RELEASE_LOG_DISABLED
+if (NetworkProcess::singleton().shouldLogCookieInformation())
+RELEASE_LOG_IF(m_session->sessionID().isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data());
+#else
 LOG(NetworkSession, "%llu %s cookies for redirect URL %s", [m_task taskIdentifier], (shouldBlockCookies ? "Blocking" : "Not blocking"), request.url().string().utf8().data());
 #endif
+#endif
 
 if (shouldBlockCookies || (m_session->sessionID().isEphemeral() && isThirdPartyRequest(request)))
 request.setExistingHTTPReferrerToOriginString();
@@ -340,7 +345,12 @@
 
 if (!shouldBlockCookies) {
 auto requiredStoragePartition = m_session->networkStorageSession().cookieStoragePartition(request, m_frameID, m_pageID);
+#if !RELEASE_LOG_DISABLED
+if (NetworkProcess::singleton().shouldLogCookieInformation())
+RELEASE_LOG_IF(m_session->sessionID().isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::willPerformHTTPRedirection::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: %s cookies for redirect URL %s", this, m_pageID, m_frameID, (unsigned long)[m_task taskIdentifier], (requiredStoragePartition.isEmpty() ? "Not partitioning" : "Partitioning"), request.url().string().utf8().data());
+#else
 LOG(NetworkSession, "%llu %s cookies for redirect URL %s", [m_task taskIdentifier], (requiredStoragePartition.isEmpty() ? "Not partitioning" : "Partitioning"), request.url().string().utf8().data());
+#endif
 applyCookiePartitioningPolicy(requiredStoragePartition, m_task.get()._storagePartitionIdentifier);
 }
 #endif






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


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

2018-02-09 Thread bfulgham
Title: [228334] trunk/Source/WebCore








Revision 228334
Author bfulg...@apple.com
Date 2018-02-09 11:19:41 -0800 (Fri, 09 Feb 2018)


Log Message
[macOS, iOS] Expose OS marketing version in UserAgent
https://bugs.webkit.org/show_bug.cgi?id=182629


Reviewed by Daniel Bates.

Revert back to dynamically reading the operating system marketing version
rather than using a hard-coded version.

* page/cocoa/UserAgent.mm:
(WebCore::systemMarketingVersionForUserAgentString):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/cocoa/UserAgent.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (228333 => 228334)

--- trunk/Source/WebCore/ChangeLog	2018-02-09 19:11:32 UTC (rev 228333)
+++ trunk/Source/WebCore/ChangeLog	2018-02-09 19:19:41 UTC (rev 228334)
@@ -1,3 +1,17 @@
+2018-02-09  Brent Fulgham  
+
+[macOS, iOS] Expose OS marketing version in UserAgent
+https://bugs.webkit.org/show_bug.cgi?id=182629
+
+
+Reviewed by Daniel Bates.
+
+Revert back to dynamically reading the operating system marketing version
+rather than using a hard-coded version.
+
+* page/cocoa/UserAgent.mm:
+(WebCore::systemMarketingVersionForUserAgentString):
+
 2018-02-08  Antoine Quint  
 
 [Web Animations] Refactor AnimationEffect and KeyframeEffect into AnimationEffectReadOnly, KeyframeEffectReadOnly and KeyframeEffect


Modified: trunk/Source/WebCore/page/cocoa/UserAgent.mm (228333 => 228334)

--- trunk/Source/WebCore/page/cocoa/UserAgent.mm	2018-02-09 19:11:32 UTC (rev 228333)
+++ trunk/Source/WebCore/page/cocoa/UserAgent.mm	2018-02-09 19:19:41 UTC (rev 228334)
@@ -26,6 +26,8 @@
 #import "config.h"
 #import "UserAgent.h"
 
+#import "SystemVersion.h"
+
 namespace WebCore {
 
 String systemMarketingVersionForUserAgentString()
@@ -33,11 +35,7 @@
 // Use underscores instead of dots because when we first added the Mac OS X version to the user agent string
 // we were concerned about old DHTML libraries interpreting "4." as Netscape 4. That's no longer a concern for us
 // but we're sticking with the underscores for compatibility with the format used by older versions of Safari.
-#if PLATFORM(MAC)
-return ASCIILiteral("10_13_4");
-#else
-return ASCIILiteral("11_3");
-#endif
+return [systemMarketingVersion() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
 }
 
 String userAgentBundleVersion()






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


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

2018-02-09 Thread bfulgham
Title: [228341] trunk/Source/WebKit








Revision 228341
Author bfulg...@apple.com
Date 2018-02-09 15:56:41 -0800 (Fri, 09 Feb 2018)


Log Message
Sandbox violating attempting to read log formatting preference file
https://bugs.webkit.org/show_bug.cgi?id=182648


Reviewed by Eric Carlson.

Various frameworks attempt to read logging format information from /usr/local/lib/log. The sandbox is blocking
this, generating log spam and preventing some logging features from working properly. We should allow read
access to this path.

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

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in
trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb
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 (228340 => 228341)

--- trunk/Source/WebKit/ChangeLog	2018-02-09 23:41:34 UTC (rev 228340)
+++ trunk/Source/WebKit/ChangeLog	2018-02-09 23:56:41 UTC (rev 228341)
@@ -1,3 +1,20 @@
+2018-02-09  Brent Fulgham  
+
+Sandbox violating attempting to read log formatting preference file
+https://bugs.webkit.org/show_bug.cgi?id=182648
+
+
+Reviewed by Eric Carlson.
+
+Various frameworks attempt to read logging format information from /usr/local/lib/log. The sandbox is blocking
+this, generating log spam and preventing some logging features from working properly. We should allow read
+access to this path.
+
+* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-02-08  Chris Dumez  
 
 There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld


Modified: trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in (228340 => 228341)

--- trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2018-02-09 23:41:34 UTC (rev 228340)
+++ trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2018-02-09 23:56:41 UTC (rev 228341)
@@ -110,6 +110,10 @@
 (subpath (param "WEBKIT2_FRAMEWORK_DIR")))
 (allow system-fsctl (fsctl-command (_IO "h" 47)))
 
+(allow file-read-data
+(literal "/usr/local/lib/log") ; 
+)
+
 ;; Sandbox extensions
 (define (apply-read-and-issue-extension op path-filter)
 (op file-read* path-filter)


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb (228340 => 228341)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-02-09 23:41:34 UTC (rev 228340)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-02-09 23:56:41 UTC (rev 228341)
@@ -66,6 +66,10 @@
 (allow-well-known-system-group-container-subpath-read
 "/systemgroup.com.apple.nsurlstoragedresources/Library/dafsaData.bin")
 
+(allow file-read-data
+(literal "/usr/local/lib/log") ; 
+)
+
 ;; Security framework
 (allow mach-lookup
 (global-name "com.apple.ocspd")


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-09 23:41:34 UTC (rev 228340)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-09 23:56:41 UTC (rev 228341)
@@ -370,6 +370,10 @@
 ;; Allow ManagedPreference access
 (allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist"))
 
+(allow file-read-data
+(literal "/usr/local/lib/log") ; 
+)
+
 ;; Allow mediaserverd to issue file extensions for the purposes of reading media
 (allow file-issue-extension (require-all
 (extension "com.apple.app-sandbox.read")


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-09 23:41:34 UTC (rev 228340)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-09 23:56:41 UTC (rev 228341)
@@ -439,6 +439,7 @@
 (home-subpath "/Library/Dictionaries"))
 
 (allow file-read-data
+(literal "/usr/local/lib/log") ; 
 ;; Needed for AES3 support
 (subpath "/Library/Audio/Plug-Ins/Components"))
 






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


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

2018-02-13 Thread bfulgham
Title: [228419] trunk/Source/WebKit








Revision 228419
Author bfulg...@apple.com
Date 2018-02-13 08:51:10 -0800 (Tue, 13 Feb 2018)


Log Message
[iOS] whitelist iokit-get-properties
https://bugs.webkit.org/show_bug.cgi?id=182722


Reviewed by Eric Carlson.

Update the iOS sandbox to block access to IOKit properties that are not needed for
legitimate WebContent process use. This brings the iOS sandbox in line with the
work done under macOS.

* 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 (228418 => 228419)

--- trunk/Source/WebKit/ChangeLog	2018-02-13 12:11:33 UTC (rev 228418)
+++ trunk/Source/WebKit/ChangeLog	2018-02-13 16:51:10 UTC (rev 228419)
@@ -1,3 +1,17 @@
+2018-02-13  Brent Fulgham  
+
+[iOS] whitelist iokit-get-properties
+https://bugs.webkit.org/show_bug.cgi?id=182722
+
+
+Reviewed by Eric Carlson.
+
+Update the iOS sandbox to block access to IOKit properties that are not needed for
+legitimate WebContent process use. This brings the iOS sandbox in line with the
+work done under macOS.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2018-02-12  John Wilander  
 
 Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-13 12:11:33 UTC (rev 228418)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-13 16:51:10 UTC (rev 228419)
@@ -311,6 +311,23 @@
 "kern.memorystatus_level"
 "vm.footprint_suspend"))
 
+(deny iokit-get-properties (with partial-symbolication))
+(allow iokit-get-properties
+(iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
+(iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI))")
+(iokit-property "BaseAddressAlignmentRequirement")
+(iokit-property-regex #"^DisplayPipe(PlaneBaseAlignment|StrideRequirements)")
+(iokit-property-regex #"^IOGL(|ES(|Metal))BundleName")
+(iokit-property "IOGLESDefaultUseMetal")
+(iokit-property "IOSurfaceAcceleratorCapabilitiesDict")
+(iokit-property-regex #"^MetalPlugin(Name|ClassName)")
+(iokit-property "emu")
+(iokit-property "hdcp-hoover-protocol")
+(iokit-property "iommu-present")
+(iokit-property "product-id")
+(iokit-property "software-behavior")
+)
+
 ;; Read-only preferences and data
 (mobile-preferences-read
 "com.apple.LaunchServices"






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


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

2018-02-14 Thread bfulgham
Title: [228466] trunk/Source/WebCore








Revision 228466
Author bfulg...@apple.com
Date 2018-02-14 10:07:17 -0800 (Wed, 14 Feb 2018)


Log Message
Confirm proper thread in UserGestureIndicator constructor
https://bugs.webkit.org/show_bug.cgi?id=175980

Reviewed by Daniel Bates.

Document is a main-thread object. If we enter the UserGestureIndicator constructor
on a non-main thread, we should ASSERT, not return silently.

* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/UserGestureIndicator.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (228465 => 228466)

--- trunk/Source/WebCore/ChangeLog	2018-02-14 17:47:15 UTC (rev 228465)
+++ trunk/Source/WebCore/ChangeLog	2018-02-14 18:07:17 UTC (rev 228466)
@@ -1,3 +1,16 @@
+2018-02-14  Brent Fulgham  
+
+Confirm proper thread in UserGestureIndicator constructor
+https://bugs.webkit.org/show_bug.cgi?id=175980
+
+Reviewed by Daniel Bates.
+
+Document is a main-thread object. If we enter the UserGestureIndicator constructor
+on a non-main thread, we should ASSERT, not return silently.
+
+* dom/UserGestureIndicator.cpp:
+(WebCore::UserGestureIndicator::UserGestureIndicator):
+
 2018-02-14  Zalan Bujtas  
 
 [RenderTreeBuilder] Remove redundant RenderTreeBuilder methods


Modified: trunk/Source/WebCore/dom/UserGestureIndicator.cpp (228465 => 228466)

--- trunk/Source/WebCore/dom/UserGestureIndicator.cpp	2018-02-14 17:47:15 UTC (rev 228465)
+++ trunk/Source/WebCore/dom/UserGestureIndicator.cpp	2018-02-14 18:07:17 UTC (rev 228466)
@@ -47,14 +47,10 @@
 }
 
 UserGestureIndicator::UserGestureIndicator(std::optional state, Document* document, UserGestureType gestureType, ProcessInteractionStyle processInteractionStyle)
+: m_previousToken { currentToken() }
 {
-// Silently ignore UserGestureIndicators on non main threads.
-if (!isMainThread())
-return;
+ASSERT(isMainThread());
 
-// It is only safe to use currentToken() on the main thread.
-m_previousToken = currentToken();
-
 if (state)
 currentToken() = UserGestureToken::create(state.value(), gestureType);
 
@@ -68,6 +64,7 @@
 
 UserGestureIndicator::UserGestureIndicator(RefPtr token)
 {
+// Silently ignore UserGestureIndicators on non main threads.
 if (!isMainThread())
 return;
 






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


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

2019-01-21 Thread bfulgham
Title: [240247] trunk/Source/WebKit








Revision 240247
Author bfulg...@apple.com
Date 2019-01-21 17:55:47 -0800 (Mon, 21 Jan 2019)


Log Message
Unreviewed test fix after r240243
Nhttps://bugs.webkit.org/show_bug.cgi?id=193660


The new ResourceLoadStatistics section of 'removeData' was incrementing the
pending callback count before deciding whether to send a message to delete
data. This left the count out-of-balance leading to the operation never
completing.

This patch also prevents sending a second message to the NetworkProcess
requesting data be deleted if the message was already sent in an earlier
section of the method (e.g., as typically happens when all website data
is being deleted).

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (240246 => 240247)

--- trunk/Source/WebKit/ChangeLog	2019-01-22 01:30:05 UTC (rev 240246)
+++ trunk/Source/WebKit/ChangeLog	2019-01-22 01:55:47 UTC (rev 240247)
@@ -1,5 +1,24 @@
 2019-01-21  Brent Fulgham  
 
+Unreviewed test fix after r240243
+Nhttps://bugs.webkit.org/show_bug.cgi?id=193660
+
+
+The new ResourceLoadStatistics section of 'removeData' was incrementing the
+pending callback count before deciding whether to send a message to delete
+data. This left the count out-of-balance leading to the operation never
+completing.
+
+This patch also prevents sending a second message to the NetworkProcess
+requesting data be deleted if the message was already sent in an earlier
+section of the method (e.g., as typically happens when all website data
+is being deleted).
+
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::removeData):
+
+2019-01-21  Brent Fulgham  
+
 Implement message handlers for NetworkProcess-based ResourceLoadStatistics
 https://bugs.webkit.org/show_bug.cgi?id=193556
 


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (240246 => 240247)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2019-01-22 01:30:05 UTC (rev 240246)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2019-01-22 01:55:47 UTC (rev 240247)
@@ -757,6 +757,7 @@
 }
 #endif
 
+bool didNotifyNetworkProcessToDeleteWebsiteData = false;
 auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataRemoval(dataTypes, !isPersistent());
 if (networkProcessAccessType != ProcessAccessType::None) {
 for (auto& processPool : processPools()) {
@@ -778,6 +779,7 @@
 processPool->networkProcess()->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator, processPool] {
 callbackAggregator->removePendingCallback();
 });
+didNotifyNetworkProcessToDeleteWebsiteData = true;
 }
 }
 
@@ -938,15 +940,15 @@
 // we do not need to re-grandfather old data.
 auto shouldGrandfather = ((monitoredTypesRaw & deletedTypesRaw) == monitoredTypesRaw) ? ShouldGrandfather::No : ShouldGrandfather::Yes;
 
-callbackAggregator->addPendingCallback();
-
 if (m_resourceLoadStatistics) {
+callbackAggregator->addPendingCallback();
 m_resourceLoadStatistics->scheduleClearInMemoryAndPersistent(modifiedSince, shouldGrandfather, [callbackAggregator] {
 callbackAggregator->removePendingCallback();
 });
-} else {
+} else if (!didNotifyNetworkProcessToDeleteWebsiteData) {
 for (auto& processPool : processPools()) {
 if (auto* process = processPool->networkProcess()) {
+callbackAggregator->addPendingCallback();
 process->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator] {
 callbackAggregator->removePendingCallback();
 });






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


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

2019-01-23 Thread bfulgham
Title: [240346] trunk/Source/WebKit








Revision 240346
Author bfulg...@apple.com
Date 2019-01-23 10:44:34 -0800 (Wed, 23 Jan 2019)


Log Message
REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32
https://bugs.webkit.org/show_bug.cgi?id=193723


Reviewed by David Kilzer.

The new code added in r240243 could attempt to submit telemetry after the relevant
WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility.

* NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (240345 => 240346)

--- trunk/Source/WebKit/ChangeLog	2019-01-23 18:39:37 UTC (rev 240345)
+++ trunk/Source/WebKit/ChangeLog	2019-01-23 18:44:34 UTC (rev 240346)
@@ -1,3 +1,17 @@
+2019-01-23  Brent Fulgham  
+
+REGRESSION (r240243): CrashTracer: WebKitTestRunnerApp at com.apple.WebKit: WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const + 32
+https://bugs.webkit.org/show_bug.cgi?id=193723
+
+
+Reviewed by David Kilzer.
+
+The new code added in r240243 could attempt to submit telemetry after the relevant
+WebResourceLoadStatisticsStore was destroyed. We should guard against this possibility.
+
+* NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp:
+(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
+
 2019-01-23  Antti Koivisto  
 
 [PSON] Flash on back navigation on Mac


Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp (240345 => 240346)

--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp	2019-01-23 18:39:37 UTC (rev 240345)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp	2019-01-23 18:44:34 UTC (rev 240346)
@@ -241,16 +241,19 @@
 }
 
 // Dispatch on the main thread to make sure the WebPageProxy we're using doesn't go away.
-RunLoop::main().dispatch([sortedPrevalentResources = WTFMove(sortedPrevalentResources), sortedPrevalentResourcesWithoutUserInteraction = WTFMove(sortedPrevalentResourcesWithoutUserInteraction), prevalentResourcesDaysSinceUserInteraction = WTFMove(prevalentResourcesDaysSinceUserInteraction), &resourceLoadStatisticsStore] () {
+RunLoop::main().dispatch([sortedPrevalentResources = WTFMove(sortedPrevalentResources), sortedPrevalentResourcesWithoutUserInteraction = WTFMove(sortedPrevalentResourcesWithoutUserInteraction), prevalentResourcesDaysSinceUserInteraction = WTFMove(prevalentResourcesDaysSinceUserInteraction), resourceLoadStatisticsStore = makeWeakPtr(resourceLoadStatisticsStore)] () {
+if (!resourceLoadStatisticsStore)
+return;
+
 auto webPageProxy = WebPageProxy::nonEphemeralWebPageProxy();
 if (!webPageProxy) {
 if (notifyPagesWhenTelemetryWasCaptured)
-notifyPages(0, 0, 0, resourceLoadStatisticsStore.store());
+notifyPages(0, 0, 0, resourceLoadStatisticsStore->store());
 return;
 }
 
 if (notifyPagesWhenTelemetryWasCaptured) {
-notifyPages(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, prevalentResourcesDaysSinceUserInteraction.size(), resourceLoadStatisticsStore.store());
+notifyPages(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, prevalentResourcesDaysSinceUserInteraction.size(), resourceLoadStatisticsStore->store());
 // The notify pages function is for testing so we don't need to do an actual submission.
 return;
 }
@@ -263,7 +266,7 @@
 if (prevalentResourcesDaysSinceUserInteraction.size() > 1)
 webPageProxy->logDiagnosticMessageWithValue(DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey(), "medianPrevalentResourcesWithUserInteractionDaysSinceUserInteraction"_s, median(prevalentResourcesDaysSinceUserInteraction), significantFiguresForLoggedValues, ShouldSample::No);
 
-submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, resourceLoadStatisticsStore.store());
+submitTopLists(sortedPrevalentResources, sortedPrevalentResourcesWithoutUserInteraction, resourceLoadStatisticsStore->store());
 });
 }
 






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


[webkit-changes] [240446] trunk

2019-01-24 Thread bfulgham
Title: [240446] trunk








Revision 240446
Author bfulg...@apple.com
Date 2019-01-24 13:09:37 -0800 (Thu, 24 Jan 2019)


Log Message
Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297


Reviewed by Alex Christensen.

Source/WebCore:

Trigger logging to the UIProcess when the ResourceLoadObserver is used in the NetworkProcess.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Notify NetworkProcess a connection was made to a resource.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback): Added.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Notify NetworkProcess of the load.
(WebCore::ResourceLoadObserver::logWebSocketLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): Ditto.

Source/WebKit:

This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
it off in the UIProcess. It also updates test infrastructure to work with this change
in architecture.

* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
(WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
(WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
(WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
* Webprocess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.

Tools:

* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): Simplify test configuration by
activating the message used to trigger the callback when it is set.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/websockets/WebSocket.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Tools/ChangeLog
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (240445 => 240446)

--- trunk/Source/WebCore/ChangeLog	2019-01-24 19:21:09 UTC (rev 240445)
+++ trunk/Source/WebCore/ChangeLog	2019-01-24 21:09:37 UTC (rev 240446)
@@ -1,3 +1,23 @@
+2019-01-24  Brent Fulgham  
+
+Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
+https://bugs.webkit.org/show_bug.cgi?id=193297
+
+
+Reviewed by Alex Christensen.
+
+Trigger logging to the UIProcess when the ResourceLoadObserv

[webkit-changes] [240498] trunk

2019-01-25 Thread bfulgham
Title: [240498] trunk








Revision 240498
Author bfulg...@apple.com
Date 2019-01-25 12:52:11 -0800 (Fri, 25 Jan 2019)


Log Message
Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297


Reviewed by Alex Christensen.

Source/WebCore:

Trigger logging to the UIProcess when the ResourceLoadObserver is used in the NetworkProcess.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Notify NetworkProcess a connection was made to a resource.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setLogWebSocketLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceLoadingNotificationCallback): Added.
(WebCore::ResourceLoadObserver::setLogSubresourceRedirectNotificationCallback): Added.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Notify NetworkProcess of the load.
(WebCore::ResourceLoadObserver::logWebSocketLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): Ditto.

Source/WebKit:

This patch activates the ResourceLoadStatistics code in the NetworkProcess, and turns
it off in the UIProcess. It also updates test infrastructure to work with this change
in architecture.

* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceLoading): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logSubresourceRedirect): Added.
(WebKit::ResourceLoadStatisticsMemoryStore::logWebSocketLoading): Added.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logSubresourceLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::logSubresourceRedirect): Added.
(WebKit::WebResourceLoadStatisticsStore::logWebSocketLoading): Added.
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCapForPrevalentResources): Deleted.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::logSubresourceLoading): Added.
(WebKit::NetworkConnectionToWebProcess::logSubresourceRedirect): Added.
(WebKit::NetworkConnectionToWebProcess::logWebSocketLoading): Added.
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkSession.cpp:
(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
(WebKit::WebsiteDataStore::enableResourceLoadStatisticsAndSetTestingCallback):
* Webprocess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Register new ResourceLoadObserver callbacks.

Tools:

* TestWebKitAPI/Tests/WebKit Cocoa/ResourceLoadStatistics.mm:
Revise tests to ensure a running NetworkProcess before attempting ResourceLoadStatistics operations.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback): Simplify test configuration by
activating the message used to trigger the callback when it is set.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/Modules/websockets/WebSocket.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadObserver.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp
trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.h
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
trunk/Source/WebKit/WebProcess/WebProcess.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm
trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp




Diff

Modifie

[webkit-changes] [240509] trunk/Tools

2019-01-25 Thread bfulgham
Title: [240509] trunk/Tools








Revision 240509
Author bfulg...@apple.com
Date 2019-01-25 14:21:38 -0800 (Fri, 25 Jan 2019)


Log Message
Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
https://bugs.webkit.org/show_bug.cgi?id=193297


Unreviewed test case fix.

These test cases require ResourceLoadStatistics to be active, so the feature must be turned on.
Previously, the default data store turned the feature on automatically, allowing these tests to pass.

* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(TEST):

Modified Paths

trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm




Diff

Modified: trunk/Tools/ChangeLog (240508 => 240509)

--- trunk/Tools/ChangeLog	2019-01-25 22:19:25 UTC (rev 240508)
+++ trunk/Tools/ChangeLog	2019-01-25 22:21:38 UTC (rev 240509)
@@ -1,3 +1,17 @@
+2019-01-25  Brent Fulgham  
+
+Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.
+https://bugs.webkit.org/show_bug.cgi?id=193297
+
+
+Unreviewed test case fix.
+
+These test cases require ResourceLoadStatistics to be active, so the feature must be turned on.
+Previously, the default data store turned the feature on automatically, allowing these tests to pass.
+
+* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
+(TEST):
+
 2019-01-25  Keith Rollin  
 
 Update existing .xcfilelists


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm (240508 => 240509)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm	2019-01-25 22:19:25 UTC (rev 240508)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm	2019-01-25 22:21:38 UTC (rev 240509)
@@ -57,11 +57,7 @@
 
 TEST(ResourceLoadStatistics, GrandfatherCallback)
 {
-// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
-auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-
 auto *dataStore = [WKWebsiteDataStore defaultDataStore];
-[dataStore _setResourceLoadStatisticsEnabled:NO];
 
 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
 NSURL *fileURL = [statisticsDirectoryURL URLByAppendingPathComponent:@"full_browsing_session_resourceLog.plist"];
@@ -77,6 +73,10 @@
 grandfatheredFlag = true;
 }];
 
+// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
+auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
+[dataStore _setResourceLoadStatisticsEnabled:YES];
+
 TestWebKitAPI::Util::run(&grandfatheredFlag);
 
 // Spin the runloop until the resource load statistics file has written to disk.
@@ -121,11 +121,7 @@
 
 TEST(ResourceLoadStatistics, ShouldNotGrandfatherOnStartup)
 {
-// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
-auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-
 auto *dataStore = [WKWebsiteDataStore defaultDataStore];
-[dataStore _setResourceLoadStatisticsEnabled:NO];
 
 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
 NSURL *targetURL = [statisticsDirectoryURL URLByAppendingPathComponent:@"full_browsing_session_resourceLog.plist"];
@@ -142,6 +138,10 @@
 callbackFlag = true;
 }];
 
+// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
+auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
+[dataStore _setResourceLoadStatisticsEnabled:YES];
+
 TestWebKitAPI::Util::run(&callbackFlag);
 }
 
@@ -152,11 +152,7 @@
 
 EXPECT_EQ((size_t)0, [sharedProcessPool _pluginProcessCount]);
 
-// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
-auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-
 auto *dataStore = [WKWebsiteDataStore defaultDataStore];
-[dataStore _setResourceLoadStatisticsEnabled:NO];
 
 NSURL *statisticsDirectoryURL = [NSURL fileURLWithPath:[@"~/Library/WebKit/TestWebKitAPI/WebsiteData/ResourceLoadStatistics" stringByExpandingTildeInPath] isDirectory:YES];
 NSURL *targetURL = [statisticsDirectoryURL URLByAppendingPathComponent:@"full_browsing_session_resourceLog.plist"];
@@ -173,6 +169,10 @@
 doneFlag = true;
 }];
 
+// We need an active NetworkProcess to perform ResourceLoadStatistics operations.
+auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
+[dataStore _setResourceLoadStatisticsEnabled:YES];
+
 TestWebKitAPI::U

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

2019-01-28 Thread bfulgham
Title: [240586] trunk/Source/WebKit








Revision 240586
Author bfulg...@apple.com
Date 2019-01-28 09:29:44 -0800 (Mon, 28 Jan 2019)


Log Message
Remove the UIProcess components of the ResourceLoadStatistics code
https://bugs.webkit.org/show_bug.cgi?id=193303


Reviewed by Chris Dumez.

Now that the ResourceLoadStatistics code is running in the NetworkProcess, we can get rid
of the UIProcess copies of these routines.

Tested by existing ResourceLoadStatistics and StorageAccess tests.

* NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::updateClientSideCookiesAgeCap):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::callHasStorageAccessForFrameHandler):
(WebKit::WebResourceLoadStatisticsStore::callGrantStorageAccessHandler):
(WebKit::WebResourceLoadStatisticsStore::removeAllStorageAccess):
(WebKit::WebResourceLoadStatisticsStore::setCacheMaxAgeCap):
(WebKit::WebResourceLoadStatisticsStore::callUpdatePrevalentDomainsToBlockCookiesForHandler):
(WebKit::WebResourceLoadStatisticsStore::callRemoveDomainsHandler):
(WebKit::WebResourceLoadStatisticsStore::logTestingEvent):
(WebKit::WebResourceLoadStatisticsStore::notifyResourceLoadStatisticsProcessed):
(WebKit::WebResourceLoadStatisticsStore::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores):
(WebKit::WebResourceLoadStatisticsStore::topPrivatelyControlledDomainsWithWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::sendDiagnosticMessageWithValue const):
(WebKit::WebResourceLoadStatisticsStore::notifyPageStatisticsTelemetryFinished const):
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Deleted.
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::setMaxStatisticsEntries):
(WebKit::WebsiteDataStore::setPruneEntriesDownTo):
(WebKit::WebsiteDataStore::setGrandfatheringTime):
(WebKit::WebsiteDataStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebsiteDataStore::dumpResourceLoadStatistics):
(WebKit::WebsiteDataStore::isPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResource):
(WebKit::WebsiteDataStore::setPrevalentResourceForDebugMode):
(WebKit::WebsiteDataStore::isVeryPrevalentResource):
(WebKit::WebsiteDataStore::setVeryPrevalentResource):
(WebKit::WebsiteDataStore::setShouldClassifyResourcesBeforeDataRecordsRemoval):
(WebKit::WebsiteDataStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubFrameUnder):
(WebKit::WebsiteDataStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebsiteDataStore::isRegisteredAsSubresourceUnder):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectTo):
(WebKit::WebsiteDataStore::setSubresourceUniqueRedirectFrom):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectTo):
(WebKit::WebsiteDataStore::setTopFrameUniqueRedirectFrom):
(WebKit::WebsiteDataStore::isRegisteredAsRedirectingTo):
(WebKit::WebsiteDataStore::clearPrevalentResource):
(WebKit::WebsiteDataStore::resetParametersToDefaultValues):
(WebKit::WebsiteDataStore::submitTelemetry):
(WebKit::WebsiteDataStore::scheduleClearInMemoryAndPersistent):
(WebKit::WebsiteDataStore::scheduleCookieBlockingUpdate):
(WebKit::WebsiteDataStore::scheduleStatisticsAndDataRecordsProcessing):
(WebKit::WebsiteDataStore::setLastSeen):
(WebKit::WebsiteDataStore::setNotifyPagesWhenDataRecordsWereScanned):
(WebKit::WebsiteDataStore::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::WebsiteDataStore::hasStorageAccess):
(WebKit::WebsiteDataStore::requestStorageAccess):
(WebKit::WebsiteDataStore::grantStorageAccess):
(WebKit::WebsiteDataStore::setTimeToLiveUserInteraction):
(WebKit::WebsiteDataStore::logUserInteraction):
(WebKit::WebsiteDataStore::hasHadUserInteraction):
(WebKit::WebsiteDataStore::clearUserInteraction):
(WebKit::WebsiteDataStore::setGrandfathered):
(WebKit::WebsiteDataStore::webProcessWillOpenConnection):
(WebKit::WebsiteDataStore::webProcessDidCloseConnection):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsDebugMode):
(WebKit::WebsiteDataStore::didCreateNetworkProcess):
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Deleted.
(WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Deleted.
(WebKit::WebsiteDataStore::setCacheMaxAgeCap): Deleted.
(WebKit::WebsiteDataStore::updatePrevalentDomainsToBlockCookiesFor): Deleted.
(WebKit::WebsiteDataStore::setAgeCapForClientSideCookies): Deleted.
(WebKit::WebsiteDataStore::hasStorageAccessForFrameHandler): Deleted.
(WebKit::WebsiteDataStore::grantStorageAccessHandler): Deleted.
(WebKit::WebsiteDataStore::removeAllStorageA

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

2019-01-28 Thread bfulgham
Title: [240602] trunk/Source/WebKit








Revision 240602
Author bfulg...@apple.com
Date 2019-01-28 14:34:22 -0800 (Mon, 28 Jan 2019)


Log Message
REGRESSION (r240498): Storage Access API prompts result is not remembered
https://bugs.webkit.org/show_bug.cgi?id=193922


Reviewed by Chris Dumez.

The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
that kept track of whether a successful user prompt had been encountered. This
patch corrects this codepath so the user is not prompted repeatedly after approving
use of the Storage Access API.

* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
const reference to allow the method to be called by the NetworkProcess.
* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
object, rather than jumping directly to the NetworkStorageSession.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (240601 => 240602)

--- trunk/Source/WebKit/ChangeLog	2019-01-28 22:12:32 UTC (rev 240601)
+++ trunk/Source/WebKit/ChangeLog	2019-01-28 22:34:22 UTC (rev 240602)
@@ -1,3 +1,24 @@
+2019-01-28  Brent Fulgham  
+
+REGRESSION (r240498): Storage Access API prompts result is not remembered
+https://bugs.webkit.org/show_bug.cgi?id=193922
+
+
+Reviewed by Chris Dumez.
+
+The refactoring in r240498 bypassed bookkeeping in ResourceLoadStatisticsMemoryStore
+that kept track of whether a successful user prompt had been encountered. This
+patch corrects this codepath so the user is not prompted repeatedly after approving
+use of the Storage Access API.
+
+* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:
+(WebKit::WebResourceLoadStatisticsStore::grantStorageAccess): Switch from Move operator to
+const reference to allow the method to be called by the NetworkProcess.
+* NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:
+* NetworkProcess/NetworkProcess.cpp:
+(WebKit::NetworkProcess::grantStorageAccess): Request access through the WebResourceLoadStatistics
+object, rather than jumping directly to the NetworkStorageSession.
+
 2019-01-28  Chris Dumez  
 
 Regression(PSON) Crash under WebPageProxy::didStartProgress()


Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp (240601 => 240602)

--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-01-28 22:12:32 UTC (rev 240601)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp	2019-01-28 22:34:22 UTC (rev 240602)
@@ -339,7 +339,7 @@
 });
 }
 
-void WebResourceLoadStatisticsStore::grantStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, bool userWasPromptedNow, CompletionHandler&& completionHandler)
+void WebResourceLoadStatisticsStore::grantStorageAccess(const String& subFrameHost, const String& topFrameHost, uint64_t frameID, uint64_t pageID, bool userWasPromptedNow, CompletionHandler&& completionHandler)
 {
 ASSERT(RunLoop::isMain());
 postTask([this, subFrameHost = crossThreadCopy(subFrameHost), topFrameHost = crossThreadCopy(topFrameHost), frameID, pageID, userWasPromptedNow, completionHandler = WTFMove(completionHandler)]() mutable {


Modified: trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h (240601 => 240602)

--- trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2019-01-28 22:12:32 UTC (rev 240601)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h	2019-01-28 22:34:22 UTC (rev 240602)
@@ -76,7 +76,7 @@
 void setShouldSubmitTelemetry(bool);
 
 void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, bool promptEnabled, CompletionHandler&&);
-void grantStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, bool userWasPromptedNow, CompletionHandler&&);
+void grantStorageAccess(const String& subFrameHost, const String& topFrameHost, uint64_t frameID, uint64_t pageID, bool userWasPromptedNow, CompletionHandler&&);
 void requestStorageAccessCallback(bool wasGranted, uint64_t contextId);
 
 void applicationWillTerminate();


Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (240601 => 240602)

--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2019-01-28 22:12:32 UTC (rev 240601)
+++ tru

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

2019-01-29 Thread bfulgham
Title: [240697] trunk/Source/WebCore








Revision 240697
Author bfulg...@apple.com
Date 2019-01-29 17:42:44 -0800 (Tue, 29 Jan 2019)


Log Message
Make sure we have a frame before trying to access its loader
https://bugs.webkit.org/show_bug.cgi?id=193985


Reviewed by Ryosuke Niwa.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (240696 => 240697)

--- trunk/Source/WebCore/ChangeLog	2019-01-30 01:42:43 UTC (rev 240696)
+++ trunk/Source/WebCore/ChangeLog	2019-01-30 01:42:44 UTC (rev 240697)
@@ -1,3 +1,14 @@
+2019-01-29  Brent Fulgham  
+
+Make sure we have a frame before trying to access its loader 
+https://bugs.webkit.org/show_bug.cgi?id=193985
+
+
+Reviewed by Ryosuke Niwa.
+
+* loader/ResourceLoadObserver.cpp:
+(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
+
 2019-01-29  Andy Estes  
 
 Try to fix the watchOS build.


Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (240696 => 240697)

--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2019-01-30 01:42:43 UTC (rev 240696)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2019-01-30 01:42:44 UTC (rev 240697)
@@ -214,11 +214,12 @@
 statistics.mostRecentUserInteractionTime = newTime;
 
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
-if (auto* opener = document.frame()->loader().opener()) {
-if (auto* openerDocument = opener->document()) {
-if (auto* openerFrame = openerDocument->frame()) {
-if (auto openerPageID = openerFrame->loader().client().pageID()) {
-requestStorageAccessUnderOpener(domain, openerPageID.value(), *openerDocument);
+if (auto* frame = document.frame()) {
+if (auto* opener = frame->loader().opener()) {
+if (auto* openerDocument = opener->document()) {
+if (auto* openerFrame = openerDocument->frame()) {
+if (auto openerPageID = openerFrame->loader().client().pageID())
+requestStorageAccessUnderOpener(domain, openerPageID.value(), *openerDocument);
 }
 }
 }






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


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

2017-12-04 Thread bfulgham
Title: [225508] trunk/Source/WebKit








Revision 225508
Author bfulg...@apple.com
Date 2017-12-04 17:11:52 -0800 (Mon, 04 Dec 2017)


Log Message
Don't force creation of process pool when enabling resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=180374


Reviewed by Alex Christensen.

Pass appropriate arguments to the 'processPool' accessor so that we only get the
set of existing process pools. We don't want to pay the cost of launching new
process pools just to set this flag. The flag will be properly set when the pools
are created as soon as a WebView is instantiated.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (225507 => 225508)

--- trunk/Source/WebKit/ChangeLog	2017-12-05 00:57:33 UTC (rev 225507)
+++ trunk/Source/WebKit/ChangeLog	2017-12-05 01:11:52 UTC (rev 225508)
@@ -1,3 +1,19 @@
+2017-12-04  Brent Fulgham  
+
+Don't force creation of process pool when enabling resource load statistics
+https://bugs.webkit.org/show_bug.cgi?id=180374
+
+
+Reviewed by Alex Christensen.
+
+Pass appropriate arguments to the 'processPool' accessor so that we only get the
+set of existing process pools. We don't want to pay the cost of launching new
+process pools just to set this flag. The flag will be properly set when the pools
+are created as soon as a WebView is instantiated.
+
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled):
+
 2017-12-04  David Quesada  
 
 Add a class for parsing application manifests


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (225507 => 225508)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-05 00:57:33 UTC (rev 225507)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-05 01:11:52 UTC (rev 225508)
@@ -1326,7 +1326,9 @@
 }
 
 m_resourceLoadStatistics = nullptr;
-for (auto& processPool : processPools())
+
+auto existingProcessPools = processPools(std::numeric_limits::max(), false);
+for (auto& processPool : existingProcessPools)
 processPool->setResourceLoadStatisticsEnabled(false);
 }
 






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


[webkit-changes] [225562] trunk

2017-12-05 Thread bfulgham
Title: [225562] trunk








Revision 225562
Author bfulg...@apple.com
Date 2017-12-05 17:59:53 -0800 (Tue, 05 Dec 2017)


Log Message
Limit user agent versioning to an upper bound
https://bugs.webkit.org/show_bug.cgi?id=180365


Reviewed by Joseph Pecoraro.

Source/WebCore:

Freeze the version reported as User Agent to OS 10.13.4 (OS 11.3 on iOS) and WebKit 605.1.15
for User Agent purposes.

Test: fast/dom/navigator-userAgent-frozen.html

* page/cocoa/UserAgent.h:
* page/cocoa/UserAgent.mm:
(WebCore::versionPredatesFreeze): Helper function. Returns true for Version 10.13.3 or older.
(WebCore::systemMarketingVersionForUserAgentString):
(WebCore::userAgentBundleVersion):
(WebCore::userVisibleWebKitBundleVersionFromFullVersion): Deleted.
(WebCore::userAgentBundleVersionFromFullVersionString): Deleted.
* page/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName): Don't take the WebKit bundle version
as an argument, or pass it to the user agent string generator.
* page/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName): Ditto.

Source/WebKit:

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::standardUserAgent): Don't pass the WebKit bundle version when
creatin the User Agent string.
(WebKit::webKitBundleVersionString): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::standardUserAgent): Ditto.
(WebKit::webKitBundleVersionString): Deleted.

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView _standardUserAgentWithApplicationName:]): Don't pass the WebKit bundle version when
creating the User Agent string.
(webKitBundleVersionString): Deleted.

LayoutTests:

* fast/dom/navigator-userAgent-frozen-expected.txt: Added.
* fast/dom/navigator-userAgent-frozen.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/page/cocoa/UserAgent.h
trunk/Source/WebCore/page/cocoa/UserAgent.mm
trunk/Source/WebCore/page/ios/UserAgentIOS.mm
trunk/Source/WebCore/page/mac/UserAgentMac.mm
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm


Added Paths

trunk/LayoutTests/fast/dom/navigator-userAgent-frozen-expected.txt
trunk/LayoutTests/fast/dom/navigator-userAgent-frozen.html




Diff

Modified: trunk/LayoutTests/ChangeLog (225561 => 225562)

--- trunk/LayoutTests/ChangeLog	2017-12-06 01:47:29 UTC (rev 225561)
+++ trunk/LayoutTests/ChangeLog	2017-12-06 01:59:53 UTC (rev 225562)
@@ -1,3 +1,14 @@
+2017-12-05  Brent Fulgham  
+
+Limit user agent versioning to an upper bound
+https://bugs.webkit.org/show_bug.cgi?id=180365
+
+
+Reviewed by Joseph Pecoraro.
+
+* fast/dom/navigator-userAgent-frozen-expected.txt: Added.
+* fast/dom/navigator-userAgent-frozen.html: Added.
+
 2017-12-05  Javier Fernandez  
 
 [css-grid] Update imported Web Platform Tests


Added: trunk/LayoutTests/fast/dom/navigator-userAgent-frozen-expected.txt (0 => 225562)

--- trunk/LayoutTests/fast/dom/navigator-userAgent-frozen-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/navigator-userAgent-frozen-expected.txt	2017-12-06 01:59:53 UTC (rev 225562)
@@ -0,0 +1,12 @@
+Confirm WebKit does not report versions above the frozen maximums.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Major version number is within bounds.
+PASS Minor version number is within bounds.
+PASS Tiny version number is within bounds.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/dom/navigator-userAgent-frozen.html (0 => 225562)

--- trunk/LayoutTests/fast/dom/navigator-userAgent-frozen.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/navigator-userAgent-frozen.html	2017-12-06 01:59:53 UTC (rev 225562)
@@ -0,0 +1,62 @@
+
+
+
+
+description("Confirm WebKit does not report versions above the frozen maximums.");
+
+
+
+
+function testVersion(userAgent)
+{
+var start = userAgent.indexOf("AppleWebKit/");
+if (start < 0) {
+testFailed("User agent did not contain WebKit version.");
+return;
+}
+
+start += 12;
+
+var end = userAgent.indexOf(" ", start);
+if (end < 0) {
+testFailed("Couldn't find end of the version string.");
+return;
+}
+
+var version = userAgent.substr(start, end - start);
+if (version == "") {
+testFailed("Malformed version string.");
+return;
+}
+
+var versionComponents = version.split('.');
+if (versionComponents[0] <= 605)
+testPassed("Major version number is within bounds.");
+else
+testFailed("Major version number is " + versionComponents[0]);
+
+if (versionComponents.length < 2)
+return;
+
+if (versionComponents[0] < 605 || versionComponents[1] <= 1)
+testPassed("M

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

2017-12-11 Thread bfulgham
Title: [225754] trunk/Source/WebKit








Revision 225754
Author bfulg...@apple.com
Date 2017-12-11 13:25:51 -0800 (Mon, 11 Dec 2017)


Log Message
[iOS] Don't import 'UIKit-apps.sb' to the WebContent process sandbox
https://bugs.webkit.org/show_bug.cgi?id=180610


Reviewed by Dean Jackson.

Stop including 'system.sb', and just include the portions of that sandbox that we
actually use in WebContent Process. This is the first step in some further sandbox
tightening.

* 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 (225753 => 225754)

--- trunk/Source/WebKit/ChangeLog	2017-12-11 20:10:03 UTC (rev 225753)
+++ trunk/Source/WebKit/ChangeLog	2017-12-11 21:25:51 UTC (rev 225754)
@@ -1,3 +1,17 @@
+2017-12-11  Brent Fulgham  
+
+[iOS] Don't import 'UIKit-apps.sb' to the WebContent process sandbox
+https://bugs.webkit.org/show_bug.cgi?id=180610
+
+
+Reviewed by Dean Jackson.
+
+Stop including 'system.sb', and just include the portions of that sandbox that we
+actually use in WebContent Process. This is the first step in some further sandbox
+tightening.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2017-12-11  Yusuke Suzuki  
 
 [WTF] Add Converter traits to StringHasher instead of function pointer


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-11 20:10:03 UTC (rev 225753)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-11 21:25:51 UTC (rev 225754)
@@ -1,4 +1,4 @@
-; Copyright (C) 2010-2015 Apple Inc. All rights reserved.
+; Copyright (C) 2010-2017 Apple Inc. All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, with or without
 ; modification, are permitted provided that the following conditions
@@ -27,8 +27,512 @@
 
 (deny mach-lookup (xpc-service-name-prefix ""))
 
-(import "UIKit-apps.sb")
+(import "common.sb")
 
+;;;
+;;; The following rules were originally contained in 'UIKit-apps.sb'. We are duplicating them here so we can
+;;; remove unneeded sandbox extensions.
+;;;
+
+;;;
+;;; Declare that the process hosts UI provided by another process.
+;;; (This could potentially be any application; see  and
+;;;   for details)
+;;;
+(define-once (remote-view-client)
+(allow mach-lookup
+(global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
+(global-name-regex #"^com\.apple\.uikit\.viewservice\..+")))
+
+;;;
+;;; Declare that the process serves UI that can be remotely-hosted by another process.
+;;;
+(define-once (remote-view-service)
+;; RemoteViewServices need to lookup their own accessility service in order to send
+;; the mach port to the hosting app.
+(allow mach-lookup
+(local-name "com.apple.iphone.axserver"))
+;; RemoteViewServices need to lookup the bundle identifier of the application hosting
+;; their views (see ).
+(allow mach-lookup
+(global-name "com.apple.springboard.backgroundappservices")))
+
+(define (uikit-app . rest)
+;;;  Allow UIKit apps access to com.apple.TextInput.preferences mach service
+(allow mach-lookup
+(global-name "com.apple.TextInput.preferences"))
+
+(allow mach-lookup
+(xpc-service-name "com.apple.siri.context.service"))
+
+;; Any UI could be remote-hosted.
+(remote-view-client)
+
+;; Any app could use ubiquity.
+(ubiquity-client)
+
+;; Any app can play audio & movies.
+(play-audio)
+(play-media)
+
+;; Any app can use ProgressKit
+(progresskit-client)
+
+(url-translation)
+
+;; For  All applications need to be able to access the com.apple.UIKit.KeyboardManagement running in backboardd
+;; renamed in  Rename com.apple.UIKit.KeyboardManagement
+(allow mach-lookup
+(global-name "com.apple.UIKit.KeyboardManagement")
+(global-name "com.apple.UIKit.KeyboardManagement.hosted"))
+
+;; For  Allow UIKit-based apps to access com.apple.remote-text-editing mach service
+;; and  REM: Allow UIKit-based apps to access com.apple.remote-input-limiting mach service
+(when tv?
+(allow mach-lookup
+(global-name "com.apple.remote-input-limiting")
+(global-name "com.apple.remote-text-editing")
+(global-name "com.apple.remote-text-editing-legacy")
+(global-name "com.apple.sharing.remote-text-editing")))
+
+;; For ApplicationScripting
+;;  ASProcessScriptEvent fails to obtain port for event return
+(allow mach-lookup
+(global-name "ScripterServer"))
+
+ 

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

2017-12-11 Thread bfulgham
Title: [225763] trunk/Source/WebKit








Revision 225763
Author bfulg...@apple.com
Date 2017-12-11 16:39:37 -0800 (Mon, 11 Dec 2017)


Log Message
[iOS] Remove unused services from WebContent Process sandbox
https://bugs.webkit.org/show_bug.cgi?id=180670

Reviewed by Eric Carlson.

Pare down the set of sandbox exceptions in the iOS WebContent process sandbox to just
those services actually in use:
1. Remove unused code.
2. Instead of defining a 'UIKit-app' function and calling it, just declare the individual sandbox
commands inline. This will allow them to be more easily consolidated with other parts of the
sandbox in a future step.

This update should not change behavior.

* 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 (225762 => 225763)

--- trunk/Source/WebKit/ChangeLog	2017-12-12 00:28:59 UTC (rev 225762)
+++ trunk/Source/WebKit/ChangeLog	2017-12-12 00:39:37 UTC (rev 225763)
@@ -1,3 +1,21 @@
+2017-12-11  Brent Fulgham  
+
+[iOS] Remove unused services from WebContent Process sandbox
+https://bugs.webkit.org/show_bug.cgi?id=180670
+
+Reviewed by Eric Carlson.
+
+Pare down the set of sandbox exceptions in the iOS WebContent process sandbox to just
+those services actually in use:
+1. Remove unused code.
+2. Instead of defining a 'UIKit-app' function and calling it, just declare the individual sandbox
+commands inline. This will allow them to be more easily consolidated with other parts of the
+sandbox in a future step.
+
+This update should not change behavior.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2017-12-11  Chris Dumez  
 
 Merge ServiceWorkerClientIdentifier into ServiceWorkerClientData


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-12 00:28:59 UTC (rev 225762)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-12 00:39:37 UTC (rev 225763)
@@ -34,507 +34,369 @@
 ;;; remove unneeded sandbox extensions.
 ;;;
 
-;;;
-;;; Declare that the process hosts UI provided by another process.
-;;; (This could potentially be any application; see  and
-;;;   for details)
-;;;
-(define-once (remote-view-client)
-(allow mach-lookup
-(global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
-(global-name-regex #"^com\.apple\.uikit\.viewservice\..+")))
+;;;  Allow UIKit apps access to com.apple.TextInput.preferences mach service
+(allow mach-lookup
+(global-name "com.apple.TextInput.preferences"))
 
-;;;
-;;; Declare that the process serves UI that can be remotely-hosted by another process.
-;;;
-(define-once (remote-view-service)
-;; RemoteViewServices need to lookup their own accessility service in order to send
-;; the mach port to the hosting app.
-(allow mach-lookup
-(local-name "com.apple.iphone.axserver"))
-;; RemoteViewServices need to lookup the bundle identifier of the application hosting
-;; their views (see ).
-(allow mach-lookup
-(global-name "com.apple.springboard.backgroundappservices")))
+(allow mach-lookup
+(xpc-service-name "com.apple.siri.context.service"))
 
-(define (uikit-app . rest)
-;;;  Allow UIKit apps access to com.apple.TextInput.preferences mach service
-(allow mach-lookup
-(global-name "com.apple.TextInput.preferences"))
+(allow mach-lookup
+(global-name "com.apple.frontboard.systemappservices") ; -[UIViewServiceInterface _createProcessAssertion] -> SBSProcessIDForDisplayIdentifier()
+(global-name-regex #"^com\.apple\.uikit\.viewservice\..+"))
 
-(allow mach-lookup
-(xpc-service-name "com.apple.siri.context.service"))
+;; Any app could use ubiquity.
+(ubiquity-client)
 
-;; Any UI could be remote-hosted.
-(remote-view-client)
+;; Any app can play audio & movies.
+(play-audio)
+(play-media)
 
-;; Any app could use ubiquity.
-(ubiquity-client)
+(url-translation)
 
-;; Any app can play audio & movies.
-(play-audio)
-(play-media)
+;; For  All applications need to be able to access the com.apple.UIKit.KeyboardManagement running in backboardd
+;; renamed in  Rename com.apple.UIKit.KeyboardManagement
+(allow mach-lookup
+(global-name "com.apple.UIKit.KeyboardManagement")
+(global-name "com.apple.UIKit.KeyboardManagement.hosted"))
 
-;; Any app can use ProgressKit
-(progresskit-client)
-
-(url-translation)
-
-;; For  All applications need to be able to access the com.apple.UIKit.KeyboardManagement running in ba

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

2017-12-12 Thread bfulgham
Title: [225795] trunk/Source/WebKit








Revision 225795
Author bfulg...@apple.com
Date 2017-12-12 11:52:41 -0800 (Tue, 12 Dec 2017)


Log Message
REGRESSION(r216941): Plugin Process can't access AppStore Plugin Service
https://bugs.webkit.org/show_bug.cgi?id=180701


Reviewed by Daniel Bates.

The PluginProcess needs access to the AppStore Plugin XPC service.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (225794 => 225795)

--- trunk/Source/WebKit/ChangeLog	2017-12-12 19:40:40 UTC (rev 225794)
+++ trunk/Source/WebKit/ChangeLog	2017-12-12 19:52:41 UTC (rev 225795)
@@ -1,3 +1,15 @@
+2017-12-12  Brent Fulgham  
+
+REGRESSION(r216941): Plugin Process can't access AppStore Plugin Service
+https://bugs.webkit.org/show_bug.cgi?id=180701
+
+
+Reviewed by Daniel Bates.
+
+The PluginProcess needs access to the AppStore Plugin XPC service.
+
+* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
+
 2017-12-12  Brady Eidson  
 
 Make ServiceWorkers follow the DEFAULT_EXPERIMENTAL_FEATURES_ENABLED flag on Mac.


Modified: trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in (225794 => 225795)

--- trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2017-12-12 19:40:40 UTC (rev 225794)
+++ trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2017-12-12 19:52:41 UTC (rev 225795)
@@ -128,6 +128,7 @@
 (xpc-service-name "com.apple.ViewBridgeAuxiliary")
 (xpc-service-name "com.apple.accessibility.mediaaccessibilityd")
 (xpc-service-name "com.apple.appkit.xpc.openAndSavePanelService")
+(xpc-service-name "com.apple.appstore.PluginXPCService") ; 
 (xpc-service-name "com.apple.audio.SandboxHelper")
 (xpc-service-name "com.apple.coremedia.videodecoder")
 (xpc-service-name "com.apple.coremedia.videoencoder")






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


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

2017-12-12 Thread bfulgham
Title: [225801] trunk/Source/WebKit








Revision 225801
Author bfulg...@apple.com
Date 2017-12-12 13:16:36 -0800 (Tue, 12 Dec 2017)


Log Message
Unreviewed build fix after r225763.

Remove dangling close-parentheses character.

* 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 (225800 => 225801)

--- trunk/Source/WebKit/ChangeLog	2017-12-12 21:11:11 UTC (rev 225800)
+++ trunk/Source/WebKit/ChangeLog	2017-12-12 21:16:36 UTC (rev 225801)
@@ -1,3 +1,11 @@
+2017-12-12  Brent Fulgham  
+
+Unreviewed build fix after r225763.
+
+Remove dangling close-parentheses character.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2017-12-12  Zach Li  
 
 [WK2] Expose image via WKBundleHitTestResult API.


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-12 21:11:11 UTC (rev 225800)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-12 21:16:36 UTC (rev 225801)
@@ -318,7 +318,7 @@
 (allow-create-directory
 (home-literal "/Library/Caches/com.apple.DictionaryServices"))
 
-(allow-network-common))
+(allow-network-common)
 
 ;  Sub-TLF: Sandbox change for apps for read-only access to the dictionary directory/data
 (allow file-read*






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


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

2017-12-13 Thread bfulgham
Title: [225858] trunk/Source/WebKit








Revision 225858
Author bfulg...@apple.com
Date 2017-12-13 11:24:47 -0800 (Wed, 13 Dec 2017)


Log Message
[iOS] Further Trim WebContent Process sandbox
https://bugs.webkit.org/show_bug.cgi?id=180727


Reviewed by Eric Carlson.

Take another pass over the contents of the file and remove addition items that
don't have call sites in WebKit.

* 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 (225857 => 225858)

--- trunk/Source/WebKit/ChangeLog	2017-12-13 19:22:14 UTC (rev 225857)
+++ trunk/Source/WebKit/ChangeLog	2017-12-13 19:24:47 UTC (rev 225858)
@@ -1,3 +1,16 @@
+2017-12-13  Brent Fulgham  
+
+[iOS] Further Trim WebContent Process sandbox
+https://bugs.webkit.org/show_bug.cgi?id=180727
+
+
+Reviewed by Eric Carlson.
+
+Take another pass over the contents of the file and remove addition items that
+don't have call sites in WebKit.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2017-12-13  Daniel Bates  
 
 Move out-parameter in API::FormClient::willBeginInputSession() to the end of the parameter list


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-13 19:22:14 UTC (rev 225857)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-13 19:24:47 UTC (rev 225858)
@@ -60,15 +60,6 @@
 (global-name "com.apple.UIKit.KeyboardManagement")
 (global-name "com.apple.UIKit.KeyboardManagement.hosted"))
 
-;; For  Allow UIKit-based apps to access com.apple.remote-text-editing mach service
-;; and  REM: Allow UIKit-based apps to access com.apple.remote-input-limiting mach service
-(when tv?
-(allow mach-lookup
-(global-name "com.apple.remote-input-limiting")
-(global-name "com.apple.remote-text-editing")
-(global-name "com.apple.remote-text-editing-legacy")
-(global-name "com.apple.sharing.remote-text-editing")))
-
 ;; TextInput framework
 (allow mach-lookup
 (global-name "com.apple.TextInput")
@@ -135,10 +126,6 @@
 (allow-well-known-system-group-container-literal-read
 "/systemgroup.com.apple.nsurlstoragedresources/Library/dafsaData.bin")
 
-;; AirPlay
-(allow mach-lookup
-(global-name "com.apple.airplaydiagnostics.server"))
-
 ;; Access the keyboards
 (allow file-read*
 (home-subpath "/Library/Caches/com.apple.keyboards"))
@@ -152,33 +139,12 @@
 ;; 
 (allow mach-lookup (xpc-service-name-regex #"\.viewservice$"))
 
-;; DataDetectors -> CallKit so user can place calls by tapping on phone numbers.
-(allow mach-lookup
-(global-name "com.apple.callkit.callcontrollerhost"))
-
-;; DataDetectors; update CoreRecents with recently-detected addresses, etc.
-(allow mach-lookup
-(xpc-service-name "com.apple.datadetectors.AddToRecentsService"))
-
-;; 
-(nano-preferences-read ".GlobalPreferences")
-
 (mobile-preferences-read
-; To determine whether the dictation opt-in alert should be suppressed.
-"com.apple.assistant.backedup"
-; Keyboard Dictation reads the list of supported languages from com.apple.assistant.support.plist.
-; And Dictation checks whether Assistant is enabled by reading the same plist.
-;  com.apple.assistant.support preference domain needs to be unsandboxed
-"com.apple.assistant.support"
 "com.apple.EmojiPreferences"
-; For CarPlay screen aspect ratio (rdar://problem/20062770).
-"com.apple.iapd"
 ;  com.apple.InputModePreferences
 "com.apple.InputModePreferences"
 ;  Weather(1038) deny file-read-data ~/Library/Preferences/com.apple.keyboard.plist
 "com.apple.keyboard"
-;  Spotlight suggestions in Lookup preference should be readable by any process
-"com.apple.lookup.shared"
 ; 
 "com.apple.Preferences")
 
@@ -186,17 +152,6 @@
 (allow file-read*
 (home-subpath "/Library/Fonts"))
 
-;; , , 
-(allow mach-lookup
-(global-name "com.apple.assistant.analytics")
-(global-name "com.apple.assistant.dictation")
-(global-name "com.apple.dictationd.recognition"))
-
-;; For copy-and-paste.
-(allow mach-lookup
-(global-name "com.apple.UIKit.pasteboardd")
-(global-name "com.apple.pasteboard.pasted"))
-
 ;;  LaunchServices app icons
 (allow file-read*
 (well-known-system-group-container-subpath "/systemgroup.com.apple.lsd.iconscache"))
@@ -207,12 +162,9 @@
 (allow mach-lookup
 (global-name "com.apple.CARenderServer")
 (global-name "com.apple.KeyboardServices.TextReplacementService")
-(global-name "com.apple.UIKit.statusbarserver")
-(global-name "com.apple.uikit.GestureServer")
 (global-name "com.apple.assertiond.applicationstateconnection")
   

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

2017-12-15 Thread bfulgham
Title: [225984] trunk/Source/WebKit








Revision 225984
Author bfulg...@apple.com
Date 2017-12-15 13:27:24 -0800 (Fri, 15 Dec 2017)


Log Message
Avoid waking plugin process up unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=180819


Reviewed by Geoffrey Garen.

WebKit purges data from origins marked as prevalent on an hourly interval. This includes waking up plugins
and removing relevant data stored in those plugins. This causes multiple plugin processes to be spawned,
even though the user is not interacting with any plugins.

Instead, we should delay removing data from plugins until they are loaded due to the user interacting with
a website using a plugin.

Make the following changes:
1. When looking for plugin data related to prevalent sites, only examine plugin data if the relevant plugin
   is already running.
2. When the state of the active plugins changes, trigger a data removal check.

* Shared/WebsiteData/WebsiteDataFetchOption.h: Add a new option 'DoNotCreateProcesses'
* UIProcess/Plugins/PluginProcessManager.cpp:
(WebKit::PluginProcessManager::getPluginProcessConnection): Pass new argument 'Launch', since we always
want to launch processes in this case.
(WebKit::PluginProcessManager::fetchWebsiteData): Pass a new parameter 'processAccessType' so that the
caller can specify if they only want to examine already-active plugins, or if they want to spawn new
processes. Call the completion handler if we need to exit early when no process exists.
(WebKit::PluginProcessManager::deleteWebsiteData): Always launch new processes.
(WebKit::PluginProcessManager::deleteWebsiteDataForHostNames): Ditto.
(WebKit::PluginProcessManager::getOrCreatePluginProcess): Accept new parameter indicating if new processes
shoudl be launched. Also switch to C++ style loops.
* UIProcess/Plugins/PluginProcessManager.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): Use the
new 'DoNotCreatePrcesses' access type.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords): Update the active plugin count when we
remove data.
(WebKit::WebResourceLoadStatisticsStore::shouldRemoveDataRecords const): Return true if the active plugin
process count changed since the last time data was removed.
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchDataAndApply): Check fetch option for new 'DoNotCreateProcesses' flag,
and tell the PluginProcessManager which mode we are using.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/WebsiteData/WebsiteDataFetchOption.h
trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.cpp
trunk/Source/WebKit/UIProcess/Plugins/PluginProcessManager.h
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.h
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (225983 => 225984)

--- trunk/Source/WebKit/ChangeLog	2017-12-15 21:18:59 UTC (rev 225983)
+++ trunk/Source/WebKit/ChangeLog	2017-12-15 21:27:24 UTC (rev 225984)
@@ -1,3 +1,48 @@
+2017-12-15  Brent Fulgham  
+
+Avoid waking plugin process up unnecessarily
+https://bugs.webkit.org/show_bug.cgi?id=180819
+
+
+Reviewed by Geoffrey Garen.
+
+WebKit purges data from origins marked as prevalent on an hourly interval. This includes waking up plugins
+and removing relevant data stored in those plugins. This causes multiple plugin processes to be spawned,
+even though the user is not interacting with any plugins.
+
+Instead, we should delay removing data from plugins until they are loaded due to the user interacting with
+a website using a plugin.
+
+Make the following changes:
+1. When looking for plugin data related to prevalent sites, only examine plugin data if the relevant plugin
+   is already running.
+2. When the state of the active plugins changes, trigger a data removal check.
+
+* Shared/WebsiteData/WebsiteDataFetchOption.h: Add a new option 'DoNotCreateProcesses'
+* UIProcess/Plugins/PluginProcessManager.cpp:
+(WebKit::PluginProcessManager::getPluginProcessConnection): Pass new argument 'Launch', since we always
+want to launch processes in this case.
+(WebKit::PluginProcessManager::fetchWebsiteData): Pass a new parameter 'processAccessType' so that the
+caller can specify if they only want to examine already-active plugins, or if they want to spawn new
+processes. Call the completion handler if we need to exit early when no process exists.
+(WebKit::PluginProcessManager::deleteWebsiteData): Always launch new processes.
+(WebKit::PluginProcessManager::deleteWebsit

[webkit-changes] [225999] trunk

2017-12-16 Thread bfulgham
Title: [225999] trunk








Revision 225999
Author bfulg...@apple.com
Date 2017-12-16 09:57:09 -0800 (Sat, 16 Dec 2017)


Log Message
Plugin processes are repeatedly spun up to do nothing
https://bugs.webkit.org/show_bug.cgi?id=180885


Reviewed by Geoffrey Garen.

Source/WebKit:

Tested by TestWebKitAPI.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::removeData): Don't ask plugins to remove data when no websites are
passed to the function.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(runTestWithWebsiteDataStore): Check that deleting website data did not
trigger any plugin processes to start up.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (225998 => 225999)

--- trunk/Source/WebKit/ChangeLog	2017-12-16 17:54:39 UTC (rev 225998)
+++ trunk/Source/WebKit/ChangeLog	2017-12-16 17:57:09 UTC (rev 225999)
@@ -1,3 +1,17 @@
+2017-12-16  Brent Fulgham  
+
+Plugin processes are repeatedly spun up to do nothing
+https://bugs.webkit.org/show_bug.cgi?id=180885
+
+
+Reviewed by Geoffrey Garen.
+
+Tested by TestWebKitAPI.
+
+* UIProcess/WebsiteData/WebsiteDataStore.cpp:
+(WebKit::WebsiteDataStore::removeData): Don't ask plugins to remove data when no websites are
+passed to the function.
+
 2017-12-15  Chris Dumez  
 
 Support updating a service worker registration's updateViaCache flag


Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (225998 => 225999)

--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-16 17:54:39 UTC (rev 225998)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2017-12-16 17:57:09 UTC (rev 225999)
@@ -1125,7 +1125,8 @@
 Vector m_hostNames;
 };
 
-State::deleteData(*callbackAggregator, plugins(), WTFMove(hostNames));
+if (!hostNames.isEmpty())
+State::deleteData(*callbackAggregator, plugins(), WTFMove(hostNames));
 }
 #endif
 


Modified: trunk/Tools/ChangeLog (225998 => 225999)

--- trunk/Tools/ChangeLog	2017-12-16 17:54:39 UTC (rev 225998)
+++ trunk/Tools/ChangeLog	2017-12-16 17:57:09 UTC (rev 225999)
@@ -1,3 +1,15 @@
+2017-12-16  Brent Fulgham  
+
+Plugin processes are repeatedly spun up to do nothing
+https://bugs.webkit.org/show_bug.cgi?id=180885
+
+
+Reviewed by Geoffrey Garen.
+
+* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
+(runTestWithWebsiteDataStore): Check that deleting website data did not
+trigger any plugin processes to start up.
+
 2017-12-16  Yusuke Suzuki  
 
 Remove unnecessary boolean result of start() functions


Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (225998 => 225999)

--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2017-12-16 17:54:39 UTC (rev 225998)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2017-12-16 17:57:09 UTC (rev 225999)
@@ -29,6 +29,7 @@
 #import "TestNavigationDelegate.h"
 #import 
 #import 
+#import 
 #import 
 #import 
 #import 
@@ -71,6 +72,10 @@
 TestWebKitAPI::Util::run(&gotFlag);
 gotFlag = false;
 
+// Triggering removeData when we don't have plugin data to remove should not trigger the plugin process to launch.
+id pool = [WKProcessPool _sharedProcessPool];
+EXPECT_EQ([pool _pluginProcessCount], static_cast(0));
+
 globalCookieStore = dataStore.httpCookieStore;
 RetainPtr observer1 = adoptNS([[CookieObserver alloc] init]);
 RetainPtr observer2 = adoptNS([[CookieObserver alloc] init]);






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


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

2017-12-18 Thread bfulgham
Title: [226072] trunk/Source/WebKit








Revision 226072
Author bfulg...@apple.com
Date 2017-12-18 13:13:41 -0800 (Mon, 18 Dec 2017)


Log Message
[macOS, iOS] Add new mach lookup port for CoreMedia remote control
https://bugs.webkit.org/show_bug.cgi?id=180938


Reviewed by Eric Carlson.

Update the app sandbox to support a new XPC endpoint for CoreMedia. This endpoint exposes
existing functions through a new, more-focused interface. This will (hopefully) allow us
to remove the more generic endpoints in a future update.

* 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 (226071 => 226072)

--- trunk/Source/WebKit/ChangeLog	2017-12-18 21:13:03 UTC (rev 226071)
+++ trunk/Source/WebKit/ChangeLog	2017-12-18 21:13:41 UTC (rev 226072)
@@ -1,3 +1,18 @@
+2017-12-18  Brent Fulgham  
+
+[macOS, iOS] Add new mach lookup port for CoreMedia remote control
+https://bugs.webkit.org/show_bug.cgi?id=180938
+
+
+Reviewed by Eric Carlson.
+
+Update the app sandbox to support a new XPC endpoint for CoreMedia. This endpoint exposes
+existing functions through a new, more-focused interface. This will (hopefully) allow us
+to remove the more generic endpoints in a future update.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2017-12-18  Megan Gardner  
 
 Support Autoscrolling in contenteditable for WK2


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-18 21:13:03 UTC (rev 226071)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2017-12-18 21:13:41 UTC (rev 226072)
@@ -295,6 +295,10 @@
 (allow mach-lookup
 (global-name "com.apple.coremedia.endpointplaybacksession.xpc"))
 
+;; 
+(allow mach-lookup
+(global-name "com.apple.coremedia.endpointremotecontrolsession.xpc"))
+
 ;;;
 ;;; End UIKit-apps.sb content
 ;;;


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-12-18 21:13:03 UTC (rev 226071)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2017-12-18 21:13:41 UTC (rev 226072)
@@ -727,6 +727,8 @@
 (global-name "com.apple.coremedia.endpointplaybacksession.xpc")
 ; "com.apple.coremedia.endpointpicker.xpc" can be removed when  is resolved.
 (global-name "com.apple.coremedia.endpointpicker.xpc")
+; 
+(global-name "com.apple.coremedia.endpointremotecontrolsession.xpc")
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 (global-name "com.apple.coremedia.routediscoverer.xpc")
 (global-name "com.apple.coremedia.routingcontext.xpc")






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


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

2017-12-21 Thread bfulgham
Title: [226223] trunk/Source/WebKit








Revision 226223
Author bfulg...@apple.com
Date 2017-12-21 09:16:59 -0800 (Thu, 21 Dec 2017)


Log Message
Unreviewed Debug build fix after r226217

* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:

Modified Paths

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




Diff

Modified: trunk/Source/WebKit/ChangeLog (226222 => 226223)

--- trunk/Source/WebKit/ChangeLog	2017-12-21 15:43:56 UTC (rev 226222)
+++ trunk/Source/WebKit/ChangeLog	2017-12-21 17:16:59 UTC (rev 226223)
@@ -1,3 +1,9 @@
+2017-12-21  Brent Fulgham  
+
+Unreviewed Debug build fix after r226217
+
+* UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
+
 2017-12-21  Jeremy Jones  
 
 Element fullscreen interface should display the location


Modified: trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm (226222 => 226223)

--- trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2017-12-21 15:43:56 UTC (rev 226222)
+++ trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2017-12-21 17:16:59 UTC (rev 226223)
@@ -436,6 +436,9 @@
 }
 #endif
 
+#if !PLATFORM(IOS) || !ENABLE(FULLSCREEN_API)
+NO_RETURN_DUE_TO_ASSERT
+#endif
 void VideoFullscreenManagerProxy::setInlineRect(uint64_t contextId, const WebCore::IntRect& inlineRect, bool visible)
 {
 #if PLATFORM(IOS) && ENABLE(FULLSCREEN_API)
@@ -445,6 +448,9 @@
 #endif
 }
 
+#if !PLATFORM(IOS) || !ENABLE(FULLSCREEN_API)
+NO_RETURN_DUE_TO_ASSERT
+#endif
 void VideoFullscreenManagerProxy::setHasVideoContentLayer(uint64_t contextId, bool value)
 {
 #if PLATFORM(IOS) && ENABLE(FULLSCREEN_API)






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


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

2017-12-21 Thread bfulgham
Title: [226224] trunk/Source/WebCore








Revision 226224
Author bfulg...@apple.com
Date 2017-12-21 09:18:31 -0800 (Thu, 21 Dec 2017)


Log Message
Adopt new secure coding APIs in WebCore
https://bugs.webkit.org/show_bug.cgi?id=178484


Reviewed by Eric Carlson.

Source/WebCore:

Switch to new NSKeyed[Un]Archiver methods that use NSSecureCoding by default.

Most of the new API is wrapped in a set of convenience methods so we can
build without the new API on older systems.

No change in behavior.

* editing/cocoa/EditorCocoa.mm:
(WebCore::archivedDataForAttributedString): Use new convenience method
to archive the string object.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write): Use new secure API.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.

Source/WebCore/PAL:

Due to 

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h
trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (226223 => 226224)

--- trunk/Source/WebCore/ChangeLog	2017-12-21 17:16:59 UTC (rev 226223)
+++ trunk/Source/WebCore/ChangeLog	2017-12-21 17:18:31 UTC (rev 226224)
@@ -1,3 +1,25 @@
+2017-12-21  Brent Fulgham  
+
+Adopt new secure coding APIs in WebCore
+https://bugs.webkit.org/show_bug.cgi?id=178484
+
+
+Reviewed by Eric Carlson.
+
+Switch to new NSKeyed[Un]Archiver methods that use NSSecureCoding by default.
+
+Most of the new API is wrapped in a set of convenience methods so we can
+build without the new API on older systems.
+
+No change in behavior.
+
+* editing/cocoa/EditorCocoa.mm:
+(WebCore::archivedDataForAttributedString): Use new convenience method
+to archive the string object.
+* platform/ios/PlatformPasteboardIOS.mm:
+(WebCore::PlatformPasteboard::write): Use new secure API.
+(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.
+
 2017-12-21  Zalan Bujtas  
 
 [RenderTreeBuilder] Move ruby mutation code to a dedicated class.


Modified: trunk/Source/WebCore/PAL/ChangeLog (226223 => 226224)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-12-21 17:16:59 UTC (rev 226223)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-12-21 17:18:31 UTC (rev 226224)
@@ -1,3 +1,25 @@
+2017-12-21  Brent Fulgham  
+
+Adopt new secure coding APIs in WebCore
+https://bugs.webkit.org/show_bug.cgi?id=178484
+
+
+Reviewed by Eric Carlson.
+
+Due to  2017-12-21  Jeremy Jones  
 
 Element fullscreen interface should display the location


Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h (226223 => 226224)

--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h	2017-12-21 17:16:59 UTC (rev 226223)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h	2017-12-21 17:18:31 UTC (rev 226224)
@@ -31,6 +31,8 @@
 
 #define USE_SECURE_ARCHIVER_API ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110200) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 40200) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 110200))
 
+#define USE_SECURE_ARCHIVER_FOR_ATTRIBUTED_STRING ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 12) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 5) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 12))
+
 #if USE(SECURE_ARCHIVER_API)
 #if USE(APPLE_INTERNAL_SDK)
 #import 
@@ -82,28 +84,33 @@
 #endif
 }
 
-inline id _Nullable securelyUnarchiveObjectOfClassFromData(Class _Nonnull cls, NSData * _Nonnull data)
+inline id _Nullable insecurelyUnarchiveObjectFromData(NSData * _Nonnull data)
 {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+return [NSKeyedUnarchiver unarchiveObjectWithData:data];
+#pragma clang diagnostic pop
+}
+
+inline id _Nullable unarchivedObjectOfClassFromData(Class _Nonnull cls, NSData * _Nonnull data)
+{
 #if USE(SECURE_ARCHIVER_API)
+#if !USE(SECURE_ARCHIVER_FOR_ATTRIBUTED_STRING)
+// Remove this code when the fix from  is deployed to all relevant build targets.
+if (cls == [NSAttributedString class])
+return insecurelyUnarchiveObjectFromData(data);
+#endif
 NSError *error;
 id value = [NSKeyedUnarchiver unarchivedObjectOfClass:cls fromData:data error:&error];
-if (!data)
+if (!value)
 LOG_ERROR("Unable to unarchive data: %@", error);
 return value;
 #else
 UNUSED_PARAM(cls);
-return [NSKeyedUnarchiver unarchiveObjectWithData:data];
+return insecurelyUnarchiveObjectFromData(data);

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

2017-12-21 Thread bfulgham
Title: [226248] trunk/Source/WebCore








Revision 226248
Author bfulg...@apple.com
Date 2017-12-21 15:57:56 -0800 (Thu, 21 Dec 2017)


Log Message
Unreviewed test fix after r226224.


Pasteboard data is more than a dictionary. We have to whitelist NSString
and NSArray as well. Change method name to reflect that we take a whitelist
of classes that are allowed to be unarchived in the call.
Source/WebCore:


* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write): Use revised method.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.

Source/WebCore/PAL:


* pal/spi/cocoa/NSKeyedArchiverSPI.h:
(unarchivedObjectOfClassesFromData):
(unarchivedObjectOfClassFromData): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (226247 => 226248)

--- trunk/Source/WebCore/ChangeLog	2017-12-21 23:05:11 UTC (rev 226247)
+++ trunk/Source/WebCore/ChangeLog	2017-12-21 23:57:56 UTC (rev 226248)
@@ -1,3 +1,16 @@
+2017-12-21  Brent Fulgham  
+
+Unreviewed test fix after r226224.
+
+
+Pasteboard data is more than a dictionary. We have to whitelist NSString
+and NSArray as well. Change method name to reflect that we take a whitelist
+of classes that are allowed to be unarchived in the call.
+
+* platform/ios/PlatformPasteboardIOS.mm:
+(WebCore::PlatformPasteboard::write): Use revised method.
+(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto.
+
 2017-12-21  Zalan Bujtas  
 
 [RenderTreeBuilder] Move RenderRubyAsInline::addChild mutation to a RenderTreeBuilder


Modified: trunk/Source/WebCore/PAL/ChangeLog (226247 => 226248)

--- trunk/Source/WebCore/PAL/ChangeLog	2017-12-21 23:05:11 UTC (rev 226247)
+++ trunk/Source/WebCore/PAL/ChangeLog	2017-12-21 23:57:56 UTC (rev 226248)
@@ -1,3 +1,16 @@
+2017-12-21  Brent Fulgham  
+
+Unreviewed test fix after r226224.
+
+
+Pasteboard data is more than a dictionary. We have to whitelist NSString
+and NSArray as well. Change method name to reflect that we take a whitelist
+of classes that are allowed to be unarchived in the call.
+
+* pal/spi/cocoa/NSKeyedArchiverSPI.h:
+(unarchivedObjectOfClassesFromData):
+(unarchivedObjectOfClassFromData): Deleted.
+
 2017-12-21  Jeremy Jones  
 
 Update FULLSCREEN_API feature defines.


Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h (226247 => 226248)

--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h	2017-12-21 23:05:11 UTC (rev 226247)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSKeyedArchiverSPI.h	2017-12-21 23:57:56 UTC (rev 226248)
@@ -92,21 +92,21 @@
 #pragma clang diagnostic pop
 }
 
-inline id _Nullable unarchivedObjectOfClassFromData(Class _Nonnull cls, NSData * _Nonnull data)
+inline id _Nullable unarchivedObjectOfClassesFromData(NSSet * _Nonnull classes, NSData * _Nonnull data)
 {
 #if USE(SECURE_ARCHIVER_API)
 #if !USE(SECURE_ARCHIVER_FOR_ATTRIBUTED_STRING)
 // Remove this code when the fix from  is deployed to all relevant build targets.
-if (cls == [NSAttributedString class])
+if ([classes containsObject:[NSAttributedString class]])
 return insecurelyUnarchiveObjectFromData(data);
 #endif
 NSError *error;
-id value = [NSKeyedUnarchiver unarchivedObjectOfClass:cls fromData:data error:&error];
+id value = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:data error:&error];
 if (!value)
 LOG_ERROR("Unable to unarchive data: %@", error);
 return value;
 #else
-UNUSED_PARAM(cls);
+UNUSED_PARAM(classes);
 return insecurelyUnarchiveObjectFromData(data);
 #endif
 }


Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (226247 => 226248)

--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-12-21 23:05:11 UTC (rev 226247)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-12-21 23:57:56 UTC (rev 226248)
@@ -265,7 +265,7 @@
 [representationsToRegister addData:content.dataInWebArchiveFormat->createNSData().get() forType:WebArchivePboardType];
 
 if (content.dataInAttributedStringFormat) {
-NSAttributedString *attributedString = unarchivedObjectOfClassFromData([NSAttributedString class], content.dataInAttributedStringFormat->createNSData().get());
+NSAttributedString *attributedString = unarchivedObjectOfClassesFromData([NSSet setWithObject:[NSAttributedString class]], content.dataInAttributedStringFormat->createNSData().get());
 if (attributedString)
 [representationsToRegister addRepresentingObject:attributedString];
 }
@@ -380,7 +380,7 @@
 if (!provider.teamData.length)
 continue;
 
-   

[webkit-changes] [228580] trunk/Source/WebKitLegacy/mac

2018-02-16 Thread bfulgham
Title: [228580] trunk/Source/WebKitLegacy/mac








Revision 228580
Author bfulg...@apple.com
Date 2018-02-16 13:56:16 -0800 (Fri, 16 Feb 2018)


Log Message
[Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
https://bugs.webkit.org/show_bug.cgi?id=182882


Reviewed by Dan Bernstein.

Make sure the smart pointer hold the collection of subviews lives at least as
long as the loop using it.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):

Modified Paths

trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm




Diff

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (228579 => 228580)

--- trunk/Source/WebKitLegacy/mac/ChangeLog	2018-02-16 21:53:18 UTC (rev 228579)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2018-02-16 21:56:16 UTC (rev 228580)
@@ -1,3 +1,17 @@
+2018-02-16  Brent Fulgham  
+
+[Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
+https://bugs.webkit.org/show_bug.cgi?id=182882
+
+
+Reviewed by Dan Bernstein.
+
+Make sure the smart pointer hold the collection of subviews lives at least as
+long as the loop using it.
+
+* WebView/WebHTMLView.mm:
+(-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):
+
 2018-02-14  Daniel Bates  
 
 Disallow cross-origin subresources from asking for credentials


Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (228579 => 228580)

--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-02-16 21:53:18 UTC (rev 228579)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2018-02-16 21:56:16 UTC (rev 228580)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2018 Apple Inc. All rights reserved.
  *   (C) 2006, 2007 Graham Dennis (graham.den...@gmail.com)
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1427,7 +1427,8 @@
 {
 // Copy subviews because [self subviews] returns the view's mutable internal array,
 // and we must avoid mutating the array while enumerating it.
-for (NSView *view in adoptNS([[self subviews] copy]).get()) {
+auto subviewsCopy = adoptNS([self.subviews copy]);
+for (NSView *view in subviewsCopy.get()) {
 if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
 [view performSelector:selector withObject:object];
 }






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


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

2018-02-23 Thread bfulgham
Title: [228964] trunk/Source/WebKit








Revision 228964
Author bfulg...@apple.com
Date 2018-02-23 14:19:37 -0800 (Fri, 23 Feb 2018)


Log Message
[macOS] Correct sandbox violation during media playback
https://bugs.webkit.org/show_bug.cgi?id=183092


Reviewed by Eric Carlson.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (228963 => 228964)

--- trunk/Source/WebKit/ChangeLog	2018-02-23 21:40:30 UTC (rev 228963)
+++ trunk/Source/WebKit/ChangeLog	2018-02-23 22:19:37 UTC (rev 228964)
@@ -1,3 +1,13 @@
+2018-02-23  Brent Fulgham  
+
+[macOS] Correct sandbox violation during media playback
+https://bugs.webkit.org/show_bug.cgi?id=183092
+
+
+Reviewed by Eric Carlson.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-02-23  Yousuke Kimoto  
 
 [MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo webkit


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-23 21:40:30 UTC (rev 228963)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-23 22:19:37 UTC (rev 228964)
@@ -239,6 +239,7 @@
 (iokit-property "IOAudioSampleRate")
 (iokit-property "IOAudioStreamSampleFormatByteOrder")
 (iokit-property-regex #"^IOAV(.*)(De|En)code$")
+(iokit-property "IOBacklightHandlerID")
 (iokit-property "IOBusyInterest")
 (iokit-property "IOCFPlugInTypes")
 (iokit-property "IOChildIndex")






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


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

2018-02-28 Thread bfulgham
Title: [229093] trunk/Source/WebKit








Revision 229093
Author bfulg...@apple.com
Date 2018-02-28 09:17:12 -0800 (Wed, 28 Feb 2018)


Log Message
Remove network access from the WebContent process sandbox
https://bugs.webkit.org/show_bug.cgi?id=183192


Reviewed by Alex Christensen.

Remove the 'system-network', 'allow-network-common', and 'network-client' access from the WebContent process.
That's why we have a Network Process! 

* 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 (229092 => 229093)

--- trunk/Source/WebKit/ChangeLog	2018-02-28 16:38:31 UTC (rev 229092)
+++ trunk/Source/WebKit/ChangeLog	2018-02-28 17:17:12 UTC (rev 229093)
@@ -1,3 +1,17 @@
+2018-02-28  Brent Fulgham  
+
+Remove network access from the WebContent process sandbox
+https://bugs.webkit.org/show_bug.cgi?id=183192
+
+
+Reviewed by Alex Christensen.
+
+Remove the 'system-network', 'allow-network-common', and 'network-client' access from the WebContent process.
+That's why we have a Network Process! 
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-02-27  Tim Horton  
 
 Ensure target triple is propagated correctly to DerivedSources.make


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-28 16:38:31 UTC (rev 229092)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-02-28 17:17:12 UTC (rev 229093)
@@ -229,8 +229,6 @@
 (allow-create-directory
 (home-literal "/Library/Caches/com.apple.DictionaryServices"))
 
-(allow-network-common)
-
 ;  Sub-TLF: Sandbox change for apps for read-only access to the dictionary directory/data
 (allow file-read*
 ; XXX - /Library ought to be allowed in all UI profiles but isn't (CF, MobileSafari)
@@ -382,8 +380,6 @@
 ;; AWD logging
 (awd-log-directory "com.apple.WebKit.WebContent")
 
-(network-client (remote tcp) (remote udp))
-
 ;; Allow ManagedPreference access
 (allow file-read* (literal "/private/var/Managed Preferences/mobile/com.apple.webcontentfilter.plist"))
 


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-28 16:38:31 UTC (rev 229092)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-02-28 17:17:12 UTC (rev 229093)
@@ -1,4 +1,4 @@
-; Copyright (C) 2010-2017 Apple Inc. All rights reserved.
+; Copyright (C) 2010-2018 Apple Inc. All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, with or without
 ; modification, are permitted provided that the following conditions
@@ -78,11 +78,12 @@
file-ioctl
 (literal "/dev/dtracehelper"))
 
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 (allow network-outbound
 (literal "/private/var/run/asl_input")
 (literal "/private/var/run/syslog"))
+#endif
 
-
 ;;; Allow creation of core dumps.
 (allow file-write-create
 (require-all (prefix "/cores/")
@@ -140,27 +141,6 @@
 (iokit-property "ggcs")
 (iokit-property "bgcs")
 
-
-;;; (system-network) - Allow access to the network.
-(define (system-network)
-(allow file-read*
-(literal "/Library/Preferences/com.apple.networkd.plist"))
-(allow mach-lookup
-(global-name "com.apple.SystemConfiguration.PPPController")
-(global-name "com.apple.SystemConfiguration.SCNetworkReachability")
-(global-name "com.apple.nehelper")
-(global-name "com.apple.networkd")
-(global-name "com.apple.nsurlstorage-cache")
-(global-name "com.apple.symptomsd")
-(global-name "com.apple.usymptomsd"))
-(allow network-outbound
-(control-name "com.apple.netsrc")
-(control-name "com.apple.network.statistics"))
-(allow system-socket
-(require-all (socket-domain AF_SYSTEM)
-(socket-protocol 2)) ; SYSPROTO_CONTROL
-(socket-domain AF_ROUTE)))
-
 ;;;
 ;;; End rules originally copied from 'system.sb'
 ;;;
@@ -645,11 +625,13 @@
 (system-graphics)
 
 ;; Networking
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 (system-network)
 (allow network-outbound
;; Local mDNSResponder for DNS, arbitrary outbound TCP
(literal "/private/var/run/mDNSResponder")
(remote tcp))
+#endif
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 ;; CFNetwork
@@ -662,8 +644,10 @@
(global-name "com.apple.GSSCred")
(global-name "com.apple.system.logger")
(global-name "com.apple.system.notification_center"))
+#if __MAC

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

2018-03-01 Thread bfulgham
Title: [229154] trunk/Source/WebKit








Revision 229154
Author bfulg...@apple.com
Date 2018-03-01 16:31:25 -0800 (Thu, 01 Mar 2018)


Log Message
Add the "com.apple.security.cs.disable-library-validation” entitlement to the Plugin Process
https://bugs.webkit.org/show_bug.cgi?id=183252


Reviewed by David Kilzer.

* Configurations/PluginService.entitlements:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Configurations/PluginService.entitlements




Diff

Modified: trunk/Source/WebKit/ChangeLog (229153 => 229154)

--- trunk/Source/WebKit/ChangeLog	2018-03-02 00:04:06 UTC (rev 229153)
+++ trunk/Source/WebKit/ChangeLog	2018-03-02 00:31:25 UTC (rev 229154)
@@ -1,3 +1,13 @@
+2018-03-01  Brent Fulgham  
+
+Add the "com.apple.security.cs.disable-library-validation” entitlement to the Plugin Process
+https://bugs.webkit.org/show_bug.cgi?id=183252
+
+
+Reviewed by David Kilzer.
+
+* Configurations/PluginService.entitlements:
+
 2018-03-01  Youenn Fablet  
 
 Clients should register to StorageProcess with their service worker registration identifier


Modified: trunk/Source/WebKit/Configurations/PluginService.entitlements (229153 => 229154)

--- trunk/Source/WebKit/Configurations/PluginService.entitlements	2018-03-02 00:04:06 UTC (rev 229153)
+++ trunk/Source/WebKit/Configurations/PluginService.entitlements	2018-03-02 00:31:25 UTC (rev 229154)
@@ -6,5 +6,7 @@
 	
 	com.apple.security.files.user-selected.read-write
 	
+	com.apple.security.cs.disable-library-validation
+	
 
 






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


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

2018-03-02 Thread bfulgham
Title: [229173] trunk/Source/WebKit








Revision 229173
Author bfulg...@apple.com
Date 2018-03-02 08:55:20 -0800 (Fri, 02 Mar 2018)


Log Message
[iOS] whitelist missing AppleJPEG logging feature
https://bugs.webkit.org/show_bug.cgi?id=183270


Reviewed by Alex Christensen.

* 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 (229172 => 229173)

--- trunk/Source/WebKit/ChangeLog	2018-03-02 16:52:32 UTC (rev 229172)
+++ trunk/Source/WebKit/ChangeLog	2018-03-02 16:55:20 UTC (rev 229173)
@@ -1,3 +1,13 @@
+2018-03-02  Brent Fulgham  
+
+[iOS] whitelist missing AppleJPEG logging feature
+https://bugs.webkit.org/show_bug.cgi?id=183270
+
+
+Reviewed by Alex Christensen.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2018-03-02  Youenn Fablet  
 
 IOChannel::read and IOChannel::write can destroy the completion handler in the thread used to manipulate thread


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-03-02 16:52:32 UTC (rev 229172)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-03-02 16:55:20 UTC (rev 229173)
@@ -312,7 +312,7 @@
 (deny iokit-get-properties (with partial-symbolication))
 (allow iokit-get-properties
 (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
-(iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI))")
+(iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI|RSTLogging))")
 (iokit-property "BaseAddressAlignmentRequirement")
 (iokit-property-regex #"^DisplayPipe(PlaneBaseAlignment|StrideRequirements)")
 (iokit-property-regex #"^IOGL(|ES(|Metal))BundleName")






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


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

2018-03-02 Thread bfulgham
Title: [229175] trunk/Source/WebKit








Revision 229175
Author bfulg...@apple.com
Date 2018-03-02 09:37:26 -0800 (Fri, 02 Mar 2018)


Log Message
Update WebContent process sandbox IOKit properties
https://bugs.webkit.org/show_bug.cgi?id=183269


Reviewed by Eric Carlson.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (229174 => 229175)

--- trunk/Source/WebKit/ChangeLog	2018-03-02 17:13:32 UTC (rev 229174)
+++ trunk/Source/WebKit/ChangeLog	2018-03-02 17:37:26 UTC (rev 229175)
@@ -1,3 +1,13 @@
+2018-03-02  Brent Fulgham  
+
+Update WebContent process sandbox IOKit properties
+https://bugs.webkit.org/show_bug.cgi?id=183269
+
+
+Reviewed by Eric Carlson.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-03-01  Yusuke Suzuki  
 
 Remove monotonicallyIncreasingTime


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-02 17:13:32 UTC (rev 229174)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-02 17:37:26 UTC (rev 229175)
@@ -198,6 +198,7 @@
 (iokit-property "CapsLockDelay")
 (iokit-property "ConfigState")
 (iokit-property "Description")
+(iokit-property "Development")
 (iokit-property-regex #"^Device( Characteristics|EqID)")
 (iokit-property "DisplayRouting")
 (iokit-property "Driver is Ready")
@@ -242,7 +243,7 @@
 (iokit-property "IOI2CTransactionTypes")
 (iokit-property-regex #"^IOInterrupt(Controllers|Specifiers)")
 (iokit-property "IOGVAVTCapabilities")
-(iokit-property-regex #"^IOGVA(Codec|EncoderRestricted)")
+(iokit-property-regex #"^IOGVA(BGRAEnc|Codec|EncoderRestricted|Scaler)")
 (iokit-property-regex #"^IOGVA(.*)(De|En)code$")
 (iokit-property "IOMatchCategory")
 (iokit-property "IONDRVFramebufferGeneration")
@@ -251,7 +252,7 @@
 (iokit-property "IOPCITunnelled")
 (iokit-property "IOPMStrictTreeOrder")
 (iokit-property "IOParentMatch")
-(iokit-property-regex #"^IOPCI(Express(Capabilities|Link(Status|Capabilities))|MSIMode|Resourced|Tunnelled)")
+(iokit-property-regex #"^IOPCI(ClassMatch|Express(Capabilities|Link(Status|Capabilities))|PrimaryMatch|MSIMode|Resourced|Tunnelled)")
 (iokit-property "IOPMIsPowerManaged")
 (iokit-property-regex #"^IOPlatform(SerialNumber|UUID)")
 (iokit-property "IOPowerManagement")






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


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

2018-03-03 Thread bfulgham
Title: [229201] trunk/Source/WebKit








Revision 229201
Author bfulg...@apple.com
Date 2018-03-03 15:27:18 -0800 (Sat, 03 Mar 2018)


Log Message
Notify the NetworkProcess when a session is servicing an automation client
https://bugs.webkit.org/show_bug.cgi?id=183306


Reviewed by Brian Burg.

Network loads servicing WebDriver are done through an ephemeral session. While this is great
for protecting a developer's machine from sharing state with test runs, it has the unintended
effect of blocking certain logging operations.

We do not log content in ephemeral sessions to protect user privacy. However, ephemeral sessions
generated by WebDriver should participate in logging so that proper testing (with logging) can
be done.

This patch signals the NetworkProcess when an ephemeral session (created for automation purposes)
is created, so that it can allow logging.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::destroySession): Remove controlled-by-automation entry.
(WebKit::NetworkProcess::sessionIsControlledByAutomation const): Added.
(WebKit::NetworkProcess::setSessionIsControlledByAutomation): Added.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed const): Checks if the relevant session
is servicing an automation client, and returns true if it is.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Signal the network process if this page is being created
for an automation client.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp




Diff

Modified: trunk/Source/WebKit/ChangeLog (229200 => 229201)

--- trunk/Source/WebKit/ChangeLog	2018-03-03 20:13:42 UTC (rev 229200)
+++ trunk/Source/WebKit/ChangeLog	2018-03-03 23:27:18 UTC (rev 229201)
@@ -1,3 +1,35 @@
+2018-03-03  Brent Fulgham  
+
+Notify the NetworkProcess when a session is servicing an automation client
+https://bugs.webkit.org/show_bug.cgi?id=183306
+
+
+Reviewed by Brian Burg.
+
+Network loads servicing WebDriver are done through an ephemeral session. While this is great
+for protecting a developer's machine from sharing state with test runs, it has the unintended
+effect of blocking certain logging operations.
+
+We do not log content in ephemeral sessions to protect user privacy. However, ephemeral sessions
+generated by WebDriver should participate in logging so that proper testing (with logging) can
+be done.
+
+This patch signals the NetworkProcess when an ephemeral session (created for automation purposes)
+is created, so that it can allow logging.
+
+* NetworkProcess/NetworkProcess.cpp:
+(WebKit::NetworkProcess::destroySession): Remove controlled-by-automation entry.
+(WebKit::NetworkProcess::sessionIsControlledByAutomation const): Added.
+(WebKit::NetworkProcess::setSessionIsControlledByAutomation): Added.
+* NetworkProcess/NetworkProcess.h:
+* NetworkProcess/NetworkProcess.messages.in:
+* NetworkProcess/NetworkResourceLoader.cpp:
+(WebKit::NetworkResourceLoader::isAlwaysOnLoggingAllowed const): Checks if the relevant session
+is servicing an automation client, and returns true if it is.
+* UIProcess/WebPageProxy.cpp:
+(WebKit::WebPageProxy::WebPageProxy): Signal the network process if this page is being created
+for an automation client.
+
 2018-03-02  Yusuke Suzuki  
 
 [WTF] Remove RunLoop and RunLoop::Timer's interface using double as seconds


Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (229200 => 229201)

--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2018-03-03 20:13:42 UTC (rev 229200)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2018-03-03 23:27:18 UTC (rev 229201)
@@ -325,6 +325,7 @@
 void NetworkProcess::destroySession(PAL::SessionID sessionID)
 {
 SessionTracker::destroySession(sessionID);
+m_sessionsControlledByAutomation.remove(sessionID);
 }
 
 void NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs(const Vector& filenames, Function&& completionHandler)
@@ -400,6 +401,19 @@
 }
 #endif
 
+bool NetworkProcess::sessionIsControlledByAutomation(PAL::SessionID sessionID) const
+{
+return m_sessionsControlledByAutomation.contains(sessionID);
+}
+
+void NetworkProcess::setSessionIsControlledByAutomation(PAL::SessionID sessionID, bool controlled)
+{
+if (controlled)
+m_sessionsControlledByAutomation.add(sessionID);
+else
+m_sessionsControlledByAutomation.remove(sessionID);
+}
+
 static void fetchDiskCacheEntries(PAL::S

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

2018-03-06 Thread bfulgham
Title: [229343] trunk/Source/WebKit








Revision 229343
Author bfulg...@apple.com
Date 2018-03-06 14:49:21 -0800 (Tue, 06 Mar 2018)


Log Message
NetworkDataTask should enable logging for automation clients
https://bugs.webkit.org/show_bug.cgi?id=183378


Reviewed by Brian Burg.

The NetworkDataTaskCocoa class was only logging if the SessionID object allowed logging.
It should also be considering whether the current session is working on behalf of an
automation client. If so, it should allow logging.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::isAlwaysOnLoggingAllowed const):

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (229342 => 229343)

--- trunk/Source/WebKit/ChangeLog	2018-03-06 22:41:41 UTC (rev 229342)
+++ trunk/Source/WebKit/ChangeLog	2018-03-06 22:49:21 UTC (rev 229343)
@@ -1,3 +1,21 @@
+2018-03-06  Brent Fulgham  
+
+NetworkDataTask should enable logging for automation clients
+https://bugs.webkit.org/show_bug.cgi?id=183378
+
+
+Reviewed by Brian Burg.
+
+The NetworkDataTaskCocoa class was only logging if the SessionID object allowed logging.
+It should also be considering whether the current session is working on behalf of an
+automation client. If so, it should allow logging.
+
+* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
+* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
+(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
+(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
+(WebKit::NetworkDataTaskCocoa::isAlwaysOnLoggingAllowed const):
+
 2018-03-06  Ryan Haddad  
 
 Unreviewed build fix.


Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h (229342 => 229343)

--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h	2018-03-06 22:41:41 UTC (rev 229342)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h	2018-03-06 22:49:21 UTC (rev 229343)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -83,6 +83,7 @@
 void applyCookiePartitioningPolicy(const String& requiredStoragePartition, const String& currentStoragePartition);
 #endif
 bool isThirdPartyRequest(const WebCore::ResourceRequest&);
+bool isAlwaysOnLoggingAllowed() const;
 
 RefPtr m_sandboxExtension;
 RetainPtr m_task;


Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (229342 => 229343)

--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2018-03-06 22:41:41 UTC (rev 229342)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2018-03-06 22:49:21 UTC (rev 229343)
@@ -212,7 +212,7 @@
 if (shouldBlockCookies) {
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING) && !RELEASE_LOG_DISABLED
 if (NetworkProcess::singleton().shouldLogCookieInformation())
-RELEASE_LOG_IF(m_session->sessionID().isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
+RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Blocking cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
 #else
 LOG(NetworkSession, "%llu Blocking cookies for URL %s", [m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
 #endif
@@ -222,7 +222,7 @@
 if (!storagePartition.isEmpty()) {
 #if HAVE(CFNETWORK_STORAGE_PARTITIONING) && !RELEASE_LOG_DISABLED
 if (NetworkProcess::singleton().shouldLogCookieInformation())
-RELEASE_LOG_IF(m_session->sessionID().isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Partitioning cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteString.UTF8String);
+RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - NetworkDataTaskCocoa::logCookieInformation: pageID = %llu, frameID = %llu, taskID = %lu: Partitioning cookies for URL %s", this, pageID, frameID, (unsigned long)[m_task taskIdentifier], nsRequest.URL.absoluteS

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

2018-03-07 Thread bfulgham
Title: [229386] trunk/Source/WebKit








Revision 229386
Author bfulg...@apple.com
Date 2018-03-07 16:39:19 -0800 (Wed, 07 Mar 2018)


Log Message
REGRESSION (r229093): Media playback on Facebook and Hulu require mDNSResponder access
https://bugs.webkit.org/show_bug.cgi?id=183421


Reviewed by Dean Jackson.

CoreMedia fails to properly play back media on Facebook and Hulu if access to the
mDNSResponder is blocked by the sandbox. This Bug unblocks that access while we
investigate the underlying issue.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (229385 => 229386)

--- trunk/Source/WebKit/ChangeLog	2018-03-08 00:32:22 UTC (rev 229385)
+++ trunk/Source/WebKit/ChangeLog	2018-03-08 00:39:19 UTC (rev 229386)
@@ -1,3 +1,17 @@
+2018-03-07  Brent Fulgham  
+
+REGRESSION (r229093): Media playback on Facebook and Hulu require mDNSResponder access
+https://bugs.webkit.org/show_bug.cgi?id=183421
+
+
+Reviewed by Dean Jackson.
+
+CoreMedia fails to properly play back media on Facebook and Hulu if access to the
+mDNSResponder is blocked by the sandbox. This Bug unblocks that access while we
+investigate the underlying issue.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-03-07  Dean Jackson  
 
 Try to fix build for watchOS and tvOS.


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-08 00:32:22 UTC (rev 229385)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-08 00:39:19 UTC (rev 229386)
@@ -628,11 +628,13 @@
 ;; Networking
 #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300
 (system-network)
+#endif
 (allow network-outbound
;; Local mDNSResponder for DNS, arbitrary outbound TCP
+   ;; Note: This is needed for some media playback features. 
+   ;; Remove this permission when  is fixed.
(literal "/private/var/run/mDNSResponder")
(remote tcp))
-#endif
 
 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 ;; CFNetwork






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


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

2018-03-08 Thread bfulgham
Title: [229426] trunk/Source/WebKit








Revision 229426
Author bfulg...@apple.com
Date 2018-03-08 12:43:34 -0800 (Thu, 08 Mar 2018)


Log Message
Remove WebCookieManager and messaging from WebContent process.
https://bugs.webkit.org/show_bug.cgi?id=183382


Reviewed by Alex Christensen.

Networking access was fully removed from the WebContent process in Bug 183192 (and related bugs). The
UIProcess no longer needs to ask the WebContent process about networking-related things, and shouldn't
waste everyone's time doing so.

This bug removes some left-over WebCookieManager API stuff, and is a first step in purging the
WebContent Process from accessing cookie data.

* NetworkProcess/Cookies: Copied from WebProcess/Cookies.
* NetworkProcess/Cookies/WebCookieManager.h:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Cookies: Removed.
* WebProcess/Cookies/WebCookieManager.cpp: Removed.
* WebProcess/Cookies/WebCookieManager.h: Removed.
* WebProcess/Cookies/WebCookieManager.messages.in: Removed.
* WebProcess/Cookies/curl: Removed.
* WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Removed.
* WebProcess/Cookies/mac: Removed.
* WebProcess/Cookies/mac/WebCookieManagerMac.mm: Removed.
* WebProcess/Cookies/soup: Removed.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: Removed.
* WebProcess/InjectedBundle/InjectedBundle.cpp: Remove 'WebCookieManager.h" header.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Ditto.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Remove call to add WebCookieManager as a
WebProcessSupplement.
* CMakeLists.txt: Revised paths.
* DerivedSources.make: Ditto.
* PlatformMac.cmake: Ditto.
* PlatformWin.cmake: Ditto.
* SourcesGTK.txt: Ditto.
* SourcesWPE.txt: Ditto.

Modified Paths

trunk/Source/WebKit/CMakeLists.txt
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/DerivedSources.make
trunk/Source/WebKit/PlatformMac.cmake
trunk/Source/WebKit/PlatformWin.cmake
trunk/Source/WebKit/SourcesGTK.txt
trunk/Source/WebKit/SourcesWPE.txt
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
trunk/Source/WebKit/WebProcess/WebProcess.cpp


Added Paths

trunk/Source/WebKit/NetworkProcess/Cookies/
trunk/Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp
trunk/Source/WebKit/NetworkProcess/Cookies/WebCookieManager.h
trunk/Source/WebKit/NetworkProcess/Cookies/WebCookieManager.messages.in
trunk/Source/WebKit/NetworkProcess/Cookies/curl/
trunk/Source/WebKit/NetworkProcess/Cookies/curl/WebCookieManagerCurl.cpp
trunk/Source/WebKit/NetworkProcess/Cookies/mac/
trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm
trunk/Source/WebKit/NetworkProcess/Cookies/soup/
trunk/Source/WebKit/NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp


Removed Paths

trunk/Source/WebKit/WebProcess/Cookies/




Diff

Modified: trunk/Source/WebKit/CMakeLists.txt (229425 => 229426)

--- trunk/Source/WebKit/CMakeLists.txt	2018-03-08 20:38:36 UTC (rev 229425)
+++ trunk/Source/WebKit/CMakeLists.txt	2018-03-08 20:43:34 UTC (rev 229426)
@@ -5,6 +5,7 @@
 set(WebKit_INCLUDE_DIRECTORIES
 "${WEBKIT_DIR}"
 "${WEBKIT_DIR}/NetworkProcess"
+"${WEBKIT_DIR}/NetworkProcess/Cookies"
 "${WEBKIT_DIR}/NetworkProcess/CustomProtocols"
 "${WEBKIT_DIR}/NetworkProcess/Downloads"
 "${WEBKIT_DIR}/NetworkProcess/FileAPI"
@@ -56,7 +57,6 @@
 "${WEBKIT_DIR}/WebProcess/ApplicationCache"
 "${WEBKIT_DIR}/WebProcess/Automation"
 "${WEBKIT_DIR}/WebProcess/Cache"
-"${WEBKIT_DIR}/WebProcess/Cookies"
 "${WEBKIT_DIR}/WebProcess/Databases"
 "${WEBKIT_DIR}/WebProcess/Databases/IndexedDB"
 "${WEBKIT_DIR}/WebProcess/FileAPI"
@@ -97,6 +97,9 @@
 )
 
 set(WebKit_SOURCES
+NetworkProcess/Cookies/WebCookieManager.cpp
+NetworkProcess/Cookies/WebCookieManager.messages.in
+
 NetworkProcess/Downloads/Download.cpp
 NetworkProcess/Downloads/DownloadManager.cpp
 NetworkProcess/Downloads/PendingDownload.cpp
@@ -463,8 +466,6 @@
 WebProcess/Cache/WebCacheStorageConnection.cpp
 WebProcess/Cache/WebCacheStorageProvider.cpp
 
-WebProcess/Cookies/WebCookieManager.cpp
-
 WebProcess/Databases/WebDatabaseProvider.cpp
 
 WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
@@ -668,8 +669,6 @@
 
 WebProcess/Cache/WebCacheStorageConnection.messages.in
 
-WebProcess/Cookies/WebCookieManager.messages.in
-
 WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in
 
 WebProcess/FullScreen/WebFullScreenManager.messages.in


Modified: trunk/Source/WebKit/ChangeLog (229425 => 229426)

--- trunk/Source/WebKit/ChangeLog	2018-03-08 20:38:36 UTC (rev 229425)
+++ trunk/Source/WebKit/ChangeLog	2018-03-08 20:43:34 UTC (rev 229426)
@@ -1,3 +1,44 @@
+2018-03-08  Brent F

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

2018-03-09 Thread bfulgham
Title: [229480] trunk/Source/WebKit








Revision 229480
Author bfulg...@apple.com
Date 2018-03-09 13:31:02 -0800 (Fri, 09 Mar 2018)


Log Message
Remove cookie API access from WebContent Process
https://bugs.webkit.org/show_bug.cgi?id=183519


Reviewed by Alex Christensen.

All cookie access is now handled in the Network Process. However, there are vestiges of the original logic that used CFNetwork APIs in the WebContent process.

This patch removes CFNetwork calls from the WebProcess code paths, since they serve no purpose in modern WebKit.

No tests because this is a code cleanup with no expected change in behavior.

* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Moved from WebFrameNetworkingContext.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::setSharedHTTPCookieStorage): Moved from ChildProcess, since this should only be
called in the NetworkProcess.
* Shared/ChildProcess.h:
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setSharedHTTPCookieStorage): Deleted.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Remove CFNetwork code. This version of
'ensureWebsiteDataStoreSession' is needed to maintain a dictionary on the WebProcess side so we can refer to
the same network session in both the WebContent and Network processes.
(WebKit::WebFrameNetworkingContext::webFrameLoaderClient const):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Remove calls to CFNetwork.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
trunk/Source/WebKit/Shared/ChildProcess.h
trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (229479 => 229480)

--- trunk/Source/WebKit/ChangeLog	2018-03-09 21:14:58 UTC (rev 229479)
+++ trunk/Source/WebKit/ChangeLog	2018-03-09 21:31:02 UTC (rev 229480)
@@ -1,3 +1,36 @@
+2018-03-09  Brent Fulgham  
+
+Remove cookie API access from WebContent Process
+https://bugs.webkit.org/show_bug.cgi?id=183519
+
+
+Reviewed by Alex Christensen.
+
+All cookie access is now handled in the Network Process. However, there are vestiges of the original logic that used CFNetwork APIs in the WebContent process.
+
+This patch removes CFNetwork calls from the WebProcess code paths, since they serve no purpose in modern WebKit.
+
+No tests because this is a code cleanup with no expected change in behavior.
+
+* NetworkProcess/Cookies/mac/WebCookieManagerMac.mm:
+(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Moved from WebFrameNetworkingContext.
+* NetworkProcess/NetworkProcess.h:
+* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+(WebKit::NetworkProcess::setSharedHTTPCookieStorage): Moved from ChildProcess, since this should only be
+called in the NetworkProcess.
+* Shared/ChildProcess.h:
+* Shared/mac/ChildProcessMac.mm:
+(WebKit::ChildProcess::setSharedHTTPCookieStorage): Deleted.
+* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
+* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
+(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Remove CFNetwork code. This version of
+'ensureWebsiteDataStoreSession' is needed to maintain a dictionary on the WebProcess side so we can refer to
+the same network session in both the WebContent and Network processes.
+(WebKit::WebFrameNetworkingContext::webFrameLoaderClient const):
+(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
+* WebProcess/cocoa/WebProcessCocoa.mm:
+(WebKit::WebProcess::platformInitializeWebProcess): Remove calls to CFNetwork.
+
 2018-03-09  Youenn Fablet  
 
 ServiceWorkerClientFetch should send data to its resource loader once the didReceiveResponse completion handler is called


Modified: trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm (229479 => 229480)

--- trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm	2018-03-09 21:14:58 UTC (rev 229479)
+++ trunk/Source/WebKit/NetworkProcess/Cookies/mac/WebCookieManagerMac.mm	2018-03-09 21:31:02 UTC (rev 229480)
@@ -26,7 +26,10 @@
 #import "config.h"

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

2018-03-15 Thread bfulgham
Title: [229629] trunk/Source/WebKit








Revision 229629
Author bfulg...@apple.com
Date 2018-03-15 11:30:19 -0700 (Thu, 15 Mar 2018)


Log Message
REGRESSION(r229484): Plugins often require CGS Connections to draw
https://bugs.webkit.org/show_bug.cgi?id=183663


Reviewed by Per Arne Vollan.

Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
process to have on, create a new plugin process-specific layer host creation method that
gives this access.

* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
method.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Platform/mac/LayerHostingContext.h
trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm
trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (229628 => 229629)

--- trunk/Source/WebKit/ChangeLog	2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/ChangeLog	2018-03-15 18:30:19 UTC (rev 229629)
@@ -1,3 +1,22 @@
+2018-03-15  Brent Fulgham  
+
+REGRESSION(r229484): Plugins often require CGS Connections to draw
+https://bugs.webkit.org/show_bug.cgi?id=183663
+
+
+Reviewed by Per Arne Vollan.
+
+Flash requires an active CGSConnection to work properly. Since we don't want the WebContent
+process to have on, create a new plugin process-specific layer host creation method that
+gives this access.
+
+* Platform/mac/LayerHostingContext.h:
+* Platform/mac/LayerHostingContext.mm:
+(WebKit::LayerHostingContext::createForExternalPluginHostingProcess): Added.
+* PluginProcess/mac/PluginControllerProxyMac.mm:
+(WebKit::PluginControllerProxy::updateLayerHostingContext): Use the new creation
+method.
+
 2018-03-15  Zan Dobersek  
 
 [TexMap] Remove TextureMapperLayer::texture()


Modified: trunk/Source/WebKit/Platform/mac/LayerHostingContext.h (229628 => 229629)

--- trunk/Source/WebKit/Platform/mac/LayerHostingContext.h	2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/Platform/mac/LayerHostingContext.h	2018-03-15 18:30:19 UTC (rev 229629)
@@ -46,7 +46,10 @@
 static std::unique_ptr createForPort(const WebCore::MachSendRight& serverPort);
 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
 static std::unique_ptr createForExternalHostingProcess();
+#if PLATFORM(MAC)
+static std::unique_ptr createForExternalPluginHostingProcess();
 #endif
+#endif
 
 LayerHostingContext();
 ~LayerHostingContext();


Modified: trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm (229628 => 229629)

--- trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm	2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/Platform/mac/LayerHostingContext.mm	2018-03-15 18:30:19 UTC (rev 229629)
@@ -72,7 +72,17 @@
 
 return layerHostingContext;
 }
+
+#if PLATFORM(MAC)
+std::unique_ptr LayerHostingContext::createForExternalPluginHostingProcess()
+{
+auto layerHostingContext = std::make_unique();
+layerHostingContext->m_layerHostingMode = LayerHostingMode::OutOfProcess;
+layerHostingContext->m_context = [CAContext contextWithCGSConnection:CGSMainConnectionID() options:@{ kCAContextCIFilterBehavior : @"ignore" }];
+return layerHostingContext;
+}
 #endif
+#endif // HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
 
 LayerHostingContext::LayerHostingContext()
 {


Modified: trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm (229628 => 229629)

--- trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm	2018-03-15 18:21:10 UTC (rev 229628)
+++ trunk/Source/WebKit/PluginProcess/mac/PluginControllerProxyMac.mm	2018-03-15 18:30:19 UTC (rev 229629)
@@ -130,7 +130,7 @@
 break;
 #if HAVE(OUT_OF_PROCESS_LAYER_HOSTING)
 case LayerHostingMode::OutOfProcess:
-m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess();
+m_layerHostingContext = LayerHostingContext::createForExternalPluginHostingProcess();
 break;
 #endif
 }






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


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

2018-03-15 Thread bfulgham
Title: [229638] trunk/Source/WebKit








Revision 229638
Author bfulg...@apple.com
Date 2018-03-15 13:08:40 -0700 (Thu, 15 Mar 2018)


Log Message
[macOS] Correct sandbox violations during Flash playback under ToT WebKit
https://bugs.webkit.org/show_bug.cgi?id=183672


Reviewed by Eric Carlson.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (229637 => 229638)

--- trunk/Source/WebKit/ChangeLog	2018-03-15 19:43:37 UTC (rev 229637)
+++ trunk/Source/WebKit/ChangeLog	2018-03-15 20:08:40 UTC (rev 229638)
@@ -1,5 +1,16 @@
 2018-03-15  Brent Fulgham  
 
+[macOS] Correct sandbox violations during Flash playback under ToT WebKit
+https://bugs.webkit.org/show_bug.cgi?id=183672
+
+
+Reviewed by Eric Carlson.
+
+* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
+* WebProcess/com.apple.WebProcess.sb.in:
+
+2018-03-15  Brent Fulgham  
+
 REGRESSION(r229484): Plugins often require CGS Connections to draw
 https://bugs.webkit.org/show_bug.cgi?id=183663
 


Modified: trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in (229637 => 229638)

--- trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-03-15 19:43:37 UTC (rev 229637)
+++ trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-03-15 20:08:40 UTC (rev 229638)
@@ -1,4 +1,4 @@
-; Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+; Copyright (C) 2013-2018 Apple Inc. All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, with or without
 ; modification, are permitted provided that the following conditions
@@ -22,7 +22,7 @@
 ; THE POSSIBILITY OF SUCH DAMAGE.
 
 (version 1)
-(deny default)
+(deny default (with partial-symbolication))
 (allow system-audit file-read-metadata)
 
 (import "system.sb")
@@ -44,7 +44,9 @@
 (deny iokit-get-properties)
 (allow iokit-get-properties
 (iokit-property-regex #"^AAPL,(DisplayPipe|boot-display|mux-switch-state)")
+(iokit-property "AGCInfo")
 (iokit-property-regex #"^ATY,fb_(linebytes|offset|size)")
+(iokit-property "AccelCaps")
 (iokit-property "ActuationSupported")
 (iokit-property "AllowDisplaySleep")
 (iokit-property "AlwaysNeedsVelocityCalculated")
@@ -51,6 +53,7 @@
 (iokit-property "Apple(DisplayType|GVAKeyDoesNotExist|IntelMEVABundleName|Sense)")
 (iokit-property "CFBundleIdentifier")
 (iokit-property-regex #"^Display(ParameterHandlerUsesCharPtr|ProductID|Routing|SerialNumber|VendorID)")
+(iokit-property "Development")
 (iokit-property "DeviceEqID")
 (iokit-property "Driver is Ready")
 (iokit-property "EnableLPVP")
@@ -58,7 +61,7 @@
 (iokit-property "Family ID")
 (iokit-property "ForceSupported")
 (iokit-property "HIDPointerAccelerationType")
-(iokit-property-regex #"^IOAccel(Index|Revision|Types)")
+(iokit-property-regex #"^IOAccel(DisplayPipeCapabilities|Index|Revision|Types)")
 (iokit-property-regex #"^IOAudioControl(ChannelID|ID|SubType|Usage)")
 (iokit-property-regex #"^IOAudioDevice(CanBeDefaults|TransportType)")
 (iokit-property-regex #"^IOAudioEngine(ChannelNames|ClientDescription|CoreAudioPlugIn|(|Device)Description|Flavor|GlobalUniqueID|OutputChannelLayout|SampleOffset|State)")
@@ -80,18 +83,24 @@
 (iokit-property "IOGeneralInterest")
 (iokit-property "IOGLBundleName")
 (iokit-property "IOGVACodec")
+(iokit-property "IOGVAVTCapabilities")
+(iokit-property-regex #"^IOGVA(BGRAEnc|Codec|EncoderRestricted|Scaler)")
 (iokit-property "IOI2CTransactionTypes")
 (iokit-property-regex "^IOGVA[A-Z]+(De|En)code")
 (iokit-property "IOMACAddress") ;; For some Flash players
 (iokit-property "IOMatchCategory")
 (iokit-property-regex #"^IOName(Match|Matched)")
+(iokit-property-regex #"^IOPCI(ClassMatch|Express(Capabilities|Link(Status|Capabilities))|PrimaryMatch|MSIMode|Resourced|Tunnelled)")
 (iokit-property "IOPMStrictTreeOrder")
 (iokit-property-regex #"^IOPlatform(SerialNumber|UUID)") ;; Ditto
 (iokit-property "IOPowerManagement")
 (iokit-property "IOProbeScore")
 (iokit-property "IOProviderClass")
+(iokit-property-regex #"^IOReport(Lures|Legend(|Public))")
 (iokit-property "IOScreenRestoreState")
+(iokit-property "IOSourceVersion")
 (iokit-property "IOVARendererID")
+(iokit-property-regex #"^InternalStatistics(|Accm)")
 (iokit-property-regex #"^MT( Built-In|HIDDevice)")
 (iokit-property "MaintainPowerInUILock")
 (iokit-property "Max Packet Size")
@@ -99,11 +108,14 @@
 (iokit-property-regex #"^Multitouch (ID|Serial Number|Subdevice ID)")
 (iokit-property "NXSystemInfo")
 (iokit-prop

[webkit-changes] [229683] trunk/Source

2018-03-16 Thread bfulgham
Title: [229683] trunk/Source








Revision 229683
Author bfulg...@apple.com
Date 2018-03-16 14:17:27 -0700 (Fri, 16 Mar 2018)


Log Message
Set a trap to catch an infrequent form-related nullptr crash
https://bugs.webkit.org/show_bug.cgi?id=183704


Reviewed by Ryosuke Niwa.

Source/WebCore:

Make FormState a FrameDestructionObserver. We expect all relevant FormState objects to have been
cleaned up prior to the frame being destroyed. If we find such a case, we'd like to see the
stack trace to see what's going on.

* loader/FormState.cpp:
(WebCore::FormState::FormState):
(WebCore::FormState::willDetachPage): RELEASE_ASSERT_NOT_REACHED if we ever get here.
* loader/FormState.h:

Source/WebKit:

Add a RELEASE_ASSERT to see if we ever encounter a nullptr WebCore frame.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/FormState.cpp
trunk/Source/WebCore/loader/FormState.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (229682 => 229683)

--- trunk/Source/WebCore/ChangeLog	2018-03-16 21:01:25 UTC (rev 229682)
+++ trunk/Source/WebCore/ChangeLog	2018-03-16 21:17:27 UTC (rev 229683)
@@ -1,3 +1,20 @@
+2018-03-16  Brent Fulgham  
+
+Set a trap to catch an infrequent form-related nullptr crash
+https://bugs.webkit.org/show_bug.cgi?id=183704
+
+
+Reviewed by Ryosuke Niwa.
+
+Make FormState a FrameDestructionObserver. We expect all relevant FormState objects to have been
+cleaned up prior to the frame being destroyed. If we find such a case, we'd like to see the
+stack trace to see what's going on.
+
+* loader/FormState.cpp:
+(WebCore::FormState::FormState):
+(WebCore::FormState::willDetachPage): RELEASE_ASSERT_NOT_REACHED if we ever get here.
+* loader/FormState.h:
+
 2018-03-16  Joanmarie Diggs  
 
 AX: AccessibilityNodeObject::textForLabelElement() doesn't follow AccName calculation rules


Modified: trunk/Source/WebCore/loader/FormState.cpp (229682 => 229683)

--- trunk/Source/WebCore/loader/FormState.cpp	2018-03-16 21:01:25 UTC (rev 229682)
+++ trunk/Source/WebCore/loader/FormState.cpp	2018-03-16 21:17:27 UTC (rev 229683)
@@ -35,11 +35,13 @@
 namespace WebCore {
 
 inline FormState::FormState(HTMLFormElement& form, StringPairVector&& textFieldValues, Document& sourceDocument, FormSubmissionTrigger formSubmissionTrigger)
-: m_form(form)
+: FrameDestructionObserver(sourceDocument.frame())
+, m_form(form)
 , m_textFieldValues(WTFMove(textFieldValues))
 , m_sourceDocument(sourceDocument)
 , m_formSubmissionTrigger(formSubmissionTrigger)
 {
+RELEASE_ASSERT(sourceDocument.frame());
 }
 
 Ref FormState::create(HTMLFormElement& form, StringPairVector&& textFieldValues, Document& sourceDocument, FormSubmissionTrigger formSubmissionTrigger)
@@ -47,4 +49,10 @@
 return adoptRef(*new FormState(form, WTFMove(textFieldValues), sourceDocument, formSubmissionTrigger));
 }
 
+void FormState::willDetachPage()
+{
+// Beartrap for 
+RELEASE_ASSERT_NOT_REACHED();
 }
+
+}


Modified: trunk/Source/WebCore/loader/FormState.h (229682 => 229683)

--- trunk/Source/WebCore/loader/FormState.h	2018-03-16 21:01:25 UTC (rev 229682)
+++ trunk/Source/WebCore/loader/FormState.h	2018-03-16 21:17:27 UTC (rev 229683)
@@ -28,6 +28,7 @@
 
 #pragma once
 
+#include "FrameDestructionObserver.h"
 #include 
 
 namespace WebCore {
@@ -39,7 +40,7 @@
 
 using StringPairVector = Vector>;
 
-class FormState : public RefCounted {
+class FormState : public RefCounted, public FrameDestructionObserver {
 public:
 static Ref create(HTMLFormElement&, StringPairVector&& textFieldValues, Document&, FormSubmissionTrigger);
 
@@ -50,6 +51,7 @@
 
 private:
 FormState(HTMLFormElement&, StringPairVector&& textFieldValues, Document&, FormSubmissionTrigger);
+void willDetachPage() override;
 
 Ref m_form;
 StringPairVector m_textFieldValues;


Modified: trunk/Source/WebKit/ChangeLog (229682 => 229683)

--- trunk/Source/WebKit/ChangeLog	2018-03-16 21:01:25 UTC (rev 229682)
+++ trunk/Source/WebKit/ChangeLog	2018-03-16 21:17:27 UTC (rev 229683)
@@ -1,3 +1,16 @@
+2018-03-16  Brent Fulgham  
+
+Set a trap to catch an infrequent form-related nullptr crash
+https://bugs.webkit.org/show_bug.cgi?id=183704
+
+
+Reviewed by Ryosuke Niwa.
+
+Add a RELEASE_ASSERT to see if we ever encounter a nullptr WebCore frame.
+
+* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
+
 2018-03-16  Jer Noble  
 
 Make Fullscreen API an Experimental Feature


Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (229682 => 229683)

--- trunk/Source/WebKit/WebProcess/

[webkit-changes] [229695] trunk

2018-03-16 Thread bfulgham
Title: [229695] trunk








Revision 229695
Author bfulg...@apple.com
Date 2018-03-16 23:44:40 -0700 (Fri, 16 Mar 2018)


Log Message
Correct debug assertion in Range::borderAndTextRects
https://bugs.webkit.org/show_bug.cgi?id=183710


Reviewed by Ryosuke Niwa.

Source/WebCore:

A debug assertion will fire if Range::borderAndTextRects is asked to evaluate a set of selected elements, where one of the elements does not have a parent.

We should consider a nullptr parent as satisfying the condition of a parent not being present in the selection set.

Tests: fast/dom/range/range-selection-empty-body.html

* dom/Range.cpp:
(WebCore::Range::borderAndTextRects const):

LayoutTests:

* fast/dom/Range/range-selection-empty-body-expected.txt: Added.
* fast/dom/Range/range-selection-empty-body.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/dom/Range.cpp


Added Paths

trunk/LayoutTests/fast/dom/Range/range-selection-empty-body-expected.txt
trunk/LayoutTests/fast/dom/Range/range-selection-empty-body.html




Diff

Modified: trunk/LayoutTests/ChangeLog (229694 => 229695)

--- trunk/LayoutTests/ChangeLog	2018-03-17 06:11:00 UTC (rev 229694)
+++ trunk/LayoutTests/ChangeLog	2018-03-17 06:44:40 UTC (rev 229695)
@@ -1,3 +1,14 @@
+2018-03-16  Brent Fulgham  
+
+Correct debug assertion in Range::borderAndTextRects
+https://bugs.webkit.org/show_bug.cgi?id=183710
+
+
+Reviewed by Ryosuke Niwa.
+
+* fast/dom/Range/range-selection-empty-body-expected.txt: Added.
+* fast/dom/Range/range-selection-empty-body.html: Added.
+
 2018-03-16  Youenn Fablet  
 
 Add a test verifying that an AppCache manifest request includes credentials


Added: trunk/LayoutTests/fast/dom/Range/range-selection-empty-body-expected.txt (0 => 229695)

--- trunk/LayoutTests/fast/dom/Range/range-selection-empty-body-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/dom/Range/range-selection-empty-body-expected.txt	2018-03-17 06:44:40 UTC (rev 229695)
@@ -0,0 +1 @@
+Test passes if it does not ASSERT.


Added: trunk/LayoutTests/fast/dom/Range/range-selection-empty-body.html (0 => 229695)

--- trunk/LayoutTests/fast/dom/Range/range-selection-empty-body.html	(rev 0)
+++ trunk/LayoutTests/fast/dom/Range/range-selection-empty-body.html	2018-03-17 06:44:40 UTC (rev 229695)
@@ -0,0 +1,20 @@
+
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+function runTest()
+{
+var newBody = document.createElement("body");
+var docRange = document.createRange();
+docRange.selectNodeContents(newBody);
+var boundingRect = docRange.getBoundingClientRect();
+}
+
+
+
+Test passes if it does not ASSERT.
+
+


Modified: trunk/Source/WebCore/ChangeLog (229694 => 229695)

--- trunk/Source/WebCore/ChangeLog	2018-03-17 06:11:00 UTC (rev 229694)
+++ trunk/Source/WebCore/ChangeLog	2018-03-17 06:44:40 UTC (rev 229695)
@@ -1,3 +1,20 @@
+2018-03-16  Brent Fulgham  
+
+Correct debug assertion in Range::borderAndTextRects
+https://bugs.webkit.org/show_bug.cgi?id=183710
+
+
+Reviewed by Ryosuke Niwa.
+
+A debug assertion will fire if Range::borderAndTextRects is asked to evaluate a set of selected elements, where one of the elements does not have a parent.
+
+We should consider a nullptr parent as satisfying the condition of a parent not being present in the selection set.
+
+Tests: fast/dom/range/range-selection-empty-body.html
+
+* dom/Range.cpp:
+(WebCore::Range::borderAndTextRects const):
+
 2018-03-15  Filip Pizlo  
 
 Put the DOM in IsoHeaps


Modified: trunk/Source/WebCore/dom/Range.cpp (229694 => 229695)

--- trunk/Source/WebCore/dom/Range.cpp	2018-03-17 06:11:00 UTC (rev 229694)
+++ trunk/Source/WebCore/dom/Range.cpp	2018-03-17 06:44:40 UTC (rev 229695)
@@ -1823,7 +1823,7 @@
 selectedElementsSet.remove(parent);
 
 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(*node)) {
-if (is(*node) && selectedElementsSet.contains(node) && !selectedElementsSet.contains(node->parentNode())) {
+if (is(*node) && selectedElementsSet.contains(node) && (!node->parentNode() || !selectedElementsSet.contains(node->parentNode( {
 if (auto* renderer = downcast(*node).renderBoxModelObject()) {
 Vector elementQuads;
 renderer->absoluteQuads(elementQuads);






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


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

2018-03-20 Thread bfulgham
Title: [229757] trunk/Source/WebKit








Revision 229757
Author bfulg...@apple.com
Date 2018-03-20 08:34:30 -0700 (Tue, 20 Mar 2018)


Log Message
[iOS] Grant IOKit preference access for the Home button
https://bugs.webkit.org/show_bug.cgi?id=183754


Reviewed by Eric Carlson.

* 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 (229756 => 229757)

--- trunk/Source/WebKit/ChangeLog	2018-03-20 15:21:32 UTC (rev 229756)
+++ trunk/Source/WebKit/ChangeLog	2018-03-20 15:34:30 UTC (rev 229757)
@@ -1,3 +1,13 @@
+2018-03-20  Brent Fulgham  
+
+[iOS] Grant IOKit preference access for the Home button
+https://bugs.webkit.org/show_bug.cgi?id=183754
+
+
+Reviewed by Eric Carlson.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2018-03-20  Wenson Hsieh  
 
 [Extra zoom mode] Adopt updated input view controller machinery for text input


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-03-20 15:21:32 UTC (rev 229756)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-03-20 15:34:30 UTC (rev 229757)
@@ -194,6 +194,11 @@
 (allow iokit-get-properties
 (iokit-property "client")))
 
+;; Home Button
+(with-filter (iokit-registry-entry-class "IOPlatformDevice")
+(allow iokit-get-properties
+(iokit-property "home-button-type")))
+
 ;; Common preferences read by UIKit.
 (mobile-preferences-read "com.apple.Accessibility"
 "com.apple.UIKit"






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


[webkit-changes] [229808] trunk/Source/WebCore/PAL

2018-03-21 Thread bfulgham
Title: [229808] trunk/Source/WebCore/PAL








Revision 229808
Author bfulg...@apple.com
Date 2018-03-21 09:32:15 -0700 (Wed, 21 Mar 2018)


Log Message
Remove temporary build fix now that underlying issue is resolved
https://bugs.webkit.org/show_bug.cgi?id=183854


Reviewed by Eric Carlson.

The build environment issues that forced us to disable this setting
have been corrected, so this should be turned on for all builds.

* pal/spi/cf/CFNetworkSPI.h:

Modified Paths

trunk/Source/WebCore/PAL/ChangeLog
trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h




Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (229807 => 229808)

--- trunk/Source/WebCore/PAL/ChangeLog	2018-03-21 16:32:00 UTC (rev 229807)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-03-21 16:32:15 UTC (rev 229808)
@@ -1,3 +1,16 @@
+2018-03-21  Brent Fulgham  
+
+Remove temporary build fix now that underlying issue is resolved
+https://bugs.webkit.org/show_bug.cgi?id=183854
+
+
+Reviewed by Eric Carlson.
+
+The build environment issues that forced us to disable this setting
+have been corrected, so this should be turned on for all builds.
+
+* pal/spi/cf/CFNetworkSPI.h:
+
 2018-03-20  Tim Horton  
 
 Enable the minimal simulator feature flag when appropriate


Modified: trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h (229807 => 229808)

--- trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-03-21 16:32:00 UTC (rev 229807)
+++ trunk/Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h	2018-03-21 16:32:15 UTC (rev 229808)
@@ -32,16 +32,9 @@
 
 #if ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101302 && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110200) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 40200) || (PLATFORM(TVOS) && __TV_OS_VERSION_MIN_REQUIRED >= 110200))
 #define USE_CFNETWORK_IGNORE_HSTS 1
-
-/* FIXME: Remove after rdar 35390452 is fixed: */
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101400
-#undef USE_CFNETWORK_IGNORE_HSTS
-#define USE_CFNETWORK_IGNORE_HSTS 0
 #endif
 
-#endif
 
-
 #if PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
 
 #include 






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


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

2018-03-21 Thread bfulgham
Title: [229823] trunk/Source/WebKit








Revision 229823
Author bfulg...@apple.com
Date 2018-03-21 14:10:01 -0700 (Wed, 21 Mar 2018)


Log Message
Allow the WebContent process to read ViewBridge preferences
https://bugs.webkit.org/show_bug.cgi?id=183862


Reviewed by Eric Carlson.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (229822 => 229823)

--- trunk/Source/WebKit/ChangeLog	2018-03-21 21:07:55 UTC (rev 229822)
+++ trunk/Source/WebKit/ChangeLog	2018-03-21 21:10:01 UTC (rev 229823)
@@ -1,3 +1,13 @@
+2018-03-21  Brent Fulgham  
+
+Allow the WebContent process to read ViewBridge preferences
+https://bugs.webkit.org/show_bug.cgi?id=183862
+
+
+Reviewed by Eric Carlson.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-03-21  Frederic Wang  
 
 [iOS] Text highlighted by the Find UI overlaps with NBC news header on google.com


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-21 21:07:55 UTC (rev 229822)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-03-21 21:10:01 UTC (rev 229823)
@@ -457,6 +457,7 @@
 "com.apple.LaunchServices"
 "com.apple.MultitouchSupport" ;; FIXME: Remove when  is fixed.
 "com.apple.ServicesMenu.Services" ;; Needed for NSAttributedString 
+"com.apple.ViewBridge" ;; Needed for Input elements.
 "com.apple.WebFoundation"
 "com.apple.avfoundation"
 "com.apple.avfoundation.frecents" ;; 






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


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

2018-03-21 Thread bfulgham
Title: [229845] trunk/Source/WTF








Revision 229845
Author bfulg...@apple.com
Date 2018-03-21 21:35:13 -0700 (Wed, 21 Mar 2018)


Log Message
Create an assertion mechanism to ensure proper WebCore use in each WebKit Process
https://bugs.webkit.org/show_bug.cgi?id=183806


Reviewed by Ryosuke Niwa.

Part of our security improvements involve better isolation between the different WebKit
processes (UIProcess, WebContent, Networking, Storage, etc.).

We need an assertion language we can use to protect certain critical APIs and code paths
against accidental misuse.

This patch adds a new enum type meant to represent different categories of program logic
that we do not want used in the wrong process.

This first patch just creates these types and makes them available. New assertions using
these values will be added as we complete our work ensuring proper process isolation.

In a method we want to protect, we can add an assertion describing the process privileges
needed to execute the code. For example, for cookie access we might use this:

ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies);

At the launch of the UIProcess we would use this method to ensure all privileges are available:

setProcessPrivileges(allPrivileges());

In the network process, during platform initialization, we would use something like this:

setProcessPrivileges({ ProcessPrivilege::CanAccessRawCookies, ProcessPrivilege::CanAccessCredentials });

In the WebContent process, we would not set any privileges. We could just leave it as the
default initialization, or use this:

setProcessPrivileges({ });

Later, when we attempt to execute the initial code, we would expect an assertion for the
WebContent process, while Network and UIProcess pass the assertion.

* WTF.xcodeproj/project.pbxproj: Add new files.
* wtf/CMakeLists.txt: Ditto.
* wtf/ProcessPrivilege.cpp: Added.
(WTF::processPrivileges):
(WTF::setProcessPrivileges):
(WTF::hasProcessPrivilege):
* wtf/ProcessPrivilege.h: Added.

Modified Paths

trunk/Source/WTF/ChangeLog
trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
trunk/Source/WTF/wtf/CMakeLists.txt


Added Paths

trunk/Source/WTF/wtf/ProcessPrivilege.cpp
trunk/Source/WTF/wtf/ProcessPrivilege.h




Diff

Modified: trunk/Source/WTF/ChangeLog (229844 => 229845)

--- trunk/Source/WTF/ChangeLog	2018-03-22 04:20:28 UTC (rev 229844)
+++ trunk/Source/WTF/ChangeLog	2018-03-22 04:35:13 UTC (rev 229845)
@@ -1,3 +1,52 @@
+2018-03-20  Brent Fulgham  
+
+Create an assertion mechanism to ensure proper WebCore use in each WebKit Process
+https://bugs.webkit.org/show_bug.cgi?id=183806
+
+
+Reviewed by Ryosuke Niwa.
+
+Part of our security improvements involve better isolation between the different WebKit
+processes (UIProcess, WebContent, Networking, Storage, etc.).
+
+We need an assertion language we can use to protect certain critical APIs and code paths
+against accidental misuse.
+
+This patch adds a new enum type meant to represent different categories of program logic
+that we do not want used in the wrong process.
+
+This first patch just creates these types and makes them available. New assertions using
+these values will be added as we complete our work ensuring proper process isolation.
+
+In a method we want to protect, we can add an assertion describing the process privileges
+needed to execute the code. For example, for cookie access we might use this:
+
+ASSERT(hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies);
+
+At the launch of the UIProcess we would use this method to ensure all privileges are available:
+
+setProcessPrivileges(allPrivileges());
+
+In the network process, during platform initialization, we would use something like this:
+
+setProcessPrivileges({ ProcessPrivilege::CanAccessRawCookies, ProcessPrivilege::CanAccessCredentials });
+
+In the WebContent process, we would not set any privileges. We could just leave it as the
+default initialization, or use this:
+
+setProcessPrivileges({ });
+
+Later, when we attempt to execute the initial code, we would expect an assertion for the
+WebContent process, while Network and UIProcess pass the assertion.
+
+* WTF.xcodeproj/project.pbxproj: Add new files.
+* wtf/CMakeLists.txt: Ditto.
+* wtf/ProcessPrivilege.cpp: Added.
+(WTF::processPrivileges):
+(WTF::setProcessPrivileges):
+(WTF::hasProcessPrivilege):
+* wtf/ProcessPrivilege.h: Added.
+
 2018-03-20  Tim Horton  
 
 Introduce HAVE_MEDIA_PLAYER and HAVE_CORE_VIDEO


Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (229844 => 229845)

--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2018-03-22 04:20:28 UTC (rev 229844)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2018-03-22 04:35:13 UTC (rev 229845)
@@ -7

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

2018-07-20 Thread bfulgham
Title: [234054] trunk/Source/WebKit








Revision 234054
Author bfulg...@apple.com
Date 2018-07-20 10:45:38 -0700 (Fri, 20 Jul 2018)


Log Message
[macOS] Relax WebKit sandbox to permit proper App Store behavior
https://bugs.webkit.org/show_bug.cgi?id=187831


Reviewed by Alexey Proskuryakov.

The Mac App Store is unable to perform some gift card redemption tasks on macOS due to missing sandbox permissions.
This patch adds those permissions.

* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (234053 => 234054)

--- trunk/Source/WebKit/ChangeLog	2018-07-20 17:36:57 UTC (rev 234053)
+++ trunk/Source/WebKit/ChangeLog	2018-07-20 17:45:38 UTC (rev 234054)
@@ -1,3 +1,16 @@
+2018-07-20  Brent Fulgham  
+
+[macOS] Relax WebKit sandbox to permit proper App Store behavior
+https://bugs.webkit.org/show_bug.cgi?id=187831
+
+
+Reviewed by Alexey Proskuryakov.
+
+The Mac App Store is unable to perform some gift card redemption tasks on macOS due to missing sandbox permissions.
+This patch adds those permissions.
+
+* PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
+
 2018-07-20  Brady Eidson  
 
 Add WKNavigation/WKNavigationAction related SPI.


Modified: trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in (234053 => 234054)

--- trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-07-20 17:36:57 UTC (rev 234053)
+++ trunk/Source/WebKit/PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in	2018-07-20 17:45:38 UTC (rev 234054)
@@ -367,6 +367,7 @@
 ;; Various services required by AppKit and other frameworks
 (allow mach-lookup
 (global-name "com.apple.audio.AudioComponentRegistrar")
+(global-name "com.apple.assertiond.processassertionconnection")
 (global-name "com.apple.CoreServices.coreservicesd")
 (global-name "com.apple.DiskArbitration.diskarbitrationd")
 (global-name "com.apple.FileCoordination")
@@ -391,6 +392,7 @@
 (global-name "com.apple.ocspd")
 (global-name "com.apple.pasteboard.1")
 (global-name "com.apple.pbs.fetch_services")
+(global-name "com.apple.tccd")
 (global-name "com.apple.tccd.system")
 (global-name "com.apple.tsm.uiserver")
 (global-name "com.apple.window_proxies")






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


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

2018-07-25 Thread bfulgham
Title: [234195] trunk/Source/WebKit








Revision 234195
Author bfulg...@apple.com
Date 2018-07-25 08:47:43 -0700 (Wed, 25 Jul 2018)


Log Message
[macOS] PluginProcess needs TCC entitlements for media capture
https://bugs.webkit.org/show_bug.cgi?id=187981


Reviewed by Chris Dumez.

The changes needed in Bug 185526 are also needed for the plugin process, or else the UIProcess
(e.g., Safari) is not able to pass the user's camera/microphone access permission to the plugin process.

This patch has the following changes:

1. Rename "WebContent-OSX-restricted.entitlements" to "WebContent-or-Plugin-OSX-restricted.entitlements"
2. Rename "process-webcontent-entitlements.sh" to "process-webcontent-or-plugin-entitlements.sh"
3. Add a run-script step to the Plugin.64 and Plugin.32 builds to add the relevant entitlements.
4. Silence some Flash plugin sandbox exceptions triggered after activating the camera.

* Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Renamed from Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements.
* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Address sandbox violations needed by camera use.
* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: Ditto.
* Scripts/process-webcontent-or-plugin-entitlements.sh: Renamed from Source/WebKit/Scripts/process-webcontent-entitlements.sh.
* WebKit.xcodeproj/project.pbxproj: Update for renaming, and perform entitlement steps on Plugin process.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb
trunk/Source/WebKit/Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj


Added Paths

trunk/Source/WebKit/Configurations/WebContent-or-Plugin-OSX-restricted.entitlements
trunk/Source/WebKit/Scripts/process-webcontent-or-plugin-entitlements.sh


Removed Paths

trunk/Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements
trunk/Source/WebKit/Scripts/process-webcontent-entitlements.sh




Diff

Modified: trunk/Source/WebKit/ChangeLog (234194 => 234195)

--- trunk/Source/WebKit/ChangeLog	2018-07-25 15:43:44 UTC (rev 234194)
+++ trunk/Source/WebKit/ChangeLog	2018-07-25 15:47:43 UTC (rev 234195)
@@ -1,3 +1,27 @@
+2018-07-25  Brent Fulgham  
+
+[macOS] PluginProcess needs TCC entitlements for media capture
+https://bugs.webkit.org/show_bug.cgi?id=187981
+
+
+Reviewed by Chris Dumez.
+
+The changes needed in Bug 185526 are also needed for the plugin process, or else the UIProcess
+(e.g., Safari) is not able to pass the user's camera/microphone access permission to the plugin process.
+
+This patch has the following changes:
+
+1. Rename "WebContent-OSX-restricted.entitlements" to "WebContent-or-Plugin-OSX-restricted.entitlements"
+2. Rename "process-webcontent-entitlements.sh" to "process-webcontent-or-plugin-entitlements.sh"
+3. Add a run-script step to the Plugin.64 and Plugin.32 builds to add the relevant entitlements.
+4. Silence some Flash plugin sandbox exceptions triggered after activating the camera.
+
+* Configurations/WebContent-or-Plugin-OSX-restricted.entitlements: Renamed from Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements.
+* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player ESR.plugin.sb: Address sandbox violations needed by camera use.
+* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb: Ditto.
+* Scripts/process-webcontent-or-plugin-entitlements.sh: Renamed from Source/WebKit/Scripts/process-webcontent-entitlements.sh.
+* WebKit.xcodeproj/project.pbxproj: Update for renaming, and perform entitlement steps on Plugin process.
+
 2018-07-24  Tim Horton  
 
 Enable Web Content Filtering on watchOS


Deleted: trunk/Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements (234194 => 234195)

--- trunk/Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements	2018-07-25 15:43:44 UTC (rev 234194)
+++ trunk/Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements	2018-07-25 15:47:43 UTC (rev 234195)
@@ -1,11 +0,0 @@
-
-
-
-
-	com.apple.tcc.delegated-services
-	
-		kTCCServiceCamera
-		kTCCServiceMicrophone
-	
-
-


Copied: trunk/Source/WebKit/Configurations/WebContent-or-Plugin-OSX-restricted.entitlements (from rev 234194, trunk/Source/WebKit/Configurations/WebContent-OSX-restricted.entitlements) (0 => 234195)

--- trunk/Source/WebKit/Configurations/WebContent-or-Plugin-OSX-restricted.entitlements	(rev 0)
+++ trunk/Source/WebKit/Configurations/WebContent-or-Plugin-OSX-restricted.entitlements	2018-07-25 15:47:43 UTC (rev 234195)
@@ -0,0 +1,11 @@
+
+
+
+
+	com.apple.tcc.delegated-services
+	
+		kTCCServiceCamera
+		kTCCServiceMicrophone
+	
+
+


Modified: trunk/Source/WebKit

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

2018-07-25 Thread bfulgham
Title: [234223] trunk/Source/WebKit








Revision 234223
Author bfulg...@apple.com
Date 2018-07-25 17:29:56 -0700 (Wed, 25 Jul 2018)


Log Message
[macOS] Update sandboxes for revised OpenCL calls and streaming media
https://bugs.webkit.org/show_bug.cgi?id=188013


Reviewed by Eric Carlson.

Testing logs from recent Mojave builds shows that OpenCL is checking more CPU-specific values as part of WebKit
painting operations. We need to allow these checks in the sandbox to support these more optimized drawing operations.

I also corrected some sandbox violations I found while investigating streaming media issues.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (234222 => 234223)

--- trunk/Source/WebKit/ChangeLog	2018-07-26 00:29:23 UTC (rev 234222)
+++ trunk/Source/WebKit/ChangeLog	2018-07-26 00:29:56 UTC (rev 234223)
@@ -1,3 +1,18 @@
+2018-07-25  Brent Fulgham  
+
+[macOS] Update sandboxes for revised OpenCL calls and streaming media
+https://bugs.webkit.org/show_bug.cgi?id=188013
+
+
+Reviewed by Eric Carlson.
+
+Testing logs from recent Mojave builds shows that OpenCL is checking more CPU-specific values as part of WebKit
+painting operations. We need to allow these checks in the sandbox to support these more optimized drawing operations.
+
+I also corrected some sandbox violations I found while investigating streaming media issues.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-07-25  Jeremy Jones  
 
 Mask AVBackgroundView to the corner radius.


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-07-26 00:29:23 UTC (rev 234222)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-07-26 00:29:56 UTC (rev 234223)
@@ -165,7 +165,6 @@
 "hw.byteorder"
 "hw.busfrequency_max"
 "hw.cputype"
-"hw.l2cachesize"
 "hw.machine"
 "hw.memsize"
 "hw.model"
@@ -176,10 +175,12 @@
 "kern.memorystatus_level"
 "kern.safeboot"
 "kern.version"
+"machdep.cpu.brand_string"
 "security.mac.sandbox.sentinel"
 "vm.footprint_suspend")
 (sysctl-name-regex #"^hw.(active|avail)cpu")
-(sysctl-name-regex #"^hw.(busfrequency|cachelinesize|cpufrequency|pagesize|tbfrequency)_compat")
+(sysctl-name-regex #"^hw.(busfrequency|cachelinesize|cpufrequency(|_max)|pagesize|tbfrequency)(|_compat)")
+(sysctl-name-regex #"^hw.l.+cachesize")
 (sysctl-name-regex #"^hw.(logical|physical)cpu_max")
 (sysctl-name-regex #"^hw.optional\.")
 (sysctl-name-regex #"^kern.os(release|type|variant_status|version)")
@@ -260,6 +261,7 @@
 (iokit-property-regex #"^IOName(|Match(|ed))")
 (iokit-property "IOOCDBundleName")
 (iokit-property "IOPCITunnelled")
+(iokit-property "IOPCITunnelCompatible")
 (iokit-property "IOPMStrictTreeOrder")
 (iokit-property "IOParentMatch")
 (iokit-property-regex #"^IOPCI((Class|Primary|Property|)Match|Express(Capabilities|Link(Status|Capabilities))|MSIMode|Resourced|Tunnelled)")
@@ -492,6 +494,11 @@
 (allow file-read*
 (literal "/Library/Preferences/com.apple.ViewBridge.plist"))
 
+; FIXME: This is needed for some security framework calls (that use non-CFPreferences readers)
+(allow file-read-data
+(literal "/Library/Preferences/com.apple.security.plist")
+(home-subpath "/Library/Preferences/com.apple.security.plist"))
+
 ;; On-disk WebKit2 framework location, to account for debug installations outside of /System/Library/Frameworks,
 ;; and to allow issuing extensions.
 (allow-read-directory-and-issue-read-extensions (param "WEBKIT2_FRAMEWORK_DIR"))
@@ -573,6 +580,7 @@
(global-name "com.apple.analyticsd")
(global-name "com.apple.audio.AudioComponentRegistrar")
 #endif
+   (global-name "com.apple.assertiond.processassertionconnection")
(global-name "com.apple.audio.audiohald")
(global-name "com.apple.audio.coreaudiod")
(global-name "com.apple.awdd")
@@ -579,6 +587,7 @@
(global-name "com.apple.cfnetwork.AuthBrokerAgent")
(global-name "com.apple.cfprefsd.agent")
(global-name "com.apple.cfprefsd.daemon")
+   (global-name "com.apple.cmio.registerassistantservice") ;; Needed by CoreMedia for plugin drivers
(global-name "com.apple.cookied")
(global-name "com.apple.coreservices.launchservicesd")
(global-name "com.apple.diagnosticd")
@@ -593,6 +602,7 @@
(global-name "com.apple.lsd.mapdb")
(global-name "com.apple.mobileassetd")
(global-name "com.apple.nesessionmanager.flow-divert-token")
+   (global-name "com.apple.powerlog.plxpclogger.xpc")
(global-name "com.apple.speech.speechsynthesisd")
(global-name "c

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

2018-08-17 Thread bfulgham
Title: [235000] trunk/Source/WebCore








Revision 235000
Author bfulg...@apple.com
Date 2018-08-17 17:09:32 -0700 (Fri, 17 Aug 2018)


Log Message
Remove Adobe SSO exception now that StorageAccess API is available
https://bugs.webkit.org/show_bug.cgi?id=188710


Reviewed by Alex Christensen.

Remove custom quirk now that proper API exists to allow the same functions.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logSubresourceLoading): Remove unneeded quirk.
(WebCore::resourceNeedsSSOQuirk): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (234999 => 235000)

--- trunk/Source/WebCore/ChangeLog	2018-08-18 00:00:25 UTC (rev 234999)
+++ trunk/Source/WebCore/ChangeLog	2018-08-18 00:09:32 UTC (rev 235000)
@@ -1,3 +1,17 @@
+2018-08-17  Brent Fulgham  
+
+Remove Adobe SSO exception now that StorageAccess API is available
+https://bugs.webkit.org/show_bug.cgi?id=188710
+
+
+Reviewed by Alex Christensen.
+
+Remove custom quirk now that proper API exists to allow the same functions.
+
+* loader/ResourceLoadObserver.cpp:
+(WebCore::ResourceLoadObserver::logSubresourceLoading): Remove unneeded quirk.
+(WebCore::resourceNeedsSSOQuirk): Deleted.
+
 2018-08-17  Ryosuke Niwa  
 
 Replace canBubble and cancelable booleans in Event by enum classes


Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (234999 => 235000)

--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-08-18 00:00:25 UTC (rev 234999)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-08-18 00:09:32 UTC (rev 235000)
@@ -104,15 +104,6 @@
 return DeprecatedGlobalSettings::resourceLoadStatisticsEnabled() && !page->usesEphemeralSession() && m_notificationCallback;
 }
 
-// FIXME: This quirk was added to address  and should be removed once content is fixed.
-static bool resourceNeedsSSOQuirk(Page* page, const URL& url)
-{
-if (!shouldEnableSiteSpecificQuirks(page))
-return false;
-
-return equalIgnoringASCIICase(url.host(), "sp.auth.adobe.com");
-}
-
 void ResourceLoadObserver::logSubresourceLoading(const Frame* frame, const ResourceRequest& newRequest, const ResourceResponse& redirectResponse)
 {
 ASSERT(frame->page());
@@ -139,9 +130,6 @@
 if (areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || (isRedirect && areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain)))
 return;
 
-if (resourceNeedsSSOQuirk(page, targetURL))
-return;
-
 bool shouldCallNotificationCallback = false;
 {
 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);






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


[webkit-changes] [235132] trunk/Source

2018-08-21 Thread bfulgham
Title: [235132] trunk/Source








Revision 235132
Author bfulg...@apple.com
Date 2018-08-21 13:37:27 -0700 (Tue, 21 Aug 2018)


Log Message
Remove experimental affiliated domain code now that StorageAccess API is available
https://bugs.webkit.org/show_bug.cgi?id=188756


Reviewed by Alex Christensen.

In Bug 174661 we added a compatibility quirk to support wsj.com authentication. This quirk is no longer needed,
since the StorageAccess API provides the necessary tools to do this type of interaction without needing global
cross-site access.

Source/WebCore:

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::areDomainsAssociated): Deleted.
(WebCore::shouldEnableSiteSpecificQuirks): Deleted.
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::areDomainsAssociated): Deleted.
* loader/ResourceLoadStatistics.h:

Source/WebKit:

* UIProcess/ResourceLoadStatisticsMemoryStore.cpp:
(WebKit::ResourceLoadStatisticsMemoryStore::logFrameNavigation):
* UIProcess/ResourceLoadStatisticsMemoryStore.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::logFrameNavigation):
(WebKit::areDomainsAssociated): Deleted.

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/loader/ResourceLoadObserver.cpp
trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp
trunk/Source/WebCore/loader/ResourceLoadStatistics.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp
trunk/Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.h
trunk/Source/WebKit/UIProcess/WebResourceLoadStatisticsStore.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (235131 => 235132)

--- trunk/Source/WebCore/ChangeLog	2018-08-21 19:39:13 UTC (rev 235131)
+++ trunk/Source/WebCore/ChangeLog	2018-08-21 20:37:27 UTC (rev 235132)
@@ -1,3 +1,24 @@
+2018-08-21  Brent Fulgham  
+
+Remove experimental affiliated domain code now that StorageAccess API is available
+https://bugs.webkit.org/show_bug.cgi?id=188756
+
+
+Reviewed by Alex Christensen.
+
+In Bug 174661 we added a compatibility quirk to support wsj.com authentication. This quirk is no longer needed,
+since the StorageAccess API provides the necessary tools to do this type of interaction without needing global
+cross-site access.
+
+* loader/ResourceLoadObserver.cpp:
+(WebCore::ResourceLoadObserver::logSubresourceLoading):
+(WebCore::ResourceLoadObserver::logWebSocketLoading):
+(WebCore::areDomainsAssociated): Deleted.
+(WebCore::shouldEnableSiteSpecificQuirks): Deleted.
+* loader/ResourceLoadStatistics.cpp:
+(WebCore::ResourceLoadStatistics::areDomainsAssociated): Deleted.
+* loader/ResourceLoadStatistics.h:
+
 2018-08-21  Antti Koivisto  
 
 Allow creating WeakPtrs to const objects


Modified: trunk/Source/WebCore/loader/ResourceLoadObserver.cpp (235131 => 235132)

--- trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-08-21 19:39:13 UTC (rev 235131)
+++ trunk/Source/WebCore/loader/ResourceLoadObserver.cpp	2018-08-21 20:37:27 UTC (rev 235132)
@@ -56,24 +56,6 @@
 return resourceLoadObserver;
 }
 
-static bool shouldEnableSiteSpecificQuirks(Page* page)
-{
-#if PLATFORM(IOS)
-UNUSED_PARAM(page);
-
-// There is currently no way to toggle the needsSiteSpecificQuirks setting on iOS so we always enable
-// the site-specific quirks on iOS.
-return true;
-#else
-return page && page->settings().needsSiteSpecificQuirks();
-#endif
-}
-
-static bool areDomainsAssociated(Page* page, const String& firstDomain, const String& secondDomain)
-{
-return ResourceLoadStatistics::areDomainsAssociated(shouldEnableSiteSpecificQuirks(page), firstDomain, secondDomain);
-}
-
 void ResourceLoadObserver::setNotificationCallback(WTF::Function&&)>&& notificationCallback)
 {
 ASSERT(!m_notificationCallback);
@@ -123,8 +105,8 @@
 auto targetPrimaryDomain = primaryDomain(targetURL);
 auto mainFramePrimaryDomain = primaryDomain(mainFrameURL);
 auto sourcePrimaryDomain = primaryDomain(sourceURL);
-
-if (areDomainsAssociated(page, targetPrimaryDomain, mainFramePrimaryDomain) || (isRedirect && areDomainsAssociated(page, targetPrimaryDomain, sourcePrimaryDomain)))
+
+if (targetPrimaryDomain == mainFramePrimaryDomain || (isRedirect && targetPrimaryDomain == sourcePrimaryDomain))
 return;
 
 bool shouldCallNotificationCallback = false;
@@ -163,6 +145,9 @@
 auto targetPrimaryDomain = primaryDomain(targetURL);
 auto mainFramePrimaryDomain = primaryDomain(mainFrameURL);
 
+if (targetPrimaryDomain == mainFramePrimaryDomain)
+return;
+
 auto& targetStatistics = ensureResourceStatisticsForPrimaryDomain(targetPrimaryDomain);
 targetStatistics.lastSeen = ResourceLoadStatistics::reduceTimeResolution(WallTime:

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

2018-08-30 Thread bfulgham
Title: [235506] trunk/Source/WebKit








Revision 235506
Author bfulg...@apple.com
Date 2018-08-30 09:30:11 -0700 (Thu, 30 Aug 2018)


Log Message
[macOS] Whitelist Network process features for VPN
https://bugs.webkit.org/show_bug.cgi?id=189023


Reviewed by Eric Carlson.

CFNetwork needs access to some VPN preference files to configure networking, and
need to be allowed to communicate with the VPN process from the Network Process
sandbox.

* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (235505 => 235506)

--- trunk/Source/WebKit/ChangeLog	2018-08-30 14:44:59 UTC (rev 235505)
+++ trunk/Source/WebKit/ChangeLog	2018-08-30 16:30:11 UTC (rev 235506)
@@ -1,3 +1,17 @@
+2018-08-30  Brent Fulgham  
+
+[macOS] Whitelist Network process features for VPN
+https://bugs.webkit.org/show_bug.cgi?id=189023
+
+
+Reviewed by Eric Carlson.
+
+CFNetwork needs access to some VPN preference files to configure networking, and
+need to be allowed to communicate with the VPN process from the Network Process
+sandbox.
+
+* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
+
 2018-08-30  Yoshiaki Jitsukawa  
 
 [ConnectionUnix] Shrink sizeof AttachmentInfo by reordering members


Modified: trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in (235505 => 235506)

--- trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2018-08-30 14:44:59 UTC (rev 235505)
+++ trunk/Source/WebKit/NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in	2018-08-30 16:30:11 UTC (rev 235506)
@@ -155,6 +155,7 @@
 (global-name "com.apple.cookied")
 (global-name "com.apple.cfnetwork.AuthBrokerAgent")
 (global-name "com.apple.cfnetwork.cfnetworkagent")
+(global-name "com.apple.ist.ds.appleconnect2.service.kdctunnelcontroller")
 (global-name "com.apple.lsd.mapdb")
 (global-name "com.apple.nesessionmanager.flow-divert-token")
 )
@@ -197,8 +198,17 @@
(literal "/Library/Preferences/com.apple.security.revocation.plist")
(home-literal "/Library/Application Support/SyncServices/Local/ClientsWithChanges/com.apple.Keychain")
(home-literal "/Library/Preferences/com.apple.security.plist")
-   (home-literal "/Library/Preferences/com.apple.security.revocation.plist"))
+   (home-literal "/Library/Preferences/com.apple.security.revocation.plist")
 
+   ; Likewise for 
+   (literal "/Library/Preferences/com.apple.ist.ds.appleconnect2.plist")
+   (literal "/Library/Preferences/com.apple.ist.ds.appleconnect2.production.plist")
+   (home-literal "/Library/Preferences/com.apple.ist.ds.appleconnect2.plist")
+   (home-literal "/Library/Preferences/com.apple.ist.ds.appleconnect2.production.plist")
+   (home-regex (string-append "/Library/Preferences/ByHost/com\.apple\.ist\.ds\.appleconnect2\." (uuid-regex-string) "\.plist$"))
+   (home-regex (string-append "/Library/Preferences/ByHost/com\.apple\.ist\.ds\.appleconnect2\.production\." (uuid-regex-string) "\.plist$"))
+)
+
 (allow ipc-posix-shm-read* ipc-posix-shm-write-data
(ipc-posix-name "com.apple.AppleDatabaseChanged"))
 






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


[webkit-changes] [235516] trunk

2018-08-30 Thread bfulgham
Title: [235516] trunk








Revision 235516
Author bfulg...@apple.com
Date 2018-08-30 12:37:37 -0700 (Thu, 30 Aug 2018)


Log Message
The width of a nullptr TextRun should be zero
https://bugs.webkit.org/show_bug.cgi?id=189154


Reviewed by Zalan Bujtas.

Source/WebCore:

If a page has an empty TextRun and attempts to paint it we can crash with a nullptr.

This patch recognizes that an empty TextRun should always produce a zero width, rather than
attempt to compute this value from font data.

Test: fast/text/null-string-textrun.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthOfTextRange const): An empty TextRun has zero width.
(WebCore::FontCascade::width const): Ditto.
(WebCore::FontCascade::codePath const): ASSERT that the TextRun is non-empty.

LayoutTests:

* fast/text/null-string-textrun-expected.txt: Added.
* fast/text/null-string-textrun.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/FontCascade.cpp


Added Paths

trunk/LayoutTests/fast/text/null-string-textrun-expected.txt
trunk/LayoutTests/fast/text/null-string-textrun.html




Diff

Modified: trunk/LayoutTests/ChangeLog (235515 => 235516)

--- trunk/LayoutTests/ChangeLog	2018-08-30 19:27:56 UTC (rev 235515)
+++ trunk/LayoutTests/ChangeLog	2018-08-30 19:37:37 UTC (rev 235516)
@@ -1,3 +1,14 @@
+2018-08-30  Brent Fulgham  
+
+The width of a nullptr TextRun should be zero
+https://bugs.webkit.org/show_bug.cgi?id=189154
+
+
+Reviewed by Zalan Bujtas.
+
+* fast/text/null-string-textrun-expected.txt: Added.
+* fast/text/null-string-textrun.html: Added.
+
 2018-08-30  Eric Carlson  
 
 Mock video devices should only support discrete sizes


Added: trunk/LayoutTests/fast/text/null-string-textrun-expected.txt (0 => 235516)

--- trunk/LayoutTests/fast/text/null-string-textrun-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/text/null-string-textrun-expected.txt	2018-08-30 19:37:37 UTC (rev 235516)
@@ -0,0 +1,6 @@
+This test confirms that a null text run doesn't trigger a crash. It passes if it loads without crashing.
+
+
+
+
+


Added: trunk/LayoutTests/fast/text/null-string-textrun.html (0 => 235516)

--- trunk/LayoutTests/fast/text/null-string-textrun.html	(rev 0)
+++ trunk/LayoutTests/fast/text/null-string-textrun.html	2018-08-30 19:37:37 UTC (rev 235516)
@@ -0,0 +1,19 @@
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+
+
+This test confirms that a null text run doesn't trigger a crash. It passes if it loads without crashing.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file


Modified: trunk/Source/WebCore/ChangeLog (235515 => 235516)

--- trunk/Source/WebCore/ChangeLog	2018-08-30 19:27:56 UTC (rev 235515)
+++ trunk/Source/WebCore/ChangeLog	2018-08-30 19:37:37 UTC (rev 235516)
@@ -1,3 +1,23 @@
+2018-08-30  Brent Fulgham  
+
+The width of a nullptr TextRun should be zero
+https://bugs.webkit.org/show_bug.cgi?id=189154
+
+
+Reviewed by Zalan Bujtas.
+
+If a page has an empty TextRun and attempts to paint it we can crash with a nullptr.
+
+This patch recognizes that an empty TextRun should always produce a zero width, rather than
+attempt to compute this value from font data.
+
+Test: fast/text/null-string-textrun.html
+
+* platform/graphics/FontCascade.cpp:
+(WebCore::FontCascade::widthOfTextRange const): An empty TextRun has zero width.
+(WebCore::FontCascade::width const): Ditto.
+(WebCore::FontCascade::codePath const): ASSERT that the TextRun is non-empty.
+
 2018-08-30  Eric Carlson  
 
 Mock video devices should only support discrete sizes


Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (235515 => 235516)

--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2018-08-30 19:27:56 UTC (rev 235515)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp	2018-08-30 19:37:37 UTC (rev 235516)
@@ -341,6 +341,9 @@
 ASSERT(from <= to);
 ASSERT(to <= run.length());
 
+if (!run.length())
+return 0;
+
 float offsetBeforeRange = 0;
 float offsetAfterRange = 0;
 float totalWidth = 0;
@@ -385,6 +388,9 @@
 
 float FontCascade::width(const TextRun& run, HashSet* fallbackFonts, GlyphOverflow* glyphOverflow) const
 {
+if (!run.length())
+return 0;
+
 CodePath codePathToUse = codePath(run);
 if (codePathToUse != Complex) {
 // The complex path is more restrictive about returning fallback fonts than the simple path, so we need an explicit test to make their behaviors match.
@@ -604,6 +610,8 @@
 if (s_codePath != Auto)
 return s_codePath;
 
+ASSERT(run.length());
+
 #if !USE(FREETYPE)
 // FIXME: Use the fast code path once it handles partial runs with kerning and l

[webkit-changes] [235721] trunk

2018-09-05 Thread bfulgham
Title: [235721] trunk








Revision 235721
Author bfulg...@apple.com
Date 2018-09-05 21:07:53 -0700 (Wed, 05 Sep 2018)


Log Message
Source/WebCore:
The width of an empty or nullptr TextRun should be zero
https://bugs.webkit.org/show_bug.cgi?id=189154


Reviewed by Zalan Bujtas.

If a page has an empty TextRun and attempts to paint it we can crash with a nullptr.

This patch recognizes that an empty TextRun should always produce a zero width, rather than
attempt to compute this value from font data. It also prevents ListBox from attempting to
paint a null string.

Test: fast/text/null-string-textrun.html

* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::widthOfTextRange const): An empty TextRun has zero width.
(WebCore::FontCascade::width const): Ditto.
* platform/graphics/TextRun.h:
(WebCore::TextRun::TextRun): ASSERT that the supplied String is non-null.
(WebCore::TextRun::setText): Ditto.
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItemForeground): Don't attempt to paint a null string.

Source/WTF:
The width of an empty or nullptr TextRun should be zero
https://bugs.webkit.org/show_bug.cgi?id=189154


Reviewed by Zalan Bujtas.

Most accessors in WTFString.cpp, such as isAllASCII(), hash(), etc., perform a nullptr check
before using m_impl, but is8Bit() does not.

This patch adds a check in the is8Bit() implementation to be consistent with other methods,
and to address a small number of crashes observed in testing.

* wtf/text/WTFString.h:
(WTF::String::is8Bit const):

LayoutTests:
The width of a nullptr TextRun should be zero
https://bugs.webkit.org/show_bug.cgi?id=189154


Reviewed by Zalan Bujtas.

* fast/text/null-string-textrun-expected.txt: Added.
* fast/text/null-string-textrun.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WTF/ChangeLog
trunk/Source/WTF/wtf/text/WTFString.h
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/FontCascade.cpp
trunk/Source/WebCore/platform/graphics/TextRun.h
trunk/Source/WebCore/rendering/RenderListBox.cpp


Added Paths

trunk/LayoutTests/fast/text/null-string-textrun-expected.txt
trunk/LayoutTests/fast/text/null-string-textrun.html




Diff

Modified: trunk/LayoutTests/ChangeLog (235720 => 235721)

--- trunk/LayoutTests/ChangeLog	2018-09-06 04:06:14 UTC (rev 235720)
+++ trunk/LayoutTests/ChangeLog	2018-09-06 04:07:53 UTC (rev 235721)
@@ -1,3 +1,14 @@
+2018-09-05  Brent Fulgham  
+
+The width of a nullptr TextRun should be zero
+https://bugs.webkit.org/show_bug.cgi?id=189154
+
+
+Reviewed by Zalan Bujtas.
+
+* fast/text/null-string-textrun-expected.txt: Added.
+* fast/text/null-string-textrun.html: Added.
+
 2018-09-05  Youenn Fablet  
 
 Expose RTCRtpSender.setParameters


Added: trunk/LayoutTests/fast/text/null-string-textrun-expected.txt (0 => 235721)

--- trunk/LayoutTests/fast/text/null-string-textrun-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/text/null-string-textrun-expected.txt	2018-09-06 04:07:53 UTC (rev 235721)
@@ -0,0 +1,6 @@
+This test confirms that a null text run doesn't trigger a crash. It passes if it loads without crashing.
+
+
+
+
+


Added: trunk/LayoutTests/fast/text/null-string-textrun.html (0 => 235721)

--- trunk/LayoutTests/fast/text/null-string-textrun.html	(rev 0)
+++ trunk/LayoutTests/fast/text/null-string-textrun.html	2018-09-06 04:07:53 UTC (rev 235721)
@@ -0,0 +1,19 @@
+
+
+
+if (window.testRunner)
+testRunner.dumpAsText();
+
+
+
+This test confirms that a null text run doesn't trigger a crash. It passes if it loads without crashing.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file


Modified: trunk/Source/WTF/ChangeLog (235720 => 235721)

--- trunk/Source/WTF/ChangeLog	2018-09-06 04:06:14 UTC (rev 235720)
+++ trunk/Source/WTF/ChangeLog	2018-09-06 04:07:53 UTC (rev 235721)
@@ -1,3 +1,20 @@
+2018-09-05  Brent Fulgham  
+
+The width of an empty or nullptr TextRun should be zero
+https://bugs.webkit.org/show_bug.cgi?id=189154
+
+
+Reviewed by Zalan Bujtas.
+
+Most accessors in WTFString.cpp, such as isAllASCII(), hash(), etc., perform a nullptr check
+before using m_impl, but is8Bit() does not.
+
+This patch adds a check in the is8Bit() implementation to be consistent with other methods,
+and to address a small number of crashes observed in testing.
+
+* wtf/text/WTFString.h:
+(WTF::String::is8Bit const):
+
 2018-09-05  Mark Lam  
 
 Remove unused bad_optional_access implementation.


Modified: trunk/Source/WTF/wtf/text/WTFString.h (235720 => 235721)

--- trunk/Source/WTF/wtf/text/WTFString.h	2018-09-06 04:06:14 UTC (rev 235720)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2018-09-06 04:07:53 UTC (rev 235721)
@@ -1,6 +1,6 @@
 /*
  * (C) 1999 Lars Knoll (kn...@kde.org)
- * Copyright (C) 2004-

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

2018-09-07 Thread bfulgham
Title: [235781] trunk/Source/WebKit








Revision 235781
Author bfulg...@apple.com
Date 2018-09-07 05:28:25 -0700 (Fri, 07 Sep 2018)


Log Message
[iOS] Move default mach-lookup deny to after common.sb is imported
https://bugs.webkit.org/show_bug.cgi?id=189385


Reviewed by Eric Carlson.

* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Move the 'deny mach-lookup' call later in the file.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Ditto.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Ditto.

Modified Paths

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




Diff

Modified: trunk/Source/WebKit/ChangeLog (235780 => 235781)

--- trunk/Source/WebKit/ChangeLog	2018-09-07 05:55:15 UTC (rev 235780)
+++ trunk/Source/WebKit/ChangeLog	2018-09-07 12:28:25 UTC (rev 235781)
@@ -1,3 +1,15 @@
+2018-09-07  Brent Fulgham  
+
+[iOS] Move default mach-lookup deny to after common.sb is imported
+https://bugs.webkit.org/show_bug.cgi?id=189385
+
+
+Reviewed by Eric Carlson.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Move the 'deny mach-lookup' call later in the file.
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Ditto.
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Ditto.
+
 2018-09-06  Wenson Hsieh  
 
 Refactor WebCore::EditAction to be an 8-bit enum class


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb (235780 => 235781)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-09-07 05:55:15 UTC (rev 235780)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-09-07 12:28:25 UTC (rev 235781)
@@ -25,10 +25,10 @@
 (deny default (with partial-symbolication))
 (allow system-audit file-read-metadata)
 
-(deny mach-lookup (xpc-service-name-prefix ""))
-
 (import "common.sb")
 
+(deny mach-lookup (xpc-service-name-prefix #""))
+
 (deny lsopen)
 
 (deny sysctl*)


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb (235780 => 235781)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb	2018-09-07 05:55:15 UTC (rev 235780)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb	2018-09-07 12:28:25 UTC (rev 235781)
@@ -1,4 +1,4 @@
-; Copyright (C) 2014 Apple Inc. All rights reserved.
+; Copyright (C) 2014-2018 Apple Inc. All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, with or without
 ; modification, are permitted provided that the following conditions
@@ -25,10 +25,10 @@
 (deny default (with partial-symbolication))
 (allow system-audit file-read-metadata)
 
-(deny mach-lookup (xpc-service-name-prefix ""))
-
 (import "common.sb")
 
+(deny mach-lookup (xpc-service-name-prefix #""))
+
 (deny lsopen)
 
 (allow file-read* file-write* (extension "com.apple.app-sandbox.read-write"))


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 05:55:15 UTC (rev 235780)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 12:28:25 UTC (rev 235781)
@@ -25,10 +25,10 @@
 (deny default (with partial-symbolication))
 (allow system-audit file-read-metadata)
 
-(deny mach-lookup (xpc-service-name-prefix ""))
-
 (import "common.sb")
 
+(deny mach-lookup (xpc-service-name-prefix #""))
+
 (deny lsopen)
 
 ;;;






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


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

2018-09-07 Thread bfulgham
Title: [235782] trunk/Source/WebKit








Revision 235782
Author bfulg...@apple.com
Date 2018-09-07 08:38:12 -0700 (Fri, 07 Sep 2018)


Log Message
Unreviewed syntax fix after r235781

Don't use hash-quote syntax for these non-regex inputs.

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

Modified Paths

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




Diff

Modified: trunk/Source/WebKit/ChangeLog (235781 => 235782)

--- trunk/Source/WebKit/ChangeLog	2018-09-07 12:28:25 UTC (rev 235781)
+++ trunk/Source/WebKit/ChangeLog	2018-09-07 15:38:12 UTC (rev 235782)
@@ -1,5 +1,15 @@
 2018-09-07  Brent Fulgham  
 
+Unreviewed syntax fix after r235781
+
+Don't use hash-quote syntax for these non-regex inputs.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
+* Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb:
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
+2018-09-07  Brent Fulgham  
+
 [iOS] Move default mach-lookup deny to after common.sb is imported
 https://bugs.webkit.org/show_bug.cgi?id=189385
 


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb (235781 => 235782)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-09-07 12:28:25 UTC (rev 235781)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb	2018-09-07 15:38:12 UTC (rev 235782)
@@ -27,7 +27,7 @@
 
 (import "common.sb")
 
-(deny mach-lookup (xpc-service-name-prefix #""))
+(deny mach-lookup (xpc-service-name-prefix ""))
 
 (deny lsopen)
 


Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb (235781 => 235782)

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb	2018-09-07 12:28:25 UTC (rev 235781)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb	2018-09-07 15:38:12 UTC (rev 235782)
@@ -27,7 +27,7 @@
 
 (import "common.sb")
 
-(deny mach-lookup (xpc-service-name-prefix #""))
+(deny mach-lookup (xpc-service-name-prefix ""))
 
 (deny lsopen)
 


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 12:28:25 UTC (rev 235781)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 15:38:12 UTC (rev 235782)
@@ -27,7 +27,7 @@
 
 (import "common.sb")
 
-(deny mach-lookup (xpc-service-name-prefix #""))
+(deny mach-lookup (xpc-service-name-prefix ""))
 
 (deny lsopen)
 






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


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

2018-09-07 Thread bfulgham
Title: [235791] trunk/Source/WebKit








Revision 235791
Author bfulg...@apple.com
Date 2018-09-07 12:50:41 -0700 (Fri, 07 Sep 2018)


Log Message
[macOS] Remove unused XPC service from sandbox
https://bugs.webkit.org/show_bug.cgi?id=189406


Reviewed by Youenn Fablet.

The API surface exposed by "com.apple.systemstats.analysis" is no longer used by the
WebContent process. Since there is no need for this sandbox opening, we should remove it.

* WebProcess/com.apple.WebProcess.sb.in:

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in




Diff

Modified: trunk/Source/WebKit/ChangeLog (235790 => 235791)

--- trunk/Source/WebKit/ChangeLog	2018-09-07 19:44:48 UTC (rev 235790)
+++ trunk/Source/WebKit/ChangeLog	2018-09-07 19:50:41 UTC (rev 235791)
@@ -1,5 +1,18 @@
 2018-09-07  Brent Fulgham  
 
+[macOS] Remove unused XPC service from sandbox
+https://bugs.webkit.org/show_bug.cgi?id=189406
+
+
+Reviewed by Youenn Fablet.
+
+The API surface exposed by "com.apple.systemstats.analysis" is no longer used by the
+WebContent process. Since there is no need for this sandbox opening, we should remove it.
+
+* WebProcess/com.apple.WebProcess.sb.in:
+
+2018-09-07  Brent Fulgham  
+
 Unreviewed syntax fix after r235781
 
 Don't use hash-quote syntax for these non-regex inputs.


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-09-07 19:44:48 UTC (rev 235790)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-09-07 19:50:41 UTC (rev 235791)
@@ -608,7 +608,6 @@
(global-name "com.apple.system.DirectoryService.libinfo_v1")
(global-name "com.apple.system.logger")
(global-name "com.apple.system.opendirectoryd.api")
-   (global-name "com.apple.systemstats.analysis")
(global-name "com.apple.tccd")
(global-name "com.apple.tccd.system")
(global-name "com.apple.trustd")






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


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

2018-09-07 Thread bfulgham
Title: [235807] trunk/Source/WebKit








Revision 235807
Author bfulg...@apple.com
Date 2018-09-07 14:29:35 -0700 (Fri, 07 Sep 2018)


Log Message
Allow WebContent access to AVCSupported IOKit property in sandbox
https://bugs.webkit.org/show_bug.cgi?id=189429


Reviewed by Eric Carlson.

Allow access to the IOKit properties AVCSupported and HEVCSupported to allow the WebContent process
to check for efficient video codecs.

* 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 (235806 => 235807)

--- trunk/Source/WebKit/ChangeLog	2018-09-07 21:12:41 UTC (rev 235806)
+++ trunk/Source/WebKit/ChangeLog	2018-09-07 21:29:35 UTC (rev 235807)
@@ -1,3 +1,17 @@
+2018-09-07  Brent Fulgham  
+
+Allow WebContent access to AVCSupported IOKit property in sandbox
+https://bugs.webkit.org/show_bug.cgi?id=189429
+
+
+Reviewed by Eric Carlson.
+
+Allow access to the IOKit properties AVCSupported and HEVCSupported to allow the WebContent process
+to check for efficient video codecs.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+* WebProcess/com.apple.WebProcess.sb.in:
+
 2018-09-07  Frederic Wang  
 
 [CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 21:12:41 UTC (rev 235806)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-07 21:29:35 UTC (rev 235807)
@@ -324,9 +324,11 @@
 (allow iokit-get-properties
 (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
 (iokit-property "APTDevice")
+(iokit-property "AVCSupported")
 (iokit-property-regex #"^AppleJPEG(NumCores|Supports(AppleInterchangeFormats|MissingEOI|RSTLogging))")
 (iokit-property "BaseAddressAlignmentRequirement")
 (iokit-property-regex #"^DisplayPipe(PlaneBaseAlignment|StrideRequirements)")
+(iokit-property "HEVCSupported")
 (iokit-property-regex #"^IOGL(|ES(|Metal))BundleName")
 (iokit-property "IOGLESDefaultUseMetal")
 (iokit-property "IOClassNameOverride")


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

--- trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-09-07 21:12:41 UTC (rev 235806)
+++ trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2018-09-07 21:29:35 UTC (rev 235807)
@@ -199,6 +199,7 @@
 (iokit-property-regex #"Apple(GVAKeyDoesNotExist|IntelMEVABundleName)")
 (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)")
 (iokit-property-regex #"^ATY,(cbits|fb_(linebytes|offset|size)|intrev)")
+(iokit-property "AVCSupported")
 (iokit-property "BacklightHandle")
 (iokit-property "BlockSize")
 (iokit-property-regex #"^CEA(ModeID|PixelRepetition)")
@@ -217,6 +218,7 @@
 (iokit-property "Formats")
 (iokit-property "GPUConfigurationVariable")
 (iokit-property "GpuDebugPolicy")
+(iokit-property "HEVCSupported")
 (iokit-property "HIDPointerAccelerationType")
 (iokit-property-regex #"^IOAccel(DisplayPipeCapabilities|Index|Types|Revision)")
 (iokit-property-regex #"^IO(Class|MatchCategory|NameMatch)")






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


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

2018-09-18 Thread bfulgham
Title: [236158] trunk/Source/WebKit








Revision 236158
Author bfulg...@apple.com
Date 2018-09-18 16:17:30 -0700 (Tue, 18 Sep 2018)


Log Message
[iOS] Allow WebContent process to check the "Protocol Characteristics" of files to which it has access
https://bugs.webkit.org/show_bug.cgi?id=189712


Reviewed by Alex Christensen.

* 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 (236157 => 236158)

--- trunk/Source/WebKit/ChangeLog	2018-09-18 22:05:51 UTC (rev 236157)
+++ trunk/Source/WebKit/ChangeLog	2018-09-18 23:17:30 UTC (rev 236158)
@@ -1,3 +1,13 @@
+2018-09-18  Brent Fulgham  
+
+[iOS] Allow WebContent process to check the "Protocol Characteristics" of files to which it has access
+https://bugs.webkit.org/show_bug.cgi?id=189712
+
+
+Reviewed by Alex Christensen.
+
+* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+
 2018-09-18  Chris Dumez  
 
 [iOS] Crash under WebPageProxy::navigationGestureSnapshotWasRemoved()


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

--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-18 22:05:51 UTC (rev 236157)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2018-09-18 23:17:30 UTC (rev 236158)
@@ -334,6 +334,7 @@
 (iokit-property "IOClassNameOverride")
 (iokit-property "IOSurfaceAcceleratorCapabilitiesDict")
 (iokit-property-regex #"^MetalPlugin(Name|ClassName)")
+(iokit-property "Protocol Characteristics")
 (iokit-property "artwork-device-subtype")
 (iokit-property "device-perf-memory-class")
 (iokit-property "emu")






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


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

2018-09-20 Thread bfulgham
Title: [236289] trunk/Source/WebKit








Revision 236289
Author bfulg...@apple.com
Date 2018-09-20 16:11:19 -0700 (Thu, 20 Sep 2018)


Log Message
InjectedBundle parameters often need initialization function called before unarchiving
https://bugs.webkit.org/show_bug.cgi?id=189709


Reviewed by Chris Dumez.

Handle the case where the InjectedBundle parameters do not successfully decode because they contain
an unexpected class from the embedding program. If this happens, try decoding the bundle parameters
after the bundle initialiation function runs, which gives the embedding program the opportunity to
register additional classes that are safe for serialization.

Create a new 'decodeBundleParameters' method that contains the logic that used to live in 'initialize'.
This new method returns 'true' if the serialization was successful, otherwise it returns false.

Revise 'initialize' to call this new method and check the return value. If it fails, try decoding the
bundle parameters after the bundle's initialization function is called.

* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize): Use the new method.
(WebKit::InjectedBundle::decodeBundleParameters): Added.
(WebKit::InjectedBundle::setBundleParameters): Use 'decodeObjectOfClasses' with the more complete
'classesForCoder' method to unarchive the passed bundle parameters, rather than the
NSDictionary-specific method, since InjectedBundles often encode other types of objects, and the
NSDictionary object may itself hold other kinds of objects.

Modified Paths

trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h
trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm




Diff

Modified: trunk/Source/WebKit/ChangeLog (236288 => 236289)

--- trunk/Source/WebKit/ChangeLog	2018-09-20 22:27:28 UTC (rev 236288)
+++ trunk/Source/WebKit/ChangeLog	2018-09-20 23:11:19 UTC (rev 236289)
@@ -1,3 +1,31 @@
+2018-09-20  Brent Fulgham  
+
+InjectedBundle parameters often need initialization function called before unarchiving
+https://bugs.webkit.org/show_bug.cgi?id=189709
+
+
+Reviewed by Chris Dumez.
+
+Handle the case where the InjectedBundle parameters do not successfully decode because they contain
+an unexpected class from the embedding program. If this happens, try decoding the bundle parameters
+after the bundle initialiation function runs, which gives the embedding program the opportunity to
+register additional classes that are safe for serialization.
+
+Create a new 'decodeBundleParameters' method that contains the logic that used to live in 'initialize'.
+This new method returns 'true' if the serialization was successful, otherwise it returns false.
+
+Revise 'initialize' to call this new method and check the return value. If it fails, try decoding the
+bundle parameters after the bundle's initialization function is called.
+
+* WebProcess/InjectedBundle/InjectedBundle.h:
+* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
+(WebKit::InjectedBundle::initialize): Use the new method.
+(WebKit::InjectedBundle::decodeBundleParameters): Added.
+(WebKit::InjectedBundle::setBundleParameters): Use 'decodeObjectOfClasses' with the more complete
+'classesForCoder' method to unarchive the passed bundle parameters, rather than the
+NSDictionary-specific method, since InjectedBundles often encode other types of objects, and the
+NSDictionary object may itself hold other kinds of objects.
+
 2018-09-20  Jer Noble  
 
 Enable Modern EME by default


Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h (236288 => 236289)

--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h	2018-09-20 22:27:28 UTC (rev 236288)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h	2018-09-20 23:11:19 UTC (rev 236289)
@@ -168,6 +168,10 @@
 private:
 explicit InjectedBundle(const WebProcessCreationParameters&);
 
+#if PLATFORM(COCOA) && WK_API_ENABLED
+void decodeBundleParameters(API::Data*);
+#endif
+
 String m_path;
 PlatformBundle m_platformBundle; // This is leaked right now, since we never unload the bundle/module.
 


Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm (236288 => 236289)

--- trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm	2018-09-20 22:27:28 UTC (rev 236288)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm	2018-09-20 23:11:19 UTC (rev 236289)
@@ -98,25 +98,6 @@
 }
 }
 
-#if WK_API_ENABLED
-if (parameters.bundleParameterData) {
-auto bundleParameterData = adoptNS([[NSData alloc] initWithBytesNoCopy:const_cast(static_cast(parameters.bundleParameterData->bytes())) length:parameters.bundleParameterData->s

[webkit-changes] [231050] trunk

2018-04-26 Thread bfulgham
Title: [231050] trunk








Revision 231050
Author bfulg...@apple.com
Date 2018-04-26 10:12:46 -0700 (Thu, 26 Apr 2018)


Log Message
Add port 548 (afpovertcp) to port blacklist
https://bugs.webkit.org/show_bug.cgi?id=185000


Reviewed by David Kilzer.

Source/WebCore:

Tested by security/block-test.html.

* platform/URL.cpp:
(WebCore::portAllowed):Also block port 548.

LayoutTests:

Update test and expectations for new port.

* platform/gtk/security/block-test-expected.txt:
* platform/mac/security/block-test-expected.txt:
* platform/wpe/security/block-test-expected.txt:
* security/block-test-expected.txt:
* security/block-test.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/platform/gtk/security/block-test-expected.txt
trunk/LayoutTests/platform/mac/security/block-test-expected.txt
trunk/LayoutTests/platform/wpe/security/block-test-expected.txt
trunk/LayoutTests/security/block-test-expected.txt
trunk/LayoutTests/security/block-test.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/URL.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (231049 => 231050)

--- trunk/LayoutTests/ChangeLog	2018-04-26 16:48:45 UTC (rev 231049)
+++ trunk/LayoutTests/ChangeLog	2018-04-26 17:12:46 UTC (rev 231050)
@@ -1,3 +1,19 @@
+2018-04-25  Brent Fulgham  
+
+Add port 548 (afpovertcp) to port blacklist
+https://bugs.webkit.org/show_bug.cgi?id=185000
+
+
+Reviewed by David Kilzer.
+
+Update test and expectations for new port.
+
+* platform/gtk/security/block-test-expected.txt:
+* platform/mac/security/block-test-expected.txt:
+* platform/wpe/security/block-test-expected.txt:
+* security/block-test-expected.txt:
+* security/block-test.html:
+
 2018-04-26  Carlos Alberto Lopez Perez  
 
 [WPE] Gardening of tests for the WPE Debug bot.


Modified: trunk/LayoutTests/platform/gtk/security/block-test-expected.txt (231049 => 231050)

--- trunk/LayoutTests/platform/gtk/security/block-test-expected.txt	2018-04-26 16:48:45 UTC (rev 231049)
+++ trunk/LayoutTests/platform/gtk/security/block-test-expected.txt	2018-04-26 17:12:46 UTC (rev 231050)
@@ -1,5 +1,5 @@
 http://255.255.255.255:1/test.jpg - willSendRequest  redirectResponse (null)
- - didFinishLoading
+block-test.html - didFinishLoading
 http://255.255.255.255:1/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:7/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:7/test.jpg - didFailLoadingWithError: 
@@ -95,6 +95,8 @@
 http://255.255.255.255:532/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:540/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:540/test.jpg - didFailLoadingWithError: 
+http://255.255.255.255:548/test.jpg - willSendRequest  redirectResponse (null)
+http://255.255.255.255:548/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:556/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:556/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:563/test.jpg - willSendRequest  redirectResponse (null)
@@ -115,6 +117,8 @@
 http://255.255.255.255:3659/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:4045/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:4045/test.jpg - didFailLoadingWithError: 
+http://255.255.255.255:4190/test.jpg - willSendRequest  redirectResponse (null)
+http://255.255.255.255:4190/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:6000/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:6000/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:6665/test.jpg - willSendRequest  redirectResponse (null)
@@ -133,24 +137,18 @@
 http://255.255.255.255:6697/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255:65535/test.jpg - willSendRequest  redirectResponse (null)
 http://255.255.255.255:65535/test.jpg - didFailLoadingWithError: 
-http://255.255.255.255:65536/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255:65536/test.jpg - didFailLoadingWithError: 
-http://255.255.255.255:4294967295/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255:4294967295/test.jpg - didFailLoadingWithError: 
+http://255.255.255.255:0/test.jpg - willSendRequest  redirectResponse (null)
+http://255.255.255.255:0/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255/test.jpg - didFailLoadingWithError: 
+http://255.255.255.255/test.jpg - didFailLoadingWithError: 
 http://255.255.255.255/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255/test.jpg - didFailLoadingWithError: 
-http://255.255.255.255/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255/test.jpg - didFailLoadingWithError: 
-http://255.255.255.255/test.jpg - willSendRequest  redirectResponse (null)
-http://255.255.255.255/test.

[webkit-changes] [231078] trunk

2018-04-26 Thread bfulgham
Title: [231078] trunk








Revision 231078
Author bfulg...@apple.com
Date 2018-04-26 15:50:55 -0700 (Thu, 26 Apr 2018)


Log Message
Show punycode if URL contains Latin small letter o with dot below character
https://bugs.webkit.org/show_bug.cgi?id=185051


Reviewed by David Kilzer.

Source/WebCore:

Revise our "lookalike character" logic to include the small Latin o
with dot below character.

Test: fast/url/host.html

* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isLookalikeCharacter):

LayoutTests:

* fast/url/host-expected.txt:
* fast/url/host.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/url/host-expected.txt
trunk/LayoutTests/fast/url/host.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm




Diff

Modified: trunk/LayoutTests/ChangeLog (231077 => 231078)

--- trunk/LayoutTests/ChangeLog	2018-04-26 21:53:28 UTC (rev 231077)
+++ trunk/LayoutTests/ChangeLog	2018-04-26 22:50:55 UTC (rev 231078)
@@ -1,3 +1,14 @@
+2018-04-26  Brent Fulgham  
+
+Show punycode if URL contains Latin small letter o with dot below character
+https://bugs.webkit.org/show_bug.cgi?id=185051
+
+
+Reviewed by David Kilzer.
+
+* fast/url/host-expected.txt:
+* fast/url/host.html:
+
 2018-04-26  Sihui Liu  
 
 [iOS] LayoutTest http/tests/quicklook/hide-referer-on-navigation.html is failing


Modified: trunk/LayoutTests/fast/url/host-expected.txt (231077 => 231078)

--- trunk/LayoutTests/fast/url/host-expected.txt	2018-04-26 21:53:28 UTC (rev 231077)
+++ trunk/LayoutTests/fast/url/host-expected.txt	2018-04-26 22:50:55 UTC (rev 231078)
@@ -48,6 +48,7 @@
 PASS canonicalize('http://quip‑apple.com/') is 'http://xn--quipapple-y79d.com/'
 PASS canonicalize('http://quip−apple.com/') is 'http://xn--quipapple-tf4e.com/'
 PASS canonicalize('http://iclouꝱ.com/') is 'http://xn--iclou-rl3s.com/'
+PASS canonicalize('http://gọọgle.com/') is 'http://xn--ggle-gx5aa.com/'
 PASS successfullyParsed is true
 
 TEST COMPLETE


Modified: trunk/LayoutTests/fast/url/host.html (231077 => 231078)

--- trunk/LayoutTests/fast/url/host.html	2018-04-26 21:53:28 UTC (rev 231077)
+++ trunk/LayoutTests/fast/url/host.html	2018-04-26 22:50:55 UTC (rev 231078)
@@ -88,7 +88,8 @@
   ["quip\u2010apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2011apple.com", "xn--quipapple-y79d.com"],
   ["quip\u2212apple.com", "xn--quipapple-tf4e.com"],
-  ["iclou\uA771.com", "xn--iclou-rl3s.com"]
+  ["iclou\uA771.com", "xn--iclou-rl3s.com"],
+  ["g\u1ECD\u1ECDgle.com", "xn--ggle-gx5aa.com"]
 ];
 
 for (var i = 0; i < cases.length; ++i) {


Modified: trunk/Source/WebCore/ChangeLog (231077 => 231078)

--- trunk/Source/WebCore/ChangeLog	2018-04-26 21:53:28 UTC (rev 231077)
+++ trunk/Source/WebCore/ChangeLog	2018-04-26 22:50:55 UTC (rev 231078)
@@ -1,3 +1,19 @@
+2018-04-26  Brent Fulgham  
+
+Show punycode if URL contains Latin small letter o with dot below character
+https://bugs.webkit.org/show_bug.cgi?id=185051
+
+
+Reviewed by David Kilzer.
+
+Revise our "lookalike character" logic to include the small Latin o
+with dot below character.
+
+Test: fast/url/host.html
+
+* platform/mac/WebCoreNSURLExtras.mm:
+(WebCore::isLookalikeCharacter):
+
 2018-04-26  Daniel Bates  
 
 Fix the build following r231068


Modified: trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (231077 => 231078)

--- trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2018-04-26 21:53:28 UTC (rev 231077)
+++ trunk/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm	2018-04-26 22:50:55 UTC (rev 231078)
@@ -147,6 +147,7 @@
 case 0x1D20: /* LATIN LETTER SMALL CAPITAL V */
 case 0x1D21: /* LATIN LETTER SMALL CAPITAL W */
 case 0x1D22: /* LATIN LETTER SMALL CAPITAL Z */
+case 0x1ECD: /* LATIN SMALL LETTER O WITH DOT BELOW */
 case 0x2010: /* HYPHEN */
 case 0x2011: /* NON-BREAKING HYPHEN */
 case 0x2024: /* ONE DOT LEADER */






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


[webkit-changes] [231110] trunk

2018-04-27 Thread bfulgham
Title: [231110] trunk








Revision 231110
Author bfulg...@apple.com
Date 2018-04-27 12:44:02 -0700 (Fri, 27 Apr 2018)


Log Message
URL::appendEncodedHostName is using the deprecated uidna_IDNToASCII function
https://bugs.webkit.org/show_bug.cgi?id=184836

Patch by Christopher Reid  on 2018-04-27
Reviewed by Alex Christensen.

Source/WebCore:

Update URL::appendEncodedHostName to use uidna_nameToASCII as done in r208902.

Test: LayoutTests\fast\url\url-hostname-encoding.html

* platform/URL.cpp:

LayoutTests:

Verify that setting the host or hostname of URL objects will use IDNA2008.

* fast/url/url-hostname-encoding-expected.txt: Added.
* fast/url/url-hostname-encoding.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/URL.cpp


Added Paths

trunk/LayoutTests/fast/url/url-hostname-encoding-expected.txt
trunk/LayoutTests/fast/url/url-hostname-encoding.html




Diff

Modified: trunk/LayoutTests/ChangeLog (231109 => 231110)

--- trunk/LayoutTests/ChangeLog	2018-04-27 19:34:54 UTC (rev 231109)
+++ trunk/LayoutTests/ChangeLog	2018-04-27 19:44:02 UTC (rev 231110)
@@ -1,3 +1,15 @@
+2018-04-27  Christopher Reid  
+
+URL::appendEncodedHostName is using the deprecated uidna_IDNToASCII function
+https://bugs.webkit.org/show_bug.cgi?id=184836
+
+Reviewed by Alex Christensen.
+
+Verify that setting the host or hostname of URL objects will use IDNA2008.
+
+* fast/url/url-hostname-encoding-expected.txt: Added.
+* fast/url/url-hostname-encoding.html: Added.
+
 2018-04-27  Youenn Fablet  
 
 Use NetworkLoadChecker for XHR/fetch loads


Added: trunk/LayoutTests/fast/url/url-hostname-encoding-expected.txt (0 => 231110)

--- trunk/LayoutTests/fast/url/url-hostname-encoding-expected.txt	(rev 0)
+++ trunk/LayoutTests/fast/url/url-hostname-encoding-expected.txt	2018-04-27 19:44:02 UTC (rev 231110)
@@ -0,0 +1,27 @@
+Test that setting the host and hostname attributes of URL objects uses IDNA2008.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS url.hostname is 'xn--bcher-kva.de'
+PASS url.hostname is 'xn--fa-hia.de'
+PASS url.hostname is 'xn--nxasmm1c.com'
+PASS url.hostname is 'xn--10cl1a0b660p.com'
+PASS url.hostname is 'xn--mgba3gch31f060k.com'
+PASS url.hostname is 'lookout.net'
+PASS url.hostname is 'google.com'
+PASS url.hostname is 'ss.com'
+PASS url.hostname is 'ss.foo.com'
+PASS url.host is 'xn--bcher-kva.de'
+PASS url.host is 'xn--fa-hia.de'
+PASS url.host is 'xn--nxasmm1c.com'
+PASS url.host is 'xn--10cl1a0b660p.com'
+PASS url.host is 'xn--mgba3gch31f060k.com'
+PASS url.host is 'lookout.net'
+PASS url.host is 'google.com'
+PASS url.host is 'ss.com'
+PASS url.host is 'ss.foo.com'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/fast/url/url-hostname-encoding.html (0 => 231110)

--- trunk/LayoutTests/fast/url/url-hostname-encoding.html	(rev 0)
+++ trunk/LayoutTests/fast/url/url-hostname-encoding.html	2018-04-27 19:44:02 UTC (rev 231110)
@@ -0,0 +1,54 @@
+
+
+
+
+
+