WebKit-https.git
2 years agoSkip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
ryanhaddad@apple.com [Tue, 23 Jan 2018 02:04:57 +0000 (02:04 +0000)]
Skip http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181833

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (r227011): fast/frames/hidpi-position-iframe-on-device-pixel.html times out
simon.fraser@apple.com [Tue, 23 Jan 2018 02:00:13 +0000 (02:00 +0000)]
REGRESSION (r227011): fast/frames/hidpi-position-iframe-on-device-pixel.html times out
https://bugs.webkit.org/show_bug.cgi?id=181959

Reviewed by Zalan Bujtas.

This test creates 300 iframes, which became slow after r227011 because they all became part
of the non-fast scrollable region, slowing down ScrollingCoordinator::absoluteEventTrackingRegionsForFrame().

Fix by not adding non-scrollable iframes, and making FrameView::isScrollable() more efficient for frames
that have not done layout yet.

* page/FrameView.cpp:
(WebCore::FrameView::isScrollable):
(WebCore::FrameView::addChild):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227379 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate title label size
jonlee@apple.com [Tue, 23 Jan 2018 01:54:06 +0000 (01:54 +0000)]
Update title label size
https://bugs.webkit.org/show_bug.cgi?id=181962
rdar://problem/36754744

Reviewed by Simon Fraser.

* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(-[_WKFullScreenViewController setLocation:secure:trustedName:trustedSite:]): Move titleLabel properties into
createSubviews.
(-[_WKFullScreenViewController createSubviews]): Set the title label for both the cancel and location buttons.
Refer to a const CGFloat for the font size.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227378 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoTemporarily restore block selection code conditionally
megan_gardner@apple.com [Tue, 23 Jan 2018 01:45:27 +0000 (01:45 +0000)]
Temporarily restore block selection code conditionally
https://bugs.webkit.org/show_bug.cgi?id=181895
<rdar://problem/36567325>

Reviewed by Tim Horton.

We need to restore this code temporarily to avoid a crash.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFixed building for macOS 10.12 with the macOS 10.13 SDK after r227156.
mitz@apple.com [Tue, 23 Jan 2018 01:37:14 +0000 (01:37 +0000)]
Fixed building for macOS 10.12 with the macOS 10.13 SDK after r227156.

* Configurations/WebCore.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227376 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWe should not try to link against the Safe Browsing framework on watchOS and tvOS.
commit-queue@webkit.org [Tue, 23 Jan 2018 01:36:19 +0000 (01:36 +0000)]
We should not try to link against the Safe Browsing framework on watchOS and tvOS.
https://bugs.webkit.org/show_bug.cgi?id=181965.

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-22
Reviewed by Tim Horton.

* Configurations/WebKit.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227375 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (r226981): ASSERTION FAILED: startY >= 0 && endY <= height && startY ...
simon.fraser@apple.com [Tue, 23 Jan 2018 01:34:33 +0000 (01:34 +0000)]
REGRESSION (r226981): ASSERTION FAILED: startY >= 0 && endY <= height && startY < endY in WebCore::FEMorphology::platformApplyGeneric
https://bugs.webkit.org/show_bug.cgi?id=181836

Reviewed by Tim Horton.
Source/WebCore:

All the filters that use ParallelJobs<> has the same type of bug where very wide but not tall
filter regions could result in computing an optimalThreadNumber that was greater than the
number of rows to process, which resulted in jobs with zero rows to process.

Since we split the work by rows, cap the maximum number of threads to height/8 so that each job
has at least 8 rows of pixels to process. Add some assertions to detect jobs with zero rows.

FEMorphology was also using implicit float -> int conversion to detect integer overflow of radius,
so change that to use explicit clamping.

Tests: svg/filters/feLighting-parallel-jobs.svg
       svg/filters/feTurbulence-parallel-jobs-wide.svg

* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplyGenericPaint):
(WebCore::FELighting::platformApplyGeneric):
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::platformApplyGeneric):
(WebCore::FEMorphology::platformApply):
(WebCore::FEMorphology::platformApplyDegenerate):
(WebCore::FEMorphology::platformApplySoftware):
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::fillRegion const):
(WebCore::FETurbulence::platformApplySoftware):

LayoutTests:

* svg/filters/feLighting-parallel-jobs.svg: Added.
* svg/filters/feMorphology-invalid-radius.svg: Change the test to detect the bug on non-Retina too.
* svg/filters/feTurbulence-parallel-jobs-wide.svg: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227374 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoResign NowPlaying status when no media element is eligible
ryanhaddad@apple.com [Tue, 23 Jan 2018 01:29:39 +0000 (01:29 +0000)]
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>

Patch by Eric Carlson <eric.carlson@apple.com> on 2018-01-22
Reviewed by Jer Noble.

No new tests, these changes prevent existing tests from crashing.

* html/HTMLMediaElement.h:
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted const): Return early when the media
element has been suspended.
(WebCore::MediaElementSession::canShowControlsManager const): Return false when the
media element has been suspended.
(WebCore::isMainContentForPurposesOfAutoplay): Return early if it isn't safe to update
style because HitTest can force a layout.
(WebCore::MediaElementSession::updateIsMainContent const): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227373 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBegin removing QTKit code
achristensen@apple.com [Tue, 23 Jan 2018 01:25:36 +0000 (01:25 +0000)]
Begin removing QTKit code
https://bugs.webkit.org/show_bug.cgi?id=181951

Reviewed by Jer Noble.

Source/WebCore:

QTKit was being used on El Capitan and before.

* Configurations/WebCore.xcconfig:
* SourcesMac.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
(WebCore::MediaPlayer::supportsType):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h: Removed.
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Removed.
* platform/graphics/mac/MediaTimeQTKit.h: Removed.
* platform/graphics/mac/MediaTimeQTKit.mm: Removed.
* platform/mac/WebVideoFullscreenController.mm:
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController updatePowerAssertions]):

Source/WTF:

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227372 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElem...
wenson_hsieh@apple.com [Tue, 23 Jan 2018 01:09:45 +0000 (01:09 +0000)]
WebViews created via -initSimpleHTMLDocumentWithStyle: don't propagate attachmentElementEnabled state
https://bugs.webkit.org/show_bug.cgi?id=181960
<rdar://problem/36431678>

Reviewed by Tim Horton.

Mail's compose view is initialized via the -initSimpleHTMLDocumentWithStyle: codepath. This is intended to be
a fast path for initializing WebViews, which bypasses certain initialization steps present in the regular -init
path, such as calling -_preferencesChanged: to sync RuntimeEnabledFeatures with WebPreferences.

This means that even though we set -[WebPreferences attachmentElementEnabled] to YES for Mail, the value of the
RuntimeEnabledFeature isn't updated to match. To fix this, we explicitly invoke
RuntimeEnabledFeatures::setAttachmentElementEnabled here to make sure the value is in sync with WebPreferences.

* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227371 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Styles Redesign: data corruption when updating values quickly
nvasilyev@apple.com [Tue, 23 Jan 2018 00:52:32 +0000 (00:52 +0000)]
Web Inspector: Styles Redesign: data corruption when updating values quickly
https://bugs.webkit.org/show_bug.cgi?id=179461
<rdar://problem/35431882>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
update synchronously. Making two or more quick changes resulted in corrupted data.

Imagine we modify a CSS value 3 times:

Front-end:  (1)-(2)---(3)
Back-end:          (1)-----(2)-(3)

The first response from the backend could happen after the 2nd edit. In this patch,
CSSStyleDeclaration is locked when its view is being edited.

To correctly display invalid and overridden properties, the backend is allowed to update
CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
matches the model's text. This should happen when the backend is caught up with the
front-end changes.

* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype.update):
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration):
(WI.CSSStyleDeclaration.prototype.get locked):
(WI.CSSStyleDeclaration.prototype.set locked):
(WI.CSSStyleDeclaration.prototype.set text):

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
Lock CSSStyleDeclaration when a CSS property name or value is focused or
an inline widget is active.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
When selector is focused, clicking on the white-space should not add a new blank property.

LayoutTests:

* inspector/css/modify-css-property-expected.txt: Added.
* inspector/css/modify-css-property.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227370 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMarked fast/forms/searchfield-heights.html as flaky on High Sierra.
jlewis3@apple.com [Tue, 23 Jan 2018 00:45:17 +0000 (00:45 +0000)]
Marked fast/forms/searchfield-heights.html as flaky on High Sierra.
https://bugs.webkit.org/show_bug.cgi?id=181914

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227369 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSkipped http/tests/resourceLoadStatistics/grandfathering.html.
jlewis3@apple.com [Tue, 23 Jan 2018 00:01:44 +0000 (00:01 +0000)]
Skipped http/tests/resourceLoadStatistics/grandfathering.html.
https://bugs.webkit.org/show_bug.cgi?id=181482

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227368 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark inspector/debugger/tail-deleted-frames-from-vm-entry.html as slow on macOS Debug.
ryanhaddad@apple.com [Mon, 22 Jan 2018 22:38:55 +0000 (22:38 +0000)]
Mark inspector/debugger/tail-deleted-frames-from-vm-entry.html as slow on macOS Debug.
https://bugs.webkit.org/show_bug.cgi?id=181952

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227365 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove pre-NetworkSession loading code
achristensen@apple.com [Mon, 22 Jan 2018 22:28:44 +0000 (22:28 +0000)]
Remove pre-NetworkSession loading code
https://bugs.webkit.org/show_bug.cgi?id=181944

Reviewed by Tim Horton.

We were keeping it around for El Capitan.

* NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm:
(WebKit::LegacyCustomProtocolManager::registerProtocolClass):
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.cpp:
(WebKit::LegacyCustomProtocolManager::initialize):
* NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h:
* NetworkProcess/Downloads/BlobDownloadClient.cpp: Removed.
* NetworkProcess/Downloads/BlobDownloadClient.h: Removed.
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::~Download):
(WebKit::Download::cancel):
(WebKit::Download::didReceiveChallenge):
(WebKit::Download::didFinish):
(WebKit::Download::isAlwaysOnLoggingAllowed const):
(WebKit::Download::start): Deleted.
(WebKit::Download::startWithHandle): Deleted.
(WebKit::Download::didStart): Deleted.
(WebKit::Download::willSendRedirectedRequest): Deleted.
(WebKit::Download::didReceiveAuthenticationChallenge): Deleted.
(WebKit::Download::didReceiveResponse): Deleted.
(WebKit::Download::shouldDecodeSourceDataOfMIMEType): Deleted.
(WebKit::Download::decideDestinationWithSuggestedFilename): Deleted.
(WebKit::Download::decideDestinationWithSuggestedFilenameAsync): Deleted.
(WebKit::Download::didDecideDownloadDestination): Deleted.
(WebKit::Download::continueDidReceiveResponse): Deleted.
* NetworkProcess/Downloads/Download.h:
(WebKit::Download::setBlobFileReferences): Deleted.
(WebKit::Download::request const): Deleted.
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
(WebKit::DownloadManager::willDecidePendingDownloadDestination):
(WebKit::DownloadManager::convertNetworkLoadToDownload):
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
(WebKit::DownloadManager::resumeDownload):
(WebKit::DownloadManager::cancelDownload):
* NetworkProcess/Downloads/DownloadManager.h:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/PendingDownload.cpp:
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
* NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
* NetworkProcess/Downloads/mac/DownloadMac.mm: Removed.
* NetworkProcess/NetworkCORSPreflightChecker.cpp:
* NetworkProcess/NetworkCORSPreflightChecker.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing):
* NetworkProcess/NetworkDataTask.cpp:
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/NetworkDataTaskBlob.cpp:
* NetworkProcess/NetworkDataTaskBlob.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::~NetworkLoad):
(WebKit::NetworkLoad::setDefersLoading):
(WebKit::NetworkLoad::cancel):
(WebKit::NetworkLoad::continueWillSendRequest):
(WebKit::NetworkLoad::continueDidReceiveResponse):
(WebKit::NetworkLoad::shouldCaptureExtraNetworkLoadMetrics const):
(WebKit::NetworkLoad::didReceiveResponseAsync): Deleted.
(WebKit::NetworkLoad::didReceiveBuffer): Deleted.
(WebKit::NetworkLoad::didFinishLoading): Deleted.
(WebKit::NetworkLoad::didFail): Deleted.
(WebKit::NetworkLoad::willSendRequestAsync): Deleted.
(WebKit::NetworkLoad::canAuthenticateAgainstProtectionSpaceAsync): Deleted.
(WebKit::NetworkLoad::shouldUseCredentialStorage): Deleted.
(WebKit::NetworkLoad::didReceiveAuthenticationChallenge): Deleted.
(WebKit::NetworkLoad::receivedCancellation): Deleted.
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkLoadParameters.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::findPendingDownloadLocation):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* NetworkProcess/NetworkSession.cpp:
* NetworkProcess/NetworkSession.h:
* NetworkProcess/PingLoad.cpp:
* NetworkProcess/PingLoad.h:
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
* NetworkProcess/mac/NetworkLoadMac.mm: Removed.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
(WebKit::AuthenticationManager::useCredentialForSingleChallenge):
(WebKit::AuthenticationManager::continueWithoutCredentialForSingleChallenge):
(WebKit::AuthenticationManager::cancelSingleChallenge):
(WebKit::AuthenticationManager::performDefaultHandlingForSingleChallenge):
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinueForSingleChallenge):
* Shared/Authentication/AuthenticationManager.h:
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm: Removed.
* Shared/SessionTracker.cpp:
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* Shared/mac/CookieStorageShim.h: Removed.
* Shared/mac/CookieStorageShim.mm: Removed.
* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient):
* UIProcess/Cocoa/DownloadClient.h:
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::shouldDecodeSourceDataOfMIMEType): Deleted.
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::willSendRequest):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): Deleted.
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): Deleted.
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::clearCachedCredentials):
* config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227364 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/html/browsers/offline/manifest_url_check.html...
ryanhaddad@apple.com [Mon, 22 Jan 2018 22:21:57 +0000 (22:21 +0000)]
Mark imported/w3c/web-platform-tests/html/browsers/offline/manifest_url_check.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179851

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227363 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSW: Make sure ServiceWorker loading and requests are correctly cleared by ITP
commit-queue@webkit.org [Mon, 22 Jan 2018 22:15:22 +0000 (22:15 +0000)]
SW: Make sure ServiceWorker loading and requests are correctly cleared by ITP
https://bugs.webkit.org/show_bug.cgi?id=181942
<rdar://problem/35132091>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-22
Reviewed by Chris Dumez.

Add ServiceWorkerRegistrations and DOMCache as persistent data to be cleared according ITP decisions.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::monitoredDataTypes):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227358 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Win] Null pointer crash under WebCore::RenderStyle::colorIncludingFallback.
pvollan@apple.com [Mon, 22 Jan 2018 22:12:58 +0000 (22:12 +0000)]
[Win] Null pointer crash under WebCore::RenderStyle::colorIncludingFallback.
https://bugs.webkit.org/show_bug.cgi?id=181801
<rdar://problem/35614900>

Reviewed by Brent Fulgham.

Do not paint synchronously when popup items have been added or changed while the popup is visible.
If new popup items have been added after the popup was shown, a synchronous paint operation will
possibly access their style before it is ready, leading to a null pointer crash. The invalidated
area will be painted asynchronously.

No new tests. To reproduce this crash, it is necessary to open a popup with JavaScript, add new
popup items, and then end the test. Opening the popup can be done by sending a mousedown event
with the eventsender. However, on Windows the mousedown event is sent synchronously, and will
block as long as the popup is open and running the popup event loop. This means no JS can be
executed until the popup is closed, causing the test to always time out before new popup items
can be added. I have verified the fix with a manual test case.

* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::updateFromElement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227357 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExtend 'ifBuilt' config key to set property based on whether certain repositories...
dewei_zhu@apple.com [Mon, 22 Jan 2018 22:08:03 +0000 (22:08 +0000)]
Extend 'ifBuilt' config key to set property based on whether certain repositories are built or not.
https://bugs.webkit.org/show_bug.cgi?id=181906

Reviewed by Ryosuke Niwa.

Before this change, 'ifBuilt' will always set specified property for test properties as long as there
is a build type build in the same build request group. However, this is no longer valid as we don't
want to set specified property for testing when only owned commit is built in previous build.
'ifBuilt' needs to conditionally set property based on whether certain required repositories are built.
Empty required repository list means no requirement on repository to set property.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):In the case of 'built', only set property when
repository requirment is meet and there is a 'build' root request in the same build request group.
(BuildbotSyncer._parseRepositoryGroup): Extend 'ifBuild' to pass information based on contition.
* unit-tests/buildbot-syncer-tests.js: Added unit tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMarked http/wpt/service-workers/update-service-worker.https.html as flaky on High...
jlewis3@apple.com [Mon, 22 Jan 2018 21:32:58 +0000 (21:32 +0000)]
Marked http/wpt/service-workers/update-service-worker.https.html as flaky on High Sierra release.
https://bugs.webkit.org/show_bug.cgi?id=181753

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227354 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRELEASE_ASSERT(registration) hit in SWServer::installContextData(const ServiceWorkerC...
cdumez@apple.com [Mon, 22 Jan 2018 21:27:18 +0000 (21:27 +0000)]
RELEASE_ASSERT(registration) hit in SWServer::installContextData(const ServiceWorkerContextData&)
https://bugs.webkit.org/show_bug.cgi?id=181941
<rdar://problem/36744892>

Reviewed by Youenn Fablet.

Make sure we clear SWServer::m_pendingContextDatas & SWServer::m_pendingJobs as needed
when clearing Website data. Otherwise, we will hit assertion when those gets processed
after the connection to the SW process has been established (not to mentioned we failed
to clear some in-memory data even though the user asked us to).

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::clearAll):
(WebCore::SWServer::clear):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227353 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBlob conversion and sanitization doesn't work with Microsoft Word for Mac 2011
rniwa@webkit.org [Mon, 22 Jan 2018 21:13:37 +0000 (21:13 +0000)]
Blob conversion and sanitization doesn't work with Microsoft Word for Mac 2011
https://bugs.webkit.org/show_bug.cgi?id=181616
<rdar://problem/36484908>

Reviewed by Wenson Hsieh.

Source/WebCore:

The bug was caused by WebContentReader::readHTML and WebContentMarkupReader::readHTML not sanitizing plain HTML string
as done for web archives even when custom pasteboard data is enabled. Fixed the bug by doing the sanitization.

Unfortunately, we can't make file URLs available in this case because WebContent process doesn't have sandbox extensions
to access local files referenced by the HTML source in the clipboard, and we can't make WebContent process request for
a sandbox extension¸on an arbitrary local file, as it would defeat the whole point of sandboxing.

Instead, we strip away all HTML attributes referencing a URL whose scheme is not HTTP, HTTPS, or data when sanitizing
text/html from the clipboard to avoid exposing local file paths, which can reveal privacy & security sensitive data
such as the user's full name, and the location of private containers of other applications in the system.

Tests: PasteHTML.DoesNotSanitizeHTMLWhenCustomPasteboardDataIsDisabled
       PasteHTML.DoesNotStripFileURLsWhenCustomPasteboardDataIsDisabled
       PasteHTML.ExposesHTMLTypeInDataTransfer
       PasteHTML.KeepsHTTPURLs
       PasteHTML.SanitizesHTML
       PasteHTML.StripsFileURLs

* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::WebContentReader::readHTML): Fixed the bug by sanitizing the markup, and stripping away file URLs.
(WebCore::WebContentMarkupReader::readHTML): Ditto.
* editing/markup.cpp:
(WebCore::removeSubresourceURLAttributes): Added.
(WebCore::sanitizeMarkup): Added.
* editing/markup.h:

Tools:

Added tests to make sure we sanitize plain HTML, not just web archives,
when and only when custom pasteboard data is enabled.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: Added.
(writeHTMLToPasteboard): Added.
(createWebViewWithCustomPasteboardDataSetting): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227351 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd release logging to help debug issues related to service workers
cdumez@apple.com [Mon, 22 Jan 2018 21:08:46 +0000 (21:08 +0000)]
Add release logging to help debug issues related to service workers
https://bugs.webkit.org/show_bug.cgi?id=181935
<rdar://problem/36735900>

Reviewed by Brady Eidson.

Source/WebCore:

* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::scheduleTaskToUpdateState):
(WebCore::ServiceWorker::postMessage):
(WebCore::ServiceWorker::isAlwaysOnLoggingAllowed const):
* workers/service/ServiceWorker.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::removeRegistration):
(WebCore::ServiceWorkerContainer::updateRegistration):
(WebCore::ServiceWorkerContainer::jobFailedWithException):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
(WebCore::ServiceWorkerContainer::startScriptFetchForJob):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
(WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const):
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):
(WebCore::ServiceWorkerRegistration::scheduleTaskToFireUpdateFoundEvent):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::scriptContextFailedToStart):
(WebCore::SWServer::didFinishInstall):
(WebCore::SWServer::didFinishActivation):
(WebCore::SWServer::terminateWorkerInternal):
* workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::didResolveRegistrationPromise):
(WebCore::SWServerJobQueue::runRegisterJob):

Source/WebKit:

* StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::didFinishFetch):
(WebKit::WebSWServerConnection::didFailFetch):
(WebKit::WebSWServerConnection::didNotHandleFetch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[iOS] REGRESSION (r225763): Allow access to power logging features
bfulgham@apple.com [Mon, 22 Jan 2018 21:01:12 +0000 (21:01 +0000)]
[iOS] REGRESSION (r225763): Allow access to power logging features
https://bugs.webkit.org/show_bug.cgi?id=181938
<rdar://problem/36442803>

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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227349 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSafari Tech Preview can't use GitHub login at forums.swift.org
cdumez@apple.com [Mon, 22 Jan 2018 20:22:43 +0000 (20:22 +0000)]
Safari Tech Preview can't use GitHub login at forums.swift.org
https://bugs.webkit.org/show_bug.cgi?id=181908
<rdar://problem/36715111>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-22
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/wpt/service-workers/navigation-redirect.https.html

For subresource loads, redirections will not change who is in charge of continuing the load (service worker or network process).
For navigation loads, we need to match the registration for every redirection since this is using the Manual redirect mode.
This allows starting the load with a service worker and finishing the load with another service worker, which will become the controller.

Implement this by wrapping the registration matching of an URL within DocumentLoader::matchRegistration.
Use that method in DocumentLoader::redirectReceived.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::matchRegistration):
(WebCore::doRegistrationsMatch):
(WebCore::DocumentLoader::redirectReceived):
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/DocumentLoader.h:

LayoutTests:

* http/wpt/service-workers/navigation-redirect-worker.js: Added.
(async):
* http/wpt/service-workers/navigation-redirect.https-expected.txt: Added.
* http/wpt/service-workers/navigation-redirect.https.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227348 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoStyleBench: Separate test for :nth pseudo classes
antti@apple.com [Mon, 22 Jan 2018 20:18:34 +0000 (20:18 +0000)]
StyleBench: Separate test for :nth pseudo classes
https://bugs.webkit.org/show_bug.cgi?id=181932

Reviewed by Sam Weinig.

Optimization strategies for nth are different from other structural pseudo classes (:first-child etc). Move them to a separate test.

* StyleBench/resources/style-bench.js:
(structuralPseudoClassConfiguration):
(nthPseudoClassConfiguration):

    Add a new configuration.

(predefinedConfigurations):
(pseudoClassConfiguration): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227347 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (Safari 11): Buttons inside a fieldset legend cannot be clicked on in...
antti@apple.com [Mon, 22 Jan 2018 20:07:29 +0000 (20:07 +0000)]
REGRESSION (Safari 11): Buttons inside a fieldset legend cannot be clicked on in Safari 11
https://bugs.webkit.org/show_bug.cgi?id=179666
<rdar://problem/35534292>

Reviewed by Zalan Bujtas.

Source/WebCore:

The legend element of a fieldset is in the border area, outside the clip rect.
With overflow:hidden mouse events won't reach it.

Test case by Dhaya Benmessaoud.

Test: fast/forms/legend-overflow-hidden-hit-test.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::hitTestExcludedChildrenInBorder):

Add a special case to hit testing to handle legend, similarly to what is done for painting.

* rendering/RenderBlock.h:

LayoutTests:

* fast/forms/legend-overflow-hidden-hit-test-expected.txt: Added.
* fast/forms/legend-overflow-hidden-hit-test.html: Added.
* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[macOS, iOS] Allow accss to AVFoundation preference
bfulgham@apple.com [Mon, 22 Jan 2018 19:25:21 +0000 (19:25 +0000)]
[macOS, iOS] Allow accss to AVFoundation preference
https://bugs.webkit.org/show_bug.cgi?id=181937
<rdar://problem/33137029>

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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227345 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAX: Implement support for Graphics ARIA roles
jdiggs@igalia.com [Mon, 22 Jan 2018 19:16:52 +0000 (19:16 +0000)]
AX: Implement support for Graphics ARIA roles
https://bugs.webkit.org/show_bug.cgi?id=181796

Reviewed by Chris Fleizach.

Source/WebCore:

Add mappings for the three new roles (graphics-document, graphics-object,
and graphics-symbol) as per the Graphics Accessibility API Mappings spec.

No new tests; instead, new test cases added to roles-computedRoleString.html
and roles-exposed.html.

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::AccessibilityObject::computedRoleString const):
* accessibility/AccessibilityObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper roleDescription]):

LayoutTests:

Add new test cases and update expectations accordingly.

* accessibility/gtk/xml-roles-exposed-expected.txt:
* accessibility/gtk/xml-roles-exposed.html:
* accessibility/roles-computedRoleString.html:
* accessibility/roles-exposed.html:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:
* platform/gtk/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-computedRoleString-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227344 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(r224535): Can't write reviews in the App Store
antti@apple.com [Mon, 22 Jan 2018 18:48:42 +0000 (18:48 +0000)]
REGRESSION(r224535): Can't write reviews in the App Store
https://bugs.webkit.org/show_bug.cgi?id=181936
<rdar://problem/36670246>

Reviewed by Zalan Bujtas.

* page/LayoutContext.cpp:
(WebCore::LayoutContext::updateStyleForLayout):

r224535 was about media queries but it also removed a seemingly spurious call to SyleScope::didChangeStyleSheetEnvironment
from the path that does not involve media queries.
Turns out UITextContentView somehow depended on it, so revert this specific change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227343 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (r226485): Many new wasm leaks detected by the leaks bot
ap@apple.com [Mon, 22 Jan 2018 18:42:49 +0000 (18:42 +0000)]
REGRESSION (r226485): Many new wasm leaks detected by the leaks bot
https://bugs.webkit.org/show_bug.cgi?id=181400
rdar://problem/36358768

Reviewed by JF Bastien.

* BuildSlaveSupport/build.webkit.org-config/config.json: Disable poisoning on the leaks bot.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227342 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDFG abstract interpreter needs to properly model effects of some Math ops
msaboff@apple.com [Mon, 22 Jan 2018 18:37:55 +0000 (18:37 +0000)]
DFG abstract interpreter needs to properly model effects of some Math ops
https://bugs.webkit.org/show_bug.cgi?id=181886

Reviewed by Saam Barati.

JSTests:

New regression test.

* stress/arith-nodes-abstract-interpreter-untypeduse.js: Added.
(test):

Source/JavaScriptCore:

Reviewed the processing of the various ArithXXX and CompareXXX and found that
several nodes don't handle UntypedUse.  Added clobberWorld() for those cases.

* dfg/DFGAbstractInterpreter.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeDoubleUnaryOpEffects):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227341 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoIn WebKit2, make the MessagePortChannelRegistry live in the UI process.
beidson@apple.com [Mon, 22 Jan 2018 18:35:23 +0000 (18:35 +0000)]
In WebKit2, make the MessagePortChannelRegistry live in the UI process.
https://bugs.webkit.org/show_bug.cgi?id=181922

Reviewed by Andy Estes.

Source/WebCore:

No new tests (Refactor, no behavior change)

Add encoder/decoders and EXPORT a whole bunch of stuff.

* WebCore.xcodeproj/project.pbxproj:

* dom/MessagePort.h:

* dom/messageports/MessagePortChannel.cpp:
(WebCore::MessagePortChannel::processForPort):
* dom/messageports/MessagePortChannel.h:

* dom/messageports/MessagePortChannelProvider.h:
* dom/messageports/MessagePortChannelRegistry.h:

* dom/messageports/MessageWithMessagePorts.h:
(WebCore::MessageWithMessagePorts::encode const):
(WebCore::MessageWithMessagePorts::decode):

Source/WebKit:

With all of the work that went into making MessagePorts be fully asynchronous
and to be process-aware, formally moving them out-of-process is just a matter
of adding WebKit IPC layers.

The basic unit of asynchronicity is "MessagePortChannelProvider", and this patch
adds both a WebMessagePortChannelProvider and UIMessagePortChannelProvider for
each side of the process divide.

* UIProcess/UIMessagePortChannelProvider.cpp: Added.
(WebKit::UIMessagePortChannelProvider::singleton):
(WebKit::UIMessagePortChannelProvider::UIMessagePortChannelProvider):
(WebKit::UIMessagePortChannelProvider::~UIMessagePortChannelProvider):
(WebKit::UIMessagePortChannelProvider::createNewMessagePortChannel):
(WebKit::UIMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
(WebKit::UIMessagePortChannelProvider::messagePortDisentangled):
(WebKit::UIMessagePortChannelProvider::messagePortClosed):
(WebKit::UIMessagePortChannelProvider::takeAllMessagesForPort):
(WebKit::UIMessagePortChannelProvider::postMessageToRemote):
(WebKit::UIMessagePortChannelProvider::checkRemotePortForActivity):
(WebKit::UIMessagePortChannelProvider::checkProcessLocalPortForActivity):
* UIProcess/UIMessagePortChannelProvider.h: Added.
(WebKit::UIMessagePortChannelProvider::registry):

* UIProcess/WebPageProxy.cpp:
(WebKit::m_configurationPreferenceValues):

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::processForIdentifier):
(WebKit::m_userMediaCaptureManagerProxy):
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::createNewMessagePortChannel):
(WebKit::WebProcessProxy::entangleLocalPortInThisProcessToRemote):
(WebKit::WebProcessProxy::messagePortDisentangled):
(WebKit::WebProcessProxy::messagePortClosed):
(WebKit::WebProcessProxy::takeAllMessagesForPort):
(WebKit::WebProcessProxy::didDeliverMessagePortMessages):
(WebKit::WebProcessProxy::postMessageToRemote):
(WebKit::WebProcessProxy::checkRemotePortForActivity):
(WebKit::WebProcessProxy::checkProcessLocalPortForActivity):
(WebKit::WebProcessProxy::didCheckProcessLocalPortForActivity):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:

* WebKit.xcodeproj/project.pbxproj:

* WebProcess/WebCoreSupport/WebMessagePortChannelProvider.cpp: Added.
(WebKit::WebMessagePortChannelProvider::singleton):
(WebKit::WebMessagePortChannelProvider::WebMessagePortChannelProvider):
(WebKit::WebMessagePortChannelProvider::~WebMessagePortChannelProvider):
(WebKit::WebMessagePortChannelProvider::createNewMessagePortChannel):
(WebKit::WebMessagePortChannelProvider::entangleLocalPortInThisProcessToRemote):
(WebKit::WebMessagePortChannelProvider::messagePortDisentangled):
(WebKit::WebMessagePortChannelProvider::messagePortClosed):
(WebKit::WebMessagePortChannelProvider::takeAllMessagesForPort):
(WebKit::WebMessagePortChannelProvider::didTakeAllMessagesForPort):
(WebKit::WebMessagePortChannelProvider::didCheckRemotePortForActivity):
(WebKit::WebMessagePortChannelProvider::postMessageToRemote):
(WebKit::WebMessagePortChannelProvider::checkProcessLocalPortForActivity):
(WebKit::WebMessagePortChannelProvider::checkRemotePortForActivity):
* WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h: Added.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeProcess):
(WebKit::WebProcess::didTakeAllMessagesForPort):
(WebKit::WebProcess::checkProcessLocalPortForActivity):
(WebKit::WebProcess::didCheckRemotePortForActivity):
(WebKit::WebProcess::messagesAvailableForPort):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227340 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFetch Headers from an Opaque response should be filtered out
commit-queue@webkit.org [Mon, 22 Jan 2018 18:33:30 +0000 (18:33 +0000)]
Fetch Headers from an Opaque response should be filtered out
https://bugs.webkit.org/show_bug.cgi?id=181926

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-22
Reviewed by Chris Dumez.

Source/WebCore:

Covered by updated test.

Refactor to use the same FetchResponse::create for Cache API and cloning.
In this method, ensure that response and headers are filtered correctly according response tainting.
Make also sure that synthetic responses do not get filtered (not needed since created by JavaScript).

Introduce helper routine to set the header map of a resource response.
Use this routine when cloning a synthetic response as in that case, m_internalResponse has no header at all.

* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::updateRecords):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::create):
(WebCore::FetchResponse::clone):
* Modules/fetch/FetchResponse.h:
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::setHTTPHeaderFields):
* platform/network/ResourceResponseBase.h:
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):

LayoutTests:

* http/wpt/fetch/response-opaque-clone-expected.txt:
* http/wpt/fetch/response-opaque-clone.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227339 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoLayoutTest http/tests/paymentrequest/payment-request-abort-method.https.html is a...
aestes@apple.com [Mon, 22 Jan 2018 18:24:15 +0000 (18:24 +0000)]
LayoutTest http/tests/paymentrequest/payment-request-abort-method.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178107
<rdar://problem/34901064>

Reviewed by Brady Eidson.

Modified the test to call show() with user activation.

* http/tests/paymentrequest/payment-request-abort-method.https.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227338 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBump default cache storage quota to 50MB
commit-queue@webkit.org [Mon, 22 Jan 2018 17:51:27 +0000 (17:51 +0000)]
Bump default cache storage quota to 50MB
https://bugs.webkit.org/show_bug.cgi?id=181924

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-22
Reviewed by Chris Dumez.

Existing web sites use more than 20 MB.

* UIProcess/WebsiteData/WebsiteDataStore.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[css-align] 'overflow' keyword must precede the self-position and content-position...
jfernandez@igalia.com [Mon, 22 Jan 2018 17:01:51 +0000 (17:01 +0000)]
[css-align] 'overflow' keyword must precede the self-position and content-position value
https://bugs.webkit.org/show_bug.cgi?id=181793

Reviewed by Antti Koivisto.

Source/WebCore:

There were several discussions to avoid ambiguities with the complex
values, specially when it comes to define the place-xxx shorthands.

One of the sources of problems is the 'overflow-position' keyword. The
CSS WG has decided to change the syntax of all the CSS Box Alignment
properties so that the 'overflow-position' keyword always precede the
'self-position' or the 'content-position' keywords.

https://github.com/w3c/csswg-drafts/issues/1446#event-1125715434

In order to apply this change to the Content Distribution properties'
(align-content and justify-content) syntax I had to completely
re-implement their parsing function. Thanks to this I addressed also
the issue with the content-distribution fallback, which cannot be
specified explicitly now.

https://github.com/w3c/csswg-drafts/issues/1002#ref-commit-c38cac4

No new tests, just rebaselined the expected results of the test cases affected.

Despite the so many layout tests affected by this change, it's
unlikely that it might break any content in current web
sites. This patch changes the new CSS syntax, obviously backward
compatible, defined by the new CSS Box Alignment. The
'overflow-position' keyword is only used by the layout models
implementing the new spec, so far only CSS Grid Layout.
Considering that CSS Grid has been shipped last year, it's unlikely
that many sites are using the new CSS values.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment):
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
* css/CSSContentDistributionValue.cpp:
(WebCore::CSSContentDistributionValue::customCSSText const):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeOverflowPositionKeyword):
(WebCore::consumeContentPositionKeyword):
(WebCore::consumeContentDistributionOverflowPosition):
(WebCore::consumeSelfPositionOverflowPosition):

LayoutTests:

Rebaseline expected results of the test cases affected by this change.

* css3/parse-align-content.html:
* css3/parse-align-items.html:
* css3/parse-align-self.html:
* css3/parse-justify-content.html:
* css3/overwrite-self-alignment.html:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html:
* css3/overwrite-content-alignment.html:
* fast/css-grid-layout/grid-content-alignment-overflow.html:
* fast/css-grid-layout/grid-align-justify-overflow.html:
* fast/css/parse-justify-items.html:
* fast/css/parse-justify-self.html:
* fast/repaint/align-items-overflow-change.html:
* fast/repaint/align-self-overflow-change.html:
* fast/repaint/justify-items-overflow-change.html:
* fast/repaint/justify-self-overflow-change.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227297 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark svg/filters/fePointLight-color.svg as failure on Windows.
pvollan@apple.com [Mon, 22 Jan 2018 17:01:07 +0000 (17:01 +0000)]
Mark svg/filters/fePointLight-color.svg as failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=181869

Unreviewed test gardening.

* platform/win/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227296 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoParse calc() in CSS media queries
commit-queue@webkit.org [Mon, 22 Jan 2018 16:07:13 +0000 (16:07 +0000)]
Parse calc() in CSS media queries
https://bugs.webkit.org/show_bug.cgi?id=181716

LayoutTests/imported/w3c:

Patch by Chris Nardi <csnardi1@gmail.com> on 2018-01-22
Reviewed by Antti Koivisto.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/mediaqueries/OWNERS: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-001.html: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-002-expected.xht: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-002.html: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-003-expected.xht: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-003.html: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-004-expected.xht: Added.
* web-platform-tests/css/mediaqueries/aspect-ratio-004.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-001.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-002-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-002.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-003-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-003.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-004-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-004.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-005-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-005.html: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-006-expected.xht: Added.
* web-platform-tests/css/mediaqueries/device-aspect-ratio-006.html: Added.
* web-platform-tests/css/mediaqueries/min-width-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/min-width-001.xht: Added.
* web-platform-tests/css/mediaqueries/min-width-tables-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/min-width-tables-001.html: Added.
* web-platform-tests/css/mediaqueries/mq-calc-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-calc-001.html: Added.
* web-platform-tests/css/mediaqueries/mq-calc-002-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-calc-002.html: Added.
* web-platform-tests/css/mediaqueries/mq-calc-003-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-calc-003.html: Added.
* web-platform-tests/css/mediaqueries/mq-calc-004-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-calc-004.html: Added.
* web-platform-tests/css/mediaqueries/mq-calc-005-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-calc-005.html: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-001.html: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-002-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-002.html: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-003-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-003.html: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-004-expected.xht: Added.
* web-platform-tests/css/mediaqueries/mq-invalid-media-type-004.html: Added.
* web-platform-tests/css/mediaqueries/relative-units-001-expected.xht: Added.
* web-platform-tests/css/mediaqueries/relative-units-001.html: Added.
* web-platform-tests/css/mediaqueries/relative-units-002-expected.xht: Added.
* web-platform-tests/css/mediaqueries/relative-units-002.html: Added.
* web-platform-tests/css/mediaqueries/relative-units-003-expected.xht: Added.
* web-platform-tests/css/mediaqueries/relative-units-003.html: Added.
* web-platform-tests/css/mediaqueries/relative-units-004-expected.xht: Added.
* web-platform-tests/css/mediaqueries/relative-units-004.html: Added.
* web-platform-tests/css/mediaqueries/support/media_queries_iframe.html: Renamed from LayoutTests/fast/media/w3c/resources/media_queries_iframe.html.
* web-platform-tests/css/mediaqueries/support/min-width-tables-001-iframe.html: Added.
* web-platform-tests/css/mediaqueries/support/w3c-import.log: Added.
* web-platform-tests/css/mediaqueries/test_media_queries-expected.txt: Renamed from LayoutTests/fast/media/w3c/test_media_queries-expected.txt.
* web-platform-tests/css/mediaqueries/test_media_queries.html: Renamed from LayoutTests/fast/media/w3c/test_media_queries.html.
* web-platform-tests/css/mediaqueries/w3c-import.log: Added.

Source/WebCore:

calc() was previously unsupported inside of media queries. This change
adds in support for parsing calc inside of media queries.

Patch by Chris Nardi <csnardi1@gmail.com> on 2018-01-22
Reviewed by Antti Koivisto.

Tests: Imported web-platform-tests/css/mediaqueries

* css/MediaQueryExpression.cpp:
(WebCore::featureWithValidIdent): Updated function to take a CSSPrimitiveValue.
(WebCore::featureWithValidDensity): Updated function to take a CSSPrimitiveValue instead of a CSSParserToken.
(WebCore::featureWithValidPositiveLength): Ditto.
(WebCore::featureExpectingPositiveInteger): Ditto.
(WebCore::featureWithPositiveInteger): Ditto.
(WebCore::featureWithPositiveNumber): Ditto.
(WebCore::featureWithZeroOrOne): Ditto.
(WebCore::MediaQueryExpression::MediaQueryExpression): Use CSSPropertyParserHelpers for consuming.
* css/MediaQueryExpression.h:
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeResolution): Added function for use in media query expression parsing.
* css/parser/CSSPropertyParserHelpers.h:
* css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::readRestrictor): Updated functions to take a CSSParserTokenRange in order to use CSSPropertyParserHelpers.
(WebCore::MediaQueryParser::readMediaNot): Ditto.
(WebCore::MediaQueryParser::readMediaType): Ditto.
(WebCore::MediaQueryParser::readAnd): Ditto.
(WebCore::MediaQueryParser::readFeatureStart): Ditto.
(WebCore::MediaQueryParser::readFeature): Ditto.
(WebCore::MediaQueryParser::readFeatureColon): Ditto.
(WebCore::MediaQueryParser::readFeatureValue): Ditto.
(WebCore::MediaQueryParser::readFeatureEnd): Ditto.
(WebCore::MediaQueryParser::skipUntilComma): Ditto.
(WebCore::MediaQueryParser::skipUntilBlockEnd): Ditto.
(WebCore::MediaQueryParser::processToken): Ditto.
(WebCore::MediaQueryParser::parseInternal): Ditto.
(WebCore::MediaQueryData::clear): Removed reference to m_valueList
(WebCore::MediaQueryData::addExpression): Use CSSParserTokenRange.
(WebCore::MediaQueryData::lastExpressionValid): New helper function.
(WebCore::MediaQueryData::removeLastExpression): New helper function.
* css/parser/MediaQueryParser.h:

LayoutTests:

Imported CSS mediaqueries tests from WPT, deleting our (old) copy of one test. Updated
expectations.

Patch by Chris Nardi <csnardi1@gmail.com> on 2018-01-22
Reviewed by Antti Koivisto.

* TestExpectations:
* fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt:
* fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt:
* fast/media/w3c/README: Removed.
* fast/media/w3c/test_media_queries-expected.txt: Removed.
* platform/ios/TestExpectations:
* platform/ios/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-1-expected.txt:
* platform/ios/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-2-expected.txt:
* platform/ios/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-3-expected.txt:
* platform/ios/fast/dom/HTMLImageElement/sizes/image-sizes-w3c-4-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227295 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed build fix after r227292. Fixing a bad copy-paste that broke
zandobersek@gmail.com [Mon, 22 Jan 2018 15:03:52 +0000 (15:03 +0000)]
Unreviewed build fix after r227292. Fixing a bad copy-paste that broke
the GTK+ debug builds.

* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWebDriver: implement get element CSS value command
carlosgc@webkit.org [Mon, 22 Jan 2018 14:33:32 +0000 (14:33 +0000)]
WebDriver: implement get element CSS value command
https://bugs.webkit.org/show_bug.cgi?id=181736

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

13.4 Get Element CSS Value
https://w3c.github.io/webdriver/webdriver-spec.html#get-element-css-value

Fixes: imported/selenium/py/test/selenium/webdriver/common/rendered_webelement_tests.py::testShouldPickUpStyleOfAnElement
       imported/selenium/py/test/selenium/webdriver/common/rendered_webelement_tests.py::testShouldAllowInheritedStylesToBeUsed

* Session.cpp:
(WebDriver::Session::getElementProperty):
(WebDriver::Session::getElementCSSValue):
* Session.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::getElementCSSValue):
* WebDriverService.h:

WebDriverTests:

* TestExpectations.json: Unskip tests passing now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227293 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Cairo] Refactor PlatformContextCairo::drawSurfaceToContext() into a Cairo operation
zandobersek@gmail.com [Mon, 22 Jan 2018 14:23:07 +0000 (14:23 +0000)]
[Cairo] Refactor PlatformContextCairo::drawSurfaceToContext() into a Cairo operation
https://bugs.webkit.org/show_bug.cgi?id=181930

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Move the PlatformContextCairo::drawSurfaceToContext() code into the
Cairo namespace as an operation, renaming it to drawSurface(). Mirroring
other operations, the PlatformContextCairo object is now passed through
a reference as the first argument to the function, and cairo_t context
object is retrieved from that.

Call sites of the PlatformContextCairo::drawSurfaceToContext() method
are adjusted to now call Cairo::drawSurface() and properly pass the
PlatformContextCairo object to the function.

No new tests -- no change in functionality.

* platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::prepareForStroking): Make this static.
(WebCore::Cairo::drawPatternToCairoContext):
(WebCore::Cairo::drawNativeImage):
(WebCore::Cairo::drawSurface):
* platform/graphics/cairo/CairoOperations.h:
* platform/graphics/cairo/PlatformContextCairo.cpp:
(WebCore::drawPatternToCairoContext): Deleted.
(WebCore::PlatformContextCairo::drawSurfaceToContext): Deleted.
* platform/graphics/cairo/PlatformContextCairo.h:
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):

Source/WebKit:

Call sites of the PlatformContextCairo::drawSurfaceToContext() method
are adjusted to now call Cairo::drawSurface() and properly pass the
PlatformContextCairo object to the function.

* Shared/cairo/ShareableBitmapCairo.cpp:
(WebKit::ShareableBitmap::paint):
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::convertCairoSurfaceToShareableBitmap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227292 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed. Update W3C WebDriver imported tests.
carlosgc@webkit.org [Mon, 22 Jan 2018 14:22:50 +0000 (14:22 +0000)]
Unreviewed. Update W3C WebDriver imported tests.

* imported/w3c/importer.json:
* imported/w3c/tools/webdriver/webdriver/client.py:
* imported/w3c/tools/webdriver/webdriver/protocol.py:
* imported/w3c/tools/webdriver/webdriver/servo.py: Removed.
* imported/w3c/tools/webdriver/webdriver/transport.py:
* imported/w3c/tools/wptrunner/MANIFEST.in:
* imported/w3c/tools/wptrunner/README.rst:
* imported/w3c/tools/wptrunner/docs/conf.py:
* imported/w3c/tools/wptrunner/docs/usage.rst:
* imported/w3c/tools/wptrunner/setup.py:
* imported/w3c/tools/wptrunner/tox.ini:
* imported/w3c/tools/wptrunner/wptrunner/browsers/__init__.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/b2g_setup/certtest_app.zip: Removed.
* imported/w3c/tools/wptrunner/wptrunner/browsers/chrome_android.py: Copied from WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py.
* imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/ie.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/servo.py:
* imported/w3c/tools/wptrunner/wptrunner/environment.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/base.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executormarionette.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservodriver.py:
* imported/w3c/tools/wptrunner/wptrunner/manifestupdate.py:
* imported/w3c/tools/wptrunner/wptrunner/metadata.py:
* imported/w3c/tools/wptrunner/wptrunner/stability.py:
* imported/w3c/tools/wptrunner/wptrunner/testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/testrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_hosts.py:
* imported/w3c/tools/wptrunner/wptrunner/update/__init__.py:
* imported/w3c/tools/wptrunner/wptrunner/update/sync.py:
* imported/w3c/tools/wptrunner/wptrunner/update/tree.py:
* imported/w3c/tools/wptrunner/wptrunner/vcs.py:
* imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py:
* imported/w3c/tools/wptrunner/wptrunner/wptcommandline.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py:
* imported/w3c/tools/wptrunner/wptrunner/wptrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/wpttest.py:
* imported/w3c/webdriver/tests/execute_async_script/__init__.py: Added.
* imported/w3c/webdriver/tests/execute_script/__init__.py: Added.
* imported/w3c/webdriver/tests/sessions/new_session/response.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] WebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response...
carlosgc@webkit.org [Mon, 22 Jan 2018 14:04:47 +0000 (14:04 +0000)]
[GTK] WebDriver: test imported/w3c/webdriver/tests/sessions/new_session/response.py is crashing in the bots
https://bugs.webkit.org/show_bug.cgi?id=181904

Reviewed by Carlos Alberto Lopez Perez.

Source/WebDriver:

Handle the case of failing to launch the browser. The test is actually failing because it's sending wrong
capabilities, the driver tries to fall back to the default driver, but since WebKit is not installed in the
bots, it fails to find the MiniBrowser. The test needs to be fixed, but we shouldn't crash when the browser
can't be spawned for whatever reason in any case. This patch handles that case and changes the boolean result of
connectToBrowser to be an optional error string instead. This way we can provide more detailed error message
when we reject the session creation because the browser failed to start.

* SessionHost.h:
* WebDriverService.cpp:
(WebDriver::WebDriverService::newSession):
* glib/SessionHostGlib.cpp:
(WebDriver::SessionHost::connectToBrowser):
(WebDriver::ConnectToBrowserAsyncData::ConnectToBrowserAsyncData):
(WebDriver::SessionHost::launchBrowser):
(WebDriver::SessionHost::setupConnection):

WebDriverTests:

Unskip imported/w3c/webdriver/tests/sessions/new_session/response.py.

* TestExpectations.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227290 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Test /webkit/WebKitWebsiteData/resource-load-statistics is failing since r227223
carlosgc@webkit.org [Mon, 22 Jan 2018 14:03:29 +0000 (14:03 +0000)]
[GTK] Test /webkit/WebKitWebsiteData/resource-load-statistics is failing since r227223
https://bugs.webkit.org/show_bug.cgi?id=181929

Reviewed by Michael Catanzaro.

The test is checking that the resource load stats file is deleted after clearing website data. Since r227223,
the website data completion callback is not called immediately, and a new file is created when the operation
finishes. We need to check that the file was removing after calling clear.

* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(fileChangedCallback):
(testWebsiteDataResourceLoadStatistics):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227289 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[css-grid] Spanning Grid item has too much space at the bottom / is too high
rego@igalia.com [Mon, 22 Jan 2018 12:33:34 +0000 (12:33 +0000)]
[css-grid] Spanning Grid item has too much space at the bottom / is too high
https://bugs.webkit.org/show_bug.cgi?id=181677

LayoutTests/imported/w3c:

Imported WPT tests to check this change.

Reviewed by Javier Fernandez.

* web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-001-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-001.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-002-expected.txt: Added.
* web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-002.html: Added.
* web-platform-tests/css/css-grid/layout-algorithm/w3c-import.log:

Source/WebCore:

Reviewed by Javier Fernandez.

In IndefiniteSizeStrategy::findUsedFlexFraction() we were not
subtracting the size of the gutters when we call findFrUnitSize().
If an item spans several tracks, we cannot pass the maxContentForChild()
directly, we need to subtract the gutters as they are treated
as fixed size tracks in the algorithm.

The spec text is pretty clear regarding this
(https://drafts.csswg.org/css-grid/#algo-find-fr-size):
"Let leftover space be the space to fill minus the base sizes
 of the non-flexible grid tracks."

Gutters are treated as fixed-size tracks for the purpose
of the track sizing algorithm, so we need to subtract them from the
leftover space while finding the size of an "fr".

Tests: imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-001.html
       imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-find-fr-size-gutters-002.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::findFrUnitSize const):
(WebCore::IndefiniteSizeStrategy::findUsedFlexFraction const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoReviewed GTK gardening. Mark /webkit/WebKitWebView/mouse-target as fail too.
carlosgc@webkit.org [Mon, 22 Jan 2018 09:02:07 +0000 (09:02 +0000)]
Reviewed GTK gardening. Mark /webkit/WebKitWebView/mouse-target as fail too.

* TestWebKitAPI/glib/TestExpectations.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Fix /webkit/WebKitConsoleMessage/network-error.
carlosgc@webkit.org [Mon, 22 Jan 2018 08:12:28 +0000 (08:12 +0000)]
Unreviewed GTK+ gardening. Fix /webkit/WebKitConsoleMessage/network-error.

Partially revert r226782, the fix was wrong for the GLib version we currently use.

* TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
(testWebKitConsoleMessageNetworkError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227286 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed. Remove unused verbose mode from GLib API tests runner.
carlosgc@webkit.org [Mon, 22 Jan 2018 08:00:39 +0000 (08:00 +0000)]
Unreviewed. Remove unused verbose mode from GLib API tests runner.

* glib/api_test_runner.py:
(add_options):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227285 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed. Fix compile warning.
carlosgc@webkit.org [Mon, 22 Jan 2018 07:57:12 +0000 (07:57 +0000)]
Unreviewed. Fix compile warning.

Use #include instead of #import in cross-platform code.

* Shared/WebPreferencesDefaultValues.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227284 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoShould reject updating a build request which has an associated build.
dewei_zhu@apple.com [Mon, 22 Jan 2018 07:38:16 +0000 (07:38 +0000)]
Should reject updating a build request which has an associated build.
https://bugs.webkit.org/show_bug.cgi?id=181893

Reviewed by Ryosuke Niwa.

Current code does not prevent submitting to same build request multiple times.
This could lead to a build losing its associated build request.
As a result, this build will be visible in charts which is not right.
Added a check when a build request is reported.
Addressed a 'FIXME' for the race condition inside ReportProcessor->resolve_build_id by surrounding
it with a database transaction.

* public/include/report-processor.php:
Wrap adding platform and resolve_build_id with a database transaction.
Add a check to make sure only a build request has no associated build can be updated.
* server-tests/api-report-tests.js: Added unit tests accordingly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227283 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoTurning off custom pasteboard data doesn't actually turn it off in WK2
rniwa@webkit.org [Mon, 22 Jan 2018 06:41:05 +0000 (06:41 +0000)]
Turning off custom pasteboard data doesn't actually turn it off in WK2
https://bugs.webkit.org/show_bug.cgi?id=181920
<rdar://problem/36686429>

Reviewed by Wenson Hsieh.

Source/WebCore:

Replaced the global settings for custom pasteboard data by regular runtime enabled flags.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::getDataForItem const):
(WebCore::DataTransfer::shouldSuppressGetAndSetDataToAvoidExposingFilePaths const):
(WebCore::DataTransfer::setDataFromItemList):
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::commitToPasteboard):
* dom/DataTransferItemList.cpp:
(WebCore::shouldExposeTypeInItemList):
* editing/Editor.cpp:
(WebCore::createDataTransferForClipboardEvent):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragmentAndAddResources):
(WebCore::WebContentReader::readWebArchive):
* page/DeprecatedGlobalSettings.cpp:
(WebCore::DeprecatedGlobalSettings::defaultCustomPasteboardDataEnabled): Deleted.
* page/DeprecatedGlobalSettings.h:
(WebCore::DeprecatedGlobalSettings::setCustomPasteboardDataEnabled): Deleted.
(WebCore::DeprecatedGlobalSettings::customPasteboardDataEnabled): Deleted.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCustomPasteboardDataEnabled):
(WebCore::RuntimeEnabledFeatures::customPasteboardDataEnabled const):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCustomPasteboardDataEnabled):

Source/WebKit:

Moved the code to decide when to enable custom pasteboard data from WebCore
since we never enable this feature in WebKit1.

* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp:
(defaultCustomPasteboardDataEnabled): Added.
* Shared/WebPreferencesDefaultValues.h:

Source/WebKitLegacy/mac:

Always disable custom pasteboard data in WebKit1. See r226156 for details.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h
wenson_hsieh@apple.com [Mon, 22 Jan 2018 03:58:10 +0000 (03:58 +0000)]
Add a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=181918

Reviewed by Tim Horton.

Source/JavaScriptCore:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default). No change in behavior.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).

* Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).

* Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Include AdditionalFeatureDefines.h, if possible. This allows WebKitAdditions to override
the value of certain feature flags in the OpenSource WebKit repository.

* wtf/Platform.h:

Tools:

Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227281 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRelease assertion in canExecuteScript when executing scripts during page cache restore
rniwa@webkit.org [Mon, 22 Jan 2018 03:39:36 +0000 (03:39 +0000)]
Release assertion in canExecuteScript when executing scripts during page cache restore
https://bugs.webkit.org/show_bug.cgi?id=181902

Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by an erroneous instantiation of ScriptDisallowedScope::InMainThread in CachedPage::restore.
It can execute arbitrary scripts since CachedFrame::open can update style, layout, and evaluate media queries.

This is fine because there is no way to put this page back into a page cache until the load is commited via
FrameLoader::commitProvisionalLoad is invoked later which only happens after CachedPage::restore had exited.

Also added a release assert to make sure this condition holds.

Tests: fast/history/page-cache-execute-script-during-restore.html
       fast/history/page-cache-navigate-during-restore.html

* history/CachedPage.cpp:
(WebCore::CachedPageRestorationScope::CachedPageRestorationScope): Added.
(WebCore::CachedPageRestorationScope::~CachedPageRestorationScope): Added.
(WebCore::CachedPage::restore): Don't instantiate ScriptDisallowedScope::InMainThread. Set isRestoringCachedPage
on the cached pate to release-assert that there won't be any attempt to put this very page back into the cache.
* history/PageCache.cpp:
(WebCore::canCachePage): Added a release assert to make sure the page which is in the process of being restored
from the page cache is not put into the page cache.
* page/Page.h:
(WebCore::Page::setIsRestoringCachedPage): Added.
(WebCore::Page::isRestoringCachedPage const): Added.

LayoutTests:

Added regression tests for the release assertion and navigating while a document is being restored from the page cache.
WebKit should not hit any assertions in either situations.

* fast/history/page-cache-execute-script-during-restore-expected.txt: Added.
* fast/history/page-cache-execute-script-during-restore.html: Added.
* fast/history/page-cache-navigate-during-restore-expected.txt: Added.
* fast/history/page-cache-navigate-during-restore.html: Added.
* fast/history/resources/navigate-back-with-finish-test-stage.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227280 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoResign NowPlaying status when no media element is eligible
eric.carlson@apple.com [Mon, 22 Jan 2018 03:30:35 +0000 (03:30 +0000)]
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>

Reviewed by Jer Noble.

Source/WebCore:

Updated API test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removedFromAncestor): Call mediaSession->clientCharacteristicsChanged
so NowPlaying status will be updated.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::canShowControlsManager const): Return false when being queried
for NowPlaying status in an inactive document.

* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Implement in for all
ports.
* platform/audio/PlatformMediaSessionManager.h:
(WebCore::PlatformMediaSessionManager::registeredAsNowPlayingApplication const):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/mac/MediaSessionManagerMac.h:
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo): Call MRMediaRemoteSetCanBeNowPlayingApplication
whenever status changes.
(WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): Deleted, implemented
in the base class.

Source/WebKit:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _requestActiveNowPlayingSessionInfo:]): Return registeredAsNowPlayingApplication
status.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::nowPlayingInfoCallback): Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::requestActiveNowPlayingSessionInfo): Ditto.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView hasActiveNowPlayingSession]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/large-video-test-now-playing.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (macOS 10.13.2): imported/w3c/web-platform-tests/media-source/mediasource...
jer.noble@apple.com [Mon, 22 Jan 2018 02:38:51 +0000 (02:38 +0000)]
REGRESSION (macOS 10.13.2): imported/w3c/web-platform-tests/media-source/mediasource-* LayoutTests failing
https://bugs.webkit.org/show_bug.cgi?id=181891

Reviewed by Eric Carlson.

Source/WebCore:

In macOS 10.13.2, CoreMedia changed the definition of CMSampleBufferGetDuration() to return
the presentation duration rather than the decode duration. For media streams where those two
durations are identical (or at least, closely similar), this isn't a problem. But the media
file used in the WPT tests have an unusual frame cadence: decode durations go {3000, 1, 5999,
1, 5999,...} and presentation durations go {3000, 2999, 3000, 2999}. This caused one check in
the "Coded Frame Processing" algorithm to begin failing, where it checks that the delta
between the last sample's decode time and the new decode time is no more than 2x as far as
the last sample's duration. That's not a problem as long as the "duration" is the "decode
duration" and the samples are all adjacent. Once the "duration" is "presentation duration",
all the assumptions in the algorithm are invalidated. In the WPT test case, the delta between
decode times is 5999, and 2 * the presentation duration is 5998, causing all samples up to
the next sync sample to be dropped.

To work around this change in behavior, we'll adopt the same technique used by Mozilla's MSE
implementation, which was done for similar reasons. Rather than track the "last frame duration",
we'll record the "greatest frame duration", and use actual decode timestamps to derive this
duration. The "greatest frame duration" field will be reset at the same times as "last frame
duration", and will be used only in the part of the algorithm that checks for large decode
timestamp gaps.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
(WebCore::SourceBuffer::resetParserState):
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

LayoutTests:

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227278 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[ios] LayoutTest imported/w3c/web-platform-tests/payment-request/rejects_if_not_activ...
aestes@apple.com [Sun, 21 Jan 2018 21:41:07 +0000 (21:41 +0000)]
[ios] LayoutTest imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html is crashing in JSC::JSONParse
https://bugs.webkit.org/show_bug.cgi?id=177832
<rdar://problem/34805315>

Reviewed by Tim Horton.

Source/WebCore:

Test: http/tests/paymentrequest/rejects_if_not_active.https.html

* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::show): Rejected promise if the document is not active.

LayoutTests:

Made a copy of imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html
and modified it to handle Apple Pay and user gesture requirements.

* http/tests/paymentrequest/rejects_if_not_active.https-expected.txt: Added.
* http/tests/paymentrequest/rejects_if_not_active.https.html: Added.
* http/tests/paymentrequest/resources/page1.html: Added.
* http/tests/paymentrequest/resources/page2.html: Added.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227277 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix broken unit-tests after r227192
aakash_jain@apple.com [Sun, 21 Jan 2018 08:57:15 +0000 (08:57 +0000)]
Fix broken unit-tests after r227192
https://bugs.webkit.org/show_bug.cgi?id=181909

Reviewed by Carlos Garcia Campos.

* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227276 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMake garbage collection of MessagePort objects be asynchronous.
beidson@apple.com [Sun, 21 Jan 2018 07:07:49 +0000 (07:07 +0000)]
Make garbage collection of MessagePort objects be asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=181910

Reviewed by Andy Estes.

No new tests (Covered by existing tests, including GC-specific ones).

The basic premise here is as follows:
- You can *always* GC a MessagePort that is closed
- You can *always* GC a MessagePort that has no onmessage handler, as incoming messages cannot
  possibly revive it.
- You can GC a MessagePort, even if it has a message handler, as long as there are no messages
  in flight between it and the remote port, and as long as the remote port is "maybe eligible for GC."

A MessagePort is considered "maybe eligible for GC" once hasPendingActivity is asked once.

A MessagePort loses "maybe eligible for GC" status once it is used for sending or receiving a message.

The changes to MessagePort.cpp implement the above with a tiny little bool-driven state machine.
* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::registerLocalActivity):
(WebCore::MessagePort::start):
(WebCore::MessagePort::close):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::hasPendingActivity const):
(WebCore::MessagePort::isLocallyReachable const):
(WebCore::MessagePort::addEventListener):
(WebCore::MessagePort::removeEventListener):
* dom/MessagePort.h:

- Remove the lock and any background-thread code paths
- Add ASSERT(isMainThread())s throughout
* dom/messageports/MessagePortChannel.cpp:
(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::includesPort):
(WebCore::MessagePortChannel::entanglePortWithProcess):
(WebCore::MessagePortChannel::disentanglePort):
(WebCore::MessagePortChannel::closePort):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::takeAllMessagesForPort):
(WebCore::MessagePortChannel::checkRemotePortForActivity):
(WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const):
* dom/messageports/MessagePortChannel.h:

Add a callback for a MessagePortChannel to go ask the remote MessagePort object about local activity:
* dom/messageports/MessagePortChannelProvider.h:
* dom/messageports/MessagePortChannelProviderImpl.cpp:
(WebCore::MessagePortChannelProviderImpl::checkRemotePortForActivity):
(WebCore::MessagePortChannelProviderImpl::checkProcessLocalPortForActivity):
(WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync): Deleted.
* dom/messageports/MessagePortChannelProviderImpl.h:

- Remove the lock and any background-thread code paths
- Add ASSERT(isMainThread())s throughout
* dom/messageports/MessagePortChannelRegistry.cpp:
(WebCore::MessagePortChannelRegistry::messagePortChannelCreated):
(WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed):
(WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote):
(WebCore::MessagePortChannelRegistry::didDisentangleMessagePort):
(WebCore::MessagePortChannelRegistry::didCloseMessagePort):
(WebCore::MessagePortChannelRegistry::didPostMessageToRemote):
(WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
(WebCore::MessagePortChannelRegistry::checkRemotePortForActivity):
(WebCore::MessagePortChannelRegistry::existingChannelContainingPort):
(WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): Deleted.
* dom/messageports/MessagePortChannelRegistry.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227275 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Apple Pay] Stop eagerly loading PassKit.framework
aestes@apple.com [Sun, 21 Jan 2018 04:29:46 +0000 (04:29 +0000)]
[Apple Pay] Stop eagerly loading PassKit.framework
https://bugs.webkit.org/show_bug.cgi?id=181911
<rdar://problem/36555369>

Reviewed by Tim Horton.

Source/WebCore:

r226458 and r226123 added code that caused PassKit.framework to be eagerly loaded when
initializing a WKWebView. This is costly and should only be done when Apple Pay is first used.

To avoid eagerly loading PassKit, this patch does two things:

1. Instead of sending the available payment networks as part of WebPageCreationParameters,
PaymentCoordinator asks for them using a syncrhonous message the first time they are needed.
2. Instead of setting the Apple Pay preference to false when PassKit can't be loaded,
the following API entry points check for a missing PassKit and return false, or throw
exceptions, or reject promises:
    - ApplePaySession.canMakePayments()
    - ApplePaySession.canMakePaymentsWithActiveCard()
    - ApplePaySession.openPaymentSetup()
    - ApplePaySession.begin()

No new tests for (1), which causes no change in behavior. (2) was manually verified by
locally moving aside PassKit.framework, but that's not possible to do in an automated test.

* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::PaymentCoordinator):
(WebCore::PaymentCoordinator::validatedPaymentNetwork const):
(WebCore::toHashSet): Deleted.
* Modules/applepay/PaymentCoordinator.h:
* Modules/applepay/PaymentCoordinatorClient.h:
* loader/EmptyClients.cpp:
* page/MainFrame.cpp:
(WebCore::MainFrame::MainFrame):

Removed PaymentCoordinator::m_availablePaymentNetworks and made
PaymentCoordinator::validatedPaymentNetwork() call
PaymentCoordinatorClient::validatedPaymentNetwork() instead.

* page/PageConfiguration.h:

Removed availablePaymentNetworks from PageConfiguration.

* testing/Internals.cpp:
(WebCore::Internals::Internals):
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::validatedPaymentNetwork):
* testing/MockPaymentCoordinator.h:

Implemented PaymentCoordinatorClient::validatedPaymentNetwork().

Source/WebKit:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:

Removed availablePaymentNetworks from WebPageCreationParameters.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplePayEnabled):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):

Stopped calling WebPaymentCoordinatorProxy::platformSupportsPayments().

* UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:
(WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:
* UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:

Added message AvailablePaymentNetworks, which synchronously returns a Vector of payment
networks.

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePayments):

Returned false if PassKitLibrary() fails.

(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):

Called completionHandler with false if PassKitLibrary() fails.

(WebKit::WebPaymentCoordinatorProxy::platformAvailablePaymentNetworks):
(WebKit::WebPaymentCoordinatorProxy::availablePaymentNetworks):

Renamed availablePaymentNetworks to platformAvailablePaymentNetworks

(WebKit::WebPaymentCoordinatorProxy::platformSupportsPayments): Deleted.

* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

Called completionHandler with false if PassKitLibrary() fails.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):

Stopped calling WebPaymentCoordinatorProxy::availablePaymentNetworks().

* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
(WebKit::WebPaymentCoordinator::availablePaymentNetworks):
(WebKit::WebPaymentCoordinator::validatedPaymentNetwork):
* WebProcess/ApplePay/WebPaymentCoordinator.h:

Implemented PaymentCoordinatorClient::validatedPaymentNetwork(). m_availablePaymentNetworks
starts off as std::nullopt, but is initialized by sending the AvailablePaymentNetworks sync
message the first time it's accessed.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

Stopped setting PageConfiguration::availablePaymentNetworks.

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPaymentCoordinatorClient.h:
* WebCoreSupport/WebPaymentCoordinatorClient.mm:
(WebPaymentCoordinatorClient::validatedPaymentNetwork):

Implemented PaymentCoordinatorClient::validatedPaymentNetwork().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227274 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAPI test URLSchemeHandler.Leaks1 is timing out on iOS simulator debug
cdumez@apple.com [Sat, 20 Jan 2018 20:02:25 +0000 (20:02 +0000)]
API test URLSchemeHandler.Leaks1 is timing out on iOS simulator debug
https://bugs.webkit.org/show_bug.cgi?id=174984
<rdar://problem/33665676>

Reviewed by Alexey Proskuryakov.

Disable URLSchemeHandler.Leaks1 API test on iOS as it sometimes times out.

* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227273 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRelease ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
jer.noble@apple.com [Sat, 20 Jan 2018 16:55:45 +0000 (16:55 +0000)]
Release ASSERT when reloading Vimeo page @ WebCore: WebCore::Document::updateLayout
https://bugs.webkit.org/show_bug.cgi?id=181840
<rdar://problem/36186214>

Reviewed by Simon Fraser.

Source/WebCore:

Test: media/video-fullscreen-reload-crash.html

Short circuit play() or pause() operations if the document is suspended or stopped.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::playInternal):
(WebCore::HTMLMediaElement::pauseInternal):

Source/WebKit:

Updating layout while the document is suspended or stopped is unsafe.

* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::inlineVideoFrame):

LayoutTests:

* media/video-fullscreen-reload-crash-expected.txt: Added.
* media/video-fullscreen-reload-crash.html: Added.
* platform/ios/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227272 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[JSC] NumberPrototype::extractRadixFromArgs incorrectly cast double to int32_t
ticaiolima@gmail.com [Sat, 20 Jan 2018 12:53:52 +0000 (12:53 +0000)]
[JSC] NumberPrototype::extractRadixFromArgs incorrectly cast double to int32_t
https://bugs.webkit.org/show_bug.cgi?id=181182

Reviewed by Darin Adler.

JSTests:

* stress/big-int-prototype-to-string-cast-overflow.js: Added.
* stress/big-int-prototype-to-string-exception.js: Added.
* stress/big-int-prototype-to-string-wrong-values.js: Added.
* stress/number-prototype-to-string-cast-overflow.js: Added.
* stress/number-prototype-to-string-exception.js: Added.
* stress/number-prototype-to-string-wrong-values.js: Added.

Source/JavaScriptCore:

Casting double to integer is undefined behavior when the truncation
results into a value that doesn't fit into integer size,
according C++ spec[1]. Thus, we are changing bigIntProtoFuncToString and
numberProtoFuncToString to remove these source of undefined
behavior.

[1] - http://en.cppreference.com/w/cpp/language/implicit_conversion

* runtime/BigIntPrototype.cpp:
(JSC::bigIntProtoFuncToString):
* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToString):
(JSC::extractToStringRadixArgument):
(JSC::extractRadixFromArgs): Deleted.
* runtime/NumberPrototype.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agofetch redirect is incompatible with "no-cors" mode
commit-queue@webkit.org [Sat, 20 Jan 2018 10:45:25 +0000 (10:45 +0000)]
fetch redirect is incompatible with "no-cors" mode
https://bugs.webkit.org/show_bug.cgi?id=181866
<rdar://problem/35827140>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-20
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/redirect/redirect-mode-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-mode-worker-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-mode.js:
(redirectMode):
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html:
* web-platform-tests/service-workers/service-worker/fetch-request-redirect.https-expected.txt:

Source/WebCore:

Covered by updated tests.

Return a network error when no-cors mode and redirect mode is manual or error.
Update preflight implementation to no longer use manual redirect mode to simulate https://fetch.spec.whatwg.org/#http-network-or-cache-fetch.
Instead implement redirectReceived callback to treat any redirect response as the preflight response.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::redirectReceived):
(WebCore::CrossOriginPreflightChecker::startPreflight):
* loader/CrossOriginPreflightChecker.h:

LayoutTests:

* http/tests/fetch/redirectmode-and-preload-expected.txt:
* http/tests/fetch/redirectmode-and-preload.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227270 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDOMCache data sometimes not properly removed when clearing data for a given origin
cdumez@apple.com [Sat, 20 Jan 2018 10:43:38 +0000 (10:43 +0000)]
DOMCache data sometimes not properly removed when clearing data for a given origin
https://bugs.webkit.org/show_bug.cgi?id=181887
<rdar://problem/36671239>

Reviewed by Youenn Fablet.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::clearCachesForOrigin):
This code was iterating through folders on disk, then reading the folder's origin
from the origin file on disk. Then, if the origin would match the one we want to
delete, it would regenerate the folder path using cachesRootPath(*folderOrigin).
I don't know how but on my machine, I was ended up in a state where the path
generated by cachesRootPath(*folderOrigin) differed from the actual folder path
we read the origin from (Likely a different salt?). To make the code more robust,
I updated the code to delete "folderPath", which is the path we read the origin
from.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWebDriver: fix some nits that prevent running W3C tests on Mac
bburg@apple.com [Sat, 20 Jan 2018 08:42:08 +0000 (08:42 +0000)]
WebDriver: fix some nits that prevent running W3C tests on Mac
https://bugs.webkit.org/show_bug.cgi?id=181864

Reviewed by Carlos Garcia Campos.

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.__init__): _wsout needs to always be defined,
as we assume that the property exists later.

(WebDriverW3CWebServer.stop): If the temporary file doesn't
exist for some reason, the remove call will raise and exception.
Gracefully handle the case where the file isn't created due to
a problem/exception that happened elsewhere.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227268 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Skip imported/w3c/webdriver/tests/sessions/new_session...
carlosgc@webkit.org [Sat, 20 Jan 2018 07:45:32 +0000 (07:45 +0000)]
Unreviewed GTK+ gardening. Skip imported/w3c/webdriver/tests/sessions/new_session/response.py.

It's causing a crash in the driver process and affecting all other tests.

* TestExpectations.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[macOS] [WK2] Drag location is computed incorrectly when dragging content from subframes
wenson_hsieh@apple.com [Sat, 20 Jan 2018 07:24:50 +0000 (07:24 +0000)]
[macOS] [WK2] Drag location is computed incorrectly when dragging content from subframes
https://bugs.webkit.org/show_bug.cgi?id=181896
<rdar://problem/35479043>

Reviewed by Tim Horton.

In r218837, I packaged most of the information needed to start a drag into DragItem, which is propagated to the client layer
via the startDrag codepath. However, this introduced a bug in computing the event position and drag location in window
coordinates. Consider the case where we're determining the drag image offset for a dragged element in a subframe:

Before the patch, the drag location (which starts out in the subframe's content coordinates) would be converted to root view
coordinates, which would then be converted to mainframe content coordinates, which would then be converted to window coordinates
using the mainframe's view. After the patch, we carry out the same math until the last step, where we erroneously use the
_subframe's_ view to convert to window coordinates from content coordinates. This results in the position of the iframe relative
to the mainframe being accounted for twice.

To fix this, we simply use the main frame's view to convert from mainframe content coordinates to window coordinates while
computing the drag location. As for the event position in window coordinates, this is currently unused by any codepath in WebKit,
so we can just remove it altogether.

Since this bug only affects drag and drop in the macOS WebKit2 port, there's currently no way to test this. I'll be using
<https://bugs.webkit.org/show_bug.cgi?id=181898> to track adding test support for drag and drop on macOS WebKit2. Manually tested
dragging in both WebKit1 and WebKit2 on macOS. dragLocationInWindowCoordinates isn't used at all for iOS drag and drop.

* page/DragController.cpp:
(WebCore::DragController::doSystemDrag):
* platform/DragItem.h:
(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227266 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExpose Safe Browsing SPI
commit-queue@webkit.org [Sat, 20 Jan 2018 06:40:33 +0000 (06:40 +0000)]
Expose Safe Browsing SPI
https://bugs.webkit.org/show_bug.cgi?id=181804
<rdar://problem/36626946>

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-19
Reviewed by Dan Bernstein.

If client is using Apple internal SDK, then we can just import the header; if not,
then we declare necessary symbols that client will need.

* Configurations/WebKit.xcconfig:
Only link against SafariSafeBrowsing framework on macOS High Sierra
and iOS 11 and above. Weak link against SafariSafeBrowsing framework
because it is not present on the Base system.

* Platform/spi/Cocoa/SafeBrowsingSPI.h: Added.

* WebKit.xcodeproj/project.pbxproj:
Added SafeBrowsingSPI.h.

* WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/11/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd:
Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr...
ryanhaddad@apple.com [Sat, 20 Jan 2018 04:34:01 +0000 (04:34 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181901

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas...
ryanhaddad@apple.com [Sat, 20 Jan 2018 04:21:55 +0000 (04:21 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting-cache.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181900

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227263 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas...
ryanhaddad@apple.com [Sat, 20 Jan 2018 04:05:58 +0000 (04:05 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/fetch-canvas-tainting.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181897

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r227235.
ryanhaddad@apple.com [Sat, 20 Jan 2018 03:55:15 +0000 (03:55 +0000)]
Unreviewed, rolling out r227235.

The test for this change consistently times out on High
Sierra.

Reverted changeset:

"Support for preconnect Link headers"
https://bugs.webkit.org/show_bug.cgi?id=181657
https://trac.webkit.org/changeset/227235

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227261 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Sierra Debug WK2] ASSERTION FAILED: paymentCoordinator().supportsVersion(version)
ryanhaddad@apple.com [Sat, 20 Jan 2018 03:50:34 +0000 (03:50 +0000)]
[Sierra Debug WK2] ASSERTION FAILED: paymentCoordinator().supportsVersion(version)
https://bugs.webkit.org/show_bug.cgi?id=181833

Patch by Andy Estes <aestes@apple.com> on 2018-01-19
Reviewed by Youenn Fablet.

Moved the version 3 test into its own file that only runs on High Sierra and later.

* http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayRequestShippingContactV3.https.html: Added.
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227260 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMove Bingdings EWS and Webkitpy EWS queues to High Sierra on buildbot dashboard.
lingcherd_ho@apple.com [Sat, 20 Jan 2018 02:24:06 +0000 (02:24 +0000)]
Move Bingdings EWS and Webkitpy EWS queues to High Sierra on buildbot dashboard.
https://bugs.webkit.org/show_bug.cgi?id=181881

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.mac-os-x-elcapitan img.logo): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227258 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed build fix, removed unused lambda capture.
ryanhaddad@apple.com [Sat, 20 Jan 2018 01:58:47 +0000 (01:58 +0000)]
Unreviewed build fix, removed unused lambda capture.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227257 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark http/wpt/web-animations/timing-model/animation-effects/current-iteration.html...
ryanhaddad@apple.com [Sat, 20 Jan 2018 01:50:10 +0000 (01:50 +0000)]
Mark http/wpt/web-animations/timing-model/animation-effects/current-iteration.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181888

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227255 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate TestExpectations for webrtc/video-mute.html.
ryanhaddad@apple.com [Sat, 20 Jan 2018 00:16:10 +0000 (00:16 +0000)]
Update TestExpectations for webrtc/video-mute.html.
https://bugs.webkit.org/show_bug.cgi?id=177501

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227250 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-...
ryanhaddad@apple.com [Sat, 20 Jan 2018 00:16:07 +0000 (00:16 +0000)]
Mark imported/w3c/web-platform-tests/media-source/mediasource-config-change-mp4-* tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181565

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoResource Load Statistics: Remove unused calls to WebResourceLoadStatisticsStore:logTe...
wilander@apple.com [Sat, 20 Jan 2018 00:10:01 +0000 (00:10 +0000)]
Resource Load Statistics: Remove unused calls to WebResourceLoadStatisticsStore:logTestingEvent() to fix API test
https://bugs.webkit.org/show_bug.cgi?id=181890
<rdar://problem/36674772>

Unreviewed API test fix.

* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::scheduleClearInMemoryAndPersistent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227248 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDisable Atomics when SharedArrayBuffer isn’t enabled
ryanhaddad@apple.com [Fri, 19 Jan 2018 23:35:05 +0000 (23:35 +0000)]
Disable Atomics when SharedArrayBuffer isn’t enabled
https://bugs.webkit.org/show_bug.cgi?id=181572

Unreviewed test gardening.

* test262.yaml: Skip tests that fail after this change.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227246 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoCache storage errors like Quota should trigger console messages
commit-queue@webkit.org [Fri, 19 Jan 2018 23:26:13 +0000 (23:26 +0000)]
Cache storage errors like Quota should trigger console messages
https://bugs.webkit.org/show_bug.cgi?id=181879
<rdar://problem/36669048>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Chris Dumez.

Source/WebCore:

Covered by rebased test.

* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::retrieveRecords):
(WebCore::DOMCache::batchDeleteOperation):
(WebCore::DOMCache::batchPutOperation):
* Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::errorToException):
(WebCore::DOMCacheEngine::logErrorAndConvertToException):
* Modules/cache/DOMCacheEngine.h:
* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::retrieveCaches):
(WebCore::DOMCacheStorage::doOpen):
(WebCore::DOMCacheStorage::doRemove):

LayoutTests:

* http/wpt/cache-storage/cache-quota.any-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227245 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Layers tab should do away with popovers (if possible)
ross.kirsling@sony.com [Fri, 19 Jan 2018 23:18:44 +0000 (23:18 +0000)]
Web Inspector: Layers tab should do away with popovers (if possible)
https://bugs.webkit.org/show_bug.cgi?id=181805

Reviewed by Matt Baker.

* Localizations/en.lproj/localizedStrings.js:
Remove superfluous colon from a string.

* UserInterface/Main.html:
* UserInterface/Views/LayerDetailsSidebarPanel.css:
* UserInterface/Views/Layers3DContentView.css: Added.
Remove popover styling from sidebar, add new file with similar styling for canvas overlay.

* UserInterface/Views/LayerDetailsSidebarPanel.js:
(WI.LayerDetailsSidebarPanel):
(WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
(WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
(WI.LayerDetailsSidebarPanel.prototype._updateLayers):
(WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
(WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView):
(WI.Layers3DContentView.prototype.shown):
(WI.Layers3DContentView.prototype.selectLayerById):
(WI.Layers3DContentView.prototype._canvasMouseDown):
(WI.Layers3DContentView.prototype._buildLayerInfoElement):
(WI.Layers3DContentView.prototype._updateLayerInfoElement):
(WI.Layers3DContentView.prototype._updateReasonsList):
Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227244 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
mattbaker@apple.com [Fri, 19 Jan 2018 23:01:11 +0000 (23:01 +0000)]
Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
https://bugs.webkit.org/show_bug.cgi?id=181865
<rdar://problem/36664737>

Reviewed by Devin Rousso.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView.prototype._recordingStarted):
(WI.CanvasContentView.prototype._recordingStopped):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227243 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoDo not go to the storage process when registering a service worker client if there...
commit-queue@webkit.org [Fri, 19 Jan 2018 22:58:48 +0000 (22:58 +0000)]
Do not go to the storage process when registering a service worker client if there is no service worker registered
https://bugs.webkit.org/show_bug.cgi?id=181740
<rdar://problem/36650400>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Chris Dumez.

Source/WebCore:

Register a document as service worker client only if there is an existing service worker connection.
This allows not creating any connection if no service worker is registered.

Add internals API to test whether a service worker connection was created or not.
This is used by API tests that cover the changes.

* dom/Document.cpp:
(WebCore::Document::privateBrowsingStateDidChange): No need to create a service worker connection if client is not registered yet.
(WebCore::Document::setServiceWorkerConnection): No need to unregister/register if service worker connection is the same.
Similarly, if Document is to be destroyed or suspended, we should not register it.
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::commitData):
* testing/Internals.cpp:
(WebCore::Internals::hasServiceWorkerConnection):
* testing/Internals.h:
* testing/Internals.idl:
* workers/service/ServiceWorkerProvider.cpp:
(WebCore::ServiceWorkerProvider::registerServiceWorkerClients):
* workers/service/ServiceWorkerProvider.h:

Source/WebKit:

UIProcess notifies all web processes to register their service worker clients when spinning the service worker process.
Add private API to set the number of web processes for testing purposes.

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setMaximumNumberOfProcesses:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::establishWorkerContextConnectionToStorageProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::registerServiceWorkerClients):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Tools:

Add support for internals inside API tests.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/InjectInternals_Bundle.cpp: Added.
(TestWebKitAPI::InternalsInjectedBundleTest::InternalsInjectedBundleTest):
(TestWebKitAPI::InternalsInjectedBundleTest::initialize):
(TestWebKitAPI::InternalsInjectedBundleTest::didCreatePage):
(TestWebKitAPI::InternalsInjectedBundleTest::didClearWindowForFrame):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(setConfigurationInjectedBundlePath):
(-[RegularPageMessageHandler userContentController:didReceiveScriptMessage:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227242 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (r221092): Swipe actions are hard to perform in FastMail app
dino@apple.com [Fri, 19 Jan 2018 22:48:22 +0000 (22:48 +0000)]
REGRESSION (r221092): Swipe actions are hard to perform in FastMail app
https://bugs.webkit.org/show_bug.cgi?id=181817
<rdar://problem/35274055>

Source/WebCore:

Add a setting for controlling whether touch listeners are passive
by default on document/window/body.

Updated existing test.

* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
* page/Settings.yaml:

Source/WebKit:

Reviewed by Simon Fraser.

Add a linked-on-or-after check to set passive touch listeners on document in WebCore.

* CMakeLists.txt:
* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp: Copied from Source/WebKit/UIProcess/Cocoa/VersionChecks.h.
(defaultPassiveTouchListenersAsDefaultOnDocument):
* Shared/WebPreferencesDefaultValues.h:
* UIProcess/Cocoa/VersionChecks.h:
* WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

Reviewed by Simon Fraser.

Add a linked-on-or-after check to set passive touch listeners on document in WebCore.

* Misc/WebKitVersionChecks.h:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

LayoutTests:

Reviewed by Simon Fraser.

* fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227240 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate frame-ancestor directive to match Content Security Policy Level 3
dbates@webkit.org [Fri, 19 Jan 2018 22:43:11 +0000 (22:43 +0000)]
Update frame-ancestor directive to match Content Security Policy Level 3
https://bugs.webkit.org/show_bug.cgi?id=178891
<rdar://problem/35209458>

Reviewed by Alex Christensen.

Derived from Blink e667cc2e501fabab3605b838e4ee0d642a9c4a59:
<https://chromium.googlesource.com/chromium/src.git/+/e667cc2e501fabab3605b838e4ee0d642a9c4a59>

Source/WebCore:

Update frame-ancestor directive to match against the origin of the ancestor document per the
Content Security Policy Level 3 spec.: <https://w3c.github.io/webappsec-csp/> (15 January 2018).
Specifically this change in behavior was made to CSP 3 in <https://github.com/w3c/webappsec/issues/311>.
In earlier versions of the spec, the frame-ancestor directive matched against the URL of the
ancestor document.

Disregarding allow-same-origin sandboxed iframes, a document with policy "frame-ancestor 'self'"
will be blocked from loading in a sandboxed iframe as a result of this change.

Tests: http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow.html
       http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html

* page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::checkFrameAncestors):

LayoutTests:

* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-allow-same-origin-sandboxed-cross-url-allow.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-sandboxed-cross-url-block.html: Added.
* http/tests/security/contentSecurityPolicy/resources/frame-ancestors-test.js:
(injectNestedIframe):
(window.onload):
(testNestedIFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227238 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Curl] Add timeout support to XMLHttpRequest
commit-queue@webkit.org [Fri, 19 Jan 2018 22:33:51 +0000 (22:33 +0000)]
[Curl] Add timeout support to XMLHttpRequest
https://bugs.webkit.org/show_bug.cgi?id=181876

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-01-19
Reviewed by Alex Christensen

* platform/network/ResourceRequestBase.cpp:
* platform/network/curl/CurlContext.cpp:
(WebCore::CurlHandle::setTimeout):
* platform/network/curl/CurlContext.h:
* platform/network/curl/CurlRequest.cpp:
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didCompleteTransfer):
* platform/network/curl/ResourceError.h:
* platform/network/curl/ResourceErrorCurl.cpp:
(WebCore::ResourceError::httpError):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227237 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoKill ArithNegate's ArithProfile assert inside BytecodeParser
sbarati@apple.com [Fri, 19 Jan 2018 22:30:45 +0000 (22:30 +0000)]
Kill ArithNegate's ArithProfile assert inside BytecodeParser
https://bugs.webkit.org/show_bug.cgi?id=181877
<rdar://problem/36630552>

Reviewed by Mark Lam.

JSTests:

* stress/arith-profile-for-negate-can-see-non-number-due-to-dfg-osr-exit-profiling.js: Added.
(runNearStackLimit):
(f1):
(f2):
(f3):
(i.catch):
(i.try.runNearStackLimit):
(catch):

Source/JavaScriptCore:

Before this patch, we used to assert that op_negate's result ArithProfile
only produces number. It's logically true that negate only produces a number.
However, the DFG may incorrectly pick this ArithProfile when doing OSR exit
profiling. So we'll end up profiling something that's likely the input to
negate. This patch removes the assert. We cede to the fact that Graph::methodOfGettingAValueProfileFor
is entirely heuristic based, potentially leading to profiling results being imprecise.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227236 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSupport for preconnect Link headers
yoav@yoav.ws [Fri, 19 Jan 2018 22:16:21 +0000 (22:16 +0000)]
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
* http/tests/preconnect/resources/header-preconnect.php: Added.
* platform/ios-simulator/TestExpectations: Skipped the test, as ios-simulator doesn't process Link headers for subresources.
* platform/win/TestExpectations: Skipped the preconnect test directory, as it doesn't work on Windows.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoShould allow updating a build-request to 'canceled'.
dewei_zhu@apple.com [Fri, 19 Jan 2018 22:12:23 +0000 (22:12 +0000)]
Should allow updating a build-request to 'canceled'.
https://bugs.webkit.org/show_bug.cgi?id=181819

Reviewed by Ryosuke Niwa.

It's possible syncing script update a build-request to 'canceled' state.

* public/api/build-requests.php: Added 'canceled' as an acceptable update state.
* server-tests/api-build-requests-tests.js: Added a unit test to update a build-request to 'canceled'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227234 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agooss-fuzz jsc build is broken: StringImpl.h:27:10: fatal error: 'unicode/ustring.h...
ddkilzer@apple.com [Fri, 19 Jan 2018 21:48:25 +0000 (21:48 +0000)]
oss-fuzz jsc build is broken: StringImpl.h:27:10: fatal error: 'unicode/ustring.h' file not found
<https://webkit.org/b/181871>

Rubber-stamped by JF Bastien.

* CMakeLists.txt: Add ICU header search path to
LLIntOffsetsExtractor target by reusing
JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227233 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Styles Redesign: tabbing on commented out property throws exception
nvasilyev@apple.com [Fri, 19 Jan 2018 21:36:58 +0000 (21:36 +0000)]
Web Inspector: Styles Redesign: tabbing on commented out property throws exception
https://bugs.webkit.org/show_bug.cgi?id=180676
<rdar://problem/35981058>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
Tabbing from the selector field should focus on the first editable property.
When no editable properties are present, a new blank property should be added after the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
When no editable properties are present, a new blank property should be added after the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
When navigating between properties skip the commented out ones.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.get enabled):
(WI.SpreadsheetStyleProperty.prototype._update):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227232 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Cocoa] _WKNSWindowExtras.h: Add missing availability annotation
commit-queue@webkit.org [Fri, 19 Jan 2018 21:22:30 +0000 (21:22 +0000)]
[Cocoa] _WKNSWindowExtras.h: Add missing availability annotation
https://bugs.webkit.org/show_bug.cgi?id=181868

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-19
Reviewed by Dan Bernstein.

* Shared/API/Cocoa/_WKNSWindowExtras.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227231 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix jsc-only build
commit-queue@webkit.org [Fri, 19 Jan 2018 21:19:27 +0000 (21:19 +0000)]
Fix jsc-only build
https://bugs.webkit.org/show_bug.cgi?id=181874

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by JF Bastien.

This makes "build-webkit --jsc-only" work on Mac!

* wtf/PlatformJSCOnly.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227230 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSpread's effects are modeled incorrectly both in AI and in Clobberize
sbarati@apple.com [Fri, 19 Jan 2018 21:15:55 +0000 (21:15 +0000)]
Spread's effects are modeled incorrectly both in AI and in Clobberize
https://bugs.webkit.org/show_bug.cgi?id=181867
<rdar://problem/36290415>

Reviewed by Michael Saboff.

JSTests:

* stress/ai-needs-to-model-spreads-effects.js: Added.
(try.p.Symbol.iterator):
(try.go):
(catch):
* stress/clobberize-needs-to-model-spread-effects.js: Added.
(assert):
(foo):
(a.Symbol.iterator):

Source/JavaScriptCore:

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227229 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Make styles sidebar always LTR
nvasilyev@apple.com [Fri, 19 Jan 2018 20:13:20 +0000 (20:13 +0000)]
Web Inspector: Make styles sidebar always LTR
https://bugs.webkit.org/show_bug.cgi?id=175357
<rdar://problem/33787988>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227228 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoResource Load Statistics: Add void to argument list to fix build with -Wstrict-prototypes
wilander@apple.com [Fri, 19 Jan 2018 20:11:38 +0000 (20:11 +0000)]
Resource Load Statistics: Add void to argument list to fix build with -Wstrict-prototypes
https://bugs.webkit.org/show_bug.cgi?id=181870
<rdar://problem/36666750>

Unreviewed build fix.

* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227227 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFollow-up build fix for r227206.
joepeck@webkit.org [Fri, 19 Jan 2018 20:04:11 +0000 (20:04 +0000)]
Follow-up build fix for r227206.

Unreviewed.

* Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.h:
Avoid duplicate and different definitions of ALWAYS_INLINE.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227226 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAppCache: Log a Deprecation warning to the Console when AppCache is used
commit-queue@webkit.org [Fri, 19 Jan 2018 19:54:03 +0000 (19:54 +0000)]
AppCache: Log a Deprecation warning to the Console when AppCache is used
https://bugs.webkit.org/show_bug.cgi?id=181778

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-19
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/html/browsers/offline/appcache/workers/appcache-worker-expected.txt:
* web-platform-tests/html/browsers/offline/introduction-4/event_cached-expected.txt:
* web-platform-tests/html/browsers/offline/introduction-4/event_checking-expected.txt:
* web-platform-tests/html/browsers/offline/introduction-4/event_noupdate-expected.txt:
* web-platform-tests/html/browsers/offline/introduction-4/event_progress-expected.txt:
* web-platform-tests/html/browsers/offline/manifest_url_check-expected.txt:
* web-platform-tests/service-workers/service-worker/appcache-ordering-main.https-expected.txt:

Source/WebCore:

* html/HTMLHtmlElement.cpp:
(WebCore::HTMLHtmlElement::insertedByParser):

LayoutTests:

* http/tests/appcache/404-manifest-expected.txt:
* http/tests/appcache/404-resource-expected.txt:
* http/tests/appcache/404-resource-with-slow-main-resource-expected.txt:
* http/tests/appcache/abort-cache-onchecking-expected.txt:
* http/tests/appcache/abort-cache-onchecking-manifest-404-expected.txt:
* http/tests/appcache/abort-cache-onchecking-resource-404-expected.txt:
* http/tests/appcache/abort-cache-ondownloading-expected.txt:
* http/tests/appcache/abort-cache-ondownloading-manifest-404-expected.txt:
* http/tests/appcache/abort-cache-ondownloading-resource-404-expected.txt:
* http/tests/appcache/abort-cache-onprogress-expected.txt:
* http/tests/appcache/access-via-redirect-expected.txt:
* http/tests/appcache/crash-when-navigating-away-then-back-expected.txt:
* http/tests/appcache/credential-url-expected.txt:
* http/tests/appcache/cyrillic-uri-expected.txt:
* http/tests/appcache/decide-navigation-policy-after-delay-expected.txt:
* http/tests/appcache/deferred-events-delete-while-raising-expected.txt:
* http/tests/appcache/deferred-events-delete-while-raising-timer-expected.txt:
* http/tests/appcache/deferred-events-expected.txt:
* http/tests/appcache/different-https-origin-resource-main-expected.txt:
* http/tests/appcache/different-origin-manifest-expected.txt:
* http/tests/appcache/different-scheme-expected.txt:
* http/tests/appcache/document-write-html-element-2-expected.txt:
* http/tests/appcache/empty-manifest-expected.txt:
* http/tests/appcache/fail-on-update-2-expected.txt:
* http/tests/appcache/fail-on-update-expected.txt:
* http/tests/appcache/fallback-expected.txt:
* http/tests/appcache/fallback-namespace-outside-manifest-path-expected.txt:
* http/tests/appcache/foreign-fallback-expected.txt:
* http/tests/appcache/foreign-iframe-main-expected.txt:
* http/tests/appcache/history-test-expected.txt:
* http/tests/appcache/idempotent-update-expected.txt:
* http/tests/appcache/identifier-test-expected.txt:
* http/tests/appcache/interrupted-update-expected.txt:
* http/tests/appcache/local-content-expected.txt:
* http/tests/appcache/main-resource-fallback-for-network-error-crash-expected.txt:
* http/tests/appcache/main-resource-hash-expected.txt:
* http/tests/appcache/main-resource-redirect-expected.txt:
* http/tests/appcache/manifest-containing-itself-expected.txt:
* http/tests/appcache/manifest-parsing-expected.txt:
* http/tests/appcache/manifest-redirect-2-expected.txt:
* http/tests/appcache/manifest-redirect-expected.txt:
* http/tests/appcache/manifest-with-empty-file-expected.txt:
* http/tests/appcache/max-size-expected.txt:
* http/tests/appcache/multi-fallback-expected.txt:
* http/tests/appcache/navigating-away-while-cache-attempt-in-progress-expected.txt:
* http/tests/appcache/non-html-expected.txt:
* http/tests/appcache/offline-access-expected.txt:
* http/tests/appcache/online-fallback-layering-expected.txt:
* http/tests/appcache/online-whitelist-expected.txt:
* http/tests/appcache/origin-delete-expected.txt:
* http/tests/appcache/origin-quota-continued-download-expected.txt:
* http/tests/appcache/origin-quota-continued-download-multiple-manifests-expected.txt:
* http/tests/appcache/origin-quota-expected.txt:
* http/tests/appcache/origin-usage-expected.txt:
* http/tests/appcache/origins-with-appcache-expected.txt:
* http/tests/appcache/progress-counter-expected.txt:
* http/tests/appcache/reload-expected.txt:
* http/tests/appcache/remove-cache-expected.txt:
* http/tests/appcache/resource-redirect-2-expected.txt:
* http/tests/appcache/resource-redirect-expected.txt:
* http/tests/appcache/simple-expected.txt:
* http/tests/appcache/simple-video-async-expected.txt:
* http/tests/appcache/simple-video-sync-expected.txt:
* http/tests/appcache/top-frame-1-expected.txt:
* http/tests/appcache/top-frame-2-expected.txt:
* http/tests/appcache/top-frame-3-expected.txt:
* http/tests/appcache/top-frame-4-expected.txt:
* http/tests/appcache/update-cache-expected.txt:
* http/tests/appcache/video-expected.txt:
* http/tests/appcache/whitelist-wildcard-expected.txt:
* http/tests/appcache/wrong-content-type-expected.txt:
* http/tests/appcache/wrong-signature-2-expected.txt:
* http/tests/appcache/wrong-signature-expected.txt:
* http/tests/appcache/x-frame-options-prevents-framing-expected.txt:
* http/tests/appcache/xhr-foreign-resource-expected.txt:
* http/tests/contentfiltering/load-substitute-data-from-appcache-expected.txt:
* http/tests/security/appcache-switching-private-browsing-expected.txt:
* http/tests/security/cross-origin-appcache-allowed-expected.txt:
* http/tests/security/cross-origin-appcache-expected.txt:
* http/tests/security/same-origin-appcache-blocked-expected.txt:
* http/tests/ssl/upgrade-origin-usage-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227225 268f45cc-cd09-0410-ab3c-d52691b4dbfc