WebKit-https.git
3 years agoAssert that Node::insertedInto doesn't fire an event
rniwa@webkit.org [Tue, 17 Oct 2017 05:52:38 +0000 (05:52 +0000)]
Assert that Node::insertedInto doesn't fire an event
https://bugs.webkit.org/show_bug.cgi?id=178376
<rdar://problem/35022857>

Reviewed by Daniel Bates.

Fixed the assertion in notifyChildNodeInserted since this function MUST NOT dispatch an event,
and moved a bunch of event-dispatching code from Node::insertedInto into Node::finishedInsertingSubtree.

No new tests since the existing tests cover the behavioral change.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted): Fixed the assertion.
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::finishedInsertingSubtree): Extracted from insertedInto since
checkStyleSheet can dispatch an event.
* dom/ProcessingInstruction.h:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::finishedInsertingSubtree): Extracted from insertedInto since
setIntegralAttribute could dispatch DOMAttrModified synchronously.
* html/HTMLBodyElement.h:

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

3 years agoServiceWorkerRegistration should subclass RefCounted<>
cdumez@apple.com [Tue, 17 Oct 2017 05:12:52 +0000 (05:12 +0000)]
ServiceWorkerRegistration should subclass RefCounted<>
https://bugs.webkit.org/show_bug.cgi?id=178374

Reviewed by Ryosuke Niwa.

ServiceWorkerRegistration should subclass RefCounted<> or we end up with an infinite recursion
when constructing such object. This is because ServiceWorkerRegistration subclasses
EventTargetWithInlineData which implements ref() / deref() by calling refEventTarget() /
derefEventTarget(). refEventTarget() / derefEventTarget() are implemented in
ServiceWorkerRegistration so that they call ref() / deref() (which ends up being EventTarget's
methods).

* workers/service/ServiceWorkerRegistration.h:

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

3 years agoUnreviewed, fix the iOS build after r223431
wenson_hsieh@apple.com [Tue, 17 Oct 2017 05:00:00 +0000 (05:00 +0000)]
Unreviewed, fix the iOS build after r223431

Remove an unused variable captured in a lambda.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

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

3 years agoNo nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra...
dbates@webkit.org [Tue, 17 Oct 2017 03:26:36 +0000 (03:26 +0000)]
No nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra and OS X El Capitan
https://bugs.webkit.org/show_bug.cgi?id=178372

Reviewed by Tim Horton.

The Build Archive page depends on the collections (e.g. HTMLCollection) being
iterable so as to support iteration using ES6 for-of loop. Such support postdates
the version of WebKit shipped in macOS Sierra and OS X El Capitan. We should
make <https://webkit.org/build-archives/> work for these OSes since we still publish
nightlies for them.

* wp-content/themes/webkit/build-archives.php: Use Array.prototype.slice() to
convert the HTMLCollection to an array that can be iterated using a ES6 for-of loop.

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

3 years ago[Win] Webkit should still be able to build when unable to check if libraries are...
commit-queue@webkit.org [Tue, 17 Oct 2017 02:30:58 +0000 (02:30 +0000)]
[Win] Webkit should still be able to build when unable to check if libraries are up to date
https://bugs.webkit.org/show_bug.cgi?id=178367

Adding a option to skip the check to see if windows libraries are up to date.
This option is useful when testing modified libraries. This option also allows
building webkit when GitHub blocks requests to verify the latest library version.

Patch by Christopher Reid <chris.reid@sony.com> on 2017-10-16
Reviewed by Per Arne Vollan.

* Scripts/build-webkit:

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

3 years agoWeb Inspector: Styles Redesign: apply syntax highlighting to property values
nvasilyev@apple.com [Tue, 17 Oct 2017 02:25:15 +0000 (02:25 +0000)]
Web Inspector: Styles Redesign: apply syntax highlighting to property values
https://bugs.webkit.org/show_bug.cgi?id=178176

Reviewed by Matt Baker.

- Highlight links blue and CSS strings dark red.
- Truncate URLs and strings over 150 characters.

* UserInterface/Views/CodeMirrorAdditions.js:
Parse CSS values using CodeMirror.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link):
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string):

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing):
Replace trancated values with their full version.

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._renderValue):
Highlight links and CSS strings in values when not editing.

* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype.startEditing):
Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing.

* UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
(.syntax-highlighted a):
* UserInterface/Views/Variables.css:
(:root):
Make link color a variable.

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

3 years agoImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB...
jer.noble@apple.com [Tue, 17 Oct 2017 00:35:12 +0000 (00:35 +0000)]
ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth.
https://bugs.webkit.org/show_bug.cgi?id=178360

Reviewed by Eric Carlson.

AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once
CMSampleBuffers representing about 32MB of memory are allocated, no more can be created
until previously created ones are released. So rather than (only) creating the sample
buffers up front in readSampleMetadata(), also create them dynamically, if missing, in
createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been
decoded.

Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC.
Now that the expected content length is available, we don't have to wait until the data is complete
to respond to requests.

* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::ensureDecoderAvailable):
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
* platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
(SOFT_LINK_POINTER_OPTIONAL):
(-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(WebCore::imageDecoderAssetOptions):
(WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
(WebCore::ImageDecoderAVFObjC::setExpectedContentSize):

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

3 years agoAdd API support for quirk that lets an arbitrary click allow auto-play.
mrajca@apple.com [Tue, 17 Oct 2017 00:30:24 +0000 (00:30 +0000)]
Add API support for quirk that lets an arbitrary click allow auto-play.
https://bugs.webkit.org/show_bug.cgi?id=178227

Reviewed by Alex Christensen.

Source/WebCore:

Added API test.

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

* html/MediaElementSession.cpp:
(WebCore::needsArbitraryUserGestureAutoplayQuirk):
* loader/DocumentLoader.h:

Source/WebKit:

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

* Shared/WebsitePolicies.h:
* UIProcess/API/C/WKWebsitePolicies.cpp:
(WKWebsitePoliciesSetAllowedAutoplayQuirks):
(WKWebsitePoliciesGetAllowedAutoplayQuirks):
* UIProcess/API/C/WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.h:
* UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
(-[_WKWebsitePolicies allowedAutoplayQuirks]):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateWebsitePolicies):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(TEST): Added API test.

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

3 years agoDOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]
cdumez@apple.com [Tue, 17 Oct 2017 00:03:30 +0000 (00:03 +0000)]
DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]
https://bugs.webkit.org/show_bug.cgi?id=178366

Reviewed by Youenn Fablet.

Source/WebCore:

DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]. We attempted to do so using JSDOMQuad::visitAdditionalChildren()
but the code did not work because we failed to generate a "isReachableFromOpaqueRoots()" function for JSDOMPoint.

Test: fast/css/DOMQuad-points-SameObject.html

* dom/DOMPoint.idl:

LayoutTests:

Add layout test coverage.

* fast/css/DOMQuad-points-SameObject.html: Added.

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

3 years ago[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and...
aestes@apple.com [Tue, 17 Oct 2017 00:00:40 +0000 (00:00 +0000)]
[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
https://bugs.webkit.org/show_bug.cgi?id=178191
<rdar://problem/34906367>

Reviewed by Tim Horton.

Source/WebCore:

Added test cases to http/tests/ssl/applepay/ApplePaySession.html.

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/ApplePayPaymentContact.h:
* Modules/applepay/ApplePayPaymentContact.idl:
* Modules/applepay/ApplePaySessionPaymentRequest.h:
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
(WebCore::convert):

Source/WebKit:

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

LayoutTests:

* http/tests/ssl/applepay/ApplePayError-expected.txt:
* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

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

3 years agoAllow modern decoding of URLs
commit-queue@webkit.org [Mon, 16 Oct 2017 23:29:36 +0000 (23:29 +0000)]
Allow modern decoding of URLs
https://bugs.webkit.org/show_bug.cgi?id=178265

Patch by Alex Christensen <achristensen@webkit.org> on 2017-10-16
Reviewed by Chris Dumez.

* platform/URL.h:
(WebCore::URL::decode):

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

3 years agoDe-flakify http/tests/loading/basic-credentials-sent-automatically.html
achristensen@apple.com [Mon, 16 Oct 2017 23:10:00 +0000 (23:10 +0000)]
De-flakify http/tests/loading/basic-credentials-sent-automatically.html
https://bugs.webkit.org/show_bug.cgi?id=178365

Reviewed by Andy Estes.

* http/tests/loading/basic-credentials-sent-automatically-expected.txt:
* http/tests/loading/basic-credentials-sent-automatically.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:

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

3 years agoSafari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
timothy_horton@apple.com [Mon, 16 Oct 2017 23:03:28 +0000 (23:03 +0000)]
Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
https://bugs.webkit.org/show_bug.cgi?id=178358
<rdar://problem/34676899>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _didFindMatch:]):
UIPDFSelection can return a null rect as the selection's bounds.
We can't zoom to a null rect (and doing so results in CA throwing an
exception later).

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

3 years agoUnreviewed, rolling out r223425.
ryanhaddad@apple.com [Mon, 16 Oct 2017 22:40:34 +0000 (22:40 +0000)]
Unreviewed, rolling out r223425.

This change broke internal builds.

Reverted changeset:

"Remove unnecessary include from Document.h"
https://bugs.webkit.org/show_bug.cgi?id=178247
https://trac.webkit.org/changeset/223425

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

3 years agoIf an origin doesn't have databases in the Databases table we should still remove...
ryanhaddad@apple.com [Mon, 16 Oct 2017 22:22:40 +0000 (22:22 +0000)]
If an origin doesn't have databases in the Databases table we should still remove its information from disk in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178281
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brent Fulgham.

Source/WebCore:

New test:
DatabaseTracker.DeleteOriginWithMissingEntryInDatabasesTable

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteOrigin):
If databaseNames is empty, don't bail early. Instead, delete everything in the directory
containing the databases for this origin. This condition indicates that we previously
tried to remove the origin but didn't get all of the way through the deletion process.
Because we have lost track of the databases for this origin, we can assume that no
other process is accessing them. This means it should be safe to delete them outright.

Tools:

Verify that if there is an entry in the Origins table but no entries in the Databases
table that we still remove the directory for the origin, and that we remove the
entry from the Origins table.

* TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:
(TestWebKitAPI::TEST):

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

3 years ago[FETCH] Remove Request.type getter
commit-queue@webkit.org [Mon, 16 Oct 2017 21:57:27 +0000 (21:57 +0000)]
[FETCH] Remove Request.type getter
https://bugs.webkit.org/show_bug.cgi?id=177798

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Refreshing fetch WPT tests.

* web-platform-tests/fetch/api/request/request-type-attribute-historical-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-type-attribute-historical.html: Added.
* web-platform-tests/fetch/api/request/url-encoding-expected.txt: Added.
* web-platform-tests/fetch/api/request/url-encoding.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/fetch/api/request/request-type-attribute-historical.html
       imported/w3c/web-platform-tests/fetch/api/request/url-encoding.html

Removing FetchRequest type getter.
Merging Type and Destination as per https://fetch.spec.whatwg.org/#concept-request-destination.
Setting destination of request within CachedResourceLoader as this will be useful to Service Workers.

* Modules/fetch/FetchRequest.h:
* Modules/fetch/FetchRequest.idl:
* loader/FetchOptions.h:
(WebCore::FetchOptions::isolatedCopy const):
(WebCore::FetchOptions::FetchOptions):
(WebCore::FetchOptions::encode const):
(WebCore::FetchOptions::decode):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::setDestinationIfNotSet):
* loader/cache/CachedResourceRequest.h:

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

3 years agoCannot access images included in the content pasted from Microsoft Word
rniwa@webkit.org [Mon, 16 Oct 2017 21:44:28 +0000 (21:44 +0000)]
Cannot access images included in the content pasted from Microsoft Word
https://bugs.webkit.org/show_bug.cgi?id=124391
<rdar://problem/26862741>

Reviewed by Antti Koivisto.

Source/WebCore:

The bug is caused by the fact Microsoft Word generates HTML content which references an image using file URL.
Because the websites don't have access to arbtirary file URLs, this prevents editors such as TinyMCE to save
those images.

This patch fixes the problem by converting file URLs for images and all other subresources in the web archive
generated by Microsoft Word by blob URLs like r222839 for RTF/RTFD and r222119 for images.

To avoid revealing privacy sensitive information such as the absolute local file path to the user's home directory
Microsoft Word and other applications in the system includes in the web archive placed in the system pasteboard,
this patch also introduces the mechanism to sanitize when the HTML content is read by DataTransfer's getData.

This patch also introduces the sanitization for when writing HTML into the pasteboard since other applications
in the syste which is capable to processing web archives are not necessarily equipped to pretect itself and the
rest of the system from potentially dangerous JavaScript included in the web archive placed in the system pasteboard.

Finally, this patch expands the list of clipboard types that are exposed as "text/html" to the Web platform by
adding the capability to convert RTF, RTFD, and web archive into HTML markup by introducing WebContentMarkupReader,
a new subclass of PasteboardWebContentReader which creates a HTML markup instead of a document fragment. Most of
the sanitization process happens in this new class, and will be expanded to WebContentReader to make pasting safer.

Tests: editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url.html
       editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin.html
       editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying.html
       editing/pasteboard/data-transfer-set-data-sanitlize-html-when-dragging-in-null-origin.html
       http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html.html
       CopyHTML.Sanitizes
       DataInteractionTests.DataTransferSanitizeHTML
       PasteRTF.ExposesHTMLTypeInDataTransfer
       PasteRTFD.ExposesHTMLTypeInDataTransfer
       PasteRTFD.ImageElementUsesBlobURLInHTML
       PasteWebArchive.ExposesHTMLTypeInDataTransfer

* dom/DataTransfer.cpp:
(WebCore::originIdentifierForDocument): Moved to Document::originIdentifierForPasteboard.
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::getDataForItem const): Use WebContentMarkupReader read HTMl content so that we can read
web arhive, RTF, and RTFD as text/html.
(WebCore::DataTransfer::getData const):
(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::setDataFromItemList): Sanitize the HTML before placing into the system pasteboard.
(WebCore::DataTransfer::createForDragStartEvent):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForUpdatingDropTarget):
* dom/DataTransfer.h:
* dom/DataTransfer.idl:
* dom/DataTransferItem.cpp:
(WebCore::DataTransferItem::getAsString const):
* dom/Document.cpp:
(WebCore::Document::originIdentifierForPasteboard): Renamed from uniqueIdentifier. Moved the code to use the origin
string and then falling back to the UUID here from originIdentifierForDocument in DataTransfer.cpp.
* dom/Document.h:
* editing/WebContentReader.cpp:
(WebCore::WebContentMarkupReader::shouldSanitize const): Added.
* editing/WebContentReader.h:
(WebCore::WebContentMarkupReader): Added.
(WebCore::WebContentMarkupReader::WebContentMarkupReader):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragmentFromWebArchive): Extracted out of WebContentReader::readWebArchive to share code.
(WebCore::WebContentReader::readWebArchive):
(WebCore::WebContentMarkupReader::readWebArchive): Added. Reads the web archive, replace all subresource URLs by
blob URLs, and re-generate the markup using our copy & paste code. The last step is requied to strip away any privacy
sensitive information as well as potentially dangerous JavaScript code.
(WebCore::stripMicrosoftPrefix): Extracted out of WebContentReader::readHTML to share code.
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentMarkupReader::readHTML): Added. Only sanitize the markup when it comes from a different origin.
(WebCore::WebContentReader::readRTFD): Added a nullity check for frame.document().
(WebCore::WebContentMarkupReader::readRTFD): Added.
(WebCore::WebContentMarkupReader::readRTF): Added.
* editing/markup.h:
* editing/markup.cpp:
(WebCore::createPageForSanitizingWebContent): Added.
(WebCore::sanitizeMarkup): Added. This function "pastes" the markup into a new isolated document then reserializes
using our serialization code for copy. It strips away all invisible information such as comments, and strips away
event handlers and script elements to remove potentially dangerous scripts.
* platform/Pasteboard.h:
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::readPasteboardWebContentDataForType): Now that this code can be called by DataTransfer, added
the checks for the change count to make sure we stop letting web content read if the pasteboard had been changed by
some other applications. To do this, turned this function into a member of Pasteboard. Also changed the return type
to an enum with tri-state to exist the loop early in the call sites.
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readRespectingUTIFidelities):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Treat RTF, RTFD, and web archive as HTML.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Add the change count checks now that this code can be called by DataTransfer.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Treat RTF, RTFD, and web archive as HTML.

Tools:

Added tests for sanitizing HTML contents for copy & paste and drag & drop.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: Added.
(readHTMLFromPasteboard): Added.
(createWebViewWithCustomPasteboardDataEnabled): Added.
(CopyHTML.Sanitizes): Added.

* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
(createWebViewWithCustomPasteboardDataEnabled): Added to enable more tests on bots.

* TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
(writeRTFToPasteboard): Added.
(createWebViewWithCustomPasteboardDataEnabled): Added.
(createHelloWorldString): Added.
(PasteRTF.ExposesHTMLTypeInDataTransfer): Added.
(PasteRTFD.ExposesHTMLTypeInDataTransfer): Added.
(PasteRTFD.ImageElementUsesBlobURLInHTML): Added.

* TestWebKitAPI/Tests/WebKitCocoa/copy-html.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/paste-rtfd.html: Store the clipboardData contents for
PasteRTF.ExposesHTMLTypeInDataTransfer and PasteRTFD.ExposesHTMLTypeInDataTransfer.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(DataInteractionTests.DataTransferSanitizeHTML):

LayoutTests:

Added tests for copying & pasting and dragging & dropping HTML contents.

* TestExpectations:
* editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt: Rebaselined.
* editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Ditto.
* editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html: Modified the test to strip away platform specific
inline style properties.
* editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url-expected.txt: Added.
* editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-dragging-in-null-origin-expected.txt: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-html-when-dragging-in-null-origin.html: Added.
* editing/pasteboard/data-transfer-set-data-sanitizes-url-when-dragging-in-null-origin.html: Removed the superflous
call to setTimeout that was errornously added during debugging. Also updated the test to not claim all URL and
HTML values are read in the same origin, and updated the assertion for cross-origin case as it's now sanitized.
* editing/pasteboard/onpaste-text-html-expected.txt: Rebaselined. The order of CSS properties have changed.
* http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html-expected.txt: Added.
* http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html.html: Added.
* http/tests/security/clipboard/copy-paste-url-across-origin-sanitizes-url.html:
* http/tests/security/clipboard/resources/copy-html.html: Added.
* http/tests/security/clipboard/resources/copy-url.html: Renamed from copy.html.
* platform/ios-wk2/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Remoevd.
* platform/ios-wk1/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Remoevd.
* platform/mac-wk1/TestExpectations:

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

3 years agoAdd a _WKThumbnailView initializer with a WKWebView
achristensen@apple.com [Mon, 16 Oct 2017 21:33:11 +0000 (21:33 +0000)]
Add a _WKThumbnailView initializer with a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=178351
<rdar://problem/34979453>

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _page]):
(-[WKWebView _setThumbnailView:]):
(-[WKWebView _thumbnailView]):
(-[WKWebView _setIgnoresAllEvents:]):
(-[WKWebView _ignoresAllEvents]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKWebView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):

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

3 years agoUnreviewed attempt to fix the Windows debug build.
ryanhaddad@apple.com [Mon, 16 Oct 2017 21:33:10 +0000 (21:33 +0000)]
Unreviewed attempt to fix the Windows debug build.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteOrigin):

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

3 years agoExpose more WKView properties as WKWebViewPrivate SPI
achristensen@apple.com [Mon, 16 Oct 2017 21:02:48 +0000 (21:02 +0000)]
Expose more WKView properties as WKWebViewPrivate SPI
https://bugs.webkit.org/show_bug.cgi?id=178349
<rdar://problem/34980919>

Reviewed by Tim Horton.

_backgroundExtendsBeyondPage was already exposed on iOS, but we need it on Mac, too.
A few other properties also need exposing.

* UIProcess/API/Cocoa/WKWebView.mm:
(toAPIScrollbarStyle):
(toCoreScrollbarStyle):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _backgroundExtendsBeyondPage]):
(-[WKWebView _setOverlayScrollbarStyle:]):
(-[WKWebView _overlayScrollbarStyle]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

3 years agoLog using differential privacy domains where the WebContent process crashes
cdumez@apple.com [Mon, 16 Oct 2017 20:52:04 +0000 (20:52 +0000)]
Log using differential privacy domains where the WebContent process crashes
https://bugs.webkit.org/show_bug.cgi?id=178346
<rdar://problem/33293830>

Reviewed by Alex Christensen.

Source/WebCore:

Add new diagnostic logging key for domain causing crashes.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::domainCausingCrashKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::currentURL const):
(WebKit::WebPageProxy::processDidTerminate):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didClose):

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

3 years agoActivate Cache API by default
commit-queue@webkit.org [Mon, 16 Oct 2017 20:36:18 +0000 (20:36 +0000)]
Activate Cache API by default
https://bugs.webkit.org/show_bug.cgi?id=178186

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16
Reviewed by Chris Dumez.

Source/WebKit:

* Shared/WebPreferencesDefinitions.h:

Tools:

Removing explicit activation of cache api.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setCacheAPIEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:

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

3 years ago[Settings] Remove all custom code from Settings.h/cpp
weinig@apple.com [Mon, 16 Oct 2017 20:33:32 +0000 (20:33 +0000)]
[Settings] Remove all custom code from Settings.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=178330

Reviewed by Simon Fraser.

Source/WebCore:

Removes the two remaining functions out of Settings paving the way
for the file to be generated.

- pageDestroyed was moved down into SettingsBase.
- effectiveFrameFlattening was moved to FrameView (to reduce the need
  for additional includes, the FrameFlattening enum was converted to
  an enum class to allow it to be forward declared).

Also moves default values into SettingsDefaultValues.h

* WebCore.xcodeproj/project.pbxproj:

    Add new files.

* page/FrameView.cpp:
* page/FrameView.h:

    Move effectiveFrameFlattening function here from Settings.

* page/Settings.cpp:
* page/Settings.h:

    Move effectiveFrameFlattening, pageDestroyed and default values out.

* page/Settings.in:

    Update for turning FrameFlattening into an enum class.

* page/SettingsBase.h:

    Turn FrameFlattening into an enum class and move pageDestroyed here.

* page/SettingsDefaultValues.h: Added.

    Move all the default values from Settings here.

* rendering/RenderFrameSet.cpp:
* rendering/RenderIFrame.cpp:
* rendering/RenderView.cpp:

    Get effectiveFrameFlattening from the FrameView.

* testing/InternalSettings.cpp:
* testing/InternalSettings.h:

    Update now that FrameFlattening is an enum class.

Source/WebKit:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFrameFlatteningEnabled):
(WKPreferencesGetFrameFlatteningEnabled):
* UIProcess/API/glib/WebKitSettings.cpp:
(webkit_settings_get_enable_frame_flattening):
(webkit_settings_set_enable_frame_flattening):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setFrameFlatteningEnabled):

    Update for naming changes of FrameFlattening now that it is an enum class.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged const):

    Ge the effectiveFrameFlattening from the FrameView, rather than the Settings.

Source/WebKitLegacy/mac:

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

    Update for naming changes of FrameFlattening now that it is an enum class.

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::notifyPreferencesChanged):

    Update for naming changes of FrameFlattening now that it is an enum class.

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

3 years ago[WK2][NetworkSession] Add support for resuming downloads
cdumez@apple.com [Mon, 16 Oct 2017 20:29:35 +0000 (20:29 +0000)]
[WK2][NetworkSession] Add support for resuming downloads
https://bugs.webkit.org/show_bug.cgi?id=177625
<rdar://problem/34345975>

Reviewed by Alex Christensen.

Add support for resuming downloads for the WK2 NETWORK_SESSION code path.

This was tested manually. I was unable to write an API test because our tests
do not run an HTTP server and CFNetwork does not seem to generate resume data
when cancelling a download over non-HTTP.

* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveChallenge):
(WebKit::Download::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::DownloadManager::resumeDownload):
* NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:
(WebKit::Download::resume):
This currently includes a workaround for <rdar://problem/34745171>. We update the
resume data to include the NSURLSessionResumeInfoLocalPath key with the final
destination path so that CFNetwork looks for the temporary data at the right
location.

* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::NetworkSessionCocoa::downloadTaskWithResumeData):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
* Shared/Authentication/AuthenticationManager.h:

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

3 years agorun-webkit-tests help text should mention arguments too
commit-queue@webkit.org [Mon, 16 Oct 2017 20:27:20 +0000 (20:27 +0000)]
run-webkit-tests help text should mention arguments too
https://bugs.webkit.org/show_bug.cgi?id=178352

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-10-16
Reviewed by Tim Horton.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):

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

3 years agoWeb Inspector: Layers tab mistakenly throws out the root element's layer.
commit-queue@webkit.org [Mon, 16 Oct 2017 20:25:29 +0000 (20:25 +0000)]
Web Inspector: Layers tab mistakenly throws out the root element's layer.
https://bugs.webkit.org/show_bug.cgi?id=178222

Patch by Ross Kirsling <ross.kirsling@sony.com> on 2017-10-16
Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.prototype.layersForNode):
Fix the issue at the manager level.

* UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype.layout):
Update new sidebar based on simplified manager API.

* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WI.LayerTreeDetailsSidebarPanel.prototype.layout):
Move overtailored code from manager to legacy sidebar.

LayoutTests:

* inspector/layers/layer-tree-manager-expected.txt: Added.
* inspector/layers/layer-tree-manager.html: Added.

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

3 years agoIf we fail to delete any database file, don't remove its information from the tracker...
ryanhaddad@apple.com [Mon, 16 Oct 2017 20:20:53 +0000 (20:20 +0000)]
If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

Source/WebCore:

New tests:
DatabaseTracker.DeleteDatabase
DatabaseTracker.DeleteDatabaseWhenDatabaseDoesNotExist
DatabaseTracker.DeleteOrigin
DatabaseTracker.DeleteOriginWhenDeletingADatabaseFails
DatabaseTracker.DeleteOriginWhenDatabaseDoesNotExist

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
If the database doesn't exist, we previously deleted it but failed to remove the
information from the tracker database. We still want to delete all of the information
associated with this database from the tracker database, so add it to databaseNamesToDelete.
(WebCore::DatabaseTracker::deleteOrigin):
If a database doesn't exist, don't try to delete it. We don't need to, but more
importantly, deleteDatabaseFile() will fail if the database doesn't exist, which
will cause us to incorrectly think we failed to remove database information from disk.
If we actually fail to delete any database file, return before we remove the origin
information from the tracker database so we don't lose track of the database.
(WebCore::DatabaseTracker::deleteDatabase):
If a database doesn't exist, don't try to delete it. We don't need to, but also it
will cause us to incorrectly think that we were unable to delete a database, so we
would bail before we remove the database information from the tracker database. We
want to remove the database information from the tracker database because the database
doesn't exist.
* Modules/webdatabase/DatabaseTracker.h:
Expose fullPathForDatabase() for use by tests.
* platform/Logging.h:
Add a logging channel.

Tools:

Add tests that verify we correctly delete databases and remove their information from
the tracker database, even if the database doesn't exist. Verify that if we fail to
delete a database, we don't remove its information from the tracker database.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Move DatabaseTrackerTest.cpp to DatabaseTrackerTest.mm so that we can use the cocoa
method for creating a temporary directory in the tests.
* TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Removed.
The existing test was copied to DatabaseTrackerTest.mm.
* TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::addToDatabasesTable):
(TestWebKitAPI::removeDirectoryAndAllContents):
(TestWebKitAPI::createFileAtPath):

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

3 years agoUnreviewed, rolling out r223422.
ryanhaddad@apple.com [Mon, 16 Oct 2017 20:16:57 +0000 (20:16 +0000)]
Unreviewed, rolling out r223422.

These tests are for a change that was rolled out in r223420

Reverted changeset:

"If we fail to delete any database file, don't remove its
information from the tracker database"
https://bugs.webkit.org/show_bug.cgi?id=178251
https://trac.webkit.org/changeset/223422

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

3 years agoRemove unnecessary include from Document.h
achristensen@apple.com [Mon, 16 Oct 2017 19:49:23 +0000 (19:49 +0000)]
Remove unnecessary include from Document.h
https://bugs.webkit.org/show_bug.cgi?id=178247

Reviewed by Darin Adler.

* dom/Document.cpp:
(WebCore::Document::hasTouchEventHandlers const):
(WebCore::Document::touchEventTargetsContain const):
* dom/Document.h:
(WebCore::Document::hasTouchEventHandlers const): Deleted.
(WebCore::Document::touchEventTargetsContain const): Deleted.

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

3 years agoFix iOS build after r223422
achristensen@apple.com [Mon, 16 Oct 2017 19:46:29 +0000 (19:46 +0000)]
Fix iOS build after r223422
https://bugs.webkit.org/show_bug.cgi?id=178251

* Modules/webdatabase/DatabaseManager.h:

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

3 years agoWe should wrap the removal of information from the tracker database in a transaction...
commit-queue@webkit.org [Mon, 16 Oct 2017 19:21:07 +0000 (19:21 +0000)]
We should wrap the removal of information from the tracker database in a transaction in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178274
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Tim Horton.

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteOrigin):
Wrap the removal of information from the tracker database in a transaction so that
we don't end up in a case where only one of the tables contains information about
an origin.
If anything goes wrong when we're modifying the tracker database, rollback the transaction
before bailing.

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

3 years agoIf we fail to delete any database file, don't remove its information from the tracker...
bfulgham@apple.com [Mon, 16 Oct 2017 19:20:17 +0000 (19:20 +0000)]
If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

Add tests that verify we correctly delete databases and remove their information from
the tracker database, even if the database doesn't exist. Verify that if we fail to
delete a database, we don't remove its information from the tracker database.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Move DatabaseTrackerTest.cpp to DatabaseTrackerTest.mm so that we can use the cocoa
method for creating a temporary directory in the tests.
* TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Removed.
The existing test was copied to DatabaseTrackerTest.mm.
* TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Added.
(TestWebKitAPI::TEST):
(TestWebKitAPI::addToDatabasesTable):
(TestWebKitAPI::removeDirectoryAndAllContents):
(TestWebKitAPI::createFileAtPath):

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

3 years agoAdd RELEASE_ASSERT_WITH_SECURITY_IMPLICATION() macro
ddkilzer@apple.com [Mon, 16 Oct 2017 19:02:12 +0000 (19:02 +0000)]
Add RELEASE_ASSERT_WITH_SECURITY_IMPLICATION() macro
<https://webkit.org/b/178269>

Reviewed by Alex Christensen.

Source/WTF:

* wtf/Assertions.h:
(RELEASE_ASSERT_WITH_SECURITY_IMPLICATION): Add macro.

Tools:

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Add checker to warn about using
ASSERT_WITH_SECURITY_IMPLICATION().
(CppChecker.categories): Add 'security/assertion' to list of
enabled checkers.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_debug_security_assertion): Add tests for
new checker.

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

3 years agoUnreviewed, rolling out r223419.
ryanhaddad@apple.com [Mon, 16 Oct 2017 18:53:11 +0000 (18:53 +0000)]
Unreviewed, rolling out r223419.

This change broke the Windows build.

Reverted changeset:

"If we fail to delete any database file, don't remove its
information from the tracker database"
https://bugs.webkit.org/show_bug.cgi?id=178251
https://trac.webkit.org/changeset/223419

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

3 years agoIf we fail to delete any database file, don't remove its information from the tracker...
bfulgham@apple.com [Mon, 16 Oct 2017 18:08:49 +0000 (18:08 +0000)]
If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

New tests:
DatabaseTracker.DeleteDatabase
DatabaseTracker.DeleteDatabaseWhenDatabaseDoesNotExist
DatabaseTracker.DeleteOrigin
DatabaseTracker.DeleteOriginWhenDeletingADatabaseFails
DatabaseTracker.DeleteOriginWhenDatabaseDoesNotExist

* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
If the database doesn't exist, we previously deleted it but failed to remove the
information from the tracker database. We still want to delete all of the information
associated with this database from the tracker database, so add it to databaseNamesToDelete.
(WebCore::DatabaseTracker::deleteOrigin):
If a database doesn't exist, don't try to delete it. We don't need to, but more
importantly, deleteDatabaseFile() will fail if the database doesn't exist, which
will cause us to incorrectly think we failed to remove database information from disk.
If we actually fail to delete any database file, return before we remove the origin
information from the tracker database so we don't lose track of the database.
(WebCore::DatabaseTracker::deleteDatabase):
If a database doesn't exist, don't try to delete it. We don't need to, but also it
will cause us to incorrectly think that we were unable to delete a database, so we
would bail before we remove the database information from the tracker database. We
want to remove the database information from the tracker database because the database
doesn't exist.
* Modules/webdatabase/DatabaseTracker.h:
Expose fullPathForDatabase() for use by tests.
* platform/Logging.h:
Add a logging channel.

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

3 years agoREGRESSION(223307): ASSERTION in WebCore::ResourceLoadObserver::logUserInteractionWit...
bfulgham@apple.com [Mon, 16 Oct 2017 18:05:59 +0000 (18:05 +0000)]
REGRESSION(223307): ASSERTION in WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution
https://bugs.webkit.org/show_bug.cgi?id=178342
<rdar://problem/35008505>

Reviewed by Chris Dumez.

In r223307 I mistakenly used 'topDocument->topDocument()' because of a copy/paste error. I should have just used
'topDocument'.

Tests: CommandBackForwardTestWKWebView in TestWebKitAPI.

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): We might enter this routine at a time
where there is no page. If so, we should return early and not log credit.
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent): Correct the argument passed to the log function.

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

3 years agoAdjust one more test from constant() to env() after r177581
timothy_horton@apple.com [Mon, 16 Oct 2017 18:00:34 +0000 (18:00 +0000)]
Adjust one more test from constant() to env() after r177581

* fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html:

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

3 years ago[WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64...
aperez@igalia.com [Mon, 16 Oct 2017 17:30:59 +0000 (17:30 +0000)]
[WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
https://bugs.webkit.org/show_bug.cgi?id=178090

Reviewed by Michael Catanzaro.

EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
implementation, its build options, and the libepoxy build options.  Using "static_cast"
works when it is a numeric value and the width of the value needs to be optionally
extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
cases. Therefore it seems reasonable to use a plain C cast expression to solve this
particular situation.

* WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:
(WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression.

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

3 years agoMake some asserts into release asserts
fpizlo@apple.com [Mon, 16 Oct 2017 17:19:11 +0000 (17:19 +0000)]
Make some asserts into release asserts
https://bugs.webkit.org/show_bug.cgi?id=178324

Reviewed by Saam Barati.
Source/JavaScriptCore:

These asserts are not on perf critical paths, so they might as well be release asserts.

* runtime/DataView.h:
(JSC::DataView::get):
(JSC::DataView::set):

Source/WebCore:

No new tests because no change in behavior.

This introduces some release asserts. Perf testing shows that it's neutral. So, we get some extra
safety without losing any perf.

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::notifyChildNodeInserted):
* dom/Document.cpp:
(WebCore::Document::adoptNode):
(WebCore::Document::frameDestroyed):
(WebCore::Document::attachToCachedFrame):
(WebCore::Document::detachFromCachedFrame):
(WebCore::Document::prepareForDestruction):
(WebCore::Document::dispatchWindowEvent):
(WebCore::Document::dispatchWindowLoadEvent):
(WebCore::Document::applyQuickLookSandbox):
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get const):
(WebCore:: const):
* dom/Node.cpp:
(WebCore::Node::~Node):
(WebCore::DidMoveToNewDocumentAssertionScope::~DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::didRecieveCall):
(WebCore::moveNodeToNewDocument):
(WebCore::moveShadowTreeToNewDocument):
(WebCore::Node::moveTreeToNewScope):
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::dispatchSubtreeModifiedEvent):
(WebCore::Node::dispatchDOMActivateEvent):

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

3 years agoLayoutTest http/tests/cache-storage/cache-clearing-origin.https.html is a flaky failure
commit-queue@webkit.org [Mon, 16 Oct 2017 17:18:26 +0000 (17:18 +0000)]
LayoutTest http/tests/cache-storage/cache-clearing-origin.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178305
<rdar://problem/34990264>

Unreviewed.

Removing flaky test expectations based on dashboard.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16

* TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:

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

3 years agoClicks on Link with download attribute causes all (other) links to trigger download...
cdumez@apple.com [Mon, 16 Oct 2017 16:59:47 +0000 (16:59 +0000)]
Clicks on Link with download attribute causes all (other) links to trigger download when clicked
https://bugs.webkit.org/show_bug.cgi?id=178267
<rdar://problem/34985016>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline test which behave differently now in WebKit2 due to WKTR's injected bundle
using PassThrough policy for new windows. The new result is identical to what you
would get when you open the test in Safari so I think this is a good thing.

* web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt:

Source/WebKit:

When clicking on an anchor with the download attribute, the m_syncNavigationActionHasDownloadAttribute
flag on WebPageProxy would get set. This flag would not get reset right away and instead, it would get
updated during the next call to WebPageProxy::decidePolicyForNavigationAction(). The issue is that if
you later click on a link with target="_blank", WebPageProxy::decidePolicyForNewWindowAction() gets
called instead of WebPageProxy::decidePolicyForNavigationAction() and we do not reset the
m_syncNavigationActionHasDownloadAttribute flag and we force a download.

To address the problem, I got rid of this flag on WebPageProxy and it is error-prone and should really
not be at page-level. Instead, I added a shouldForceDownload flag on the navigation object. It makes
more sense to associate the flag with the navigation and makes it less error-prone.

* UIProcess/API/APINavigation.h:
(API::Navigation::setShouldForceDownload):
(API::Navigation::shouldForceDownload const):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:

Tools:

Use PassThrough policy in WKTR's InjectedBundle's decidePolicyForNewWindowAction so that the
request is sent to the UIProcess. This gets WKTR's closer to Safari behavior and helps
reproduce the bug. Without this change, I would not be able to write a regression test for
this bug that is very easily reproducible in Safari.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForNewWindowAction):

LayoutTests:

Add layout test coverage.

* http/tests/download/anchor-load-after-download-expected.txt: Added.
* http/tests/download/anchor-load-after-download.html: Added.
* platform/ios-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt.

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

3 years agoMake RealtimeIncomingAudioSources and RealtimeOutgoingAudioSources port agnostic
commit-queue@webkit.org [Mon, 16 Oct 2017 16:40:48 +0000 (16:40 +0000)]
Make RealtimeIncomingAudioSources and RealtimeOutgoingAudioSources port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177928

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-10-16
Reviewed by Youenn Fablet.

Refactor the RealtimeIncomingAudioSource and RealtimeOutgoingAudioSource classes,
move the mac specific code to a different class. This way we can use them from
other ports.

No new tests, we are not adding new functionality just refactoring.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RealtimeIncomingAudioSource.cpp: Copied from Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h. Just the port agnostic parts.
* platform/mediastream/RealtimeIncomingAudioSource.h: Copied from Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h. Ditto.
* platform/mediastream/RealtimeOutgoingAudioSource.cpp: Copied from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp. Ditto.
* platform/mediastream/RealtimeOutgoingAudioSource.h: Copied from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h. Ditto.
* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp: Added, it adds Cocoa code parts from original Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.cpp.
(WebCore::RealtimeIncomingAudioSource::create): Moved this function from the RealtimeOutgoingAudioSource.cpp file to avoid including the Cocoa file there.
* platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Added Cocoa code from original Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h.
* platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp: Added Cocoa code from original Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp.
(WebCore::RealtimeOutgoingAudioSource::create): Moved this function from the RealtimeOutgoingAudioSource.cpp file to avoid including the Cocoa file there.
* platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h: Added Cocoa code from the original Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h.

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

3 years agoRebaseline imported/w3c/web-platform-tests/beacon/headers/header-content-type.html...
ryanhaddad@apple.com [Mon, 16 Oct 2017 16:38:15 +0000 (16:38 +0000)]
Rebaseline imported/w3c/web-platform-tests/beacon/headers/header-content-type.html for macOS.
https://bugs.webkit.org/show_bug.cgi?id=178343

Unreviewed test gardening.

* platform/mac-wk2/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Added.

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

3 years agoUnreviewed, fix the tvOS build after r223340.
wenson_hsieh@apple.com [Mon, 16 Oct 2017 16:21:09 +0000 (16:21 +0000)]
Unreviewed, fix the tvOS build after r223340.

Add a new #define in PlatformPasteboardIOS.mm for item provider support, and guard usages of
WebItemProviderPasteboard using it.

* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::readURL):

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

3 years agoJSRunLoopTimer: reduce likely race when used improperly
jfbastien@apple.com [Mon, 16 Oct 2017 16:19:29 +0000 (16:19 +0000)]
JSRunLoopTimer: reduce likely race when used improperly
https://bugs.webkit.org/show_bug.cgi?id=178298
<rdar://problem/32899816>

Reviewed by Saam Barati.

If an API user sets a timer on JSRunLoopTimer, and then racily
destroys the JSRunLoopTimer while the timer is firing then it's
possible for timerDidFire to cause a use-after-free and / or crash
because e.g. m_apiLock becomes a nullptr while timerDidFire is
executing. That results from an invalid use of JSRunLoopTimer, but
we should try to be more resilient for that type of misuse because
it's not necessarily easy to catch by inspection.

With this change the only remaining race is if the timer fires,
and then only timerDidFire's prologue executes, but not the load
of the m_apiLock pointer from `this`. It's a much smaller race.

Separately, I'll reach out to API users who are seemingly misusing
the API.

* runtime/JSRunLoopTimer.cpp:
(JSC::JSRunLoopTimer::timerDidFire): put m_apiLock on the stack,
and checks for nullptr. This prevents loading it twice off of
`this` and turns a nullptr deref into "just" a use-after-free.
(JSC::JSRunLoopTimer::~JSRunLoopTimer): acquire m_apiLock before
calling m_vm->unregisterRunLoopTimer(this), which in turn does
CFRunLoopRemoveTimer / CFRunLoopTimerInvalidate. This prevents
timerDidFire from doing much while the timers are un-registered.
~JSRunLoopTimer also needs to set m_apiLock to nullptr before
releasing the lock, so it needs its own local copy.

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

3 years agoUnreviewed, rolling out r223271.
ryanhaddad@apple.com [Mon, 16 Oct 2017 16:12:18 +0000 (16:12 +0000)]
Unreviewed, rolling out r223271.

This change introduced LayoutTest failures on WK1.

Reverted changeset:

"Use asynchronous ResourceHandleClient calls for WebKit1"
https://bugs.webkit.org/show_bug.cgi?id=160677
https://trac.webkit.org/changeset/223271

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

3 years agoMark animations/play-state-in-shorthand.html as flaky on Windows.
pvollan@apple.com [Mon, 16 Oct 2017 15:23:12 +0000 (15:23 +0000)]
Mark animations/play-state-in-shorthand.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178341

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoMake RealtimeIncomingVideoSources and RealtimeOutgoingVideoSources port agnostic
commit-queue@webkit.org [Mon, 16 Oct 2017 14:44:52 +0000 (14:44 +0000)]
Make RealtimeIncomingVideoSources and RealtimeOutgoingVideoSources port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177869

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-10-16
Reviewed by Youenn Fablet.

Refactor the RealtimeIncomingVideoSource and RealtimeOutgoingVideoSource classes,
move the cocoa specific code to a different class. This way we can use them from
other ports.

No new functionality, just a refactor.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RealtimeIncomingVideoSource.cpp: Moved from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h. Just the port agnostic parts.
* platform/mediastream/RealtimeIncomingVideoSource.h: Moved from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h. DItto
* platform/mediastream/RealtimeOutgoingVideoSource.cpp: Moved from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp. Ditto
* platform/mediastream/RealtimeOutgoingVideoSource.h: Moved from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.h. Ditto
* platform/mediastream/mac/RealtimeIncomingVideoSourceMac.cpp: Added, it adds the Cocoa specific parts from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp.
(WebCore::RealtimeIncomingVideoSource::create): Moved this function from the base class, it allows avoiding the include.
* platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h: Added, cocoa dependent code from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h.
(WebCore::RealtimeOutgoingVideoSource::create): Moved this funtion from the base class, now we can use the Cocoa create without including it in the base class.
* platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Added, cocoa dependent code.
* platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h: Added, cocoa dependent code.

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

3 years agoDon't use intrinsic width if our container's width is zero
rego@igalia.com [Mon, 16 Oct 2017 12:10:47 +0000 (12:10 +0000)]
Don't use intrinsic width if our container's width is zero
https://bugs.webkit.org/show_bug.cgi?id=178073

Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on Blink r173212 by <robhogan@gmail.com>.
https://chromium.googlesource.com/chromium/src/+/1592e8a1e8e56dfa6e5d709c50b129ae659c2fad

Since at least r798 we use a replaced element's intrinsic width
if its containing block has a width of zero. As a result our rendering
of width100percent-image.html has disagreed with all other browsers
and we display replaced elements when they should be invisible.

Test: fast/replaced/container-width-zero.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
If our container has zero width then let our width be zero too.

LayoutTests:

New rebaseline for width100percent-image.html test.

* fast/replaced/container-width-zero-expected.txt: Added.
* fast/replaced/container-width-zero.html: Added.
* platform/ios/fast/replaced/width100percent-image-expected.txt:
* platform/gtk/fast/replaced/width100percent-image-expected.png:
* platform/gtk/fast/replaced/width100percent-image-expected.txt:
* platform/mac/fast/replaced/width100percent-image-expected.png:
* platform/mac/fast/replaced/width100percent-image-expected.txt:
* platform/win/TestExpectations: Skips test as it needs a rebaseline.

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

3 years agoAdd Emilio Cobos Álvarez to the contributors list.
antti@apple.com [Mon, 16 Oct 2017 10:29:06 +0000 (10:29 +0000)]
Add Emilio Cobos Álvarez to the contributors list.
https://bugs.webkit.org/show_bug.cgi?id=178334

Patch by Emilio Cobos Álvarez <emilio@crisal.io> on 2017-10-16
Reviewed by Antti Koivisto.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoImprove --help documentation and add --list-plans to show available benchmarks.
mjs@apple.com [Mon, 16 Oct 2017 08:16:29 +0000 (08:16 +0000)]
Improve --help documentation and add --list-plans to show available benchmarks.
https://bugs.webkit.org/show_bug.cgi?id=178059

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.available_plans): New function that returns the list of available plans.
(BenchmarkRunner.plan_directory): New method to centralize knowledge of where the plan files live.
(BenchmarkRunner._find_plan_file): Updated to use BenchmarkRunner.plan_directory

* Scripts/webkitpy/benchmark_runner/run_benchmark.py:

(parse_args): Help cleanup: Reordered options to put more common
ones at the top. Fixed wording. Added help for each
option. Explained default for each option that has one.

New option: --list-plans which tells you the available benchmarks.

Code cleanup: Removed use of dest where redundant, made variable
names conforming to Python coding style.

(run_benchmark_plan): Adapted for new variable names.
(list_benchmark_plans): New helper for --list-plans option.
(start): Account for --list-plans. Also use
BechmarkRunner.available_plans and use
BenchmarkRunner.plan_directory instead of duplicating
code/knowledge here.

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

3 years agoOn ToT, event.dataTransfer.getData("text/uri-list") returns an empty string when...
wenson_hsieh@apple.com [Mon, 16 Oct 2017 07:59:39 +0000 (07:59 +0000)]
On ToT, event.dataTransfer.getData("text/uri-list") returns an empty string when dragging an image
https://bugs.webkit.org/show_bug.cgi?id=178301
<rdar://problem/34990050>

Reviewed by Darin Adler.

Source/WebCore:

After r222656, we consider images on the pasteboard to be files. This causes DataTransfer.getData to return the
empty string for all types, which brings back https://bugs.webkit.org/show_bug.cgi?id=170637. To allow pages to
access the URL part of a dragged image, we exempt "text/uri-list" from our heurstics to hide pasteboard data
which may contain files, and return the URL as long as its protocol is either HTTP or HTTPS.

Tweaked an existing layout test to cover this scenario, as well as the scenario in which the dragged image links
to a file URL (in which case we should avoid exposing the data).

Test: editing/pasteboard/drag-drop-href-as-url.html
      DataInteractionTests.DataTransferGetDataWhenDroppingImageWithHTTPURL

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::getDataForItem const):

When the pasteboard contains files, allow data for "text/uri-list" to be returned, as long as the URL string has
a white-listed protocol (currently, this is just http and https).

(WebCore::DataTransfer::shouldSuppressGetAndSetDataToAvoidExposingFilePaths const):
(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::types const):

When the pasteboard contains files, allow "text/uri-list" to be added, alongside the "Files" type, if it would
have been exposed in the list of safe DOM types.

* dom/DataTransfer.h:
* platform/Pasteboard.cpp:
(WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):

Add a new helper method to determine whether it is safe to expose an URL string as "text/uri-list" to bindings,
if the pasteboard contains files. While this currently checks whether or not the URL is in the HTTP family, we
may want to consider tweaking this to blacklist the "file" protocol instead, and allow all other valid URLs by
default.

* platform/Pasteboard.h:
* platform/PlatformPasteboard.h:
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::stringForType const):

Mark stringForType as const, and also teach stringForType to return the null string for the platform URL type if
the pasteboard might contain file paths.

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

Before coercing a platform type to "text/uri-list" when building the list of DOM-safe types, check that the
stringForType is not the empty string, in which case we don't expose the type to the DOM at all. This ensures
that in cases where the URL might reveal a file path, we don't advertise "text/uri-list" as a type. We adopt a
similar strategy on iOS.

(WebCore::PlatformPasteboard::stringForType): Deleted.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::stringForType const):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::stringForType): Deleted.

Tools:

Fixes issues in DumpRenderTree's LocalPasteboard to ensure that drag-drop-href-as-url.html exposes files, and
also adds a new iOS drag and drop API test.

* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[LocalPasteboard addTypes:owner:]):
(-[LocalPasteboard setData:forType:]):

Fixes LocalPasteboard's implementation of changeCount to incremement when the pasteboard owner changes, rather
than every time data is changed. This is consistent with NSPasteboard behavior.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

Adds a new API test to verify that an image and HTTP URL written by the platform is correctly web exposed.

LayoutTests:

Fixes an existing test to account for asynchronous image decoding, and also rebaselines results to expect that
only the URL can be read, and not text.

* TestExpectations:
* editing/pasteboard/data-transfer-item-list-add-file-multiple-times-expected.txt:
* editing/pasteboard/drag-drop-href-as-text-data-expected.txt: Removed.
* editing/pasteboard/drag-drop-href-as-text-data.html: Removed.
* editing/pasteboard/drag-drop-href-as-url-expected.txt: Added.
* editing/pasteboard/drag-drop-href-as-url.html: Added.

Tweaks an existing drag and drop test to verify that an URL can be read back when dragging an image, but not
when if the URL is a file URL.

* editing/pasteboard/files-during-page-drags-expected.txt:
* editing/pasteboard/files-during-page-drags.html:

Fixes this test by decoding the dragged image element before starting the drag and drop simulation.

* platform/mac-wk1/TestExpectations:

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

3 years agoUse auto/nullptr in scrolling code
fred.wang@free.fr [Mon, 16 Oct 2017 07:58:15 +0000 (07:58 +0000)]
Use auto/nullptr in scrolling code
https://bugs.webkit.org/show_bug.cgi?id=178306

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-16
Reviewed by Carlos Garcia Campos.

This patch modifies the scrolling code to use the auto keyword when
possible. It also replaces '0' with 'nullptr' for the return value of
ScrollingStateTree::stateNodeForID.

No new tests, behavior unchanged.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateNodeLayer):
(WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints):
(WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
(WebCore::AsyncScrollingCoordinator::updateScrollLayerPosition):
(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView const):
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
(WebCore::ScrollingCoordinator::scrollLayerForFrameView):
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
(WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
(WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
(WebCore::ScrollingCoordinator::handleWheelEventPhase):
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects const):
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasonsForAllFrames):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const):
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::detachNode):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::stateNodeForID const):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::enclosingFrameNode const):
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeLayer):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):

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

3 years agoA lot of "Can't stat WebCore/animation: No such file or directory" since r223328
commit-queue@webkit.org [Mon, 16 Oct 2017 07:48:05 +0000 (07:48 +0000)]
A lot of "Can't stat WebCore/animation: No such file or directory" since r223328
https://bugs.webkit.org/show_bug.cgi?id=178326

Unreviewed build fix

The directory WebCore/animation was removed in r223328.

No new tests because there is no behavior change.

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-10-16

* CMakeLists.txt: Removed animation from
WebCore_INCLUDE_DIRECTORIES and WebCore_IDL_INCLUDES.
* DerivedSources.make: Removed animation from VPATH and IDL_INCLUDES

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

3 years agoReplace some ScrollingTreeNode::nodeType() calls with is*Node()
fred.wang@free.fr [Mon, 16 Oct 2017 07:04:48 +0000 (07:04 +0000)]
Replace some ScrollingTreeNode::nodeType() calls with is*Node()
https://bugs.webkit.org/show_bug.cgi?id=178259

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-16
Reviewed by Darin Adler.

No new tests, behavior unchanged.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isScrollingNode const):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::enclosingFrameNode const):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isScrollingNode const):

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

3 years agoWeb Inspector: Modify CSS number values with up key and down key
nvasilyev@apple.com [Mon, 16 Oct 2017 06:25:54 +0000 (06:25 +0000)]
Web Inspector: Modify CSS number values with up key and down key
https://bugs.webkit.org/show_bug.cgi?id=170779
<rdar://problem/33170633>

Reviewed by Matt Baker.

Source/WebInspectorUI:

Up key increments a number, Down key decrements it.

Holding modifier keys changes the step value:
- Option modifies the value by 0.1
- Shift modifies the value by 10
- Command modifies the value by 100

* UserInterface/Test.html:
* UserInterface/Views/EditingSupport.js:
(WI.incrementElementValue):
Abstract away incrementElementValue into a public method.

* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype._handleKeyDown):

LayoutTests:

Add tests for WI.incrementElementValue defined in WebInspectorUI/UserInterface/Views/EditingSupport.js.

* inspector/unit-tests/editing-support-expected.txt: Added.
* inspector/unit-tests/editing-support.html: Added.

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

3 years agoWeb Inspector: show warning when recorded Canvas action caused no visual change
webkit@devinrousso.com [Mon, 16 Oct 2017 04:46:21 +0000 (04:46 +0000)]
Web Inspector: show warning when recorded Canvas action caused no visual change
https://bugs.webkit.org/show_bug.cgi?id=175282

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Models/RecordingAction.js:
(WI.RecordingAction):
(WI.RecordingAction.prototype.get valid):
(WI.RecordingAction.prototype.get hasVisibleEffect):
(WI.RecordingAction.prototype.markInvalid):
(WI.RecordingAction.prototype.apply):
(WI.RecordingAction.prototype.async._swizzle):
If the selected action is visual, save a copy of the preview canvas' dataURL before
applying the action and compare it to its dataURL after. If there is no difference, the
action had no visual effect.

* UserInterface/Models/Recording.js:
(WI.Recording):

* UserInterface/Views/RecordingActionTreeElement.js:
(WI.RecordingActionTreeElement):
(WI.RecordingActionTreeElement.prototype._handleValidityChanged):
(WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged):
* UserInterface/Views/RecordingActionTreeElement.css:
(.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning):

* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
(WI.RecordingContentView.prototype.async._generateContentCanvas2D):
(WI.RecordingContentView.prototype._applyAction): Deleted.

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

3 years agoDataTransfer.cpp triggers -Wunused-but-set-variable
tpopela@redhat.com [Mon, 16 Oct 2017 04:16:56 +0000 (04:16 +0000)]
DataTransfer.cpp triggers -Wunused-but-set-variable
https://bugs.webkit.org/show_bug.cgi?id=178209

Reviewed by Wenson Hsieh.

Use the ASSERT_UNUSED to silence it.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):

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

3 years agoWeb Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed...
nvasilyev@apple.com [Mon, 16 Oct 2017 03:42:06 +0000 (03:42 +0000)]
Web Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed tab should work
https://bugs.webkit.org/show_bug.cgi?id=178286
<rdar://problem/34986379>

Reviewed by Joseph Pecoraro.

Highlight the matching property using a yellow background and focus on the property value
if the property is editable (e.g., not a User Agent style).

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor):
(.spreadsheet-style-declaration-editor .property):
Move left padding to the property element so there's no awkward gap on the left side
when the property is highlighted.

(.spreadsheet-style-declaration-editor .property.highlighted):
(@keyframes style-property-highlight):
Use the same animation duration as we used in `.text-editor > .CodeMirror .highlighted`.
The highlight color was changed from light blue to yellow.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
Use the same logic as in WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty
to find matching style property to highlight.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.highlightProperty):
Use the same logic as in WI.CSSStyleDeclarationSection.prototype.highlightProperty.

* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
Copied from WI.RulesStyleDetailsPanel.

* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.highlight):

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

3 years ago[Settings] Split non-macro generated parts of Settings into SettingsBase base class
commit-queue@webkit.org [Mon, 16 Oct 2017 02:59:07 +0000 (02:59 +0000)]
[Settings] Split non-macro generated parts of Settings into SettingsBase base class
https://bugs.webkit.org/show_bug.cgi?id=178321

Patch by Sam Weinig <sam@webkit.org> on 2017-10-15
Reviewed by Darin Adler.

Working towards getting generated Settings working again, but in smaller patches, split
non-generated part off into SettingsBase as a first step.

One function, effectiveFrameFlattening(), needs to remain in Settings for now, as it directly
references a macro generated function, frameFlattening().

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/Page.h:
* page/Settings.cpp:
* page/Settings.h:
* page/SettingsBase.h: Copied from Source/WebCore/page/Settings.h.
* page/cocoa/SettingsBaseCocoa.mm: Copied from Source/WebCore/page/cocoa/SettingsCocoa.mm.
* page/cocoa/SettingsCocoa.mm: Removed.

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

3 years ago[JSC] Perform module specifier validation at parsing time
utatane.tea@gmail.com [Mon, 16 Oct 2017 01:55:16 +0000 (01:55 +0000)]
[JSC] Perform module specifier validation at parsing time
https://bugs.webkit.org/show_bug.cgi?id=178256

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch make module loader's `resolve` operation synchronous. And we validate
module's requested module names when instantiating the module instead of satisfying
module's dependencies. This change is not observable to users. But this is precise
to the spec and this optimizes & simplifies the current module loader a bit by
reducing object allocations.

Previously, we have an object called pair in the module loader. This is pair of
module's name and module's record. And we use it to link one module to dependent
modules. Now, it is replaced with module's registry entry.

We also change our loader functions to take a registry entry instead of a module key.
Previous design is due to the consideration that these APIs may be exposed to users
in whatwg/loader spec. However, this won't happen. This change removes unnecessary
repeatedly hash map lookups.

* builtins/ModuleLoaderPrototype.js:
(globalPrivate.newRegistryEntry):
(requestFetch):
(requestInstantiate):
(requestSatisfy):
(link):
(moduleEvaluation):
(loadModule):
* jsc.cpp:
(GlobalObject::moduleLoaderResolve):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::finishCreation):
(JSC::AbstractModuleRecord::hostResolveImportedModule):
* runtime/JSGlobalObject.h:
* runtime/JSModuleLoader.cpp:
(JSC::JSModuleLoader::resolveSync):
(JSC::JSModuleLoader::resolve):
* runtime/JSModuleLoader.h:
* runtime/ModuleLoaderPrototype.cpp:
(JSC::moduleLoaderPrototypeResolveSync):

Source/WebCore:

No behavior change in the current implementation.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::moduleLoaderResolve):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::resolve):
* bindings/js/ScriptModuleLoader.h:

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

3 years agoDOMTokenList shouldn't add empty attributes
cdumez@apple.com [Sun, 15 Oct 2017 21:58:42 +0000 (21:58 +0000)]
DOMTokenList shouldn't add empty attributes
https://bugs.webkit.org/show_bug.cgi?id=178280
<rdar://problem/34987431>

Reviewed by Ryosuke Niwa.

Follow-up to r223306, reverse the check conditions to avoid attribute
lookup when possible. Also use m_tokens instead of tokens() to avoid
unnecessary branch.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

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

3 years agoUTF-8 decoding produces one replacement character per byte; Encoding standard require...
darin@apple.com [Sun, 15 Oct 2017 20:13:51 +0000 (20:13 +0000)]
UTF-8 decoding produces one replacement character per byte; Encoding standard requires one replacement character per illegal sequence instead
https://bugs.webkit.org/show_bug.cgi?id=178207

Reviewed by Sam Weinig.

Source/WebCore:

* platform/text/TextCodecUTF8.cpp:
(WebCore::TextCodecUTF8::create): Deleted. Use a lambda instead.
(WebCore::TextCodecUTF8::registerCodecs): Use a lambda.
(WebCore::nonASCIISequenceLength): Changed to return 0 instead of 2 for the range 80-C1 since
none of those are valid sequence leading characters.
(WebCore::decodeNonASCIISequence): Changed the length argument to be in/out so the caller
knows how much of the sequence we decoded for failure cases. Simplified the length 2 section.
(WebCore::TextCodecUTF8::handleError): Deleted.
(WebCore::TextCodecUTF8::handlePartialSequence): Changed this into a pair of plain functions
rather than two template function specializations since the two functions are rather different.
For the one-byte version, got rid of the unused arguments. For the two-byte version, got rid
of the ignored return value, stopped using the handleError function since each error case
needs to be handled differently. In each error case consume the entire incorrect sequence
instead of just one byte.
(WebCore::TextCodecUTF8::decode): Updated for the above change, and changed the non-partial
incorrect sequence to consume the entire incorrect sequence instead of just one byte. Also
use WTF prefixes explicitly so we don't  have to do "using namespace".
(WebCore::TextCodecUTF8::encode): Got rid of unneeded type punning, and added some inline
capacity to save one memory allocation when encoding shorter strings.

* platform/text/TextCodecUTF8.h: Use pragma once. Intialize m_partialSequenceSize where it
is defined and let the compiler generate the constructor. Updated for the changes above.

* platform/text/TextEncoding.h: Export a constructor now used by a unit test.
* platform/text/TextEncodingRegistry.h: Export newTextCodec, now used by a unit test.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added test.
* TestWebKitAPI/Tests/WebCore/TextCodec.cpp: Added.
(TestWebKitAPI::decodeHexTestBytes): Decodes a string so we can write readable tests.
(TestWebKitAPI::escapeNonPrintableASCIICharacters): Encodes a string so we can write readable tests.
(TestWebKitAPI::TEST): Added some UTF-8 tests and UTF-8 invalid sequences tests.
Would be smart to add more tests for other cases, exercising the fast ASCII loop for example, and
other encodings.

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

3 years agoRemove all Web Animations code
commit-queue@webkit.org [Sun, 15 Oct 2017 01:45:26 +0000 (01:45 +0000)]
Remove all Web Animations code
https://bugs.webkit.org/show_bug.cgi?id=178273

Patch by Antoine Quint <graouts@apple.com> on 2017-10-14
Reviewed by Sam Weinig.

Source/WebCore:

We remove all existing code related to Web Animations which does not include any functionality,
only stubs. This leaves the build and runtime flags, we'll start a complete implementation from
scratch.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* animation/Animatable.idl: Removed.
* animation/AnimationEffect.cpp: Removed.
* animation/AnimationEffect.h: Removed.
* animation/AnimationEffect.idl: Removed.
* animation/AnimationTimeline.cpp: Removed.
* animation/AnimationTimeline.h: Removed.
* animation/AnimationTimeline.idl: Removed.
* animation/DocumentAnimation.cpp: Removed.
* animation/DocumentAnimation.h: Removed.
* animation/DocumentAnimation.idl: Removed.
* animation/DocumentTimeline.cpp: Removed.
* animation/DocumentTimeline.h: Removed.
* animation/DocumentTimeline.idl: Removed.
* animation/KeyframeEffect.cpp: Removed.
* animation/KeyframeEffect.h: Removed.
* animation/KeyframeEffect.idl: Removed.
* animation/WebAnimation.cpp: Removed.
* animation/WebAnimation.h: Removed.
* animation/WebAnimation.idl: Removed.
* bindings/js/JSAnimationTimelineCustom.cpp: Removed.
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/WebCoreBuiltinNames.h:
* dom/Element.cpp:
(WebCore::Element::getAnimations): Deleted.
* dom/Element.h:
* dom/Element.idl:

LayoutTests:

Remove the only existing Web Animations test.

* webanimations/Document-expected.txt: Removed.
* webanimations/Document.html: Removed.

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

3 years agoResync tests up to c1716b039411090428e7073158b1aea081dafe71
commit-queue@webkit.org [Sun, 15 Oct 2017 01:28:10 +0000 (01:28 +0000)]
Resync tests up to c1716b039411090428e7073158b1aea081dafe71
https://bugs.webkit.org/show_bug.cgi?id=178241

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-14
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

* resources/TestRepositories:
* resources/resource-files.json:
* web-platform-tests/IndexedDB/idb-binary-key-detached.htm:
* web-platform-tests/IndexedDB/keypath-exceptions.htm:
* web-platform-tests/WebCryptoAPI/digest/digest.js:
(run_test.):
* web-platform-tests/XMLHttpRequest/abort-after-stop-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/abort-after-stop.htm: Removed.
* web-platform-tests/XMLHttpRequest/event-error-order.sub-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/event-error-order.sub.html: Removed.
* web-platform-tests/XMLHttpRequest/event-timeout-order-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/event-timeout-order.htm: Removed.
* web-platform-tests/XMLHttpRequest/open-url-worker-origin-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/open-url-worker-origin.htm: Removed.
* web-platform-tests/XMLHttpRequest/responsetype-expected.txt:
* web-platform-tests/XMLHttpRequest/send-after-setting-document-domain-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-after-setting-document-domain.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors-not-enabled.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-cors.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-repeat-no-args.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic-setrequestheader.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-basic.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-authentication-competing-names-passwords.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-entity-body-basic.htm: Removed.
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub-expected.txt: Removed.
* web-platform-tests/XMLHttpRequest/send-network-error-async-events.sub.htm: Removed.
* web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/background-fetch/interfaces-expected.txt:
* web-platform-tests/background-fetch/interfaces.idl:
* web-platform-tests/background-fetch/interfaces.worker-expected.txt:
* web-platform-tests/background-fetch/interfaces.worker.js:
* web-platform-tests/beacon/headers/header-content-type-expected.txt:
* web-platform-tests/common/vendor-prefix.js: Removed.
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/css/css-grid-1/abspos/w3c-import.log:
* web-platform-tests/css/css-grid-1/support/w3c-import.log:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-image-threshold-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-image-threshold-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-image-threshold-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-image-threshold-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-004.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-margin-005.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-box-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-004.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-005.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-006.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-007.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-008.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-009.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-010.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-circle-011.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-computed-shape-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-computed-shape-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-004.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-005.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-006.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-007.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-008.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-009.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-010.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-ellipse-011.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-004.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-005.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-006.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-007.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-008.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-inset-009.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-002.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-003.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-004.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-005.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-polygon-006.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-arguments-001.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-box-pair-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-inherit-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-initial-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-none-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/shape-outside-shape-notation-000.html:
* web-platform-tests/css/css-shapes-1/shape-outside/values/support/parsing-utils.js:
(convertToPx):
(each):
(setupFonts):
* web-platform-tests/css/css-shapes-1/spec-examples/shape-outside-012.html:
* web-platform-tests/css/css-shapes-1/w3c-import.log:
* web-platform-tests/css/css-ui-3/cursor-image-005-nfs.html:
* web-platform-tests/css/selectors4/w3c-import.log:
* web-platform-tests/cssom/OWNERS:
* web-platform-tests/cssom/getComputedStyle-pseudo-expected.txt:
* web-platform-tests/cssom/getComputedStyle-pseudo.html:
* web-platform-tests/cssom/style-sheet-interfaces-001-expected.txt:
* web-platform-tests/cssom/style-sheet-interfaces-001.html:
* web-platform-tests/cssom/w3c-import.log:
* web-platform-tests/custom-elements/Document-createElement-expected.txt:
* web-platform-tests/custom-elements/Document-createElement.html:
* web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt:
* web-platform-tests/custom-elements/w3c-import.log:
* web-platform-tests/dom/events/Event-timestamp-safe-resolution.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createHTMLDocument.html:
* web-platform-tests/dom/nodes/Document-constructor.html:
* web-platform-tests/dom/nodes/Element-matches-expected.txt:
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt:
* web-platform-tests/dom/nodes/selectors.js:
* web-platform-tests/eventsource/dedicated-worker/eventsource-constructor-non-same-origin.htm:
* web-platform-tests/eventsource/eventsource-constructor-non-same-origin-expected.txt:
* web-platform-tests/eventsource/eventsource-constructor-non-same-origin.htm:
* web-platform-tests/eventsource/resources/last-event-id.py:
(main):
* web-platform-tests/eventsource/shared-worker/eventsource-constructor-non-same-origin-expected.txt:
* web-platform-tests/eventsource/shared-worker/eventsource-constructor-non-same-origin.htm:
* web-platform-tests/fetch/api/basic/integrity-expected.txt:
* web-platform-tests/fetch/api/basic/integrity-worker-expected.txt:
* web-platform-tests/fetch/api/basic/integrity.js:
(integrity):
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt:
* web-platform-tests/fetch/api/headers/headers-combine.html:
* web-platform-tests/fetch/api/request/request-error-expected.txt:
* web-platform-tests/fetch/api/request/request-error.js:
* web-platform-tests/fetch/api/request/request-headers-expected.txt:
* web-platform-tests/fetch/api/request/request-headers.html:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl.html:
* web-platform-tests/fetch/api/request/request-structure-expected.txt:
* web-platform-tests/fetch/api/request/request-structure.html:
* web-platform-tests/fetch/api/request/w3c-import.log:
* web-platform-tests/fetch/api/response/response-clone-expected.txt:
* web-platform-tests/fetch/api/response/response-init-001-expected.txt:
* web-platform-tests/fetch/api/response/response-init-001.html:
* web-platform-tests/fetch/api/response/w3c-import.log:
* web-platform-tests/fonts/Ahem.ttf:
* web-platform-tests/hr-time/idlharness-expected.txt:
* web-platform-tests/hr-time/idlharness.html:
* web-platform-tests/html/README.md:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
* web-platform-tests/html/browsers/browsing-the-web/navigating-across-documents/w3c-import.log:
* web-platform-tests/html/browsers/origin/origin-of-data-document-expected.txt:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_canplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_canplay_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_canplaythrough.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_canplaythrough_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_loadeddata_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_loadedmetadata.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_loadedmetadata_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_order_canplay_canplaythrough.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_order_canplay_playing.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_order_loadedmetadata_loadeddata.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_order_loadstart_progress.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_pause.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_play.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_playing.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_progress.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_progress_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/event_timeupdate_noautoplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/historical-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/historical.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/srclang-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/language-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/paused_false_during_play.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplay.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_canplaythrough.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_loadeddata.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_loadedmetadata.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/readyState_during_playing.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/video_008.htm:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.cross-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.cross.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.redirect-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/security.reset.redirect.html:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/blank.htm:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/form-submission-0/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-button-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-fieldset-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-form-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-input-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/the-progress-element/progress-expected.txt:
* web-platform-tests/html/semantics/forms/the-progress-element/w3c-import.log:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
* web-platform-tests/html/semantics/scripting-1/the-template-element/template-element/w3c-import.log:
* web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:
* web-platform-tests/html/syntax/serializing-html-fragments/serializing.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-parse-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw-expected.txt:
* web-platform-tests/lint.whitelist:
* web-platform-tests/mediacapture-fromelement/capture.html:
* web-platform-tests/mediacapture-fromelement/creation.html:
* web-platform-tests/mediacapture-fromelement/ended.html:
* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https.sub.html:
* web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html:
* web-platform-tests/resource-timing/idlharness-expected.txt:
* web-platform-tests/resource-timing/idlharness.html:
* web-platform-tests/resources/idlharness.js:
(IdlInterface.prototype.test_to_json_operation):
* web-platform-tests/resources/test/tests/api-tests-1.html:
* web-platform-tests/resources/test/tests/idlharness/IdlInterface/test_to_json_operation.html:
* web-platform-tests/resources/testharness.js:
* web-platform-tests/service-workers/service-worker/fetch-event-redirect.https.html:
* web-platform-tests/service-workers/service-worker/fetch-frame-resource.https.html:
* web-platform-tests/service-workers/service-worker/fetch-request-xhr.https.html:
* web-platform-tests/service-workers/service-worker/navigation-preload/resources/redirect-scope.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/bytecheck-worker.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/fetch-event-redirect-iframe.html: Removed.
* web-platform-tests/service-workers/service-worker/resources/fetch-request-xhr-iframe.https.html:
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-out-scope.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-scope1.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/navigation-redirect-scope2.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/update-max-aged-worker-imported-script.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/update-max-aged-worker.py:
(main):
* web-platform-tests/service-workers/service-worker/resources/w3c-import.log:
* web-platform-tests/service-workers/service-worker/w3c-import.log:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface-expected.txt:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html:
* web-platform-tests/shadow-dom/event-inside-shadow-tree-expected.txt:
* web-platform-tests/shadow-dom/event-with-related-target.html:
* web-platform-tests/shadow-dom/leaktests/get-elements-expected.txt:
* web-platform-tests/shadow-dom/resources/event-path-test-helpers.js:
(dispatchEventWithEventLog):
* web-platform-tests/shadow-dom/slotchange-event-expected.txt:
* web-platform-tests/shadow-dom/w3c-import.log:
* web-platform-tests/streams/piping/general-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.js:
(promise_test):
* web-platform-tests/streams/readable-byte-streams/w3c-import.log:
* web-platform-tests/streams/readable-streams/pipe-through-expected.txt: Removed.
* web-platform-tests/tools/manifest/catalog/xhtml.dtd:
* web-platform-tests/tools/manifest/sourcefile.py:
(SourceFile.references):
(SourceFile.spec_links):
* web-platform-tests/tools/manifest/tests/test_sourcefile.py:
(test_relpath_normalized):
(test_reftest_url_whitespace):
(test_spec_links_whitespace):
* web-platform-tests/tools/wptserve/tests/functional/test_handlers.py:
(TestDirectoryHandler.test_subdirectory_no_trailing_slash):
* web-platform-tests/tools/wptserve/wptserve/handlers.py:
(DirectoryHandler.__call__):
* web-platform-tests/update-built-tests.sh:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/urltestdata.json:
* web-platform-tests/webrtc/RTCCertificate.html:
* web-platform-tests/webrtc/RTCConfiguration-iceServers-expected.txt:
* web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.html: Removed.
* web-platform-tests/webrtc/RTCDTMFSender-ontonechange-long.html: Removed.
* web-platform-tests/webrtc/RTCDTMFSender-ontonechange.html: Removed.
* web-platform-tests/webrtc/RTCPeerConnection-addTrack.html: Removed.
* web-platform-tests/webrtc/RTCPeerConnection-getStats.html: Removed.
* web-platform-tests/webrtc/RTCPeerConnection-ontrack.html: Removed.
* web-platform-tests/webrtc/RTCPeerConnection-removeTrack.html: Removed.
* web-platform-tests/webrtc/RTCRtpReceiver-getContributingSources.html: Removed.
* web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.html: Removed.
* web-platform-tests/webrtc/historical-expected.txt:
* web-platform-tests/webrtc/historical.html:
* web-platform-tests/webrtc/simplecall-expected.txt:
* web-platform-tests/webrtc/simplecall.html:
* web-platform-tests/webrtc/w3c-import.log:

LayoutTests:

Rebasing expectations.

* TestExpectations: Skipping unsupported tests.
* http/wpt/fetch/request-clone-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Added.
* platform/ios-wk2/imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/persisted-user-state-restoration/scroll-restoration-fragment-scrolling-cross-origin-expected.txt:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt:
* platform/mac-wk1/imported/w3c/web-platform-tests/background-fetch/interfaces-expected.txt:
* tests-options.json:

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

3 years ago[WPE] JHBuild build directory DependenciesWPE/Build is not removed by update-webkit...
aperez@igalia.com [Sun, 15 Oct 2017 00:24:32 +0000 (00:24 +0000)]
[WPE] JHBuild build directory DependenciesWPE/Build is not removed by update-webkit-libs-jhbuild
https://bugs.webkit.org/show_bug.cgi?id=178212

Reviewed by Michael Catanzaro.

* Scripts/update-webkit-libs-jhbuild:
(cleanJhbuild): The WPE JHBuild also uses a separate "Build" subdirectory, so do not skip
cleaning it when "--wpe" is passed to the script.

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

3 years agoImplement Cache API support for WPE/GTK
commit-queue@webkit.org [Sat, 14 Oct 2017 23:57:20 +0000 (23:57 +0000)]
Implement Cache API support for WPE/GTK
https://bugs.webkit.org/show_bug.cgi?id=178316

Unreviewed.

Skip tests until feature is implemented.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-14

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

3 years agoWebRTC test gardening
commit-queue@webkit.org [Sat, 14 Oct 2017 23:55:12 +0000 (23:55 +0000)]
WebRTC test gardening
https://bugs.webkit.org/show_bug.cgi?id=178317

Unreviewed.

Updating expectations according dashboard.
Skipping tests for platforms that do not support WebRTC.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-14

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:

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

3 years agoREGRESSION (r223310): Web Inspector: Class list container is transparent and unreadable
nvasilyev@apple.com [Sat, 14 Oct 2017 19:18:15 +0000 (19:18 +0000)]
REGRESSION (r223310): Web Inspector: Class list container is transparent and unreadable
https://bugs.webkit.org/show_bug.cgi?id=178311

Reviewed by Devin Rousso.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ .class-list-container):
Fix 1px hole below the class container.

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

3 years agoWeb Inspector: Canvas tab: recordings should have a unique name
mattbaker@apple.com [Sat, 14 Oct 2017 19:05:16 +0000 (19:05 +0000)]
Web Inspector: Canvas tab: recordings should have a unique name
https://bugs.webkit.org/show_bug.cgi?id=178188
<rdar://problem/34943364>

Reviewed by Devin Rousso.

* Localizations/en.lproj/localizedStrings.js:
New format string "Recording %d".

* UserInterface/Base/FileUtilities.js:
(WI.loadDataFromFile):
Pass chosen filename to callback.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.recordingFinished):
Create a unique name for the recording.

* UserInterface/Models/Recording.js:
(WI.Recording):
(WI.Recording.fromPayload):
(WI.Recording.prototype.get displayName):
(WI.Recording.prototype.createDisplayName):

* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView.prototype.get saveData):
Use encodeURI so that special characters can be used in filenames, and
to be consistent with other `saveData` implementations.

* UserInterface/Views/RecordingNavigationSidebarPanel.js:
(WI.RecordingNavigationSidebarPanel.prototype.set recording):
(WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked):
Drive-by fix: wait until actions are resolved before updating UI.

* UserInterface/Views/RecordingTabContentView.js:
(WI.RecordingTabContentView.prototype._navigationSidebarImport):
Try to use the imported filename as the recording name. If the name
collides with that of another imported recording, append a unique suffix.

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

3 years agoWeb Inspector: provide a way to enable/disable event listeners
webkit@devinrousso.com [Sat, 14 Oct 2017 18:56:32 +0000 (18:56 +0000)]
Web Inspector: provide a way to enable/disable event listeners
https://bugs.webkit.org/show_bug.cgi?id=177451

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Add `setEventListenerDisabled` command that enables/disables a specific event listener
during event dispatch. When a disabled event listener is fired, the listener's callback will
not be called.

Source/WebCore:

Test: inspector/dom/setEventListenerDisabled.html

* dom/EventTarget.cpp:
(WebCore::EventTarget::fireEventListeners):
Add InspectorInstrumentation call to isEventListenerDisabled. If true, the event listener's
callback will not be called.

* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::discardBindings):
(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::setEventListenerDisabled):
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):
(WebCore::InspectorDOMAgent::isEventListenerDisabled):
Introduce a mapping of `EventListener*` to `InspectorEventListener`, a struct for uniquely
identifying event listeners so they can be referenced from the frontend. We only add items
to this mapping when `getEventListenersForNode` is called, as that is when EventListener
data is sent to the frontend. This allows us to defer creating an Inspector "mirror" object
for each EventListener until it is needed. Items are removed whenever an event listener is
removed or when the document changes.

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::isEventListenerDisabled):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
(WebCore::InspectorInstrumentation::isEventListenerDisabledImpl):
Pass additional parameters to InspectorDOMAgent so it can determine if the event listener
actually exists. If not, don't dispatch an event to the frontend as nothing will change.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:

* UserInterface/Controllers/DOMTreeManager.js:
(WI.DOMTreeManager.prototype.setEventListenerDisabled):

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype.attached):
(WI.DOMNodeDetailsSidebarPanel.prototype.detached):
(WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
(WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
(WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
will still want to refresh the event listeners section in the event that an event listener
is removed from a parent node.

* UserInterface/Views/EventListenerSectionGroup.js:
(WI.EventListenerSectionGroup):
(WI.EventListenerSectionGroup.prototype._eventText):
(WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
(WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
(WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
* UserInterface/Views/EventListenerSectionGroup.css:
(.event-listener-section > .content input[type="checkbox"]):

* UserInterface/Views/DetailsSectionSimpleRow.js:
(WI.DetailsSectionSimpleRow.prototype.get label):
(WI.DetailsSectionSimpleRow.prototype.set label):

LayoutTests:

* inspector/dom/setEventListenerDisabled-expected.txt: Added.
* inspector/dom/setEventListenerDisabled.html: Added.

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

3 years agoMark fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html as a flaky...
pvollan@apple.com [Sat, 14 Oct 2017 16:56:42 +0000 (16:56 +0000)]
Mark fast/frames/frame-unload-navigate-and-setTimeout-assert-fail.html as a flaky crash on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178309

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoMark fast/images/animated-gif-scrolling-crash.html as flaky on Windows.
pvollan@apple.com [Sat, 14 Oct 2017 16:14:15 +0000 (16:14 +0000)]
Mark fast/images/animated-gif-scrolling-crash.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178307

Unreviewed test gardening.

* platform/win/TestExpectations:

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

3 years agoReland "Add Above/Below comparisons for UInt32 patterns"
utatane.tea@gmail.com [Sat, 14 Oct 2017 15:35:48 +0000 (15:35 +0000)]
Reland "Add Above/Below comparisons for UInt32 patterns"
https://bugs.webkit.org/show_bug.cgi?id=177281

Reviewed by Saam Barati.

JSTests:

* stress/uint32-comparison-jump.js: Added.
(shouldBe):
(above):
(aboveOrEqual):
(below):
(belowOrEqual):
(notAbove):
(notAboveOrEqual):
(notBelow):
(notBelowOrEqual):
* stress/uint32-comparison.js: Added.
(shouldBe):
(above):
(aboveOrEqual):
(below):
(belowOrEqual):
(aboveTest):
(aboveOrEqualTest):
(belowTest):
(belowOrEqualTest):

Source/JavaScriptCore:

We reland this patch without DFGStrengthReduction change to see what causes
regression in the iOS bot.

Sometimes, we would like to have UInt32 operations in JS. While VM does
not support UInt32 nicely, VM supports efficient Int32 operations. As long
as signedness does not matter, we can just perform Int32 operations instead
and recognize its bit pattern as UInt32.

But of course, some operations respect signedness. The most frequently
used one is comparison. Octane/zlib performs UInt32 comparison by performing
`val >>> 0`. It emits op_urshift and op_unsigned. op_urshift produces
UInt32 in Int32 form. And op_unsigned will generate Double value if
the generated Int32 is < 0 (which should be UInt32).

There is a chance for optimization. The given code pattern is the following.

    op_unsigned(op_urshift(@1)) lessThan:< op_unsigned(op_urshift(@2))

This can be converted to the following.

    op_urshift(@1) below:< op_urshift(@2)

The above conversion is nice since

1. We can avoid op_unsigned. This could be unsignedness check in DFG. Since
this check depends on the value of Int32, dropping this check is not as easy as
removing Int32 edge filters.

2. We can perform unsigned comparison in Int32 form. We do not need to convert
them to DoubleRep.

Since the above comparison exists in Octane/zlib's *super* hot path, dropping
op_unsigned offers huge win.

At first, my patch attempts to convert the above thing in DFG pipeline.
However it poses several problems.

1. MovHint is not well removed. It makes UInt32ToNumber (which is for op_unsigned) live.
2. UInt32ToNumber could cause an OSR exit. So if we have the following nodes,

    2: UInt32ToNumber(@0)
    3: MovHint(@2, xxx)
    4: UInt32ToNumber(@1)
    5: MovHint(@1, xxx)

we could drop @5's MovHint. But @3 is difficult since @4 can exit.

So, instead, we start introducing a simple optimization in the bytecode compiler.
It performs pattern matching for op_urshift and comparison to drop op_unsigned.
We adds op_below and op_above families to bytecodes. They only accept Int32 and
perform unsigned comparison.

This offers 4% performance improvement in Octane/zlib.

                            baseline                  patched

zlib           x2     431.07483+-16.28434       414.33407+-9.38375         might be 1.0404x faster

* bytecode/BytecodeDumper.cpp:
(JSC::BytecodeDumper<Block>::printCompareJump):
(JSC::BytecodeDumper<Block>::dumpBytecode):
* bytecode/BytecodeDumper.h:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/Opcode.h:
(JSC::isBranch):
* bytecode/PreciseJumpTargetsInlines.h:
(JSC::extractStoredJumpTargetsForBytecodeOffset):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitJumpIfTrue):
(JSC::BytecodeGenerator::emitJumpIfFalse):
* bytecompiler/NodesCodegen.cpp:
(JSC::BinaryOpNode::emitBytecode):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCompareUnsigned):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareBelow):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareBelowEq):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITArithmetic.cpp:
(JSC::JIT::emit_op_below):
(JSC::JIT::emit_op_beloweq):
(JSC::JIT::emit_op_jbelow):
(JSC::JIT::emit_op_jbeloweq):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* parser/Nodes.h:
(JSC::ExpressionNode::isBinaryOpNode const):

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

3 years agoRemove HashCountedSet's copyToVector functions
commit-queue@webkit.org [Sat, 14 Oct 2017 15:07:44 +0000 (15:07 +0000)]
Remove HashCountedSet's copyToVector functions
https://bugs.webkit.org/show_bug.cgi?id=178215

Patch by Sam Weinig <sam@webkit.org> on 2017-10-14
Reviewed by Daniel Bates.

Source/WebCore:

* page/DeviceController.cpp:
(WebCore::DeviceController::dispatchDeviceEvent):
(WebCore::DeviceController::fireDeviceEvent):

    Replace use of HashCountedSet's copyToVector functions with copyToVector(hashCountedSet.values()).

Source/WTF:

* wtf/HashCountedSet.h:
(WTF::copyToVector): Deleted.

    They are replaced by either copyToVector(hashCountedSet) or copyToVector(hashCountedSet.values())

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

3 years agoAdopt type trait template aliases everywhere in WTF
commit-queue@webkit.org [Sat, 14 Oct 2017 04:45:20 +0000 (04:45 +0000)]
Adopt type trait template aliases everywhere in WTF
https://bugs.webkit.org/show_bug.cgi?id=178299

Patch by Sam Weinig <sam@webkit.org> on 2017-10-13
Reviewed by Yusuke Suzuki.

Adopt type trait template aliases (e.g. replace 'typename std::make_unsigned<Source>::type'
with 'std::make_unsigned_t<Source>'). Also adopt using over typedef consistently.

* wtf/Atomics.h:
* wtf/CagedUniquePtr.h:
* wtf/CheckedArithmetic.h:
* wtf/CompletionHandler.h:
* wtf/Function.h:
* wtf/HashCountedSet.h:
* wtf/HashFunctions.h:
* wtf/HashMap.h:
* wtf/HashSet.h:
* wtf/HashTable.h:
* wtf/HashTraits.h:
* wtf/IndexedContainerIterator.h:
* wtf/IteratorAdaptors.h:
* wtf/KeyValuePair.h:
* wtf/LEBDecoder.h:
* wtf/ListHashSet.h:
* wtf/MathExtras.h:
* wtf/NeverDestroyed.h:
* wtf/OptionSet.h:
* wtf/RetainPtr.h:
* wtf/SizeLimits.cpp:
* wtf/StdLibExtras.h:
* wtf/SystemFree.h:
* wtf/ThreadSpecific.h:
* wtf/TypeCasts.h:
* wtf/Vector.h:
* wtf/text/IntegerToStringConversion.h:

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

3 years agoPerformance: Skip texture upload if source image and destination texture haven't...
jer.noble@apple.com [Sat, 14 Oct 2017 02:38:09 +0000 (02:38 +0000)]
Performance: Skip texture upload if source image and destination texture haven't changed
https://bugs.webkit.org/show_bug.cgi?id=178254
<rdar://problem/34968181>

Reviewed by Dean Jackson.

Source/WebCore:

Update GraphicsContext3D to track which texture is bound to which texture unit, and also to
track when those bound textures have their backing stores modified. This new "seed" value
will be used to determine whether a given texture which has previously had image data
uploaded to it needs to be re-updated.

In VideoTextureCopierCV, track whether the texture's seed changed, whether the IOSurface is
the same,  whether the IOSurface's seed has changed, and whether the "flipY" parameter
changed since the last time the copier was asked to upload to the texture.

* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::textureSeed):
(WebCore::GraphicsContext3D::GraphicsContext3DState::currentBoundTexture):
(WebCore::GraphicsContext3D::GraphicsContext3DState::boundTexture):
(WebCore::GraphicsContext3D::GraphicsContext3DState::setBoundTexture):
* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
* platform/graphics/cv/VideoTextureCopierCV.h:
(WebCore::VideoTextureCopierCV::lastTextureSeed):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::bindTexture):
(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):
(WebCore::GraphicsContext3D::framebufferTexture2D):
(WebCore::GraphicsContext3D::texSubImage2D):
(WebCore::GraphicsContext3D::compressedTexImage2D):
(WebCore::GraphicsContext3D::compressedTexSubImage2D):
(WebCore::GraphicsContext3D::createTexture):
(WebCore::GraphicsContext3D::deleteTexture):
(WebCore::GraphicsContext3D::texImage2DDirect):

Source/WTF:

Add a new class, UnsafePointer, for safely holding pointers to objects with uncontrolled lifetimes.

* WTF.xcodeproj/project.pbxproj:
* wtf/UnsafePointer.h: Added.
(WTF::UnsafePointer::UnsafePointer):
(WTF::UnsafePointer::operator== const):
(WTF::UnsafePointer::operator!= const):
(WTF::UnsafePointer::operator bool const):
(WTF::operator==):
(WTF::operator!=):

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

3 years ago[Win] When built with VS2017, MiniBrowser crashes on startup.
pvollan@apple.com [Sat, 14 Oct 2017 00:50:39 +0000 (00:50 +0000)]
[Win] When built with VS2017, MiniBrowser crashes on startup.
https://bugs.webkit.org/show_bug.cgi?id=175209

Reviewed by Daniel Bates.

Source/WebCore:

Generated StaticStringImpl objects are not initialized compile-time with VS2017.
When compiling with VS2017, the global, static, StaticStringImpl objects needs to
be defined with the constexpr specifier, in order for the objects to be initialized
at compile time. Since the StaticStringImpl objects will be const then, we need to
be able to create an AtomicString object from a const StaticStringImpl object.
This constructor has been added to the AtomicString class.

No new tests, covered by existing tests.

* bindings/scripts/StaticString.pm:
(GenerateStrings):
(GenerateStringAsserts):
* dom/QualifiedName.cpp:
(WebCore::createQualifiedName):
* dom/QualifiedName.h:
* dom/make_names.pl:
(printDefinitions):

Source/WTF:

Add AtomicString(const StaticStringImpl*) constructor. This is needed since
this patch adds constexpr to the static, global StaticStringImpl objects
generated in WebCore/bindings/scripts/StaticString.pm.

* wtf/text/AtomicString.h:
(WTF::AtomicString::AtomicString):
* wtf/text/AtomicStringImpl.cpp:
(WTF::addStatic):
(WTF::AtomicStringImpl::add):
* wtf/text/AtomicStringImpl.h:
* wtf/text/StringImpl.h:
(WTF::StringImpl::assertHashIsCorrect const):
(WTF::StringImpl::assertHashIsCorrect): Deleted.

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

3 years agoProtect FrameView during style calculations
bfulgham@apple.com [Sat, 14 Oct 2017 00:44:53 +0000 (00:44 +0000)]
Protect FrameView during style calculations
https://bugs.webkit.org/show_bug.cgi?id=178300
<rdar://problem/34869329>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Protect the FrameView during layout and style updates in case arbitrary script
is run that might clear it.

Test: fast/html/marquee-reparent-check.html

* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):

LayoutTests:

* fast/html/marquee-reparent-check-expected.txt: Added.
* fast/html/marquee-reparent-check.html: Added.

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

3 years agoMark http/tests/cache-storage/cache-clearing-origin.https.html as flaky.
ryanhaddad@apple.com [Sat, 14 Oct 2017 00:42:56 +0000 (00:42 +0000)]
Mark http/tests/cache-storage/cache-clearing-origin.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178305

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agohttp/tests/cache-storage/cache-clearing-origin.https.html is flaky on Sierra
commit-queue@webkit.org [Sat, 14 Oct 2017 00:25:02 +0000 (00:25 +0000)]
http/tests/cache-storage/cache-clearing-origin.https.html is flaky on Sierra
https://bugs.webkit.org/show_bug.cgi?id=178303

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-13

* TestExpectations: Marking test as fail.

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

3 years agoWeb Inspector: make split console full width of view
webkit@devinrousso.com [Sat, 14 Oct 2017 00:05:07 +0000 (00:05 +0000)]
Web Inspector: make split console full width of view
https://bugs.webkit.org/show_bug.cgi?id=176635

Reviewed by Timothy Hatcher.

* UserInterface/Main.html:
* UserInterface/Views/Main.css:
(#main):
(#content):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
(.sidebar > .panel.details.css-style > .content ~ .options-container):

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

3 years agoCrash under ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData
pvollan@apple.com [Sat, 14 Oct 2017 00:02:16 +0000 (00:02 +0000)]
Crash under ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData
https://bugs.webkit.org/show_bug.cgi?id=178279

Reviewed by Alex Christensen.

Check if the connection is valid before calling ResourceHandleClient::didSendData.

No new tests, covered by existing tests.

* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):

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

3 years agoWeb Inspector: fix ESLint errors
webkit@devinrousso.com [Fri, 13 Oct 2017 23:52:34 +0000 (23:52 +0000)]
Web Inspector: fix ESLint errors
https://bugs.webkit.org/show_bug.cgi?id=175065

Reviewed by Joseph Pecoraro.

Removed trailing whitespace, extra parenthesis, and some unnecessary escape characters.
Added missing semicolons, spacing around default values for parameters, and changed `==` to
`===` where applicable.

Specific changes to each file were removed for brevity.

* .eslintrc:
Alphabetize each list of global variables and add some missing utility functions.

* UserInterface/Base/EventListener.js:
* UserInterface/Base/EventListenerSet.js:
* UserInterface/Base/Main.js:
* UserInterface/Base/Setting.js:
* UserInterface/Base/TextUtilities.js:
* UserInterface/Base/URLUtilities.js:
* UserInterface/Base/Utilities.js:
* UserInterface/Base/YieldableTask.js:
* UserInterface/Controllers/AppControllerBase.js:
* UserInterface/Controllers/CanvasManager.js:
* UserInterface/Controllers/CodeMirrorCompletionController.js:
* UserInterface/Controllers/DOMDebuggerManager.js:
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
* UserInterface/Controllers/RuntimeManager.js:
* UserInterface/Controllers/SourceMapManager.js:
* UserInterface/Debug/DebugContentView.js:
* UserInterface/Debug/UncaughtExceptionReporter.js:
* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/KeyboardShortcut.js:
* UserInterface/Models/ProfileNode.js:
* UserInterface/Models/Resource.js:
* UserInterface/Models/ResourceCollection.js:
* UserInterface/Models/Script.js:
* UserInterface/Models/ScriptSyntaxTree.js:
* UserInterface/Models/ScriptTimelineRecord.js:
* UserInterface/Protocol/Connection.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/TestHarness.js:
* UserInterface/Views/CSSStyleDeclarationSection.js:
* UserInterface/Views/ChartDetailsSectionRow.js:
* UserInterface/Views/CodeMirrorAdditions.js:
* UserInterface/Views/CodeMirrorFormatters.js:
* UserInterface/Views/CodeMirrorRegexMode.js:
* UserInterface/Views/ContentBrowserTabContentView.js:
* UserInterface/Views/DataGrid.js:
* UserInterface/Views/DataGridNode.js:
* UserInterface/Views/FindBanner.js:
* UserInterface/Views/GroupNavigationItem.js:
* UserInterface/Views/HierarchicalPathNavigationItem.js:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/NetworkTimelineView.js:
* UserInterface/Views/ObjectTreePropertyTreeElement.js:
* UserInterface/Views/ObjectTreeView.js:
* UserInterface/Views/RecordingContentView.js:
* UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
* UserInterface/Views/ResourceCookiesContentView.js:
* UserInterface/Views/ResourceDetailsSection.js:
* UserInterface/Views/ResourceHeadersContentView.js:
* UserInterface/Views/ResourceTimelineDataGridNode.js:
* UserInterface/Views/SettingEditor.js:
* UserInterface/Views/Sidebar.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
* UserInterface/Views/Table.js:
* UserInterface/Views/TextEditor.js:
* UserInterface/Views/TimelineDataGridNode.js:
* UserInterface/Views/TreeElement.js:
* UserInterface/Views/TreeOutline.js:
* UserInterface/Views/WebSocketDataGridNode.js:
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
* UserInterface/Workers/Formatter/FormatterWorker.js:

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

3 years agoCMD+R / CMD+Q keyboard shortcuts are treated as user interaction with page
bfulgham@apple.com [Fri, 13 Oct 2017 23:28:01 +0000 (23:28 +0000)]
CMD+R / CMD+Q keyboard shortcuts are treated as user interaction with page
https://bugs.webkit.org/show_bug.cgi?id=178183
<rdar://problem/33327730>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Key events are granted user interaction credit (in terms of updating the last time of user
interaction), even if the key event was not handled. Instead, we should defer granting
access until the key event has been handled.

Add a new default constructor argument to UserGestureIndicator to be used when handling key
events, so we can delay a decision about whether to grant ResourceLoadStatistics
'hasHadUserInteraction' until we confirm that the event was handled by the page.

This change does not affect other aspects of user interaction.

Tests: fast/events
       http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html
       http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html

* dom/UserGestureIndicator.cpp:
(WebCore::UserGestureIndicator::UserGestureIndicator): Add check based on constructor argument.
Also: Drive by fix to avoid calling 'currentToken' when not on the main thread.
* dom/UserGestureIndicator.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::keyEvent): If the key event was handled, grant user interaction credit
for ResourceLoadStatistics processing.
(WebCore::EventHandler::internalKeyEvent): Use the new UserGestureIndicator constructor argument.

LayoutTests:

* http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-expected.txt: Added.
* http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html: Added.
* http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-expected.txt: Added.
* http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown.html: Added.
* http/tests/resourceLoadStatistics/resources: Added.
* http/tests/resourceLoadStatistics/resources/onclick.html: Added.
* platform/ios/TestExpectations: Skip tests that require 'keyDown' support, since this is not
  available on iOS.

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

3 years agoDOMTokenList shouldn't add empty attributes
cdumez@apple.com [Fri, 13 Oct 2017 22:36:28 +0000 (22:36 +0000)]
DOMTokenList shouldn't add empty attributes
https://bugs.webkit.org/show_bug.cgi?id=178280

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline web-platform-test now that all checks are passing.

* web-platform-tests/dom/nodes/Element-classlist-expected.txt:

Source/WebCore:

DOMTokenList shouldn't add empty attributes after:
- https://github.com/whatwg/dom/pull/488

Firefox and Chrome follow the latest spec.

No new tests, updating existing test.

* html/DOMTokenList.cpp:
(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):
Implement the first step of https://dom.spec.whatwg.org/#concept-dtl-update

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

3 years ago[WPE] Fontconfig fails build in JHBuild with “error: conflicting types for ‘FcObjectT...
aperez@igalia.com [Fri, 13 Oct 2017 22:03:42 +0000 (22:03 +0000)]
[WPE] Fontconfig fails build in JHBuild with “error: conflicting types for ‘FcObjectTypeHash’”
https://bugs.webkit.org/show_bug.cgi?id=178283

Reviewed by Žan Doberšek.

* wpe/jhbuild.modules: Flag Fontconfig to be built inside the source directory, otherwise
compilation fails. While at it, pass "--disable-docs" to cut a bit on build time.

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

3 years agoMarked http/tests/inspector/network/resource-sizes-memory-cache.html as flaky.
jlewis3@apple.com [Fri, 13 Oct 2017 21:58:01 +0000 (21:58 +0000)]
Marked http/tests/inspector/network/resource-sizes-memory-cache.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=177687

Unreviewed test gardening.
* platform/mac-wk2/TestExpectations:

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

3 years agoImplement listing origins for which CacheStorage is storing data
commit-queue@webkit.org [Fri, 13 Oct 2017 20:31:34 +0000 (20:31 +0000)]
Implement listing origins for which CacheStorage is storing data
https://bugs.webkit.org/show_bug.cgi?id=178236

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-13
Reviewed by Chris Dumez.

Source/WebKit:

Cache storage is split on per-origin folders which name is obfuscated through salting.
To retrieve the origin for each folder, an origin file is now stored within each folder.
This file contains the actual origin.

Adding support to get the list of origin by iterating through each folder and
getting the actual origin by reading the content of the 'origin' file.

Adding C API for WebKitTestRunner.

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::fetchEntries):
(WebKit::CacheStorage::ReadOriginsTaskCounter::create):
(WebKit::CacheStorage::ReadOriginsTaskCounter::~ReadOriginsTaskCounter):
(WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
(WebKit::CacheStorage::ReadOriginsTaskCounter::ReadOriginsTaskCounter):
* NetworkProcess/cache/CacheStorageEngine.h:
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::cachesOriginFilename):
(WebKit::CacheStorage::Caches::retrieveOriginFromDirectory):
(WebKit::CacheStorage::Caches::Caches):
(WebKit::CacheStorage::Caches::storeOrigin):
(WebKit::CacheStorage::Caches::readOrigin):
(WebKit::CacheStorage::Caches::initialize):
* NetworkProcess/cache/CacheStorageEngineCaches.h:
(WebKit::CacheStorage::Caches::origin const):
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreGetFetchCacheOrigins):
* UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

Adding hasDOMCache API for checking whether origin is storing data through Cache API.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::hasDOMCache):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::FetchCacheOriginsCallbackContext::FetchCacheOriginsCallbackContext):
(WTR::fetchCacheOriginsCallback):
(WTR::TestController::hasDOMCache):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/cache-storage/cache-clearing-origin.https.html:

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

3 years agoUnreviewed build fix; wrap more functions in USE(IOSURFACE) so that
jer.noble@apple.com [Fri, 13 Oct 2017 20:24:28 +0000 (20:24 +0000)]
Unreviewed build fix; wrap more functions in USE(IOSURFACE) so that
they do not generate "unused function" errors.

* platform/graphics/cv/VideoTextureCopierCV.cpp:

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

3 years agoOne last unreviewed build fix; since the IOSurface APIs don't exist at
jer.noble@apple.com [Fri, 13 Oct 2017 19:55:47 +0000 (19:55 +0000)]
One last unreviewed build fix; since the IOSurface APIs don't exist at
all on the simulator, just wrap the entirety of the implementation of
copyImageToPlatformTexture() in a #if USE(IOSURFACE) check.

* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):

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

3 years ago[WPE][GTK] Provide an implementation of PAL::logLevelString()
aperez@igalia.com [Fri, 13 Oct 2017 19:04:24 +0000 (19:04 +0000)]
[WPE][GTK] Provide an implementation of PAL::logLevelString()
https://bugs.webkit.org/show_bug.cgi?id=178263

Reviewed by Carlos Alberto Lopez Perez.

Provide an implementation of PAL::logLevelString() which picks the value from the
WEBCORE_DEBUG environment variable. Logging of notImplemented() calls is always enabled,
which is the same behavior as in WebCore::logLevelString().

* pal/PlatformGTK.cmake: Add LoggingUnix.cpp to the list of sources.
* pal/PlatformWPE.cmake: Add LoggingUnix.cpp to the list of sources.
* pal/unix/LoggingUnix.cpp: Added.
(PAL::logLevelString):

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

3 years agoUnreviewed build fix for the previous build fix; use the right PAL path for IOSurface...
jer.noble@apple.com [Fri, 13 Oct 2017 18:55:39 +0000 (18:55 +0000)]
Unreviewed build fix for the previous build fix; use the right PAL path for IOSurfaceSPI.h.

* platform/graphics/cv/VideoTextureCopierCV.cpp:

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

3 years agoUnreviewed build fix; add definitions for IOSurface methods missing on some platforms.
jer.noble@apple.com [Fri, 13 Oct 2017 18:48:36 +0000 (18:48 +0000)]
Unreviewed build fix; add definitions for IOSurface methods missing on some platforms.

Source/WebCore:

* platform/graphics/cv/VideoTextureCopierCV.cpp:

Source/WebCore/PAL:

* pal/spi/cocoa/IOSurfaceSPI.h:

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

3 years agoRemove Editor::simplifyMarkup
achristensen@apple.com [Fri, 13 Oct 2017 18:23:12 +0000 (18:23 +0000)]
Remove Editor::simplifyMarkup
https://bugs.webkit.org/show_bug.cgi?id=178271

Reviewed by Wenson Hsieh.

Source/WebCore:

An API test became flaky, and it turns out this isn't used anywhere, so let's remove it!
It was used in Mountain Lion, Mavericks, and Yosemite, but not since then.
See <rdar://problem/10726177>

* editing/Editor.cpp:
(WebCore::Editor::simplifyMarkup): Deleted.
* editing/Editor.h:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _simplifyMarkup:endNode:]):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/SimplifyMarkup.mm: Removed.

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

3 years agoUnreviewed build fix; forward declare the type of IOSurfaceRef.
jer.noble@apple.com [Fri, 13 Oct 2017 18:16:20 +0000 (18:16 +0000)]
Unreviewed build fix; forward declare the type of IOSurfaceRef.

* platform/cocoa/CoreVideoSoftLink.cpp:
* platform/cocoa/CoreVideoSoftLink.h:

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

3 years agohttp/tests/cache-storage/cache-origins.https.html is flaky
commit-queue@webkit.org [Fri, 13 Oct 2017 18:03:48 +0000 (18:03 +0000)]
http/tests/cache-storage/cache-origins.https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=178266

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-13

* http/tests/cache-storage/cache-clearing-origin.https.html:

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

3 years agoUnreviewed build fix; add soft link macros for newly called CoreVideo methods.
jer.noble@apple.com [Fri, 13 Oct 2017 17:41:21 +0000 (17:41 +0000)]
Unreviewed build fix; add soft link macros for newly called CoreVideo methods.

* platform/cocoa/CoreVideoSoftLink.cpp:
* platform/cocoa/CoreVideoSoftLink.h:

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

3 years agoFix API tests after r223269.
achristensen@apple.com [Fri, 13 Oct 2017 17:30:50 +0000 (17:30 +0000)]
Fix API tests after r223269.
https://bugs.webkit.org/show_bug.cgi?id=178246

* UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::getContentRuleListSource):
Version 10 also has the ability to recover content rule list source.

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

3 years agoUnreviewed build fix; add UNUSED_PARAM macros.
jer.noble@apple.com [Fri, 13 Oct 2017 17:30:36 +0000 (17:30 +0000)]
Unreviewed build fix; add UNUSED_PARAM macros.

* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::texImageIOSurface2D):

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