WebKit-https.git
3 years agoEnable URLParser by default
achristensen@apple.com [Tue, 11 Oct 2016 20:27:39 +0000 (20:27 +0000)]
Enable URLParser by default
https://bugs.webkit.org/show_bug.cgi?id=162660
<rdar://28601706>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/src-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure-expected.txt:
These tests need more investigation.  See https://bugs.webkit.org/show_bug.cgi?id=163127
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-setters-expected.txt:
Many more tests pass.  Hooray!

Source/WebCore:

Covered by updates to many LayoutTests.

* platform/URLParser.cpp:
Make the default value true for URLParser::enabled.
This is the most impactful and well-documented one-line change I've ever written.

LayoutTests:

Many failing tests are now passing.

The tests in fast/url look like they are an old test suite, some of which we were failing.
We now pass many more of the tests.  Those results are updated.
Some URLs in the suite are invalid, and we now "fail" those tests.  Rather than update the
tests, I just changed the expectation to FAIL, which seems to be tolerable in this directory
because there were many tests whose result was FAIL.  Each such case is explained below.

* fast/dom/DOMURL/parsing-expected.txt:
* fast/dom/DOMURL/parsing.html:
Percent-encoded values in the host are supposed to be decoded according to the spec.
%2f decodes to '/' which is an invalid domain character.

* fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hash.html:
Added a space to the domain (which is an invalid domain character and the others in this
test are not according to the spec) in order to continue to test that setting the hash of
an invalid URL does not change its href.

* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
* fast/dom/DOMURL/set-href-attribute-protocol.html:
* fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-protocol.html:
"http:??bar" now canonicalizes to "http://??bar" instead of adding one slash.

* fast/url/file-expected.txt:
* fast/url/file-http-base-expected.txt:
Updated results.  Many tests that were failing are now passing.

* fast/url/anchor-expected.txt:
Percent-encoding of non-ASCII characters in fragments now matches Firefox.

* fast/url/host-expected.txt:
Wide characters in the host such as http://%ef%bc%85%ef%bc%90%ef%bc%90.com/ should fail to parse.
This matches Chrome and the spec.
URLs with an empty host with a port should fail to parse.
This matches Chrome, Firefox, and the spec.

* fast/url/host-lowercase-per-scheme-expected.txt:
According to spec, hosts of non-special URLs should be parsed the same as special URL hosts.
Different browsers seem to have the existing behavior for different reasons.
See https://github.com/whatwg/url/issues/148 and https://bugs.webkit.org/show_bug.cgi?id=162885

* fast/url/idna2003-expected.txt:
* fast/url/invalid-urls-utf8-expected.txt:
Host encoding is now done according to the spec.

* fast/url/invalid-idn-expected.txt:
Neither Chrome, Firefox, nor the spec change invalid hosts to about:blank.

* fast/url/ipv4-expected.txt:
* fast/url/ipv6-expected.txt:
"http://[0:0::0:0:8:]/" should indeed be compressed to "http://[::8]/"
This kind of deterministic compression makes it so that two IPv6 addresses that are equal will
parse to URLs that are also equal, even if they are written differently.

* fast/url/path-expected.txt:
* fast/url/relative-expected.txt:
* fast/url/relative-win-expected.txt:
* fast/url/safari-extension-expected.txt:
Proper canonicalization of non-special hosts should be scheme://host/ or scheme:/// if there is no host.
safari-extension is not special.
Hosts should always be canonicalized to lowercase.

* fast/url/segments-expected.txt:
* fast/url/segments-from-data-url-expected.txt:
The path of "foo://" should be "/" not "//".
Extra slashes immediately after scheme:// should be ignored.
URLs with no host but a port like "http:@:80/www.apple.com" are now invalid, matching Chrome, Firefox, and the spec.

* fast/url/segments-userinfo-vs-host-expected.txt:
'@' can be in the user.  If it is, it is percent encoded.  This matches Chrome and Firefox.
"foo://" has a path of "/" not "//"
Extra slashes after the scheme such as in "foo://///////" are now ignored according to spec.

* fast/url/standard-url-expected.txt:
* fast/url/tab-and-newline-stripping-expected.txt:
http://[2001:5::042:44::0370:7334]/ is an invalid IPv6 address, so parsing it should fail.
It passed with URL::parse because we used to only check that the characters inside the []
were valid ipv6 characters, not that they made any sense or were in any kind of bounds.

* fast/url/url-credentials-escaping-expected.txt:
Credential encoding is now according to spec.

* http/tests/appcache/resources/x-frame-options-prevents-framing-test.html:
http:/path1/path2 relative to http://host/path3 now canonicalizes to http://host/path1/path2
instead of http://path1/path2 so this test, which I believe was missing the second slash in error,
needs to be fixed.

* imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
Having a '}' in the host of a URL used to be invalid and it is now percent-escaped, matching Chrome and the spec.
This test still passes on w3c-test.org.  We can look into why it is failing locally later.
See webkit.org/b/163127

* fast/loader/redirect-to-invalid-url-using-javascript-calls-policy-delegate-expected.txt:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-calls-policy-delegate-expected.txt:
* fast/loader/window-open-to-invalid-url-calls-policy-delegate-expected.txt:
http://HoSt is now being correctly interpreted as the host, and it is being punycode encoded if it's
non-ASCII and lowercased if it is.

* fast/forms/ValidityState-typeMismatch-url.html:
* fast/forms/ValidityState-typeMismatch-url-expected.txt:
Spaces in the host are invalid.  This matches Firefox and the spec.

* http/tests/inspector/network/copy-as-curl.html:
'{' and '}' are now percent encoded in the URL path.  This matches Firefox, Chrome, and the spec.

* fast/loader/location-port.html:
* fast/loader/location-port-expected.txt:
parsing or setting ports in URLs with no host is no longer supported.  This matches Firefox and Chrome.

* security/block-test-expected.txt:
* platform/mac/security/block-test-expected.txt:
out-of-bounds ports now cause parsing failures.

* imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure-expected.txt:
"http://[]/" now fails to parse because it is an invalid IPv6 host.

* fast/url/ipv6-expected.txt:
IPv4 addresses at the end of IPv6 addresses are now serialized as the equivalent hex value in IPv6 form.
This matches Chrome and the spec, and makes it so that equal IPv6 addresses written in different forms are equal.

* fast/loader/url-parse-1-expected.txt:
Extra or missing slashes and spaces around scheme:// are now handled according to the spec.

* http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt:
The non-standard apple logo character is represented here by its non-standard Latin1 representation, 0xF0.
It was encoded as 0xF0 UTF-8 then percent encoded, which is %EF%A3%BF.
It is now encoded as the UTF-8 then percent encoded representation of its unicode value, 0xF8FF which matches other browsers.
This test is still valid, because it still verifies that the URLs in r199590 are rejected, and they still are.
See webkit.org/b/163127

* http/tests/contentextensions/make-https-expected.txt:
* contentfiltering/block-after-add-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-add-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-response-then-allow-unblock-expected.txt:
* contentfiltering/block-after-response-then-deny-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-then-allow-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-then-deny-unblock-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize.html:
* fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt:
* fast/backgrounds/background-shorthand-with-backgroundSize-style.html:
* fast/css/getComputedStyle/computed-style-border-image-expected.txt:
* fast/css/getComputedStyle/computed-style-border-image.html:
* fast/css/getComputedStyle/computed-style-cross-fade-expected.txt:
* fast/css/getComputedStyle/computed-style-cross-fade.html:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand.html:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html:
URLs with non-special schemes and no slash after the host now do when canonicalized.

* fast/css-generated-content/malformed-url.html:
This tested what happens when you have an invalid host.  | is now a valid host character.
I changed it to have a % in the host to test the same behavior.

* fast/loader/window-open-to-invalid-url-disallowed.html:
* fast/loader/window-open-to-invalid-url-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html:
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt:
"http://a=a&b=b" is no longer an invalid URL.  We used to consider the '&' character to be an invalid domain character
and we don't any more.  This matches Chrome, Firefox, and the spec.
To keep this test testing what happens if you have an invalid URL, I changed the '&' to a '%' which is an invalid domain character.

* fast/loader/file-URL-with-port-number.html:
File URLs with a port but no host are now invalid, matching Chrome and Firefox.  File URLs with a port and a host are Ok, though.

* platform/ios-simulator-wk1/fast/loader: Added.
* platform/ios-simulator-wk1/fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt: Added.
* platform/ios-simulator-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt: Added.
* platform/ios-simulator-wk1/fast/loader/window-open-to-invalid-url-disallowed-expected.txt: Added.
* platform/ios-simulator-wk1/imported/w3c/web-platform-tests/XMLHttpRequest: Added.
* platform/ios-simulator-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt: Added.
* platform/mac-wk1/fast/loader: Added.
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt: Added.
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt: Added.
* platform/mac-wk1/fast/loader/window-open-to-invalid-url-disallowed-expected.txt: Added.
* platform/mac-wk1/imported: Added.
* platform/mac-wk1/imported/w3c: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt: Added.
* platform/mac/security/block-test-expected.txt:
Differences between the URLParser and NSURL's parser cause differences in output for WK1 where NSURLRequests are made without serializing WebCore::ResourceRequests.
In particular, '{' in the host is newly accepted as a valid URL by URLParser, but it is percent-encoded by NSURL's parser.
See rdar://problem/28701914

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

3 years agoUpdate my name in contributors.json
commit-queue@webkit.org [Tue, 11 Oct 2016 20:23:47 +0000 (20:23 +0000)]
Update my name in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=163251

Patch by Edward O'Connor <eoconnor@apple.com> on 2016-10-11
Reviewed by Simon Fraser.

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

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

3 years agoREGRESSION (r198251): -[UIWebView mediaPlaybackRequiresUserAction] defaults to NO
dbates@webkit.org [Tue, 11 Oct 2016 20:18:27 +0000 (20:18 +0000)]
REGRESSION (r198251): -[UIWebView mediaPlaybackRequiresUserAction] defaults to NO
https://bugs.webkit.org/show_bug.cgi?id=163259
<rdar://problem/28680515>

Reviewed by Jer Noble.

In WebKit1 on iOS we want to require user action to load and play videos by default and
allow an embedding app to change this behavior via -[UIWebView setMediaPlaybackRequiresUserAction:].
Following r198251, -[UIWebView mediaPlaybackRequiresUserAction] defaults to NO and videos
can load and play without being initiated by a user action.

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Initialize the default value of the deprecated preference
WebKitRequiresUserGestureForMediaPlaybackPreferenceKey to YES on iOS. The value of this
preference takes precedence over the values of its replacement preferences
WebKitRequiresUserGestureForVideoPlaybackPreferenceKey and WebKitRequiresUserGestureForAudioPlaybackPreferenceKey.

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

3 years ago[iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
dbates@webkit.org [Tue, 11 Oct 2016 20:17:58 +0000 (20:17 +0000)]
[iOS] REGRESSION (r197953): User gesture required to load video in iOS 9-built apps
https://bugs.webkit.org/show_bug.cgi?id=163244
<rdar://problem/27250015>

Reviewed by Jer Noble.

Source/WebCore:

Adds a new setting to toggle requiring a user gesture to load a video (enabled by default).
Disable this setting for apps built against iOS 9 or earlier.

Tests: media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html
       media/require-user-gesture-to-load-video.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Only require a user gesture to load a video
when Settings::requiresUserGestureToLoadVideo() is true.
* page/Settings.cpp: Enable setting requiresUserGestureToLoadVideo by default.
* page/Settings.in: Add setting, requiresUserGestureToLoadVideo.

Source/WebKit/mac:

Enable or disable the Setting::requiresUserGestureToLoadVideo() in legacy WebKit depending
on the version of iOS SDK that the app was linked against. We require a user gesture to
begin loading a video as of iOS 10.

* WebView/WebView.mm:
(shouldRequireUserGestureToLoadVideo):
(-[WebView _preferencesChanged:]): Modified to pass the WebKit requiresUserGestureToLoadVideo
preference to WebCore.

Source/WebKit2:

Enable or disable the Setting::requiresUserGestureToLoadVideo() in WebKit depending on the
version of iOS SDK that the app was linked against. We require a user gesture to begin
loading a video as of iOS 10.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(shouldRequireUserGestureToLoadVideo): Added.
(-[WKWebView _initializeWithConfiguration:]): Set the requiresUserGestureToLoadVideo preference.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Modified to pass the WebKit requiresUserGestureToLoadVideo
preference to WebCore.

LayoutTests:

Add tests to ensure that Settings::setRequiresUserGestureToLoadVideo() behaves as expected.

* media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false-expected.txt: Added.
* media/loadedmetadata-fires-without-user-gesture-when-setRequiresUserGestureToLoadVideo-false.html: Added.
* media/media-controls.js:
(clickPlayButton): Added.
* media/require-user-gesture-to-load-video-expected.txt: Added.
* media/require-user-gesture-to-load-video.html: Added.
* media/video-controls-transformed.html: Write in terms of clickPlayButton().
* media/video-controls-visible-audio-only.html: Ditto.
* media/video-fullscreeen-only-playback.html: Ditto.
* media/video-play-audio-require-user-gesture.html: Ditto.
* media/video-play-require-user-gesture.html: Ditto.
* media/video-test.js:
(passTest): Added.
* platform/ios-simulator/TestExpectations: Skip test media/require-user-gesture-to-load-video.html as
we need to fix <https://bugs.webkit.org/show_bug.cgi?id=163291> to support tapping the play button on iOS.

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

3 years agoFix the iOS build.
weinig@apple.com [Tue, 11 Oct 2016 19:52:25 +0000 (19:52 +0000)]
Fix the iOS build.

* bindings/js/JSDOMConvert.h:

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

3 years ago[iOS] Sandbox QuickLook previews
dbates@webkit.org [Tue, 11 Oct 2016 19:40:43 +0000 (19:40 +0000)]
[iOS] Sandbox QuickLook previews
https://bugs.webkit.org/show_bug.cgi?id=163240
<rdar://problem/25961633>

Fix bad merge following r207151.

* platform/network/cf/ResourceResponse.h: Define m_isQuickLook.

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

3 years agoAdd SynchronizedFixedQueue class
commit-queue@webkit.org [Tue, 11 Oct 2016 19:35:36 +0000 (19:35 +0000)]
Add SynchronizedFixedQueue class
https://bugs.webkit.org/show_bug.cgi?id=162478

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-10-11
Reviewed by Geoffrey Garen.

Source/WTF:

This class represents a simple producer/consumer worker. It facilitates
synchronizing enqueuing to and dequeuing from a fixed size-queue. It uses
a single lock and a single condition to synchronize all its members among
the working threads. This means a single thread is active at any time and
and the other threads are blocked waiting for the lock to be released. Or
they are sleeping waiting for the condition to be satisfied.

* WTF.xcodeproj/project.pbxproj:
* wtf/SynchronizedFixedQueue.h: Added.
(WTF::SynchronizedFixedQueue::SynchronizedFixedQueue):
(WTF::SynchronizedFixedQueue::open): Restore the queue to its original state.
(WTF::SynchronizedFixedQueue::close): Wake all the sleeping threads with a closing state.
(WTF::SynchronizedFixedQueue::isOpen): Does the queue accept new items?
(WTF::SynchronizedFixedQueue::enqueue): Enqueue an item into the queue.
(WTF::SynchronizedFixedQueue::dequeue): Dequeue an item form the queue.

Tools:

Add a new test for SynchronizedFixedQueue. The test defines a new class
called ToUpperConverter which converts strings from lower case to upper
case. It creates two threads : (1) produce thread and (2) consume thread.
Here is what each thread does:

1. Main threads: Enqueues lower case strings into m_lowerQueue.
2. Produce thread: Dequeues lower case strings from m_lowerQueue and
   enqueue their upper case strings in the m_upperQueue.
3. Consume thread: Dequeues upper case strings from m_upperQueue.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp: Added.
(TestWebKitAPI::textItem): A helper function which returns a lower case string given an index.
(TestWebKitAPI::toUpper): A helper function which Returns the upper case of a string.
(TestWebKitAPI::ToUpperConverter::ToUpperConverter):
(TestWebKitAPI::ToUpperConverter::produceQueue): Returns a workQueue for the produce thread.
(TestWebKitAPI::ToUpperConverter::consumeQueue): Returns a workQueue for the consume thread.
(TestWebKitAPI::ToUpperConverter::startProducing): Creates a thread for the producer.
(TestWebKitAPI::ToUpperConverter::startConsuming): Creates a thread for the consumer.
(TestWebKitAPI::ToUpperConverter::start): Starts both the producer and the consumer threads.
(TestWebKitAPI::ToUpperConverter::stopProducing): Terminates the producer thread.
(TestWebKitAPI::ToUpperConverter::stopConsuming): Terminates the consumer thread.
(TestWebKitAPI::ToUpperConverter::stop): Terminates both the producer and the consumer threads.
(TestWebKitAPI::ToUpperConverter::enqueueLower): Adds a lower case string to the m_lowerQueue on the main thread.
(TestWebKitAPI::ToUpperConverter::isProducing): Returns whether the producing thread is active.
(TestWebKitAPI::ToUpperConverter::isConsuming): Returns whether the consuming thread is active.
(TestWebKitAPI::ToUpperConverter::produceCount): Returns the number of produced elements.
(TestWebKitAPI::ToUpperConverter::consumeCount): Returns the number of consumed elements.
(TestWebKitAPI::TEST):

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

3 years ago[iOS] Sandbox QuickLook previews
dbates@webkit.org [Tue, 11 Oct 2016 19:29:47 +0000 (19:29 +0000)]
[iOS] Sandbox QuickLook previews
https://bugs.webkit.org/show_bug.cgi?id=163240
<rdar://problem/25961633>

Reviewed by Brent Fulgham.

Source/WebCore:

Use a unique origin for- and limit the capabilities of- QuickLook previews.

Tests: http/tests/quicklook/at-import-stylesheet-blocked.html
       http/tests/quicklook/base-url-blocked.html
       http/tests/quicklook/cross-origin-iframe-blocked.html
       http/tests/quicklook/csp-header-ignored.html
       http/tests/quicklook/document-domain-is-empty-string.html
       http/tests/quicklook/external-stylesheet-blocked.html
       http/tests/quicklook/hide-referer-on-navigation.html
       http/tests/quicklook/submit-form-blocked.html
       http/tests/quicklook/top-navigation-blocked.html

* dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Call ContentSecurityPolicy::didReceiveHeader().
(WebCore::Document::processReferrerPolicy): Do not process referrer policy for QuickLook previews.
(WebCore::Document::initSecurityContext): Apply sandbox for QuickLook previews.
(WebCore::Document::shouldEnforceQuickLookSandbox): Added.
(WebCore::Document::applyQuickLookSandbox): Added.
* dom/Document.h:
* page/csp/ContentSecurityPolicy.h: Change accessibility of didReceiveHeader() from private to public.
(WebCore::ContentSecurityPolicy::processHTTPEquiv): Deleted.
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::isQuickLook): Added.
(WebCore::ResourceResponse::setIsQuickLook): Added.
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): Modified to mark
resource response as a QuickLook preview, if appropriate. Also remove the name of the first argument
and the need to use UNUSED_PARAM(connection) as we no longer make use of the first argument
following r207151.
* platform/network/ios/QuickLook.mm:
(-[WebResourceLoaderQuickLookDelegate _sendDidReceiveResponseIfNecessary]): Ditto.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Ditto. Fix style nits,
including renaming the function argument "r" to "resource" to better describe its purpose.

LayoutTests:

Add tests to ensure that we sandbox QuickLook previews.

* http/tests/quicklook/at-import-stylesheet-blocked-expected.txt: Added.
* http/tests/quicklook/at-import-stylesheet-blocked.html: Added.
* http/tests/quicklook/base-url-blocked-expected.txt: Added.
* http/tests/quicklook/base-url-blocked.html: Added.
* http/tests/quicklook/cross-origin-iframe-blocked-expected.txt: Added.
* http/tests/quicklook/cross-origin-iframe-blocked.html: Added.
* http/tests/quicklook/csp-header-ignored-expected.txt: Added.
* http/tests/quicklook/csp-header-ignored.html: Added.
* http/tests/quicklook/document-domain-is-empty-string-expected.txt: Added.
* http/tests/quicklook/document-domain-is-empty-string.html: Added.
* http/tests/quicklook/external-stylesheet-blocked-expected.txt: Added.
* http/tests/quicklook/external-stylesheet-blocked.html: Added.
* http/tests/quicklook/hide-referer-on-navigation-expected.txt: Added.
* http/tests/quicklook/hide-referer-on-navigation.html: Added.
* http/tests/quicklook/resources/at-import-stylesheet-blocked.docx: Added.
* http/tests/quicklook/resources/base-url-blocked.docx: Added.
* http/tests/quicklook/resources/cross-origin-iframe-blocked.docx: Added.
* http/tests/quicklook/resources/document-domain-is-empty-string.docx: Added.
* http/tests/quicklook/resources/external-stylesheet-blocked.docx: Added.
* http/tests/quicklook/resources/fail.html: Added.
* http/tests/quicklook/resources/hide-referer-on-navigation.docx: Added.
* http/tests/quicklook/resources/http-equiv-blocked.docx: Added.
* http/tests/quicklook/resources/pass.docx: Added.
* http/tests/quicklook/resources/submit-form-blocked.docx: Added.
* http/tests/quicklook/resources/tap-at-point-and-notify-done.js: Added.
(tapAtPointAndNotifyDone):
(uiScript):
(tapAtPoint):
* http/tests/quicklook/resources/top-navigation-blocked.docx: Added.
* http/tests/quicklook/resources/word-document-with-csp-block-frame-ancestors.php: Added.
* http/tests/quicklook/submit-form-blocked-expected.txt: Added.
* http/tests/quicklook/submit-form-blocked.html: Added.
* http/tests/quicklook/top-navigation-blocked-expected.txt: Added.
* http/tests/quicklook/top-navigation-blocked.html: Added.
* platform/ios-simulator-wk1/TestExpectations: Skip tests that cannot run in DumpRenderTree
because uiController.singleTapAtPoint() is not implemented.

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

3 years agoFix bindings tests after r207150.
achristensen@apple.com [Tue, 11 Oct 2016 19:14:07 +0000 (19:14 +0000)]
Fix bindings tests after r207150.

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary<TestObj::Dictionary>):

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

3 years agoExtend event stream to include interpolated events and add a force press test that...
commit-queue@webkit.org [Tue, 11 Oct 2016 18:38:49 +0000 (18:38 +0000)]
Extend event stream to include interpolated events and add a force press test that uses that interpolation
https://bugs.webkit.org/show_bug.cgi?id=163161

Patch by Megan Gardner <megan_gardner@apple.com> on 2016-10-11
Reviewed by Simon Fraser.

Added functionality to the event stream to allow for interpolated events.
Can now do long press, as well as a better way to do drag and other time-based
events that require a large stream of descrete HID events.
Added a basic force touch test to demostrate this interpolation.
Also updated the script to allow for iPhone 7 specific tests, as force touch
needs to be on a device that had force touch.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(linearInterpolation):
(simpleCurveInterpolation):
(calculateNextCurveLocation):
(phaseFromString):
(interpolationFromString):
(-[HIDEventGenerator eventMaskFromEventInfo:]):
(-[HIDEventGenerator _createIOHIDEventWithInfo:]):
(-[HIDEventGenerator moveToPoints:touchCount:duration:]):
(-[HIDEventGenerator interpolatedEvents:]):
(-[HIDEventGenerator processEventsArray:withStartTime:]):
(-[HIDEventGenerator eventDispatchThreadEntry:]):
(simpleDragCurve): Deleted.
(calculateNextLocation): Deleted.

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

3 years agoURLParser should percent-encode non-ASCII and non-printable characters in fragment
achristensen@apple.com [Tue, 11 Oct 2016 18:28:50 +0000 (18:28 +0000)]
URLParser should percent-encode non-ASCII and non-printable characters in fragment
https://bugs.webkit.org/show_bug.cgi?id=163287

Reviewed by Brady Eidson.

Source/WebCore:

Based on discussion in https://github.com/whatwg/url/issues/150
If that discussion decides to keep the spec as-is (which keeps non-ASCII characters in the fragment
to match IE and Edge's behavior, which Chrome has followed for special schemes) then we can revert
this change later after enabling the URL parser.  Making this change keeps behavior matching Safari
and Firefox, as well as Chrome's handling of non-special schemes, such as data URLs.

Covered by updated API tests.

* platform/URLParser.cpp:
(WebCore::URLParser::appendToASCIIBuffer):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::syntaxViolation):
(WebCore::URLParser::currentPosition):
(WebCore::URLParser::parse):
(WebCore::URLParser::fragmentSyntaxViolation): Deleted.
* platform/URLParser.h:
No more non-ASCII characters in canonicalized URLs.

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):

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

3 years agoRemove dead networking code
achristensen@apple.com [Tue, 11 Oct 2016 18:20:23 +0000 (18:20 +0000)]
Remove dead networking code
https://bugs.webkit.org/show_bug.cgi?id=163263

Reviewed by Daniel Bates.

.:

* Source/cmake/OptionsAppleWin.cmake:

Source/WebCore:

There are no more Cocoa platforms using CFURLConnection.
USE(CFNETWORK) is being replaced by USE(CFURLCONNECTION) and it is only used on the AppleWin port.

No change in behavior.

* WebCore.xcodeproj/project.pbxproj:
* WebCorePrefix.h:
* loader/DocumentLoader.h:
* loader/EmptyClients.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
* loader/ResourceLoader.h:
* loader/SubresourceLoader.h:
* loader/cf/ResourceLoaderCFNet.cpp:
* loader/cocoa/SubresourceLoaderCocoa.mm:
(WebCore::SubresourceLoader::willCacheResponse): Deleted.
* loader/mac/DocumentLoaderMac.cpp:
* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::willCacheResponse): Deleted.
* page/mac/PageMac.mm:
(WebCore::Page::platformInitialize):
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForResponseToAuthenticationChallenge):
(WebCore::WebCoreNSURLAuthenticationChallengeClient::create): Deleted.
(WebCore::WebCoreNSURLAuthenticationChallengeClient::WebCoreNSURLAuthenticationChallengeClient): Deleted.
* platform/mac/WebCoreSystemInterface.h:
* platform/network/NetworkStorageSession.h:
* platform/network/ProtectionSpace.h:
* platform/network/ProtectionSpaceBase.cpp:
* platform/network/ResourceHandle.cpp:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleClient.cpp:
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::willCacheResponse):
(WebCore::ResourceHandleClient::shouldCacheResponse):
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/ResourceRequestBase.cpp:
* platform/network/cf/AuthenticationCF.cpp:
(WebCore::AuthenticationChallenge::AuthenticationChallenge):
(WebCore::createCF):
(WebCore::core):
* platform/network/cf/AuthenticationCF.h:
* platform/network/cf/AuthenticationChallenge.h:
* platform/network/cf/CookieJarCFNet.cpp:
* platform/network/cf/CredentialStorageCFNet.cpp:
(WebCore::CredentialStorage::getFromPersistentStorage):
(WebCore::CredentialStorage::saveToPersistentStorage): Deleted.
* platform/network/cf/LoaderRunLoopCF.cpp:
* platform/network/cf/LoaderRunLoopCF.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::cookieStorage):
* platform/network/cf/ProtectionSpaceCFNet.cpp:
* platform/network/cf/ProtectionSpaceCFNet.h:
* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::shouldSniffConnectionProperty):
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::schedule): Deleted.
(WebCore::ResourceHandle::unschedule): Deleted.
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
* platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::setupRequest):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
* platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::encodingRequiresPlatformData):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
(WebCore::findCFURLRequestSetContentDispositionEncodingFallbackArrayFunction): Deleted.
* platform/network/cf/ResourceRequestCFNet.h:
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
(WebCore::ResourceResponse::platformCertificateInfo):
* platform/network/cf/SynchronousLoaderClientCFNet.cpp:
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupRequest):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::setupConnectionScheduling):
(WebCore::adjustMIMETypeIfNecessary):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::willCacheResponse):
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::canRespondToProtectionSpace):
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
* platform/network/cocoa/CredentialCocoa.h:
* platform/network/cocoa/CredentialCocoa.mm:
(WebCore::Credential::Credential): Deleted.
(WebCore::Credential::cfCredential): Deleted.
* platform/network/cocoa/ProtectionSpaceCocoa.h:
* platform/network/cocoa/ProtectionSpaceCocoa.mm:
(WebCore::ProtectionSpace::ProtectionSpace): Deleted.
(WebCore::ProtectionSpace::cfSpace): Deleted.
* platform/network/cocoa/ResourceRequestCocoa.mm:
(WebCore::ResourceRequest::nsURLRequest):
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo):
(WebCore::ResourceResponse::nsURLResponse): Deleted.
(WebCore::ResourceResponse::ResourceResponse): Deleted.
* platform/network/ios/QuickLook.h:
* platform/network/ios/QuickLook.mm:
(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
(-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
(WebCore::QuickLookHandle::create): Deleted.
(WebCore::QuickLookHandle::cfResponse): Deleted.
* platform/network/ios/ResourceHandleIOS.mm: Removed.
* platform/network/ios/ResourceRequestIOS.mm: Removed.
* platform/network/mac/AuthenticationMac.mm:
(-[WebCoreAuthenticationClientAsChallengeSender setCFChallenge:]): Deleted.
(-[WebCoreAuthenticationClientAsChallengeSender cfChallenge]): Deleted.
(WebCore::core): Deleted.
(WebCore::mac): Deleted.
* platform/network/mac/CookieJarMac.mm:
(WebCore::setCookiesFromDOM):
(WebCore::cookieStorage):
(WebCore::addCookie):
* platform/network/mac/CredentialStorageMac.mm:
* platform/network/mac/FormDataStreamMac.h:
* platform/network/mac/FormDataStreamMac.mm:
* platform/network/mac/ResourceErrorMac.mm:
(NSErrorFromCFError): Deleted.
(WebCore::ResourceError::ResourceError): Deleted.
(WebCore::ResourceError::nsError): Deleted.
(WebCore::ResourceError::operator NSError *): Deleted.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::continueWillCacheResponse):
(WebCore::ResourceHandle::getConnectionTimingData): Deleted.
* platform/network/mac/ResourceRequestMac.mm: Removed.
* platform/network/mac/SynchronousLoaderClient.mm:
(WebCore::SynchronousLoaderClient::platformBadResponseError):
* platform/network/mac/WebCoreResourceHandleAsDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
* platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
* platform/network/mac/WebCoreURLResponse.mm:
(WebCore::synthesizeRedirectResponseIfNecessary):
* platform/win/TemporaryLinkStubs.cpp:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebKit:

* WebCoreSupport/WebResourceLoadScheduler.cpp:
(WebResourceLoadScheduler::scheduleLoad):

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:

Source/WebKit/mac:

* Misc/WebDownload.mm:
(-[WebDownload _initWithLoadingCFURLConnection:request:response:delegate:proxy:]): Deleted.
* Misc/WebDownloadInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):
* WebView/WebPreferences.mm:
(+[WebPreferences _setCurrentNetworkLoaderSessionCookieAcceptPolicy:]):
* WebView/WebView.mm:
(-[WebView scheduleInRunLoop:forMode:]):
(-[WebView unscheduleFromRunLoop:forMode:]):

Source/WebKit/win:

* DefaultDownloadDelegate.h:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::savePlatformDataToCachedFrame):
* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebCoreSupport/WebFrameNetworkingContext.h:
* WebCoreSupport/WebPlatformStrategies.cpp:
* WebDownload.h:
* WebError.cpp:
(WebError::localizedDescription):
(WebError::sslPeerCertificate):
* WebError.h:
* WebMutableURLRequest.cpp:
(WebMutableURLRequest::mutableCopy):
* WebURLAuthenticationChallenge.cpp:
(WebURLAuthenticationChallenge::initWithProtectionSpace):
(WebURLAuthenticationChallenge::initWithAuthenticationChallenge):
* WebURLResponse.cpp:
(WebURLResponse::sslPeerCertificate):
* WebURLResponse.h:
* WebView.cpp:
(WebView::setCacheModel):
(WebView::canHandleRequest):
(WebView::notifyPreferencesChanged):
(updateSharedSettingsFromPreferencesIfNeeded):

Source/WebKit2:

* NetworkProcess/Downloads/Download.h:
* NetworkProcess/Downloads/ios/DownloadIOS.mm: Removed.
* NetworkProcess/Downloads/mac/DownloadMac.mm:
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/mac/NetworkLoadMac.mm:
(WebKit::NetworkLoad::willCacheResponseAsync): Deleted.
* Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm:
(WebKit::AuthenticationManager::receivedCredential):
(WebKit::AuthenticationManager::receivedRequestToContinueWithoutCredential):
(WebKit::AuthenticationManager::receivedCancellation):
(WebKit::AuthenticationManager::receivedRequestToPerformDefaultHandling):
(WebKit::AuthenticationManager::receivedChallengeRejection):
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* wtf/Platform.h:
* wtf/SchedulePair.h:
* wtf/SchedulePairMac.mm:

Tools:

* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/config.h:
* DumpRenderTree/win/DumpRenderTree.cpp:
(main):

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

3 years agoUse IDLTypes in more places
weinig@apple.com [Tue, 11 Oct 2016 17:33:45 +0000 (17:33 +0000)]
Use IDLTypes in more places
https://bugs.webkit.org/show_bug.cgi?id=163247

Reviewed by Darin Adler.

Source/WebCore:

Switch JS -> Native type conversions to use convert<IDLType>(...) rather
than convert<NativeType>(...). This allows us to differentiate things like
conversion from JSValue to DOMString vs. JSValue to USVString which have different
rules.

* bindings/generic/IDLTypes.h:
Add predicate for integer types.

* bindings/js/IDBBindingUtilities.cpp:
(WebCore::idbKeyPathFromValue):
* bindings/js/JSApplePaySessionCustom.cpp:
(WebCore::JSApplePaySession::completeShippingMethodSelection):
(WebCore::JSApplePaySession::completeShippingContactSelection):
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createAesKeyGenParams):
(WebCore::createRsaKeyGenParams):
* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::JSCustomElementRegistry::define):
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::getCSSCanvasContext):
* bindings/js/JSMockContentFilterSettingsCustom.cpp:
(WebCore::JSMockContentFilterSettings::setDecisionPoint):
(WebCore::toDecision):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::acceptNode):
Switch to new convert<IDLType> style.

* bindings/js/JSDOMBinding.h:
(WebCore::toRefPtrNativeArray): Deleted.
(WebCore::toNativeArray): Deleted.
These can now be called as convert<IDLSequence<IDLInterface<T>>> and convert<IDLType> respectively.

* bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLNullable<T>>::convert):
(WebCore::Converter<IDLBoolean>::convert):
(WebCore::Converter<IDLInterface<T>>::convert):
(WebCore::Converter<IDLByte>::convert):
(WebCore::Converter<IDLOctet>::convert):
(WebCore::Converter<IDLShort>::convert):
(WebCore::Converter<IDLUnsignedShort>::convert):
(WebCore::Converter<IDLLong>::convert):
(WebCore::Converter<IDLUnsignedLong>::convert):
(WebCore::Converter<IDLLongLong>::convert):
(WebCore::Converter<IDLUnsignedLongLong>::convert):
(WebCore::Converter<IDLFloat>::convert):
(WebCore::Converter<IDLUnrestrictedFloat>::convert):
(WebCore::Converter<IDLDouble>::convert):
(WebCore::Converter<IDLUnrestrictedDouble>::convert):
(WebCore::Converter<IDLDOMString>::convert):
(WebCore::Converter<IDLUSVString>::convert):
(WebCore::Detail::ArrayConverter::convert):
(WebCore::Converter<IDLSequence<T>>::convert):
(WebCore::Converter<IDLFrozenArray<T>>::convert):
(WebCore::Converter<IDLDictionary<T>>::convert):
(WebCore::Converter<IDLEnumeration<T>>::convert):
(WebCore::Detail::VariadicConverterBase::convert):
(WebCore::Detail::VariadicConverterBase<IDLInterface<T>>::convert):
(WebCore::convertVariadicArguments):
(WebCore::convertWrapperType): Deleted.
(WebCore::convertWrapperTypeSequence): Deleted.
(WebCore::Converter<bool>::convert): Deleted.
(WebCore::Converter<String>::convert): Deleted.
(WebCore::Converter<Vector<T>>::convert): Deleted.
(WebCore::Converter<int8_t>::convert): Deleted.
(WebCore::Converter<uint8_t>::convert): Deleted.
(WebCore::Converter<int16_t>::convert): Deleted.
(WebCore::Converter<uint16_t>::convert): Deleted.
(WebCore::Converter<int32_t>::convert): Deleted.
(WebCore::Converter<uint32_t>::convert): Deleted.
(WebCore::Converter<int64_t>::convert): Deleted.
(WebCore::Converter<uint64_t>::convert): Deleted.
Switch Converter to be specialized on IDLTypes. Add support for IDLNullable, IDLSequence, and IDLFrozenArray.

* bindings/scripts/CodeGenerator.pm:
(GetFlattenedMemberTypes): Deleted.
(GetNumberOfNullableMemberTypes): Deleted.
(GetIDLUnionMemberTypes): Deleted.
(GetBaseIDLType): Deleted.
(GetIDLType): Deleted.
Move IDLType conversion logic to CodeGeneratorJS so it can use GetEnumerationClassName and GetDictionaryClassName.

* bindings/scripts/CodeGeneratorJS.pm:
(AddToImplIncludesForIDLType):
Add support for sequences, FrozenArrays and external dictionaries.

(GenerateEnumerationsImplementationContent):
(GenerateEnumerationsHeaderContent):
Change the name of parse<enum> and convert<enum> to parseEnumeration<enum> and convertEnumeration<enum>
to make them more consistent with dictionary conversion specialization and not interfere with the convert
function specialization.

(GenerateDictionaryImplementationContent):
Simplify by using convert<IDLType>.

(GetFlattenedMemberTypes):
(GetNumberOfNullableMemberTypes):
(GetIDLUnionMemberTypes):
(GetBaseIDLType):
(GetIDLType):
Moved from CodeGenerator.pm

(IsHandledByDOMConvert):
(JSValueToNative):
Start switching JSValueToNative over to using convert<IDLType>. Use IsHandledByDOMConvert as a predicate
for what is supported.

* bindings/scripts/IDLParser.pm:
(applyTypedefs):
(cloneType):
(applyTypedefsForSignature):
(parseTypedef):
(parseOperationOrIterator):
(parseSpecialOperation):
Make typedefs work with aggregate types (unions, sequences and FrozenArrays).

* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Update test results.

* bindings/scripts/test/TestTypedefs.idl:
Add additional tests for typedefs that use unions and sequences.

* testing/InternalSettings.idl:
Change the name of a parameter to avoid a name collision.

LayoutTests:

* fast/events/constructors/message-event-constructor-expected.txt:
* fast/mediastream/MediaStreamConstructor-expected.txt:
Update tests for different error message.

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

3 years agoMove no longer used functions to WKDeprecatedFunctions.cpp
andersca@apple.com [Tue, 11 Oct 2016 17:05:04 +0000 (17:05 +0000)]
Move no longer used functions to WKDeprecatedFunctions.cpp
https://bugs.webkit.org/show_bug.cgi?id=163290

Reviewed by Dan Bernstein.

* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
(WKContextSetProcessModel): Deleted.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupRemoveAllUserScripts):
(WKPageGroupAddUserContentFilter): Deleted.
(WKPageGroupRemoveUserContentFilter): Deleted.
(WKPageGroupRemoveAllUserContentFilters): Deleted.
* UIProcess/API/C/WKPageGroup.h:

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

3 years agoModify check-webkit-style to prohibit sensitive phrases
wilander@apple.com [Tue, 11 Oct 2016 16:38:33 +0000 (16:38 +0000)]
Modify check-webkit-style to prohibit sensitive phrases
https://bugs.webkit.org/show_bug.cgi?id=163048
<rdar://problem/28289755>

Terms considered or found to be too general to flag:
ASSERT_WITH_SECURITY_IMPLICATION, bad cast, bug, bypass, crash,
denial of service, dereference, disclosure, error, exploit,
failure, heap, integer overflow, leak, null dereference,
null pointer dereference, out of bounds, overflow,
race condition, sensitive information, stack, type confusion.

Reviewed by Brent Fulgham.

* Scripts/webkitpy/style/checkers/changelog.py:
(ChangeLogChecker.check_entry):
    Now calls ChangeLogChecker.check_for_unwanted_security_terms().
(ChangeLogChecker):
(ChangeLogChecker.check_for_unwanted_security_terms):
    New function to check for sensitive terms.
(ChangeLogChecker.check_for_unwanted_security_terms.FoundUnwantedSecurityTerm):
(ChangeLogChecker.check_for_unwanted_security_terms.FoundUnwantedSecurityTerm.__init__):
    Convenience class.
* Scripts/webkitpy/style/checkers/changelog_unittest.py:
(ChangeLogCheckerTest.test_unwanted_security_terms):

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

3 years agoUse modern for loops for iterating supplement maps
annulen@yandex.ru [Tue, 11 Oct 2016 16:36:01 +0000 (16:36 +0000)]
Use modern for loops for iterating supplement maps
https://bugs.webkit.org/show_bug.cgi?id=163274

Reviewed by Alex Christensen.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::initializeConnection):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::networkProcessCrashed):
(WebKit::WebProcessPool::databaseProcessCrashed): Iterate by values()
like in other places.

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

3 years agoUnreviewed, rolling out r207067.
ryanhaddad@apple.com [Tue, 11 Oct 2016 16:33:30 +0000 (16:33 +0000)]
Unreviewed, rolling out r207067.

This change caused webkitpy test failures.

Reverted changeset:

"[Win] Parallel DRTs are sharing preferences and cache."
https://bugs.webkit.org/show_bug.cgi?id=163013
http://trac.webkit.org/changeset/207067

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

3 years agoFixed compilation with !ENABLE(SVG_FONTS)
annulen@yandex.ru [Tue, 11 Oct 2016 16:28:06 +0000 (16:28 +0000)]
Fixed compilation with !ENABLE(SVG_FONTS)
https://bugs.webkit.org/show_bug.cgi?id=163281

Reviewed by Csaba Osztrogon√°c.

No new tests needed.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):

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

3 years agoUnreviewed build fix after r207140.
bfulgham@apple.com [Tue, 11 Oct 2016 16:20:42 +0000 (16:20 +0000)]
Unreviewed build fix after r207140.

* PlatformAppleWin.cmake: Add missing compile file.

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

3 years ago[cmake] Make INDEXED_DATABASE_IN_WORKERS depending on INDEXED_DATABASE
annulen@yandex.ru [Tue, 11 Oct 2016 16:13:39 +0000 (16:13 +0000)]
[cmake] Make INDEXED_DATABASE_IN_WORKERS depending on INDEXED_DATABASE
https://bugs.webkit.org/show_bug.cgi?id=163280

Reviewed by Csaba Osztrogon√°c.

* Source/cmake/WebKitFeatures.cmake:

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

3 years ago[Win][Direct2D] Add initial Pattern handling implementation
bfulgham@apple.com [Tue, 11 Oct 2016 15:57:39 +0000 (15:57 +0000)]
[Win][Direct2D] Add initial Pattern handling implementation
https://bugs.webkit.org/show_bug.cgi?id=163270

Reviewed by Simon Fraser.

Provide an implemenation of Patterns for Direct2D.

No new tests. Covered by fast/borders/border-image-01.html and others.

* platform/graphics/GraphicsContext.h:
* platform/graphics/Pattern.h: Add D2D definitions.
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::solidStrokeBrush): Use a more generic return type.
(WebCore::GraphicsContext::solidFillBrush): Ditto.
(WebCore::GraphicsContext::patternStrokeBrush): Added.
(WebCore::GraphicsContext::patternFillBrush): Added.
(WebCore::GraphicsContext::drawPattern): Provide D2D implementation.
(WebCore::GraphicsContext::applyStrokePattern): Ditto.
(WebCore::GraphicsContext::applyFillPattern): Ditto.
(WebCore::GraphicsContext::drawPath): Use stroke pattern if available.
(WebCore::GraphicsContext::fillPath): Use fill pattern if available.
(WebCore::GraphicsContext::strokePath): Use stroke pattern if available.
(WebCore::GraphicsContext::fillRect): Use fill pattern if available.
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
* platform/graphics/win/PatternDirect2D.cpp: Added.

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

3 years agoThe "Input Events" experimental feature runtime flag should not be on by default
wenson_hsieh@apple.com [Tue, 11 Oct 2016 15:53:58 +0000 (15:53 +0000)]
The "Input Events" experimental feature runtime flag should not be on by default
https://bugs.webkit.org/show_bug.cgi?id=163278

Reviewed by Zalan Bujtas.

This was intended to be off by default.

* Shared/WebPreferencesDefinitions.h:

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

3 years ago[mac] LayoutTest media/modern-media-controls/play-pause-button/play-pause-button...
commit-queue@webkit.org [Tue, 11 Oct 2016 14:57:55 +0000 (14:57 +0000)]
[mac] LayoutTest media/modern-media-controls/play-pause-button/play-pause-button.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=163249

Patch by Antoine Quint <graouts@apple.com> on 2016-10-11
Reviewed by Antoine Quint.

Wait until all icon images are loaded before running the assertions. We can determine whether
a button's icon image is loaded by checking it's been sized.

* TestExpectations:
* media/modern-media-controls/play-pause-button/play-pause-button.html:

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

3 years ago[Win][Direct2D] Compile fix.
pvollan@apple.com [Tue, 11 Oct 2016 14:30:10 +0000 (14:30 +0000)]
[Win][Direct2D] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=163273

Reviewed by Brent Fulgham.

Define USE_DIRECT2D.

* Source/cmake/OptionsAppleWin.cmake:

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

3 years ago[Win] Compile fix.
pvollan@apple.com [Tue, 11 Oct 2016 14:09:51 +0000 (14:09 +0000)]
[Win] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=163272

Reviewed by Brent Fulgham.

When compiling with older SDKs, some CoreText symbols are redefined.
This patch checks if the relevant CoreText header file has been
included before defining the symbol.

* platform/spi/win/CoreTextSPIWin.h:

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

3 years ago[mac] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is...
commit-queue@webkit.org [Tue, 11 Oct 2016 14:06:29 +0000 (14:06 +0000)]
[mac] LayoutTest media/modern-media-controls/airplay-button/airplay-button.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=163248

Patch by Antoine Quint <graouts@apple.com> on 2016-10-11
Reviewed by Antoine Quint.

Wait until all icon images are loaded before running the assertions. We can determine whether
a button's icon image is loaded by checking it's been sized.

* TestExpectations:
* media/modern-media-controls/airplay-button/airplay-button.html:

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

3 years ago[Modern Media Controls] Buttons container
commit-queue@webkit.org [Tue, 11 Oct 2016 12:52:28 +0000 (12:52 +0000)]
[Modern Media Controls] Buttons container
https://bugs.webkit.org/show_bug.cgi?id=163238
<rdar://problem/28701864>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-11
Reviewed by Dean Jackson.

Source/WebCore:

We add a new ButtonsContainer class which contains a group of Button objects
and positions them based on the provided padding and margin between buttons.
Buttons that aren't enabled or marked as dropped are not added to the tree of
LayoutNodes, and thus the DOM.

Additionally, we fix a few issues we found while working on tests for ButtonsContainer
where LayoutNodes would schedule layout callbacks even when they would not do any work
during the layout callback due to not resetting the `needsLayout` flag to false and
removing any scheduled tasks when a layout was completed.

Finally, we fix a few style issues that had not been caught so far and an unused
`size` property on IconButton.

Tests: media/modern-media-controls/buttons-container/buttons-container-buttons-property.html
       media/modern-media-controls/buttons-container/buttons-container-constructor.html
       media/modern-media-controls/buttons-container/buttons-container-layout.html

* Modules/modern-media-controls/controls/airplay-button.js:
(AirplayButton.prototype.set on):
(AirplayButton):
* Modules/modern-media-controls/controls/buttons-container.css:
(.buttons-container):
* Modules/modern-media-controls/controls/buttons-container.js:
(ButtonsContainer.prototype.get buttons):
(ButtonsContainer.prototype.set buttons):
(ButtonsContainer.prototype.layout):
* Modules/modern-media-controls/controls/icon-button.js:
* Modules/modern-media-controls/controls/layout-node.js:
(LayoutNode.prototype.set needsLayout):
(LayoutNode.prototype.markDirtyProperty):
(LayoutNode.prototype._markNodeManipulation):
(LayoutNode.prototype._updateDirtyState):
(performScheduledLayout):
(elementFromString):
* Modules/modern-media-controls/controls/scheduler.js:
(const.scheduler.new.prototype.unscheduleLayout):

LayoutTests:

Adding tests for the new ButtonsContainer class.

* media/modern-media-controls/buttons-container/buttons-container-buttons-property-expected.txt: Added.
* media/modern-media-controls/buttons-container/buttons-container-buttons-property.html: Added.
* media/modern-media-controls/buttons-container/buttons-container-constructor-expected.txt: Added.
* media/modern-media-controls/buttons-container/buttons-container-constructor.html: Added.
* media/modern-media-controls/buttons-container/buttons-container-layout-expected.txt: Added.
* media/modern-media-controls/buttons-container/buttons-container-layout.html: Added.

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

3 years ago[Fetch API] Support Request cache mode
commit-queue@webkit.org [Tue, 11 Oct 2016 10:53:22 +0000 (10:53 +0000)]
[Fetch API] Support Request cache mode
https://bugs.webkit.org/show_bug.cgi?id=162281

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-11
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-cache-expected.txt: Rebasing test now that more tests are passing.
* web-platform-tests/fetch/api/request/request-error-expected.txt:
* web-platform-tests/fetch/api/request/request-error.html: Adding test to ensure only-if-cached is used with same-origin fetch mode.

Source/WebCore:

Covered by updated test.

Added support for only-if-cached mode at Request level.

Added support for cache mode at CachedResourceLoader, by setting HTTP headers and ResourceRequest cache policy
based on https://fetch.spec.whatwg.org/#concept-request-cache-mode and https://fetch.spec.whatwg.org/#http-network-or-cache-fetch.

Disabled default cache policy computation (done in FrameLoader) when cache mode is different from the default.
Activated no-store cache mode for EventSource as per https://html.spec.whatwg.org/#the-eventsource-interface.

* Modules/fetch/FetchRequest.cpp:
(WebCore::setCache): Adding support for only-if-cached.
(WebCore::buildOptions): Throw if only-if-cached and fetch mode is not same-origin.
* loader/FetchOptions.h: Adding support for only-if-cached.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::defaultRequestCachingPolicy): Introduced to ease readability.
(WebCore::FrameLoader::addExtraFieldsToRequest): Updating cache policy only if request has the default cache policy.
This allows bypassing the default behavior for fetch cache mode different from "default".
* loader/FrameLoader.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::updateRequestAccordingCacheMode): Introduced to set headers and request cache policy according fetch cache mode.
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Ensure bypassing the memory cache in no-store and reload cases.
We reload in case of cache mode=reload to refresh the meory cache entry.
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::setCacheModeToNoStore):
* page/EventSource.cpp:
(WebCore::EventSource::connect): Use no-store cache mode as per https://html.spec.whatwg.org/#the-eventsource-interface.
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::addIfNotPresent): Helper routine.
* platform/network/HTTPHeaderMap.h:
* platform/network/HTTPHeaderValues.cpp:
* platform/network/HTTPHeaderValues.h:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::addHTTPHeaderFieldIfNotPresent):
(WebCore::ResourceRequestBase::addHTTPHeaderField):
(WebCore::ResourceRequestBase::hasHTTPHeaderField):
* platform/network/ResourceRequestBase.h:

LayoutTests:

Activating request-cache.html tests for WK1, but not yet for WK2.

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

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

3 years agoStop copying author shadow pseudo rules into shadow tree style resolver
antti@apple.com [Tue, 11 Oct 2016 10:24:07 +0000 (10:24 +0000)]
Stop copying author shadow pseudo rules into shadow tree style resolver
https://bugs.webkit.org/show_bug.cgi?id=163232

Reviewed by Darin Adler.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::matchAuthorRules):
(WebCore::ElementRuleCollector::matchAuthorShadowPseudoElementRules):

    If we are resolving a user agent shadow tree also look up pseudo element rules from the host scope author sheet.
    This is needed to keep web exposed ::-webkit-foo pseudo elements working.

(WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):

    Factor to a function.

* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::copyShadowPseudoElementRulesFrom): Deleted.
* css/RuleSet.h:
* dom/Document.cpp:
(WebCore::Document::userAgentShadowTreeStyleResolver):
* style/StyleScope.cpp:
(WebCore::Style::Scope::updateStyleResolver):

    No need to awkwardly copy these rules anymore.

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

3 years ago[Win] Parallel DRTs are sharing preferences and cache.
pvollan@apple.com [Tue, 11 Oct 2016 08:35:46 +0000 (08:35 +0000)]
[Win] Parallel DRTs are sharing preferences and cache.
https://bugs.webkit.org/show_bug.cgi?id=163013

Reviewed by Brent Fulgham.

Source/WebKit/win:

Make it possible for a WebKit client to use separate preferences and cache.

* Interfaces/IWebPreferencesPrivate.idl:
* WebApplicationCache.cpp:
(applicationCachePath):
* WebCache.cpp:
(WebCache::cacheFolder):
(WebCache::setCacheFolder):
* WebDatabaseManager.cpp:
(databasesDirectory):
* WebPreferences.cpp:
(WebPreferences::applicationId):
(WebPreferences::valueForKey):
(WebPreferences::setValueForKey):
(WebPreferences::save):
(WebPreferences::QueryInterface):
(WebPreferences::modernMediaControlsEnabled):
(WebPreferences::setApplicationId):
* WebPreferences.h:
* WebView.cpp:
(WebView::setCacheModel):

Tools:

Use separate cache and preferences for each DRT instance.

* DumpRenderTree/win/DumpRenderTree.cpp:
(applicationId):
(setApplicationId):
(setCacheFolder):
(setDefaultsToConsistentValuesForTesting):
* Scripts/webkitpy/port/win.py:
(WinPort.setup_test_run):

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

3 years agoValueAdd should be constant folded if the operands are constant String,Primitive...
sbarati@apple.com [Tue, 11 Oct 2016 07:28:08 +0000 (07:28 +0000)]
ValueAdd should be constant folded if the operands are constant String,Primitive or Primitive,String
https://bugs.webkit.org/show_bug.cgi?id=163182

Reviewed by Filip Pizlo.

JSTests:

* microbenchmarks/string-add-constant-folding.js: Added.
(assert):
(runTests):
(add):
(test):

Source/JavaScriptCore:

This code pattern shows up in Dromaeo, so it's worth optimizing for.
This might also show up in real world JS code due to inlining and other
types of constant folding.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::getValue):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

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

3 years agoUpdate IDBVersionChangeEvent to stop using legacy [ConstructorTemplate=Event]
cdumez@apple.com [Tue, 11 Oct 2016 07:11:40 +0000 (07:11 +0000)]
Update IDBVersionChangeEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163266

Reviewed by Darin Adler.

Source/WebCore:

Update IDBVersionChangeEvent to stop using legacy [ConstructorTemplate=Event]
and use a regular constructor instead, as in the specification:
- http://w3c.github.io/IndexedDB/#request-idbversionchangeevent

This patch also fixes a bug where the IDBVersionChangeEvent was ignoring the
EventInit dictionary members passed by the JavaScript (e.g. bubbles).

No new tests, updated existing test.

* Modules/indexeddb/IDBVersionChangeEvent.cpp:
(WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
* Modules/indexeddb/IDBVersionChangeEvent.h:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* bindings/js/JSDOMConvert.h:
(WebCore::convertNullable):
(WebCore::convert): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDefaultValue):
(GenerateDictionaryImplementationContent):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary<TestObj::Dictionary>):
* bindings/scripts/test/TestObj.idl:

LayoutTests:

Update existing layout test covering the IDBVersionChangeEvent constructor
to test to EventInit dictionary members as well.

* storage/indexeddb/modern/idbversionchangeevent-constructor-expected.txt:
* storage/indexeddb/modern/idbversionchangeevent-constructor.html:

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

3 years agoUpdate WebKitPlaybackTargetAvailabilityEvent to stop using legacy [ConstructorTemplat...
cdumez@apple.com [Tue, 11 Oct 2016 07:09:54 +0000 (07:09 +0000)]
Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163265

Reviewed by Darin Adler.

Update WebKitPlaybackTargetAvailabilityEvent to stop using legacy
[ConstructorTemplate=Event] and use a regular constructor instead.

* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent):
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
(WebCore::WebKitPlaybackTargetAvailabilityEvent::createForBindings):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::~WebKitPlaybackTargetAvailabilityEvent): Deleted.
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:

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

3 years agoAdd ENABLE_ENCRYPTED_MEDIA configuration option
zandobersek@gmail.com [Tue, 11 Oct 2016 06:43:35 +0000 (06:43 +0000)]
Add ENABLE_ENCRYPTED_MEDIA configuration option
https://bugs.webkit.org/show_bug.cgi?id=163219

Reviewed by Darin Adler.

.:

Add the ENABLE_ENCRYPTED_MEDIA configuration option to the
CMake and MSVC build systems. It will be used to enable or
disable the new EME implementation at build-time.

* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.
* DerivedSources.make: Group the legacy option and the new option together.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.

Source/WTF:

* wtf/FeatureDefines.h:
If undefined, define the ENABLE_ENCRYPTED_MEDIA option to 0.

Tools:

* Scripts/webkitperl/FeatureList.pm:
Make the ENABLE_ENCRYPTED_MEDIA option overridable via build-webkit.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
Add the ENABLE_ENCRYPTED_MEDIA configuration option. It will be used
to enable or disable the new EME implementation at build-time.

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

3 years agoCachedResourceRequest constructor should be made more efficient
commit-queue@webkit.org [Tue, 11 Oct 2016 06:42:53 +0000 (06:42 +0000)]
CachedResourceRequest constructor should be made more efficient
https://bugs.webkit.org/show_bug.cgi?id=163210

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Alex Christensen.

No change of behavior.

Refactoring to use one CachedResourceRequest constructor that will move its request and charset to improve efficiency.

* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet):
* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::checkStyleSheet):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::process):
* html/parser/HTMLResourcePreloader.cpp:
(WebCore::PreloadRequest::resourceRequest):
* loader/cache/CachedResourceRequest.cpp:
(WebCore::CachedResourceRequest::CachedResourceRequest):
* loader/cache/CachedResourceRequest.h:

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

3 years agoWebRTC: Make MediaEndpointPeerConnection handle remotely assigned mids correctly
commit-queue@webkit.org [Tue, 11 Oct 2016 06:39:15 +0000 (06:39 +0000)]
WebRTC: Make MediaEndpointPeerConnection handle remotely assigned mids correctly
https://bugs.webkit.org/show_bug.cgi?id=163202

Patch by Adam Bergkvist  <adam.bergkvist@ericsson.com> and Alejandro G. Castro <alex@igalia.com> on 2016-10-10
Reviewed by Eric Carlson.

Source/WebCore:

An RTCRtpTransceiver has a null mid until it's been associated with a
media description (with a mid) [1]. During that time, it's identified by
a provisional mid that might become its real mid, but the transceiver
can also get its mid assigned by a remote media description. In the
second case, the mid value is initially unknown. A transceiver's
RTCRtpSender must directly (synchronously in the script) provide a muted
remote source that is playable by, for example, a media element. This
source is initially registered in the MediaEndpoint (WebRTC backend)
with the transceiver's provisional mid. So, if the real mid is set by a
remote description, the registered mid must be updated to preserve the
association between the registered source and the transceiver.

[1] https://w3c.github.io/webrtc-pc/archives/20160913/webrtc.html#dom-rtcrtptransceiver-mid

Test: fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
Don't break after finding the first transceiver in the loop that builds the send source map.
Update the mid used to register the muted remote source if the a transceiver's mid gets
assigned by a remote media description.
(WebCore::createSourceMap):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
* platform/mediastream/MediaEndpoint.cpp:
* platform/mediastream/MediaEndpoint.h:
* platform/mock/MockMediaEndpoint.cpp:
(WebCore::MockMediaEndpoint::MockMediaEndpoint):
(WebCore::MockMediaEndpoint::updateReceiveConfiguration):
(WebCore::MockMediaEndpoint::updateSendConfiguration):
(WebCore::MockMediaEndpoint::createMutedRemoteSource):
(WebCore::MockMediaEndpoint::replaceMutedRemoteSourceMid):
(WebCore::MockMediaEndpoint::emulatePlatformEvent):
Add "unmute-remote-sources-by-mid" action that emulates data arriving on media descriptions
which unmutes the remote sources.
(WebCore::MockMediaEndpoint::updateConfigurationMids):
(WebCore::MockMediaEndpoint::unmuteRemoteSourcesByMid):
(WebCore::MockMediaEndpoint::unmuteTimerFired):
* platform/mock/MockMediaEndpoint.h:

LayoutTests:

Test the case when an RTCRtpTransceiver gets its mid assigned from a remote session
description.

* fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html: Added.
* platform/mac/TestExpectations:
Skip above test until the Mac port builds with WEB_RTC.

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

3 years agoMove audio module off of legacy exceptions
darin@apple.com [Tue, 11 Oct 2016 06:23:49 +0000 (06:23 +0000)]
Move audio module off of legacy exceptions
https://bugs.webkit.org/show_bug.cgi?id=163269

Reviewed by Alex Christensen.

* Modules/webaudio/AnalyserNode.cpp:
(WebCore::AnalyserNode::setFftSize): Use ExceptionOr.
(WebCore::AnalyserNode::setMinDecibels): Ditto.
(WebCore::AnalyserNode::setMaxDecibels): Ditto.
(WebCore::AnalyserNode::setSmoothingTimeConstant): Ditto.
* Modules/webaudio/AnalyserNode.h: Update for above.
* Modules/webaudio/AnalyserNode.idl: Ditto.

* Modules/webaudio/AudioBasicInspectorNode.cpp:
(WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode):
Initialize m_needAutomaticPull in class definition.
(WebCore::AudioBasicInspectorNode::connect): Use ExceptionOr.
(WebCore::AudioBasicInspectorNode::disconnect): Ditto.
* Modules/webaudio/AudioBasicInspectorNode.h: Updated for above.

* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::createFromAudioFileData): Use reference.
(WebCore::AudioBuffer::AudioBuffer): Initialize m_gain in class definition.
(WebCore::AudioBuffer::getChannelData): Use ExceptionOr.
(WebCore::AudioBuffer::channelData): Rename to disambiguate with getChannelData.
(WebCore::AudioBuffer::zero): Use modern for loop.
* Modules/webaudio/AudioBuffer.h: Update for above.
* Modules/webaudio/AudioBuffer.idl: Ditto.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::process): Use reference.
(WebCore::AudioBufferSourceNode::setBuffer): Use channelData.
(WebCore::AudioBufferSourceNode::start): Use ExceptionOr.
(WebCore::AudioBufferSourceNode::startPlaying): Ditto.
* Modules/webaudio/AudioBufferSourceNode.h: Update for above.
* Modules/webaudio/AudioBufferSourceNode.idl: Ditto.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createBuffer): Use ExceptionOr.
(WebCore::AudioContext::createMediaElementSource): Ditto.
(WebCore::AudioContext::createMediaStreamSource): Ditto.
(WebCore::AudioContext::createScriptProcessor): Ditto.
(WebCore::AudioContext::createDelay): Ditto.
(WebCore::AudioContext::createChannelSplitter): Ditto.
(WebCore::AudioContext::createChannelMerger): Ditto.
(WebCore::AudioContext::createPeriodicWave): Ditto.
* Modules/webaudio/AudioContext.h: Update for above.
* Modules/webaudio/AudioContext.idl: Ditto.

* Modules/webaudio/AudioDestinationNode.h: Use unsigned instead
of unsigned long for maxChannelCount.

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::connect): Use ExceptionOr.
(WebCore::AudioNode::disconnect): Ditto.
(WebCore::AudioNode::channelCount): Use unsigned.
(WebCore::AudioNode::setChannelCount): Use ExceptionOr and unsigned.
(WebCore::AudioNode::setChannelCountMode): Ditto.
(WebCore::AudioNode::setChannelInterpretation): Ditto.
* Modules/webaudio/AudioNode.h: Update for above.
* Modules/webaudio/AudioNode.idl: Ditto.

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
Initialize data members in class definition.
(WebCore::AudioScheduledSourceNode::updateSchedulingInfo): Take
a reference instead of a pointer to the audio bus.
(WebCore::AudioScheduledSourceNode::start): Use ExceptionOr.
(WebCore::AudioScheduledSourceNode::stop): Ditto.
* Modules/webaudio/AudioScheduledSourceNode.h: Update for above.

* Modules/webaudio/ConvolverNode.cpp:
(WebCore::ConvolverNode::ConvolverNode): Initialize m_normalize
in class definition.
(WebCore::ConvolverNode::setBuffer): Use ExceptionOr.
* Modules/webaudio/ConvolverNode.h: Update for above.
* Modules/webaudio/ConvolverNode.idl: Ditto.

* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode):
Initialize m_numberOfInputChannels in class definition.
(WebCore::DefaultAudioDestinationNode::maxChannelCount): Use unsigned.
(WebCore::DefaultAudioDestinationNode::setChannelCount): Use ExceptionOr.
* Modules/webaudio/DefaultAudioDestinationNode.h: Update for changes above.

* Modules/webaudio/DelayNode.cpp:
(WebCore::DelayNode::DelayNode): Moved exception logic out of constructor.
(WebCore::DelayNode::create): Added. Moved exception logic in here.
(WebCore::DelayNode::delayTime): Moved typecast here from header.
* Modules/webaudio/DelayNode.h: Update for above.

* Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::OfflineAudioContext): Marked inline.
(WebCore::OfflineAudioContext::create): Use ExceptionOr.
(WebCore::OfflineAudioContext::~OfflineAudioContext): Deleted. Unneeded.
* Modules/webaudio/OfflineAudioContext.h: Update for above.
* Modules/webaudio/OfflineAudioContext.idl: Ditto.

* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::offlineRender): Use channelData.

* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode): Updated for change to setType.
(WebCore::OscillatorNode::setType): Use ExceptionOr.
(WebCore::OscillatorNode::process): Use a reference.
* Modules/webaudio/OscillatorNode.h: Update for above.
* Modules/webaudio/OscillatorNode.idl: Ditto.

* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::process): Use channelData.

* bindings/js/JSDOMBinding.h: Added overloads of toJS to it can be used on
references to array buffers and array buffer views, not just pointers.

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

3 years agoChange HTTPHeaderValues from a struct to a namespace
commit-queue@webkit.org [Tue, 11 Oct 2016 06:10:47 +0000 (06:10 +0000)]
Change HTTPHeaderValues from a struct to a namespace
https://bugs.webkit.org/show_bug.cgi?id=163203

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Alex Christensen.

No change of behavior.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* platform/network/HTTPHeaderValues.cpp:
(WebCore::HTTPHeaderValues::textPlainContentType):
(WebCore::HTTPHeaderValues::formURLEncodedContentType):
(WebCore::HTTPHeaderValues::TextPlainContentType): Deleted.
(WebCore::HTTPHeaderValues::FormURLEncodedContentType): Deleted.
* platform/network/HTTPHeaderValues.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):

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

3 years ago[EFL] Skip imported/w3c/web-platform-tests for a while
gyuyoung.kim@webkit.org [Tue, 11 Oct 2016 06:08:52 +0000 (06:08 +0000)]
[EFL] Skip imported/w3c/web-platform-tests for a while

Unreviewed EFL gardening.

Many imported/w3c/web-platform-tests have been failed, timeout, and crash.
So skip the tests until fixing all problems.

Additionally this patch removes duplciated tests.

Patch by Gyuyoung Kim <gyuyoung.kim@navercorp.com> on 2016-10-10

* platform/efl/TestExpectations:

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

3 years agoNetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse...
carlosgc@webkit.org [Tue, 11 Oct 2016 05:28:44 +0000 (05:28 +0000)]
NetworkSession: NetworkDataTask is leaked if download finishes in didReceiveResponse completion handler
https://bugs.webkit.org/show_bug.cgi?id=163204

Reviewed by Alex Christensen.

After the completion handler a reference of the NetworkDataTask is saved in m_downloadsAfterDestinationDecided.
If the download failed or was canceled DownloadManager::dataTaskBecameDownloadTask is never called and the data
task is kept in the download manager forever. This patch exposes NSURLSessionTask state property in
NetworkDataTask, so that the download manager can check the task state after the completion handler and return
early if the download finished or was cancelled.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::continueDecidePendingDownloadDestination):
* NetworkProcess/NetworkDataTask.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::state):

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

3 years agoUpdate WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event]
cdumez@apple.com [Tue, 11 Oct 2016 04:43:26 +0000 (04:43 +0000)]
Update WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163254

Reviewed by Darin Adler.

Source/WebCore:

Update WheelEvent / MouseEvent to stop using legacy [ConstructorTemplate=Event]
and use a regular constructor instead, as in the specification:
- https://www.w3.org/TR/uievents/#interface-mouseevent
- https://www.w3.org/TR/uievents/#interface-wheelevent

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateDictionaryHeader):
Fix our broken dependency tracking when it comes to dictionaries.

* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
* dom/MouseEvent.h:
* dom/MouseEvent.idl:
* dom/MouseEventInit.h: Added.
* dom/MouseEventInit.idl: Added.
* dom/MouseRelatedEvent.cpp:
(WebCore::MouseRelatedEvent::MouseRelatedEvent):
* dom/MouseRelatedEvent.h:
* dom/UIEventWithKeyState.h:
(WebCore::UIEventWithKeyState::UIEventWithKeyState):
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* dom/WheelEvent.h:
* dom/WheelEvent.idl:

LayoutTests:

Update existing tests now that:
- Exception messages are now slightly different in some cases.
- We now throw when an invalid relatedTarget type is passed in the dictionary.

* fast/events/constructors/mouse-event-constructor.html:
* fast/events/constructors/wheel-event-constructor.html:
* platform/mac/fast/events/constructors/mouse-event-constructor-expected.txt:
* platform/mac/fast/events/constructors/wheel-event-constructor-expected.txt:

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

3 years agoAdd support for languagechange event
cdumez@apple.com [Tue, 11 Oct 2016 04:33:56 +0000 (04:33 +0000)]
Add support for languagechange event
https://bugs.webkit.org/show_bug.cgi?id=163222

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt:

Source/WebCore:

Add support for languagechange event:
- https://html.spec.whatwg.org/#dom-navigator-languages

Firefox and Chrome already support this.

Test: fast/dom/window-languagechange-event.html

* dom/EventNames.h:
* html/HTMLAttributeNames.in:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
* page/DOMWindow.cpp:
(WebCore::languagesChangedCallback):
(WebCore::DOMWindow::DOMWindow):
(WebCore::DOMWindow::~DOMWindow):
(WebCore::DOMWindow::languagesChanged):
(WebCore::DOMWindow::canShowModalDialog): Deleted.
(WebCore::DOMWindow::removeEventListener): Deleted.
* page/DOMWindow.h:
* page/WindowEventHandlers.idl:

LayoutTests:

Add layout test coverage.

* fast/dom/window-languagechange-event-expected.txt: Added.
* fast/dom/window-languagechange-event.html: Added.

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

3 years agoB3->Air lowering should be able to emit complex leas on x86
fpizlo@apple.com [Tue, 11 Oct 2016 03:39:05 +0000 (03:39 +0000)]
B3->Air lowering should be able to emit complex leas on x86
https://bugs.webkit.org/show_bug.cgi?id=163234

Reviewed by Saam Barati.

This adds comprehensive support for emitting lea on x86.

When adding this, I found that it was useful to also finally add more reassociation. That
reduces the amount of patterns that the instruction selector has to deal with.

* assembler/MacroAssembler.h:
(JSC::MacroAssembler::lea32):
(JSC::MacroAssembler::lea64):
(JSC::MacroAssembler::lea): Deleted.
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::commitInternal):
(JSC::B3::Air::LowerToAir::tryAppendLea):
(JSC::B3::Air::LowerToAir::lower):
(JSC::B3::Air::LowerToAir::createSelect): Deleted.
* b3/B3ReduceStrength.cpp:
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::isRepresentableAs):
(JSC::B3::Value::representableAs): Deleted.
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp: Lots of tests for lea and reassociation.

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

3 years agoUpdate GamepadEvent to stop using legacy [ConstructorTemplate=Event]
cdumez@apple.com [Tue, 11 Oct 2016 02:55:26 +0000 (02:55 +0000)]
Update GamepadEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163243

Reviewed by Darin Adler.

Update GamepadEvent to stop using legacy [ConstructorTemplate=Event]
and use a proper constructor as in the specification:
- https://w3c.github.io/gamepad/#gamepadevent-interface

* Modules/gamepad/GamepadEvent.cpp:
(WebCore::GamepadEvent::GamepadEvent):
* Modules/gamepad/GamepadEvent.h:
(WebCore::GamepadEvent::create):
(WebCore::GamepadEvent::~GamepadEvent): Deleted.
* Modules/gamepad/GamepadEvent.idl:

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

3 years agoMove Fetch from legacy to new DOM exceptions
darin@apple.com [Tue, 11 Oct 2016 02:21:58 +0000 (02:21 +0000)]
Move Fetch from legacy to new DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163195

Reviewed by Chris Dumez.

* Modules/fetch/FetchHeaders.cpp:
(WebCore::canWriteHeader): Use ExceptionOr.
(WebCore::FetchHeaders::append): Ditto.
(WebCore::FetchHeaders::remove): Ditto.
(WebCore::FetchHeaders::get): Ditto.
(WebCore::FetchHeaders::has): Ditto.
(WebCore::FetchHeaders::set): Ditto.
(WebCore::FetchHeaders::filterAndFill): Ditto.
(WebCore::FetchHeaders::Iterator::next): Got rid of unneeded code to
clear out m_keys after the last call to next, since it will be deleted
as soon as the iterator is deleted.

* Modules/fetch/FetchHeaders.h: Use pragma once. Use ExceptionOr.

* Modules/fetch/FetchHeaders.idl: Move to non-legacy exceptions.

* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::setBody): Use ExceptionOr.
(WebCore::FetchRequest::clone): Ditto.

* Modules/fetch/FetchRequest.h: Use pragma once. Use ExceptionOr.

* Modules/fetch/FetchRequest.idl: Move to non-legacy exceptions.

* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::redirect): Use ExceptionOr.
(WebCore::FetchResponse::setStatus): Ditto.

* Modules/fetch/FetchResponse.h: Use ExceptionOr.

* Modules/fetch/FetchResponse.idl: Move to non-legacy exceptions.

* bindings/js/JSDOMBinding.h: Added implementation of toJSNullableString.

* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Call toJSNullableString and toJSString for
functions that return ExceptionOr<String>.

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

3 years agoChange ArrayPrototype.cpp's putLength() and setLength() to take a VM& so that we...
mark.lam@apple.com [Tue, 11 Oct 2016 00:45:45 +0000 (00:45 +0000)]
Change ArrayPrototype.cpp's putLength() and setLength() to take a VM& so that we can use vm.propertyNames.
https://bugs.webkit.org/show_bug.cgi?id=163260

Reviewed by Saam Barati.

In all cases where we call these, we already have the VM& anyway.

* runtime/ArrayPrototype.cpp:
(JSC::putLength):
(JSC::setLength):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):

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

3 years agoAX: Expose invalid status for input types with that information
n_wang@apple.com [Tue, 11 Oct 2016 00:11:40 +0000 (00:11 +0000)]
AX: Expose invalid status for input types with that information
https://bugs.webkit.org/show_bug.cgi?id=163252
<rdar://problem/28704409>

Reviewed by Chris Fleizach.

Source/WebCore:

For input types with invalid input value, we should expose the invalid
status to the assitive technology.

Test: accessibility/mac/invalid-status-for-input-types.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::invalidStatus):

LayoutTests:

* accessibility/mac/invalid-status-for-input-types-expected.txt: Added.
* accessibility/mac/invalid-status-for-input-types.html: Added.

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

3 years agoAdded override specifier to PluginViewBase::isPluginViewBase()
annulen@yandex.ru [Mon, 10 Oct 2016 23:59:46 +0000 (23:59 +0000)]
Added override specifier to PluginViewBase::isPluginViewBase()
https://bugs.webkit.org/show_bug.cgi?id=163218

Reviewed by Alex Christensen.

No new tests needed.

* plugins/PluginViewBase.h:

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

3 years agoDon't run SecurityOrigin's port through URLParser
achristensen@apple.com [Mon, 10 Oct 2016 23:51:56 +0000 (23:51 +0000)]
Don't run SecurityOrigin's port through URLParser
https://bugs.webkit.org/show_bug.cgi?id=163253

Reviewed by Brady Eidson.

No change in behavior.

* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier):
(WebCore::SecurityOrigin::create):
We used to parse URLs like "file://:0/" which are valid when using URL::parse
but aren't valid when we start using the URLParser, which matches other browsers' failure
to parse URLs with a port but no host. There is no reason to write and parse the port.
Setting m_port directly accomplishes the same thing.

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

3 years agoMarking two media/modern-media-controls tests as failing.
ryanhaddad@apple.com [Mon, 10 Oct 2016 23:51:25 +0000 (23:51 +0000)]
Marking two media/modern-media-controls tests as failing.
https://bugs.webkit.org/show_bug.cgi?id=163248

Unreviewed test gardening.

* TestExpectations:

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

3 years agoTestExpectations cleanup for LayoutTests that no longer exist.
ryanhaddad@apple.com [Mon, 10 Oct 2016 23:31:11 +0000 (23:31 +0000)]
TestExpectations cleanup for LayoutTests that no longer exist.

Unreviewed test gardening.

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

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

3 years ago<Error>: CGContextSetLineDash: invalid dash array: at least one element must be non...
commit-queue@webkit.org [Mon, 10 Oct 2016 23:02:04 +0000 (23:02 +0000)]
<Error>: CGContextSetLineDash: invalid dash array: at least one element must be non-zero
https://bugs.webkit.org/show_bug.cgi?id=138555

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-10-10
Reviewed by Simon Fraser.

Ensure the dashArray has at least one non-zero element before calling
GraphicsContext::setLineDash(). Call GraphicsContext::setStrokeStyle()
instead, if the dashArray does not have one.

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):

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

3 years agoAdd baseline for two tests imported with r206999.
ryanhaddad@apple.com [Mon, 10 Oct 2016 22:16:05 +0000 (22:16 +0000)]
Add baseline for two tests imported with r206999.

Unreviewed test gardening.

* web-platform-tests/touch-events/touch-retargeting-expected.txt: Added.
* web-platform-tests/touch-events/touch-touchevent-constructor-expected.txt: Added.

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

3 years ago[Win][Direct2D] Correct Radial Graident Bug
bfulgham@apple.com [Mon, 10 Oct 2016 22:10:55 +0000 (22:10 +0000)]
[Win][Direct2D] Correct Radial Graident Bug
https://bugs.webkit.org/show_bug.cgi?id=163241

Reviewed by Darin Adler.

Radial gradients were not working correctly under Direct2D because the
points and radius values used were incorrect. D2D wants a center point and
an offset, not a start and end point. It wants an X and Y radius (for an
ellipse), not a radius at the start point, and a radius at the end point.

Covered by existing fast/gradients/css-radial-gradients.html (and others).

* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled): Remove 'notImplemented' code path.
* platform/graphics/win/GradientDirect2D.cpp:
(WebCore::Gradient::generateGradient): Use correct input values to
the Radial Gradient constructor.
(WebCore::Gradient::fill): Generate a gradient if we have no active
one to use.

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

3 years agoRename CryptoAlgorithmParameters to CryptoAlgorithmParametersDeprecated
jiewen_tan@apple.com [Mon, 10 Oct 2016 22:07:19 +0000 (22:07 +0000)]
Rename CryptoAlgorithmParameters to CryptoAlgorithmParametersDeprecated
https://bugs.webkit.org/show_bug.cgi?id=163163
<rdar://problem/28681544>

Reviewed by Brent Fulgham.

Replace all uses of 'CryptoAlgorithmParameters' with 'CryptoAlgorithmParametersDeprecated' in preparation for a new CryptoAlgorithmParameters type.

No changes of behaviors. No new tests.

* Modules/encryptedmedia/CDMSessionClearKey.cpp:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCryptoAlgorithmDictionary.cpp:
* bindings/js/JSCryptoAlgorithmDictionary.h:
* bindings/js/JSCryptoKeySerializationJWK.cpp:
* bindings/js/JSCryptoKeySerializationJWK.h:
* bindings/js/JSWebKitSubtleCryptoCustom.cpp:
* crypto/CryptoAlgorithm.cpp:
* crypto/CryptoAlgorithm.h:
* crypto/CryptoAlgorithmParametersDeprecated.h: Renamed from Source/WebCore/crypto/CryptoAlgorithmParameters.h.
* crypto/CryptoKeySerialization.h:
* crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
* crypto/algorithms/CryptoAlgorithmAES_CBC.h:
* crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
* crypto/algorithms/CryptoAlgorithmAES_KW.h:
* crypto/algorithms/CryptoAlgorithmHMAC.cpp:
* crypto/algorithms/CryptoAlgorithmHMAC.h:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
* crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
* crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
* crypto/algorithms/CryptoAlgorithmSHA1.h:
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
* crypto/algorithms/CryptoAlgorithmSHA224.h:
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
* crypto/algorithms/CryptoAlgorithmSHA256.h:
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
* crypto/algorithms/CryptoAlgorithmSHA384.h:
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
* crypto/algorithms/CryptoAlgorithmSHA512.h:
* crypto/keys/CryptoKeySerializationRaw.cpp:
* crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
* crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
* crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
* crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
* crypto/keys/CryptoKeySerializationRaw.h:
* crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
* crypto/mac/CryptoAlgorithmHMACMac.cpp:
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
* crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
* crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesCbcParams.h.
* crypto/parameters/CryptoAlgorithmAesKeyGenParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmAesKeyGenParams.h.
* crypto/parameters/CryptoAlgorithmHmacKeyParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacKeyParams.h.
* crypto/parameters/CryptoAlgorithmHmacParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmHmacParams.h.
* crypto/parameters/CryptoAlgorithmRsaKeyGenParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h.
* crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHashDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaKeyParamsWithHash.h.
* crypto/parameters/CryptoAlgorithmRsaOaepParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaOaepParams.h.
* crypto/parameters/CryptoAlgorithmRsaSsaParamsDeprecated.h: Renamed from Source/WebCore/crypto/parameters/CryptoAlgorithmRsaSsaParams.h.

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

3 years agoMarking tiled-drawing/scrolling/latched-div-with-scroll-snap.html as flaky on mac...
ryanhaddad@apple.com [Mon, 10 Oct 2016 21:50:10 +0000 (21:50 +0000)]
Marking tiled-drawing/scrolling/latched-div-with-scroll-snap.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=162505

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoMove NotificationCenter from legacy to new DOM exceptions
darin@apple.com [Mon, 10 Oct 2016 21:33:25 +0000 (21:33 +0000)]
Move NotificationCenter from legacy to new DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163217

Reviewed by Chris Dumez.

Source/WebCore:

* Modules/notifications/DOMWindowNotifications.cpp:
(WebCore::DOMWindowNotifications::webkitNotifications): Pass reference to
document instead of pointer. Also use auto and early return.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification): Move checks that can lead to
throwing an exception out of the constructor into the create function.
(WebCore::Notification::create): Changed to use ExceptionOr. Also moved
checks that can lead to throwing an exception here.
(WebCore::Notification::show): Update since NotificationController::client
now returns a reference.
(WebCore::Notification::permission): Ditto.
(WebCore::Notification::requestPermission): Ditto.

* Modules/notifications/Notification.h: Updated for above changes.

* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::create): Take a reference to the script execution
context instead of a pointer.
(WebCore::NotificationCenter::NotificationCenter): Ditto.
(WebCore::NotificationCenter::createNotification): Use ExceptionOr.
(WebCore::NotificationCenter::requestPermission): Take an rvalue reference.

* Modules/notifications/NotificationCenter.h: Use pragma once.
Marked the class final. Updated for changes above.

* Modules/notifications/NotificationCenter.idl: Use non-legacy exceptions.

* Modules/notifications/NotificationController.cpp:
(WebCore::NotificationController::NotificationController): Use a reference rather
than a pointer for m_client, since it is never null.
(WebCore::NotificationController::~NotificationController): Ditto.
(WebCore::NotificationController::clientFrom): Updated for the change above.

* Modules/notifications/NotificationController.h: Updated for the change above.

* Modules/notifications/WorkerGlobalScopeNotifications.cpp:
(WebCore::WorkerGlobalScopeNotifications::webkitNotifications): Updated to
pass a reference for the script execution context. Also added FIXME about the
fact that the client is always null.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _notificationIDForTesting:]): Pass reference to page rather than pointer.

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

3 years ago[Modern Media Controls] Placards
commit-queue@webkit.org [Mon, 10 Oct 2016 21:17:47 +0000 (21:17 +0000)]
[Modern Media Controls] Placards
https://bugs.webkit.org/show_bug.cgi?id=163110
<rdar://problem/28669342>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-10
Reviewed by Dean Jackson.

Source/WebCore:

Inline media controls need to display placards when the video is no longer playing inline,
such as when the video is playing fullscreen or via AirPlay. To that end, we introduce a
new Placard class and two subclasses for display during fullscreen or AirPlay playback.
Note that localization will be done in a later patch.

Tests: media/modern-media-controls/airplay-placard/airplay-placard.html
       media/modern-media-controls/pip-placard/pip-placard.html
       media/modern-media-controls/placard/placard.html

* Modules/modern-media-controls/controls/airplay-placard.js:
(AirplayPlacard):
* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/controls/pip-placard.js:
(PiPPlacard):
* Modules/modern-media-controls/controls/placard.css:
(.placard):
(.placard .container):
(.placard .icon):
(.placard .title,):
(.placard .title):
(.placard .description):
* Modules/modern-media-controls/controls/placard.js:
(Placard.):
* Modules/modern-media-controls/images/iOS/airplay-placard@1x.png: Added.
* Modules/modern-media-controls/images/iOS/airplay-placard@2x.png: Added.
* Modules/modern-media-controls/images/iOS/airplay-placard@3x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-placard@1x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-placard@2x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-placard@3x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay-placard@1x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay-placard@2x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-placard@1x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-placard@2x.png: Added.

LayoutTests:

Testing the properties of the new Placard class and its subclasses.

* media/modern-media-controls/airplay-placard/airplay-placard-expected.txt: Added.
* media/modern-media-controls/airplay-placard/airplay-placard.html: Added.
* media/modern-media-controls/pip-placard/pip-placard-expected.txt: Added.
* media/modern-media-controls/pip-placard/pip-placard.html: Added.
* media/modern-media-controls/placard/placard-expected.txt: Added.
* media/modern-media-controls/placard/placard.html: Added.

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

3 years agoRename the StrictModeReadonlyPropertyWriteError string to ReadonlyPropertyWriteError.
mark.lam@apple.com [Mon, 10 Oct 2016 21:13:26 +0000 (21:13 +0000)]
Rename the StrictModeReadonlyPropertyWriteError string to ReadonlyPropertyWriteError.
https://bugs.webkit.org/show_bug.cgi?id=163239

Reviewed by Filip Pizlo.

This string is also used for reporting the same error in cases which have nothing
to do with strict mode.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitReadOnlyExceptionIfNeeded):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/GetterSetter.cpp:
(JSC::callSetter):
* runtime/JSArray.cpp:
(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::pop):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::put):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::put):
(JSC::JSModuleNamespaceObject::putByIndex):
* runtime/JSObject.cpp:
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTablePut):
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayEntry::put):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):

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

3 years agoMarking fast/replaced/preferred-widths.html as flaky on mac.
ryanhaddad@apple.com [Mon, 10 Oct 2016 21:07:33 +0000 (21:07 +0000)]
Marking fast/replaced/preferred-widths.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=116621

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoAdd support for Navigator.languages attribute
cdumez@apple.com [Mon, 10 Oct 2016 21:01:39 +0000 (21:01 +0000)]
Add support for Navigator.languages attribute
https://bugs.webkit.org/show_bug.cgi?id=163220

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigatorlanguage-expected.txt:

Source/WebCore:

Add support for Navigator.languages attribute:
- https://html.spec.whatwg.org/#navigatorlanguage

Firefox and Chrome already support this.

Currently, we always return a single language for privacy reasons so
this API does not actually bring anything new besides interoperability
with other browsers and compliance with the HTML specification.

No new tests, rebaselined existing tests.

* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::languages):
* page/NavigatorBase.h:
* page/NavigatorLanguage.idl:

LayoutTests:

Rebase existing test to reflect change.

* fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac-wk2/fast/dom/navigator-detached-no-crash-expected.txt:

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

3 years ago[Win][Direct2D] Implement dashed and dotted border line drawing
bfulgham@apple.com [Mon, 10 Oct 2016 20:59:48 +0000 (20:59 +0000)]
[Win][Direct2D] Implement dashed and dotted border line drawing
https://bugs.webkit.org/show_bug.cgi?id=163235

Reviewed by Alex Christensen.

Covered by existing fast/border tests.

* platform/graphics/GraphicsContext.cpp: Use custom 'setPlatformStrokeStyle' for D2D.
* platform/graphics/Path.cpp:
(WebCore::Path::length): Don't use default implementation for Direct2D.
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContextPlatformPrivate::brushWithColor): Initialize pointer to nullptr.
(WebCore::GraphicsContext::drawRect): Use proper stroke style.
(WebCore::GraphicsContextPlatformPrivate::setLineCap): Added.
(WebCore::GraphicsContextPlatformPrivate::setLineJoin): Added.
(WebCore::GraphicsContextPlatformPrivate::setStrokeStyle): Added.
(WebCore::GraphicsContextPlatformPrivate::setMiterLimit): Added.
(WebCore::GraphicsContextPlatformPrivate::setDashOffset): Added.
(WebCore::GraphicsContextPlatformPrivate::setPatternWidth): Added.
(WebCore::GraphicsContextPlatformPrivate::setPatternOffset): Added.
(WebCore::GraphicsContextPlatformPrivate::setStrokeThickness): Added.
(WebCore::GraphicsContextPlatformPrivate::setDashes): Added.
(WebCore::GraphicsContextPlatformPrivate::recomputeStrokeStyle): Added.
(WebCore::GraphicsContextPlatformPrivate::strokeStyle): Added.
(WebCore::GraphicsContext::drawLine): Use proper stroke style.
(WebCore::GraphicsContext::drawEllipse): Ditto.
(WebCore::GraphicsContext::drawPath): Ditto.
(WebCore::GraphicsContext::strokePath): Ditto.
(WebCore::GraphicsContext::setPlatformStrokeStyle): Added.
(WebCore::GraphicsContext::setMiterLimit): Tell D2D context about miter limit.
(WebCore::GraphicsContext::setLineCap): Ditto for line cap.
(WebCore::GraphicsContext::setLineDash): Ditto for dashes.
(WebCore::GraphicsContext::setLineJoin): Ditto for join style.
(WebCore::GraphicsContext::setPlatformStrokeThickness): Ditto for stroke thickness.
(WebCore::GraphicsContext::platformStrokeEllipse): Use proper stroke style.
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
* platform/graphics/win/PathDirect2D.cpp:
(WebCore::Path::currentPoint): Zero-initialize a value.
(WebCore::Path::length): Added.

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

3 years agoUpdate ProgressEvent to stop using legacy [ConstructorTemplate=Event]
cdumez@apple.com [Mon, 10 Oct 2016 20:57:37 +0000 (20:57 +0000)]
Update ProgressEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163221

Reviewed by Darin Adler.

Update ProgressEvent to stop using legacy [ConstructorTemplate=Event]
and use a regular constructor as in the specification:
- https://xhr.spec.whatwg.org/#firing-events-using-the-progressevent-interface

* dom/ProgressEvent.cpp:
(WebCore::ProgressEvent::ProgressEvent):
* dom/ProgressEvent.h:
(WebCore::ProgressEvent::create):
* dom/ProgressEvent.idl:

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

3 years agoAddress some review feedback from r206979 and r207010
wenson_hsieh@apple.com [Mon, 10 Oct 2016 20:52:54 +0000 (20:52 +0000)]
Address some review feedback from r206979 and r207010
https://bugs.webkit.org/show_bug.cgi?id=163236

Reviewed by Tim Horton.

In TypingCommand.h, some methods on TypingCommand should be marked as final to reflect the fact that they
override methods in CompositeEditCommand. Also, HTMLFormControlElement::dispatchFormControlInputEvent does not
need to specify HTMLElement::dispatchInputEvent() when calling dispatchInputEvent().

No new tests, since there is no behavior change.

* editing/TypingCommand.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):

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

3 years agocompileCheckStringIdent in the FTL is wrong
sbarati@apple.com [Mon, 10 Oct 2016 20:33:46 +0000 (20:33 +0000)]
compileCheckStringIdent in the FTL is wrong
https://bugs.webkit.org/show_bug.cgi?id=163215

Reviewed by Mark Lam and Filip Pizlo.

lowStringIdent() returns the StringImpl pointer. The compileCheckStringIdent()
was treating its return value as the actual JSString. This is wrong.

* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckStringIdent):

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

3 years agoUpdate MessageEvent to stop using legacy [ConstructorTemplate=Event]
cdumez@apple.com [Mon, 10 Oct 2016 20:21:30 +0000 (20:21 +0000)]
Update MessageEvent to stop using legacy [ConstructorTemplate=Event]
https://bugs.webkit.org/show_bug.cgi?id=163187

Reviewed by Darin Adler.

Source/WebCore:

Update MessageEvent to stop using legacy [ConstructorTemplate=Event] and
use a regular constructor as in the specification:
- https://html.spec.whatwg.org/multipage/comms.html#the-messageevent-interfaces

No new tests, updated existing test.

* bindings/js/JSDOMBinding.h:
(WebCore::toRefPtrNativeArray):
* bindings/js/JSDOMConvert.h:
(WebCore::convertWrapperTypeSequence):
(WebCore::convertWrapperType): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDefaultValue):
(GenerateDictionaryImplementationContent):
(GetNativeType):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::trySerializeData):
(WebCore::MessageEvent::createForBindings): Deleted.
(WebCore::MessageEvent::initMessageEvent): Deleted.
* dom/MessageEvent.h:
* dom/MessageEvent.idl:

LayoutTests:

Rebaseline existing test now that:
- Exception messages are sometimes a bit different
- We properly use the default member value when input is an explicit undefined
- We throw in more cases of bad input

* fast/events/constructors/message-event-constructor-expected.txt:
* fast/events/constructors/message-event-constructor.html:

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

3 years ago[Modern Media Controls] Buttons
commit-queue@webkit.org [Mon, 10 Oct 2016 20:14:43 +0000 (20:14 +0000)]
[Modern Media Controls] Buttons
https://bugs.webkit.org/show_bug.cgi?id=163109
<rdar://problem/28668954>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-10
Reviewed by Dean Jackson.

Source/WebCore:

We introduce specific IconButton subclasses for the various buttons we will be using
in media controls on macOS (inline and fullscreen) and iOS. One class, StartButton, is
a subclass of Button and not IconButton because we're only interested in having it display
an <img> element rather than use a mask and requires additional DOM structure.

Tests: media/modern-media-controls/airplay-button/airplay-button-on.html
       media/modern-media-controls/airplay-button/airplay-button.html
       media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html
       media/modern-media-controls/forward-button/forward-button.html
       media/modern-media-controls/fullscreen-button/fullscreen-button.html
       media/modern-media-controls/mute-button/mute-button.html
       media/modern-media-controls/pip-button/pip-button.html
       media/modern-media-controls/play-pause-button/play-pause-button.html
       media/modern-media-controls/rewind-button/rewind-button.html
       media/modern-media-controls/skip-back-button/skip-back-button.html
       media/modern-media-controls/start-button/start-button.html
       media/modern-media-controls/tracks-button/tracks-button.html

* Modules/modern-media-controls/controls/airplay-button.css:
(button.airplay.on):
* Modules/modern-media-controls/controls/airplay-button.js:
(AirplayButton):
(AirplayButton.prototype.set on):
* Modules/modern-media-controls/controls/aspect-ratio-button.js:
(AspectRatioButton):
(AspectRatioButton.prototype.get scalesToFill):
(AspectRatioButton.prototype.set scalesToFill):
* Modules/modern-media-controls/controls/forward-button.js:
(ForwardButton):
* Modules/modern-media-controls/controls/fullscreen-button.js:
(FullscreenButton):
* Modules/modern-media-controls/controls/icon-button.js:
* Modules/modern-media-controls/controls/icon-service.js:
* Modules/modern-media-controls/controls/mute-button.js:
(MuteButton):
(MuteButton.prototype.get muted):
(MuteButton.prototype.set muted):
* Modules/modern-media-controls/controls/pip-button.js:
(PiPButton):
* Modules/modern-media-controls/controls/play-pause-button.js:
(PlayPauseButton):
(PlayPauseButton.prototype.get playing):
(PlayPauseButton.prototype.set playing):
* Modules/modern-media-controls/controls/rewind-button.js:
(RewindButton):
* Modules/modern-media-controls/controls/skip-back-button.js:
(SkipBackButton):
* Modules/modern-media-controls/controls/start-button.js:
(StartButton):
* Modules/modern-media-controls/controls/tracks-button.js:
(TracksButton):
* Modules/modern-media-controls/images/iOS/airplay@1x.png: Added.
* Modules/modern-media-controls/images/iOS/airplay@2x.png: Added.
* Modules/modern-media-controls/images/iOS/enter-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/iOS/enter-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/iOS/enter-fullscreen@3x.png: Added.
* Modules/modern-media-controls/images/iOS/interval-skip-back@1x.png: Added.
* Modules/modern-media-controls/images/iOS/interval-skip-back@2x.png: Added.
* Modules/modern-media-controls/images/iOS/interval-skip-back@3x.png: Added.
* Modules/modern-media-controls/images/iOS/pause@1x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-in@1x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-in@2x.png: Added.
* Modules/modern-media-controls/images/iOS/pip-in@3x.png: Added.
* Modules/modern-media-controls/images/iOS/play@1x.png: Added.
* Modules/modern-media-controls/images/iOS/play@2x.png: Added.
* Modules/modern-media-controls/images/iOS/play@3x.png: Added.
* Modules/modern-media-controls/images/iOS/start@1x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay@1x.png: Added.
* Modules/modern-media-controls/images/macOS/airplay@2x.png: Added.
* Modules/modern-media-controls/images/macOS/enter-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/enter-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/macOS/exit-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/exit-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/macOS/forward@1x.png: Added.
* Modules/modern-media-controls/images/macOS/forward@2x.png: Added.
* Modules/modern-media-controls/images/macOS/interval-skip-back@1x.png: Added.
* Modules/modern-media-controls/images/macOS/interval-skip-back@2x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection@1x.png: Added.
* Modules/modern-media-controls/images/macOS/media-selection@2x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-in@1x.png: Added.
* Modules/modern-media-controls/images/macOS/pip-in@2x.png: Added.
* Modules/modern-media-controls/images/macOS/play-fullscreen@1x.png: Added.
* Modules/modern-media-controls/images/macOS/play-fullscreen@2x.png: Added.
* Modules/modern-media-controls/images/macOS/play@1x.png: Added.
* Modules/modern-media-controls/images/macOS/play@2x.png: Added.
* Modules/modern-media-controls/images/macOS/rewind@1x.png: Added.
* Modules/modern-media-controls/images/macOS/rewind@2x.png: Added.
* Modules/modern-media-controls/images/macOS/scale-to-fill@1x.png: Added.
* Modules/modern-media-controls/images/macOS/scale-to-fill@2x.png: Added.
* Modules/modern-media-controls/images/macOS/scale-to-fit@1x.png: Added.
* Modules/modern-media-controls/images/macOS/scale-to-fit@2x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-mute@1x.png: Added.
* Modules/modern-media-controls/images/macOS/volume-mute@2x.png: Added.
* Modules/modern-media-controls/images/macOS/volume@1x.png: Added.
* Modules/modern-media-controls/images/macOS/volume@2x.png: Added.

LayoutTests:

Adding new tests for all new button types introduced, including any custom JS properties
and backing DOM structure that they may have, as well as checking which assets are loaded.

* media/modern-media-controls/airplay-button/airplay-button-expected.txt: Added.
* media/modern-media-controls/airplay-button/airplay-button-on-expected.txt: Added.
* media/modern-media-controls/airplay-button/airplay-button-on.html: Added.
* media/modern-media-controls/airplay-button/airplay-button.html: Added.
* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button-expected.txt: Added.
* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html: Added.
* media/modern-media-controls/forward-button/forward-button-expected.txt: Added.
* media/modern-media-controls/forward-button/forward-button.html: Added.
* media/modern-media-controls/fullscreen-button/fullscreen-button-expected.txt: Added.
* media/modern-media-controls/fullscreen-button/fullscreen-button.html: Added.
* media/modern-media-controls/mute-button/mute-button-expected.txt: Added.
* media/modern-media-controls/mute-button/mute-button.html: Added.
* media/modern-media-controls/pip-button/pip-button-expected.txt: Added.
* media/modern-media-controls/pip-button/pip-button.html: Added.
* media/modern-media-controls/play-pause-button/play-pause-button-expected.txt: Added.
* media/modern-media-controls/play-pause-button/play-pause-button.html: Added.
* media/modern-media-controls/rewind-button/rewind-button-expected.txt: Added.
* media/modern-media-controls/rewind-button/rewind-button.html: Added.
* media/modern-media-controls/skip-back-button/skip-back-button-expected.txt: Added.
* media/modern-media-controls/skip-back-button/skip-back-button.html: Added.
* media/modern-media-controls/start-button/start-button-expected.txt: Added.
* media/modern-media-controls/start-button/start-button.html: Added.
* media/modern-media-controls/tracks-button/tracks-button-expected.txt: Added.
* media/modern-media-controls/tracks-button/tracks-button.html: Added.
* platform/ios-simulator/media/modern-media-controls/airplay-button/airplay-button-on-expected.txt: Added.

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

3 years agoAX: Update AXPlaceHolder algorithm
n_wang@apple.com [Mon, 10 Oct 2016 20:11:50 +0000 (20:11 +0000)]
AX: Update AXPlaceHolder algorithm
https://bugs.webkit.org/show_bug.cgi?id=163229

Reviewed by Chris Fleizach.

Source/WebCore:

From https://w3c.github.io/html-aam/
When the placeholder and aria-placeholder attributes are both present, we
should expose the value of the placeholder attribute. Updated the algorithm
for that.

Changes are covered in the modified test.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::placeholderValue):

LayoutTests:

* accessibility/placeholder-expected.txt:
* accessibility/placeholder.html:

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

3 years ago[DOMJIT] Implement Node accessors in DOMJIT
utatane.tea@gmail.com [Mon, 10 Oct 2016 19:57:55 +0000 (19:57 +0000)]
[DOMJIT] Implement Node accessors in DOMJIT
https://bugs.webkit.org/show_bug.cgi?id=163005

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Add some helper methods and offsetOfXXX for JSC::Weak since it is used
for DOM wrapper caching.

And make DOMJIT::Patchpoint in FTL closer to one in DFG. We add resultConstraint
to avoid the situation that the same register is allocated to child and result.

We also extend DOMJIT::Patchpoint to tell useTagTypeNumberRegister / useTagMaskRegister.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* domjit/DOMJITSlowPathCalls.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckDOM):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* heap/WeakImpl.h:
(JSC::WeakImpl::offsetOfJSValue):
(JSC::WeakImpl::offsetOfWeakHandleOwner):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::boxCell):
(JSC::AssemblyHelpers::boxInt32): Deleted.
* jit/JITOperations.h:

Source/WebCore:

This patch implements DOMJIT accessors in WebCore. We plan to offer 2 things in DOMJIT.

    1. Hand written DOM inlining.

    We inject DOMJIT::Patchpoint compiler into JSC. And JSC uses this to inline DOM operation,
    and drop type checks. Since the operation is fully inlined, potentially it has large
    performance boost. Note that CSS Selector JIT compiler already does the similar things:
    accessing parentNode etc. directly by using offsets.

    2. Exposing signature information.

    We will offer function type signature by some representation and pass it to JSC.
    JSC will use to drop type checks. Since IDL code generator already knows this,
    we can automatically generate such a information. Since we don't perform any inlining,
    the performance boost may be limited. But it's worth doing.

This patch implements the first one, hand written DOM inlining facility. We add a new IDL attribute,
"DOMJIT". This means that "This readonly attribute have a DOMJIT patchpoint compiler".
We annotate several accessors at first. "firstChild", "lastChild", "nextSibling", "previousSibling",
and "parentNode". And we implement DOMJIT::Patchpoint for that in JSNodeDOMJIT.cpp.

This patchpoint will be integrated into JSC's DFG and FTL. And these tiers can drop type checks and
inline the entire code of these accessors. JSC compiler still does not know much about DOM. And WebCore
does not know much about each tier of JSC. WebCore just offers the generic patchpoints and they are
used in both DFG and FTL tiers. The layer separation is still kept.

While very small microbenchmark[1] shows performance benefit, still we cannot improve DOM
benchmarks due to the lack of following implementations. Once the following implementations
are implemented, we will get performance boost.

1. Super polymorphic sites.

    This inlining is super effective if we run some microbenchmarks. However, Dromaeo does not
    show so much performance benefit. This is because Dromaeo's dom-traverse.html is super
    polymorphic call site where JSC gives up optimization. For example, in the following
    dromaeo's benchmark, we can see so various DOM nodes at the `cur.firstChild` site, like,
    HTMLDivElement, HTMLAnchorElement, Text, Comment etc. JSC gives up optimization since we
    encounter so many Structures. This should be optimized since they share the large part of
    prototype-chain and they hit the exactly same CustomGetter, Node.prototype.firstChild.
    We will handle this and when we optimize it, this DOMJIT works well on Dromaeo.

        test( "firstChild", function(){
            var nodes = document.body.childNodes, nl = nodes.length;

            for ( var i = 0; i < num; i++ ) {
                for ( var j = 0; j < nl; j++ ) {
                    var cur = nodes[j];
                    while ( cur )
                        cur = cur.firstChild;
                    ret = cur;
                }
            }
        });

2. Emit code in IC.

    Currently, we only optimize DOMJIT accessors in DFG and FTL. However, we should leverage
    this DOMJIT::Patchpoint to emit inlined code even in Inline Caching (IC). We will emit
    CheckDOM's code for IC's guard phase, and emit CallDOM's code for IC's get phase. This
    offers performance benefit even if we live in baseline JIT code. And this should be easy.

[1]: With the following one, we can see 3x improvement (26ms v.s. 80ms).

    var element = document.getElementsByTagName('div')[3];
    var before = Date.now();
    for (var i = 0; i < 1e7; ++i)
        element.firstChild;
    console.log(Date.now() - before);

* CMakeLists.txt:
* ForwardingHeaders/domjit/DOMJITGetterSetter.h:
* ForwardingHeaders/domjit/DOMJITPatchpoint.h: Copied from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h.
* ForwardingHeaders/domjit/DOMJITPatchpointParams.h: Copied from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::offsetOfWrapped):
(WebCore::JSDOMWrapper::wrapped): Deleted.
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::offsetOfWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GetJSCAttributesForAttribute):
(GenerateHeader):
(GeneratePropertiesHashTable):
(GenerateImplementation):
(GenerateHashTableValueArray):
* bindings/scripts/IDLAttributes.txt:
* dom/ContainerNode.h:
(WebCore::ContainerNode::lastChildMemoryOffset):
(WebCore::ContainerNode::lastChild): Deleted.
* dom/Node.h:
(WebCore::Node::flagIsContainer):
(WebCore::Node::flagIsText): Deleted.
* dom/Node.idl:
* domjit/DOMJITHelpers.h: Added.
(WebCore::DOMJITHelpers::branchIfNotWorldIsNormal):
(WebCore::DOMJITHelpers::branchIfNotWeakIsLive):
(WebCore::DOMJITHelpers::tryLookUpWrapperCache):
(WebCore::DOMJITHelpers::toWrapper):
(WebCore::DOMJITHelpers::branchIfDOMWrapper):
(WebCore::DOMJITHelpers::branchIfNotDOMWrapper):
(WebCore::DOMJITHelpers::branchIfNode):
(WebCore::DOMJITHelpers::branchIfNotNode):
(WebCore::DOMJITHelpers::branchIfElement):
(WebCore::DOMJITHelpers::branchIfNotElement):
(WebCore::DOMJITHelpers::branchIfDocumentWrapper):
(WebCore::DOMJITHelpers::branchIfNotDocumentWrapper):
* domjit/JSNodeDOMJIT.cpp: Added.
(WebCore::toWrapperSlow):
(WebCore::createCallDOMForOffsetAccess):
(WebCore::checkNode):
(WebCore::NodeFirstChildDOMJIT::checkDOM):
(WebCore::NodeFirstChildDOMJIT::callDOM):
(WebCore::NodeLastChildDOMJIT::checkDOM):
(WebCore::NodeLastChildDOMJIT::callDOM):
(WebCore::NodeNextSiblingDOMJIT::checkDOM):
(WebCore::NodeNextSiblingDOMJIT::callDOM):
(WebCore::NodePreviousSiblingDOMJIT::checkDOM):
(WebCore::NodePreviousSiblingDOMJIT::callDOM):
(WebCore::NodeParentNodeDOMJIT::checkDOM):
(WebCore::NodeParentNodeDOMJIT::callDOM):

Source/WTF:

Add CAST_OFFSET. It is not necessary for JSCell thingy
since we don't use virtual member functions. However, it
is not true for WebCore DOM wrapped objects.

* wtf/StdLibExtras.h:

LayoutTests:

* js/dom/domjit-accessor-monomorphic-expected.txt: Added.
* js/dom/domjit-accessor-monomorphic.html: Added.
* js/dom/domjit-accessor-polymorphic-expected.txt: Added.
* js/dom/domjit-accessor-polymorphic.html: Added.

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

3 years agoAdded final specifier to WebInspectorServer and to its overridden methods
annulen@yandex.ru [Mon, 10 Oct 2016 19:42:51 +0000 (19:42 +0000)]
Added final specifier to WebInspectorServer and to its overridden methods
https://bugs.webkit.org/show_bug.cgi?id=163228

Reviewed by Darin Adler.

* UIProcess/InspectorServer/WebInspectorServer.h:

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

3 years agoMarking media/controls/airplay-picker.html as flaky on ElCapitan+.
ryanhaddad@apple.com [Mon, 10 Oct 2016 18:56:36 +0000 (18:56 +0000)]
Marking media/controls/airplay-picker.html as flaky on ElCapitan+.
https://bugs.webkit.org/show_bug.cgi?id=163231

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoSupport InputEvent.data for the new InputEvent spec
wenson_hsieh@apple.com [Mon, 10 Oct 2016 18:30:03 +0000 (18:30 +0000)]
Support InputEvent.data for the new InputEvent spec
https://bugs.webkit.org/show_bug.cgi?id=163113
<rdar://problem/28681935>

Reviewed by Darin Adler.

Source/WebCore:

Introduces InputEvent.data, a string attribute that, if non-null, indicates the text to be inserted by an input
event. For text areas and text inputs, the 'insertText', 'insertFromPaste', 'insertFromDrop', and
'insertReplacementText' input types should cause subsequent `input` and `beforeinput` events to have non-null
data. However, for contenteditable areas, only 'insertText' leads to having data in resulting InputEvents.

To implement this, we introduce a new virtual method, CompositeEditCommand::inputEventData, which gives
composite editing commands the chance to vend a data string for input events they might fire (by default, this
is null).

Tests: fast/events/input-events-paste-data.html
       fast/events/input-events-typing-data.html

* dom/InputEvent.cpp:
(WebCore::InputEvent::InputEvent):
* dom/InputEvent.h:
* dom/InputEvent.idl:

Currently, our InputEventInit struct is wrong. According to the UI-Events spec at www.w3.org/TR/uievents/, the
init struct for an InputEvent should contain a data string (added in this patch) as well as an isComposing flag
(to be added in a future patch along with composition support). While adding support for the data attribute, we
tweak the InputEvent IDL and headers slightly to adjust for this.

* dom/Node.cpp:
(WebCore::Node::dispatchInputEvent):
* dom/Node.h:
* editing/CompositeEditCommand.h:
(WebCore::CompositeEditCommand::inputEventData):
* editing/EditCommand.cpp:
(WebCore::EditCommand::isEditingTextAreaOrTextInput):
* editing/EditCommand.h:
* editing/Editor.cpp:
(WebCore::dispatchBeforeInputEvent):
(WebCore::dispatchInputEvent):
(WebCore::dispatchBeforeInputEvents):
(WebCore::dispatchInputEvents):
(WebCore::Editor::willApplyEditing):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::computeAndSetTypingStyle):
* editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::inputEventData):
* editing/ReplaceRangeWithTextCommand.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::inputEventData):
* editing/ReplaceSelectionCommand.h:
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::inputEventData):
* editing/SpellingCorrectionCommand.h:
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::TypingCommand):
(WebCore::TypingCommand::inputEventData):
(WebCore::TypingCommand::willAddTypingToOpenCommand):
(WebCore::TypingCommand::insertTextRunWithoutNewlines):
* editing/TypingCommand.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setEditingValue):
(WebCore::HTMLInputElement::setValueFromRenderer):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::listBoxOnChange):
(WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):

LayoutTests:

Adds 2 new layout tests verifying the data attribute of `beforeinput` and `input` events when typing, pasting,
and selecting candidate replacements in plain text and contenteditable areas.

Also tweaks an existing test to ensure that `data` is an attribute of an InputEvent.

* fast/events/input-events-fired-when-typing-expected.txt:
* fast/events/input-events-fired-when-typing.html:
* fast/events/input-events-paste-data-expected.txt: Added.
* fast/events/input-events-paste-data.html: Added.
* fast/events/input-events-typing-data-expected.txt: Added.
* fast/events/input-events-typing-data.html: Added.
* platform/ios-simulator/TestExpectations:

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

3 years agoUnreviewed, rolling out r206972.
commit-queue@webkit.org [Mon, 10 Oct 2016 18:29:27 +0000 (18:29 +0000)]
Unreviewed, rolling out r206972.
https://bugs.webkit.org/show_bug.cgi?id=163227

Making EWS flaky (Requested by bfulgham_ on #webkit).

Reverted changeset:

"[CMake] CMake does not support the dep files for implicit
dependency"
https://bugs.webkit.org/show_bug.cgi?id=161433
http://trac.webkit.org/changeset/206972

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

3 years agoMarking storage/indexeddb/modern/abort-requests-cancelled* tests as flaky on mac.
ryanhaddad@apple.com [Mon, 10 Oct 2016 17:42:47 +0000 (17:42 +0000)]
Marking storage/indexeddb/modern/abort-requests-cancelled* tests as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=156070

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

3 years agoMove media source from legacy to new DOM exceptions
darin@apple.com [Mon, 10 Oct 2016 17:25:48 +0000 (17:25 +0000)]
Move media source from legacy to new DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163201

Reviewed by Chris Dumez.

* Modules/mediasource/MediaSource.cpp: Removed unneeded includes.
(WebCore::MediaSource::create): Use auto.
(WebCore::MediaSource::MediaSource): Initialize m_mediaElement in class definition.
(WebCore::MediaSource::setLiveSeekableRange): Use ExceptionOr.
(WebCore::MediaSource::clearLiveSeekableRange): Ditto.
(WebCore::MediaSource::setDuration): Ditto.
(WebCore::MediaSource::setDurationInternal): Ditto.
(WebCore::MediaSource::endOfStream): Ditto.
(WebCore::MediaSource::streamEndedWithError): Use bufferedInternal.
(WebCore::MediaSource::addSourceBuffer): Use ExceptionOr.
(WebCore::MediaSource::removeSourceBuffer): Ditto.
(WebCore::MediaSource::detachFromElement): Use removeSourceBuffer
without IGNORE_EXCEPTION since that is now the default behavior.
(WebCore::MediaSource::activeRanges): Use bufferedInternal.
(WebCore::MediaSource::createSourceBufferPrivate): Use ExceptionOr.

* Modules/mediasource/MediaSource.h: Removed unneeded includes.
Made more things private and also private rather than protected.

* Modules/mediasource/MediaSource.idl: Use non-legacy exceptions.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::buffered): Use ExceptionOr.
(WebCore::SourceBuffer::setTimestampOffset): Ditto.
(WebCore::SourceBuffer::setAppendWindowStart): Ditto.
(WebCore::SourceBuffer::setAppendWindowEnd): Ditto.
(WebCore::SourceBuffer::appendBuffer): Ditto.
(WebCore::SourceBuffer::abort): Ditto.
(WebCore::SourceBuffer::remove): Ditto.
(WebCore::SourceBuffer::appendBufferInternal): Ditto.
(WebCore::SourceBuffer::setMode): Ditto.

* Modules/mediasource/SourceBuffer.h: Removed unneeded includes.
Updated for above changes. Made more things private.

* Modules/mediasource/SourceBuffer.idl: Use non-legacy exceptions.

* platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h:
Added now-needed include of MediaSourcePrivate.h.

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

3 years agoWeb Inspector: Revealed line not highlighted in TextEditor while debugger paused
mattbaker@apple.com [Mon, 10 Oct 2016 17:23:07 +0000 (17:23 +0000)]
Web Inspector: Revealed line not highlighted in TextEditor while debugger paused
https://bugs.webkit.org/show_bug.cgi?id=163197

Reviewed by Timothy Hatcher.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.revealPosition.revealAndHighlightLine):
Avoid highlighting the execution line while debugging, but allow
other lines to be highlighted.

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

3 years agoAddress flaky airplay-* LayouTests
jer.noble@apple.com [Mon, 10 Oct 2016 17:17:41 +0000 (17:17 +0000)]
Address flaky airplay-* LayouTests
https://bugs.webkit.org/show_bug.cgi?id=163044

Reviewed by Brent Fulgham.

Source/WebCore:

Two separate problems conspired to make airplay tests a bit flaky:

For one, when the HTMLMediaElement clears its MediaPlayer, it won't necessarily notify
clients that it has stopped playing to a wireless target. The WebMediaSessionManager may
eventually cause this value to reset, but it's asynchronous, and may fire after the next
test starts. Reset this state explicitly.

For two, the state of the mock playback target picker was not being reset between test
invocations.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):

LayoutTests:

* media/airplay-autoplay.html:
* platform/mac/TestExpectations:

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

3 years agoAir should expose API for pinning registers
fpizlo@apple.com [Mon, 10 Oct 2016 17:12:34 +0000 (17:12 +0000)]
Air should expose API for pinning registers
https://bugs.webkit.org/show_bug.cgi?id=163175

Reviewed by Keith Miller.

You can now call Procedure::pinRegister(), or Code::pinRegister(), and it will make this
register behave as follows:

- B3 and Air will emit no code that modifies the value in this register, except if that
  happens via a Patchpoint or stackmap constraint (i.e. the user explicitly asked for it).
- B3 and Air will allow others to modify the register. For example, if the register is not
  callee-save, then the compiler knows that the register's value will be trashed by any
  C-style call.
- Air will be happy to emit code that reads from this register, including coalescing tmps
  with it, so longer as there is no interference (i.e. no chance of the register's value
  changing). For example, if we went back to having pinned tag registers, we would tell B3
  to use them by (1) excluding them from any clobber set (easy, since they're callee save)
  and (2) emitting ArgumentReg to grab their value. There's a test that does this.

This is accomplished by taking regsInPriorityOrder() and making it a method of Code. Air
already used this API when choosing registers in register allocation. Code now also vends a
mutableRegs() set, which is derived from regsInPriorityOrder(), that can quickly tell you if
a register can be mutated. Doing it this way means that most of this is a purely mechanical
change. The calls to mutableRegs() are the places where we had to change logic:

- The register allocators needs to know that coalescing with a precolored pinned tmp is free.
- The callee-save handler needs to know that we're not supposed to save/restore pinned
  registers.

Note that in this scheme, pinned registers are simply registers that do not appear in
regsInPriorityOrder(). This means, for example, that we will now say that FP is pinned. So,
this means that you can also pin registers by calling setRegsInPriorityOrder() and passing a
vector that excludes some registers. More generally, this means that clients can now tweak
the register allocator's register preferences, since the ordering in that list reflects the
order in which the allocator will try registers.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3Procedure.cpp:
(JSC::B3::Procedure::pinRegister):
* b3/B3Procedure.h:
* b3/air/AirCode.cpp:
(JSC::B3::Air::Code::Code):
(JSC::B3::Air::Code::setRegsInPriorityOrder):
(JSC::B3::Air::Code::pinRegister):
* b3/air/AirCode.h:
(JSC::B3::Air::Code::regsInPriorityOrder):
(JSC::B3::Air::Code::mutableRegs):
(JSC::B3::Air::Code::isPinned):
(JSC::B3::Air::Code::regsInPriorityOrderImpl):
(JSC::B3::Air::Code::proc): Deleted.
* b3/air/AirEmitShuffle.cpp:
(JSC::B3::Air::emitShuffle):
* b3/air/AirEmitShuffle.h:
* b3/air/AirHandleCalleeSaves.cpp:
(JSC::B3::Air::handleCalleeSaves):
* b3/air/AirIteratedRegisterCoalescing.cpp:
* b3/air/AirLowerAfterRegAlloc.cpp:
(JSC::B3::Air::lowerAfterRegAlloc):
* b3/air/AirRegisterPriority.cpp: Removed.
* b3/air/AirRegisterPriority.h: Removed.
* b3/air/AirSpillEverything.cpp:
(JSC::B3::Air::spillEverything):
* b3/air/testair.cpp:
(JSC::B3::Air::testShuffleBroadcastAllRegs):
(JSC::B3::Air::testShuffleShiftAllRegs):
(JSC::B3::Air::testShuffleRotateAllRegs):
(JSC::B3::Air::testShuffleShiftMemoryAllRegs):
(JSC::B3::Air::testShuffleShiftMemoryAllRegs64):
(JSC::B3::Air::testShuffleShiftMemoryAllRegsMixedWidth):
(JSC::B3::Air::testShuffleRotateMemoryAllRegs64):
(JSC::B3::Air::testShuffleRotateMemoryAllRegsMixedWidth):
* b3/testb3.cpp:
(JSC::B3::testPinRegisters):
(JSC::B3::run):
* jit/RegisterSet.h:

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

3 years agoCorrect typo in comment (patining -> painting).
bfulgham@apple.com [Mon, 10 Oct 2016 17:11:42 +0000 (17:11 +0000)]
Correct typo in comment (patining -> painting).

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::centerLineAndCutOffCorners):

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

3 years agoReduce code duplication between CG, Cairo, and Direct2D
bfulgham@apple.com [Mon, 10 Oct 2016 17:02:52 +0000 (17:02 +0000)]
Reduce code duplication between CG, Cairo, and Direct2D
https://bugs.webkit.org/show_bug.cgi?id=163157

Reviewed by Darin Adler.

Move a number of routines that have been copied-and-pasted to different
platform files into the main GraphicsContext.cpp file.

No new tests because there is no change in behavior.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::dashedLineCornerWidthForStrokeWidth): Added.
(WebCore::GraphicsContext::dashedLinePatternWidthForStrokeWidth): Added.
(WebCore::GraphicsContext::dashedLinePatternOffsetForPatternAndStrokeWidth): Added.
(WebCore::GraphicsContext::centerLineAndCutOffCorners): Added.
* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawLine): Call new helper function.
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawLine): Ditto.
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::drawLine): Ditto.

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

3 years agoMarking http/tests/xmlhttprequest/onabort-response-getters.html as flaky on ios-simul...
ryanhaddad@apple.com [Mon, 10 Oct 2016 17:00:15 +0000 (17:00 +0000)]
Marking http/tests/xmlhttprequest/onabort-response-getters.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=162647

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoB3 should know about mutable pinned registers
fpizlo@apple.com [Mon, 10 Oct 2016 16:45:15 +0000 (16:45 +0000)]
B3 should know about mutable pinned registers
https://bugs.webkit.org/show_bug.cgi?id=163172

Reviewed by Keith Miller.

If we have mutable pinned registers then we need to know which operations mutate them. At
first I considered making this into a heap range thing, but I think that this would be very
confusing. Also, in the future, we might want to make Effects track register sets of
clobbered registers (see bug 163173).

* b3/B3Effects.cpp:
(JSC::B3::Effects::interferes):
(JSC::B3::Effects::operator==):
(JSC::B3::Effects::dump):
* b3/B3Effects.h:
(JSC::B3::Effects::forCall):
(JSC::B3::Effects::mustExecute):

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

3 years agoSync web-platform-tests up to revision 33f4da1
commit-queue@webkit.org [Mon, 10 Oct 2016 16:23:57 +0000 (16:23 +0000)]
Sync web-platform-tests up to revision 33f4da1
https://bugs.webkit.org/show_bug.cgi?id=163205

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

LayoutTests/imported/w3c:

* resources/ImportExpectations:
* resources/TestRepositories:
* resources/resource-files.json:
* resources/web-platform-tests-modules.json:
* web-platform-tests/IndexedDB/OWNERS: Added.
* web-platform-tests/IndexedDB/README.md: Added.
* web-platform-tests/IndexedDB/abort-in-initial-upgradeneeded.html:
* web-platform-tests/IndexedDB/close-in-upgradeneeded.html:
* web-platform-tests/IndexedDB/cursor-overloads.htm:
* web-platform-tests/IndexedDB/idb_binary_key_conversion-expected.txt: Added.
* web-platform-tests/IndexedDB/idb_binary_key_conversion.htm: Added.
* web-platform-tests/IndexedDB/idb_webworkers.htm:
* web-platform-tests/IndexedDB/idbcursor-advance-continue-async.htm:
* web-platform-tests/IndexedDB/idbcursor-advance-invalid.htm:
* web-platform-tests/IndexedDB/idbcursor-advance.htm:
* web-platform-tests/IndexedDB/idbcursor-continue.htm:
* web-platform-tests/IndexedDB/idbcursor-continuePrimaryKey-exception-order-expected.txt: Added.
* web-platform-tests/IndexedDB/idbcursor-continuePrimaryKey-exception-order.htm: Added.
* web-platform-tests/IndexedDB/idbcursor-direction-index-keyrange.htm:
* web-platform-tests/IndexedDB/idbcursor-direction-index.htm:
* web-platform-tests/IndexedDB/idbcursor-direction-objectstore-keyrange.htm:
* web-platform-tests/IndexedDB/idbcursor-direction-objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor-direction.htm:
* web-platform-tests/IndexedDB/idbcursor-key.htm:
* web-platform-tests/IndexedDB/idbcursor-primarykey.htm:
* web-platform-tests/IndexedDB/idbcursor-reused.htm:
* web-platform-tests/IndexedDB/idbcursor-source.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index2.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index3.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index5.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index6.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index7.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index8.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_index9.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_objectstore2.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_objectstore3.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_objectstore4.htm:
* web-platform-tests/IndexedDB/idbcursor_advance_objectstore5.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index2.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index3.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index4.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index5.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index6.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index7.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_index8.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_invalid.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore2.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore3.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore4.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore5.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore6.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_index.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_index2.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_index3.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_index4.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_index5.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_objectstore2.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_objectstore3.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_objectstore4.htm:
* web-platform-tests/IndexedDB/idbcursor_delete_objectstore5.htm:
* web-platform-tests/IndexedDB/idbcursor_iterating.htm:
* web-platform-tests/IndexedDB/idbcursor_iterating_index.htm:
* web-platform-tests/IndexedDB/idbcursor_iterating_index2.htm:
* web-platform-tests/IndexedDB/idbcursor_iterating_objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor_iterating_objectstore2.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index2.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index3.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index4.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index5.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index6.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index7.htm:
* web-platform-tests/IndexedDB/idbcursor_update_index8-expected.txt: Added.
* web-platform-tests/IndexedDB/idbcursor_update_index8.htm: Added.
* web-platform-tests/IndexedDB/idbcursor_update_objectstore.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore2.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore3.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore4.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore5.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore6.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore7.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore8.htm:
* web-platform-tests/IndexedDB/idbcursor_update_objectstore9-expected.txt: Added.
* web-platform-tests/IndexedDB/idbcursor_update_objectstore9.htm: Added.
* web-platform-tests/IndexedDB/idbdatabase_close.htm:
* web-platform-tests/IndexedDB/idbdatabase_close2.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore-createIndex-emptyname.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore10-1000ends.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore10-emptyname.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore11.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore2.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore3.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore4.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore5.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore6.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore7.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore8-parameters.htm:
* web-platform-tests/IndexedDB/idbdatabase_createObjectStore9-invalidparameters.htm:
* web-platform-tests/IndexedDB/idbdatabase_deleteObjectStore.htm:
* web-platform-tests/IndexedDB/idbdatabase_deleteObjectStore2.htm:
* web-platform-tests/IndexedDB/idbdatabase_deleteObjectStore3.htm:
* web-platform-tests/IndexedDB/idbdatabase_deleteObjectStore4-not_reused.htm:
* web-platform-tests/IndexedDB/idbdatabase_transaction.htm:
* web-platform-tests/IndexedDB/idbdatabase_transaction2.htm:
* web-platform-tests/IndexedDB/idbdatabase_transaction3.htm:
* web-platform-tests/IndexedDB/idbdatabase_transaction4.htm:
* web-platform-tests/IndexedDB/idbdatabase_transaction5.htm:
* web-platform-tests/IndexedDB/idbfactory_cmp.htm:
* web-platform-tests/IndexedDB/idbfactory_cmp2.htm:
* web-platform-tests/IndexedDB/idbfactory_cmp3-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory_cmp3.htm: Added.
* web-platform-tests/IndexedDB/idbfactory_cmp4-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory_cmp4.htm: Added.
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase.htm:
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase2.htm:
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase3.htm:
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase4.htm:
* web-platform-tests/IndexedDB/idbfactory_open.htm:
* web-platform-tests/IndexedDB/idbfactory_open10.htm:
* web-platform-tests/IndexedDB/idbfactory_open11.htm:
* web-platform-tests/IndexedDB/idbfactory_open12.htm:
* web-platform-tests/IndexedDB/idbfactory_open2.htm:
* web-platform-tests/IndexedDB/idbfactory_open3.htm:
* web-platform-tests/IndexedDB/idbfactory_open4.htm:
* web-platform-tests/IndexedDB/idbfactory_open5.htm:
* web-platform-tests/IndexedDB/idbfactory_open6.htm:
* web-platform-tests/IndexedDB/idbfactory_open7.htm:
* web-platform-tests/IndexedDB/idbfactory_open8.htm:
* web-platform-tests/IndexedDB/idbfactory_open9.htm:
* web-platform-tests/IndexedDB/idbindex-multientry-arraykeypath.htm:
* web-platform-tests/IndexedDB/idbindex-multientry-big.htm:
* web-platform-tests/IndexedDB/idbindex-multientry.htm:
* web-platform-tests/IndexedDB/idbindex-rename-abort-expected.txt: Added.
* web-platform-tests/IndexedDB/idbindex-rename-abort.html: Added.
* web-platform-tests/IndexedDB/idbindex-rename-errors-expected.txt: Added.
* web-platform-tests/IndexedDB/idbindex-rename-errors.html: Added.
* web-platform-tests/IndexedDB/idbindex-rename-expected.txt: Added.
* web-platform-tests/IndexedDB/idbindex-rename.html: Added.
* web-platform-tests/IndexedDB/idbindex_count.htm:
* web-platform-tests/IndexedDB/idbindex_count2.htm:
* web-platform-tests/IndexedDB/idbindex_count3.htm:
* web-platform-tests/IndexedDB/idbindex_count4.htm:
* web-platform-tests/IndexedDB/idbindex_get.htm:
* web-platform-tests/IndexedDB/idbindex_get2.htm:
* web-platform-tests/IndexedDB/idbindex_get3.htm:
* web-platform-tests/IndexedDB/idbindex_get4.htm:
* web-platform-tests/IndexedDB/idbindex_get5.htm:
* web-platform-tests/IndexedDB/idbindex_get6.htm:
* web-platform-tests/IndexedDB/idbindex_get7-expected.txt:
* web-platform-tests/IndexedDB/idbindex_get7.htm:
* web-platform-tests/IndexedDB/idbindex_get8-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get7-expected.txt.
* web-platform-tests/IndexedDB/idbindex_get8.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_get7.htm.
* web-platform-tests/IndexedDB/idbindex_getAll-expected.txt: Added.
* web-platform-tests/IndexedDB/idbindex_getAll.html: Added.
* web-platform-tests/IndexedDB/idbindex_getAllKeys-expected.txt: Added.
* web-platform-tests/IndexedDB/idbindex_getAllKeys.html: Added.
* web-platform-tests/IndexedDB/idbindex_getKey.htm:
* web-platform-tests/IndexedDB/idbindex_getKey2.htm:
* web-platform-tests/IndexedDB/idbindex_getKey3.htm:
* web-platform-tests/IndexedDB/idbindex_getKey4.htm:
* web-platform-tests/IndexedDB/idbindex_getKey5.htm:
* web-platform-tests/IndexedDB/idbindex_getKey6.htm:
* web-platform-tests/IndexedDB/idbindex_getKey7-expected.txt:
* web-platform-tests/IndexedDB/idbindex_getKey7.htm:
* web-platform-tests/IndexedDB/idbindex_getKey8-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey7-expected.txt.
* web-platform-tests/IndexedDB/idbindex_getKey8.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_getKey7.htm.
* web-platform-tests/IndexedDB/idbindex_indexNames.htm:
* web-platform-tests/IndexedDB/idbindex_openCursor.htm:
* web-platform-tests/IndexedDB/idbindex_openCursor2-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openCursor2.htm:
* web-platform-tests/IndexedDB/idbindex_openCursor3-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor2-expected.txt.
* web-platform-tests/IndexedDB/idbindex_openCursor3.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openCursor2.htm.
* web-platform-tests/IndexedDB/idbindex_openKeyCursor.htm:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor2.htm:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor3-expected.txt:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm:
* web-platform-tests/IndexedDB/idbindex_openKeyCursor4-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor3-expected.txt.
* web-platform-tests/IndexedDB/idbindex_openKeyCursor4.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbindex_openKeyCursor3.htm.
* web-platform-tests/IndexedDB/idbkeyrange-includes-expected.txt: Added.
* web-platform-tests/IndexedDB/idbkeyrange-includes.htm: Added.
* web-platform-tests/IndexedDB/idbkeyrange.htm:
* web-platform-tests/IndexedDB/idbkeyrange_incorrect.htm:
* web-platform-tests/IndexedDB/idbobjectstore-rename-abort-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore-rename-abort.html: Added.
* web-platform-tests/IndexedDB/idbobjectstore-rename-errors-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore-rename-errors.html: Added.
* web-platform-tests/IndexedDB/idbobjectstore-rename-store-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore-rename-store.html: Added.
* web-platform-tests/IndexedDB/idbobjectstore_add.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add10.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add11.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add12.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add13.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add14.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add15.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add16.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add5.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add6.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add7.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add8.htm:
* web-platform-tests/IndexedDB/idbobjectstore_add9.htm:
* web-platform-tests/IndexedDB/idbobjectstore_clear.htm:
* web-platform-tests/IndexedDB/idbobjectstore_clear2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_clear3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_clear4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_count.htm:
* web-platform-tests/IndexedDB/idbobjectstore_count2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_count3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_count4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex10.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex11.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex12.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex13.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex14-exception_order-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore_createIndex14-exception_order.htm: Added.
* web-platform-tests/IndexedDB/idbobjectstore_createIndex2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex3-usable-right-away.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex4-deleteIndex-event_order.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex5-emptykeypath.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex6-event_order.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex7-event_order.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex8-valid_keys.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex9-emptyname.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete5.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete6.htm:
* web-platform-tests/IndexedDB/idbobjectstore_delete7.htm:
* web-platform-tests/IndexedDB/idbobjectstore_deleteIndex.htm:
* web-platform-tests/IndexedDB/idbobjectstore_deleted.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get5.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get6.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get7.htm:
* web-platform-tests/IndexedDB/idbobjectstore_getAll-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore_getAll.html: Added.
* web-platform-tests/IndexedDB/idbobjectstore_getAllKeys-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html: Added.
* web-platform-tests/IndexedDB/idbobjectstore_index.htm:
* web-platform-tests/IndexedDB/idbobjectstore_openCursor.htm:
* web-platform-tests/IndexedDB/idbobjectstore_openCursor_invalid.htm:
* web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor-expected.txt: Added.
* web-platform-tests/IndexedDB/idbobjectstore_openKeyCursor.htm: Added.
* web-platform-tests/IndexedDB/idbobjectstore_put.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put10.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put11.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put12.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put13.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put14.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put15.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put16.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put2.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put3.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put5.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put6.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put7.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put8.htm:
* web-platform-tests/IndexedDB/idbobjectstore_put9.htm:
* web-platform-tests/IndexedDB/idbtransaction-oncomplete.htm:
* web-platform-tests/IndexedDB/idbtransaction.htm:
* web-platform-tests/IndexedDB/idbtransaction_abort.htm:
* web-platform-tests/IndexedDB/idbtransaction_objectStoreNames-expected.txt: Added.
* web-platform-tests/IndexedDB/idbtransaction_objectStoreNames.html: Added.
* web-platform-tests/IndexedDB/idbversionchangeevent.htm:
* web-platform-tests/IndexedDB/index_sort_order.htm:
* web-platform-tests/IndexedDB/interfaces.html:
* web-platform-tests/IndexedDB/interfaces.idl:
* web-platform-tests/IndexedDB/interfaces.worker.js:
(request.onload):
* web-platform-tests/IndexedDB/key_invalid.htm:
* web-platform-tests/IndexedDB/key_valid.html:
* web-platform-tests/IndexedDB/keygenerator-constrainterror.htm:
* web-platform-tests/IndexedDB/keygenerator-overflow.htm:
* web-platform-tests/IndexedDB/keygenerator.htm:
* web-platform-tests/IndexedDB/keyorder.htm:
* web-platform-tests/IndexedDB/keypath.htm:
* web-platform-tests/IndexedDB/keypath_invalid.htm:
* web-platform-tests/IndexedDB/keypath_maxsize.htm:
* web-platform-tests/IndexedDB/list_ordering.htm:
* web-platform-tests/IndexedDB/objectstore_keyorder.htm:
* web-platform-tests/IndexedDB/request_bubble-and-capture.htm:
* web-platform-tests/IndexedDB/string-list-ordering.htm:
* web-platform-tests/IndexedDB/support-promises.js: Added.
(const.databaseName):
(const.requestWatcher):
(const.migrateDatabase):
(const.createDatabase):
(const.openDatabase):
(const.createBooksStore):
(const.createNotBooksStore):
(const.checkStoreIndexes):
(const.checkStoreGenerator):
(const.checkStoreContents):
(const.checkAuthorIndexContents):
(const.checkTitleIndexContents):
* web-platform-tests/IndexedDB/support.js:
(indexeddb_test):
(add_completion_callback): Deleted.
(fail): Deleted.
* web-platform-tests/IndexedDB/transaction-abort-generator-revert-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-generator-revert.html: Added.
* web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-index-metadata-revert.html: Added.
* web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-multiple-metadata-revert.html: Added.
* web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-object-store-metadata-revert.html: Added.
* web-platform-tests/IndexedDB/transaction-create_in_versionchange.htm:
* web-platform-tests/IndexedDB/transaction-lifetime-blocked.htm:
* web-platform-tests/IndexedDB/transaction-lifetime-empty-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-lifetime-empty.html: Added.
* web-platform-tests/IndexedDB/transaction-lifetime.htm:
* web-platform-tests/IndexedDB/transaction-requestqueue.htm:
* web-platform-tests/IndexedDB/transaction_bubble-and-capture.htm:
* web-platform-tests/IndexedDB/value.htm:
* web-platform-tests/IndexedDB/value_recursive.htm:
* web-platform-tests/IndexedDB/w3c-import.log: Added.
* web-platform-tests/IndexedDB/writer-starvation.htm:
* web-platform-tests/README.md:
* web-platform-tests/XMLHttpRequest/abort-after-send-expected.txt:
* web-platform-tests/XMLHttpRequest/abort-after-send.htm:
* web-platform-tests/XMLHttpRequest/abort-during-upload-expected.txt:
* web-platform-tests/XMLHttpRequest/abort-during-upload.htm:
* web-platform-tests/XMLHttpRequest/abort-event-order-expected.txt:
* web-platform-tests/XMLHttpRequest/abort-event-order.htm:
* web-platform-tests/XMLHttpRequest/formdata-foreach-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/formdata-foreach.html: Added.
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/XMLHttpRequest/progress-events-response-data-gzip.htm:
* web-platform-tests/XMLHttpRequest/resources/send-after-setting-document-domain-window-1.htm: Added.
* web-platform-tests/XMLHttpRequest/resources/send-after-setting-document-domain-window-2.htm: Added.
* web-platform-tests/XMLHttpRequest/resources/send-after-setting-document-domain-window-helper.js: Added.
(assert_equals):
(assert_throws):
(run_test):
* web-platform-tests/XMLHttpRequest/resources/w3c-import.log:
* web-platform-tests/XMLHttpRequest/resources/xmlhttprequest-event-order.js:
(getNextEvent):
* web-platform-tests/XMLHttpRequest/responsexml-basic-expected.txt:
* web-platform-tests/XMLHttpRequest/responsexml-basic.htm:
* web-platform-tests/XMLHttpRequest/responsexml-document-properties.htm:
* web-platform-tests/XMLHttpRequest/send-no-response-event-order-expected.txt:
* web-platform-tests/XMLHttpRequest/send-response-event-order-expected.txt:
* web-platform-tests/XMLHttpRequest/send-response-event-order.htm:
* web-platform-tests/XMLHttpRequest/send-sync-response-event-order-expected.txt:
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/common/get-host-info.sub.js:
(get_port):
(get_host_info): Deleted.
* web-platform-tests/config.json: Added.
* web-platform-tests/custom-elements/CustomElementRegistry.html:
* web-platform-tests/custom-elements/HTMLElement-constructor.html:
* web-platform-tests/custom-elements/adopted-callback-expected.txt:
* web-platform-tests/custom-elements/adopted-callback.html:
* web-platform-tests/custom-elements/attribute-changed-callback-expected.txt:
* web-platform-tests/custom-elements/attribute-changed-callback.html:
* web-platform-tests/custom-elements/connected-callbacks-expected.txt:
* web-platform-tests/custom-elements/connected-callbacks.html:
* web-platform-tests/custom-elements/custom-element-registry/define.html:
* web-platform-tests/custom-elements/disconnected-callbacks-expected.txt:
* web-platform-tests/custom-elements/disconnected-callbacks.html:
* web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
* web-platform-tests/custom-elements/reaction-timing.html:
* web-platform-tests/custom-elements/reactions/Attr.html:
* web-platform-tests/custom-elements/reactions/ChildNode.html:
* web-platform-tests/custom-elements/reactions/DOMTokenList.html:
* web-platform-tests/custom-elements/reactions/Document.html:
* web-platform-tests/custom-elements/reactions/Element.html:
* web-platform-tests/custom-elements/reactions/NamedNodeMap.html:
* web-platform-tests/custom-elements/reactions/Node.html:
* web-platform-tests/custom-elements/reactions/ParentNode.html:
* web-platform-tests/custom-elements/reactions/Range.html:
* web-platform-tests/custom-elements/reactions/resources/reactions.js:
(testNodeConnector):
(testNodeDisconnector):
(testCloner):
* web-platform-tests/custom-elements/resources/custom-elements-helpers.js:
(assert_attribute_log_entry):
(define_new_custom_element.CustomElement):
(define_new_custom_element.CustomElement.prototype.attributeChangedCallback):
(define_new_custom_element.CustomElement.prototype.connectedCallback):
(define_new_custom_element.CustomElement.prototype.disconnectedCallback):
(define_new_custom_element.CustomElement.prototype.adoptedCallback):
(define_new_custom_element.return.takeLog):
(define_new_custom_element):
(document_types.return.create):
(document_types.create):
(document_types.):
(document_types):
(test_with_window): Deleted.
* web-platform-tests/custom-elements/resources/document-types.js: Removed.
* web-platform-tests/custom-elements/resources/w3c-import.log:
* web-platform-tests/diff-manifest.py: Added.
(call):
(get_manifest):
(main):
* web-platform-tests/dom/collections/HTMLCollection-supported-property-indices-expected.txt:
* web-platform-tests/dom/collections/HTMLCollection-supported-property-indices.html:
* web-platform-tests/dom/collections/HTMLCollection-supported-property-names-expected.txt:
* web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html:
* web-platform-tests/dom/events/Event-propagation.html:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/lists/DOMTokenList-Iterable-expected.txt: Added.
* web-platform-tests/dom/lists/DOMTokenList-Iterable.html: Added.
* web-platform-tests/dom/lists/DOMTokenList-iteration.html:
* web-platform-tests/dom/lists/w3c-import.log:
* web-platform-tests/dom/nodes/Element-matches-expected.txt:
* web-platform-tests/dom/nodes/Node-childNodes.html:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt:
* web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt:
* web-platform-tests/dom/nodes/selectors.js:
* web-platform-tests/fetch/api/basic/integrity-sharedworker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/integrity-sharedworker.html: Added.
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/html/browsers/history/the-history-interface/non-automated/traverse_the_session_history_unload_prompt_1.html: Removed.
* web-platform-tests/html/browsers/history/the-history-interface/non-automated/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-prototype-setting.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location_hash-expected.txt:
* web-platform-tests/html/browsers/history/the-location-interface/location_hash.html:
* web-platform-tests/html/browsers/history/the-location-interface/location_reload.html:
* web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-on-new-window-expected.txt:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html:
* web-platform-tests/html/browsers/origin/cross-origin-objects/win-documentdomain.sub.html:
* web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/named-objects-expected.txt:
* web-platform-tests/html/browsers/the-window-object/named-access-on-the-window-object/named-objects.html:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms-expected.txt:
* web-platform-tests/html/dom/documents/dom-tree-accessors/document.forms.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/historical.html:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe-append-to-child-document.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_script.html:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper-1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper-3.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_helper.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping.html.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/invalid-src.html:
* web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity.html:
* web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity.html:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch.html:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid.html:
* web-platform-tests/html/semantics/forms/the-form-element/form-indexed-element-expected.txt:
* web-platform-tests/html/semantics/forms/the-form-element/form-indexed-element.html:
* web-platform-tests/html/semantics/forms/the-form-element/form-nameditem-expected.txt:
* web-platform-tests/html/semantics/forms/the-form-element/form-nameditem.html:
* web-platform-tests/html/semantics/forms/the-input-element/checkbox.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1a-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1a.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1b-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1b.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1c-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1c.html:
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1d-expected.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/reversed-1d.html: Added.
* web-platform-tests/html/semantics/grouping-content/the-ol-element/w3c-import.log:
* web-platform-tests/html/semantics/scripting-1/the-script-element/load-event-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/load-event.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/resources/cross-origin.py: Added.
(main):
* web-platform-tests/html/semantics/scripting-1/the-script-element/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/w3c-import.log.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin-network.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-crossorigin.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-1-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-1.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onerror-insertion-point-2.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-insertion-point-expected.txt: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/script-onload-insertion-point.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-1-helper.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onerror-insertion-point-2-helper.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.html: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/support/script-onload-insertion-point-helper.js: Added.
* web-platform-tests/html/semantics/scripting-1/the-script-element/support/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/w3c-import.log.
* web-platform-tests/html/semantics/scripting-1/the-script-element/w3c-import.log:
* web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate-expected.txt:
* web-platform-tests/html/semantics/selectors/pseudo-classes/indeterminate.html:
* web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre-expected.txt:
* web-platform-tests/html/syntax/serializing-html-fragments/initial-linefeed-pre.html:
* web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:
* web-platform-tests/html/syntax/serializing-html-fragments/serializing.html:
* web-platform-tests/html/webappapis/animation-frames/idlharness-expected.txt:
* web-platform-tests/html/webappapis/scripting/event-loops/w3c-import.log:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setInterval.html: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setInterval.html: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html: Added.
* web-platform-tests/media-source/interfaces.html:
* web-platform-tests/media-source/mediasource-avtracks-expected.txt:
* web-platform-tests/media-source/mediasource-remove-expected.txt:
* web-platform-tests/media-source/mediasource-remove.html:
* web-platform-tests/media-source/mediasource-sequencemode-append-buffer.html:
* web-platform-tests/media-source/mediasource-util.js:
(EventExpectationsManager): Deleted.
(EventExpectationsManager.prototype.expectEvent): Deleted.
* web-platform-tests/media-source/mp4/test.mp4:
* web-platform-tests/media-source/webm/test.webm:
* web-platform-tests/resource-timing/resources/gzip_xml.py: Added.
(main):
* web-platform-tests/resource-timing/resources/w3c-import.log:
* web-platform-tests/resource-timing/test_resource_timing-expected.txt:
* web-platform-tests/resource-timing/test_resource_timing.js:
(setup):
(poll_for_stylesheet_load.inner):
(poll_for_stylesheet_load):
(resource_load):
(switch.): Deleted.
(switch.case.string_appeared_here.xmlhttp.onload): Deleted.
(onload): Deleted.
* web-platform-tests/shadow-dom/Document-prototype-adoptNode.html:
* web-platform-tests/shadow-dom/Document-prototype-currentScript.html:
* web-platform-tests/shadow-dom/Document-prototype-importNode.html:
* web-platform-tests/shadow-dom/Element-interface-attachShadow.html:
* web-platform-tests/shadow-dom/Element-interface-shadowRoot-attribute.html:
* web-platform-tests/shadow-dom/Extensions-to-Event-Interface.html:
* web-platform-tests/shadow-dom/HTMLSlotElement-interface.html:
* web-platform-tests/shadow-dom/MouseEvent-prototype-offsetX-offsetY.html:
* web-platform-tests/shadow-dom/Node-prototype-cloneNode.html:
* web-platform-tests/shadow-dom/OWNERS:
* web-platform-tests/shadow-dom/ShadowRoot-interface.html:
* web-platform-tests/shadow-dom/Slotable-interface.html:
* web-platform-tests/shadow-dom/event-composed-path-with-related-target-expected.txt:
* web-platform-tests/shadow-dom/event-composed-path-with-related-target.html:
* web-platform-tests/shadow-dom/event-composed-path.html:
* web-platform-tests/shadow-dom/event-composed.html:
* web-platform-tests/shadow-dom/event-inside-shadow-tree.html:
* web-platform-tests/shadow-dom/event-inside-slotted-node.html:
* web-platform-tests/shadow-dom/event-with-related-target.html:
* web-platform-tests/shadow-dom/leaktests/get-elements.html:
* web-platform-tests/shadow-dom/leaktests/html-collection.html:
* web-platform-tests/shadow-dom/leaktests/window-frames.html:
* web-platform-tests/shadow-dom/scroll-to-the-fragment-in-shadow-tree.html:
* web-platform-tests/shadow-dom/slotchange-event.html:
* web-platform-tests/shadow-dom/slotchange.html:
* web-platform-tests/shadow-dom/slots-fallback.html:
* web-platform-tests/shadow-dom/slots.html:
* web-platform-tests/touch-events/create-touch-touchlist.html:
* web-platform-tests/touch-events/historical.html:
* web-platform-tests/touch-events/touch-globaleventhandler-interface.html:
* web-platform-tests/touch-events/touch-retargeting.html: Added.
* web-platform-tests/touch-events/touch-touchevent-constructor.html:
* web-platform-tests/touch-events/w3c-import.log:
* web-platform-tests/url/interfaces-expected.txt:
* web-platform-tests/w3c-import.log:

LayoutTests:

* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-checkValidity-expected.txt:
* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt:
* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-stepMismatch-expected.txt:
* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/constraints/form-validation-validity-valid-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt:
* tests-options.json:

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

3 years ago[GTK] 2.14.0 Compile Errors: GTK 3.22.1
commit-queue@webkit.org [Mon, 10 Oct 2016 16:16:53 +0000 (16:16 +0000)]
[GTK] 2.14.0 Compile Errors: GTK 3.22.1
https://bugs.webkit.org/show_bug.cgi?id=163190

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-10-10
Reviewed by Alex Christensen.

* UIProcess/gtk/AcceleratedBackingStoreX11.cpp: Include gtk.h since we are using gtk_widget_queue_draw().

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

3 years ago[EFL] ewk_context_preferred_languages has been failed since r206949
commit-queue@webkit.org [Mon, 10 Oct 2016 16:01:11 +0000 (16:01 +0000)]
[EFL] ewk_context_preferred_languages has been failed since r206949
https://bugs.webkit.org/show_bug.cgi?id=163211

Patch by Gyuyoung Kim <gyuyoung.kim@navercorp.com> on 2016-10-10
Reviewed by Chris Dumez.

r206949 changed to return value of navigator.language from en-us to en-US
in order to match other browsers and w3c spec. So ewk_context_preferred_languages
needs to change the expected result as well.

* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):

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

3 years agoREGRESSION(r206731): [SOUP] Network process crash in gotHeadersCallback
carlosgc@webkit.org [Mon, 10 Oct 2016 15:11:11 +0000 (15:11 +0000)]
REGRESSION(r206731): [SOUP] Network process crash in gotHeadersCallback
https://bugs.webkit.org/show_bug.cgi?id=163170

Reviewed by Michael Catanzaro.

Do not assume NetworkingContext is non-null and valid before using it.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::gotHeadersCallback):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):

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

3 years agoImages and scripts should be said as clean based on CachedResource::isCORSSameOrigin
commit-queue@webkit.org [Mon, 10 Oct 2016 13:42:24 +0000 (13:42 +0000)]
Images and scripts should be said as clean based on CachedResource::isCORSSameOrigin
https://bugs.webkit.org/show_bug.cgi?id=162390

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Darin Adler.

No observable change of behavior.

Renaming CachedResource::isClean to isCORSSameOrigin to match html spec terminology.
Making use of it to check whether images taint canvas and whether script errors should be sanitized.

Some asserts are added to ensure that a resource fetched using one origin is not reused for another origin.

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::sanitizeScriptError):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::initializeStyleSheet):
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::wouldTaintOrigin):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::isOriginClean):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::isCORSSameOrigin):
* loader/cache/CachedResource.h:

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

3 years ago[Fetch API] Memory cache should not bypass redirect mode
commit-queue@webkit.org [Mon, 10 Oct 2016 13:09:56 +0000 (13:09 +0000)]
[Fetch API] Memory cache should not bypass redirect mode
https://bugs.webkit.org/show_bug.cgi?id=162959

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Darin Adler.

Source/WebCore:

Test: http/tests/fetch/redirectmode-and-preload.html

Ensure reloading of resources if the redirect modes are different between request and cached resource, and
cached resource has redirections.

As a temporary workaround, we activate resource update for raw resources in
shouldUpdateCachedResourceWithCurrentRequest but disable it in canUpdateFromResource.
This allows handling reloading of resources with different redirection mode in canUpdateFromResource.

A future patch should allow loading cached raw resources from other cached raw resources.

* loader/cache/CachedResource.h:
(WebCore::CachedResource::hasRedirections):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest):
(WebCore::canUpdateFromResource):
(WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):

LayoutTests:

* http/tests/fetch/redirectmode-and-preload-expected.txt: Added.
* http/tests/fetch/redirectmode-and-preload.html: Added.
* http/tests/fetch/resources/redirect-with-cache.php:

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

3 years agoW3C test downloader should be able to import specific files/sub-directories in a...
commit-queue@webkit.org [Mon, 10 Oct 2016 10:27:27 +0000 (10:27 +0000)]
W3C test downloader should be able to import specific files/sub-directories in a skipped directory
https://bugs.webkit.org/show_bug.cgi?id=161789

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

Removed tests_directory option and corresponding test.
This option was allowing to import a sub-directory from a test repository.
We can readd it if necessary.

Adding support for finer-grained import rules.
Previously skipped directories were fully removed.
Now, directories may be skipped but sub directories of them may be imported.
This currently happens in web-platform-tests repo.

* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader._add_test_suite_paths): Removing tests_directory option.
(TestDownloader.copy_tests): Refactoring file copy by generating the list of all directories for which direct files should be imported.
(TestDownloader.copy_tests.should_copy_dir):
(TestDownloader.copy_tests.should_copy_file):
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_tests_directory): Deleted.
(TestImporterTest.test_skip_test_import): Added.

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

3 years agoAttribute getter binding generated code should use more references
commit-queue@webkit.org [Mon, 10 Oct 2016 09:03:09 +0000 (09:03 +0000)]
Attribute getter binding generated code should use more references
https://bugs.webkit.org/show_bug.cgi?id=163179

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Darin Adler.

No change of behavior.

Using more references in attribute getter generated code since BindingCaller::attribute can do the
pointer-to-references checks once for all.

Needed to update GenerateCallWith and NativeToJSValue to handle the case where references (attribute getters) or
pointers (methods and attribute setters) are to be used.
Future refactoring should allign methods/attribute setters to attribute getters.

* bindings/js/JSDOMBinding.h:
(WebCore::BindingCaller::attribute):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateCallWith):
(NativeToJSValue):
(JSValueToNative):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSattribute.cpp:

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

3 years agoFix Mac Win build after https://trac.webkit.org/changeset/206966
commit-queue@webkit.org [Mon, 10 Oct 2016 08:33:17 +0000 (08:33 +0000)]
Fix Mac Win build after https://trac.webkit.org/changeset/206966
https://bugs.webkit.org/show_bug.cgi?id=163199

Unreviewed.

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

* bindings/js/JSDOMBinding.h: Marking rejectPromiseWithGetterTypeError as WEBCORE_EXPORT.

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

3 years agoEnable optimized stylesheet updates in shadow trees
antti@apple.com [Mon, 10 Oct 2016 08:19:03 +0000 (08:19 +0000)]
Enable optimized stylesheet updates in shadow trees
https://bugs.webkit.org/show_bug.cgi?id=163180

Reviewed by Darin Adler.

Source/WebCore:

When we get a new stylesheet (for example when load completes) we invalidate only
those elements in DOM that are affected by the new sheet. This patch makes the
optimization also work in shadow trees.

Test: fast/shadow-dom/scoped-style-invalidation.html

* css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::invalidateStyle):
* css/StyleInvalidationAnalysis.h:
* dom/Document.cpp:
(WebCore::Document::didRemoveAllPendingStylesheet):
* style/StyleScope.cpp:
(WebCore::Style::Scope::removePendingSheet):
(WebCore::Style::Scope::analyzeStyleSheetChange):
(WebCore::Style::Scope::updateActiveStyleSheets):

LayoutTests:

* fast/shadow-dom/scoped-style-invalidation-expected.txt: Added.
* fast/shadow-dom/scoped-style-invalidation.html: Added.

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

3 years agoRefactor binding generated casted-this checks for attribute setters
commit-queue@webkit.org [Mon, 10 Oct 2016 08:13:56 +0000 (08:13 +0000)]
Refactor binding generated casted-this checks for attribute setters
https://bugs.webkit.org/show_bug.cgi?id=163181

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-10
Reviewed by Darin Adler.

No change of behavior.
Covered by existing tests and binding expectations.

Adding support for attribute setter in BindingCaller.
Updating binding generator to make use of it.
Future refactoring should use more reference and rename castedThis to thisObject, like for getters.

* bindings/js/JSDOMBinding.h:
(WebCore::BindingCaller::setAttribute):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:

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

3 years agoNetworkSession: downloads started by startDownload() can fail before starting from...
carlosgc@webkit.org [Mon, 10 Oct 2016 07:45:52 +0000 (07:45 +0000)]
NetworkSession: downloads started by startDownload() can fail before starting from the API point of view
https://bugs.webkit.org/show_bug.cgi?id=163107

Reviewed by Alex Christensen.

In the network process we use a PendingDownload in this case, but in the UI process we always have a single
download proxy. If an error happens before the pending download is converted inot a real download, the DidFail
messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+
API, because it's common to connect to the started signal and connect to all other signals from there, but in
this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for
downloads started by convertTaskToDownload, because in that case those loads are not considered a download by
the UI process when those early errors happen, and then the web page handles them.

* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload): Send DidStart message right after the network load starts like the
non network session code does.
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::convertTaskToDownload): Send DidStart message now that the normal load has been converted
into a download.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::findPendingDownloadLocation): Do not send DidStart message here.

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

3 years agoNetwork Session: PendingDownload is always nullptr in DownloadManager::dataTaskBecame...
carlosgc@webkit.org [Mon, 10 Oct 2016 07:28:48 +0000 (07:28 +0000)]
Network Session: PendingDownload is always nullptr in DownloadManager::dataTaskBecameDownloadTask
https://bugs.webkit.org/show_bug.cgi?id=163006

Reviewed by Alex Christensen.

In DownloadManager::dataTaskBecameDownloadTask() we are supposed to have either a pending download, or a network
data task depending on whether the download was started by startDownload() or convertTaskToDownload. However, in
both cases we do have a data task and never a pending download. In the case of startDownload() the pending
download is removed from m_pendingDownloads in willDecidePendingDownloadDestination(). The task is always
added to m_downloadsWaitingForDestination in willDecidePendingDownloadDestination() and to
m_downloadsAfterDestinationDecided in continueDecidePendingDownloadDestination() in both cases.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::dataTaskBecameDownloadTask): Add an ASSERT to ensure we don't have a pending download
at this point and that the download is not already in the map. Remove the download from the
m_downloadsAfterDestinationDecided map, but don't check its result because it might not bein that map if
dataTaskBecameDownloadTask is called synchronously from the didReceiveResponse completion handler.
(WebKit::DownloadManager::willDecidePendingDownloadDestination): Do not take the pending download here, wait
until didReceiveResponse completion handler is called.
(WebKit::DownloadManager::continueDecidePendingDownloadDestination): Take the pending download here ensuring
it's alive while the didReceiveResponse completion handler is called. Also remove invalid early return when
either networkDataTask or completionHandler are nullptr because we are using both unconditionally, we should
return early if both are nullptr to avoid crashes. However, we are checking that the download is in the
m_downloadsWaitingForDestination and in that case we should always have both, so better add asserts there. If
the download is already in the map after the completion handler it means that dataTaskBecameDownloadTask() has
alrady been called, so we can just return in that case.
* NetworkProcess/Downloads/DownloadManager.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didBecomeDownloadTask:]): Protect the NetworkDataTask that can
be deleted by dataTaskBecameDownloadTask().

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

3 years agoShare more code between iOS and macOS ViewGestureController
timothy_horton@apple.com [Mon, 10 Oct 2016 07:13:32 +0000 (07:13 +0000)]
Share more code between iOS and macOS ViewGestureController
https://bugs.webkit.org/show_bug.cgi?id=163158

Reviewed by Simon Fraser.

Share canSwipeInDirection() and the (unused on Mac) alternate back-forward list mechanism.
Make ViewGestureController operate in terms of WebPageProxy, not WKWebView,
because it shouldn't know anything about WKWebView.
Refactor scrollEventCanBecomeSwipe a bit to be less repetitive.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::setAlternateBackForwardListSourcePage):
(WebKit::ViewGestureController::canSwipeInDirection):
(WebKit::ViewGestureController::gestureControllerForPage): Deleted.
* UIProcess/Cocoa/ViewGestureController.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::createWeakPtr):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView): Deleted.
(WebKit::ViewGestureController::canSwipeInDirection): Deleted.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::PendingSwipeTracker::PendingSwipeTracker):
(WebKit::ViewGestureController::PendingSwipeTracker::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::PendingSwipeTracker::tryToStartSwipe):

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

3 years ago[GTK] UIProcess crashes when using Japanese IM
commit-queue@webkit.org [Mon, 10 Oct 2016 07:12:35 +0000 (07:12 +0000)]
[GTK] UIProcess crashes when using Japanese IM
https://bugs.webkit.org/show_bug.cgi?id=163011

We have to reference the current GdkEventKey before we try process it
as later when the lambda body is reached the event could be already
freed.

Patch by Tomas Popela <tpopela@redhat.com> on 2016-10-10
Reviewed by Carlos Garcia Campos.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
* UIProcess/gtk/InputMethodFilter.h:
Use non-copyable Function so we can use WTFMove to pass the event to
lambda.

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

3 years agoMove encrypted media from legacy to new DOM exceptions
darin@apple.com [Mon, 10 Oct 2016 06:54:21 +0000 (06:54 +0000)]
Move encrypted media from legacy to new DOM exceptions
https://bugs.webkit.org/show_bug.cgi?id=163194

Reviewed by Youenn Fablet.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::createSession): Take a reference instead of a pointer.
* Modules/encryptedmedia/CDM.h: Updated for above change.

* Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
(WebCore::WebKitMediaKeySession::create): Take a reference instead of a pointer.
(WebCore::WebKitMediaKeySession::MediaKeySession): Ditto.
(WebCore::WebKitMediaKeySession::~MediaKeySession): Removed unneeded code that
sets m_session to null.
(WebCore::WebKitMediaKeySession::keyRequestTimerFired): Use auto.
(WebCore::WebKitMediaKeySession::update): Use ExceptionOr.
(WebCore::WebKitMediaKeySession::addKeyTimerFired): Use m_keys directly instead
of calling the keys function.
(WebCore::WebKitMediaKeySession::sendError): Set m_error directly instead of
calling the setError function.
(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory): Use auto.
(WebCore::WebKitMediaKeySession::hasPendingActivity): Check m_session directly
instead of writing !isClosed.
(WebCore::WebKitMediaKeySession::setError): Deleted.

* Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: Use pragma once. Removed
unneeded includes. Changed create to take a reference instead of a pointer.
Made most members and base classes private instead of public. Also removed
a few now-unneeded functions. Made everything that was formerly protected
private instead, since the two are the same in a final class.

* Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: Removed unneeded comments.
Moved from MayThrowLegacyException to MayThrowException.

* Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
(WebCore::WebKitMediaKeys::create): Use ExceptionOr.
(WebCore::WebKitMediaKeys::MediaKeys): Made argument be an rvalue reference.
Also initialize m_mediaElement in the class definition.
(WebCore::WebKitMediaKeys::~MediaKeys): Call detachKeys instead of setKeys(nullptr).
(WebCore::WebKitMediaKeys::createSession): Use ExceptionOr. Also pass reference
insteead of pointer to create. Also removed unneeded separate checks for null
strings in code that already calls isEmpty.
(WebCore::WebKitMediaKeys::isTypeSupported): Removed unneeded checks for null strings
in code that already calls isEmpty.
(WebCore::WebKitMediaKeys::cdmMediaPlayer): Tweaked a bit.
(WebCore::WebKitMediaKeys::cachedKeyForKeyId): Use auto.

* Modules/encryptedmedia/legacy/WebKitMediaKeys.h: Use pragma once. Removed unneeded includes.
Changed cdm() function to return a reference. Initialize m_mediaElement.
Use private instead of protected.

* Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: Use ConstructorMayThrowException
and MayThrowException instead of the legacy versions.

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

3 years agoENABLE_LEGACY_ENCRYPTED_MEDIA interfaces should have a hard-coded WebKit prefix
zandobersek@gmail.com [Mon, 10 Oct 2016 06:21:52 +0000 (06:21 +0000)]
ENABLE_LEGACY_ENCRYPTED_MEDIA interfaces should have a hard-coded WebKit prefix
https://bugs.webkit.org/show_bug.cgi?id=162982

Reviewed by Jer Noble.

Have the Web-exposed interfaces guarded by ENABLE_LEGACY_ENCRYPTED_MEDIA also use
the WebKit prefix in the implementations. This will prevent conflicts between
interfaces with same names in both the legacy API and the future EME API.

Most of the interfaces in this legacy API already used the WebKit prefix when
exposed via JS bindings. The only exception is MediaKeyNeededEvent, which gets
prefixed in this patch.

The interface implementations for this legacy API are also moved under the
Modules/encryptedmedia/legacy/ directory.

No new tests -- covered by existing tests (with the relevant changes reflected
in the updated baselines).

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* Modules/encryptedmedia/CDM.cpp:
* Modules/encryptedmedia/CDMSessionClearKey.cpp:
(WebCore::CDMSessionClearKey::generateKeyRequest):
(WebCore::CDMSessionClearKey::update):
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp.
(WebCore::WebKitMediaKeyMessageEvent::WebKitMediaKeyMessageEvent):
(WebCore::WebKitMediaKeyMessageEvent::~WebKitMediaKeyMessageEvent):
(WebCore::WebKitMediaKeyMessageEvent::eventInterface):
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h.
(WebCore::WebKitMediaKeyMessageEvent::create):
(WebCore::WebKitMediaKeyMessageEvent::createForBindings):
* Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl.
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.cpp.
(WebCore::WebKitMediaKeyNeededEvent::WebKitMediaKeyNeededEvent):
(WebCore::WebKitMediaKeyNeededEvent::~WebKitMediaKeyNeededEvent):
(WebCore::WebKitMediaKeyNeededEvent::eventInterface):
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h.
(WebCore::WebKitMediaKeyNeededEvent::create):
(WebCore::WebKitMediaKeyNeededEvent::createForBindings):
* Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.idl.
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp.
(WebCore::WebKitMediaKeySession::create):
(WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
(WebCore::WebKitMediaKeySession::setError):
(WebCore::WebKitMediaKeySession::close):
(WebCore::WebKitMediaKeySession::cachedKeyForKeyId):
(WebCore::WebKitMediaKeySession::sessionId):
(WebCore::WebKitMediaKeySession::generateKeyRequest):
(WebCore::WebKitMediaKeySession::keyRequestTimerFired):
(WebCore::WebKitMediaKeySession::update):
(WebCore::WebKitMediaKeySession::addKeyTimerFired):
(WebCore::WebKitMediaKeySession::sendMessage):
(WebCore::WebKitMediaKeySession::sendError):
(WebCore::WebKitMediaKeySession::mediaKeysStorageDirectory):
(WebCore::WebKitMediaKeySession::hasPendingActivity):
(WebCore::WebKitMediaKeySession::stop):
(WebCore::WebKitMediaKeySession::activeDOMObjectName):
(WebCore::WebKitMediaKeySession::canSuspendForDocumentSuspension):
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.h.
* Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl.
* Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp.
(WebCore::WebKitMediaKeys::create):
(WebCore::WebKitMediaKeys::WebKitMediaKeys):
(WebCore::WebKitMediaKeys::~WebKitMediaKeys):
(WebCore::WebKitMediaKeys::createSession):
(WebCore::WebKitMediaKeys::isTypeSupported):
(WebCore::WebKitMediaKeys::setMediaElement):
(WebCore::WebKitMediaKeys::cdmMediaPlayer):
(WebCore::WebKitMediaKeys::keyAdded):
(WebCore::WebKitMediaKeys::cachedKeyForKeyId):
* Modules/encryptedmedia/legacy/WebKitMediaKeys.h: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.h.
* Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: Renamed from Source/WebCore/Modules/encryptedmedia/MediaKeys.idl.
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::setMediaKeys):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::keys):
* html/HTMLMediaElement.idl:
* html/WebKitMediaKeyError.h: Renamed from Source/WebCore/html/MediaKeyError.h.
(WebCore::WebKitMediaKeyError::create):
(WebCore::WebKitMediaKeyError::WebKitMediaKeyError):
* html/WebKitMediaKeyError.idl: Renamed from Source/WebCore/html/MediaKeyError.idl.
* testing/MockCDM.cpp:
(WebCore::MockCDMSession::generateKeyRequest):
(WebCore::MockCDMSession::update):

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

3 years agoRemove stale ENABLE(ENCRYPTED_MEDIA) code in HTMLMediaElement
zandobersek@gmail.com [Mon, 10 Oct 2016 06:19:12 +0000 (06:19 +0000)]
Remove stale ENABLE(ENCRYPTED_MEDIA) code in HTMLMediaElement
https://bugs.webkit.org/show_bug.cgi?id=163111

Reviewed by Alex Christensen.

Remove three method implementations in HTMLMediaElement which had their
declarations and the related WebIDL entries removed in the first ENCRYPTED_MEDIA
purge in r206440.

No new tests -- no changes in behavior.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::webkitGenerateKeyRequest): Deleted.
(WebCore::HTMLMediaElement::webkitAddKey): Deleted.
(WebCore::HTMLMediaElement::webkitCancelKeyRequest): Deleted.

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