WebKit-https.git
3 years agoMail hangs when removing multiple rows from large table.
zalan@apple.com [Fri, 10 Feb 2017 22:36:12 +0000 (22:36 +0000)]
Mail hangs when removing multiple rows from large table.
https://bugs.webkit.org/show_bug.cgi?id=168103
<rdar://problem/30090186>

Reviewed by Ryosuke Niwa.

PerformanceTests:

* DOM/large-table-edit.html: Added.

Source/WebCore:

DeleteSelectionCommand::removeNode doesn't actually destroy table structure items,
but instead it removes their content. In order to be able to continue editing the table after
the delete, we need to ensure that its cells' width and height are > 0. Currently we issue layout on
each table item recursively.
This patch delays the layout until after we've finished with the entire subtree delete (10x progression).

Performance test added.

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::insertBlockPlaceholderForTableCellIfNeeded):
(WebCore::DeleteSelectionCommand::removeNodeUpdatingStates):
(WebCore::shouldRemoveContentOnly):
(WebCore::DeleteSelectionCommand::removeNode):
* editing/DeleteSelectionCommand.h:

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

3 years ago[Resource Timing] Enable Resource Timing by default in Tests
joepeck@webkit.org [Fri, 10 Feb 2017 22:28:56 +0000 (22:28 +0000)]
[Resource Timing] Enable Resource Timing by default in Tests
https://bugs.webkit.org/show_bug.cgi?id=168145

Reviewed by Ryosuke Niwa.

Source/WebCore:

* loader/ResourceTimingInformation.cpp:
(WebCore::ResourceTimingInformation::addResourceTiming):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setResourceTimingEnabled): Deleted.
* testing/InternalSettings.h:
* testing/InternalSettings.idl:
No longer needed for tests.

Source/WebKit/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences resourceTimingEnabled]):
(-[WebPreferences setResourceTimingEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/win:

* Interfaces/IWebPreferencesPrivate.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings):
(WebPreferences::setResourceTimingEnabled):
(WebPreferences::resourceTimingEnabled):
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetResourceTimingEnabled):
(WKPreferencesGetResourceTimingEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

* fast/dom/Window/window-properties-performance-resource-timing.html:
* http/tests/misc/resource-timing-resolution.html:
* http/tests/performance/performance-resource-timing-cached-entries-expected.txt:
* http/tests/performance/performance-resource-timing-cached-entries.html:
* http/tests/performance/performance-resource-timing-entries-iterable.html:
* http/tests/performance/performance-resource-timing-entries.html:
* http/tests/performance/performance-resource-timing-initiator-css.html:
* http/tests/performance/performance-resource-timing-initiator-no-override.html:
* http/tests/performance/performance-resource-timing-xhr-single-entry.html:
* http/tests/preload/dynamic_remove_preload_href-expected.txt:
* http/tests/preload/dynamic_remove_preload_href.html:
* http/tests/preload/dynamic_removing_preload.html:
* http/tests/preload/not_evicting_preload_at_onload.html:
* http/tests/preload/single_download_preload-expected.txt:
* http/tests/preload/single_download_preload.html:
* resources/testharnessreport.js:
Eliminate the internals setResourceTimingEnabled way to toggle a runtime feature.

* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:
Update results when ResourceTiming is enabled.

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

3 years ago[Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
mitz@apple.com [Fri, 10 Feb 2017 22:16:19 +0000 (22:16 +0000)]
[Cocoa] Add shouldChangeSelectedRange to WKWebProcessPlugInEditingDelegate
https://bugs.webkit.org/show_bug.cgi?id=168097

Reviewed by Tim Horton.

Source/WebCore:

Added a userTriggered argument to FrameSelection::setSelectedRange so that WebKit2 can
indicate that changes should be agreed to by the delegate.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectedRange): If the change is user-triggered, check with
  shouldChangeSelection.
* editing/FrameSelection.h:

Source/WebKit2:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
  Declared new delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Dispatch new delegate
  method.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Pass UserTriggered whan calling
  WebCore::Frame::Selection::setSelectedRange, so that the delegate is consulted.
(WebKit::WebPage::changeBlockSelection): Ditto.
(WebKit::WebPage::updateSelectionWithTouches): Ditto.
(WebKit::WebPage::selectWithTwoTouches): Ditto.
(WebKit::WebPage::extendSelection): Ditto.
(WebKit::WebPage::selectWordBackward): Ditto,
(WebKit::WebPage::moveSelectionByOffset): Ditto.
(WebKit::WebPage::selectPositionAtPoint): Ditto.
(WebKit::WebPage::selectPositionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::moveSelectionAtBoundaryWithDirection): Ditto.
(WebKit::WebPage::selectTextWithGranularityAtPoint): Ditto.
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary): Ditto.
(WebKit::WebPage::updateSelectionWithExtentPoint): Ditto.

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

3 years agoRemoving LayoutTestRelay
jbedard@apple.com [Fri, 10 Feb 2017 21:58:23 +0000 (21:58 +0000)]
Removing LayoutTestRelay
https://bugs.webkit.org/show_bug.cgi?id=165927

Reviewed by Daniel Bates.
Part 2

LayoutTestRelay uses SPI, since recent versions of the iOS SDK allow for installing apps on
simulators through simctl (iOS 10 and later), use this functionality instead.

Source/WebCore:

* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isDumpRenderTree): Update comment to reflect removal of LayoutTestRelay.

Tools:

* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct): Remove archiving of LayoutTestRelay as it is no longer being built.
Added a FIXME that we will need to implement similar archiving machinery once we build
ImageDiff for Mac when building WebKit for iOS. Currently ImageDiff is built with the iOS SDK.
* BuildSlaveSupport/kill-old-processes:
(main): Remove LayoutTestRelay from list of processes.
* LayoutTestRelay: Removed LayoutTestRelay.
* Makefile:
* Scripts/build-layouttestrelay: Removed.
* Scripts/build-webkit: Removed LayoutTestRelay references.

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

3 years agoUpdate LayoutTests/resources/testharness.js
cdumez@apple.com [Fri, 10 Feb 2017 21:51:44 +0000 (21:51 +0000)]
Update LayoutTests/resources/testharness.js
https://bugs.webkit.org/show_bug.cgi?id=168100

Reviewed by Youenn Fablet.

Update LayoutTests/resources/testharness.js to match the web-platform-tests
one landed in r211930.

* media/track/w3c/interfaces/HTMLTrackElement/srclang-expected.txt:
* media/track/w3c/interfaces/TextTrack/language-expected.txt:
* resources/testharness.js:
(SharedWorkerTestEnvironment):
(ServiceWorkerTestEnvironment):
(create_test_environment):
(promise_test):
(EventWatcher):
(is_node):
(format_value):
* streams/shadowing-Promise-expected.txt:
* streams/shadowing-Promise.html:
* streams/streams-public-array-api-expected.txt: Added.
* streams/streams-public-array-api.html: Added.

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

3 years agoStructureStubInfo::considerCaching() should write barrier its owner CodeBlock when...
mark.lam@apple.com [Fri, 10 Feb 2017 21:34:27 +0000 (21:34 +0000)]
StructureStubInfo::considerCaching() should write barrier its owner CodeBlock when buffering a new Structure.
https://bugs.webkit.org/show_bug.cgi?id=168137
<rdar://problem/28656664>

Reviewed by Filip Pizlo.

If we're adding a new structure to StructureStubInfo's bufferedStructures, we
should write barrier the StubInfo's owner CodeBlock because that structure may be
collected during the next GC.  Write barrier-ing the owner CodeBlock ensures that
CodeBlock::finalizeBaselineJITInlineCaches() is called on it during the GC,
which, in turn, gives the StructureStubInfo the opportunity to filter out the
dead structure.

* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::considerCaching):
* jit/JITOperations.cpp:

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

3 years agoFix iOS libwebrtc build after r212127
achristensen@apple.com [Fri, 10 Feb 2017 21:31:28 +0000 (21:31 +0000)]
Fix iOS libwebrtc build after r212127
https://bugs.webkit.org/show_bug.cgi?id=168134

* Configurations/libwebrtc.xcconfig:
* libwebrtc.xcodeproj/project.pbxproj:
I got a little carried away removing ObjC sources.
We still need RTCLogging.mm and RTCUIApplication.mm on iOS.
Also sorted the project file.

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

3 years ago[WebRTC] Implement Outgoing libwebrtc audio source support
commit-queue@webkit.org [Fri, 10 Feb 2017 21:29:32 +0000 (21:29 +0000)]
[WebRTC] Implement Outgoing libwebrtc audio source support
https://bugs.webkit.org/show_bug.cgi?id=168118

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-10
Reviewed by Eric Carlson.

No new automated tests as we need the audio rendering to work to test the whole loop.

Using an AudioSampleDataSource to convert the captured data to libwebrtc expected format.
Capturing and pushing data happens in the capture thread.
Pulling of converted data happens in libwebrtc thread.

Introducing LibWebRTCAudioFormat.h to centralize libwbebrtc expected audio format.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/WebAudioBufferList.cpp:
(WebCore::WebAudioBufferList::WebAudioBufferList): Missing initialization leads to assertion failure.
* platform/audio/mac/AudioSampleBufferList.cpp:
(WebCore::AudioSampleBufferList::copyFrom): In case of interleaved channels, there is one buffer but two channels.
* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::pushSamples):
(WebCore::AudioSampleDataSource::pullAvalaibleSamplesAsChunks):
* platform/audio/mac/AudioSampleDataSource.h:
* platform/mediastream/libwebrtc/LibWebRTCAudioFormat.h: Added.
* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::libwebrtcAudioFormat):
(WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::sourceMutedChanged):
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable):
(WebCore::RealtimeOutgoingAudioSource::pullAudioData):
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:

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

3 years agocleanup WebLocalizableStrings.
aakash_jain@apple.com [Fri, 10 Feb 2017 21:24:43 +0000 (21:24 +0000)]
cleanup WebLocalizableStrings.
https://bugs.webkit.org/show_bug.cgi?id=168078

Reviewed by Alexey Proskuryakov.

* Misc/WebLocalizableStrings.h: Make visibility hidden for WebLocalizableStringsBundle
as it's for each framework's own consumption, and never needs to be exported.

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

3 years agoREGRESSION (r211829): Web Inspector: Elements tab is blank when added after page...
mattbaker@apple.com [Fri, 10 Feb 2017 21:17:37 +0000 (21:17 +0000)]
REGRESSION (r211829): Web Inspector: Elements tab is blank when added after page load
https://bugs.webkit.org/show_bug.cgi?id=168142

Reviewed by Brian Burg.

The Elements tab can be shown in two ways: by adding the Elements tab
from the "New Tab" tab, or via Inspect Element. In both cases we should
be checking that the ContentView exists, and create it if needed.

* UserInterface/Views/ElementsTabContentView.js:
(WebInspector.ElementsTabContentView.prototype.showRepresentedObject):
(WebInspector.ElementsTabContentView.prototype.shown):

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

3 years agoSkip some very slow WebCryptoAPI tests.
ryanhaddad@apple.com [Fri, 10 Feb 2017 21:15:57 +0000 (21:15 +0000)]
Skip some very slow WebCryptoAPI tests.

Unreviewed test gardening.

* TestExpectations:

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

3 years agoHTMLConstructionSiteTask::Insert should never be called on a node with a parent
rniwa@webkit.org [Fri, 10 Feb 2017 21:15:51 +0000 (21:15 +0000)]
HTMLConstructionSiteTask::Insert should never be called on a node with a parent
https://bugs.webkit.org/show_bug.cgi?id=168099

Reviewed by Sam Weinig.

insertAlreadyParsedChild always use HTMLConstructionSiteTask::InsertAlreadyParsedChild instead
of using HTMLConstructionSiteTask::Insert when fostering a child.

Also combine the step to take all children and re-parenting into a single task instead of
separately issuing TakeAllChildren and Reparent tasks.

No new tests since this is a refactoring.

* html/parser/HTMLConstructionSite.cpp:
(WebCore::insert): Now asserts that the child node never have a parent.
(WebCore::executeInsertAlreadyParsedChildTask): Moved the code to remove the parent here.
(WebCore::executeTakeAllChildrenAndReparentTask): Renamed from executeTakeAllChildrenTask
now that this function also does the reparenting.
(WebCore::executeTask):
(WebCore::HTMLConstructionSite::reparent): Removed the variant only used with takeAllChildren.
(WebCore::HTMLConstructionSite::insertAlreadyParsedChild): Always use InsertAlreadyParsedChild
instead of calling fosterParent which uses Insert when fostering parents.
(WebCore::HTMLConstructionSite::takeAllChildrenAndReparent): Renamed from takeAllChildren.
* html/parser/HTMLConstructionSite.h:
(WebCore::HTMLConstructionSiteTask:Operation):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):

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

3 years agoFix misleading comment in RunLoop.h
commit-queue@webkit.org [Fri, 10 Feb 2017 21:08:32 +0000 (21:08 +0000)]
Fix misleading comment in RunLoop.h
https://bugs.webkit.org/show_bug.cgi?id=167832

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-10
Reviewed by Sam Weinig.

* wtf/RunLoop.h:
Mac initialization used to force using CFRunLoopGetMain(). Now however it just
uses RunLoop::current which uses CFRunLoopGetCurrent(). So this comment that
it can be done on any thread is misleading and can lead to incorrect behavior
if it is actually done on a non-main thread on Mac.

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

3 years ago[WebCrypto] Remove imported/w3c/WebCryptoAPI tests
jiewen_tan@apple.com [Fri, 10 Feb 2017 20:59:40 +0000 (20:59 +0000)]
[WebCrypto] Remove imported/w3c/WebCryptoAPI tests
https://bugs.webkit.org/show_bug.cgi?id=168064

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* WebCryptoAPI/OWNERS: Removed.
* WebCryptoAPI/README.md: Removed.
* WebCryptoAPI/WebCryptoAPI.idl: Removed.
* WebCryptoAPI/digest/digest.js: Removed.
* WebCryptoAPI/digest/digest.worker.js: Removed.
* WebCryptoAPI/digest/test_digest-expected.txt: Removed.
* WebCryptoAPI/digest/test_digest.html: Removed.
* WebCryptoAPI/digest/w3c-import.log: Removed.
* WebCryptoAPI/encrypt_decrypt/aes.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_cbc_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_ctr_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa.worker.js: Removed.
* WebCryptoAPI/encrypt_decrypt/rsa_vectors.js: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html: Removed.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: Removed.
* WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html: Removed.
* WebCryptoAPI/encrypt_decrypt/w3c-import.log: Removed.
* WebCryptoAPI/generateKey/failures.js: Removed.
* WebCryptoAPI/generateKey/failures.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-CTR.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-GCM.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_AES-KW.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_ECDH.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_ECDSA.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_HMAC.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js: Removed.
* WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js: Removed.
* WebCryptoAPI/generateKey/successes.js: Removed.
* WebCryptoAPI/generateKey/successes.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-CBC.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-CTR.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-GCM.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_AES-KW.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_ECDH.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_ECDSA.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_HMAC.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js: Removed.
* WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js: Removed.
* WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_aes-cbc.html: Removed.
* WebCryptoAPI/generateKey/test_aes-ctr-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_aes-ctr.html: Removed.
* WebCryptoAPI/generateKey/test_failures-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CBC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CBC.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-CTR.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-GCM-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-GCM.html: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-KW-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_AES-KW.html: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDH.html: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_ECDSA.html: Removed.
* WebCryptoAPI/generateKey/test_failures_HMAC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_HMAC.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-OAEP.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSA-PSS.html: Removed.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5.html: Removed.
* WebCryptoAPI/generateKey/test_successes-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CBC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CBC.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-CTR.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-GCM.html: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_AES-KW.html: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDH.html: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_ECDSA.html: Removed.
* WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_HMAC.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSA-PSS.html: Removed.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Removed.
* WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html: Removed.
* WebCryptoAPI/generateKey/w3c-import.log: Removed.
* WebCryptoAPI/getRandomValues.js: Removed.
* WebCryptoAPI/getRandomValues.worker.js: Removed.
* WebCryptoAPI/idlharness-expected.txt: Removed.
* WebCryptoAPI/idlharness.html: Removed.
* WebCryptoAPI/idlharness.worker.js: Removed.
* WebCryptoAPI/test_getRandomValues-expected.txt: Removed.
* WebCryptoAPI/test_getRandomValues.html: Removed.
* WebCryptoAPI/tools/generate.py: Removed.
* WebCryptoAPI/tools/w3c-import.log: Removed.
* WebCryptoAPI/util/helpers.js: Removed.
* WebCryptoAPI/util/w3c-import.log: Removed.
* WebCryptoAPI/w3c-import.log: Removed.

LayoutTests:

* TestExpectations:
Remove test expectations of imported/w3c/WebCryptoAPI tests.

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

3 years agoRemove platform expectations without tests
commit-queue@webkit.org [Fri, 10 Feb 2017 20:51:00 +0000 (20:51 +0000)]
Remove platform expectations without tests
https://bugs.webkit.org/show_bug.cgi?id=168139

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-10
Reviewed by Sam Weinig.

* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_performance_attributes_exist_in_object-expected.txt: Removed.
* platform/gtk/http/tests/w3c/webperf/approved/navigation-timing/html/test_timing_xserver_redirect-expected.txt: Removed.

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

3 years agofast/forms/formsubmission-appendFormData-crash.html times out on WebKit1
cdumez@apple.com [Fri, 10 Feb 2017 20:45:00 +0000 (20:45 +0000)]
fast/forms/formsubmission-appendFormData-crash.html times out on WebKit1
https://bugs.webkit.org/show_bug.cgi?id=168133

Reviewed by Brent Fulgham.

Call testRunner.notifyDone() synchronously instead of doing it in a
setTimeout(). The test no longer times out on WK1 and still reproduces
the original bug.

* fast/forms/formsubmission-appendFormData-crash.html:

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

3 years ago[WebCrypto] Add WebCryptoAPI to watchlist
jiewen_tan@apple.com [Fri, 10 Feb 2017 20:39:54 +0000 (20:39 +0000)]
[WebCrypto] Add WebCryptoAPI to watchlist
https://bugs.webkit.org/show_bug.cgi?id=168138

Reviewed by Youenn Fablet.

* Scripts/webkitpy/common/config/watchlist:

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

3 years agoReplace all WebKit Library Version checks in WK2 with SDK version checks.
beidson@apple.com [Fri, 10 Feb 2017 20:38:35 +0000 (20:38 +0000)]
Replace all WebKit Library Version checks in WK2 with SDK version checks.
https://bugs.webkit.org/show_bug.cgi?id=168124

Reviewed by Geoffrey Garen.

Source/WebKit2:

This change gets rid of WebKit Library Version checks and replaces them with SDK version checks.

To allow our tools to still be able to test new behaviors even when built against older SDKs,
it also opts them into an SPI default to have "linkedOnOrAfter()" always return true.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

* UIProcess/Cocoa/VersionChecks.h:
(WebKit::linkedOnOrAfter): Deleted.
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):

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

Tools:

For each of our tools that use WebKit2, opt them in to the new linkedOnOrAfter(Everything) setting.

* MiniBrowser/mac/main.m:
(main):
* MobileMiniBrowser/MobileMiniBrowser/main.m:
(main):
* TestWebKitAPI/ios/mainIOS.mm:
(main):
* TestWebKitAPI/mac/mainMac.mm:
(main):
* WebKitTestRunner/ios/mainIOS.mm:
(main):
* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting):

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

3 years agoLayoutTest workers/sab/postMessage-clones.html is a flaky failure
fpizlo@apple.com [Fri, 10 Feb 2017 20:34:15 +0000 (20:34 +0000)]
LayoutTest workers/sab/postMessage-clones.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168129

Unreviewed, make this test more deterministic.

* workers/sab/postMessage-clones.html:

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

3 years ago[CSS Parser] Make intercap property values serialize correctly
hyatt@apple.com [Fri, 10 Feb 2017 20:26:30 +0000 (20:26 +0000)]
[CSS Parser] Make intercap property values serialize correctly
https://bugs.webkit.org/show_bug.cgi?id=168073

Reviewed by Zalan Bujtas.

Source/WebCore:

Fix CSS value keywords to preserve case when the value contains capital
letters. Examples include optimizeSpeed, translateX, scaleY, etc.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
* css/MediaQueryEvaluator.cpp:
(WebCore::colorGamutEvaluate):
* css/SVGCSSValueKeywords.in:
* css/TransformFunctions.cpp:
(WebCore::transformOperationType):
(WebCore::transformsForValue):
* css/makevalues.pl:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::parseTransformTranslateArguments):
(WebCore::parseSimpleTransformValue):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeTransformValue):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters):

LayoutTests:

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/image-rendering-parsing-expected.txt:
* fast/css/parsing-text-rendering-expected.txt:
* fast/css/resources/parsing-text-rendering.js:
* fast/css/script-tests/image-rendering-parsing.js:
* svg/css/getComputedStyle-basic-expected.txt:
* svg/css/script-tests/shape-rendering-parsing.js:
* svg/css/shape-rendering-parsing-expected.txt:
* transforms/2d/transform-value-types-expected.txt:
* transforms/2d/transform-value-types.html:

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

3 years agoFix iOS libwebrtc build after r212127
achristensen@apple.com [Fri, 10 Feb 2017 19:52:57 +0000 (19:52 +0000)]
Fix iOS libwebrtc build after r212127
https://bugs.webkit.org/show_bug.cgi?id=168134

* libwebrtc.xcodeproj/project.pbxproj:
I got a little carried away removing -fobjc-arc.  These files need it.
It was originally added in r211902 and these files are in the
EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] list in libwebrtc.xcconfig
so adding this flag won't break the 32-bit El Capitan build.

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

3 years agoBeef up the ARES-6 explainer text
fpizlo@apple.com [Fri, 10 Feb 2017 19:49:55 +0000 (19:49 +0000)]
Beef up the ARES-6 explainer text
https://bugs.webkit.org/show_bug.cgi?id=167867

Reviewed by Saam Barati.

Added appropriate links.

Added text that explains the subscores.

* ARES-6/index.html:

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

3 years agoWebResourceLoadDelegatePrivate.h cannot be imported standalone
aakash_jain@apple.com [Fri, 10 Feb 2017 19:26:36 +0000 (19:26 +0000)]
WebResourceLoadDelegatePrivate.h cannot be imported standalone
https://bugs.webkit.org/show_bug.cgi?id=168096

Reviewed by Alexey Proskuryakov.

* WebView/WebResourceLoadDelegatePrivate.h: Change WebNSInteger to NSInteger.

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

3 years agoRemove unnecessary automatic reference counting in libwebrtc
achristensen@apple.com [Fri, 10 Feb 2017 19:16:59 +0000 (19:16 +0000)]
Remove unnecessary automatic reference counting in libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=168134

Reviewed by Youenn Fablet.

* libwebrtc.xcodeproj/project.pbxproj:

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

3 years ago[WebRTC] Activate libwebrtc G711/G722 audio codecs
commit-queue@webkit.org [Fri, 10 Feb 2017 19:03:56 +0000 (19:03 +0000)]
[WebRTC] Activate libwebrtc G711/G722 audio codecs
https://bugs.webkit.org/show_bug.cgi?id=168123

Patch by Youenn Fablet <youennf@gmail.com> on 2017-02-10
Reviewed by Alex Christensen.

Adding G711/G722 missing codec files.
Activating use of these in the build system.

* Configurations/libwebrtc.xcconfig:
* Source/webrtc/modules/audio_coding/codecs/g711/g711.c: Added.
(ulaw_to_alaw):
* Source/webrtc/modules/audio_coding/codecs/g711/g711.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.cc: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_decoder_g722.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.cc: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/audio_encoder_g722.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_decode.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_enc_dec.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_encode.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_interface.c: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/g722_interface.h: Added.
* Source/webrtc/modules/audio_coding/codecs/g722/test/testG722.cc: Added.
* libwebrtc.xcodeproj/project.pbxproj:

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

3 years ago[WebCrypto] Import imported/w3c/web-platform-tests/WebCryptoAPI tests
jiewen_tan@apple.com [Fri, 10 Feb 2017 18:21:16 +0000 (18:21 +0000)]
[WebCrypto] Import imported/w3c/web-platform-tests/WebCryptoAPI tests
https://bugs.webkit.org/show_bug.cgi?id=165723

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/WebCryptoAPI/OWNERS: Added.
* web-platform-tests/WebCryptoAPI/README.md: Added.
* web-platform-tests/WebCryptoAPI/WebCryptoAPI.idl: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_bits.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/ecdh_keys.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/hkdf_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_hkdf.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2.html: Added.
* web-platform-tests/WebCryptoAPI/derive_bits_keys/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.js: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker.html: Added.
* web-platform-tests/WebCryptoAPI/digest/digest.worker.js: Added.
* web-platform-tests/WebCryptoAPI/digest/test_digest-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/digest/test_digest.html: Added.
* web-platform-tests/WebCryptoAPI/digest/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_cbc_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_ctr_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/aes_gcm_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa.worker.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/rsa_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_cbc.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_ctr.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_aes_gcm.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/test_rsa_oaep.html: Added.
* web-platform-tests/WebCryptoAPI/encrypt_decrypt/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-cbc-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-cbc.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_aes-ctr.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CBC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CBC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-CTR.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-GCM-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-GCM.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-KW-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_AES-KW.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDH.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_ECDSA.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_HMAC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_HMAC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-OAEP-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-OAEP.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSA-PSS.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_failures_RSASSA-PKCS1-v1_5.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CBC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CBC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-CTR.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-GCM.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-KW-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_AES-KW.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDH.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_ECDSA.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_HMAC-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_HMAC.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-OAEP-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-OAEP.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSA-PSS.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/generateKey/test_successes_RSASSA-PKCS1-v1_5.html: Added.
* web-platform-tests/WebCryptoAPI/generateKey/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.js: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker.html: Added.
* web-platform-tests/WebCryptoAPI/getRandomValues.worker.js: Added.
* web-platform-tests/WebCryptoAPI/idlharness-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/idlharness.html: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker.html: Added.
* web-platform-tests/WebCryptoAPI/idlharness.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/ec_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/rsa_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker.js: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_ec_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_rsa_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey.html: Added.
* web-platform-tests/WebCryptoAPI/import_export/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/ecdsa_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/hmac_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pkcs_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss.worker.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/rsa_pss_vectors.js: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_ecdsa.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_hmac-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_hmac.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pkcs.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/test_rsa_pss.html: Added.
* web-platform-tests/WebCryptoAPI/sign_verify/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/test_getRandomValues-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/test_getRandomValues.html: Added.
* web-platform-tests/WebCryptoAPI/tools/generate.py: Added.
* web-platform-tests/WebCryptoAPI/tools/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/util/helpers.js: Added.
* web-platform-tests/WebCryptoAPI/util/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/test_wrapKey_unwrapKey.html: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/w3c-import.log: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.js: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker-expected.txt: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.html: Added.
* web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.js: Added.

LayoutTests:

* TestExpectations:
Skip superset/unsupported tests and mark slow tests as Slow.
* tests-options.json:

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

3 years agoMark compositing/masks/solid-color-masked.html as failing on ios-simulator.
ryanhaddad@apple.com [Fri, 10 Feb 2017 18:01:38 +0000 (18:01 +0000)]
Mark compositing/masks/solid-color-masked.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=168054

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoAdd platform specific expected.txt file for fast/text/mark-matches-overflow-clip...
ryanhaddad@apple.com [Fri, 10 Feb 2017 17:44:36 +0000 (17:44 +0000)]
Add platform specific expected.txt  file for fast/text/mark-matches-overflow-clip.html after r212113.

Unreviewed test gardening.

* fast/text/mark-matches-overflow-clip-expected.txt:
* platform/gtk/fast/text/mark-matches-overflow-clip-expected.txt: Copied from LayoutTests/fast/text/mark-matches-overflow-clip-expected.txt.

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

3 years ago[Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the...
bburg@apple.com [Fri, 10 Feb 2017 17:29:36 +0000 (17:29 +0000)]
[Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
https://bugs.webkit.org/show_bug.cgi?id=168019
<rdar://problem/28718990>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

It's useful to have an symbolic value (not a string) for each of the supported platform values.
Generate this once per protocol for the Objective-C bindings. Covered by existing tests.

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator.generate_output):
(ObjCHeaderGenerator._generate_enum_for_platforms):
Create an NS_ENUM for Platform values in Platforms.

* inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
(ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms):
Add type conversion/parsing methods for the newly added enum.

* inspector/scripts/codegen/generator.py:
(Generator.stylized_name_for_enum_value):
(Generator.stylized_name_for_enum_value.replaceCallback):
Support arbitrary special-cased substrings in enums, not just all-caps. Add 'IOS' and 'MacOS'.

* inspector/scripts/codegen/models.py:
(Platforms):
Use lower-case string values for platform names, to avoid guesswork.

(Platforms.__metaclass__):
(Platforms.__metaclass__.__iter__):
Make it possible to iterate over Platform instances of Platforms.

* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
* inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
Rebaseline results.

Source/WebKit2:

* UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.

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

3 years agoWeb Automation: fail gracefully when a screenshot cannot be encoded as base64
bburg@apple.com [Fri, 10 Feb 2017 17:25:36 +0000 (17:25 +0000)]
Web Automation: fail gracefully when a screenshot cannot be encoded as base64
https://bugs.webkit.org/show_bug.cgi?id=168095
<rdar://problem/30297427>

Reviewed by Joseph Pecoraro.

Convert platformGetBase64EncodedPNGData to return a std::optional<String>.
Return nullopt if we can't create a screenshot or convert it to base64.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::didTakeScreenshot):
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm:
(WebKit::WebAutomationSession::platformGetBase64EncodedPNGData):

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

3 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 16:50:57 +0000 (16:50 +0000)]
Fix El Capitan build.

* Scripts/build-webkit:
Don't build libwebrtc anywhere for now.

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

3 years agoUnreviewed GTK+ gardening. Rebaseline several fast/text/ tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 14:32:59 +0000 (14:32 +0000)]
Unreviewed GTK+ gardening. Rebaseline several fast/text/ tests.

* fast/text/mark-matches-overflow-clip-expected.txt:
* platform/gtk/fast/text/crash-complex-text-surrogate-expected.txt:
* platform/gtk/fast/text/hyphenate-first-word-expected.png:
* platform/gtk/fast/text/hyphenate-first-word-expected.txt:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
* platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
* platform/gtk/fast/text/hyphens-expected.png:
* platform/gtk/fast/text/hyphens-expected.txt:
* platform/gtk/fast/text/international/text-combine-image-test-expected.png:
* platform/gtk/fast/text/international/text-combine-image-test-expected.txt:
* platform/gtk/fast/text/international/thai-line-breaks-expected.png:
* platform/gtk/fast/text/international/thai-line-breaks-expected.txt:
* platform/gtk/fast/text/orientation-sideways-expected.png:
* platform/gtk/fast/text/orientation-sideways-expected.txt:
* platform/gtk/fast/text/whitespace/023-expected.txt:

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

3 years agoUnreviewed GTK+ gardening. Rebaseline fast/table/ tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 13:57:16 +0000 (13:57 +0000)]
Unreviewed GTK+ gardening. Rebaseline fast/table/ tests.

* platform/gtk/fast/table/border-collapsing/004-vertical-expected.png:
* platform/gtk/fast/table/border-collapsing/004-vertical-expected.txt:
* platform/gtk/fast/table/border-collapsing/cached-change-cell-border-width-expected.txt:

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

3 years agoUnreviewed GTK+ gardening. Update expectations of CSS shapes duplicated tests.
carlosgc@webkit.org [Fri, 10 Feb 2017 10:51:20 +0000 (10:51 +0000)]
Unreviewed GTK+ gardening. Update expectations of CSS shapes duplicated tests.

* platform/gtk/TestExpectations:

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

3 years ago[EME] Implement MediaKeySession::load()
zandobersek@gmail.com [Fri, 10 Feb 2017 10:40:29 +0000 (10:40 +0000)]
[EME] Implement MediaKeySession::load()
https://bugs.webkit.org/show_bug.cgi?id=168041

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the MediaKeySession::load() method, tracing the steps as they
are defined in the EME specification. The only exception is step 8.3,
which requires additional facility that tracks currently open sessions
and provides information whether for a given session ID there's already
a MediaKeySession that's not yet been closed.

Session ID sanitization is done through the CDM::sanitizeSessionId()
method, which relays the task to the CDMPrivate implementation.

The CDMInstance::loadSession() virtual method is called with the session
type, sanitized ID, the Document's origin (in string form) and the
callback that's invoked upon completion of the task. The callback
checks whether the operation was successful, or examines the reason for
the load failure in case it wasn't, rejecting the promise in the latter
case either immediately or in the following task at the latest.

When the load was successful, the optional known keys, expiration time
and message are handled appropriately, and the promise is resolved.

MockCDM::sanitizeSessionId() implementation only treats
'valid-loaded-session' as a valid session ID.
MockCDMInstance::loadSession() implementation is kept slim for now, only
providing the 'license-renewal' message when invoking the passed-in
callback. Known keys and expiration time will also be tested once the
relevant MediaKeySession algorithms are implemented.

Test: media/encrypted-media/mock-MediaKeySession-load.html

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::sanitizeSessionId):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::load):
* testing/MockCDMFactory.cpp:
(WebCore::MockCDM::sanitizeSessionId):
(WebCore::MockCDMInstance::loadSession):
* testing/MockCDMFactory.h:

LayoutTests:

Add the mock-MediaKeySession-load.html test, testing the basic behavior
of the MediaKeySession::load() implementation. Invalid session IDs and
session types are tested to ensure the returned promise is rejected.
A simplistic test case also tests that for a valid session ID and
session type, the basic MockCDM implementation correctly 'loads' the
specified session and provides the 'license-renewal' message in return.
More tests should be added as the EME implementation advances and the
MockCDM implementations improve to cover additional cases.

* media/encrypted-media/mock-MediaKeySession-load-expected.txt: Added.
* media/encrypted-media/mock-MediaKeySession-load.html: Added.
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:

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

3 years ago[EME] Implement MediaKeySession::sessionClosed()
zandobersek@gmail.com [Fri, 10 Feb 2017 10:31:57 +0000 (10:31 +0000)]
[EME] Implement MediaKeySession::sessionClosed()
https://bugs.webkit.org/show_bug.cgi?id=168039

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement the 'session closed' algorithm for MediaKeySession by
following the specified steps. After this algorithm is run, the
session should be considered closed, which we track via the m_closed
member variable on the class. This is set to true before the promise
that's accessible through the 'closed' attribute is resolved.

Because the algorithm requires the CDM instance to store any record
of key usage when the session's type is 'persistent-usage-record', the
storeRecordOfKeyUsage() virtual method is added to the CDMInstance
interface. MockCDMInstance implementation is left unimplemented for now.

JSMediaKeySession::closed() accessor now has a custom implementation
that creates a deferred promise for that object if there's none yet, and
shares it with the wrapped class through the registerClosedPromise()
method, storing a reference to the promise in the m_closedPromise
member variable, or resolving the promise immediately if the session was
already closed.

Test cases added to media/encrypted-media/mock-MediaKeySession-close.html.

* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::registerClosedPromise):
(WebCore::MediaKeySession::sessionClosed):
* Modules/encryptedmedia/MediaKeySession.h:
* bindings/js/JSMediaKeySessionCustom.cpp:
(WebCore::JSMediaKeySession::closed):
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::storeRecordOfKeyUsage):
* testing/MockCDMFactory.h:

LayoutTests:

Enhance the mock-MediaKeySession-close.html test by adding test cases
covering the dispatch of the promise that's accessible through the
'closed' attribute and covering the session closure status, making
sure that various operations properly resolve or reject after the
session object was closed.

* media/encrypted-media/mock-MediaKeySession-close-expected.txt:
* media/encrypted-media/mock-MediaKeySession-close.html:

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

3 years agoMove two MiniBrowserBundle settings out of the .pbxproj
aestes@apple.com [Fri, 10 Feb 2017 10:28:59 +0000 (10:28 +0000)]
Move two MiniBrowserBundle settings out of the .pbxproj
https://bugs.webkit.org/show_bug.cgi?id=168106

Reviewed by Tim Horton.

INFOPLIST_FILE was specified in MiniBrowserBundle.xcconfig but overridden to "" in
the project file. This removes the project file override.

WRAPPER_EXTENSION was moved from the project file to MiniBrowserBundle.xcconfig.

* MiniBrowser/Configurations/MiniBrowserBundle.xcconfig:
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:

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

3 years ago[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
zandobersek@gmail.com [Fri, 10 Feb 2017 10:22:50 +0000 (10:22 +0000)]
[EME] Implement MediaKeySession::updateKeyStatuses(), MediaKeyStatusMap
https://bugs.webkit.org/show_bug.cgi?id=167888

Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Implement MediaKeySession::updateKeyStatuses(), transforming the passed-in
KeyStatusVector into a Vector mapping the key IDs to MediaKeyStatus values.
A keystatuseschange event is fired on the MediaKeySession object afterwards.
The queueing of the task that runs the 'attemp to resume playback' on the
related HTMLMediaElement objects isn't done yet since that algorithm isn't
implemented yet.

The statuses Vector is stored on the MediaKeySession object. That Vector is
then exposed through the MediaKeyStatusMap object, each such object being
unique to one MediaKeySession object. The implementation of MediaKeyStatusMap
thus keeps a reference to the session object as long as that object is alive,
and queries the MediaKeySession::statuses() getter to access the Vector that
contains status information for all the key IDs.

MediaKeyStatusMap::Iterator object keeps a reference to the MediaKeyStatusMap
object and accesses the statuses by indexing into the status Vector of the
related MediaKeySession object.

CDMInstance::updateLicense() now accepts the session ID string as the first
argument, making it possible to specify which session should be updated.

MockCDMFactory::keysForSessionWithID() returns an optional reference to the
Vector value in the session map that lists all the key IDs that are being
stored for that session.

MockCDMInstance::updateLicense() now detects the 'keys-changed' entry in the
passed-in response data, and upon detecting that constructs a KeyStatusVector
object containing all the keys for that session. KeyStatus::Usable is returned
for each object at the moment, but this should be adjustable in the future
through additional parameters passed through the response data. The Vector
object is then passed to the callback and is then passed to the 'update key
statuses' algorithm in MediaKeySession.

Covered by a test case in media/encrypted-media/mock-MediaKeySession-update.html.

* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::MediaKeySession):
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::update):
(WebCore::MediaKeySession::updateKeyStatuses):
* Modules/encryptedmedia/MediaKeySession.h:
* Modules/encryptedmedia/MediaKeyStatusMap.cpp:
(WebCore::MediaKeyStatusMap::MediaKeyStatusMap):
(WebCore::MediaKeyStatusMap::detachSession):
(WebCore::MediaKeyStatusMap::size):
(WebCore::keyIdsMatch):
(WebCore::MediaKeyStatusMap::has):
(WebCore::MediaKeyStatusMap::get):
(WebCore::MediaKeyStatusMap::Iterator::Iterator):
(WebCore::MediaKeyStatusMap::Iterator::next):
* Modules/encryptedmedia/MediaKeyStatusMap.h:
(WebCore::MediaKeyStatusMap::create):
* Modules/encryptedmedia/MediaKeyStatusMap.idl:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDMFactory::keysForSessionWithID):
(WebCore::MockCDMInstance::updateLicense):
* testing/MockCDMFactory.h:

LayoutTests:

Add another test case to the mock-MediaKeySession-update.html test that
ensures the keystatuseschange event is fired on the MediaKeySession object
and that the status of the keys is properly reported through the
MediaKeyStatusMap object associated with this MediaKeySession.

* media/encrypted-media/mock-MediaKeySession-update-expected.txt:
* media/encrypted-media/mock-MediaKeySession-update.html:

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

3 years agoFix 32-and-64-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 09:17:12 +0000 (09:17 +0000)]
Fix 32-and-64-bit build on El Capitan.

* Scripts/build-webkit:
Somebody's building with something like this:
build-webkit ARCHS="i386 x86_64"
We want this to also not build libwebrtc for now.

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

3 years agoFix ASAN build.
achristensen@apple.com [Fri, 10 Feb 2017 09:04:32 +0000 (09:04 +0000)]
Fix ASAN build.

* Source/webrtc/base/sanitizer.h:
SANITIZER_UNUSED3 wasn't defined if we are using address_sanitizer but not memory_sanitizer.

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

3 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:41:56 +0000 (08:41 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
The bot uses ARCHS=i386 instead of --32-bit.
This is a hack, but it should fix the bot until I can do a better fix in the morning.

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

3 years agoUnreviewed. Fix GTK+ build with threaded compositor disabled.
carlosgc@webkit.org [Fri, 10 Feb 2017 08:26:45 +0000 (08:26 +0000)]
Unreviewed. Fix GTK+ build with threaded compositor disabled.

* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::AcceleratedDrawingArea::exitAcceleratedCompositingModeNow):

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

3 years agoFix 32-bit build on El Capitan.
achristensen@apple.com [Fri, 10 Feb 2017 08:12:42 +0000 (08:12 +0000)]
Fix 32-bit build on El Capitan.

* Scripts/build-webkit:
Don't build i386 libwebrtc.

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

3 years agoUnreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line...
carlosgc@webkit.org [Fri, 10 Feb 2017 07:12:12 +0000 (07:12 +0000)]
Unreviewed GTK+ gardening. Update expectations of tests using CSS3 Text each-line and hanging indent.

* platform/gtk/TestExpectations:

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

3 years agoImprove IOSurfacePool logging
simon.fraser@apple.com [Fri, 10 Feb 2017 05:26:08 +0000 (05:26 +0000)]
Improve IOSurfacePool logging
https://bugs.webkit.org/show_bug.cgi?id=168098

Reviewed by Tim Horton.

Pass a string to DUMP_POOL_STATISTICS so we can tell what's triggering the
logging.

* platform/graphics/cg/IOSurfacePool.cpp:
(WebCore::IOSurfacePool::takeSurface):
(WebCore::IOSurfacePool::addSurface):
(WebCore::IOSurfacePool::evict):
(WebCore::IOSurfacePool::collectionTimerFired):
(WebCore::IOSurfacePool::showPoolStatistics):
* platform/graphics/cg/IOSurfacePool.h:

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

3 years agoUnreviewed, rolling out r212040.
achristensen@apple.com [Fri, 10 Feb 2017 05:08:59 +0000 (05:08 +0000)]
Unreviewed, rolling out r212040.

Broke build.  I'm not surprised

Reverted changeset:

"[WebRTC][Mac] Activate libwebrtc"
https://bugs.webkit.org/show_bug.cgi?id=167293
http://trac.webkit.org/changeset/212040

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

3 years ago[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames...
cdumez@apple.com [Fri, 10 Feb 2017 04:00:52 +0000 (04:00 +0000)]
[Mac][WK2] Use MIME type to add file extension to downloads' suggested filenames when missing
https://bugs.webkit.org/show_bug.cgi?id=168077
<rdar://problem/30412595>

Reviewed by Alex Christensen.

Source/WebCore:

Add utility function to MIMETypeRegistry that appends an extension to
a filename if necessary, based on a provided MIME type.

Tests: fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html
       http/tests/download/anchor-download-no-extension.html

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
* platform/MIMETypeRegistry.h:
* platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):

Source/WebKit2:

Use MIME type to add file extension to downloads' suggested filenames when missing:
- https://html.spec.whatwg.org/#as-a-download (step 19)

This new behavior matches Chrome.

* NetworkProcess/Downloads/BlobDownloadClient.cpp:
(WebKit::BlobDownloadClient::didReceiveResponseAsync):
* NetworkProcess/Downloads/Download.cpp:
(WebKit::Download::didReceiveResponse):
(WebKit::Download::decideDestinationWithSuggestedFilename):
* NetworkProcess/Downloads/Download.h:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
* UIProcess/Downloads/DownloadProxy.h:
* UIProcess/Downloads/DownloadProxy.messages.in:

LayoutTests:

Rebaseline a couple of download tests where suggested filenames now have an extension
and extend test coverage.

* fast/dom/HTMLAnchorElement/anchor-download-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click-expected.txt:
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-file-blob-download-no-extension.html: Added.
* fast/dom/HTMLAnchorElement/anchor-nodownload-set-expected.txt:
* http/tests/download/anchor-download-no-extension-expected.txt: Added.
* http/tests/download/anchor-download-no-extension.html: Added.
* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk1/TestExpectations:
* platform/win/TestExpectations:

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

3 years ago[WebRTC][Mac] Activate libwebrtc
achristensen@apple.com [Fri, 10 Feb 2017 03:39:17 +0000 (03:39 +0000)]
[WebRTC][Mac] Activate libwebrtc
https://bugs.webkit.org/show_bug.cgi?id=167293

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-09
Reviewed by Alex Christensen.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:

Source/WTF:

* wtf/Platform.h:

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

3 years agoFix libwebrtc build on case-sensitive file systems.
achristensen@apple.com [Fri, 10 Feb 2017 03:33:55 +0000 (03:33 +0000)]
Fix libwebrtc build on case-sensitive file systems.

* WebProcess/Network/webrtc/WebRTCMonitor.cpp:

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

3 years agoSVG clip-path references can clip out later content
pdr@google.com [Fri, 10 Feb 2017 03:27:40 +0000 (03:27 +0000)]
SVG clip-path references can clip out later content
https://bugs.webkit.org/show_bug.cgi?id=164181

Reviewed by Said Abou-Hallawa.

Source/WebCore:

RenderSVGResourceClipper can modify the GraphicsContext state (through the path-only
clipping codepath) so we need to ensure RenderLayer::setupClipPath saves the context
and its caller restores it back so later content is not clipped as well.

This patch is based on a chromium patch by fs@opera.com:
https://chromium.googlesource.com/chromium/src/+/b3f7e7d2c4afb3c7e5c7eb438ff5933cbe2109b3

Test: css3/masking/clip-path-reference-restore.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Add a GC save and return true to restore. Also switch to downcast instead of static_cast.

LayoutTests:

Make sure applying multiple clip-path references does not clip out later content.

* css3/masking/clip-path-reference-restore-expected.html: Added.
* css3/masking/clip-path-reference-restore.html: Added.

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

3 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 03:02:25 +0000 (03:02 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

3 years agoFix El Capitan build.
achristensen@apple.com [Fri, 10 Feb 2017 02:59:06 +0000 (02:59 +0000)]
Fix El Capitan build.

* libwebrtc.xcodeproj/project.pbxproj:
Remove more SSE4 code.

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

3 years agoSharedArrayBuffer does not need to be in the transfer list
fpizlo@apple.com [Fri, 10 Feb 2017 02:42:20 +0000 (02:42 +0000)]
SharedArrayBuffer does not need to be in the transfer list
https://bugs.webkit.org/show_bug.cgi?id=168079

Reviewed by Geoffrey Garen and Keith Miller.
Source/JavaScriptCore:

Exposes a simple shareWith() API for when you know you want to share the contents of
a shared buffer. Also a useful explicit operator bool.

* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::shareWith):
* runtime/ArrayBuffer.h:
(JSC::ArrayBufferContents::operator bool):

Source/WebCore:

Tests: workers/sab/multi-memory-multi-buffer.html
       workers/sab/multi-memory.html
       workers/sab/no-transfer.html
       workers/sab/postMessage-clones.html
       workers/sab/sent-from-worker-no-transfer.html
       workers/sab/sent-from-worker-transfer.html

The SAB API that we originally implemented required that SABs get put in transfer lists
when they are sent to workers.

The new SAB API that everyone is converging towards requires that you do not put the
SAB in the transfer list. That's supposed to be an error. Instead, anytime that a SAB
is part of any message to or from a dedicated worker then it is automatically shared.

The new API provides a lot more clarity about what is supposed to happen in contexts
that support transfering but don't support sharing.

Right now this patch allows both styles to work, but I hope we can disable the transfer
list capability soon.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
* bindings/js/JSMessageEventCustom.cpp:
(WebCore::JSMessageEvent::data):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
* bindings/js/SerializedScriptValue.h:
(): Deleted.
* dom/CustomEvent.cpp:
(WebCore::CustomEvent::trySerializeDetail):
* dom/ErrorEvent.cpp:
(WebCore::ErrorEvent::trySerializeError):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::trySerializeData):
* dom/PopStateEvent.cpp:
(WebCore::PopStateEvent::trySerializeState):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/Worker.cpp:
(WebCore::Worker::postMessage):

LayoutTests:

This adds tests that ensure that SABs behave correctly (are either cloned or shared)
depending on context, and that we currently share SABs whether they are in the transfer
list or not. This also adds tests for SABs being passed around via more complicated
data structures.

* workers/sab/multi-memory-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer-expected.txt: Added.
* workers/sab/multi-memory-multi-buffer.html: Added.
* workers/sab/multi-memory-worker-1.js: Added.
(onmessage):
* workers/sab/multi-memory-worker-2.js: Added.
(onmessage):
* workers/sab/multi-memory.html: Added.
* workers/sab/no-transfer-expected.txt: Added.
* workers/sab/no-transfer.html: Added.
* workers/sab/postMessage-clones-expected.txt: Added.
* workers/sab/postMessage-clones.html: Added.
* workers/sab/sab-creator-no-transfer.js: Added.
* workers/sab/sab-creator-transfer.js: Added.
* workers/sab/sent-from-worker-no-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-no-transfer.html: Added.
* workers/sab/sent-from-worker-transfer-expected.txt: Added.
* workers/sab/sent-from-worker-transfer.html: Added.
* workers/sab/worker-resources.js:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 02:35:51 +0000 (02:35 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

3 years agoFix iOS and El Capitan builds of libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 02:35:01 +0000 (02:35 +0000)]
Fix iOS and El Capitan builds of libwebrtc.

* Configurations/libwebrtc.xcconfig:
Skip building audio_mixer_manager_mac.cc on iOS.
* libwebrtc.xcodeproj/project.pbxproj:
El Capitan doesn't like the SSE4 optimizations in opus.
Just don't include them for now.

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

3 years agoUnreviewed build fix after r212025.
bfulgham@apple.com [Fri, 10 Feb 2017 02:34:17 +0000 (02:34 +0000)]
Unreviewed build fix after r212025.

inDocument -> isConnected

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):

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

3 years agoMake sure Event keeps its current target element alive
bfulgham@apple.com [Fri, 10 Feb 2017 02:21:09 +0000 (02:21 +0000)]
Make sure Event keeps its current target element alive
https://bugs.webkit.org/show_bug.cgi?id=167885
<rdar://problem/30376972>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Brent Fulgham.

Source/WebCore:

Make sure Event keeps its current target element alive to avoid
crashes if it is accessed by JS after it has been garbage collected.

Test: fast/events/currentTarget-gc-crash.html

* dom/Event.cpp:
(WebCore::Event::setCurrentTarget):
* dom/Event.h:
(WebCore::Event::currentTarget):

LayoutTests:

Add layout test reproducing the crash.

* fast/events/currentTarget-gc-crash-expected.txt: Added.
* fast/events/currentTarget-gc-crash.html: Added.

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

3 years agoCrash in render tree after dynamically mutating the slot value
bfulgham@apple.com [Fri, 10 Feb 2017 02:19:04 +0000 (02:19 +0000)]
Crash in render tree after dynamically mutating the slot value
https://bugs.webkit.org/show_bug.cgi?id=167502

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2017-02-09
Reviewed by Antti Koivisto.

Source/WebCore:

The crash was caused by attributeChanged not destructing the render tree after an assigned element had been
removed from its slot. Since the style resolver can no longer find this element in the flat tree, we need to
delete its render object as if the element had been removed from the DOM tree.

Tests: fast/html/details-summary-slot.html
       fast/shadow-dom/shadow-slot-attribute-change-crash.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged):
* html/HTMLSummaryElement.cpp:
(WebCore::SummarySlotElement): Added. Always use the default slot regardless of the slot attribute's value.
(WebCore::HTMLSummaryElement::create): Use SummarySlotElement

LayoutTests:

Added regression tests for the crash, and one for assigning non-empty slot value to a child
of a summary element. The slot attribute should always be ignored since the fact summary
element has its own shadow tree is an implementation detail that should never be exposed.

* fast/html/details-summary-slot-expected.html: Added.
* fast/html/details-summary-slot.html: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash-expected.txt: Added.
* fast/shadow-dom/shadow-slot-attribute-change-crash.html: Added.

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

3 years agoDetails element doesn't work correctly when mutating content between closing and...
bfulgham@apple.com [Fri, 10 Feb 2017 02:17:05 +0000 (02:17 +0000)]
Details element doesn't work correctly when mutating content between closing and opening
https://bugs.webkit.org/show_bug.cgi?id=167310

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: fast/html/details-close-modify-open.html
       fast/shadow-dom/slot-remove-mutate-add.html

* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::didChangeSlot):

    Always reset the slot assignment when content is mutated.

LayoutTests:

* fast/html/details-close-modify-open-expected.html: Added.
* fast/html/details-close-modify-open.html: Added.
* fast/shadow-dom/slot-remove-mutate-add-expected.html: Added.
* fast/shadow-dom/slot-remove-mutate-add.html: Added.

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

3 years agoCrash under FormSubmission::create()
bfulgham@apple.com [Fri, 10 Feb 2017 02:15:02 +0000 (02:15 +0000)]
Crash under FormSubmission::create()
https://bugs.webkit.org/show_bug.cgi?id=167200
<rdar://problem/30096323>

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Darin Adler.

Source/WebCore:

The issue is that FormSubmission::create() was iterating over
form.associatedElements() as was calling Element::appendFormData()
in the loop. HTMLObjectElement::appendFormData() was calling
pluginWidget(PluginLoadingPolicy::Load) which causes a synchronous
layout and can fire events (such as focus event) synchronously.
Firing those events synchronously allows the JS to modify the
form.associatedElements() vector we are currently iterating on.

To avoid this issue, we now call pluginWidget(PluginLoadingPolicy::DoNotLoad)
in HTMLObjectElement::appendFormData() as we are not allowed to fire
synchronous events at this point. I also added a security assertion
in FormSubmission::create() to catch cases where we fire JS events
while iterating over the form associated elements to more easily
notice these things in the future.

Test: fast/forms/formsubmission-appendFormData-crash.html

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::appendFormData):
* loader/FormSubmission.cpp:
(WebCore::FormSubmission::create):

LayoutTests:

Add layout test coverage.

* fast/forms/formsubmission-appendFormData-crash-expected.txt: Added.
* fast/forms/formsubmission-appendFormData-crash.html: Added.

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

3 years agoCrash under HTMLFormElement::registerFormElement()
bfulgham@apple.com [Fri, 10 Feb 2017 02:13:07 +0000 (02:13 +0000)]
Crash under HTMLFormElement::registerFormElement()
https://bugs.webkit.org/show_bug.cgi?id=167162

Patch by Chris Dumez <cdumez@apple.com> on 2017-02-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

didMoveToNewDocument() was re-registering FormAttributeTargetObserver
even if the element's inDocument was not set yet. As a result, it was
possible for FormAssociatedElement::resetFormOwner() to be called
when the element was in the tree but with its inDocument still being
false (because insertedInto() has not been called yet). This could
end up calling HTMLFormElement::registerFormElement() even though
the element is still recognized as detached. This is an issue because
HTMLFormElement::m_associatedElements's order and its corresponding
indexes (m_associatedElementsBeforeIndex / m_associatedElementsAfterIndex)
rely on the position of the element with regards to the form element
(before / inside / after).

To address the issue, we now only register the FormAttributeTargetObserver
in didMoveToNewDocument() if the inDocument flag is set to true. This
is similar to what is done at other call sites of
resetFormAttributeTargetObserver(). We also ignore the form content
attribute in HTMLFormElement::formElementIndex() if the element is
not connected.

As per the HTML specification [1], the form content attribute is only
taken if the element is connected (i.e. inDocument flag is true).

Note that FormAssociatedElement::findAssociatedForm() was already
ignoring the form content attribute if the element is disconnected.

[1] https://html.spec.whatwg.org/#reset-the-form-owner (step 3)

Test: fast/forms/registerFormElement-crash.html

* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::didMoveToNewDocument):
Only call resetFormAttributeTargetObserver() if inDocument flag is set,
similarly to what is done at other call sites.

(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
Add an assertion to make sure no one call this method on an element that
is not connected.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::formElementIndex):
Ignore the form content attribute if the element is not connected, as
per the HTML specification [1].

LayoutTests:

Add layout test coverage.

* fast/forms/registerFormElement-crash-expected.txt: Added.
* fast/forms/registerFormElement-crash.html: Added.

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

3 years agoTear down existing renderers when adding a shadow root.
bfulgham@apple.com [Fri, 10 Feb 2017 02:11:28 +0000 (02:11 +0000)]
Tear down existing renderers when adding a shadow root.
https://bugs.webkit.org/show_bug.cgi?id=167117

Patch by Antti Koivisto <antti@apple.com> on 2017-02-09
Reviewed by Andreas Kling.

Source/WebCore:

Adding a shadow root may cause children no longer be part of the flat tree. If they had renderers
tear down code would no longer reach them.

Test: fast/shadow-dom/attach-shadow-teardown.html

* dom/Element.cpp:
(WebCore::Element::addShadowRoot):

    Tear down existing render tree when adding a shadow root.

LayoutTests:

* fast/shadow-dom/attach-shadow-teardown-expected.txt: Added.
* fast/shadow-dom/attach-shadow-teardown.html: Added.

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

3 years agoHandle synchronous layout when setting a selection range
bfulgham@apple.com [Fri, 10 Feb 2017 02:09:25 +0000 (02:09 +0000)]
Handle synchronous layout when setting a selection range
https://bugs.webkit.org/show_bug.cgi?id=167092
<rdar://problem/30041640>

Reviewed by Antti Koivisto.

Source/WebCore:

The 'innerTextElement' of a form control can change during layout due
to arbitrary JavaScript executing. Handle the case where the inner text
element has changed so that current render box height is while setting
a selection range.

Test: fast/forms/input-type-change-during-selection.html

* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):

LayoutTests:

* fast/forms/input-type-change-during-selection-expected.txt: Added.
* fast/forms/input-type-change-during-selection.html: Added.

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

3 years agoB3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
bfulgham@apple.com [Fri, 10 Feb 2017 02:07:18 +0000 (02:07 +0000)]
B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
https://bugs.webkit.org/show_bug.cgi?id=167437
<rdar://problem/30198083>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.

Source/JavaScriptCore:

* b3/B3Procedure.cpp:
(JSC::B3::Procedure::deleteOrphans):

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

3 years agoSloppy mode: We don't properly hoist functions names "arguments" when we have a non...
bfulgham@apple.com [Fri, 10 Feb 2017 02:02:30 +0000 (02:02 +0000)]
Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
https://bugs.webkit.org/show_bug.cgi?id=167319
<rdar://problem/30149432>

Patch by Saam Barati <sbarati@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
(assert):
(assert.arguments):
(assert.b):
(x.arguments):
(x.b):
(x):

Source/JavaScriptCore:

When hoisting a function inside sloppy mode, we were assuming all "var"s are inside
what we call the "var" SymbolTableEntry. This was almost true, execpt for "arguments",
which has sufficiently weird behavior. "arguments" can be visible to the default
parameter expressions inside a function, therefore can't go inside the "var"
SymbolTableEntry since the parameter SymbolTableEntry comes before the "var"
SymbolTableEntry in the scope chain.  Therefore, if we hoist a function named
"arguments", then we must also look for that variable inside the parameter scope
stack entry.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):

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

3 years agoUnreviewed, fix test for new .caller with native code caller semantics.
keith_miller@apple.com [Fri, 10 Feb 2017 01:55:30 +0000 (01:55 +0000)]
Unreviewed, fix test for new .caller with native code caller semantics.

* js/dom/function-dot-arguments-and-caller.html:

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

3 years agoFix max length check in ArrayPrototype.js' concatSlowPath().
bfulgham@apple.com [Fri, 10 Feb 2017 01:54:24 +0000 (01:54 +0000)]
Fix max length check in ArrayPrototype.js' concatSlowPath().
https://bugs.webkit.org/show_bug.cgi?id=167270
<rdar://problem/30128133>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo.

JSTests:

* stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
* stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.

Source/JavaScriptCore:

1. Fixed concatSlowPath() to ensure that the result array length does not exceed
   @MAX_ARRAY_INDEX.  The old code was checking against @MAX_SAFE_INTEGER in some
   cases, but this is overly permissive.

2. Changed concatSlowPath() to throw a RangeError instead of a TypeError to be
   consistent with the C++ runtime functions in JSArray.cpp.

3. Changed the RangeError message in concatSlowPath() and JSArray.cpp to "Length
   exceeded the maximum array length" when the error is that the result length
   exceeds MAX_ARRAY_INDEX.  We do this for 2 reasons:
   a. "Length exceeded the maximum array length" is more informative than
      "Invalid array length".
   b. We want to use the same string consistently for the same error.

   There are still 2 places in JSArray.cpp that still throws a RangeError with
   message "Invalid array length".  In those cases, the error is not necessarily
   due to the result length exceeding MAX_ARRAY_INDEX, but is due to attempting to
   set a length value that is not an integer that fits in MAX_ARRAY_INDEX e.g.
   an attempt to set a fractional length value.  Hence, "Invalid array length" is
   appropriate for those cases.

4. Fixed JSArray::appendMemcpy() to handle overflows when computing the result
   array length.

* builtins/ArrayPrototype.js:
(concatSlowPath):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/ArrayPrototype.cpp:
(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncAppendMemcpy):
* runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::push):

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

3 years agoConstructed object's global object should be the global object of the constructor.
bfulgham@apple.com [Fri, 10 Feb 2017 01:39:13 +0000 (01:39 +0000)]
Constructed object's global object should be the global object of the constructor.
https://bugs.webkit.org/show_bug.cgi?id=167121
<rdar://problem/30054759>

Patch by Mark Lam <mark.lam@apple.com> on 2017-02-09
Reviewed by Filip Pizlo and Geoffrey Garen.

Source/JavaScriptCore:

The realm (i.e. globalObject) of any object should be the same as the constructor
that instantiated the object.  Changed PrototypeMap::createEmptyStructure() to
be passed the correct globalObject to use instead of assuming it's the same one
as the prototype object.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::initialize):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::initializeObjectAllocationProfile):
* runtime/FunctionRareData.h:
(JSC::FunctionRareData::createInternalFunctionAllocationStructureFromBase):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::createSubclassStructure):
* runtime/IteratorOperations.cpp:
(JSC::createIteratorResultObjectStructure):
* runtime/JSBoundFunction.cpp:
(JSC::getBoundFunctionStructure):
* runtime/JSFunction.cpp:
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setTarget):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
* runtime/PrototypeMap.cpp:
(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):
* runtime/PrototypeMap.h:

LayoutTests:

* http/tests/security/xssAuditor/regress-167121-expected.txt: Added.
* http/tests/security/xssAuditor/regress-167121.html: Added.

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

3 years agoDon't build libwebrtc.
achristensen@apple.com [Fri, 10 Feb 2017 01:33:43 +0000 (01:33 +0000)]
Don't build libwebrtc.

* Scripts/build-webkit:
Not ready yet.  It broke El Capitan and iOS.

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

3 years agoFix CMake build.
achristensen@apple.com [Fri, 10 Feb 2017 01:27:38 +0000 (01:27 +0000)]
Fix CMake build.

* PlatformMac.cmake:

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

3 years agoREGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending...
cdumez@apple.com [Fri, 10 Feb 2017 01:23:30 +0000 (01:23 +0000)]
REGRESSION: LayoutTest http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161650

Reviewed by Alexey Proskuryakov.

Make sure we clear the memory cache before trigerring new loads as this
test is meant to cover the disk cache.

* http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html:
* platform/mac/TestExpectations:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Fri, 10 Feb 2017 01:11:20 +0000 (01:11 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:

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

3 years agoMark inspector/model/remote-object-weak-collection.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 10 Feb 2017 01:07:35 +0000 (01:07 +0000)]
Mark inspector/model/remote-object-weak-collection.html as a flaky timeout.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoWe should not allow Function.caller to be used on native functions
bfulgham@apple.com [Fri, 10 Feb 2017 00:59:15 +0000 (00:59 +0000)]
We should not allow Function.caller to be used on native functions
https://bugs.webkit.org/show_bug.cgi?id=165628

Patch by Keith Miller <keith_miller@apple.com> on 2017-02-09
Reviewed by Mark Lam.

JSTests:

* stress/caller-native-code.js: Added.
(f):

Source/JavaScriptCore:

Also remove unneeded dynamic cast.

* runtime/JSFunction.cpp:
(JSC::RetrieveCallerFunctionFunctor::RetrieveCallerFunctionFunctor):
(JSC::JSFunction::callerGetter):

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

3 years agoMark pointer-lock/mouse-event-delivery.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:49:12 +0000 (00:49 +0000)]
Mark pointer-lock/mouse-event-delivery.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167965

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark inspector/worker/resources-in-worker.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:46:02 +0000 (00:46 +0000)]
Mark inspector/worker/resources-in-worker.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168091

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark inspector/debugger/breakpoint-columns.html as a flaky timeout.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:42:00 +0000 (00:42 +0000)]
Mark inspector/debugger/breakpoint-columns.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=168090

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html as flaky.
ryanhaddad@apple.com [Fri, 10 Feb 2017 00:41:58 +0000 (00:41 +0000)]
Mark fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167186

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoFix warnings in libwebrtc build
achristensen@apple.com [Fri, 10 Feb 2017 00:37:04 +0000 (00:37 +0000)]
Fix warnings in libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168088

Reviewed by Youenn Fablet.

* Source/third_party/opus/src/src/opus_decoder.c:
Silence a warning.  Debug builds of opus can be slow.  No big deal.
* libwebrtc.xcodeproj/project.pbxproj:
More sdk files need ARC.

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

3 years agoTransition "WebKit Library Version" checks to SDK version checks.
beidson@apple.com [Fri, 10 Feb 2017 00:21:11 +0000 (00:21 +0000)]
Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

When doing linkedOnOrAfter checks, relying solely on the WebKit library version number is error prone,
since apps may not link against WebKit directly and therefore the linked WebKit is unknown.

We should first prefer a version check on the SDK that the app was built with.

If that check fails, we can fallback to the linked WebKit library version number if it exists.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

For each "linked-on-or-after" feature, include both the WebKit library version and SDK version:
* UIProcess/Cocoa/VersionChecks.h:
(WebKit::linkedOnOrAfter):
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):
(WebKit::linkTimeVersion): Deleted.

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

Source/WTF:

* wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.

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

3 years agoDisconnect shadow children of root when detaching a frame
bfulgham@apple.com [Fri, 10 Feb 2017 00:10:14 +0000 (00:10 +0000)]
Disconnect shadow children of root when detaching a frame
https://bugs.webkit.org/show_bug.cgi?id=166851
<rdar://problem/29930443>

Reviewed by Andy Estes.

Source/WebCore:

If the root of the tree we are disconnecting has a shadow element, include it in the set of
things to disconnect.

Tests: fast/shadow-dom/shadow-at-root-during-disconnect.html

* dom/ContainerNodeAlgorithms.cpp:
(WebCore::disconnectSubframes):

LayoutTests:

* fast/shadow-dom/resources/start.html: Added.
* fast/shadow-dom/shadow-at-root-during-disconnect-expected.txt: Added.
* fast/shadow-dom/shadow-at-root-during-disconnect.html: Added.

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

3 years agoRename isAppleMacWebKit to isAppleCocoaWebKit
commit-queue@webkit.org [Thu, 9 Feb 2017 23:46:56 +0000 (23:46 +0000)]
Rename isAppleMacWebKit to isAppleCocoaWebKit
https://bugs.webkit.org/show_bug.cgi?id=168075

Patch by Alex Christensen <achristensen@webkit.org> on 2017-02-09
Reviewed by Geoffrey Garen.

It returns true for Mac and iOS.  "isAppleMacWebKit" is confusing and wrong.

* Scripts/build-api-tests:
* Scripts/build-dumprendertree:
* Scripts/build-jsc:
(buildMyProject):
* Scripts/build-layouttestrelay:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/run-api-tests:
(isSupportedPlatform):
(runTest):
(listAllTests):
(prepareEnvironmentForRunningTestTool):
* Scripts/run-content-extension-tester:
* Scripts/run-javascriptcore-tests:
* Scripts/run-minibrowser:
* Scripts/show-pretty-diff:
* Scripts/webkitdirs.pm:
(determineBaseProductDir):
(determineArchitecture):
(determinePassedArchitecture):
(safariPath):
(builtDylibPathForName):
(checkFrameworks):
(isAppleWebKit):
(isAppleCocoaWebKit):
(determineNmPath):
(launcherName):
(wrapperPrefixIfNeeded):
(isCMakeBuild):
(mobileSafariBundle):
(debugSafari):
(runSafari):
(runMiniBrowser):
(debugMiniBrowser):
(runWebKitTestRunner):
(debugWebKitTestRunner):
(isAppleMacWebKit): Deleted.
* Scripts/webkitperl/FeatureList.pm:

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

3 years agoMark http/tests/contentextensions/async-xhr-onerror.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:39:58 +0000 (23:39 +0000)]
Mark http/tests/contentextensions/async-xhr-onerror.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168081

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark http/tests/contentextensions/invalid-selector.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:36:48 +0000 (23:36 +0000)]
Mark http/tests/contentextensions/invalid-selector.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168082

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark http/tests/security/credentials-iframes.html as failing on ios-simulator.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:28:46 +0000 (23:28 +0000)]
Mark http/tests/security/credentials-iframes.html as failing on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=167967

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoMark fast/css-grid-layout/grid-simplified-layout-positioned.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 23:18:43 +0000 (23:18 +0000)]
Mark fast/css-grid-layout/grid-simplified-layout-positioned.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=167538

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoRevert r211991
achristensen@apple.com [Thu, 9 Feb 2017 22:06:31 +0000 (22:06 +0000)]
Revert r211991
https://bugs.webkit.org/show_bug.cgi?id=168062

* Scripts/build-webkit:
Not quite ready yet.

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Thu, 9 Feb 2017 21:48:21 +0000 (21:48 +0000)]
Build libwebrtc on bots without using it yet
​https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

* Scripts/build-webkit:
Build libwebrtc on Mac when we build ANGLE.

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

3 years agoUnreviewed, rolling out r211980 and r211987.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:47:14 +0000 (21:47 +0000)]
Unreviewed, rolling out r211980 and r211987.
https://bugs.webkit.org/show_bug.cgi?id=168072

Caused API test WebKit2.DuplicateCompletionHandlerCalls to
fail (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Transition "WebKit Library Version" checks to SDK version
checks."
https://bugs.webkit.org/show_bug.cgi?id=168056
http://trac.webkit.org/changeset/211980

"Build fix for APPLE_INTERNAL_SDK builds after r211980."
http://trac.webkit.org/changeset/211987

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-09

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

3 years agoRemove unused WebThreadRunSync
ap@apple.com [Thu, 9 Feb 2017 21:34:19 +0000 (21:34 +0000)]
Remove unused WebThreadRunSync
https://bugs.webkit.org/show_bug.cgi?id=168024

Reviewed by Tim Horton.

Source/WebCore:

* platform/ios/wak/WebCoreThreadRun.cpp:
* platform/ios/wak/WebCoreThreadRun.h:
* platform/ios/wak/WebCoreThreadSystemInterface.cpp:
(InitWebCoreThreadSystemInterface):

Source/WTF:

* wtf/ios/WebCoreThread.cpp:
* wtf/ios/WebCoreThread.h:

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

3 years agoBuild libwebrtc on bots without using it yet
achristensen@apple.com [Thu, 9 Feb 2017 21:33:24 +0000 (21:33 +0000)]
Build libwebrtc on bots without using it yet
https://bugs.webkit.org/show_bug.cgi?id=168062

Reviewed by Brent Fulgham.

.:

* Source/Makefile:

Source/ThirdParty:

* Makefile:

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

3 years agoBuild fix for APPLE_INTERNAL_SDK builds after r211980.
beidson@apple.com [Thu, 9 Feb 2017 21:32:31 +0000 (21:32 +0000)]
Build fix for APPLE_INTERNAL_SDK builds after r211980.

Unreviewed.

* wtf/spi/darwin/dyldSPI.h:

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

3 years agoUnreviewed, rolling out r211802.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:31:35 +0000 (21:31 +0000)]
Unreviewed, rolling out r211802.

This change caused fast/regions/inline-block-inside-anonymous-
overflow-with-covered-controls.html to be a flaky failure.

Reverted changeset:

"[Modern Media Controls] Improve handling of <video> with only
audio tracks"
https://bugs.webkit.org/show_bug.cgi?id=167836
http://trac.webkit.org/changeset/211802

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

3 years agoMark http/tests/media/track-in-band-hls-metadata-crash.html as a flaky timeout.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:20:44 +0000 (21:20 +0000)]
Mark http/tests/media/track-in-band-hls-metadata-crash.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=167749

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMark two scroll-snap tests as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:20:41 +0000 (21:20 +0000)]
Mark two scroll-snap tests as flaky.

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark inspector/unit-tests/heap-snapshot.html as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:11:26 +0000 (21:11 +0000)]
Mark inspector/unit-tests/heap-snapshot.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168065

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMark two performance-api tests as flaky.
ryanhaddad@apple.com [Thu, 9 Feb 2017 21:11:24 +0000 (21:11 +0000)]
Mark two performance-api tests as flaky.

Unreviewed test gardening.

* TestExpectations:

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

3 years agoFix i386 libwebrtc build
achristensen@apple.com [Thu, 9 Feb 2017 21:10:15 +0000 (21:10 +0000)]
Fix i386 libwebrtc build
https://bugs.webkit.org/show_bug.cgi?id=168038

* Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h:
DataChannelInterface::buffered_amount returns a uint64_t, and we want a size_t.
If this overflows, then we've run out of memory and crashed a long time ago.

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

3 years agoTransition "WebKit Library Version" checks to SDK version checks.
beidson@apple.com [Thu, 9 Feb 2017 20:37:34 +0000 (20:37 +0000)]
Transition "WebKit Library Version" checks to SDK version checks.
<rdar://problem/30313696> and https://bugs.webkit.org/show_bug.cgi?id=168056

Reviewed by Geoffrey Garen.

Source/WebKit2:

Library version linkedOnOrAfter checks are error prone since apps may not link directly to WebKit.

We always know what version of the SDK an app was built with, so we should use SDK version checks
whenever possible.

* Shared/Cocoa/CompletionHandlerCallChecker.mm:
(WebKit::shouldThrowExceptionForDuplicateCompletionHandlerCall):

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):

Add SDKVersion form of the linkedOnOrAfter check, and transition over the current Library Version checks:
* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/Cocoa/VersionChecks.mm:
(WebKit::linkedOnOrAfter):

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

Source/WTF:

* wtf/spi/darwin/dyldSPI.h: Add entries for the iOS 10.3, macOS 10.11, and macOS 10.12.4 SDKs.

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

3 years agoDocument::settings() should return a const Settings&.
akling@apple.com [Thu, 9 Feb 2017 20:32:27 +0000 (20:32 +0000)]
Document::settings() should return a const Settings&.
<https://webkit.org/b/168061>

Reviewed by Geoffrey Garen.

- Make Document::settings() return a const reference.
- Added Document::mutableSettings() for all your non-const needs.
- Fixed up settings generator to produce const getters.
- Simplify a few settings() call sites that exposed themselves.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::shouldDiscloseApplePayCapability):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::canCallGetUserMedia):
* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::appendSources):
* css/CSSFontSelector.cpp:
(WebCore::resolveGenericFamily):
* css/StyleResolver.h:
(WebCore::StyleResolver::settings):
* dom/Document.h:
(WebCore::Document::settings):
(WebCore::Document::mutableSettings):
* html/FTPDirectoryDocument.cpp:
(WebCore::createTemplateDocumentData):
* html/HTMLCanvasElement.cpp:
(WebCore::shouldEnableWebGL):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowContentSecurityPolicySourceStarToMatchAnyProtocol):
* page/make_settings.pl:
(printGetterAndSetter):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::toggleSimpleLineLayout):

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