WebKit-https.git
3 years agoMake unit tests return a promise instead of manually calling done
rniwa@webkit.org [Wed, 15 Mar 2017 18:15:33 +0000 (18:15 +0000)]
Make unit tests return a promise instead of manually calling done
https://bugs.webkit.org/show_bug.cgi?id=169663

Reviewed by Antti Koivisto.

Make the existing unit tests always reutrn a promise instead of manually calling "done" callback as done
in r213969. The promise tests are a lot more stable and less error prone.

Also use MockRemoteAPI.waitForRequest() instead of chaining two resolved promises where appropriate.

* unit-tests/analysis-task-tests.js:
* unit-tests/buildbot-syncer-tests.js:
* unit-tests/checkconfig.js:
* unit-tests/privileged-api-tests.js:

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

3 years agoClean up RTCPeerConnection IDL
jonlee@apple.com [Wed, 15 Mar 2017 18:15:31 +0000 (18:15 +0000)]
Clean up RTCPeerConnection IDL
https://bugs.webkit.org/show_bug.cgi?id=169660

Reviewed by Youenn Fablet.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTransceiver): Refactor to use RTCRtpTransceiverInit.
(WebCore::RTCPeerConnection::completeAddTransceiver):
* Modules/mediastream/RTCPeerConnection.h: Remove redundant definitions.
* Modules/mediastream/RTCPeerConnection.idl: Using 13 March 2017 Editor's Draft of
WebRTC spec. Move RTCOfferAnswerOptions out to separate IDLs. Keep RTCDataChannelInit and
RTCRtpTransceiverInit since they appear to be used only in RTCPeerConnection.
    Reorder the properties, functions, and events based on their appearance in the spec.
Legacy MediaStream calls are placed at the end. I tried to use "partial interface" in the
same file, but in the end nothing was generated, so everything is contained in one interface
block.

* Modules/mediastream/RTCEnums.h: Added. This will be an all-in-one header to hold the
enums.

Move RTCAnswerOptions, RTCOfferAnswerOptions, RTCOfferOptions, RTCRtpTransceiverDirection
out to their own IDL's.
* CMakeLists.txt:
* DerivedSources.make:
* Modules/mediastream/RTCAnswerOptions.h: Added.
* Modules/mediastream/RTCAnswerOptions.idl: Added.
* Modules/mediastream/RTCOfferAnswerOptions.h:
* Modules/mediastream/RTCOfferAnswerOptions.idl: Added.
* Modules/mediastream/RTCOfferOptions.h: Added. Remove |offerToReceiveVideo| and
|offerToReceiveAudio|, which are not used.
* Modules/mediastream/RTCOfferOptions.idl: Added.
* Modules/mediastream/RTCRtpTransceiverDirection.h: Added.
* Modules/mediastream/RTCRtpTransceiverDirection.idl: Added. Use a typedef for
RTCRtpTransceiverDirection to prevent the code generator from prefixing RTCRtpTransceiver.
* Modules/mediastream/RTCRtpTransceiver.idl: Move RTCRtpTransceiverDirection.
* WebCore.xcodeproj/project.pbxproj: Add IDLs and derived sources. Remove unused
HTMLMediaElementMediaStream.h. Reorder.

Refactor.
* Modules/mediastream/RTCRtpTransceiver.h: Use RTCRtpTransceiverDirection.
* Modules/mediastream/MediaEndpointPeerConnection.cpp:

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

3 years agoWeb Inspector: REGRESSION: Elements Tab > Node Details Sidebar > Properties Section...
joepeck@webkit.org [Wed, 15 Mar 2017 18:15:21 +0000 (18:15 +0000)]
Web Inspector: REGRESSION: Elements Tab > Node Details Sidebar > Properties Section is spammed with TypeErrors
https://bugs.webkit.org/show_bug.cgi?id=153911
<rdar://problem/24520098>

Reviewed by Devin Rousso.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.inspectedPage_node_collectPrototypes):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved):
Update due to naming conventions for code that evalutes in the inspected page.

(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
Create a more complete ObjectTreeView for the different sections.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype._updateChildren):
PureAPI behaves the same as ClassAPI and just shows own properties.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.showOnlyProperties):
In only properties mode don't show the Prototype expander at the end.

(WebInspector.ObjectTreeView.prototype.setPrototypeNameOverride):
Allow a prototype name override at the top level. This will allow clients
to specify that the object at the top level is a Prototype object, so that
ObjectTreePropertyTreeElements can infer the right NativeFunctionParameter
information knowing that those properties are on a particular prototype.

(WebInspector.ObjectTreeView.prototype.update):
For the PureAPI use getOwnProperties instead of getDisplayableProperties.
This avoids the special handling we have for DOM native properties which
we bubble up to the top as value descriptors even though they are actually
accessor descriptors on prototypes.

(WebInspector.ObjectTreeView.prototype._updateProperties):
Pass the prototype name override onward for object properties.

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

3 years ago[GTK] Initialize m_button, m_clickCount members in PlatformMouseEvent constructors
zandobersek@gmail.com [Wed, 15 Mar 2017 18:03:31 +0000 (18:03 +0000)]
[GTK] Initialize m_button, m_clickCount members in PlatformMouseEvent constructors
https://bugs.webkit.org/show_bug.cgi?id=169666

Reviewed by Michael Catanzaro.

Initialize the m_button and m_clickCount class members in the GTK+-specific
implementation of PlatformMouseEvent constructors to NoButton and 0,
respectively. The constructors expect to operate on passed-in GTK+ events
that will be able to initialize those two members to some valid values, but
this is not guaranteed.

* platform/gtk/PlatformMouseEventGtk.cpp:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):

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

3 years ago[TexMap] Add missing class member initializations
zandobersek@gmail.com [Wed, 15 Mar 2017 18:02:07 +0000 (18:02 +0000)]
[TexMap] Add missing class member initializations
https://bugs.webkit.org/show_bug.cgi?id=169665

Reviewed by Michael Catanzaro.

Zero-initialize the members in various TextureMapper classes
that are missing the proper initialization, as reported by
the Coverity tool.

* platform/graphics/texmap/BitmapTexturePool.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
* platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:

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

3 years agoCompiled content extensions should include the JSON source
achristensen@apple.com [Wed, 15 Mar 2017 17:59:08 +0000 (17:59 +0000)]
Compiled content extensions should include the JSON source
https://bugs.webkit.org/show_bug.cgi?id=169643

Reviewed by Geoffrey Garen.

Source/WebCore:

Serializing the JSON string from which a content extension was compiled
to disk with the compiled content extension will allow us to validate content
extensions and automatically migrate older content extensions to new versions.
It less than doubles the size of the compiled content extension on disk, and when
interpreting the bytecode that memory is never read, so it doesn't increase our
dirty memory usage.

Covered by new API tests.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionCompiler.h:

Source/WebKit2:

* UIProcess/API/APIContentExtensionStore.cpp:
(API::ContentExtensionStore::ContentExtensionStore):
(API::ContentExtensionMetaData::fileSize):
(API::encodeContentExtensionMetaData):
(API::decodeContentExtensionMetaData):
(API::compiledToFile):
(API::createExtension):
(API::ContentExtensionStore::getContentExtensionSource):
* UIProcess/API/APIContentExtensionStore.h:
* UIProcess/API/Cocoa/WKContentExtensionStore.mm:
(toWKErrorCode):
(-[WKContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):
(-[WKContentExtensionStore _getContentExtensionSourceForIdentifier:completionHandler:]):
* UIProcess/API/Cocoa/WKContentExtensionStorePrivate.h:
* UIProcess/API/Cocoa/WKError.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
* UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
(toUserContentExtensionStoreError):
(-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
(-[_WKUserContentExtensionStore lookupContentExtensionForIdentifier:completionHandler:]):
(-[_WKUserContentExtensionStore removeContentExtensionForIdentifier:completionHandler:]):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKUserContentExtensionStore.mm:
(TEST_F):

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

3 years ago[Modern Media Controls] Captions do not default to Auto when language is changed
commit-queue@webkit.org [Wed, 15 Mar 2017 17:40:59 +0000 (17:40 +0000)]
[Modern Media Controls] Captions do not default to Auto when language is changed
https://bugs.webkit.org/show_bug.cgi?id=169675
<rdar://problem/30423369>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-15
Reviewed by Eric Carlson.

Source/WebCore:

Ensure we correctly mark the Off and Auto items as selected when we are using the
Off and Auto tracks.

Tests: media/modern-media-controls/tracks-support/tracks-support-auto-text-track.html
       media/modern-media-controls/tracks-support/tracks-support-off-text-track.html

* Modules/modern-media-controls/media/tracks-support.js:
(TracksSupport.prototype.tracksPanelIsTrackInSectionSelected):
(TracksSupport.prototype.tracksPanelSelectionDidChange):

LayoutTests:

Add new tests that check the cases where the expected selected track should be "Off" or "Auto".

* media/modern-media-controls/tracks-support/tracks-support-auto-text-track-expected.txt: Added.
* media/modern-media-controls/tracks-support/tracks-support-auto-text-track.html: Added.
* media/modern-media-controls/tracks-support/tracks-support-off-text-track-expected.txt: Added.
* media/modern-media-controls/tracks-support/tracks-support-off-text-track.html: Added.

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

3 years agoUse git's -C flag when possible in VCSUtils.pm
commit-queue@webkit.org [Wed, 15 Mar 2017 17:21:00 +0000 (17:21 +0000)]
Use git's -C flag when possible in VCSUtils.pm
https://bugs.webkit.org/show_bug.cgi?id=169003

Patch by Kocsen Chung <kocsen_chung@apple.com> on 2017-03-15
Reviewed by Sam Weinig.

Use the git -C flag where appropriate to perform the
operation on a target directory and avoid unnecessary logic
to `cd` in and out of the target directory.

* Scripts/VCSUtils.pm:
(isGitDirectory):
(isGitSVNDirectory):
(svnRevisionForDirectory):
(svnInfoForPath):
For all four subroutines, use git's -C flag and strip `cd` logic.

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

3 years agoUnreviewed, rolling out r213977.
ryanhaddad@apple.com [Wed, 15 Mar 2017 17:06:55 +0000 (17:06 +0000)]
Unreviewed, rolling out r213977.

This change broke the Windows build.

Reverted changeset:

"Make a base class for WebGL and WebGPU contexts"
https://bugs.webkit.org/show_bug.cgi?id=169651
http://trac.webkit.org/changeset/213977

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

3 years agoMark http/tests/media/modern-media-controls/time-labels-support/long-time.html as...
ryanhaddad@apple.com [Wed, 15 Mar 2017 17:04:33 +0000 (17:04 +0000)]
Mark http/tests/media/modern-media-controls/time-labels-support/long-time.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=169677

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agorun-webkit-tests is always creating mock libwebrtc tracks
commit-queue@webkit.org [Wed, 15 Mar 2017 16:38:10 +0000 (16:38 +0000)]
run-webkit-tests is always creating mock libwebrtc tracks
https://bugs.webkit.org/show_bug.cgi?id=169658

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

Source/WebCore:

Tests: webrtc/peer-connection-audio-mute.html
       webrtc/video-mute.html

Creating real libwebrtc av tracks in case of RealTwoPeerConnections mock factory.

* testing/MockLibWebRTCPeerConnection.cpp:
(WebCore::MockLibWebRTCPeerConnectionFactory::CreateVideoTrack):
(WebCore::MockLibWebRTCPeerConnectionFactory::CreateAudioTrack):
* testing/MockLibWebRTCPeerConnection.h:

LayoutTests:

* TestExpectations:
* webrtc/audio-peer-connection-webaudio.html:
* webrtc/peer-connection-audio-mute-expected.txt: Added.
* webrtc/peer-connection-audio-mute.html: Added.
* webrtc/routines.js:
(analyseAudio):
* webrtc/video-expected.txt:
* webrtc/video-mute-expected.txt: Added.
* webrtc/video-mute.html: Added.
* webrtc/video.html:

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

3 years agoPreventive clean-up: ensure RTCPeerConnection stays valid when calling postTask
commit-queue@webkit.org [Wed, 15 Mar 2017 16:35:18 +0000 (16:35 +0000)]
Preventive clean-up: ensure RTCPeerConnection stays valid when calling postTask
https://bugs.webkit.org/show_bug.cgi?id=169661

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

Source/WebCore:

Protecting the RTCPeerConnection object when calling postTask since it might get collected between the task post
and task run. Also do not send negotiationNeeded event if RTCPeerConnection is closed (covered by added test).

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):
(WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):

LayoutTests:

* webrtc/negotiatedneeded-event-addStream-expected.txt:
* webrtc/negotiatedneeded-event-addStream.html:

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

3 years agoMark media/modern-media-controls/volume-down-support/volume-down-support.html as...
ryanhaddad@apple.com [Wed, 15 Mar 2017 15:58:18 +0000 (15:58 +0000)]
Mark media/modern-media-controls/volume-down-support/volume-down-support.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169568

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years ago[Modern Media Controls] Always use six digits to display time when overall media...
commit-queue@webkit.org [Wed, 15 Mar 2017 12:42:38 +0000 (12:42 +0000)]
[Modern Media Controls] Always use six digits to display time when overall media duration is an hour or more
https://bugs.webkit.org/show_bug.cgi?id=169668
<rdar://problem/31059699>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-15
Reviewed by Dean Jackson.

Source/WebCore:

Always use six digits to display times when the overall media duration is an hour or more. This
ensures that we don't display too much white space around labels when we know we will eventually
need six digits to display the full time, but the current time to display is under an hour.

Test: media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html

* Modules/modern-media-controls/controls/time-control.js:
(TimeControl.prototype.get useSixDigitsForTimeLabels):
(TimeControl.prototype.set useSixDigitsForTimeLabels):
(TimeControl.prototype.set width):
(TimeControl.prototype.get isSufficientlyWide):
(TimeControl.prototype._availableWidthHasChanged):
(TimeControl.prototype.get labelsMayDisplayTimesOverAnHour): Deleted.
(TimeControl.prototype.set labelsMayDisplayTimesOverAnHour): Deleted.
* Modules/modern-media-controls/controls/time-label.js:
(TimeLabel.prototype._formattedTime):
* Modules/modern-media-controls/media/time-labels-support.js:
(TimeLabelsSupport.prototype.syncControl):
(TimeLabelsSupport):

LayoutTests:

Rebase some tests due to the rename of the labelsMayDisplayTimesOverAnHour property to
useSixDigitsForTimeLabels. We also add an assertion in long-time.html to check that
we currently use six digits to display a time that is under an hour but where the
media duration is over an hour.

* http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt:
* http/tests/media/modern-media-controls/time-labels-support/long-time.html:
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt.
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html.

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

3 years ago[mac-wk1 debug] LayoutTest media/modern-media-controls/airplay-placard/airplay-placar...
commit-queue@webkit.org [Wed, 15 Mar 2017 10:19:04 +0000 (10:19 +0000)]
[mac-wk1 debug] LayoutTest media/modern-media-controls/airplay-placard/airplay-placard-text-section.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=169654
<rdar://problem/31059092>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-15
Reviewed by Dean Jackson.

Using an asynchronous assertion to improve reliability.

* media/modern-media-controls/airplay-placard/airplay-placard-text-section-expected.txt:
* media/modern-media-controls/airplay-placard/airplay-placard-text-section.html:

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

3 years agoSort Xcode project files
dino@apple.com [Wed, 15 Mar 2017 09:51:49 +0000 (09:51 +0000)]
Sort Xcode project files
https://bugs.webkit.org/show_bug.cgi?id=169669

Reviewed by Antoine Quint.

Source/JavaScriptCore:

* JavaScriptCore.xcodeproj/project.pbxproj:

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj:

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* WTF.xcodeproj/project.pbxproj:

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

3 years agoMake a base class for WebGL and WebGPU contexts
dino@apple.com [Wed, 15 Mar 2017 09:43:12 +0000 (09:43 +0000)]
Make a base class for WebGL and WebGPU contexts
https://bugs.webkit.org/show_bug.cgi?id=169651
<rdar://problem/31053489>

Reviewed by Simon Fraser.

Add a new pure virtual base class, GPUBasedCanvasRenderingContext, that
will be used by WebGL and WebGPU rendering contexts. This allows us
to avoid some code duplication, since many places treat the two
as the same.

Also rename is3d() -> isWebGL() and isGPU() -> isWebGPU().

* WebCore.xcodeproj/project.pbxproj: New file.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContextWebGL):
(WebCore::HTMLCanvasElement::getContextWebGPU):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::paint):
(WebCore::HTMLCanvasElement::isGPUBased):
(WebCore::HTMLCanvasElement::getImageData):
(WebCore::HTMLCanvasElement::isGPU): Deleted.
(WebCore::HTMLCanvasElement::is3D): Deleted.
* html/HTMLCanvasElement.h:
* html/canvas/CanvasRenderingContext.h:
(WebCore::CanvasRenderingContext::isWebGL):
(WebCore::CanvasRenderingContext::isWebGPU):
(WebCore::CanvasRenderingContext::isGPUBased):
(WebCore::CanvasRenderingContext::is3d): Deleted.
(WebCore::CanvasRenderingContext::isGPU): Deleted.
* html/canvas/GPUBasedCanvasRenderingContext.h: Added.
(WebCore::GPUBasedCanvasRenderingContext::GPUBasedCanvasRenderingContext):
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
* html/canvas/WebGLRenderingContextBase.h:
* html/canvas/WebGPURenderingContext.cpp:
(WebCore::WebGPURenderingContext::WebGPURenderingContext):
* html/canvas/WebGPURenderingContext.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::canvasCompositingStrategy):

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

3 years agoRewrite 'pull-os-versions' script in Javascript to add support for reporting os revis...
dewei_zhu@apple.com [Wed, 15 Mar 2017 08:35:07 +0000 (08:35 +0000)]
Rewrite 'pull-os-versions' script in Javascript to add support for reporting os revisions with sub commits.
https://bugs.webkit.org/show_bug.cgi?id=169542

Reviewed by Ryosuke Niwa.

Extend '/api/commits/<repository>/last-reported' to accept a range and return last reported commits in given range.
Rewrite 'pull-os-versions' in JavaScript and add unit tests for it.
Instead of writing query manually while searching criteria contains null columns, use the methods provided in 'db.php'.
Add '.gitignore' file to ommit files generated by while running tests/instances locally.

* .gitignore: Added.
* public/api/commits.php:
* public/api/report-commits.php:
* public/include/commit-log-fetcher.php:
* public/include/db.php: 'null_columns' of prepare_params should be a reference.
* public/include/report-processor.php:
* server-tests/api-commits.js:
(then):
* server-tests/api-report-commits-tests.js:
* server-tests/resources/mock-logger.js: Added.
(MockLogger):
(MockLogger.prototype.log):
(MockLogger.prototype.error):
* server-tests/resources/mock-subprocess.js: Added.
(MockSubprocess.call):
(MockSubprocess.waitingForInvocation):
(MockSubprocess.inject):
(MockSubprocess.reset):
* server-tests/tools-buildbot-triggerable-tests.js:
(MockLogger): Deleted.
(MockLogger.prototype.log): Deleted.
(MockLogger.prototype.error): Deleted.
* server-tests/tools-os-build-fetcher-tests.js: Added.
(beforeEach):
(return.waitingForInvocationPromise.then):
(then):
(string_appeared_here.return.waitingForInvocationPromise.then):
(return.addSlaveForReport.emptyReport.then):
* tools/js/os-build-fetcher.js: Added.
(OSBuildFetcher):
(OSBuildFetcher.prototype._fetchAvailableBuilds):
(OSBuildFetcher.prototype._computeOrder):
(OSBuildFetcher.prototype._commitsForAvailableBuilds.return.this._subprocess.call.then.):
(OSBuildFetcher.prototype._commitsForAvailableBuilds):
(OSBuildFetcher.prototype._addSubCommitsForBuild):
(OSBuildFetcher.prototype._submitCommits):
(OSBuildFetcher.prototype.fetchAndReportNewBuilds):
* tools/js/subprocess.js: Added.
(const.childProcess.require.string_appeared_here.Subprocess.prototype.call):
(const.childProcess.require.string_appeared_here.Subprocess):
* tools/pull-os-versions.js: Added.
(main):
(syncLoop):
* tools/sync-commits.py:
(Repository.fetch_commits_and_submit):

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

3 years agoUnreviewed GTK+ build fix. Sprinkle ENABLE(MEDIA_STREAM) build guards
zandobersek@gmail.com [Wed, 15 Mar 2017 07:47:11 +0000 (07:47 +0000)]
Unreviewed GTK+ build fix. Sprinkle ENABLE(MEDIA_STREAM) build guards
in the Internals class to avoid compilation failures when building
with this feature disabled.

* testing/Internals.cpp:
(WebCore::Internals::~Internals):
* testing/Internals.h:
* testing/Internals.idl:

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

3 years agostart-queue-mac.sh should create logs directory if it doesn't exist
aakash_jain@apple.com [Wed, 15 Mar 2017 06:18:35 +0000 (06:18 +0000)]
start-queue-mac.sh should create logs directory if it doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=169634

Reviewed by Alexey Proskuryakov.

* EWSTools/start-queue-mac.sh: Creating logs directory if it doesn't exist.

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

3 years agoWrong condition in offlineasm/risc.rb
tpopela@redhat.com [Wed, 15 Mar 2017 05:52:08 +0000 (05:52 +0000)]
Wrong condition in offlineasm/risc.rb
https://bugs.webkit.org/show_bug.cgi?id=169597

Reviewed by Mark Lam.

It's missing the 'and' operator between the conditions.

* offlineasm/risc.rb:

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

3 years agoCanvasCapture should not generate a frame per each canvas draw command
commit-queue@webkit.org [Wed, 15 Mar 2017 05:21:06 +0000 (05:21 +0000)]
CanvasCapture should not generate a frame per each canvas draw command
https://bugs.webkit.org/show_bug.cgi?id=169498

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-14
Reviewed by Simon Fraser & Eric Carlson.

Source/WebCore:

Test: fast/mediastream/captureStream/canvas2d-heavy-drawing.html

Making Canvas capture be asynchronous.
This ensures that one frame will be created for a set of synchronous draw commands.
In the future, we should find a better approach, like aligning with requestAnimationFrame.
Adding internals observer API for media stream tracks.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged):
* Modules/mediastream/CanvasCaptureMediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:
* platform/mediastream/RealtimeMediaSource.h:
* testing/Internals.cpp:
(WebCore::Internals::~Internals):
(WebCore::Internals::observeMediaStreamTrack):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/mediastream/captureStream/canvas2d-heavy-drawing-expected.txt: Added.
* fast/mediastream/captureStream/canvas2d-heavy-drawing.html: Added.

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

3 years agoUnreviewed, skip fast/media/video-element-in-details-collapse.html on iOS
wenson_hsieh@apple.com [Wed, 15 Mar 2017 03:28:08 +0000 (03:28 +0000)]
Unreviewed, skip fast/media/video-element-in-details-collapse.html on iOS

* platform/ios-simulator/TestExpectations:

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

3 years ago[iOS] -[WKWebView _dataForDisplayedPDF] returns nil when called before an encrypted...
aestes@apple.com [Wed, 15 Mar 2017 03:27:43 +0000 (03:27 +0000)]
[iOS] -[WKWebView _dataForDisplayedPDF] returns nil when called before an encrypted PDF has been unlocked
https://bugs.webkit.org/show_bug.cgi?id=169653
<rdar://problem/24137675>

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView pdfDocument]): Changed to return _cgPDFDocument directly instead of via the
UIPDFDocument, which is only created after the PDF has been unlocked.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/encrypted.pdf: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/WKPDFView.mm: Added.
(runTest):
(TEST):

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

3 years agoMake server tests return a promise instead of manually calling done
rniwa@webkit.org [Wed, 15 Mar 2017 03:19:02 +0000 (03:19 +0000)]
Make server tests return a promise instead of manually calling done
https://bugs.webkit.org/show_bug.cgi?id=169648

Rubber-stamped by Chris Dumez.

Make the existing server tests always reutrn a promise instead of manually calling "done" callback.
The promise tests are a lot more stable and less error prone.

Also use arrow functions everywhere and use prepareServerTest, renamed from connectToDatabaseInEveryTest,
in more tests instead of manually connecting to database in every test, and reset v3 models.

* server-tests/admin-platforms-tests.js:
* server-tests/admin-reprocess-report-tests.js:
* server-tests/api-build-requests-tests.js:
* server-tests/api-manifest.js:
* server-tests/api-measurement-set-tests.js:
(.postReports): Deleted. Not used in any test.
* server-tests/api-report-commits-tests.js:
* server-tests/api-report-tests.js:
* server-tests/api-update-triggerable.js:
* server-tests/privileged-api-upate-run-status.js:
* server-tests/resources/common-operations.js:
(prepareServerTest): Renamed from connectToDatabaseInEveryTest. Increase the timeout and reset v3 models.
* server-tests/tools-buildbot-triggerable-tests.js:

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

3 years agoREGRESSION (r213882): 12 new/updated web-platform-tests failing
commit-queue@webkit.org [Wed, 15 Mar 2017 02:08:37 +0000 (02:08 +0000)]
REGRESSION (r213882): 12 new/updated web-platform-tests failing
https://bugs.webkit.org/show_bug.cgi?id=169615

Unreviewed.

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

* TestExpectations: Marking tests requiring updated wptserver as failing.

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

3 years agoRenderElements should unregister for viewport visibility callbacks when they are...
wenson_hsieh@apple.com [Wed, 15 Mar 2017 01:20:57 +0000 (01:20 +0000)]
RenderElements should unregister for viewport visibility callbacks when they are destroyed
https://bugs.webkit.org/show_bug.cgi?id=169521
<rdar://problem/30959545>

Reviewed by Simon Fraser.

Source/WebCore:

When registering a RenderElement for viewport visibility callbacks, we always need to make sure that it is unregistered
before it is destroyed. While we account for this in the destructor of RenderElement, we only unregister in the destructor
if we are already registered for visibility callbacks. In the call to RenderObject::willBeDestroyed(), we clear out rare
data, which holds RenderElement's viewport callback registration state, so upon entering the destructor of RenderElement,
we skip unregistration because RenderElement thinks that it is not registered.

We can mitigate this by unregistering the RenderElement earlier, in RenderElement::willBeDestroyed, prior to clearing out
the rare data. However, we'd ideally want to move the cleanup logic out of the destructor altogether and into willBeDestroyed
(see https://bugs.webkit.org/show_bug.cgi?id=169650).

Test: fast/media/video-element-in-details-collapse.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):

LayoutTests:

Adds a new layout test covering this regression. See WebCore ChangeLog for more details.

* fast/media/video-element-in-details-collapse-expected.txt: Added.
* fast/media/video-element-in-details-collapse.html: Added.

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

3 years agoBytecodeGenerator should use the same function to determine if it needs to store...
mark.lam@apple.com [Wed, 15 Mar 2017 00:53:17 +0000 (00:53 +0000)]
BytecodeGenerator should use the same function to determine if it needs to store the DerivedConstructor in an ArrowFunction lexical environment.
https://bugs.webkit.org/show_bug.cgi?id=169647
<rdar://problem/31051832>

Reviewed by Michael Saboff.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::usesDerivedConstructorInArrowFunctionLexicalEnvironment):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::emitPutDerivedConstructorToArrowFunctionContextScope):
* bytecompiler/BytecodeGenerator.h:

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

3 years agoRename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
dino@apple.com [Wed, 15 Mar 2017 00:17:27 +0000 (00:17 +0000)]
Rename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
https://bugs.webkit.org/show_bug.cgi?id=169628
<rdar://problems/31047025>

Fix Windows build.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printLayer):

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

3 years agoWeb Inspector: Exception when fetching computed styles can break future updates of...
commit-queue@webkit.org [Wed, 15 Mar 2017 00:05:27 +0000 (00:05 +0000)]
Web Inspector: Exception when fetching computed styles can break future updates of section
https://bugs.webkit.org/show_bug.cgi?id=169638
<rdar://problem/30588688>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-14
Reviewed by Devin Rousso.

* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.wrap):
(WebInspector.DOMNodeStyles.prototype.refresh):
Gracefully handle exceptions. If an exception did happen we
would be unable to update these in the future.

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

3 years ago[Cocoa] Web Inspector: generated code for parsing an array of primitive-type enums...
bburg@apple.com [Tue, 14 Mar 2017 23:44:01 +0000 (23:44 +0000)]
[Cocoa] Web Inspector: generated code for parsing an array of primitive-type enums from payload does not work
https://bugs.webkit.org/show_bug.cgi?id=169629

Reviewed by Joseph Pecoraro.

This was encountered while trying to compile new protocol definitions that support the Actions API.

* inspector/scripts/codegen/models.py:
(EnumType.__repr__): Improve debug logging so fields match the class member names.

* inspector/scripts/codegen/objc_generator.py:
(ObjCGenerator.payload_to_objc_expression_for_member):
If the array elements are actually a primitive type, then there's no need to do any
conversion from a payload. This happens for free since the payload is a tree of
NSDictionary, NSString, NSNumber, etc.

* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
Rebaseline.

* inspector/scripts/tests/generic/type-declaration-object-type.json:
Add new cases for properties that contain an array with enum type references and an array of anonymous enums.

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

3 years agoLet PDFLayerController drive cursor updates so that it's correct more often
timothy_horton@apple.com [Tue, 14 Mar 2017 23:18:55 +0000 (23:18 +0000)]
Let PDFLayerController drive cursor updates so that it's correct more often
https://bugs.webkit.org/show_bug.cgi?id=169626
<rdar://problem/30762943>

Reviewed by Simon Fraser.

* WebProcess/Plugins/PDF/DeprecatedPDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.h:
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(-[WKPDFLayerControllerDelegate setMouseCursor:]):
(WebKit::PDFPlugin::handleMouseEvent):
(WebKit::PDFPlugin::handleMouseEnterEvent):
(WebKit::pdfLayerControllerCursorTypeToCursor):
(WebKit::PDFPlugin::notifyCursorChanged):
Disable updateCursor and use the setMouseCursor delegate method when possible.

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

3 years agoUpdate ApplePaySession.html after r213949
aestes@apple.com [Tue, 14 Mar 2017 23:17:55 +0000 (23:17 +0000)]
Update ApplePaySession.html after r213949

Rubber-stamped by Beth Dakin.

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

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

3 years agoRename RootSet to CommitSet
rniwa@webkit.org [Tue, 14 Mar 2017 23:06:40 +0000 (23:06 +0000)]
Rename RootSet to CommitSet
https://bugs.webkit.org/show_bug.cgi?id=169580

Rubber-stamped by Chris Dumez.

Renamed root_sets to commit_sets and roots to commit_set_relationships in the database schema, and renamed
related classes in public/v3/ and tools accordingly.

RootSet, MeasurementRootSet, and CustomRootSet are respectively renamed to CommitSet, MeasurementCommitSet,
and CustomCommitSet.

In order to migrate the database, run:
```
BEGIN;
ALTER TABLE root_sets RENAME TO commit_sets;
ALTER TABLE commit_sets RENAME COLUMN rootset_id TO commitset_id;
ALTER TABLE roots RENAME TO commit_set_relationships;
ALTER TABLE commit_set_relationships RENAME COLUMN root_set TO commitset_set;
ALTER TABLE commit_set_relationships RENAME COLUMN root_commit TO commitset_commit;
ALTER TABLE build_requests RENAME COLUMN request_root_set TO request_commit_set;
END;
```

* browser-tests/index.html:
* init-database.sql:
* public/api/build-requests.php:
(main):
* public/api/test-groups.php:
(main):
(format_test_group):
* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::__construct):
(BuildRequestsFetcher::results_internal):
(BuildRequestsFetcher::commit_sets): Renamed from root_sets.
(BuildRequestsFetcher::commits): Renamed from roots.
(BuildRequestsFetcher::fetch_commits_for_set_if_needed): Renamed from fetch_roots_for_set_if_needed.
* public/privileged-api/create-test-group.php:
(main):
(ensure_commit_sets): Renamed from commit_sets_from_root_sets.
* public/v3/components/analysis-results-viewer.js:
(AnalysisResultsViewer.prototype.buildRowGroups):
(AnalysisResultsViewer.prototype._collectCommitSetsInTestGroups): Renamed from _collectRootSetsInTestGroups.
(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
(AnalysisResultsViewer.prototype._buildRowsForPointsAndTestGroups):
(AnalysisResultsViewer.CommitSetInTestGroup): Renamed from RootSetInTestGroup.
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.constructor):
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.commitSet): Renamed from rootSet.
(AnalysisResultsViewer.CommitSetInTestGroup.prototype.succeedingCommitSet): Renamed from succeedingRootSet.
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.constructor):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.addRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.isComplete):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.startRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype.endRowIndex):
(AnalysisResultsViewer.TestGroupStackingBlock.prototype._computeTestGroupStatus):
* public/v3/components/chart-revision-range.js:
(ChartRevisionRange.prototype._revisionForPoint):
(ChartRevisionRange.prototype._computeRevisionList):
* public/v3/components/customizable-test-group-form.js:
(CustomizableTestGroupForm.prototype.constructor):
(CustomizableTestGroupForm.prototype.setCommitSetMap): Renamed from setRootSetMap.
(CustomizableTestGroupForm.prototype._submitted):
(CustomizableTestGroupForm.prototype._computeCommitSetMap): Renamed from _computeRootSetMap.
(CustomizableTestGroupForm.prototype.render): Renamed from render.
(CustomizableTestGroupForm.prototype._constructRevisionRadioButtons):
* public/v3/components/results-table.js:
(ResultsTable.prototype.render):
(ResultsTable.prototype._createRevisionListCells):
(ResultsTable.prototype._computeRepositoryList):
(ResultsTableRow.prototype.constructor):
(ResultsTableRow.prototype.commitSet): Renamed from rootSet.
* public/v3/components/test-group-results-table.js:
(TestGroupResultsTable.prototype.buildRowGroups):
* public/v3/index.html:
* public/v3/models/build-request.js:
(BuildRequest.prototype.constructor):
(BuildRequest.prototype.updateSingleton):
(BuildRequest.prototype.commitSet): Renamed from rootSet.
(BuildRequest.constructBuildRequestsFromData):
* public/v3/models/commit-set.js: Renamed from public/v3/models/root-set.js.
(CommitSet): Renamed from RootSet.
(CommitSet.containsMultipleCommitsForRepository):
(MeasurementCommitSet): Renamed from MeasurementRootSet.
(MeasurementCommitSet.prototype.namedStaticMap):
(MeasurementCommitSet.prototype.ensureNamedStaticMap):
(MeasurementCommitSet.namedStaticMap):
(MeasurementCommitSet.ensureNamedStaticMap):
(MeasurementCommitSet.ensureSingleton):
(CustomCommitSet): Renamed from CustomRootSet.
* public/v3/models/measurement-adaptor.js:
(MeasurementAdaptor.prototype.applyTo):
* public/v3/models/test-group.js:
(TestGroup.prototype.constructor):
(TestGroup.prototype.addBuildRequest):
(TestGroup.prototype.repetitionCount):
(TestGroup.prototype.requestedCommitSets): Renamed from requestedRootSets.
(TestGroup.prototype.requestsForCommitSet): Renamed from requestsForRootSet.
(TestGroup.prototype.labelForCommitSet): Renamed from labelForRootSet.
(TestGroup.prototype.didSetResult):
(TestGroup.prototype.compareTestResults):
(TestGroup.prototype._valuesForCommitSet): Renamed from _valuesForRootSet.
(TestGroup.prototype.createAndRefetchTestGroups):
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.render):
(AnalysisTaskPage.prototype._retryCurrentTestGroup):
(AnalysisTaskPage.prototype._createNewTestGroupFromChart):
(AnalysisTaskPage.prototype._createNewTestGroupFromViewer):
(AnalysisTaskPage.prototype._createTestGroupAfterVerifyingCommitSetList):
* server-tests/api-build-requests-tests.js:
* server-tests/resources/mock-data.js:
(MockData.resetV3Models):
(MockData.addMockData):
(MockData.addAnotherMockTestGroup):
* tools/detect-changes.js:
(createAnalysisTaskAndNotify):
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
(BuildbotSyncer.prototype._revisionSetFromCommitSetWithExclusionList):
* tools/js/database.js:
(tableToPrefixMap):
* tools/js/v3-models.js:
* tools/sync-buildbot.js:
(syncLoop):
* tools/sync-with-buildbot.py: Deleted. No longer used.
* unit-tests/analysis-task-tests.js:
* unit-tests/build-request-tests.js:
(sampleBuildRequestData):
* unit-tests/buildbot-syncer-tests.js:
(sampleCommitSetData):
* unit-tests/measurement-adaptor-tests.js:
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject):
* unit-tests/test-groups-tests.js:
(sampleTestGroup):

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

3 years agoMark imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler...
ryanhaddad@apple.com [Tue, 14 Mar 2017 23:03:47 +0000 (23:03 +0000)]
Mark imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-javascript.html as failing on ios-simulator-wk2.
https://bugs.webkit.org/show_bug.cgi?id=169640

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoMark imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler...
ryanhaddad@apple.com [Tue, 14 Mar 2017 22:59:50 +0000 (22:59 +0000)]
Mark imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-javascript.html as failing on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=169640

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years agoREGRESSION (r209760): Apple Pay doesn't work on sites that specify empty contact...
aestes@apple.com [Tue, 14 Mar 2017 22:53:32 +0000 (22:53 +0000)]
REGRESSION (r209760): Apple Pay doesn't work on sites that specify empty contact fields
https://bugs.webkit.org/show_bug.cgi?id=169639
<rdar://problem/30957789>

Reviewed by Anders Carlsson.

Shipping and billing contact fields are allowed to be empty.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):

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

3 years agoExtend WKPreferences to include preferences for testing MediaCapture.
commit-queue@webkit.org [Tue, 14 Mar 2017 22:38:21 +0000 (22:38 +0000)]
Extend WKPreferences to include preferences for testing MediaCapture.
https://bugs.webkit.org/show_bug.cgi?id=169560

Patch by Andrew Gold <agold@apple.com> on 2017-03-14
Reviewed by Youenn Fablet.

* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _mockCaptureDevicesEnabled]):
(-[WKPreferences _setMockCaptureDevicesEnabled:]):
(-[WKPreferences _mediaCaptureRequiresSecureConnection]):
(-[WKPreferences _setMediaCaptureRequiresSecureConnection:]):
(-[WKPreferences _enumeratingAllNetworkInterfacesEnabled]):
(-[WKPreferences _setEnumeratingAllNetworkInterfacesEnabled:]):
(-[WKPreferences _iceCandidateFiltertingEnabled]):
(-[WKPreferences _setICECandidateFilteringEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

3 years agoRename WKHTTPCookieStorage to WKHTTPCookieStore.
beidson@apple.com [Tue, 14 Mar 2017 22:36:52 +0000 (22:36 +0000)]
Rename WKHTTPCookieStorage to WKHTTPCookieStore.
https://bugs.webkit.org/show_bug.cgi?id=169630

Reviewed by Tim Horton.

Source/WebKit2:

* CMakeLists.txt:

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):

* UIProcess/API/APIHTTPCookieStore.cpp: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp.
(API::HTTPCookieStore::HTTPCookieStore):
(API::HTTPCookieStore::~HTTPCookieStore):
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookie):
(API::HTTPCookieStore::setCookies):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::removeCookiesSinceDate):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicy):
(API::HTTPCookieStore::getHTTPCookieAcceptPolicy):
* UIProcess/API/APIHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::httpCookieStore):
(API::WebsiteDataStore::httpCookieStorage): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:

* UIProcess/API/Cocoa/WKHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h.
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm.
(coreCookiesToNSCookies):
(-[WKHTTPCookieStore dealloc]):
(-[WKHTTPCookieStore fetchCookies:]):
(-[WKHTTPCookieStore fetchCookiesForURL:completionHandler:]):
(-[WKHTTPCookieStore setCookie:completionHandler:]):
(-[WKHTTPCookieStore deleteCookie:completionHandler:]):
(-[WKHTTPCookieStore setCookies:forURL:mainDocumentURL:completionHandler:]):
(-[WKHTTPCookieStore removeCookiesSinceDate:completionHandler:]):
(-[WKHTTPCookieStore setCookieAcceptPolicy:completionHandler:]):
(kitCookiePolicyToNSCookiePolicy):
(-[WKHTTPCookieStore fetchCookieAcceptPolicy:]):
(-[WKHTTPCookieStore _apiObject]):
* UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h.
(WebKit::wrapper):

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _httpCookieStore]):
(-[WKWebsiteDataStore _httpCookieStorage]): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:

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

* WebKit2.xcodeproj/project.pbxproj:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm:
(TEST):

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

3 years agoPropagate PassKit errors
andersca@apple.com [Tue, 14 Mar 2017 22:32:10 +0000 (22:32 +0000)]
Propagate PassKit errors
https://bugs.webkit.org/show_bug.cgi?id=169633
rdar://problem/31043392

Reviewed by Dean Jackson.

Source/WebCore:

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/ApplePaySession.cpp:
(WebCore::convert):
(WebCore::convertAndValidate):
* Modules/applepay/PaymentRequest.h:

Source/WebKit2:

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

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

3 years agoFix some typos in this benchmark.
fpizlo@apple.com [Tue, 14 Mar 2017 22:23:06 +0000 (22:23 +0000)]
Fix some typos in this benchmark.

Rubber stamped by Saam Barati.

* benchmarks/HashSetDFGReplay.cpp:
(main):

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

3 years agoSimple line layout: Adjust hyphenation constrains based on the normal line layout...
zalan@apple.com [Tue, 14 Mar 2017 21:58:39 +0000 (21:58 +0000)]
Simple line layout: Adjust hyphenation constrains based on the normal line layout line-breaking logic.
https://bugs.webkit.org/show_bug.cgi?id=169617

Source/WebCore:

Reviewed by Antti Koivisto.

This patch ensures that simple line layout ends up with the same hyphenation context as normal line layout.

Test: fast/text/simple-line-layout-hyphenation-constrains.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::hyphenPositionForFragment): see webkit.org/b/169613
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
* rendering/line/BreakingContext.h: Integral -> fractional.
(WebCore::tryHyphenating):

LayoutTests:

Reviewed by Antti Koivisto.

* fast/text/simple-line-layout-hyphenation-constrains-expected.html: Added.
* fast/text/simple-line-layout-hyphenation-constrains.html: Added.

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

3 years agoWeb Inspector: RTL: add support for Memory timeline
webkit@devinrousso.com [Tue, 14 Mar 2017 21:41:51 +0000 (21:41 +0000)]
Web Inspector: RTL: add support for Memory timeline
https://bugs.webkit.org/show_bug.cgi?id=169584

Reviewed by Brian Burg.

* UserInterface/Views/MemoryCategoryView.css:
(.memory-category-view > .details):
(body[dir=ltr] .memory-category-view > .details):
(body[dir=rtl] .memory-category-view > .details):

* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(.timeline-overview-graph.memory > .legend):
(body[dir=ltr] .timeline-overview-graph.memory > .legend):
(body[dir=rtl] .timeline-overview-graph.memory > .legend):
(.timeline-overview-graph.memory .memory-pressure-event):
(body[dir=ltr] .timeline-overview-graph.memory .memory-pressure-event):
(body[dir=rtl] .timeline-overview-graph.memory .memory-pressure-event):

* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
Rework the calculation for the marker offset to use "right" in RTL.

* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .details > .timeline-ruler):
(body[dir=ltr] .timeline-view.memory > .content > .details > .timeline-ruler):
(body[dir=rtl] .timeline-view.memory > .content > .details > .timeline-ruler):
(.timeline-view.memory > .content > .overview > .divider):
(body[dir=ltr] .timeline-view.memory > .content > .overview > .divider):
(body[dir=rtl] .timeline-view.memory > .content > .overview > .divider):
(.timeline-view.memory .legend):
(body[dir=ltr] .timeline-view.memory .legend):
(body[dir=rtl] .timeline-view.memory .legend):
(.timeline-view.memory .legend > .row):
(.timeline-view.memory .legend > .row > .swatch):
(body[dir=ltr] .timeline-view.memory .legend > .row > .swatch):
(body[dir=rtl] .timeline-view.memory .legend > .row > .swatch):
(body[dir=ltr] .timeline-view.memory .legend > .row > :matches(.label, .size)):
(body[dir=rtl] .timeline-view.memory .legend > .row > :matches(.label, .size)):
(.timeline-view.memory .legend > .row > .label):
(.timeline-view.memory .legend > .row > .size):

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

3 years agoRefactor: Allow WebKit2 to override the creation of RealtimeMediaSources
jer.noble@apple.com [Tue, 14 Mar 2017 21:41:48 +0000 (21:41 +0000)]
Refactor: Allow WebKit2 to override the creation of RealtimeMediaSources
https://bugs.webkit.org/show_bug.cgi?id=169227

Reviewed by Eric Carlson.

Source/WebCore:

Allow clients of RealtimeMediaSourceCenter to specify a factory for creating
RealtimeMediaSources, to be used by subclasess of RealtimeMediaSourceCenter. Add virtual
methods to retrieve the "default" factories for the RealtimeMediaSourceCenter subclass. The
requires moving the creation of sources up from CaptureDeviceManager into
RealtimeMediaSourceCenterMac, and the addition of factory methods to AVAudioCaptureSource
and AVVideoCaptureSource.

* platform/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::deviceWithUID):
(CaptureDeviceManager::bestSourcesForTypeAndConstraints): Deleted.
(CaptureDeviceManager::sourceWithUID): Deleted.
* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::setAudioFactory):
(WebCore::RealtimeMediaSourceCenter::unsetAudioFactory):
(WebCore::RealtimeMediaSourceCenter::setVideoFactory):
(WebCore::RealtimeMediaSourceCenter::unsetVideoFactory):
* platform/mediastream/RealtimeMediaSourceCenter.h:
(WebCore::RealtimeMediaSourceCenter::audioFactory):
(WebCore::RealtimeMediaSourceCenter::videoFactory):
* platform/mediastream/mac/AVAudioCaptureSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::factory):
* platform/mediastream/mac/AVCaptureDeviceManager.h:
* platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints): Deleted.
* platform/mediastream/mac/AVMediaCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::factory):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::RealtimeMediaSourceCenterMac):
(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
(WebCore::RealtimeMediaSourceCenterMac::bestSourcesForTypeAndConstraints):
(WebCore::RealtimeMediaSourceCenterMac::defaultAudioFactory):
(WebCore::RealtimeMediaSourceCenterMac::defaultVideoFactory):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::factory):
* platform/mock/MockRealtimeAudioSource.h:
* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::MockRealtimeMediaSourceCenter::defaultAudioFactory):
(WebCore::MockRealtimeMediaSourceCenter::defaultVideoFactory):
* platform/mock/MockRealtimeMediaSourceCenter.h:
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::factory):
* platform/mock/MockRealtimeVideoSource.h:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
(WebKit::WebUserMediaClient::WebUserMediaClient):
(WebKit::WebUserMediaClient::initializeFactories): Add empty non-Cocoa implementation.
* WebProcess/WebCoreSupport/WebUserMediaClient.h:
* WebProcess/WebCoreSupport/cocoa/WebUserMediaClientMac.mm: Added.
(WebKit::WebUserMediaClient::initializeFactories): Initialize a (for now) pass-through factory.

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

3 years agoRename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
dino@apple.com [Tue, 14 Mar 2017 21:39:22 +0000 (21:39 +0000)]
Rename LayerTypeWebGLLayer and use it for both WebGL and WebGPU
https://bugs.webkit.org/show_bug.cgi?id=169628
<rdar://problems/31047025>

Reviewed by Simon Fraser.

Rename LayerTypeWebGLLayer to LayerTypeContentsProvidedLayer
and use it for both WebGLLayer and WebGPULayer, to avoid
code duplication.

Source/WebCore:

* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::operator<<):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::layerTypeForPlatformLayer):
(PlatformCALayerCocoa::PlatformCALayerCocoa):
(PlatformCALayerCocoa::commonInit):

Source/WebKit2:

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::clone):

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

3 years agoRecord the HashSet/HashMap operations in DFG/FTL/B3 and replay them in a benchmark
fpizlo@apple.com [Tue, 14 Mar 2017 21:37:41 +0000 (21:37 +0000)]
Record the HashSet/HashMap operations in DFG/FTL/B3 and replay them in a benchmark
https://bugs.webkit.org/show_bug.cgi?id=169590

Reviewed by Saam Barati.

Source/JavaScriptCore:

Adds code to support logging some hashtable stuff in the DFG.

* dfg/DFGAvailabilityMap.cpp:
(JSC::DFG::AvailabilityMap::pruneHeap):
* dfg/DFGCombinedLiveness.cpp:
(JSC::DFG::liveNodesAtHead):
(JSC::DFG::CombinedLiveness::CombinedLiveness):
* dfg/DFGCombinedLiveness.h:
* dfg/DFGLivenessAnalysisPhase.cpp:
(JSC::DFG::LivenessAnalysisPhase::run):
(JSC::DFG::LivenessAnalysisPhase::processBlock):
* dfg/DFGNode.cpp:
* dfg/DFGNode.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:

Source/WTF:

This adds LoggingHashSet and LoggingHashMap, which are drop-in replacements for HashSet and
HashMap that log everything that they do, so that you can replay it later.

This also adds a benchmark (HashSetDFGReplay) based on doing a recording of some of the HashSets
in the DFG compiler.

* WTF.xcodeproj/project.pbxproj:
* benchmarks/HashSetDFGReplay.cpp: Added.
(benchmark):
(main):
* wtf/CMakeLists.txt:
* wtf/GlobalVersion.cpp: Added.
(WTF::newGlobalVersion):
* wtf/GlobalVersion.h: Added.
* wtf/HashMap.h:
(WTF::X>::swap):
* wtf/HashSet.h:
(WTF::V>::addVoid):
* wtf/LoggingHashID.h: Added.
(WTF::LoggingHashID::LoggingHashID):
(WTF::LoggingHashID::dump):
* wtf/LoggingHashMap.h: Added.
* wtf/LoggingHashSet.h: Added.
* wtf/LoggingHashTraits.h: Added.
(WTF::LoggingHashKeyTraits::print):
(WTF::LoggingHashValueTraits::print):

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

3 years agoMark imported/w3c/web-platform-tests/cors/status.htm as flaky.
ryanhaddad@apple.com [Tue, 14 Mar 2017 21:16:09 +0000 (21:16 +0000)]
Mark imported/w3c/web-platform-tests/cors/status.htm as flaky.
https://bugs.webkit.org/show_bug.cgi?id=169625

Unreviewed test gardening.

* TestExpectations:

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

3 years agoMake classes used by Media Stream encode/decode friendly
jer.noble@apple.com [Tue, 14 Mar 2017 20:50:47 +0000 (20:50 +0000)]
Make classes used by Media Stream encode/decode friendly
https://bugs.webkit.org/show_bug.cgi?id=169567

Reviewed by Eric Carlson.

Source/WebCore:

Add encode() and decode() methods and implementations to a variety of media stream related classes.

* platform/audio/mac/CAAudioStreamDescription.h:
(WebCore::CAAudioStreamDescription::encode):
(WebCore::CAAudioStreamDescription::decode):
* platform/mediastream/RealtimeMediaSourceSettings.h:
(WebCore::RealtimeMediaSourceSettings::width):
(WebCore::RealtimeMediaSourceSettings::setWidth):
(WebCore::RealtimeMediaSourceSettings::height):
(WebCore::RealtimeMediaSourceSettings::setHeight):
(WebCore::RealtimeMediaSourceSettings::sampleRate):
(WebCore::RealtimeMediaSourceSettings::setSampleRate):
(WebCore::RealtimeMediaSourceSettings::sampleSize):
(WebCore::RealtimeMediaSourceSettings::setSampleSize):
(WebCore::RealtimeMediaSourceSettings::encode):
(WebCore::RealtimeMediaSourceSettings::decode):
* platform/mediastream/RealtimeMediaSourceSupportedConstraints.h:
(WebCore::RealtimeMediaSourceSupportedConstraints::encode):
(WebCore::RealtimeMediaSourceSupportedConstraints::decode):

Source/WebKit2:

Make the encoder and decoder for MediaConstraintsData a little less wordy.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<MediaConstraintsData>::encode):
(IPC::ArgumentCoder<MediaConstraintsData>::decode):

Source/WTF:

* wtf/MediaTime.h:
(WTF::MediaTime::encode):
(WTF::MediaTime::decode):

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

3 years agoAdapt CARingBuffer to be usable across processes
jer.noble@apple.com [Tue, 14 Mar 2017 20:45:52 +0000 (20:45 +0000)]
Adapt CARingBuffer to be usable across processes
https://bugs.webkit.org/show_bug.cgi?id=169591

Reviewed by Alex Christensen.

Source/WebCore:

When used with a SharedMemory backing store, storing the pointers to channel data at the beginning
of the channel data itself is problematic: when the SharedMemory is mapped on the far side of the
process boundary, it will not exist at the same memory location as it did on the near side. Instead
of storing these pointers inside the channel data, store them in a small (usually 1 or 2 entry) vector
recreated when the backing store is (re-)allocated.

* platform/audio/mac/CARingBuffer.cpp:
(WebCore::CARingBuffer::CARingBuffer):
(WebCore::CARingBuffer::allocate):
(WebCore::CARingBuffer::deallocate):
(WebCore::ZeroRange):
(WebCore::StoreABL):
(WebCore::FetchABL):
(WebCore::CARingBuffer::store):
(WebCore::CARingBuffer::getCurrentFrameBounds):
(WebCore::CARingBuffer::fetch):
* platform/audio/mac/CARingBuffer.h:

Source/WebKit2:

Add a new class which wraps a SharedMemory object and uses that shared memory as the
backing store of a CARingBuffer. This backing store can be set to "read only", which
prevents the backing from being de- or re-allocated.

* WebKit2.xcodeproj/project.pbxproj:
* Shared/Cocoa/SharedRingBufferStorage.cpp: Added.
(WebKit::SharedRingBufferStorage::setStorage):
(WebKit::SharedRingBufferStorage::setReadOnly):
(WebKit::SharedRingBufferStorage::allocate):
(WebKit::SharedRingBufferStorage::deallocate):
(WebKit::SharedRingBufferStorage::data):
* Shared/Cocoa/SharedRingBufferStorage.h: Added.
(WebKit::SharedRingBufferStorage::SharedRingBufferStorage):
(WebKit::SharedRingBufferStorage::invalidate):
(WebKit::SharedRingBufferStorage::storage):
(WebKit::SharedRingBufferStorage::readOnly):

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

3 years agoMark imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html as...
ryanhaddad@apple.com [Tue, 14 Mar 2017 20:07:16 +0000 (20:07 +0000)]
Mark imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=169621

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

3 years ago[iOS] The web process should inherit application state from UI process
eric.carlson@apple.com [Tue, 14 Mar 2017 20:03:32 +0000 (20:03 +0000)]
[iOS] The web process should inherit application state from UI process
https://bugs.webkit.org/show_bug.cgi?id=169156
<rdar://problem/30845473>

Reviewed by Brady Eidson.

Move PID proxy setup to platformInitializeWebProcess as suggested in
post-landing feedback.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitialize):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

3 years agoWeb Inspector: Remove unused Network protocol event
commit-queue@webkit.org [Tue, 14 Mar 2017 20:01:45 +0000 (20:01 +0000)]
Web Inspector: Remove unused Network protocol event
https://bugs.webkit.org/show_bug.cgi?id=169619

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-14
Reviewed by Mark Lam.

* inspector/protocol/Network.json:
This became unused in r213621 and should have been removed
from the protocol file then.

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

3 years agoPulling more frames from AudioSampleDataSource than the last push added will always...
jer.noble@apple.com [Tue, 14 Mar 2017 19:57:11 +0000 (19:57 +0000)]
Pulling more frames from AudioSampleDataSource than the last push added will always fail.
https://bugs.webkit.org/show_bug.cgi?id=168644

Reviewed by Eric Carlson.

Rather than use the delta between the ring buffer's end time and the last pushed timestamp
(or what is effectively the number of samples in the last push operation) to determine if
there is enough buffered data to satisfy a pull operation, use the ring buffer's actual
buffered duration.

Then, instead of saving the last pushed timestamp, explicitly save the last push count, and
use that data to inform how much to offset the output timestamps (or what is effectively how
much to allow the source to pre-buffer).

* platform/audio/mac/AudioSampleDataSource.cpp:
(WebCore::AudioSampleDataSource::pushSamplesInternal):
(WebCore::AudioSampleDataSource::pullSamplesInternal):
* platform/audio/mac/AudioSampleDataSource.h:

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

3 years agoAdd a null check in VMTraps::willDestroyVM() to handle a race condition.
mark.lam@apple.com [Tue, 14 Mar 2017 19:29:26 +0000 (19:29 +0000)]
Add a null check in VMTraps::willDestroyVM() to handle a race condition.
https://bugs.webkit.org/show_bug.cgi?id=169620

Reviewed by Filip Pizlo.

There exists a race between VMTraps::willDestroyVM() (which removed SignalSenders
from its m_signalSenders list) and SignalSender::send() (which removes itself
from the list).  In the event that SignalSender::send() removes itself between
the time that VMTraps::willDestroyVM() checks if m_signalSenders is empty and the
time it takes a sender from m_signalSenders, VMTraps::willDestroyVM() may end up
with a NULL sender pointer.  The fix is to add the missing null check before using
the sender pointer.

* runtime/VMTraps.cpp:
(JSC::VMTraps::willDestroyVM):
(JSC::VMTraps::fireTrap):
* runtime/VMTraps.h:

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

3 years agoCorrectly export WebItemProviderPasteboard
megan_gardner@apple.com [Tue, 14 Mar 2017 19:22:33 +0000 (19:22 +0000)]
Correctly export WebItemProviderPasteboard
https://bugs.webkit.org/show_bug.cgi?id=169578

Reviewed by Tim Horton.

Source/WebCore:

* platform/ios/WebItemProviderPasteboard.h:

Source/WebKit/mac:

* MigrateHeaders.make:

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

3 years agoWeb Inspector: RTL: add support for Timeline graphs
webkit@devinrousso.com [Tue, 14 Mar 2017 19:20:56 +0000 (19:20 +0000)]
Web Inspector: RTL: add support for Timeline graphs
https://bugs.webkit.org/show_bug.cgi?id=169585

Reviewed by Brian Burg.

* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Rework the calculation for the icon offset to use "right" in RTL.

* UserInterface/Views/MemoryTimelineOverviewGraph.css:
(body[dir=rtl] .timeline-overview-graph.memory > .stacked-line-chart):
Flip the chart when in RTL.

* UserInterface/Views/TimelineRecordBar.css:
(.timeline-record-bar):
(body[dir=ltr] .timeline-record-bar > .segment.inactive):
(body[dir=rtl] .timeline-record-bar > .segment.inactive):
(body[dir=ltr] .timeline-record-bar.unfinished > .segment):
(body[dir=rtl] .timeline-record-bar.unfinished > .segment):
(body[dir=ltr] .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(body[dir=rtl] .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(body[dir=ltr] :matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(body[dir=rtl] :matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
(.timeline-record-bar > .segment.inactive,): Deleted.
(.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.
(:matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)): Deleted.

* UserInterface/Views/TimelineRecordBar.js:
(WebInspector.TimelineRecordBar.prototype.refresh):
Apply the position updates to "right" in RTL.

* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.prototype.refresh):
Apply the position updates to "right" in RTL.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.layout):
(WebInspector.TimelineRuler.prototype._updatePositionOfElement):
(WebInspector.TimelineRuler.prototype._updateMarkers):
(WebInspector.TimelineRuler.prototype._updateSelection):
Apply the position updates to "right" in RTL.

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

3 years agoUnreviewed, rolling out r213915.
ryanhaddad@apple.com [Tue, 14 Mar 2017 19:16:43 +0000 (19:16 +0000)]
Unreviewed, rolling out r213915.

Caused WK2 LayoutTests to exit early with timeouts.

Reverted changeset:

"Fix uninitialized public members in NetworkProcess"
https://bugs.webkit.org/show_bug.cgi?id=169598
http://trac.webkit.org/changeset/213915

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

3 years agowebkitpy: Efficient app installation for device testing
jbedard@apple.com [Tue, 14 Mar 2017 19:16:36 +0000 (19:16 +0000)]
webkitpy: Efficient app installation for device testing
https://bugs.webkit.org/show_bug.cgi?id=169054
<rdar://problem/30790207>

Reviewed by Daniel Bates.

We should only install an app on a device once, not every time the app is run.
Move app installation to setup.

* Scripts/webkitpy/port/ios.py:
(IOSPort.setup_test_run): Install app to device.
* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess.__init__): Remove app installation.

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

3 years agoWeb Inspector: RTL: add support for DataGrid disclosure arrows and indentation
webkit@devinrousso.com [Tue, 14 Mar 2017 19:12:57 +0000 (19:12 +0000)]
Web Inspector: RTL: add support for DataGrid disclosure arrows and indentation
https://bugs.webkit.org/show_bug.cgi?id=169582

Reviewed by Brian Burg.

* UserInterface/Views/DataGrid.css:
(body[dir=rtl] .data-grid tr.parent td.disclosure::before):
Flip the image in RTL.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._updateScrollbarPadding):
Rework the padding calculation for the scrollbar offset to use "right" in RTL.

* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode.prototype.get indentPadding):
(WebInspector.DataGridNode.prototype.createCell):
Rework the padding calculation for indenting (as a child) to use "right" in RTL.

(WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
Calculate the position of the ::before triangle based on the layout direction.

(WebInspector.DataGridNode.prototype.get leftPadding): Deleted.

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

3 years agoWeb Inspector: RTL: add support for TimelineOverview sidebar and container layout
webkit@devinrousso.com [Tue, 14 Mar 2017 19:07:28 +0000 (19:07 +0000)]
Web Inspector: RTL: add support for TimelineOverview sidebar and container layout
https://bugs.webkit.org/show_bug.cgi?id=169583

Reviewed by Brian Burg.

* UserInterface/Views/TimelineOverview.css:
(body[dir=ltr] .timeline-overview > :matches(.navigation-bar.timelines, .tree-outline.timelines)):
(body[dir=rtl] .timeline-overview > :matches(.navigation-bar.timelines, .tree-outline.timelines)):
(body[dir=ltr] .timeline-overview:not(.frames) > :matches(.scroll-container, .timeline-ruler, .graphs-container)):
(body[dir=rtl] .timeline-overview:not(.frames) > :matches(.scroll-container, .timeline-ruler, .graphs-container)):
(.timeline-overview > .navigation-bar.timelines):
(.timeline-overview > .tree-outline.timelines):
(.timeline-overview > .scroll-container):
(.timeline-overview > .timeline-ruler):
(.timeline-overview > .graphs-container):
(.timeline-overview > .scroll-container > .scroll-width-sizer):
(body[dir=ltr] .timeline-overview > .scroll-container > .scroll-width-sizer):
(body[dir=rtl] .timeline-overview > .scroll-container > .scroll-width-sizer):
(.timeline-overview.frames > .graphs-container): Deleted.

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

3 years agoRemove redundant check for "firstLine" in RenderBlock::lineHeight()
commit-queue@webkit.org [Tue, 14 Mar 2017 18:53:32 +0000 (18:53 +0000)]
Remove redundant check for "firstLine" in RenderBlock::lineHeight()
https://bugs.webkit.org/show_bug.cgi?id=169610

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2017-03-14
Reviewed by Michael Catanzaro.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineHeight): Remove test of "firstLine" that
was already checked in the condition for the enclosing if-clause.

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

3 years agoVersioning.
jmarcell@apple.com [Tue, 14 Mar 2017 18:35:43 +0000 (18:35 +0000)]
Versioning.

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

3 years ago[Modern Media Controls] Fullscreen controls during Live Broadcast is completely broken
commit-queue@webkit.org [Tue, 14 Mar 2017 18:29:14 +0000 (18:29 +0000)]
[Modern Media Controls] Fullscreen controls during Live Broadcast is completely broken
https://bugs.webkit.org/show_bug.cgi?id=169354
<rdar://problem/30636370>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-14
Reviewed by Dean Jackson.

Source/WebCore:

When playing a Live Broadcast video in fullscreen, we should not show any scrubbing-related
piece of UI and ensure that we show the status label.

Test: http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast.html

* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
(.media-controls.mac.fullscreen > .controls-bar .status-label):
* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
(MacOSFullscreenMediaControls.prototype.layout):
* Modules/modern-media-controls/media/seek-support.js:
(SeekSupport.prototype.get mediaEvents):
(SeekSupport.prototype.syncControl):

LayoutTests:

Add a new test, skipped on iOS, to check scrubbing controls are disabled in fullscreen
for a Live Broadcast video and that the status label is visible. We also rebaseline a
couple of tests now that the time control is added on first layout instead of inside
the constructor.

* http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast-expected.txt: Added.
* http/tests/media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-live-broadcast.html: Added.
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-constructor.html:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles-expected.txt:
* media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-time-control-styles.html:
* platform/ios-simulator/TestExpectations:

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

3 years agoSkip 12 web-platform-tests until wptserver is upgraded.
ryanhaddad@apple.com [Tue, 14 Mar 2017 18:24:14 +0000 (18:24 +0000)]
Skip 12 web-platform-tests until wptserver is upgraded.
https://bugs.webkit.org/show_bug.cgi?id=169615

Unreviewed test gardening.

* TestExpectations:

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

3 years agoNwtr ignores ImageDiff's errors for ref tests
commit-queue@webkit.org [Tue, 14 Mar 2017 18:22:06 +0000 (18:22 +0000)]
Nwtr ignores ImageDiff's errors for ref tests
https://bugs.webkit.org/show_bug.cgi?id=168033

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-03-14
Reviewed by Alexey Proskuryakov.

Nwtr checks ImageDiff's errors only for pixel tests, but for ref
tests. Those errors of ref tests also should be checked.

In the current implementation of expected mismatch ref tests,
diff_image was called if the image hashes match. This is useless
because two images are ensured identical in that case. Calling
image_hash is considered unnecessary for expected mismatch ref
tests. Do not call diff_image for them.

As the result, check the error only for expected match ref tests.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_image): Rename a variable 'err_str' to 'error_string'.
(SingleTestRunner._compare_output_with_reference): Do not call
diff_image for expected mismatch ref tests. Check the error and
marked the test failed for expected match ref tests.

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

3 years agoWeb Inspector: More accurate Resource Timing data in Web Inspector
commit-queue@webkit.org [Tue, 14 Mar 2017 18:19:47 +0000 (18:19 +0000)]
Web Inspector: More accurate Resource Timing data in Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=169577

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-14
Reviewed by Youenn Fablet.

Source/WebCore:

* inspector/InspectorNetworkAgent.h:
* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::didFinishLoading):
Use the ResourceLoader to get the start time that responseEnd is relative to
so we can send the more accurate responseEnd when available.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didFinishLoadingImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didFinishLoading):
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::didFinishLoad):
(WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
(WebCore::ResourceLoadNotifier::sendRemainingDelegateMessages):
* loader/ResourceLoadNotifier.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFinishLoading):
Pass ResourceLoader through to Web Inspector in didFinishLoading.

* platform/network/cocoa/NetworkLoadMetrics.mm:
(WebCore::copyTimingData):
The differences from the reference start are in Seconds, not milliseconds.

Source/WebInspectorUI:

* UserInterface/Models/ResourceTimingData.js:
(WebInspector.ResourceTimingData.prototype.get requestStart):
(WebInspector.ResourceTimingData.prototype.get responseStart):
Fallback to the startTime if available instead of using the
inaccurate WebContentProcess gathered timestamps.

(WebInspector.ResourceTimingData.prototype.markResponseEndTime):
Verify responseEnd compared to other times we may have.

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

3 years agoREGRESSION (r213877): WebKit2.CookieManager fails.
beidson@apple.com [Tue, 14 Mar 2017 17:58:09 +0000 (17:58 +0000)]
REGRESSION (r213877): WebKit2.CookieManager fails.
https://bugs.webkit.org/show_bug.cgi?id=169581

Reviewed by Tim Horton.

Source/WebKit2:

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::processPoolDestroyed): Invalidate the new sets of callbacks.
(WebKit::WebCookieManagerProxy::processDidClose): Ditto.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Reenable the test.

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

3 years agoFix uninitialized public members in NetworkProcess
tpopela@redhat.com [Tue, 14 Mar 2017 17:39:27 +0000 (17:39 +0000)]
Fix uninitialized public members in NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=169598

Reviewed by Alex Christensen.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cache/NetworkCacheStorage.cpp:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

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

3 years agoImport web-platform-tests/cors
commit-queue@webkit.org [Tue, 14 Mar 2017 17:30:19 +0000 (17:30 +0000)]
Import web-platform-tests/cors
https://bugs.webkit.org/show_bug.cgi?id=169565

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-14
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* web-platform-tests/cors/304-expected.txt: Added.
* web-platform-tests/cors/304.htm: Added.
* web-platform-tests/cors/OWNERS: Added.
* web-platform-tests/cors/README.md: Added.
* web-platform-tests/cors/allow-headers-expected.txt: Added.
* web-platform-tests/cors/allow-headers.htm: Added.
* web-platform-tests/cors/basic-expected.txt: Added.
* web-platform-tests/cors/basic.htm: Added.
* web-platform-tests/cors/credentials-flag-expected.txt: Added.
* web-platform-tests/cors/credentials-flag.htm: Added.
* web-platform-tests/cors/late-upload-events-expected.txt: Added.
* web-platform-tests/cors/late-upload-events.htm: Added.
* web-platform-tests/cors/origin-expected.txt: Added.
* web-platform-tests/cors/origin.htm: Added.
* web-platform-tests/cors/preflight-cache-expected.txt: Added.
* web-platform-tests/cors/preflight-cache.htm: Added.
* web-platform-tests/cors/preflight-failure-expected.txt: Added.
* web-platform-tests/cors/preflight-failure.htm: Added.
* web-platform-tests/cors/redirect-origin-expected.txt: Added.
* web-platform-tests/cors/redirect-origin.htm: Added.
* web-platform-tests/cors/redirect-preflight-2-expected.txt: Added.
* web-platform-tests/cors/redirect-preflight-2.htm: Added.
* web-platform-tests/cors/redirect-preflight-expected.txt: Added.
* web-platform-tests/cors/redirect-preflight.htm: Added.
* web-platform-tests/cors/redirect-userinfo-expected.txt: Added.
* web-platform-tests/cors/redirect-userinfo.htm: Added.
* web-platform-tests/cors/remote-origin-expected.txt: Added.
* web-platform-tests/cors/remote-origin.htm: Added.
* web-platform-tests/cors/request-headers-expected.txt: Added.
* web-platform-tests/cors/request-headers.htm: Added.
* web-platform-tests/cors/resources/304.py: Added.
(error):
(main):
* web-platform-tests/cors/resources/checkandremove.py: Added.
(main):
* web-platform-tests/cors/resources/cors-cookie.py: Added.
(main):
* web-platform-tests/cors/resources/cors-headers.asis: Added.
* web-platform-tests/cors/resources/cors-makeheader.py: Added.
(main):
* web-platform-tests/cors/resources/preflight.py: Added.
(main):
* web-platform-tests/cors/resources/remote-xhrer.html: Added.
* web-platform-tests/cors/resources/status.py: Added.
(main):
* web-platform-tests/cors/resources/w3c-import.log: Added.
* web-platform-tests/cors/response-headers-expected.txt: Added.
* web-platform-tests/cors/response-headers.htm: Added.
* web-platform-tests/cors/simple-requests-expected.txt: Added.
* web-platform-tests/cors/simple-requests.htm: Added.
* web-platform-tests/cors/status-async-expected.txt: Added.
* web-platform-tests/cors/status-async.htm: Added.
* web-platform-tests/cors/status-expected.txt: Added.
* web-platform-tests/cors/status-preflight-expected.txt: Added.
* web-platform-tests/cors/status-preflight.htm: Added.
* web-platform-tests/cors/status.htm: Added.
* web-platform-tests/cors/support.js: Added.
(dirname):
* web-platform-tests/cors/w3c-import.log: Added.

LayoutTests:

* tests-options.json:

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

3 years ago[Mac] Add API to get the NSURLProtectionSpace from WKProtectionSpaceRef
adachan@apple.com [Tue, 14 Mar 2017 17:21:17 +0000 (17:21 +0000)]
[Mac] Add API to get the NSURLProtectionSpace from WKProtectionSpaceRef
https://bugs.webkit.org/show_bug.cgi?id=169494
<rdar://problem/11872163>

Reviewed by Dan Bernstein.

* UIProcess/API/C/mac/WKProtectionSpaceNS.h: Added.
* UIProcess/API/C/mac/WKProtectionSpaceNS.mm: Added.
(WKProtectionSpaceCopyNSURLProtectionSpace):
* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoGardening: Speculative build fix for CLoop after r213886.
mark.lam@apple.com [Tue, 14 Mar 2017 17:02:15 +0000 (17:02 +0000)]
Gardening: Speculative build fix for CLoop after r213886.
https://bugs.webkit.org/show_bug.cgi?id=169436

Not reviewed.

* runtime/MachineContext.h:

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

3 years ago[WK2] Adopt updated data operation interfaces for data interaction
wenson_hsieh@apple.com [Tue, 14 Mar 2017 17:01:58 +0000 (17:01 +0000)]
[WK2] Adopt updated data operation interfaces for data interaction
https://bugs.webkit.org/show_bug.cgi?id=169414
<rdar://problem/30948186>

Reviewed by Tim Horton.

Plumb additional information about the data interaction caret over to the UI process after handling a data
interaction action in the web process.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didPerformDragControllerAction):
(WebKit::WebPageProxy::resetCurrentDragInformation):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::currentDragCaretRect):
(WebKit::WebPageProxy::resetCurrentDragInformation): Deleted.
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WKContentViewInteraction.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):

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

3 years ago[WK2] Data interaction tests occasionally hit assertions in debug builds
wenson_hsieh@apple.com [Tue, 14 Mar 2017 17:01:40 +0000 (17:01 +0000)]
[WK2] Data interaction tests occasionally hit assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=169002
<rdar://problem/30994806>

Reviewed by Tim Horton.

Source/WebCore:

Data interaction unit tests occasionally fail due to the UI process expecting the latest received EditorState to
contain post layout data, but finding that it does not in -[WKContentView selectedTextRange]. The incomplete
EditorStates in question are sent while performing a data interaction operation, due to transient changes in the
frame selection. The UI process does not need to (and should not) be informed of these selection changes at all.

We can fix this by preventing the editor client from responding to selection changes during data interaction
operation. This patch also renames setIgnoreCompositionSelectionChange to setIgnoreSelectionChanges to better
reflect the fact that it is used outside of the context of holding selection change updates during IME. We
already use this affordance in various places, such as TextIndicator (while taking a snapshot on iOS), in
FindController on iOS, and when replacing selected or dictated text. Additionally, there is no logic in
setIgnoreCompositionSelectionChange that limits its use to composition.

* editing/Editor.cpp:
(WebCore::Editor::cancelCompositionIfSelectionIsInvalid):
(WebCore::Editor::setComposition):
(WebCore::Editor::revealSelectionAfterEditingOperation):
(WebCore::Editor::setIgnoreSelectionChanges):
(WebCore::Editor::changeSelectionAfterCommand):
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::setIgnoreCompositionSelectionChange): Deleted.
* editing/Editor.h:
(WebCore::Editor::ignoreSelectionChanges):
(WebCore::Editor::ignoreCompositionSelectionChange): Deleted.
* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionWillChange):
* page/TextIndicator.cpp:
(WebCore::TextIndicator::createWithRange):

Source/WebKit/mac:

Renames setIgnoreCompositionSelectionChange to setIgnoreSelectionChanges. See WebCore ChangeLog for more details.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _updateSelectionForInputManager]):
* WebView/WebView.mm:
(-[WebView updateTextTouchBar]):

Source/WebKit2:

Renames setIgnoreCompositionSelectionChange to setIgnoreSelectionChanges. See WebCore ChangeLog for more details.

* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
* UIProcess/gtk/WebPageProxyGtk.cpp:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::editorStateChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::performDragControllerAction):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::didChangeSelection):
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::setSelectionChangeUpdatesEnabledInAllFrames):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
(WebKit::setCompositionSelectionChangeEnabledInAllFrames): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateSelectionAppearance):
(WebKit::WebPage::replaceSelectedText):
(WebKit::WebPage::replaceDictatedText):

Tools:

Reenables and refactors data interaction tests.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _resetSimulatedState]):
(-[DataInteractionSimulator runFrom:to:]):
(-[DataInteractionSimulator _advanceProgress]):

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

3 years ago[JSC] Drop unnecessary pthread_attr_t for JIT enabled Linux / FreeBSD environment
utatane.tea@gmail.com [Tue, 14 Mar 2017 16:59:37 +0000 (16:59 +0000)]
[JSC] Drop unnecessary pthread_attr_t for JIT enabled Linux / FreeBSD environment
https://bugs.webkit.org/show_bug.cgi?id=169592

Reviewed by Carlos Garcia Campos.

Since suspended mcontext_t has all the necessary information, we can drop
pthread_attr_t allocation and destroy for JIT enabled Linux / FreeBSD environment.

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::getRegisters):
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::Registers::llintPC):
(JSC::MachineThreads::Thread::freeRegisters):
* heap/MachineStackMarker.h:

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

3 years ago[Modern Media Controls] iOS may attempt to load fullscreen icon variants
commit-queue@webkit.org [Tue, 14 Mar 2017 16:16:46 +0000 (16:16 +0000)]
[Modern Media Controls] iOS may attempt to load fullscreen icon variants
https://bugs.webkit.org/show_bug.cgi?id=169608
<rdar://problem/31037369>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-14
Reviewed by Eric Carlson.

Source/WebCore:

Only return fullscreen or compact variants for macOS.

* Modules/modern-media-controls/controls/icon-service.js:
(const.iconService.new.IconService.prototype._fileNameAndPlatformForIconNameAndLayoutTraits):
(const.iconService.new.IconService):

LayoutTests:

Amend an existing test to check that we disregard fullscreen and compact variants on iOS.

* media/modern-media-controls/icon-service/icon-service-expected.txt:
* media/modern-media-controls/icon-service/icon-service.html:

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

3 years ago[Modern Media Controls] Controls are laid out incorrectly with RTL languages
commit-queue@webkit.org [Tue, 14 Mar 2017 16:13:14 +0000 (16:13 +0000)]
[Modern Media Controls] Controls are laid out incorrectly with RTL languages
https://bugs.webkit.org/show_bug.cgi?id=169605
<rdar://problem/30975709>

Patch by Antoine Quint <graouts@apple.com> on 2017-03-14
Reviewed by Eric Carlson.

Source/WebCore:

Encorce "direction: ltr" on the controls since the controls layout should not be changed
by the host page's direction.

Test: media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html

* Modules/modern-media-controls/controls/controls-bar.css:
(.controls-bar):

LayoutTests:

Add a test that enforces "direction: rtl" on a parent element to check that the controls
bar use "direction: ltr" anyway.

* media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr-expected.txt: Added.
* media/modern-media-controls/media-controls/media-controls-controls-bar-always-ltr.html: Added.

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

3 years agoREGRESSION (r213877): WebKit2.CookieManager fails.
beidson@apple.com [Tue, 14 Mar 2017 15:52:44 +0000 (15:52 +0000)]
REGRESSION (r213877): WebKit2.CookieManager fails.
https://bugs.webkit.org/show_bug.cgi?id=169581

Unreviewed gardening

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Skip for now until I can fix.

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

3 years agoMake RepaintRegionAccumulator hold a WeakPtr to its root RenderView
wenson_hsieh@apple.com [Tue, 14 Mar 2017 15:11:36 +0000 (15:11 +0000)]
Make RepaintRegionAccumulator hold a WeakPtr to its root RenderView
https://bugs.webkit.org/show_bug.cgi?id=168480
<rdar://problem/30566976>

Reviewed by Antti Koivisto.

Source/WebCore:

Implements two mitigations to prevent the symptoms of the bug from occurring (see the bugzilla for more details).

Test: editing/execCommand/show-modal-dialog-during-execCommand.html

* editing/EditorCommand.cpp:
(WebCore::Editor::Command::execute):

Do not allow edit commands to execute if the frame's document before and after layout differ (that is, edit commands
triggered by a certain document should not run on a different document).

* rendering/RenderView.cpp:
(WebCore::RenderView::RenderView):
(WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):

Turns RepaintRegionAccumulator's reference to its root RenderView into a WeakPtr to gracefully handle the case
where its RenderView is destroyed before RepaintRegionAccumulator's destructor gets a chance to flush the
RenderView's repaint regions.

* rendering/RenderView.h:

LayoutTests:

Introduces a new layout test. See WebCore ChangeLog for more details.

* TestExpectations:
* editing/execCommand/show-modal-dialog-during-execCommand-expected.txt: Added.
* editing/execCommand/show-modal-dialog-during-execCommand.html: Added.
* editing/execCommand/resources/self-closing-modal-dialog.html: Added.
* platform/mac-wk1/TestExpectations:

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

3 years agoSource/WTF:
utatane.tea@gmail.com [Tue, 14 Mar 2017 13:20:52 +0000 (13:20 +0000)]
Source/WTF:
Add secondsAs<T> methods to Seconds to convert it to integers with clamp
https://bugs.webkit.org/show_bug.cgi?id=169537

Reviewed by Carlos Garcia Campos.

When using the usual static_cast, infinity becomes 0 accidentally.
It is not intended value when using Seconds for timeout value.
Instead, we use clampToAccepting64 to convert Seconds to
integer values to pass them to the system functions.

* wtf/MathExtras.h:
(clampToAccepting64):
* wtf/Seconds.h:
(WTF::Seconds::minutesAs):
(WTF::Seconds::secondsAs):
(WTF::Seconds::millisecondsAs):
(WTF::Seconds::microsecondsAs):
(WTF::Seconds::nanosecondsAs):
* wtf/cocoa/WorkQueueCocoa.cpp:
(WTF::WorkQueue::dispatchAfter):
* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::updateReadyTime):

Tools:
[WTF] Clean up RunLoop and WorkQueue with Seconds and Function
https://bugs.webkit.org/show_bug.cgi?id=169537

Reviewed by Carlos Garcia Campos.

* TestWebKitAPI/Tests/WTF/Time.cpp:
(TestWebKitAPI::TEST):

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

3 years ago[GLib] Use USE(GLIB) guards in WebCore/workers/
zandobersek@gmail.com [Tue, 14 Mar 2017 08:30:32 +0000 (08:30 +0000)]
[GLib] Use USE(GLIB) guards in WebCore/workers/
https://bugs.webkit.org/show_bug.cgi?id=169595

Reviewed by Carlos Garcia Campos.

Utilize the USE(GLIB) build guards in the WorkerRunLoop and WorkerThread
class implementations to guard GLib-specific header inclusions and GLib
API invocations, instead of the more specific PLATFORM(GTK) guards.

* workers/WorkerRunLoop.cpp:
(WebCore::WorkerRunLoop::runInMode):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

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

3 years ago[GLib] Use USE(GLIB) guards in JavaScriptCore/inspector/EventLoop.cpp
zandobersek@gmail.com [Tue, 14 Mar 2017 08:29:31 +0000 (08:29 +0000)]
[GLib] Use USE(GLIB) guards in JavaScriptCore/inspector/EventLoop.cpp
https://bugs.webkit.org/show_bug.cgi?id=169594

Reviewed by Carlos Garcia Campos.

Instead of PLATFORM(GTK) guards, utilize the USE(GLIB) build guards
to guard the GLib-specific includes and invocations in the JSC
inspector's EventLoop class implementation.

* inspector/EventLoop.cpp:
(Inspector::EventLoop::cycle):

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

3 years ago[Soup] Suppress compiler warnings in NetworkStorageSession
zandobersek@gmail.com [Tue, 14 Mar 2017 08:28:42 +0000 (08:28 +0000)]
[Soup] Suppress compiler warnings in NetworkStorageSession
https://bugs.webkit.org/show_bug.cgi?id=169593

Reviewed by Carlos Garcia Campos.

Return default-constructed Vector objects in the NetworkStorageSession's
getAllCookies() and getCookies() methods, avoiding compiler warnings.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

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

3 years agoWeb Inspector: Remove unnecessary assert for Number.percentageString
webkit@devinrousso.com [Tue, 14 Mar 2017 08:28:07 +0000 (08:28 +0000)]
Web Inspector: Remove unnecessary assert for Number.percentageString
https://bugs.webkit.org/show_bug.cgi?id=169589

Reviewed by Matt Baker.

* UserInterface/Base/Utilities.js:
(Number.percentageString):

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

3 years agoUnreviewed. Fix syntax error in GTK+ API docs.
carlosgc@webkit.org [Tue, 14 Mar 2017 08:21:44 +0000 (08:21 +0000)]
Unreviewed. Fix syntax error in GTK+ API docs.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):

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

3 years agoWeb Inspector: allow the user to copy locked CSS selectors in Style - Rules
webkit@devinrousso.com [Tue, 14 Mar 2017 07:57:01 +0000 (07:57 +0000)]
Web Inspector: allow the user to copy locked CSS selectors in Style - Rules
https://bugs.webkit.org/show_bug.cgi?id=169587

Reviewed by Matt Baker.

* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section:matches(.locked, .selector-locked) > .header > .selector):

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

3 years ago[JSC][Linux] Implement VMTrap in Linux ports
utatane.tea@gmail.com [Tue, 14 Mar 2017 07:33:08 +0000 (07:33 +0000)]
[JSC][Linux] Implement VMTrap in Linux ports
https://bugs.webkit.org/show_bug.cgi?id=169436

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch port VMTrap to Linux ports.
We extract MachineContext accessors from various places (wasm/, heap/ and tools/)
and use them in all the JSC code.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::Thread::Registers::stackPointer):
(JSC::MachineThreads::Thread::Registers::framePointer):
(JSC::MachineThreads::Thread::Registers::instructionPointer):
(JSC::MachineThreads::Thread::Registers::llintPC):
* heap/MachineStackMarker.h:
* runtime/MachineContext.h: Added.
(JSC::MachineContext::stackPointer):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::argumentPointer):
(JSC::MachineContext::llintInstructionPointer):
* runtime/PlatformThread.h:
(JSC::platformThreadSignal):
* runtime/VMTraps.cpp:
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::adjustPCToPointToTrappingInstruction):
* tools/CodeProfiling.cpp:
(JSC::profilingTimer):
* tools/SigillCrashAnalyzer.cpp:
(JSC::SignalContext::SignalContext):
(JSC::SignalContext::dump):
* tools/VMInspector.cpp:
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::trapHandler):

Source/WTF:

Enable VMTrap mechanism for Linux and FreeBSD.

* wtf/Platform.h:

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

3 years agoRemove unused methods of ResourceRequestBase
commit-queue@webkit.org [Tue, 14 Mar 2017 06:51:23 +0000 (06:51 +0000)]
Remove unused methods of ResourceRequestBase
https://bugs.webkit.org/show_bug.cgi?id=169579

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-03-13
Reviewed by Youenn Fablet.

* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::reportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::setReportUploadProgress): Deleted.
(WebCore::ResourceRequestBase::reportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::setReportLoadTiming): Deleted.
(WebCore::ResourceRequestBase::reportRawHeaders): Deleted.
(WebCore::ResourceRequestBase::setReportRawHeaders): Deleted.
Remove unused code.

* inspector/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::willSendRequest):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createRequest):
Remove callers of setters that did nothing.

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

3 years agoMake RealtimeMediaSource::type an enum class
commit-queue@webkit.org [Tue, 14 Mar 2017 05:58:27 +0000 (05:58 +0000)]
Make RealtimeMediaSource::type an enum class
https://bugs.webkit.org/show_bug.cgi?id=169491

Patch by Youenn Fablet <youenn@apple.com> on 2017-03-13
Reviewed by Sam Weinig.

No change of behavior.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::Source):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::getAudioTracks):
(WebCore::MediaStream::getVideoTracks):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::kind):
* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
(WebCore::LibWebRTCMediaEndpoint::addTrack):
* Modules/webaudio/MediaStreamAudioSource.cpp:
(WebCore::MediaStreamAudioSource::MediaStreamAudioSource):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
* platform/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::bestSourcesForTypeAndConstraints):
(CaptureDeviceManager::sourceWithUID):
* platform/mediastream/MediaEndpoint.cpp:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::AVAudioCaptureSource):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
* platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
* platform/mock/MockMediaEndpoint.cpp:
(WebCore::MockMediaEndpoint::createMutedRemoteSource):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::MockRealtimeAudioSource):
* platform/mock/MockRealtimeMediaSource.cpp:
(WebCore::MockRealtimeMediaSource::MockRealtimeMediaSource):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):

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

3 years agoMake the HeapVerifier useful again.
mark.lam@apple.com [Tue, 14 Mar 2017 00:39:24 +0000 (00:39 +0000)]
Make the HeapVerifier useful again.
https://bugs.webkit.org/show_bug.cgi?id=161752

Reviewed by Filip Pizlo.

Resurrect the HeapVerifier.  Here's what the verifier now offers:

1. It captures the list of cells before and after GCs up to N GC cycles.
   N is set by JSC_numberOfGCCyclesToRecordForVerification.
   Currently, N defaults to 3.

   This is useful if we're debugging in lldb and want to check if a candidate
   cell pointer was observed by the GC during the last N GC cycles.  We can do
   this check buy calling HeapVerifier::checkIfRecorded() with the cell address.

   HeapVerifier::checkIfRecorded() is robust and can be used on bogus addresses.
   If the candidate cell was previously recorded by the HeapVerifier during a
   GC cycle, checkIfRecorded() will dump any useful info it has on that cell.

2. The HeapVerifier will verify that cells in its captured list after a GC are
   sane.  Some examples of cell insanity are:
   - the cell claims to belong to a different VM.
   - the cell has a NULL structureID.
   - the cell has a NULL structure.
   - the cell's structure has a NULL structureID.
   - the cell's structure has a NULL structure.
   - the cell's structure's structure has a NULL structureID.
   - the cell's structure's structure has a NULL structure.

   These are all signs of corruption or a GC bug.  The verifier will report any
   insanity it finds, and then crash with a RELEASE_ASSERT.

3. Since the HeapVerifier captures list of cells in the heap before and after GCs
   for the last N GCs, it will also automatically "trim" dead cells those list
   after the most recent GC.

   "trim" here means that the CellProfile in the HeapVerifier's lists will be
   updated to reflect that the cell is now dead.  It still keeps a record of the
   dead cell pointer and the meta data collected about it back when it was alive.
   As a result, checkIfRecorded() will also report if the candidate cell passed
   to it is a dead object from a previous GC cycle.

4. Each CellProfile captured by the HeapVerifier now track the following info:
   - the cell's HeapCell::Kind.
   - the cell's liveness.
   - if is JSCell, the cell's classInfo()->className.
   - an associated timestamp.
   - an associated stack trace.

   Currently, the timestamp is only used for the time when the cell was recorded
   by the HeapVerifier during GC.  The stack trace is currently unused.

   However, these fields are kept there so that we can instrument the VM (during
   a debugging session, which requires rebuilding the VM) and record interesting
   stack traces like that of the time of allocation of the cell.  Since
   capturing the stack traces for each cell is a very heavy weight operation,
   the HeapVerifier code does not do this by default.  Instead, we just leave
   the building blocks for doing so in place to ease future debugging efforts.

* heap/Heap.cpp:
(JSC::Heap::runBeginPhase):
(JSC::Heap::runEndPhase):
(JSC::Heap::didFinishCollection):
* heap/Heap.h:
(JSC::Heap::verifier):
* heap/MarkedAllocator.h:
(JSC::MarkedAllocator::takeLastActiveBlock): Deleted.
* heap/MarkedSpace.h:
* heap/MarkedSpaceInlines.h:
(JSC::MarkedSpace::forEachLiveCell):
* tools/CellList.cpp:
(JSC::CellList::find):
(JSC::CellList::reset):
(JSC::CellList::findCell): Deleted.
* tools/CellList.h:
(JSC::CellList::CellList):
(JSC::CellList::name):
(JSC::CellList::size):
(JSC::CellList::cells):
(JSC::CellList::add):
(JSC::CellList::reset): Deleted.
* tools/CellProfile.h:
(JSC::CellProfile::CellProfile):
(JSC::CellProfile::cell):
(JSC::CellProfile::jsCell):
(JSC::CellProfile::isJSCell):
(JSC::CellProfile::kind):
(JSC::CellProfile::isLive):
(JSC::CellProfile::isDead):
(JSC::CellProfile::setIsLive):
(JSC::CellProfile::setIsDead):
(JSC::CellProfile::timestamp):
(JSC::CellProfile::className):
(JSC::CellProfile::stackTrace):
(JSC::CellProfile::setStackTrace):
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::startGC):
(JSC::HeapVerifier::endGC):
(JSC::HeapVerifier::gatherLiveCells):
(JSC::trimDeadCellsFromList):
(JSC::HeapVerifier::trimDeadCells):
(JSC::HeapVerifier::printVerificationHeader):
(JSC::HeapVerifier::verifyCellList):
(JSC::HeapVerifier::validateCell):
(JSC::HeapVerifier::validateJSCell):
(JSC::HeapVerifier::verify):
(JSC::HeapVerifier::reportCell):
(JSC::HeapVerifier::checkIfRecorded):
(JSC::HeapVerifier::initializeGCCycle): Deleted.
(JSC::GatherCellFunctor::GatherCellFunctor): Deleted.
(JSC::GatherCellFunctor::visit): Deleted.
(JSC::GatherCellFunctor::operator()): Deleted.
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace): Deleted.
* tools/HeapVerifier.h:
(JSC::HeapVerifier::GCCycle::reset):

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

3 years agoSync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
commit-queue@webkit.org [Tue, 14 Mar 2017 00:38:18 +0000 (00:38 +0000)]
Sync web-platform-tests up to revision a5b95cb31914507088a4eda16f7674bbc6f3313f
https://bugs.webkit.org/show_bug.cgi?id=169523

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

LayoutTests/imported/w3c:

* csswg-test/LICENSE.md: Added.
* csswg-test/README.md:
* csswg-test/build-css-testsuites.sh: Added.
* csswg-test/config.default.json: Added.
* csswg-test/css-grid-1/grid-items/w3c-import.log:
* csswg-test/css-grid-1/grid-model/w3c-import.log:
* csswg-test/css-scoping-1/OWNERS: Added.
* csswg-test/css-scoping-1/css-scoping-shadow-slot-style-expected.html: Added.
* csswg-test/css-scoping-1/css-scoping-shadow-slot-style.html: Added.
* csswg-test/css-scoping-1/w3c-import.log:
* csswg-test/lint: Added.
* csswg-test/lint.whitelist: Added.
* csswg-test/manifest: Added.
* csswg-test/requirements.txt: Added.
* csswg-test/serve: Added.
* csswg-test/serve.py: Added.
(main):
* csswg-test/w3c-import.log:
* resources/TestRepositories:
* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/IndexedDB/abort-in-initial-upgradeneeded.html:
* web-platform-tests/IndexedDB/close-in-upgradeneeded.html:
* web-platform-tests/IndexedDB/event-dispatch-active-flag-expected.txt: Added.
* web-platform-tests/IndexedDB/event-dispatch-active-flag.html: Added.
* web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-error-event-exception.html: Added.
* web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-success-event-exception.html: Added.
* web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt: Added.
* web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html: Added.
* web-platform-tests/IndexedDB/idb-binary-key-roundtrip.htm:
* web-platform-tests/IndexedDB/idbcursor_continue_objectstore.htm:
* web-platform-tests/IndexedDB/idbfactory-deleteDatabase-opaque-origin-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-deleteDatabase-opaque-origin.html: Added.
* web-platform-tests/IndexedDB/idbfactory-open-error-properties-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-open-error-properties.html: Added.
* web-platform-tests/IndexedDB/idbfactory-open-opaque-origin-expected.txt: Added.
* web-platform-tests/IndexedDB/idbfactory-open-opaque-origin.html: Added.
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase4-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_deleteDatabase4.htm:
* web-platform-tests/IndexedDB/idbindex_get.htm:
* web-platform-tests/IndexedDB/idbindex_get4.htm:
* web-platform-tests/IndexedDB/idbindex_getKey4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_createIndex13.htm:
* web-platform-tests/IndexedDB/idbobjectstore_get4.htm:
* web-platform-tests/IndexedDB/idbobjectstore_getKey.html:
* web-platform-tests/IndexedDB/key-conversion-exceptions.htm:
* web-platform-tests/IndexedDB/keygenerator-explicit-expected.txt: Added.
* web-platform-tests/IndexedDB/keygenerator-explicit.html: Added.
* web-platform-tests/IndexedDB/keygenerator-inject-expected.txt: Added.
* web-platform-tests/IndexedDB/keygenerator-inject.html: Added.
* web-platform-tests/IndexedDB/keypath_invalid.htm:
* web-platform-tests/IndexedDB/support.js:
(auto_fail):
(createdb_for_multiple_tests):
(indexeddb_test):
(is_transaction_active):
(spin):
(keep_alive):
* web-platform-tests/IndexedDB/transaction-abort-request-error-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-abort-request-error.html: Added.
* web-platform-tests/IndexedDB/transaction-deactivation-timing-expected.txt: Added.
* web-platform-tests/IndexedDB/transaction-deactivation-timing.html: Added.
* web-platform-tests/IndexedDB/transaction-lifetime-blocked.htm:
* web-platform-tests/IndexedDB/transaction-lifetime.htm:
* web-platform-tests/IndexedDB/upgrade-transaction-deactivation-timing-expected.txt: Added.
* web-platform-tests/IndexedDB/upgrade-transaction-deactivation-timing.html: Added.
* web-platform-tests/IndexedDB/w3c-import.log:
* web-platform-tests/IndexedDB/writer-starvation.htm:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2-expected.txt:
* web-platform-tests/WebCryptoAPI/import_export/symmetric_importKey.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/import_export/test_symmetric_importKey-expected.txt:
* web-platform-tests/XMLHttpRequest/OWNERS:
* web-platform-tests/XMLHttpRequest/README.md: Added.
* web-platform-tests/XMLHttpRequest/abort-after-receive.htm:
* web-platform-tests/XMLHttpRequest/abort-after-timeout.htm:
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported-expected.txt:
* web-platform-tests/XMLHttpRequest/anonymous-mode-unsupported.htm:
* web-platform-tests/XMLHttpRequest/data-uri-expected.txt:
* web-platform-tests/XMLHttpRequest/data-uri.htm:
* web-platform-tests/XMLHttpRequest/event-abort.htm:
* web-platform-tests/XMLHttpRequest/event-load.htm:
* web-platform-tests/XMLHttpRequest/event-loadend.htm:
* web-platform-tests/XMLHttpRequest/event-loadstart-upload-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/event-loadstart-upload.htm: Copied from LayoutTests/imported/w3c/web-platform-tests/XMLHttpRequest/event-progress.htm.
* web-platform-tests/XMLHttpRequest/event-loadstart.htm:
* web-platform-tests/XMLHttpRequest/event-progress.htm:
* web-platform-tests/XMLHttpRequest/event-readystatechange-loaded.htm:
* web-platform-tests/XMLHttpRequest/event-timeout.htm:
* web-platform-tests/XMLHttpRequest/event-upload-progress-crossorigin.htm:
* web-platform-tests/XMLHttpRequest/event-upload-progress.htm:
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cl-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-cl.htm: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/getallresponseheaders.htm: Added.
* web-platform-tests/XMLHttpRequest/getresponseheader-case-insensitive.htm:
* web-platform-tests/XMLHttpRequest/loadstart-and-state-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/loadstart-and-state.html: Added.
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader-expected.txt:
* web-platform-tests/XMLHttpRequest/open-after-setrequestheader.htm:
* web-platform-tests/XMLHttpRequest/open-during-abort-event-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-event.htm: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-processing-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-during-abort-processing.htm: Added.
* web-platform-tests/XMLHttpRequest/open-referer-expected.txt:
* web-platform-tests/XMLHttpRequest/open-referer.htm:
* web-platform-tests/XMLHttpRequest/open-send-during-abort-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-send-during-abort.htm: Added.
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/open-url-redirected-worker-origin.htm: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-blob-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-blob.html: Added.
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type-expected.txt:
* web-platform-tests/XMLHttpRequest/overridemimetype-invalid-mime-type.htm:
* web-platform-tests/XMLHttpRequest/resources/corsenabled.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/delay.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/echo-headers.py: Added.
(main):
* web-platform-tests/XMLHttpRequest/resources/header-content-length.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/headers-basic.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/headers.asis: Added.
* web-platform-tests/XMLHttpRequest/resources/inspect-headers.py:
(get_response):
(main):
* web-platform-tests/XMLHttpRequest/resources/redirect.py:
(main):
* web-platform-tests/XMLHttpRequest/resources/w3c-import.log:
* web-platform-tests/XMLHttpRequest/responsetext-decoding-expected.txt:
* web-platform-tests/XMLHttpRequest/responsetext-decoding.htm:
* web-platform-tests/XMLHttpRequest/send-accept-language-expected.txt:
* web-platform-tests/XMLHttpRequest/send-accept-language.htm:
* web-platform-tests/XMLHttpRequest/send-data-formdata-expected.txt:
* web-platform-tests/XMLHttpRequest/send-data-formdata.htm:
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub-expected.txt:
* web-platform-tests/XMLHttpRequest/send-network-error-sync-events.sub.htm:
* web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm:
* web-platform-tests/XMLHttpRequest/send-sync-blocks-async.htm:
* web-platform-tests/XMLHttpRequest/send-sync-timeout.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-empty-value.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-allow-whitespace-in-value.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-case-insensitive.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-content-type.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-header-forbidden.htm:
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader-expected.txt:
* web-platform-tests/XMLHttpRequest/setrequestheader-open-setrequestheader.htm:
* web-platform-tests/XMLHttpRequest/status-error.htm:
* web-platform-tests/XMLHttpRequest/template-element-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/template-element.html: Added.
* web-platform-tests/XMLHttpRequest/timeout-multiple-fetches-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/timeout-multiple-fetches.html: Added.
* web-platform-tests/XMLHttpRequest/w3c-import.log:
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-reused-expected.txt: Added.
* web-platform-tests/XMLHttpRequest/xmlhttprequest-timeout-reused.html: Added.
* web-platform-tests/check_stability.py:
(replace_streams.on_write):
(replace_streams):
(Firefox.install):
(setup_log_handler.LogHandler.__init__):
(setup_log_handler.LogHandler):
(setup_log_handler.LogHandler.find_or_create_test):
(setup_log_handler.LogHandler.find_or_create_subtest):
(setup_log_handler.LogHandler.test_status):
(setup_log_handler.LogHandler.test_end):
(err_string):
(process_results):
(write_inconsistent):
(write_results):
* web-platform-tests/common/get-host-info.sub.js:
(get_host_info):
* web-platform-tests/dom/OWNERS:
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes-expected.txt:
* web-platform-tests/dom/lists/DOMTokenList-coverage-for-attributes.html:
* web-platform-tests/dom/nodes/Element-matches-expected.txt:
* web-platform-tests/dom/nodes/Element-matches.html:
* web-platform-tests/dom/nodes/Element-matches.js:
(interfaceCheckMatches):
(runSpecialMatchesTests):
(runInvalidSelectorTestMatches):
(runMatchesTest):
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt: Added.
* web-platform-tests/dom/nodes/Element-webkitMatchesSelector.html: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches.html.
* web-platform-tests/dom/nodes/Node-lookupNamespaceURI-expected.txt:
* web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html:
* web-platform-tests/dom/nodes/w3c-import.log:
* web-platform-tests/encrypted-media/content/video_512x288_h264-360k_multikey_key1_dashinit.mp4: Added.
* web-platform-tests/fetch/OWNERS:
* web-platform-tests/fetch/README.md: Added.
* web-platform-tests/fetch/api/basic/request-referrer-expected.txt:
* web-platform-tests/fetch/api/basic/request-referrer-redirected-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-referrer-redirected-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-referrer-worker-expected.txt: Added.
* web-platform-tests/fetch/api/basic/request-referrer-worker.html: Added.
* web-platform-tests/fetch/api/basic/request-referrer.js:
(testReferrer):
* web-platform-tests/fetch/api/basic/request-upload-expected.txt:
* web-platform-tests/fetch/api/basic/request-upload-worker-expected.txt:
* web-platform-tests/fetch/api/basic/request-upload.js:
(testUpload):
* web-platform-tests/fetch/api/basic/w3c-import.log:
* web-platform-tests/fetch/api/cors/cors-expose-star-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star-worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star-worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star.html: Added.
* web-platform-tests/fetch/api/cors/cors-expose-star.js: Added.
(sharedHeaders.string_appeared_here.promise_test):
(string_appeared_here.promise_test):
* web-platform-tests/fetch/api/cors/cors-preflight-star-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star-worker-expected.txt: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star-worker.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star.html: Added.
* web-platform-tests/fetch/api/cors/cors-preflight-star.js: Added.
(origin.location.origin.preflightTest):
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials-worker-expected.txt:
* web-platform-tests/fetch/api/cors/cors-redirect-credentials.js:
(corsRedirectCredentials):
* web-platform-tests/fetch/api/cors/w3c-import.log:
* web-platform-tests/fetch/api/headers/headers-combine-expected.txt:
* web-platform-tests/fetch/api/headers/headers-combine.html:
* web-platform-tests/fetch/api/headers/headers-record-expected.txt: Added.
* web-platform-tests/fetch/api/headers/headers-record.html: Added.
* web-platform-tests/fetch/api/headers/w3c-import.log:
* web-platform-tests/fetch/api/policies/nested-policy.js: Added.
* web-platform-tests/fetch/api/policies/nested-policy.js.headers: Added.
* web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-no-referrer-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-origin-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-worker-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin.js:
* web-platform-tests/fetch/api/policies/referrer-origin.html:
* web-platform-tests/fetch/api/policies/referrer-origin.js:
(promise_test):
* web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https-expected.txt: Added.
* web-platform-tests/fetch/api/policies/referrer-unsafe-url-service-worker.https.html: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/api/policies/referrer-origin.html.
* web-platform-tests/fetch/api/policies/referrer-unsafe-url.js:
* web-platform-tests/fetch/api/policies/w3c-import.log:
* web-platform-tests/fetch/api/request/request-cache-default-conditional-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-default-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-force-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-no-cache-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-no-store-expected.txt:
* web-platform-tests/fetch/api/request/request-cache-reload-expected.txt:
* web-platform-tests/fetch/api/request/request-cache.js:
* web-platform-tests/fetch/api/request/request-headers-expected.txt:
* web-platform-tests/fetch/api/request/request-headers.html:
* web-platform-tests/fetch/api/request/request-keepalive-quota-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-keepalive-quota.html: Added.
* web-platform-tests/fetch/api/request/resources/cache.py:
(main):
* web-platform-tests/fetch/api/request/w3c-import.log:
* web-platform-tests/fetch/api/resources/preflight.py:
(main):
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl.html:
* web-platform-tests/fetch/api/response/response-trailer-expected.txt: Added.
* web-platform-tests/fetch/api/response/response-trailer.html: Added.
* web-platform-tests/fetch/api/response/w3c-import.log:
* web-platform-tests/fetch/w3c-import.log:
* web-platform-tests/html/OWNERS:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin-0.html: Added.
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin-expected.txt:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin.html:
* web-platform-tests/html/browsers/browsing-the-web/history-traversal/w3c-import.log:
* web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-with-colon.sub-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-with-colon.sub.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-stringifier-expected.txt:
* web-platform-tests/html/browsers/history/the-location-interface/location-stringifier.html:
* web-platform-tests/html/browsers/history/the-location-interface/location-tojson-expected.txt: Added.
* web-platform-tests/html/browsers/history/the-location-interface/location-tojson.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/resources/post-your-protocol.html: Added.
* web-platform-tests/html/browsers/history/the-location-interface/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/offline/w3c-import.log.
* web-platform-tests/html/browsers/history/the-location-interface/w3c-import.log:
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical-expected.txt: Added.
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical.html: Added.
* web-platform-tests/html/browsers/offline/no-appcache-in-shared-workers-historical.js: Added.
(test):
* web-platform-tests/html/browsers/offline/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/support/noopener-target.html:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener-expected.txt:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
* web-platform-tests/html/browsers/windows/browsing-context-expected.txt: Added.
* web-platform-tests/html/browsers/windows/browsing-context-window-expected.txt: Added.
* web-platform-tests/html/browsers/windows/browsing-context-window.html: Added.
* web-platform-tests/html/browsers/windows/browsing-context.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/frameElement-nested-frame.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/frameElement-window-post.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/nested-browsing-contexts/w3c-import.log.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/w3c-import.log:
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-null-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent-null.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-parent.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-null-expected.txt: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top-null.html: Added.
* web-platform-tests/html/browsers/windows/nested-browsing-contexts/window-top.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-cross-origin-close-manual.sub.html:
* web-platform-tests/html/browsers/windows/noreferrer-cross-origin-window-name-manual.sub.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-null-opener-expected.txt: Added.
* web-platform-tests/html/browsers/windows/noreferrer-null-opener.html: Added.
* web-platform-tests/html/browsers/windows/noreferrer-window-name.html:
* web-platform-tests/html/browsers/windows/resources/browsing-context-window.html: Added.
* web-platform-tests/html/browsers/windows/resources/echo-window-name.html: Added.
* web-platform-tests/html/browsers/windows/resources/nested-post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/resources/noreferrer-window-name.html: Added.
* web-platform-tests/html/browsers/windows/resources/post-to-opener.html: Added.
* web-platform-tests/html/browsers/windows/resources/target-cross-origin.sub.html: Added.
* web-platform-tests/html/browsers/windows/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/w3c-import.log.
* web-platform-tests/html/browsers/windows/resources/window-close-button.html: Added.
* web-platform-tests/html/browsers/windows/resources/window-opener.html: Added.
* web-platform-tests/html/browsers/windows/targeting-multiple-cross-origin-manual.sub.html:
* web-platform-tests/html/browsers/windows/w3c-import.log:
* web-platform-tests/html/dom/elements/elements-in-the-dom/historical-expected.txt:
* web-platform-tests/html/dom/elements/elements-in-the-dom/historical.html:
* web-platform-tests/html/dom/interfaces.html:
* web-platform-tests/html/dom/interfaces.worker-expected.txt: Added.
* web-platform-tests/html/dom/interfaces.worker.html: Added.
* web-platform-tests/html/dom/interfaces.worker.js: Added.
(doTest):
(fetchData):
(promise_test):
* web-platform-tests/html/dom/reflection.js:
* web-platform-tests/html/dom/resources/self-origin-subframe.html: Added.
* web-platform-tests/html/dom/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log.
* web-platform-tests/html/dom/self-origin.any-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.any.html: Added.
* web-platform-tests/html/dom/self-origin.any.js: Added.
(test):
* web-platform-tests/html/dom/self-origin.sub-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.sub.html: Added.
* web-platform-tests/html/dom/self-origin.worker-expected.txt: Added.
* web-platform-tests/html/dom/self-origin.worker.html: Added.
* web-platform-tests/html/dom/w3c-import.log:
* web-platform-tests/html/semantics/document-metadata/styling/LinkStyle.html:
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks.html: Added.
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/fetch/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/resources/should-load.html: Added.
* web-platform-tests/html/semantics/embedded-content/resources/should-not-load.html: Added.
* web-platform-tests/html/semantics/embedded-content/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html:
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/toBlob.null-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/toBlob.null.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-canvas-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-ignored-in-media-element.html:
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/embed-in-object-fallback-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-embed-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation-without-user-gesture-failed.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/iframe-that-performs-top-navigation.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/navigation-changed-iframe.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/support/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-iframe-element/w3c-import.log:
* web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor-expected.txt:
* web-platform-tests/html/semantics/embedded-content/the-img-element/Image-constructor.html:
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-ignored-in-media-element.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2-expected.txt: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/object-in-object-fallback-2.html: Added.
* web-platform-tests/html/semantics/embedded-content/the-object-element/w3c-import.log:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application.html:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange-expected.txt:
* web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html:
* web-platform-tests/html/semantics/forms/the-input-element/valueMode-expected.txt:
* web-platform-tests/html/semantics/forms/the-input-element/valueMode.html:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection.html:
* web-platform-tests/html/semantics/forms/the-select-element/selected-index-expected.txt:
* web-platform-tests/html/semantics/forms/the-select-element/selected-index.html:
* web-platform-tests/html/semantics/scripting-1/the-script-element/data-url-expected.txt:
* web-platform-tests/html/semantics/scripting-1/the-script-element/data-url.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tFoot.html:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tHead-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-table-element/tHead.html:
* web-platform-tests/html/semantics/tabular-data/the-tr-element/insertCell-expected.txt:
* web-platform-tests/html/semantics/tabular-data/the-tr-element/insertCell.html:
* web-platform-tests/html/syntax/parsing-html-fragments/w3c-import.log:
* web-platform-tests/html/syntax/parsing/test.js:
(init_tests):
* web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers.html:
* web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects-expected.txt: Added.
* web-platform-tests/html/webappapis/scripting/events/compile-event-handler-settings-objects.html: Added.
* web-platform-tests/html/webappapis/scripting/events/event-handler-onauxclick.html:
* web-platform-tests/html/webappapis/scripting/events/event-handler-processing-algorithm-expected.txt:
* web-platform-tests/html/webappapis/scripting/events/event-handler-processing-algorithm.html:
* web-platform-tests/html/webappapis/scripting/events/resources/compiled-event-handler-settings-objects-support.html: Added.
* web-platform-tests/html/webappapis/scripting/events/resources/open-window.html: Added.
* web-platform-tests/html/webappapis/scripting/events/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/offline/w3c-import.log.
* web-platform-tests/html/webappapis/scripting/events/w3c-import.log:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-cross-origin-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setInterval.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-cross-origin-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-in-setInterval.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-in-setTimeout.html:
* web-platform-tests/html/webappapis/scripting/processing-model-2/support/syntax-error-in-setInterval.js:
(step_timeout):
* web-platform-tests/html/webappapis/scripting/processing-model-2/support/undefined-variable-in-setInterval.js:
(step_timeout):
* web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID-expected.txt:
* web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.worker-expected.txt:
* web-platform-tests/lint.whitelist:
* web-platform-tests/media/CanvasTest.ttf: Added.
* web-platform-tests/media/w3c-import.log:
* web-platform-tests/streams/piping/general.js:
(false.promise_test):
* web-platform-tests/streams/piping/pipe-through.js:
(promise_test):
(test):
* web-platform-tests/streams/readable-byte-streams/general-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.js:
(test):
* web-platform-tests/streams/readable-streams/bad-underlying-sources.js:
(promise_test):
* web-platform-tests/streams/readable-streams/brand-checks-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.js:
(test):
(fakeReadableStream):
* web-platform-tests/streams/readable-streams/cancel.js:
(promise_test):
* web-platform-tests/streams/readable-streams/default-reader-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.dedicatedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.dedicatedworker.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.js: Added.
(test):
(promise_test):
(promise_test.t.const.rs.new.ReadableStream.start):
(promise_test.t.const.rs.new.ReadableStream.cancel):
* web-platform-tests/streams/readable-streams/default-reader.serviceworker.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.serviceworker.https.html: Added.
* web-platform-tests/streams/readable-streams/default-reader.sharedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/default-reader.sharedworker.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.dedicatedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.dedicatedworker.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.js: Added.
(promise_test):
(setupTestStream):
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.serviceworker.https.html: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.sharedworker-expected.txt: Added.
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.sharedworker.html: Added.
* web-platform-tests/streams/readable-streams/garbage-collection-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.js:
(promise_test):
* web-platform-tests/streams/readable-streams/general-expected.txt:
* web-platform-tests/streams/readable-streams/general.dedicatedworker-expected.txt:
* web-platform-tests/streams/readable-streams/general.js:
(promise_test):
(test):
* web-platform-tests/streams/readable-streams/pipe-through.js:
(test):
* web-platform-tests/streams/readable-streams/w3c-import.log:
* web-platform-tests/url/OWNERS:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/failure-expected.txt: Added.
* web-platform-tests/url/failure.html: Added.
* web-platform-tests/url/setters_tests.json:
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt:
* web-platform-tests/url/url-setters-expected.txt:
* web-platform-tests/url/urltestdata.json:
* web-platform-tests/url/w3c-import.log:
* web-platform-tests/w3c-import.log:
* web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription-expected.txt: Added.
* web-platform-tests/webrtc/rtcpeerconnection/setRemoteDescription.html: Added.
* web-platform-tests/webrtc/rtcpeerconnection/w3c-import.log:

LayoutTests:

* platform/mac/imported/w3c/web-platform-tests/XMLHttpRequest/setrequestheader-content-type-expected.txt:
* tests-options.json:

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

3 years agoJSC: fix compilation errors for MIPS
commit-queue@webkit.org [Tue, 14 Mar 2017 00:34:28 +0000 (00:34 +0000)]
JSC: fix compilation errors for MIPS
https://bugs.webkit.org/show_bug.cgi?id=168402

Patch by SKumarMetro <s.kumar@metrological.com> on 2017-03-13
Reviewed by Mark Lam.

* assembler/MIPSAssembler.h:
(JSC::MIPSAssembler::fillNops):
Added.
* assembler/MacroAssemblerMIPS.h:
Added MacroAssemblerMIPS::numGPRs and MacroAssemblerMIPS::numFPRs .
* bytecode/InlineAccess.h:
(JSC::InlineAccess::sizeForPropertyAccess):
(JSC::InlineAccess::sizeForPropertyReplace):
(JSC::InlineAccess::sizeForLengthAccess):
Added MIPS cases.

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

3 years ago[MediaStream] Move paintCurrentFrameInContext from RealtimeMediaSources to MediaPlayer
eric.carlson@apple.com [Tue, 14 Mar 2017 00:30:48 +0000 (00:30 +0000)]
[MediaStream] Move paintCurrentFrameInContext from RealtimeMediaSources to MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=169474
<rdar://problem/30976747>

Reviewed by Youenn Fablet.

Source/WebCore:

Every video capture source has extremely similar code to render the current frame to
a graphics context. Because the media player gets every video sample buffer, have it
hang onto the most recent frame so it can implement paintCurrentFrameInContext directly.
Fix an existing race condition that occasionally caused the readyState to advance to
"have enough data" before a video was ready to paint by defining a MediaStreamTrackPrivate
readyState and observing that.

No new tests, covered by existing tests. These changes uncovered a bug in
fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html, which
was updated.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::captureCanvas):
(WebCore::CanvasCaptureMediaStreamTrack::Source::paintCurrentFrameInContext): Deleted.
(WebCore::CanvasCaptureMediaStreamTrack::Source::currentFrameImage): Deleted.
* Modules/mediastream/CanvasCaptureMediaStreamTrack.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]):
Drive-by change - don't pass status to parent callback, it is a property of the layer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable): Drive-by cleanup - we don't
use AVSampleBufferRenderSynchronizer so don't fail if it isn't available.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): Hang onto new frame,
invalidate cached image, update readyState.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::layerStatusDidChange): No more "updatePausedImage".
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer): Drive-by cleanup - Add an early
 return if there is no need for a layer.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer): renderingModeChanged -> updateRenderingMode.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode): Minor cleanup.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode): Renamed from renderingModeChanged,
add a bool return to signal when the mode changes.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play): No more m_haveEverPlayed. Update display
mode immediately.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause): No more paused image.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): Only return HaveNothing, HaveMetadata,
or HaveEnoughData. Don't return HaveEnoughData until all enabled tracks are providing data and never
drop back to HaveMetadata.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode): Renamed from renderingModeChanged.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged): Update intrinsic
size directly.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): No more m_hasReceivedMedia.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::readyStateChanged): Ditto.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): Reset imagePainter
when active video track changes.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateCurrentFrameImage): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): Paint current
frame image.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::CurrentFramePainter::reset): New.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldEnqueueVideoSampleBuffer): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updatePausedImage): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateIntrinsicSize): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::renderingModeChanged): Deleted.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::audioSamplesAvailable): Deleted.

* platform/mediastream/MediaStreamPrivate.cpp:
(WebCore::MediaStreamPrivate::paintCurrentFrameInContext): Deleted.
(WebCore::MediaStreamPrivate::currentFrameImage): Deleted.
* platform/mediastream/MediaStreamPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate):
(WebCore::MediaStreamTrackPrivate::endTrack): Update readyState.
(WebCore::MediaStreamTrackPrivate::clone): Clone readyState.
(WebCore::MediaStreamTrackPrivate::sourceStopped): Update readyState.
(WebCore::MediaStreamTrackPrivate::videoSampleAvailable): Ditto.
(WebCore::MediaStreamTrackPrivate::audioSamplesAvailable): Ditto.
(WebCore::MediaStreamTrackPrivate::updateReadyState): New, update readyState and notify observers.
(WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): Deleted.
* platform/mediastream/MediaStreamTrackPrivate.h:

* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::paintCurrentFrameInContext): Deleted.
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::currentFrameImage): Deleted.
(WebCore::RealtimeMediaSource::paintCurrentFrameInContext): Deleted.

* platform/mediastream/mac/AVMediaCaptureSource.mm:
(-[WebCoreAVMediaCaptureSourceObserver disconnect]): Drive-by fix - clear m_callback
after calling removeNotificationObservers.
(-[WebCoreAVMediaCaptureSourceObserver removeNotificationObservers]): Drive-by fix - remove
the correct listener.
(-[WebCoreAVMediaCaptureSourceObserver endSessionInterrupted:]):

* platform/mediastream/mac/AVVideoCaptureSource.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::currentFrameImage): Deleted.
(WebCore::AVVideoCaptureSource::currentFrameCGImage): Deleted.
(WebCore::AVVideoCaptureSource::paintCurrentFrameInContext): Deleted.

* platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:
(WebCore::drawImage): Deleted.
(WebCore::RealtimeIncomingVideoSource::currentFrameImage): Deleted.
(WebCore::RealtimeIncomingVideoSource::paintCurrentFrameInContext): Deleted.
* platform/mediastream/mac/RealtimeIncomingVideoSource.h:

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::paintCurrentFrameInContext): Deleted.
(WebCore::MockRealtimeVideoSource::currentFrameImage): Deleted.
* platform/mock/MockRealtimeVideoSource.h:

LayoutTests:

* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled-expected.txt:
* fast/mediastream/MediaStream-video-element-video-tracks-disabled-then-enabled.html: Fix
bug uncovered by patch.

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

3 years ago[GTK][SOUP] Fix build after r213877
clopez@igalia.com [Tue, 14 Mar 2017 00:18:16 +0000 (00:18 +0000)]
[GTK][SOUP] Fix build after r213877
https://bugs.webkit.org/show_bug.cgi?id=140191

Unreviewed build fix.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::setCookie): Add missing setCookie() declaration.

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

3 years agoSkip WebGPU tests on ios-simulator.
ryanhaddad@apple.com [Mon, 13 Mar 2017 23:05:49 +0000 (23:05 +0000)]
Skip WebGPU tests on ios-simulator.

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

3 years agoWKWebView provides no access to cookies.
beidson@apple.com [Mon, 13 Mar 2017 23:00:49 +0000 (23:00 +0000)]
WKWebView provides no access to cookies.
https://bugs.webkit.org/show_bug.cgi?id=140191

Reviewed by Tim Horton.

Source/WebCore:

Covered by API tests.

* platform/Cookie.h:

* platform/network/NetworkStorageSession.h:
* platform/network/cocoa/NetworkStorageSessionCocoa.mm:
(WebCore::NetworkStorageSession::setCookie):
(WebCore::NetworkStorageSession::deleteCookie):
(WebCore::nsCookiesToCookieVector):
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::deleteCookie):
(WebCore::NetworkStorageSession::getAllCookies):
(WebCore::NetworkStorageSession::getCookies):

Source/WebKit2:

This adds a new WKHTTPCookieManager SPI.
It follows the NSHTTPCookieStorage API but asynchronous (with completion handlers).

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:

* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):

* UIProcess/API/APIHTTPCookieStorage.cpp: Added.
(API::HTTPCookieStorage::HTTPCookieStorage):
(API::HTTPCookieStorage::~HTTPCookieStorage):
(API::HTTPCookieStorage::cookies):
(API::HTTPCookieStorage::setCookie):
(API::HTTPCookieStorage::setCookies):
(API::HTTPCookieStorage::deleteCookie):
(API::HTTPCookieStorage::removeCookiesSinceDate):
(API::HTTPCookieStorage::setHTTPCookieAcceptPolicy):
(API::HTTPCookieStorage::getHTTPCookieAcceptPolicy):
* UIProcess/API/APIHTTPCookieStorage.h: Added.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultDataStore):
(API::WebsiteDataStore::httpCookieStorage):
* UIProcess/API/APIWebsiteDataStore.h:

* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerDeleteAllCookiesModifiedAfterDate):
(WKCookieManagerSetHTTPCookieAcceptPolicy):
(WKCookieManagerGetHTTPCookieAcceptPolicy):

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreGetDefaultDataStore):

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setCookieAcceptPolicy:]):

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore defaultDataStore]):
(-[WKWebsiteDataStore _httpCookieStorage]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

* UIProcess/API/Cocoa/WKHTTPCookieStorage.h:
* UIProcess/API/Cocoa/WKHTTPCookieStorage.mm: Added.
(coreCookiesToNSCookies):
(-[WKHTTPCookieStorage dealloc]):
(-[WKHTTPCookieStorage fetchCookies:]):
(-[WKHTTPCookieStorage fetchCookiesForURL:completionHandler:]):
(-[WKHTTPCookieStorage setCookie:completionHandler:]):
(-[WKHTTPCookieStorage deleteCookie:completionHandler:]):
(-[WKHTTPCookieStorage setCookies:forURL:mainDocumentURL:completionHandler:]):
(-[WKHTTPCookieStorage removeCookiesSinceDate:completionHandler:]):
(-[WKHTTPCookieStorage setCookieAcceptPolicy:completionHandler:]):
(kitCookiePolicyToNSCookiePolicy):
(-[WKHTTPCookieStorage fetchCookieAcceptPolicy:]):
(-[WKHTTPCookieStorage _apiObject]):
* UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h.
(WebKit::wrapper):

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::addSingleCookie):

* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
(WebKit::WebCookieManagerProxy::deleteAllCookies):
(WebKit::WebCookieManagerProxy::deleteCookie):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::setCookie):
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::getAllCookies):
(WebKit::WebCookieManagerProxy::getCookies):
(WebKit::WebCookieManagerProxy::didSetCookies):
(WebKit::WebCookieManagerProxy::didGetCookies):
(WebKit::WebCookieManagerProxy::didDeleteCookies):
(WebKit::WebCookieManagerProxy::startObservingCookieChanges):
(WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
(WebKit::WebCookieManagerProxy::setCookieObserverCallback):
(WebKit::WebCookieManagerProxy::cookiesDidChange):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didSetHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebCookieManagerProxy.messages.in:

* UIProcess/WebFrameProxy.h:

* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):
(WebKit::WebsiteDataStore::processPools):
* UIProcess/WebsiteData/WebsiteDataStore.h:

* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/WebCookieManager.messages.in:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

3 years agoFTL should not flush strict arguments unless it really needs to
fpizlo@apple.com [Mon, 13 Mar 2017 22:52:41 +0000 (22:52 +0000)]
FTL should not flush strict arguments unless it really needs to
https://bugs.webkit.org/show_bug.cgi?id=169519

Reviewed by Mark Lam.

This is a refinement that we should have done ages ago. This kills some pointless PutStacks
in DFG SSA IR. It can sometimes unlock other optimizations.

Relanding after I fixed the special cases for CreateArguments-style nodes.

* dfg/DFGPreciseLocalClobberize.h:
(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

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

3 years agoWeb Inspector: WebSockets: color of outgoing message icon should match text color
nvasilyev@apple.com [Mon, 13 Mar 2017 22:35:29 +0000 (22:35 +0000)]
Web Inspector: WebSockets: color of outgoing message icon should match text color
https://bugs.webkit.org/show_bug.cgi?id=169512
<rdar://problem/30994284>

Reviewed by Devin Rousso.

Include SVG icon as an inline SVG element to make currentColor work.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/WebSocketContentView.css:
(.web-socket.content-view .outgoing .icon): Deleted.
* UserInterface/Views/WebSocketContentView.js:
(WebInspector.WebSocketContentView):
(WebInspector.WebSocketContentView.prototype.addFrame):
(WebInspector.WebSocketContentView.prototype._addRow):
(WebInspector.WebSocketContentView.prototype._timeStringFromTimestamp): Deleted.
* UserInterface/Views/WebSocketDataGridNode.js: Added.
(WebInspector.WebSocketDataGridNode.prototype.createCellContent):
(WebInspector.WebSocketDataGridNode.prototype._timeStringFromTimestamp):
(WebInspector.WebSocketDataGridNode):

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

3 years agoWeb Inspector: Event Listeners detail section is unhelpful, default should show liste...
webkit@devinrousso.com [Mon, 13 Mar 2017 22:29:47 +0000 (22:29 +0000)]
Web Inspector: Event Listeners detail section is unhelpful, default should show listeners by element rather than by event
https://bugs.webkit.org/show_bug.cgi?id=167077

Reviewed by Joseph Pecoraro.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Views/EventListenerSection.js: Removed.

* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.eventListeners): Renamed to getEventListeners.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.css: Added.
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(body[dir=ltr] .sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(body[dir=rtl] .sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:hover):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:active):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners.collapsed > .header > .filter):
(.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter > select):

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.createOption):
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByEvent):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.eventListenersCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners):
Add a filter to the Event Listeners section that changes the way in which event listeners
are grouped.  Currently supports two methods:
 - Group by Event
 - Group by Node

* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup):
Add ability to display the event type.

* UserInterface/Views/DetailsSection.css:
(.details-section):
Drive-by fix: CSS variable was named incorrectly.

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

3 years agoWeb Inspector: Event Listeners section is missing 'once', 'passive' event listener...
webkit@devinrousso.com [Mon, 13 Mar 2017 22:27:20 +0000 (22:27 +0000)]
Web Inspector: Event Listeners section is missing 'once', 'passive' event listener flags
https://bugs.webkit.org/show_bug.cgi?id=167080

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/protocol/DOM.json:
Add "passive" and "once" items to the EventListener type.

Source/WebCore:

Test: inspector/dom/getEventListenersForNode.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForEventListener):
Add "passive" and "once" values to the EventListener protocol object when applicable.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/EventListenerSectionGroup.js:
(WebInspector.EventListenerSectionGroup):
(WebInspector.EventListenerSectionGroup.prototype._type): Deleted.

LayoutTests:

Tests the result of DOMAgent.getEventListenersForNode and ensures that additional options
are passed to the frontend.

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

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

3 years agoRemove obsolete experimental ObjC SPI.
mark.lam@apple.com [Mon, 13 Mar 2017 22:06:20 +0000 (22:06 +0000)]
Remove obsolete experimental ObjC SPI.
https://bugs.webkit.org/show_bug.cgi?id=169569

Reviewed by Saam Barati.

* API/JSVirtualMachine.mm:
(-[JSVirtualMachine enableSigillCrashAnalyzer]): Deleted.
* API/JSVirtualMachinePrivate.h: Removed.
* JavaScriptCore.xcodeproj/project.pbxproj:

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