WebKit-https.git
6 months ago[iOS wk2 Debug] imported/w3c/web-platform-tests/mathml/presentation-markup/scripts...
tsavell@apple.com [Wed, 5 Feb 2020 17:47:06 +0000 (17:47 +0000)]
[iOS wk2 Debug] imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/cramped-001.html is failing
https://bugs.webkit.org/show_bug.cgi?id=207077

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-05

* platform/ios-wk2/TestExpectations:

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

6 months ago[Web Animations] Update snapshot of Web Animations, CSS Animations and CSS Transition...
graouts@webkit.org [Wed, 5 Feb 2020 17:29:14 +0000 (17:29 +0000)]
[Web Animations] Update snapshot of Web Animations, CSS Animations and CSS Transitions WPT tests
https://bugs.webkit.org/show_bug.cgi?id=207263

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/css/css-animations/AnimationEffect-getComputedTiming.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-canceling.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-compositeOrder.tentative-expected.txt: Added.
* web-platform-tests/css/css-animations/CSSAnimation-compositeOrder.tentative.html: Added.
* web-platform-tests/css/css-animations/CSSAnimation-effect.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-finished.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-getCurrentTime.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-id.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-playState.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-ready.tentative.html:
* web-platform-tests/css/css-animations/CSSAnimation-startTime.tentative.html:
* web-platform-tests/css/css-animations/CSSPseudoElement-getAnimations.tentative-expected.txt: Removed.
* web-platform-tests/css/css-animations/CSSPseudoElement-getAnimations.tentative.html: Removed.
* web-platform-tests/css/css-animations/Document-getAnimations.tentative-expected.txt:
* web-platform-tests/css/css-animations/Document-getAnimations.tentative.html:
* web-platform-tests/css/css-animations/Element-getAnimations-dynamic-changes.tentative.html:
* web-platform-tests/css/css-animations/Element-getAnimations.tentative-expected.txt:
* web-platform-tests/css/css-animations/Element-getAnimations.tentative.html:
* web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html:
* web-platform-tests/css/css-animations/KeyframeEffect-target.tentative.html:
* web-platform-tests/css/css-animations/animation-before-initial-box-construction-001-expected.txt: Added.
* web-platform-tests/css/css-animations/animation-before-initial-box-construction-001.html: Added.
* web-platform-tests/css/css-animations/animationevent-interface.js:
(test):
* web-platform-tests/css/css-animations/keyframes-remove-documentElement-crash.html:
* web-platform-tests/css/css-animations/support/empty-sheet.css: Added.
* web-platform-tests/css/css-animations/support/w3c-import.log:
* web-platform-tests/css/css-animations/w3c-import.log:
* web-platform-tests/css/css-backgrounds/animations/border-bottom-left-radius-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-bottom-right-radius-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-bottom-width-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-image-outset-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-image-slice-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-image-width-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-left-width-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-right-width-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-top-left-radius-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-top-right-radius-composition-expected.txt:
* web-platform-tests/css/css-backgrounds/animations/border-top-width-composition-expected.txt:
* web-platform-tests/css/css-fonts/animations/font-variation-settings-composition-expected.txt:
* web-platform-tests/css/css-transitions/AnimationEffect-getComputedTiming.tentative.html:
* web-platform-tests/css/css-transitions/CSSPseudoElement-getAnimations.tentative-expected.txt: Removed.
* web-platform-tests/css/css-transitions/CSSPseudoElement-getAnimations.tentative.html: Removed.
* web-platform-tests/css/css-transitions/CSSTransition-canceling.tentative.html:
* web-platform-tests/css/css-transitions/CSSTransition-currentTime.tentative.html:
* web-platform-tests/css/css-transitions/CSSTransition-effect.tentative.html:
* web-platform-tests/css/css-transitions/CSSTransition-finished.tentative.html:
* web-platform-tests/css/css-transitions/CSSTransition-ready.tentative.html:
* web-platform-tests/css/css-transitions/CSSTransition-startTime.tentative.html:
* web-platform-tests/css/css-transitions/Document-getAnimations.tentative-expected.txt:
* web-platform-tests/css/css-transitions/Document-getAnimations.tentative.html:
* web-platform-tests/css/css-transitions/Element-getAnimations.tentative.html:
* web-platform-tests/css/css-transitions/KeyframeEffect-getKeyframes.tentative.html:
* web-platform-tests/css/css-transitions/KeyframeEffect-target.tentative.html:
* web-platform-tests/css/css-transitions/README.md:
* web-platform-tests/css/css-transitions/animations/text-shadow-composition-expected.txt: Added.
* web-platform-tests/css/css-transitions/animations/text-shadow-composition.html: Added.
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation-expected.txt: Added.
* web-platform-tests/css/css-transitions/animations/text-shadow-interpolation.html: Added.
* web-platform-tests/css/css-transitions/animations/vertical-align-composition-expected.txt: Added.
* web-platform-tests/css/css-transitions/animations/vertical-align-composition.html: Added.
* web-platform-tests/css/css-transitions/animations/vertical-align-interpolation-expected.txt: Added.
* web-platform-tests/css/css-transitions/animations/vertical-align-interpolation.html: Added.
* web-platform-tests/css/css-transitions/animations/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/combining-effects/w3c-import.log.
* web-platform-tests/css/css-transitions/animations/z-index-interpolation-expected.txt: Added.
* web-platform-tests/css/css-transitions/animations/z-index-interpolation.html: Added.
* web-platform-tests/css/css-transitions/before-load-001.html:
* web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed-expected.txt:
* web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed.html:
* web-platform-tests/css/css-transitions/properties-value-001.html:
* web-platform-tests/css/css-transitions/properties-value-002.html:
* web-platform-tests/css/css-transitions/properties-value-003.html:
* web-platform-tests/css/css-transitions/properties-value-auto-001.html:
* web-platform-tests/css/css-transitions/properties-value-implicit-001.html:
* web-platform-tests/css/css-transitions/properties-value-inherit-001.html:
* web-platform-tests/css/css-transitions/properties-value-inherit-002.html:
* web-platform-tests/css/css-transitions/properties-value-inherit-003.html:
* web-platform-tests/css/css-transitions/pseudo-elements-001.html:
* web-platform-tests/css/css-transitions/transition-001.html:
* web-platform-tests/css/css-transitions/transition-delay-001.html:
* web-platform-tests/css/css-transitions/transition-duration-001.html:
* web-platform-tests/css/css-transitions/transition-property-001.html:
* web-platform-tests/css/css-transitions/transition-property-002.html:
* web-platform-tests/css/css-transitions/transitionevent-interface.html:
* web-platform-tests/css/css-transitions/w3c-import.log:
* web-platform-tests/css/support/interpolation-testcommon.js:
(cssAnimationsInterpolation.isSupported):
(cssTransitionsInterpolation.isSupported):
(cssTransitionAllInterpolation.isSupported):
(webAnimationsInterpolation.isSupported):
(webAnimationsInterpolation.interpolateComposite):
(createInterpolationTestTargets):
(create_tests):
(test_interpolation):
* web-platform-tests/web-animations/README.md:
* web-platform-tests/web-animations/animation-model/animation-types/property-list.js:
(testAnimationSamplesWithAnyOrder):
* web-platform-tests/web-animations/animation-model/combining-effects/applying-interpolated-transform-expected.txt: Added.
* web-platform-tests/web-animations/animation-model/combining-effects/applying-interpolated-transform.html: Added.
* web-platform-tests/web-animations/animation-model/combining-effects/w3c-import.log:
* web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
* web-platform-tests/web-animations/interfaces/Animatable/animate.html:
* web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:
* web-platform-tests/web-animations/interfaces/Animation/commitStyles.html:
* web-platform-tests/web-animations/interfaces/Animation/onremove-expected.txt: Added.
* web-platform-tests/web-animations/interfaces/Animation/onremove.html: Added.
* web-platform-tests/web-animations/interfaces/Animation/pause.html:
* web-platform-tests/web-animations/interfaces/Animation/play.html:
* web-platform-tests/web-animations/interfaces/Animation/w3c-import.log:
* web-platform-tests/web-animations/interfaces/AnimationEffect/updateTiming.html:
* web-platform-tests/web-animations/interfaces/AnimationPlaybackEvent/w3c-import.log:
* web-platform-tests/web-animations/interfaces/Document/getAnimations-expected.txt: Removed.
* web-platform-tests/web-animations/interfaces/Document/w3c-import.log:
* web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations-expected.txt: Added.
* web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/getAnimations.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Document/getAnimations.html.
* web-platform-tests/web-animations/interfaces/DocumentOrShadowRoot/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-animations/support/w3c-import.log.
* web-platform-tests/web-animations/interfaces/DocumentTimeline/w3c-import.log:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/constructor.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-002.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/setKeyframes.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/style-change-events.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/target-expected.txt:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/target.html:
* web-platform-tests/web-animations/interfaces/KeyframeEffect/w3c-import.log:
* web-platform-tests/web-animations/testcommon.js:
(cubicBezier): Deleted.
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/finishing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/pausing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/reverse-running-animation-expected.html: Added.
* web-platform-tests/web-animations/timing-model/animations/reverse-running-animation.html: Added.
* web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/setting-the-current-time-of-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/setting-the-playback-rate-of-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/setting-the-playback-rate-of-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/setting-the-start-time-of-an-animation-expected.txt:
* web-platform-tests/web-animations/timing-model/animations/setting-the-start-time-of-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/sync-start-times-expected.html: Added.
* web-platform-tests/web-animations/timing-model/animations/sync-start-times.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast-expected.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-fast.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow-expected.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-slow.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero-expected.html: Added.
* web-platform-tests/web-animations/timing-model/animations/update-playback-rate-zero.html: Added.
* web-platform-tests/web-animations/timing-model/animations/w3c-import.log:
* web-platform-tests/web-animations/w3c-import.log:

LayoutTests:

* TestExpectations:
* tests-options.json:

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

6 months agoRegression (r252014?) [ Mac wk2 ] http/tests/resourceLoadStatistics/log-cross-site...
tsavell@apple.com [Wed, 5 Feb 2020 17:22:59 +0000 (17:22 +0000)]
Regression (r252014?) [ Mac wk2 ] http/tests/resourceLoadStatistics/log-cross-site-load-with-link-decoration.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207271

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-05

* platform/mac-wk2/TestExpectations:

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

6 months agoUnreviewed, rolling out r255818.
commit-queue@webkit.org [Wed, 5 Feb 2020 17:15:38 +0000 (17:15 +0000)]
Unreviewed, rolling out r255818.
https://bugs.webkit.org/show_bug.cgi?id=207270

It is breaking some Mac builds (Requested by youenn on
#webkit).

Reverted changeset:

"[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder"
https://bugs.webkit.org/show_bug.cgi?id=206582
https://trac.webkit.org/changeset/255818

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

6 months ago[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
youenn@apple.com [Wed, 5 Feb 2020 16:53:53 +0000 (16:53 +0000)]
[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder
https://bugs.webkit.org/show_bug.cgi?id=206582
Source/WebCore:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

AVAssetWriterDelegate allows to grab recorded data whenever wanted.
This delegate requires passing compressed samples to AVAssetWriter.
Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter.
These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor.
They support AAC and H264 so far and should be further improved to support more encoding options.

Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere.
The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors.
It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter.
The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data.

Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed.
Therefore data should not be requested too fast to get adequate video compression.

Covered by existing tests.

* Modules/mediarecorder/MediaRecorderProvider.cpp:
(WebCore::MediaRecorderProvider::createMediaRecorderPrivate):
* WebCore.xcodeproj/project.pbxproj:
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
(WebCore::MediaRecorderPrivateAVFImpl::create):
* platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added.
* platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added.
(WebCore::AudioSampleBufferCompressor::create):
(WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor):
(WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor):
(WebCore::AudioSampleBufferCompressor::initialize):
(WebCore::AudioSampleBufferCompressor::finish):
(WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription):
(WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat):
(WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded):
(WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount):
(WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets):
(WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc):
(WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets):
(WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime):
(WebCore::AudioSampleBufferCompressor::processSampleBuffer):
(WebCore::AudioSampleBufferCompressor::addSampleBuffer):
(WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer):
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
* platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
(-[WebAVAssetWriterDelegate initWithWriter:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]):
(-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]):
(-[WebAVAssetWriterDelegate close]):
(WebCore::MediaRecorderPrivateWriter::create):
(WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback):
(WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback):
(WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter):
(WebCore::MediaRecorderPrivateWriter::initialize):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::startAssetWriter):
(WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers):
(WebCore::appendEndsPreviousSampleDurationMarker):
(WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded):
(WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers):
(WebCore::MediaRecorderPrivateWriter::clear):
(WebCore::copySampleBufferWithCurrentTimeStamp):
(WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
(WebCore::createAudioFormatDescription):
(WebCore::createAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::appendData):
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h.
* platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added.
(WebCore::VideoSampleBufferCompressor::create):
(WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor):
(WebCore::VideoSampleBufferCompressor::initialize):
(WebCore::VideoSampleBufferCompressor::finish):
(WebCore::VideoSampleBufferCompressor::videoCompressionCallback):
(WebCore::VideoSampleBufferCompressor::initCompressionSession):
(WebCore::VideoSampleBufferCompressor::processSampleBuffer):
(WebCore::VideoSampleBufferCompressor::addSampleBuffer):
(WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer):
(WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer):

Source/WebCore/PAL:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

Add soft link macros for VideoToolbox and AudioToolbox.

* PAL.xcodeproj/project.pbxproj:
* pal/cf/AudioToolboxSoftLink.cpp: Added.
* pal/cf/AudioToolboxSoftLink.h: Added.
* pal/cf/CoreMediaSoftLink.cpp:
* pal/cf/CoreMediaSoftLink.h:
* pal/cf/VideoToolboxSoftLink.cpp: Added.
* pal/cf/VideoToolboxSoftLink.h: Added.

Source/WebKit:

<rdar://problem/58985368>

Reviewed by Eric Carlson.

Enable RemoteMediaRecorder only for systems supporting AVAssetWriterDelegate.

* GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):
* GPUProcess/GPUConnectionToWebProcess.h:
* GPUProcess/webrtc/RemoteMediaRecorder.cpp:
* GPUProcess/webrtc/RemoteMediaRecorder.h:
* GPUProcess/webrtc/RemoteMediaRecorder.messages.in:
* GPUProcess/webrtc/RemoteMediaRecorderManager.cpp:
* GPUProcess/webrtc/RemoteMediaRecorderManager.h:
* GPUProcess/webrtc/RemoteMediaRecorderManager.messages.in:
* GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager.h:
* WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
* WebProcess/GPU/webrtc/MediaRecorderPrivate.h:
* WebProcess/GPU/webrtc/MediaRecorderProvider.cpp:
(WebKit::MediaRecorderProvider::createMediaRecorderPrivate):

Source/WTF:

Reviewed by Eric Carlson.

* wtf/PlatformHave.h:

LayoutTests:

Reviewed by Eric Carlson.

Disable tests on all platforms except the ones supporting AVAssetWriterDelegate.

* TestExpectations:
* http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html:
Remove web audio generation since there seems to be some unstability in web audio -> stream -> media recorder.
which should be fixed as follow-up specific patches.
* platform/mac/TestExpectations:

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

6 months agoUnreviewed iOS build fix.
cdumez@apple.com [Wed, 5 Feb 2020 16:51:36 +0000 (16:51 +0000)]
Unreviewed iOS build fix.

* rendering/RenderThemeIOS.h:

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

6 months agoRegression: [ Mac Debug wk2 ] http/tests/websocket/tests/hybi/server-close.html is...
tsavell@apple.com [Wed, 5 Feb 2020 16:49:08 +0000 (16:49 +0000)]
Regression: [ Mac Debug wk2 ] http/tests/websocket/tests/hybi/server-close.html is flaky crashing.
https://bugs.webkit.org/show_bug.cgi?id=207269

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-05

* platform/mac-wk2/TestExpectations:

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

6 months agoUnreviewed, rolling out r255706.
cdumez@apple.com [Wed, 5 Feb 2020 16:39:11 +0000 (16:39 +0000)]
Unreviewed, rolling out r255706.

Caused assertions in API tests

Reverted changeset:

"Partial revert of r248734 to fix leak of StorageAreaMaps"
https://bugs.webkit.org/show_bug.cgi?id=207073
https://trac.webkit.org/changeset/255706

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

6 months agoUnreviewed, follow-up assertion fix after r255662.
cdumez@apple.com [Wed, 5 Feb 2020 16:27:50 +0000 (16:27 +0000)]
Unreviewed, follow-up assertion fix after r255662.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):

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

6 months agoresults.webkit.org should disable auto-capitalize over the search field
jbedard@apple.com [Wed, 5 Feb 2020 16:23:13 +0000 (16:23 +0000)]
results.webkit.org should disable auto-capitalize over the search field
https://bugs.webkit.org/show_bug.cgi?id=207240
<rdar://problem/59053042>

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/search.js:

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

6 months ago[ macOS ] imported/w3c/web-platform-tests/hr-time/basic.any.html is flaky failing
tsavell@apple.com [Wed, 5 Feb 2020 15:59:26 +0000 (15:59 +0000)]
[ macOS ] imported/w3c/web-platform-tests/hr-time/basic.any.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=206908

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-05

* platform/mac/TestExpectations:

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

6 months ago[ Mac wk2 ] webgpu/whlsl/ensure-proper-variable-lifetime.html is flaky failing.
tsavell@apple.com [Wed, 5 Feb 2020 15:54:07 +0000 (15:54 +0000)]
[ Mac wk2 ] webgpu/whlsl/ensure-proper-variable-lifetime.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207267

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-05

* platform/mac-wk2/TestExpectations:

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

6 months ago[Web Animations] Canceling an accelerated animation before it was committed does...
graouts@webkit.org [Wed, 5 Feb 2020 11:51:40 +0000 (11:51 +0000)]
[Web Animations] Canceling an accelerated animation before it was committed does not prevent it from playing
https://bugs.webkit.org/show_bug.cgi?id=207253
<rdar://problem/59143624>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/accelerated-animation-canceled-before-commit.html

Merely checking whether an accelerated animation is running prior to enqueuing an action to cancel it is not sufficient
since there could be an uncommitted change to start it upon the next animation frame. The same logic would need to apply
in other situations where the playback state changes for a potentially in-flight animation.

* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::animationDidSeek):
(WebCore::KeyframeEffect::animationWasCanceled):
(WebCore::KeyframeEffect::willChangeRenderer):
(WebCore::KeyframeEffect::animationSuspensionStateDidChange):

LayoutTests:

Add a new test that checks that an accelerated animation that has been enqueued to start but has
not yet been committed is correctly canceled when the cancel() method is called. This test fails
prior to this source change.

* webanimations/accelerated-animation-canceled-before-commit-expected.html: Added.
* webanimations/accelerated-animation-canceled-before-commit.html: Added.

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

6 months ago[GStreamer] Client-side video rendering doesn't fallback to internal compositing
philn@webkit.org [Wed, 5 Feb 2020 09:59:50 +0000 (09:59 +0000)]
[GStreamer] Client-side video rendering doesn't fallback to internal compositing
https://bugs.webkit.org/show_bug.cgi?id=207208

Patch by Philippe Normand <philn@igalia.com> on 2020-02-05
Reviewed by Xabier Rodriguez-Calvar and Žan Doberšek.

Refactor the default video composition code into a self-contained
closure and invoke it if the video frame holder failed to export
the EGLImage to a valid DMABuf.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::GstVideoFrameHolder::hasDMABuf const):
(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor):

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

6 months ago[WPE] Add support for rendering menu list buttons
carlosgc@webkit.org [Wed, 5 Feb 2020 09:14:17 +0000 (09:14 +0000)]
[WPE] Add support for rendering menu list buttons
https://bugs.webkit.org/show_bug.cgi?id=207196

Reviewed by Žan Doberšek.

* platform/wpe/RenderThemeWPE.cpp:
(WebCore::RenderThemeWPE::supportsFocusRing const):
(WebCore::RenderThemeWPE::adjustTextFieldStyle const):
(WebCore::RenderThemeWPE::paintTextField):
(WebCore::RenderThemeWPE::paintTextArea):
(WebCore::RenderThemeWPE::adjustSearchFieldStyle const):
(WebCore::RenderThemeWPE::paintSearchField):
(WebCore::paintFocus):
(WebCore::paintArrow):
(WebCore::RenderThemeWPE::popupInternalPaddingBox const):
* platform/wpe/RenderThemeWPE.h:

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

6 months ago[JSC] Structure::setMaxOffset and setTransitionOffset are racy
ysuzuki@apple.com [Wed, 5 Feb 2020 07:12:53 +0000 (07:12 +0000)]
[JSC] Structure::setMaxOffset and setTransitionOffset are racy
https://bugs.webkit.org/show_bug.cgi?id=207249

Reviewed by Mark Lam.

We hit crash in JSTests/stress/array-slice-osr-exit-2.js. The situation is following.

    1. The mutator thread (A) is working.
    2. The concurrent collector (B) is working.
    3. A attempts to set m_maxOffset in StructureRareData by allocating it. First, A sets Structure::m_maxOffset to useRareDataFlag.
    3. B is in JSObject::visitButterflyImpl, and executing Structure::maxOffset().
    4. B detects that m_maxOffset is useRareDataFlag.
    5. B attempts to load rareData, but this is not a StructureRareData since A is just now setting up StructureRareData.
    6. B crashes.

Set useRareDataFlag after StructureRareData is set. Ensuring this store-order by using storeStoreFence.

* runtime/Structure.h:

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

6 months ago[GTK] Garden some wpt tests failing with harness timeout
lmoura@igalia.com [Wed, 5 Feb 2020 04:48:35 +0000 (04:48 +0000)]
[GTK] Garden some wpt tests failing with harness timeout
https://bugs.webkit.org/show_bug.cgi?id=207247

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

6 months agoREGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com
wenson_hsieh@apple.com [Wed, 5 Feb 2020 04:32:18 +0000 (04:32 +0000)]
REGRESSION (r251320): Can't double tap to select word in Notes on iCloud.com
https://bugs.webkit.org/show_bug.cgi?id=207239
<rdar://problem/58686015>

Reviewed by Tim Horton.

Source/WebKit:

Following r251320, all synthetic mouse events on iOS additionally dispatched corresponding pointer events. This
led to duplicate "pointerdown"/"pointerup" events dispatched with every tap. r253878 fixed this by avoiding
pointer event dispatch for synthetically generated mouse events (and made this determination by consulting
`syntheticClickType()`).

However, in the case where we're synthesizing a mouse event for a "dblclick" event handler (after a double-
tap), we currently pass `NoTap` as the synthetic click event type when creating the mouse event. This causes
additional pointer events to be synthesized and dispatched during a double tap, which creates three pairs of
"pointerdown"/"pointerup" events upon double-tap. This subsequently confuses iCloud Notes' web app when double
tapping to select a word.

Fix this by passing in `OneFingerTap` as the synthetic click type instead (since two-finger double taps should
already be handled by the two-finger double-tap magnification gesture).

Test: pointerevents/ios/pointer-events-for-double-tap.html

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint):

LayoutTests:

Add a test to verify that performing a double tap on an element with a dblclick handler results in the following
sequence of events: `[ "pointerdown", "pointerup", "pointerdown", "pointerup", "dblclick" ]`.

* pointerevents/ios/pointer-events-for-double-tap-expected.txt: Added.
* pointerevents/ios/pointer-events-for-double-tap.html: Added.
* pointerevents/utils.js:
(const.ui.new.UIController.prototype.doubleTap):

Add a helper method to simulate a double-tap gesture.

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

6 months agoReplace RGBA32 typedef with a class to improve type safety
darin@apple.com [Wed, 5 Feb 2020 03:47:15 +0000 (03:47 +0000)]
Replace RGBA32 typedef with a class to improve type safety
https://bugs.webkit.org/show_bug.cgi?id=206862

Reviewed by Sam Weinig.

Source/WebCore:

* Headers.cmake: Remove RGBColor.h.
* Sources.txt: Remove RBGColor.cpp.
* WebCore.xcodeproj/project.pbxproj: Remove RGBColor.h and RGBColor.cpp.

* css/CSSPrimitiveValue.cpp: Removed include of RGBColor.h.
(WebCore::CSSPrimitiveValue::getCounterValue const): Deleted.
(WebCore::CSSPrimitiveValue::getRectValue const): Deleted.
(WebCore::CSSPrimitiveValue::getRGBColorValue const): Deleted.
* css/CSSPrimitiveValue.h: Updated for the above.

* css/DeprecatedCSSOMPrimitiveValue.cpp:
(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue const): Use
CSSPrimitiveValue::counterValue.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue const): Use
CSSPrimitiveValue::rectValue.
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue const): USe
CSSPrimitiveValue::isRGBColor and CSSPrimitiveValue::color.

* css/DeprecatedCSSOMRGBColor.h: Store a Color instead of an RGBA32.
Take a Color argument instead of a RGBColor argument. Refactored to
use a createWrapper template function member to tighten the code.

* css/RGBColor.cpp: Removed.
* css/RGBColor.h: Removed.

* css/StyleColor.cpp:
(WebCore::StyleColor::colorFromKeyword): Explicitly convert to SimpleColor
rather than relying on initializing a Color from an integer ARGB value.

* editing/cocoa/HTMLConverter.mm: Removed include of RGBColor.h.

* inspector/InspectorOverlay.cpp:
(WebCore::drawOutlinedQuadWithClip): Use the Color constructor instead of
Color::createUnchecked.

* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo): Use
explicit SimpleColor rather than relying on initializing a Color from an
integer ARGB value.

* platform/graphics/Color.cpp: Use constexpr for constant colors.
(WebCore::makeRGB): Implement by calling makeRGBA.
(WebCore::makeRGBA): Use an explicit argument list to call the
SimpleColor constructor.
(WebCore::makeRGBA32FromFloats): Implement by calling makeRGBA.
(WebCore::colorWithOverrideAlpha): Use an explicit argument list to call
the SimpleColor constructor.
(WebCore::parseHexColorInternal): Ditto.
(WebCore::Color::Color): Removed unneeded code to set the color
to invalid, since that's already the default for a new Color object.
Also tweak the logic a bit and add explicit argument list for the
SimpleColor constructor.
(WebCore::SimpleColor::serializationForHTML const): Added. Factored out of
the Color::serialized function.
(WebCore::Color::serialized const): Changed to call serializationForHTML.
(WebCore::fractionDigitsForFractionalAlphaValue): Renamed slightly shorter.
(WebCore::SimpleColor::serializationForCSS const): Added. Factored out of
the Color::cssText function.
(WebCore::Color::cssText const): Changed to call serializationForCSS.
(WebCore::RGBA32::serializationForRenderTreeAsText const): Added.
Factored out of nameForRenderTreeAsText.
(WebCore::Color::nameForRenderTreeAsText const): Changed to call
serializationForRenderTreeAsText.
(WebCore::colorFromPremultipliedARGB): Updated to use the SimpleColor
member functions instead of the red/green/blue/alphaChannel functions.
(WebCore::blend): Use Color::transparent for blending where the old
code used 0 and relied on how that is converted to a Color.

* platform/graphics/Color.h: Replaced the RGBA32 typedef and the
RGBA class with a new class named SimpleColor. Deleted the four
red/green/blue/alphaChannel functions, the Color constructor that
takes and RGBA, and the Color::createUnchecked function. Changed
the color constants to all be constexpr. Moved the inline function
definitions until after everything is delcared.

* platform/graphics/ImageBackingStore.h:
(WebCore::ImageBackingStore::setSize): Use uint32_t instead of RGBA32.
(WebCore::ImageBackingStore::clear): Ditto.
(WebCore::ImageBackingStore::clearRect): Ditto.
(WebCore::ImageBackingStore::fillRect): Ditto.
(WebCore::ImageBackingStore::repeatFirstRow): Ditto.
(WebCore::ImageBackingStore::pixelAt const): Ditto.
(WebCore::ImageBackingStore::setPixel): Ditto.
(WebCore::ImageBackingStore::blendPixel): Ditto. Convert to and from
SimpleColor so we can use various functions that operate on that type.
Use the isVisible and red/green/blue/alphaComponent member functions.
(WebCore::ImageBackingStore::ImageBackingStore): Ditto.
(WebCore::ImageBackingStore::pixelValue const): Use Color::transparent
instead of returning a 0 and relying on how that is converted to a Color.

* platform/graphics/ImageFrame.h: Removed include of ImageBackingStore.h.
* platform/graphics/ImageSource.h: Added forward delaration of SharedBuffer.

* platform/graphics/cairo/ImageBufferCairo.cpp:
(WebCore::ImageBuffer::platformTransformColorSpace): Call value() to
convert RGBA32, which is now a class, to an 32-bit ARGB integer.

* platform/graphics/cg/ColorCG.cpp:
(WebCore::cachedCGColor): Use constexpr SimpleColor::value function to
switch on a SimpleColor.

* platform/graphics/mac/ColorMac.mm:
(WebCore::oldAquaFocusRingColor): Use an explicit SimpleColor to turn a
hex integer into a Color without relying on implicit conversion.

* platform/graphics/win/ColorDirect2D.cpp:
(WebCore::Color::operator D2D1_COLOR_F const): Use value() to get the color
integer, just to keep this working. Probably needs a better implementation
at some point.

* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::rowAvailable): Don't use makeRGB any more,
write the expression out here instead. More efficient anyway since these
are already single bytes.

* platform/mock/MockRealtimeMediaSourceCenter.cpp:
(WebCore::defaultDevices):  Use an explicit SimpleColor to turn a
hex integer into a Color without relying on implicit conversion.
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawBoxes): Ditto. Also use a modern
for loop instead of indexing.
* platform/mock/ScrollbarThemeMock.cpp:
(WebCore::ScrollbarThemeMock::paintTrackBackground): Ditto.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::calculateBorderStyleColor): Ditto.
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::systemColor const): Ditto. Also used named colors.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const): Ditto.

* rendering/RenderTreeAsText.cpp:
(WebCore::RenderTreeAsText::writeRenderObject): Added checks against
Color::transparent instead of converting to an integer and checking
against 0. Removed unneeded isValid checks, since invalid color's ARGB
value is Color::transparent.

Source/WebKit:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Color>::encode): Use uint32_t explicitly to convert
the color value into a SimpleColor.
(IPC::ArgumentCoder<Color>::decode): Same thing, only the other direction.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
(TestWebKitAPI::TEST): Use the Color constructor instead of Color::createUnchecked.

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

6 months agoRemove NSKeyedArchiverSPI.h now that WebKit only uses API
darin@apple.com [Wed, 5 Feb 2020 03:45:12 +0000 (03:45 +0000)]
Remove NSKeyedArchiverSPI.h now that WebKit only uses API
https://bugs.webkit.org/show_bug.cgi?id=207203

Reviewed by Anders Carlsson.

Source/WebCore:

* editing/cocoa/EditorCocoa.mm:
(WebCore::archivedDataForAttributedString): Removed NSKeyedArchiverSPI.h header and use
NSKeyedArchiver methods directly instead of through WebKit functions.
* loader/archive/cf/LegacyWebArchiveMac.mm:
(WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Ditto.
(WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write): Ditto.
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): Ditto. Also added
a missing type check when unarchiving a dictionary.
(WebCore::createItemProviderRegistrationList): Ditto. Also added a missing null check.
* testing/cocoa/WebArchiveDumpSupport.mm:
(WebCoreTestSupport::createCFURLResponseFromResponseData): Ditto.

Source/WebCore/PAL:

* PAL.xcodeproj/project.pbxproj: Remove NSKeyedArchiverSPI.h.
* pal/PlatformMac.cmake: Ditto.
* pal/spi/cocoa/NSKeyedArchiverSPI.h: Removed.

Source/WebKit:

* Platform/ios/AccessibilityIOS.mm:
(WebKit::newAccessibilityRemoteToken): Removed include of NSKeyedArchiverSPI.h;
use NSKeyedArchiver methods directly.
* Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::encodeSecureCodingInternal): Ditto.
(IPC::decodeSecureCodingInternal): Ditto.

* Shared/Cocoa/DataDetectionResult.mm: Removed include of NSKeyedArchiverSPI.h.
* Shared/Cocoa/WebCoreArgumentCodersCocoa.mm: Ditto.
* Shared/ios/InteractionInformationAtPosition.mm: Ditto.

* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<WebCore::ContentFilterUnblockHandler>::encode): Removed
include of NSKeyedArchiverSPI.h; use NSKeyedArchiver methods directly.
(IPC::ArgumentCoder<WebCore::ContentFilterUnblockHandler>::decode): Ditto.

* Shared/mac/WebHitTestResultData.mm: Removed include of NSKeyedArchiverSPI.h.

* UIProcess/API/Cocoa/APIAttachmentCocoa.mm:
(API::Attachment::createSerializedRepresentation const): Removed
include of NSKeyedArchiverSPI.h; use NSKeyedArchiver methods directly. Also
refactored so the !CAN_SECURELY_ARCHIVE_FILE_WRAPPER path shares more code
with the modern code path. I think we can remove it entirely once we bump
the minimum version of macOS a bit more.
(API::Attachment::updateFromSerializedRepresentation): Ditto.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]): Ditto.
(-[WKProcessPool _setObjectsForBundleParametersWithDictionary:]): Ditto.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithCoder:]): Ditto.
(-[WKWebView _setInputDelegate:]): Ditto.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration initWithCoder:]): Ditto.
* UIProcess/API/Cocoa/_WKApplicationManifest.mm:
(-[_WKApplicationManifest initWithCoder:]): Ditto.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::elementDidFocus): Ditto.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: Removed include of NSKeyedArchiverSPI.h
(WebKit::createUnarchiver): Added helper function to make the code below less repetitive.
(WebKit::InjectedBundle::initialize): Use the createUnarchiver function above and the
NSKeyedArchiver methods directly.
(WebKit::InjectedBundle::classesForCoder): Ditto.
(WebKit::InjectedBundle::setBundleParameter): Ditto.
(WebKit::InjectedBundle::setBundleParameters): Ditto.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: Removed
include of NSKeyedArchiverSPI.h and call methods of NSKeyedArchiver directly.
* TestWebKitAPI/Tests/WebKitCocoa/Coding.mm: Ditto.
* TestWebKitAPI/Tests/ios/WKWebViewOpaque.mm: Ditto.
* TestWebKitAPI/Tests/mac/EarlyKVOCrash.mm: Ditto.

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

6 months agoREGRESSION [ Mac wk2 ] Tests are jetsamming: Unable to shrink memory footprint of...
ryanhaddad@apple.com [Wed, 5 Feb 2020 02:04:09 +0000 (02:04 +0000)]
REGRESSION [ Mac wk2 ] Tests are jetsamming: Unable to shrink memory footprint of process below the kill thresold [sic]
https://bugs.webkit.org/show_bug.cgi?id=206627

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations: Disable websql tests.
* platform/mac-wk2/TestExpectations: Ditto.

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

6 months agoUpdate ANGLE
dino@apple.com [Wed, 5 Feb 2020 02:02:46 +0000 (02:02 +0000)]
Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=206318

Several important changes to fix layout test failures and timeouts in this update.
- Made expensive validation non-default in debug mode to reduce timeouts.
- Optimize disabling ARB_texture_rectangle to make shader compilation much faster.
- Flush before texture deletion to work around Mac Intel driver bug.

Patch by James Darpinian <jdarpinian@chromium.org> on 2020-02-04
Reviewed by Dean Jackson.

* ANGLE.plist: update commit hash
* ANGLE.xcodeproj/project.pbxproj: Add/remove files
* Compiler.cmake: Translated from compiler.gni
* GLESv2.cmake: Translated from libGLESv2.gni
* changes.diff: Now lists all changes from upstream.
* update-angle.sh: Diff command was wrong.
* Plus a whole lot of changes from upstream.

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

6 months agoresults.webkit.org: Support Internal in run-javascriptcore-tests
jbedard@apple.com [Wed, 5 Feb 2020 01:47:51 +0000 (01:47 +0000)]
results.webkit.org: Support Internal in run-javascriptcore-tests
https://bugs.webkit.org/show_bug.cgi?id=204095

Rubber-stamped by Aakash Jain.

* Scripts/VCSUtils.pm:
(gitBisectStartBranchForDirectory): Renamed from gitBisectStartBranch.
(gitBranchForDirectory): Compute branch for directory.
(gitBranch): Compute branch for the current git directory.
(commitForDirectory): Add git support.
(gitBisectStartBranch): Renamed to gitBisectStartBranchForDirectory.
* Scripts/run-javascriptcore-tests:
(uploadResults): Check for Internal repository.

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

6 months agoREGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap
commit-queue@webkit.org [Wed, 5 Feb 2020 01:46:59 +0000 (01:46 +0000)]
REGRESSION: (r255611) [ Mac ] 3 lldb tests failing related to HashMap
https://bugs.webkit.org/show_bug.cgi?id=207204

Patch by Alex Christensen <achristensen@webkit.org> on 2020-02-04
Reviewed by Simon Fraser.

Remove support for HashSet and HashMap until we are able to do the equivalent of reinterpret_cast<unsigned*>(pointer)[-1]
in LLDB's python API.

* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):

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

6 months agoFix internal build after r255709
achristensen@apple.com [Wed, 5 Feb 2020 01:30:56 +0000 (01:30 +0000)]
Fix internal build after r255709
https://bugs.webkit.org/show_bug.cgi?id=207231

* platform/ios/WebItemProviderPasteboard.h:
Revert part of the original change.

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

6 months ago[EWS] Stop GTK/WPE build if jhbuild fails.
lmoura@igalia.com [Wed, 5 Feb 2020 01:13:31 +0000 (01:13 +0000)]
[EWS] Stop GTK/WPE build if jhbuild fails.
https://bugs.webkit.org/show_bug.cgi?id=207220

Reviewed by Adrian Perez de Castro.

* BuildSlaveSupport/ews-build/steps.py:
(InstallGtkDependencies): Halt on failure
(InstallWpeDependencies): Ditto

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

6 months agoREGRESSION: [ macOS wk1 ] ASSERTION FAILED: http/tests/notifications/event-listener...
ryanhaddad@apple.com [Wed, 5 Feb 2020 00:39:41 +0000 (00:39 +0000)]
REGRESSION: [ macOS wk1 ] ASSERTION FAILED: http/tests/notifications/event-listener-crash.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=207237

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

* platform/mac-wk1/TestExpectations:

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

6 months agoNon-unified build fixes early February 2020 edition
aperez@igalia.com [Wed, 5 Feb 2020 00:09:42 +0000 (00:09 +0000)]
Non-unified build fixes early February 2020 edition
https://bugs.webkit.org/show_bug.cgi?id=207227

Reviewed by Don Olmstead.

Source/JavaScriptCore:

* bytecode/PolyProtoAccessChain.h: Add missing inclusions of StructureIDTable.h and VM.h

Source/WebCore:

No new tests needed.

* accessibility/atk/AccessibilityObjectAtk.cpp: Add missing inclusion of WebKitAccessible.h
* inspector/agents/InspectorAnimationAgent.cpp: Add issing inclusions of JSExecState.h and
JavaScriptCore/InjectedScriptManager.h
* style/MatchedDeclarationsCache.cpp: Add missing inclusion of FontCascade.h

Source/WTF:

* wtf/SingleRootGraph.h: Add missing inclusion of wtf/StringPrintStream.h

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

6 months agomacCatalyst: Shouldn't get text cursor on checkboxes
timothy_horton@apple.com [Tue, 4 Feb 2020 23:43:42 +0000 (23:43 +0000)]
macCatalyst: Shouldn't get text cursor on checkboxes
https://bugs.webkit.org/show_bug.cgi?id=207234
<rdar://problem/59155917>

Reviewed by Wenson Hsieh.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::canForceCaretForPosition):
(WebKit::populateCaretContext):
(WebKit::lineCaretExtent): Deleted.
The I-beam forcing code was a bit too aggressive; it should consider
the style of the node that it ends up finding after searching, not just
assume it wants an I-beam because it's "texty".

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

6 months agoFix Mac CMake build
achristensen@apple.com [Tue, 4 Feb 2020 23:36:21 +0000 (23:36 +0000)]
Fix Mac CMake build
https://bugs.webkit.org/show_bug.cgi?id=207231

Source/JavaScriptCore:

* PlatformMac.cmake:

Source/WebCore:

* PlatformMac.cmake:
* platform/ios/WebItemProviderPasteboard.h:

Source/WebCore/PAL:

* pal/PlatformMac.cmake:

Source/WebKit:

* PlatformMac.cmake:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::updateVisibleContentRects):

Tools:

* DumpRenderTree/PlatformMac.cmake:
* MiniBrowser/mac/CMakeLists.txt:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController awakeFromNib]):
* WebKitTestRunner/PlatformMac.cmake:

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

6 months ago[PlayStation] Enable TestWebKit
don.olmstead@sony.com [Tue, 4 Feb 2020 23:33:27 +0000 (23:33 +0000)]
[PlayStation] Enable TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=207211

Reviewed by Ross Kirsling.

.:

Turn back on API tests.

* Source/cmake/OptionsPlayStation.cmake:

Tools:

Stub out PlayStation implementation of TestWebKit so it builds.

* TestWebKitAPI/PlatformPlayStation.cmake:
* TestWebKitAPI/PlatformWebView.h: Simplify platform define
* TestWebKitAPI/playstation/PlatformUtilitiesPlayStation.cpp: Added.
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::isKeyDown):
* TestWebKitAPI/playstation/PlatformWebViewPlayStation.cpp: Added.
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::initialize):
(TestWebKitAPI::PlatformWebView::page const):
(TestWebKitAPI::PlatformWebView::resizeTo):
(TestWebKitAPI::PlatformWebView::focus):
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
(TestWebKitAPI::PlatformWebView::simulateRightClick):

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

6 months ago[ macOS ] legacy-animation-engine/fast/animation/request-animation-frame-iframe.html...
tsavell@apple.com [Tue, 4 Feb 2020 23:25:35 +0000 (23:25 +0000)]
[ macOS ] legacy-animation-engine/fast/animation/request-animation-frame-iframe.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207235

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

* platform/mac/TestExpectations:

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

6 months agoPartial revert of r248734 to fix leak of StorageAreaMaps
cdumez@apple.com [Tue, 4 Feb 2020 23:22:41 +0000 (23:22 +0000)]
Partial revert of r248734 to fix leak of StorageAreaMaps
https://bugs.webkit.org/show_bug.cgi?id=207073

Reviewed by Alex Christensen.

Do a partial revert of r248734 so that the StorageNamespaceImpl no longer holds a strong
reference to its StorageAreaMap objects. The code for removing entries from
StorageNamespaceImpl::m_storageAreaMaps (StorageNamespaceImpl::didDestroyStorageAreaMap())
was dead code after r248734 and thus StorageAreaMap were never destroyed.

* WebProcess/WebStorage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::create):
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::length):
(WebKit::StorageAreaImpl::key):
(WebKit::StorageAreaImpl::item):
(WebKit::StorageAreaImpl::setItem):
(WebKit::StorageAreaImpl::removeItem):
(WebKit::StorageAreaImpl::clear):
(WebKit::StorageAreaImpl::contains):
(WebKit::StorageAreaImpl::storageType const):
* WebProcess/WebStorage/StorageAreaImpl.h:
* WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::create):
(WebKit::StorageAreaMap::~StorageAreaMap):
* WebProcess/WebStorage/StorageAreaMap.h:
* WebProcess/WebStorage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::storageArea):
* WebProcess/WebStorage/StorageNamespaceImpl.h:

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

6 months agoUnreviewed, follow-up assertion fix after r255662.
cdumez@apple.com [Tue, 4 Feb 2020 23:09:36 +0000 (23:09 +0000)]
Unreviewed, follow-up assertion fix after r255662.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):

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

6 months ago[ macOS iOS ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch...
tsavell@apple.com [Tue, 4 Feb 2020 23:02:44 +0000 (23:02 +0000)]
[ macOS iOS ] imported/w3c/web-platform-tests/fetch/stale-while-revalidate/fetch.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207230

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

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

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

6 months ago[JSC] Use PackedRefPtr in UnlinkedCodeBlock
ysuzuki@apple.com [Tue, 4 Feb 2020 22:54:16 +0000 (22:54 +0000)]
[JSC] Use PackedRefPtr in UnlinkedCodeBlock
https://bugs.webkit.org/show_bug.cgi?id=207229

Reviewed by Mark Lam.

Use PackedRefPtr in UnlinkedCodeBlock to compact it from 168 to 160, which saves 16 bytes (10%) per UnlinkedCodeBlock since
we have 16 bytes alignment for GC cells.

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::sourceURLDirective const):
(JSC::UnlinkedCodeBlock::sourceMappingURLDirective const):
(JSC::UnlinkedCodeBlock::setSourceURLDirective):
(JSC::UnlinkedCodeBlock::setSourceMappingURLDirective):
* runtime/CachedTypes.cpp:
(JSC::CachedCodeBlock::sourceURLDirective const):
(JSC::CachedCodeBlock::sourceMappingURLDirective const):
(JSC::CachedCodeBlock<CodeBlockType>::encode):
* runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

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

6 months ago[ macOS ] http/tests/misc/image-blocked-src-change.html is flaky failing
tsavell@apple.com [Tue, 4 Feb 2020 22:49:42 +0000 (22:49 +0000)]
[ macOS ] http/tests/misc/image-blocked-src-change.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207226

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

* platform/mac/TestExpectations:

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

6 months agoresults.webkit.org: Support branches in run-javascriptcore-tests
jbedard@apple.com [Tue, 4 Feb 2020 22:17:43 +0000 (22:17 +0000)]
results.webkit.org: Support branches in run-javascriptcore-tests
https://bugs.webkit.org/show_bug.cgi?id=204094

Rubber-stamped by Aakash Jain.

* Scripts/run-javascriptcore-tests:
(uploadResults): Use webkitdirs function to generate commit information.
* Scripts/VCSUtils.pm:
(commitForDirectory): Generate commit information for SVN repository, including
branch name.

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

6 months agoReplace bot677 due to hardware failure
jlewis3@apple.com [Tue, 4 Feb 2020 22:14:03 +0000 (22:14 +0000)]
Replace bot677 due to hardware failure
https://bugs.webkit.org/show_bug.cgi?id=207224

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

6 months ago[ macOS iOS ] imported/w3c/web-platform-tests/service-workers/service-worker/extendab...
ryanhaddad@apple.com [Tue, 4 Feb 2020 22:12:53 +0000 (22:12 +0000)]
[ macOS iOS ] imported/w3c/web-platform-tests/service-workers/service-worker/extendable-event-waituntil.https.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207225

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

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

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

6 months agoTestWebKitAPI: Handle case where test result does not contain path
jbedard@apple.com [Tue, 4 Feb 2020 22:05:35 +0000 (22:05 +0000)]
TestWebKitAPI: Handle case where test result does not contain path
https://bugs.webkit.org/show_bug.cgi?id=207216

Reviewed by Tim Horton.

* TestWebKitAPI/TestsController.cpp:
(TestWebKitAPI::Printer::OnTestPartResult): It's possible that the TestPartResult
will not contain a file name. We should handle this case.

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

6 months agoresults.webkit.org: Better order upload callbacks
jbedard@apple.com [Tue, 4 Feb 2020 22:02:08 +0000 (22:02 +0000)]
results.webkit.org: Better order upload callbacks
https://bugs.webkit.org/show_bug.cgi?id=207219

Reviewed by Aakash Jain.

Order upload callbacks more deliberately so that the quickest callbacks
that are least likely to link to information from unfinished callbacks are
executed first.

* resultsdbpy/resultsdbpy/model/model.py:
(Model.__init__): Generate buildbot links first, then generate a failure
list, then generate the collective suite results and finally, individual
test results.

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

6 months agoTighten up stylesheet loading
commit-queue@webkit.org [Tue, 4 Feb 2020 21:42:07 +0000 (21:42 +0000)]
Tighten up stylesheet loading
https://bugs.webkit.org/show_bug.cgi?id=189913

Patch by Rob Buis <rbuis@igalia.com> on 2020-02-04
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Update improved test results.

* web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.https-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-limited-quirks-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-quirks-expected.txt:

Source/WebCore:

Content-Type metadata for link stylesheet is determined using MIME
sniffing[1]. This can result in no Content-Type metadata.
If there is no Content-Type metadata, but the external resource link
type has a default type defined, then the user agent must assume that
the resource is of that type [2]. For link stylesheet the default is
text/css. This means invalid MIME type will default to text/css and
load and valid MIME types other than text/css will result in load error.

[1] https://mimesniff.spec.whatwg.org/
[2] https://html.spec.whatwg.org/multipage/semantics.html#fetch-and-process-the-linked-resource

Tests: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.html
       imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-load-error-events.https.html
       imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-01.html
       imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-limited-quirks.html
       imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/link-style-error-quirks.html

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* css/StyleSheetContents.h:
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::canUseSheet const):

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

6 months ago[ macOS wk2 ] webgpu/whlsl/zero-initialize-values-2.html is a flaky failure
ryanhaddad@apple.com [Tue, 4 Feb 2020 21:39:46 +0000 (21:39 +0000)]
[ macOS wk2 ] webgpu/whlsl/zero-initialize-values-2.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=207222

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months ago[macCatalyst] Missing custom cursors in subframes that are offset from the origin...
wenson_hsieh@apple.com [Tue, 4 Feb 2020 21:35:36 +0000 (21:35 +0000)]
[macCatalyst] Missing custom cursors in subframes that are offset from the origin of the root view
https://bugs.webkit.org/show_bug.cgi?id=207215
<rdar://problem/59157625>

Reviewed by Tim Horton.

<https://trac.webkit.org/r255046> added support for custom cursor styles when hovering over subframes. However,
we currently try to hit-test content in the subframe using the interaction information request's point, which is
in root view coordinates; as such, we only get the correct custom cursor styles when hovering over elements in a
subframe, if the subframe is also at the origin of the root view.

To fix this, simply convert from root view coordinates to frame coordinates when performing the hit-test.
Unfortunately, this change is currently untestable; see <rdar://problem/59158410>.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::lineCaretExtent):

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

6 months agoRegression: (252273) [ Mac wk2 ] inspector/heap/getPreview.html is flaky failing.
tsavell@apple.com [Tue, 4 Feb 2020 20:01:42 +0000 (20:01 +0000)]
Regression: (252273) [ Mac wk2 ] inspector/heap/getPreview.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207209

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months agoQuantifiers after lookahead assertions should be syntax errors in Unicode patterns...
shvaikalesh@gmail.com [Tue, 4 Feb 2020 19:45:21 +0000 (19:45 +0000)]
Quantifiers after lookahead assertions should be syntax errors in Unicode patterns only
https://bugs.webkit.org/show_bug.cgi?id=206988

Reviewed by Darin Adler and Ross Kirsling.

JSTests:

* test262/expectations.yaml: Mark 10 test cases as passing.

Source/JavaScriptCore:

This change adds SyntaxError for quantifiable assertions in Unicode patterns,
aligning JSC with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-annexB-Term
(/u flag precludes the use of QuantifiableAssertion)

Return value of parseParenthesesEnd() now matches with parseEscape() and
parseAtomEscape().

* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseParenthesesBegin):
(JSC::Yarr::Parser::parseParenthesesEnd):
(JSC::Yarr::Parser::parseTokens):

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

6 months agoFixed Deprecated API
megan_gardner@apple.com [Tue, 4 Feb 2020 19:06:25 +0000 (19:06 +0000)]
Fixed Deprecated API
https://bugs.webkit.org/show_bug.cgi?id=207179

Reviewed by Tim Horton.

Fixing deprecated API for MacCatalyst.

No new tests - build fix.

* Shared/UserInterfaceIdiom.mm:
(WebKit::userInterfaceIdiomIsPad):

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

6 months ago[JSC] Introduce UnlinkedCodeBlockGenerator and reduce sizeof(UnlinkedCodeBlock)
ysuzuki@apple.com [Tue, 4 Feb 2020 19:05:17 +0000 (19:05 +0000)]
[JSC] Introduce UnlinkedCodeBlockGenerator and reduce sizeof(UnlinkedCodeBlock)
https://bugs.webkit.org/show_bug.cgi?id=207087

Reviewed by Tadeu Zagallo.

Source/JavaScriptCore:

While UnlinkedCodeBlock is immutable once it is created from BytecodeGenerator, it has many mutable Vectors.
This is because we are using UnlinkedCodeBlock as a builder of UnlinkedCodeBlock itself too in BytecodeGenerator.
Since Vector takes 16 bytes to allow efficient expansions, it is nice if we can use RefCountedArray instead when
we know this Vector is immutable.

In this patch, we introduce UnlinkedCodeBlockGenerator wrapper. BytecodeGenerator, BytecodeRewriter, BytecodeDumper,
and BytecodeGeneratorification interact with UnlinkedCodeBlockGenerator instead of UnlinkedCodeBlock. And UnlinkedCodeBlockGenerator
will generate the finalized UnlinkedCodeBlock. This design allows us to use RefCountedArray for data in UnlinkedCodeBlock,
which is (1) smaller and (2) doing shrinkToFit operation when creating it from Vector.

This patch reduces sizeof(UnlinkedCodeBlock) from 256 to 168, 88 bytes reduction.

* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* bytecode/BytecodeBasicBlock.cpp:
(JSC::BytecodeBasicBlock::compute):
* bytecode/BytecodeBasicBlock.h:
* bytecode/BytecodeDumper.cpp:
* bytecode/BytecodeGeneratorification.cpp:
(JSC::BytecodeGeneratorification::BytecodeGeneratorification):
(JSC::GeneratorLivenessAnalysis::run):
(JSC::BytecodeGeneratorification::run):
(JSC::performGeneratorification):
* bytecode/BytecodeGeneratorification.h:
* bytecode/BytecodeRewriter.h:
(JSC::BytecodeRewriter::BytecodeRewriter):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantIdentifierSetRegisters):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::handlerForIndex):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::numberOfSwitchJumpTables const):
(JSC::CodeBlock::numberOfStringSwitchJumpTables const):
(JSC::CodeBlock::addSwitchJumpTable): Deleted.
(JSC::CodeBlock::addStringSwitchJumpTable): Deleted.
* bytecode/HandlerInfo.h:
(JSC::HandlerInfoBase::handlerForIndex):
* bytecode/JumpTable.h:
(JSC::SimpleJumpTable::add): Deleted.
* bytecode/PreciseJumpTargets.cpp:
(JSC::computePreciseJumpTargets):
(JSC::recomputePreciseJumpTargets):
(JSC::findJumpTargetsForInstruction):
* bytecode/PreciseJumpTargets.h:
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
(JSC::UnlinkedCodeBlock::visitChildren):
(JSC::UnlinkedCodeBlock::dumpExpressionRangeInfo):
(JSC::UnlinkedCodeBlock::expressionRangeForBytecodeIndex const):
(JSC::UnlinkedCodeBlock::handlerForIndex):
(JSC::UnlinkedCodeBlock::addExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::addTypeProfilerExpressionInfo): Deleted.
(JSC::UnlinkedCodeBlock::setInstructions): Deleted.
(JSC::UnlinkedCodeBlock::applyModification): Deleted.
(JSC::UnlinkedCodeBlock::shrinkToFit): Deleted.
(JSC::UnlinkedCodeBlock::addOutOfLineJumpTarget): Deleted.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::expressionInfo):
(JSC::UnlinkedCodeBlock::setNumParameters):
(JSC::UnlinkedCodeBlock::numberOfIdentifiers const):
(JSC::UnlinkedCodeBlock::identifiers const):
(JSC::UnlinkedCodeBlock::bitVector):
(JSC::UnlinkedCodeBlock::constantRegisters):
(JSC::UnlinkedCodeBlock::constantsSourceCodeRepresentation):
(JSC::UnlinkedCodeBlock::constantIdentifierSets):
(JSC::UnlinkedCodeBlock::numberOfJumpTargets const):
(JSC::UnlinkedCodeBlock::numberOfSwitchJumpTables const):
(JSC::UnlinkedCodeBlock::numberOfStringSwitchJumpTables const):
(JSC::UnlinkedCodeBlock::numberOfFunctionDecls):
(JSC::UnlinkedCodeBlock::numberOfExceptionHandlers const):
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets const):
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary):
(JSC::UnlinkedCodeBlock::addParameter): Deleted.
(JSC::UnlinkedCodeBlock::addIdentifier): Deleted.
(JSC::UnlinkedCodeBlock::addBitVector): Deleted.
(JSC::UnlinkedCodeBlock::addSetConstant): Deleted.
(JSC::UnlinkedCodeBlock::addConstant): Deleted.
(JSC::UnlinkedCodeBlock::addJumpTarget): Deleted.
(JSC::UnlinkedCodeBlock::addSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addStringSwitchJumpTable): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionDecl): Deleted.
(JSC::UnlinkedCodeBlock::addFunctionExpr): Deleted.
(JSC::UnlinkedCodeBlock::addExceptionHandler): Deleted.
(JSC::UnlinkedCodeBlock::addOpProfileControlFlowBytecodeOffset): Deleted.
(JSC::UnlinkedCodeBlock::replaceOutOfLineJumpTargets): Deleted.
* bytecode/UnlinkedCodeBlockGenerator.cpp: Added.
(JSC::UnlinkedCodeBlockGenerator::getLineAndColumn const):
(JSC::UnlinkedCodeBlockGenerator::addExpressionInfo):
(JSC::UnlinkedCodeBlockGenerator::addTypeProfilerExpressionInfo):
(JSC::UnlinkedCodeBlockGenerator::finalize):
(JSC::UnlinkedCodeBlockGenerator::handlerForBytecodeIndex):
(JSC::UnlinkedCodeBlockGenerator::handlerForIndex):
(JSC::UnlinkedCodeBlockGenerator::applyModification):
(JSC::UnlinkedCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):
(JSC::UnlinkedCodeBlockGenerator::dump const):
* bytecode/UnlinkedCodeBlockGenerator.h: Added.
(JSC::UnlinkedCodeBlockGenerator::UnlinkedCodeBlockGenerator):
(JSC::UnlinkedCodeBlockGenerator::vm):
(JSC::UnlinkedCodeBlockGenerator::isConstructor const):
(JSC::UnlinkedCodeBlockGenerator::constructorKind const):
(JSC::UnlinkedCodeBlockGenerator::superBinding const):
(JSC::UnlinkedCodeBlockGenerator::scriptMode const):
(JSC::UnlinkedCodeBlockGenerator::needsClassFieldInitializer const):
(JSC::UnlinkedCodeBlockGenerator::isStrictMode const):
(JSC::UnlinkedCodeBlockGenerator::usesEval const):
(JSC::UnlinkedCodeBlockGenerator::parseMode const):
(JSC::UnlinkedCodeBlockGenerator::isArrowFunction):
(JSC::UnlinkedCodeBlockGenerator::derivedContextType const):
(JSC::UnlinkedCodeBlockGenerator::evalContextType const):
(JSC::UnlinkedCodeBlockGenerator::isArrowFunctionContext const):
(JSC::UnlinkedCodeBlockGenerator::isClassContext const):
(JSC::UnlinkedCodeBlockGenerator::numCalleeLocals const):
(JSC::UnlinkedCodeBlockGenerator::numVars const):
(JSC::UnlinkedCodeBlockGenerator::numParameters const):
(JSC::UnlinkedCodeBlockGenerator::thisRegister const):
(JSC::UnlinkedCodeBlockGenerator::scopeRegister const):
(JSC::UnlinkedCodeBlockGenerator::wasCompiledWithDebuggingOpcodes const):
(JSC::UnlinkedCodeBlockGenerator::hasCheckpoints const):
(JSC::UnlinkedCodeBlockGenerator::hasTailCalls const):
(JSC::UnlinkedCodeBlockGenerator::setHasCheckpoints):
(JSC::UnlinkedCodeBlockGenerator::setHasTailCalls):
(JSC::UnlinkedCodeBlockGenerator::setNumCalleeLocals):
(JSC::UnlinkedCodeBlockGenerator::setNumVars):
(JSC::UnlinkedCodeBlockGenerator::setThisRegister):
(JSC::UnlinkedCodeBlockGenerator::setScopeRegister):
(JSC::UnlinkedCodeBlockGenerator::setNumParameters):
(JSC::UnlinkedCodeBlockGenerator::metadata):
(JSC::UnlinkedCodeBlockGenerator::addOpProfileControlFlowBytecodeOffset):
(JSC::UnlinkedCodeBlockGenerator::numberOfJumpTargets const):
(JSC::UnlinkedCodeBlockGenerator::addJumpTarget):
(JSC::UnlinkedCodeBlockGenerator::jumpTarget const):
(JSC::UnlinkedCodeBlockGenerator::lastJumpTarget const):
(JSC::UnlinkedCodeBlockGenerator::numberOfSwitchJumpTables const):
(JSC::UnlinkedCodeBlockGenerator::addSwitchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::switchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::numberOfStringSwitchJumpTables const):
(JSC::UnlinkedCodeBlockGenerator::addStringSwitchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::stringSwitchJumpTable):
(JSC::UnlinkedCodeBlockGenerator::numberOfExceptionHandlers const):
(JSC::UnlinkedCodeBlockGenerator::exceptionHandler):
(JSC::UnlinkedCodeBlockGenerator::addExceptionHandler):
(JSC::UnlinkedCodeBlockGenerator::bitVector):
(JSC::UnlinkedCodeBlockGenerator::addBitVector):
(JSC::UnlinkedCodeBlockGenerator::numberOfConstantIdentifierSets const):
(JSC::UnlinkedCodeBlockGenerator::constantIdentifierSets):
(JSC::UnlinkedCodeBlockGenerator::addSetConstant):
(JSC::UnlinkedCodeBlockGenerator::constantRegister const):
(JSC::UnlinkedCodeBlockGenerator::constantRegisters):
(JSC::UnlinkedCodeBlockGenerator::getConstant const):
(JSC::UnlinkedCodeBlockGenerator::constantsSourceCodeRepresentation):
(JSC::UnlinkedCodeBlockGenerator::addConstant):
(JSC::UnlinkedCodeBlockGenerator::addFunctionDecl):
(JSC::UnlinkedCodeBlockGenerator::addFunctionExpr):
(JSC::UnlinkedCodeBlockGenerator::numberOfIdentifiers const):
(JSC::UnlinkedCodeBlockGenerator::identifier const):
(JSC::UnlinkedCodeBlockGenerator::addIdentifier):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):
(JSC::UnlinkedCodeBlockGenerator::replaceOutOfLineJumpTargets):
(JSC::UnlinkedCodeBlockGenerator::metadataSizeInBytes):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeNextParameter):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::prepareJumpTableForSwitch):
(JSC::ForInContext::finalize):
(JSC::StructureForInContext::finalize):
(JSC::IndexedForInContext::finalize):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/BytecodeGeneratorBaseInlines.h:
(JSC::BytecodeGeneratorBase<Traits>::newRegister):
(JSC::BytecodeGeneratorBase<Traits>::addVar):
* runtime/CachedTypes.cpp:
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
* wasm/WasmFunctionCodeBlock.h:
(JSC::Wasm::FunctionCodeBlock::setNumVars):
(JSC::Wasm::FunctionCodeBlock::setNumCalleeLocals):

Source/WTF:

Add more useful methods for RefCountedArray.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::operator=):
(WTF::RefCountedArray::isEmpty const):
(WTF::RefCountedArray::front):
(WTF::RefCountedArray::front const):
(WTF::RefCountedArray::last):
(WTF::RefCountedArray::last const):

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

6 months ago[EWS] Do not remove TestWebKitAPI prefix from api test failures
aakash_jain@apple.com [Tue, 4 Feb 2020 19:01:40 +0000 (19:01 +0000)]
[EWS] Do not remove TestWebKitAPI prefix from api test failures
https://bugs.webkit.org/show_bug.cgi?id=207210

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(AnalyzeAPITestsResults.analyzeResults):

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

6 months ago[PlayStation] Add WebKit API files
don.olmstead@sony.com [Tue, 4 Feb 2020 18:43:38 +0000 (18:43 +0000)]
[PlayStation] Add WebKit API files
https://bugs.webkit.org/show_bug.cgi?id=207168

Reviewed by Darin Adler.

Add PlayStation WebKit API files and expose them in the root header. Fix up the
build to copy them over. Also make sure that the playstation directory is listed
as a platform in the forwarding headers script.

* PlatformPlayStation.cmake:
* Scripts/generate-forwarding-headers.pl:
* Shared/API/c/WKBase.h:
* Shared/API/c/playstation/WKBasePlayStation.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/playstation/WKAPICastPlayStation.h: Added.
* UIProcess/API/C/playstation/WKView.h: Added.

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

6 months ago[EWS] Do not remove webkitpy prefix from test failures
aakash_jain@apple.com [Tue, 4 Feb 2020 18:21:34 +0000 (18:21 +0000)]
[EWS] Do not remove webkitpy prefix from test failures
https://bugs.webkit.org/show_bug.cgi?id=207206

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(WebKitPyTest.getResultSummary): Do not remove 'webkitpy' from test name. Also handled the
case when json output doesn't have failures/errors key.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.

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

6 months ago[ macOS wk2 ] inspector/canvas/shaderProgram-add-remove-webgl2.html is flaky crashing
tsavell@apple.com [Tue, 4 Feb 2020 17:47:26 +0000 (17:47 +0000)]
[ macOS wk2 ] inspector/canvas/shaderProgram-add-remove-webgl2.html is flaky crashing
https://bugs.webkit.org/show_bug.cgi?id=206718

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months ago[ Mac wk2 ] webgpu/whlsl/textures-sample-grad.html is flaky failing.
tsavell@apple.com [Tue, 4 Feb 2020 17:02:09 +0000 (17:02 +0000)]
[ Mac wk2 ] webgpu/whlsl/textures-sample-grad.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207202

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months agoNetworkProcess should be notified by UIProcess when its service worker process connec...
youenn@apple.com [Tue, 4 Feb 2020 17:02:06 +0000 (17:02 +0000)]
NetworkProcess should be notified by UIProcess when its service worker process connection should be on
https://bugs.webkit.org/show_bug.cgi?id=207122
<rdar://problem/59089780>

Reviewed by Chris Dumez.

Source/WebCore:

Add a completion handler to the create context connection callback.
This is called when the context connection should have been created.
In case there is a context connection, completion handler does nothing.
Otherwise, SWServer will retry creating a context connection if needed.

The pending connection map entry is now removed in the completion handler instead of addContextConnection.
This ensures that only one connection request is sent by network process at a time.

Add extra logging to monitor creation of a context connection.

* workers/service/context/SWContextManager.h:
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::addContextConnection):
(WebCore::SWServer::removeContextConnection):
(WebCore::SWServer::createContextConnectionFinished):
* workers/service/server/SWServer.h:

Source/WebKit:

Add completion handlers to the messaging from NetworkProcess -> UIProcess -> WebProcess -> NetworkProcess
used to create a service worker context connection.

This allows NetworkProcess to ask again for a connection if the connection is still needed but NetworkProcess did not find the context connection.

This is difficult to test since we would need for the process selected to host service workers to exit between the
time it is selected and the time it sends the message to Networking process.

To ensure that the context connection is created by WebProcess, WebProcessProxy takes a background assertion until WebProcess finishes
creating the context connection to Network process.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::establishSWContextConnection):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::swServerForSession):
* NetworkProcess/NetworkProcess.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::establishWorkerContextConnectionToNetworkProcess):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::establishServiceWorkerContext):
* UIProcess/WebProcessProxy.h:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::m_userAgent):
(WebKit::WebSWContextManagerConnection::establishConnection):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

6 months agoCheck for callback being null in Notification.requestPermission
youenn@apple.com [Tue, 4 Feb 2020 16:55:15 +0000 (16:55 +0000)]
Check for callback being null in Notification.requestPermission
https://bugs.webkit.org/show_bug.cgi?id=207192
<rdar://problem/59130804>

Reviewed by Chris Dumez.

Source/WebCore:

Covered by updated test.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::requestPermission):
Callback can be null if no function is given to requestPermission.
Check this before calling the callback.

LayoutTests:

* http/tests/notifications/notification-in-non-secure-context.html:

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

6 months agoUnreviewed, follow-up assertion fix after r255662.
cdumez@apple.com [Tue, 4 Feb 2020 16:29:47 +0000 (16:29 +0000)]
Unreviewed, follow-up assertion fix after r255662.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):

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

6 months ago[ Mac wk2 ] webgpu/whlsl/while-loop-continue.html flaky failing.
tsavell@apple.com [Tue, 4 Feb 2020 16:26:26 +0000 (16:26 +0000)]
[ Mac wk2 ] webgpu/whlsl/while-loop-continue.html flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207200

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months agoREGRESSION(r255595): page not closed after beforeunload handler returns true
cdumez@apple.com [Tue, 4 Feb 2020 16:17:39 +0000 (16:17 +0000)]
REGRESSION(r255595): page not closed after beforeunload handler returns true
https://bugs.webkit.org/show_bug.cgi?id=207189

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2020-02-04
Reviewed by Chris Dumez.

We are assuming the try close did timeout in that case, because the timer is stopped before running the
beforeunload dialog.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Start the try close timer again when the beforeunload
dialog replies.

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

6 months agoRegression: (252334?) [ iOS wk2 ] http/tests/resourceLoadStatistics/cookie-deletion...
tsavell@apple.com [Tue, 4 Feb 2020 16:09:01 +0000 (16:09 +0000)]
Regression: (252334?) [ iOS wk2 ] http/tests/resourceLoadStatistics/cookie-deletion.html is flaky failing and crashing.
https://bugs.webkit.org/show_bug.cgi?id=207197

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/ios-wk2/TestExpectations:

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

6 months agoWeb Inspector: REGRESSION(r248287): Console: function objects saved to a $n will...
drousso@apple.com [Tue, 4 Feb 2020 15:59:42 +0000 (15:59 +0000)]
Web Inspector: REGRESSION(r248287): Console: function objects saved to a $n will be invoked instead of just referenced when evaluating in the Console
https://bugs.webkit.org/show_bug.cgi?id=207180
<rdar://problem/58860268>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(CommandLineAPI):
Instead of deciding whether to wrap the value given for a `$n` getter based on if the value
is already a function, always wrap getter values in a function so that if the value being
stored in the getter is already a function, it isn't used as the callback for the getter and
therefore invoked when the getter is referenced.

LayoutTests:

* inspector/runtime/saveResult.html:
* inspector/runtime/saveResult-expected.txt:

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

6 months ago[ macOS wk2 ] webgpu/whlsl/loops.html is flaky failing
tsavell@apple.com [Tue, 4 Feb 2020 15:56:36 +0000 (15:56 +0000)]
[ macOS wk2 ] webgpu/whlsl/loops.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207199

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-04

* platform/mac-wk2/TestExpectations:

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

6 months agoBuild error with -DENABLE_VIDEO=OFF after r253923
psaavedra@igalia.com [Tue, 4 Feb 2020 15:48:32 +0000 (15:48 +0000)]
Build error with -DENABLE_VIDEO=OFF after r253923
https://bugs.webkit.org/show_bug.cgi?id=207101

Reviewed by Youenn Fablet.

No new tests, only build error fix up

* page/Page.cpp:
(WebCore::Page::forEachMediaElement):

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

6 months agoRegression: (252234?) [ iOS wk2 ] fast/scrolling/ios/scroll-events-back-forward.html...
tsavell@apple.com [Tue, 4 Feb 2020 15:42:04 +0000 (15:42 +0000)]
Regression: (252234?) [ iOS wk2 ] fast/scrolling/ios/scroll-events-back-forward.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207194

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-04

* platform/ios-wk2/TestExpectations:

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

6 months agoCSS Rules with the same selector from several large stylesheets are applied in the...
antti@apple.com [Tue, 4 Feb 2020 15:30:53 +0000 (15:30 +0000)]
CSS Rules with the same selector from several large stylesheets are applied in the wrong order
https://bugs.webkit.org/show_bug.cgi?id=204687
<rdar://problem/57522566>

Reviewed by Zalan Bujtas.

Source/WebCore:

Original test by Anton Khlynovskiy.

Test: fast/css/many-rules.html

* style/RuleData.h:

We overflow the 18 bit m_position field with > 256k CSS rules, confusing the rule order.
Since we have unused bits it costs nothing to increase the field size to 22 bits.

4M rules should be enough for anybody.

LayoutTests:

* TestExpectations:
* fast/css/many-rules-expected.html: Added.
* fast/css/many-rules.html: Added.

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

6 months ago[CMake] Add Cairo::Cairo target
ross.kirsling@sony.com [Tue, 4 Feb 2020 13:52:03 +0000 (13:52 +0000)]
[CMake] Add Cairo::Cairo target
https://bugs.webkit.org/show_bug.cgi?id=207159

Reviewed by Konstantin Tokarev.

.:

* Source/cmake/FindCairo.cmake:
* Source/cmake/OptionsPlayStation.cmake:

Source/WebCore:

* PlatformWinCairo.cmake:
* platform/Cairo.cmake:

Source/WebKit:

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:

Source/WebKitLegacy:

* PlatformWin.cmake:

Tools:

* DumpRenderTree/PlatformWin.cmake:
* ImageDiff/Cairo.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/glib/CMakeLists.txt:
* WebKitTestRunner/PlatformGTK.cmake:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/PlatformWin.cmake:
* wpe/backends/CMakeLists.txt:

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

6 months agoMediaDevices should handle changes of iframe allow attribute value
youenn@apple.com [Tue, 4 Feb 2020 10:57:44 +0000 (10:57 +0000)]
MediaDevices should handle changes of iframe allow attribute value
https://bugs.webkit.org/show_bug.cgi?id=207112

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

* web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt:
* web-platform-tests/mediacapture-streams/MediaStream-feature-policy-none.https-expected.txt:

Source/WebCore:

MediaDevices was computing whether it could access camera or microphone at creation time.
Since the iframe allow attribute can be modified, we cannot do that.
Instead, we get the feature policy everytime this is needed.

Refactor code to use the newly added routine to check for feature policy.
Update logging to give origin and allow attribute value of the frame that fail the feature policy check.

Test: http/tests/webrtc/enumerateDevicesInFrames.html

* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::MediaDevices):
(WebCore::MediaDevices::refreshDevices):
(WebCore::MediaDevices::enumerateDevices):
(WebCore::MediaDevices::listenForDeviceChanges):
* Modules/mediastream/MediaDevices.h:
* Modules/mediastream/UserMediaController.cpp:
(WebCore::UserMediaController::logGetUserMediaDenial):
(WebCore::UserMediaController::logGetDisplayMediaDenial):
(WebCore::UserMediaController::logEnumerateDevicesDenial):
* Modules/mediastream/UserMediaController.h:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::start):
* html/FeaturePolicy.cpp:
(WebCore::policyTypeName):
(WebCore::isFeaturePolicyAllowedByDocumentAndAllOwners):
* html/FeaturePolicy.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::printErrorMessage const):
* page/DOMWindow.h:

LayoutTests:

* TestExpectations:
* fullscreen/full-screen-enabled-expected.txt:
* fullscreen/full-screen-enabled-prefixed-expected.txt:
* fullscreen/full-screen-iframe-not-allowed-expected.txt:
* fullscreen/full-screen-iframe-without-allow-attribute-allowed-from-parent-expected.txt:
* fullscreen/full-screen-restrictions-expected.txt:
* http/tests/fullscreen/fullscreen-feature-policy-expected.txt:
* http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute-expected.txt:
* http/tests/media/media-stream/get-display-media-iframe-allow-attribute-expected.txt:
* http/tests/ssl/media-stream/get-user-media-different-host-expected.txt:
* http/tests/ssl/media-stream/get-user-media-nested-expected.txt:
* http/tests/webrtc/enumerateDevicesInFrames-expected.txt: Added.
* http/tests/webrtc/enumerateDevicesInFrames.html: Added.

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

6 months ago[Win][Clang] WebProcessMain.h(28,14): error: token is not a valid binary operator...
Hironori.Fujii@sony.com [Tue, 4 Feb 2020 08:28:09 +0000 (08:28 +0000)]
[Win][Clang] WebProcessMain.h(28,14): error: token is not a valid binary operator in a preprocessor subexpression
https://bugs.webkit.org/show_bug.cgi?id=207188

Unreviewed build fix for WinCairo port.

* NetworkProcess/EntryPoint/win/NetworkProcessMain.cpp:
* WebProcess/EntryPoint/win/WebProcessMain.cpp:
Added #include "config.h".

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

6 months ago[WinCairo][curl][Clang] error: member access into incomplete type 'WebCore::Synchrono...
Hironori.Fujii@sony.com [Tue, 4 Feb 2020 08:04:08 +0000 (08:04 +0000)]
[WinCairo][curl][Clang] error: member access into incomplete type 'WebCore::SynchronousLoaderMessageQueue' in ~CurlRequest
https://bugs.webkit.org/show_bug.cgi?id=207187

Unreviewed build fix for clang-cl builds of WinCairo port.

SynchronousLoaderMessageQueue couldn't be destructed in inlined
~CurlRequest because it's a incomplete type. Moved the dtor from
CurlRequest.h to CurlRequest.cpp.

* platform/network/curl/CurlRequest.cpp:
* platform/network/curl/CurlRequest.h:

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

6 months agoAdd a WebKitAdditions hook to provide additional customizations to UIDragInteraction
wenson_hsieh@apple.com [Tue, 4 Feb 2020 06:04:12 +0000 (06:04 +0000)]
Add a WebKitAdditions hook to provide additional customizations to UIDragInteraction
https://bugs.webkit.org/show_bug.cgi?id=207177
<rdar://problem/59121266>

Reviewed by Tim Horton.

Add a WebKitAdditions extension point that runs immediately after setting up UIDragInteraction and
UIDropInteraction.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupDragAndDropInteractions]):

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

6 months agoAccelerated animations freeze on render tree rebuild
antti@apple.com [Tue, 4 Feb 2020 05:56:04 +0000 (05:56 +0000)]
Accelerated animations freeze on render tree rebuild
https://bugs.webkit.org/show_bug.cgi?id=201048
<rdar://problem/54612621>

Reviewed by Antoine Quint.

Source/WebCore:

If there is an accelerated animation in progress for a renderer and the render tree is rebuild the animation
does not continue with the new renderer.

To fix, make sure that the animation leaves the accelerated state when the renderer is removed. The new renderer
will then become accelerated automatically.

Original test case by Tim Guan-tin Chien.

Test: webanimations/accelerated-animation-renderer-change.html

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::willChangeRendererForElement):
* animation/AnimationTimeline.h:
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::willChangeRenderer):
* animation/KeyframeEffect.h:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::willChangeRenderer):
* animation/WebAnimation.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):

LayoutTests:

* webanimations/accelerated-animation-renderer-change-expected.html: Added.
* webanimations/accelerated-animation-renderer-change.html: Added.

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

6 months agoStop relying on ResponsivenessTimer to keep the WebProcess from suspending during...
cdumez@apple.com [Tue, 4 Feb 2020 05:46:57 +0000 (05:46 +0000)]
Stop relying on ResponsivenessTimer to keep the WebProcess from suspending during initialization
https://bugs.webkit.org/show_bug.cgi?id=207144

Reviewed by Brady Eidson.

Stop relying on ResponsivenessTimer to keep the WebProcess from suspending during initialization. Instead, make the
WebProcess::InitializeWebProcess IPC async with a reply and take a process assertion on behalf of the WebContent
process until we get a response back.

This avoids sending an extra WebProcess::MainThreadPing IPC to the WebProcess for no reason (since we're already
sending the WebProcess::InitializeWebProcess IPC) and this is also more reliable since the ResponsivenessTimer can
actually time out and cause the process to get suspended during initialization still.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

6 months ago[WebAccessibilityObjectWrapper detach] should detach either the wrapped AXObject...
andresg_22@apple.com [Tue, 4 Feb 2020 05:37:30 +0000 (05:37 +0000)]
[WebAccessibilityObjectWrapper detach] should detach either the wrapped AXObject or the IsolatedObject but not both.
https://bugs.webkit.org/show_bug.cgi?id=207178

Reviewed by Chris Fleizach.

Detach either the AXObject or the IsolatedObject depending on the thread that the method is invoed on.

* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase detachAXObject]):
(-[WebAccessibilityObjectWrapperBase detachIsolatedObject]):
(-[WebAccessibilityObjectWrapperBase detach]): Detach one or the other depending on the thread.

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

6 months agoPass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
jiewen_tan@apple.com [Tue, 4 Feb 2020 05:29:51 +0000 (05:29 +0000)]
Pass a hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy
https://bugs.webkit.org/show_bug.cgi?id=207079
<rdar://problem/48290464>

Reviewed by Brent Fulgham.

Source/WebCore/PAL:

* pal/cocoa/AppSSOSoftLink.h:
* pal/cocoa/AppSSOSoftLink.mm:
* pal/spi/cocoa/AppSSOSPI.h:
Adds macros for classes that are used in the tests.

Source/WebKit:

Pass a localized human readable hint from the extension to decidePolicyForSOAuthorizationLoadWithCurrentPolicy,
such that clients can display it to tell users what the extension is trying to do. Hints could be something
like "Sign In With Apple".

Covered new test contents within existing tests.

* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h:
* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::start):
(WebKit::SOAuthorizationSession::continueStartAfterGetAuthorizationHints):
(WebKit::SOAuthorizationSession::continueStartAfterDecidePolicy):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/TestSOAuthorization.mm:
(-[TestSOAuthorizationDelegate _webView:decidePolicyForSOAuthorizationLoadWithCurrentPolicy:forExtension:completionHandler:]):
(overrideGetAuthorizationHintsWithURL):
(TestWebKitAPI::TEST):

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

6 months ago[JSC] Use PackedPtr for VariableEnvironment
ysuzuki@apple.com [Tue, 4 Feb 2020 04:22:29 +0000 (04:22 +0000)]
[JSC] Use PackedPtr for VariableEnvironment
https://bugs.webkit.org/show_bug.cgi?id=207172

Reviewed by Mark Lam.

Since VariableEnvironment's KeyValue is key: pointer + value: 2 byte, using PackedPtr can make it 8 bytes, 50% reduction.

* parser/VariableEnvironment.h:
* runtime/CachedTypes.cpp:
(JSC::CachedRefPtr::encode):
(JSC::CachedRefPtr::decode const): CachedTypes should handle PackedPtr too since VariableEnvironment starts using it.

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

6 months agoUnreviewed, fix the internal build after <rdar://problem/59132944>
wenson_hsieh@apple.com [Tue, 4 Feb 2020 03:59:08 +0000 (03:59 +0000)]
Unreviewed, fix the internal build after <rdar://problem/59132944>

* UIProcess/ios/WKContentViewInteraction.h: Declare this helper in the header, now that it's consulted by some
WebKitAdditions code.

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

6 months agoAdd a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecogni...
wenson_hsieh@apple.com [Tue, 4 Feb 2020 01:51:21 +0000 (01:51 +0000)]
Add a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecognizer:shouldReceiveTouch:]
https://bugs.webkit.org/show_bug.cgi?id=207162
<rdar://problem/59129739>

Reviewed by Tim Horton.

Allow an internal implementation of `-_allowGestureRecognizer:toReceiveTouch:` to prevent touches from being
routed to certain gesture recognizers, if necessary.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):

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

6 months agoresults.webkit.org: Support jsc stress tests
jbedard@apple.com [Tue, 4 Feb 2020 01:47:26 +0000 (01:47 +0000)]
results.webkit.org: Support jsc stress tests
https://bugs.webkit.org/show_bug.cgi?id=204096

Rubber-stamped by Aakash Jain.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Add pass and failures to reported results.

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

6 months agoMake Bugzilla._find_select_element_for_flag more robust
shvaikalesh@gmail.com [Tue, 4 Feb 2020 01:32:06 +0000 (01:32 +0000)]
Make Bugzilla._find_select_element_for_flag more robust
https://bugs.webkit.org/show_bug.cgi?id=207148

Reviewed by Jonathan Bedard.

This patch resolves two FIXMEs:
1. _find_select_element_for_flag() is now used in _fill_attachment_form() method.
2. _find_select_element_for_flag() now does not rely on order of <select> elements.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla._fill_attachment_form):
(Bugzilla._find_select_element_for_flag):

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

6 months ago[ macOS wk1 ] inspector/unit-tests/server-timing-entry.html is flaky timeout
tsavell@apple.com [Tue, 4 Feb 2020 01:03:06 +0000 (01:03 +0000)]
[ macOS wk1 ] inspector/unit-tests/server-timing-entry.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=207167

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

6 months ago[ Mac wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuproc...
tsavell@apple.com [Tue, 4 Feb 2020 01:00:24 +0000 (01:00 +0000)]
[ Mac wk2 ] http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable-gpuprocess.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207166

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

6 months ago[ Mac wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html...
tsavell@apple.com [Tue, 4 Feb 2020 00:50:11 +0000 (00:50 +0000)]
[ Mac wk2 ] tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207165

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

6 months agoLayoutTest inspector/controller/runtime-controller-import.html is a flaky timeout
tsavell@apple.com [Tue, 4 Feb 2020 00:49:13 +0000 (00:49 +0000)]
LayoutTest inspector/controller/runtime-controller-import.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=168926

Updating because the test is also flaky failing.

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

6 months ago[ macOS wk1 ] inspector/heap/imported-snapshot.html is flaky timeout
ryanhaddad@apple.com [Tue, 4 Feb 2020 00:36:18 +0000 (00:36 +0000)]
[ macOS wk1 ] inspector/heap/imported-snapshot.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=207163

Updating to include an exclude for timeouts.

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac/TestExpectations:

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

6 months ago[iOS wk2 Debug] legacy-animation-engine/animations/play-state-in-shorthand.html is...
tsavell@apple.com [Tue, 4 Feb 2020 00:34:56 +0000 (00:34 +0000)]
[iOS wk2 Debug] legacy-animation-engine/animations/play-state-in-shorthand.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207164

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

6 months agoCrash in WebCore::IDBServer::IDBServer::createIndex
sihui_liu@apple.com [Tue, 4 Feb 2020 00:31:02 +0000 (00:31 +0000)]
Crash in WebCore::IDBServer::IDBServer::createIndex
https://bugs.webkit.org/show_bug.cgi?id=207137
<rdar://problem/59096231>

Reviewed by Darin Adler.

Source/WebCore:

Export IDBIndexInfo::isolatedCopy so it can be used in WebKitLegacy framework code.

* Modules/indexeddb/shared/IDBIndexInfo.h:

Source/WebKitLegacy:

* Storage/InProcessIDBServer.cpp:
(InProcessIDBServer::createIndex): Create an isolated copy of IDBIndexInfo before passing it to IDB thread.

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

6 months agoRegression: (254414?) [ iOS wk2 ] imported/w3c/web-platform-tests/2dcontext/imagebitm...
tsavell@apple.com [Tue, 4 Feb 2020 00:28:44 +0000 (00:28 +0000)]
Regression: (254414?) [ iOS wk2 ] imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207161

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

6 months ago[ macOS wk1 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing
ryanhaddad@apple.com [Tue, 4 Feb 2020 00:15:03 +0000 (00:15 +0000)]
[ macOS wk1 ] css2.1/20110323/replaced-intrinsic-ratio-001.htm is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207160

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

6 months agoREGRESSION: [ macOS wk1 ] inspector/debugger/tail-deleted-frames/tail-deleted-frames...
tsavell@apple.com [Mon, 3 Feb 2020 23:54:53 +0000 (23:54 +0000)]
REGRESSION: [ macOS wk1 ] inspector/debugger/tail-deleted-frames/tail-deleted-frames-scopes.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207157

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

6 months agoReduce size of HashMap and HashSet
achristensen@apple.com [Mon, 3 Feb 2020 23:48:29 +0000 (23:48 +0000)]
Reduce size of HashMap and HashSet
https://bugs.webkit.org/show_bug.cgi?id=207138

Reviewed by Yusuke Suzuki.

Source/WTF:

This reduces sizeof(HashMap) and sizeof(HashSet) from 24 to 8 on 64-bit systems.
I measured that the overwhelming majority of HashMaps and HashSets never see more than 0 elements,
so I moved the table metadata (tableSize, tableSizeMask, keyCount, deletedCount) to inside the
dynamically allocated memory.  This makes another branch in size() for non-empty tables
and an additional read and write when rehashing in exchange for fewer writes in the constructor
and increased cache locality of everything that uses HashMap and HashSet, which is basically everything.

* wtf/HashTable.h:
(WTF::HashTable::~HashTable):
(WTF::HashTable::end):
(WTF::HashTable::end const):
(WTF::HashTable::random):
(WTF::HashTable::size const):
(WTF::HashTable::capacity const):
(WTF::HashTable::isEmpty const):
(WTF::HashTable::reserveInitialCapacity):
(WTF::HashTable::shouldExpand const):
(WTF::HashTable::mustRehashInPlace const):
(WTF::HashTable::shouldShrink const):
(WTF::HashTable::shrink):
(WTF::HashTable::makeIterator):
(WTF::HashTable::makeConstIterator const):
(WTF::HashTable::makeKnownGoodIterator):
(WTF::HashTable::makeKnownGoodConstIterator const):
(WTF::HashTable::tableSize const):
(WTF::HashTable::setTableSize const):
(WTF::HashTable::tableSizeMask const):
(WTF::HashTable::setTableSizeMask):
(WTF::HashTable::keyCount const):
(WTF::HashTable::setKeyCount const):
(WTF::HashTable::deletedCount const):
(WTF::HashTable::setDeletedCount const):
(WTF::KeyTraits>::HashTable):
(WTF::KeyTraits>::inlineLookup):
(WTF::KeyTraits>::lookupForWriting):
(WTF::KeyTraits>::fullLookupForWriting):
(WTF::KeyTraits>::addUniqueForInitialization):
(WTF::KeyTraits>::add):
(WTF::KeyTraits>::addPassingHashCode):
(WTF::KeyTraits>::remove):
(WTF::KeyTraits>::removeIf):
(WTF::KeyTraits>::allocateTable):
(WTF::KeyTraits>::deallocateTable):
(WTF::KeyTraits>::expand):
(WTF::KeyTraits>::shrinkToBestSize):
(WTF::KeyTraits>::deleteReleasedWeakBuckets):
(WTF::KeyTraits>::rehash):
(WTF::KeyTraits>::clear):
(WTF::KeyTraits>::swap):
(WTF::KeyTraits>::checkTableConsistencyExceptSize const):

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

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

6 months ago[WK2] Use per-UIProcess default cookie storage for Mac Catalyst apps
cdumez@apple.com [Mon, 3 Feb 2020 23:40:44 +0000 (23:40 +0000)]
[WK2] Use per-UIProcess default cookie storage for Mac Catalyst apps
https://bugs.webkit.org/show_bug.cgi?id=207139
<rdar://problem/59047014>

Reviewed by Brent Fulgham.

Use per-UIProcess default cookie storage for Mac Catalyst apps, similarly to what
we do for regular macOS apps.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

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

6 months agoUnreviewed iOS build fix; lambdas need an arrow operator between the paramaters and...
jer.noble@apple.com [Mon, 3 Feb 2020 23:38:57 +0000 (23:38 +0000)]
Unreviewed iOS build fix; lambdas need an arrow operator between the paramaters and return type.

* page/Quirks.cpp:
(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):

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

6 months ago[ iOS wk2 Release ] http/tests/websocket/tests/hybi/workers/close.html is flaky failing.
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:38:48 +0000 (23:38 +0000)]
[ iOS wk2 Release ] http/tests/websocket/tests/hybi/workers/close.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207156

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

6 months ago[ macOS wk1 ] inspector/canvas/recording-2d-full.html is flaky timing out
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:33:09 +0000 (23:33 +0000)]
[ macOS wk1 ] inspector/canvas/recording-2d-full.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207154

Updating expectations for newer OS

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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

6 months ago[ iOS wk2 ] animations/animation-callback-timestamp.html is flaky failing.
ryanhaddad@apple.com [Mon, 3 Feb 2020 23:31:33 +0000 (23:31 +0000)]
[ iOS wk2 ] animations/animation-callback-timestamp.html is flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207153

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/ios-wk2/TestExpectations:

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

6 months agoobsolete_attachment should not fail when flags do not exist
shvaikalesh@gmail.com [Mon, 3 Feb 2020 23:31:31 +0000 (23:31 +0000)]
obsolete_attachment should not fail when flags do not exist
https://bugs.webkit.org/show_bug.cgi?id=171121

Reviewed by Jonathan Bedard.

Before this change, an error occured if a contributor without EditBugs privileges tried
to obsolete not their own attachment. With this patch, uploading routine continues with
friendly console warning like we have in reassign_bug() method.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla):
(Bugzilla.obsolete_attachment):
(Bugzilla.reassign_bug): Use NO_EDIT_BUGS_MESSAGE constant.

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

6 months ago[iOS 13] Dragging on-screen volume control on a YouTube video selects text around...
wenson_hsieh@apple.com [Mon, 3 Feb 2020 23:09:19 +0000 (23:09 +0000)]
[iOS 13] Dragging on-screen volume control on a YouTube video selects text around the panel
https://bugs.webkit.org/show_bug.cgi?id=207140
<rdar://problem/58852938>

Reviewed by Tim Horton.

Source/WebKit:

This bug occurs on iPadOS when long pressing the volume controls on the desktop version of YouTube, and then
performing a pan gesture; this activates the highlight text selection gesture recognizer added in iOS 13,
causing text to be selected while adjusting the volume using these custom controls. On macOS, we avoid this
because `Node::canStartSelection()` returns `false`, due to a container node having both `user-drag: element`
and `user-select: none`; in this scenario, we allow dragging to take precendence over text selection, so the
volume slider can be moved using a mouse without simultaneously selecting text.

This logic is currently absent on iOS, where UIKit text interaction gesture recognizers ask us for information
about the DOM at given locations, and we determine whether to allow text interaction gestures (such as long
pressing) to begin in `-textInteractionGesture:shouldBeginAtPoint:` and `-hasSelectablePositionAtPoint:`.
Ideally, we'd want to eventually unify these two codepaths for triggering text selection (and preferably just
have both go through EventHandler); in lieu of this, simply make the iOS codepath behave a little more like
macOS by adding a bit to allow text interaction gestures to bail in the case where at least one container of the
hit-tested element is both draggable and unselectable.

Test: editing/selection/ios/prefer-drag-over-text-selection.html

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

Add the new bit to InteractionInformationAtPosition.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInteractionGesture:shouldBeginAtPoint:]):

Avoid beginning text selection if the bit is set.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::selectionPositionInformation):

Move a comment about the ">= 97% of the document's visible area" heuristic next to the relevant code, and also
leave a FIXME mentioning that we should reconsider whether this is really needed; it seems that this was
originally intended to avoid ending up with an excessively large block selection, but block selection has been
removed entirely since iOS 12. That said, this logic may still be helping avoid situations where the text
selection is too aggressive on iOS and ends up selecting too much text.

LayoutTests:

Add a layout test to verify that we don't allow text selection gestures inside of containers that have both
`user-drag: element` and `user-select: none`.

* editing/selection/ios/prefer-drag-over-text-selection-expected.txt: Added.
* editing/selection/ios/prefer-drag-over-text-selection.html: Added.

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

6 months ago[ macOS iOS ] fast/dom/connected-subframe-counter-overflow.html is flaky timing out
tsavell@apple.com [Mon, 3 Feb 2020 23:04:20 +0000 (23:04 +0000)]
[ macOS iOS ] fast/dom/connected-subframe-counter-overflow.html is flaky timing out
https://bugs.webkit.org/show_bug.cgi?id=207152

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

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

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

6 months ago[ Mac wk2 Release ] fast/dom/navigator-detached-no-crash.html flaky failing.
tsavell@apple.com [Mon, 3 Feb 2020 22:58:47 +0000 (22:58 +0000)]
[ Mac wk2 Release ] fast/dom/navigator-detached-no-crash.html flaky failing.
https://bugs.webkit.org/show_bug.cgi?id=207151

Unreviewed test gardening.

Patch by Jason Lawrence <lawrence.j@apple.com> on 2020-02-03

* platform/mac-wk2/TestExpectations:

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

6 months ago[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky...
tsavell@apple.com [Mon, 3 Feb 2020 22:52:34 +0000 (22:52 +0000)]
[ macOS wk1 ] platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html is flaky failing
https://bugs.webkit.org/show_bug.cgi?id=207150

Unreviewed test gardening.

Patch by Jacob Uphoff <jacob_uphoff@apple.com> on 2020-02-03

* platform/mac-wk1/TestExpectations:

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