WebKit-https.git
18 months agoExpose Safe Browsing SPI
commit-queue@webkit.org [Fri, 19 Jan 2018 18:05:40 +0000 (18:05 +0000)]
Expose Safe Browsing SPI
https://bugs.webkit.org/show_bug.cgi?id=181804
<rdar://problem/36626946>

Patch by Zach Li <zacharyli323@gmail.com> on 2018-01-19
Reviewed by Alex Christensen.

If client is using Apple internal SDK, then we can just import the header; if not,
then we declare necessary symbols that client will need.

* Configurations/WebKit.xcconfig:
Only link against SafariSafeBrowsing framework on macOS High Sierra
and iOS 11 and above. Weak link against SafariSafeBrowsing framework
because it is not present on the Base system.

* Platform/spi/Cocoa/SafeBrowsingSPI.h: Added.

* WebKit.xcodeproj/project.pbxproj:
Added SafeBrowsingSPI.h.

* WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/11/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd:
Added.

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

18 months ago[Web Animations] Remove http/wpt/wk-web-animations tests
graouts@webkit.org [Fri, 19 Jan 2018 17:59:59 +0000 (17:59 +0000)]
[Web Animations] Remove http/wpt/wk-web-animations tests
https://bugs.webkit.org/show_bug.cgi?id=181861

These tests were written early on during our Web Animations implementation before we had a good sense of the quality
of the coverage of the W3C WPT suite. That suite is extremely comprehensive and all of the assertions we wrote ourselves
are redundant and should be removed so that all testing, unless specific to our implementation, is done through the WPT
suite.

Reviewed by Dean Jackson.

* http/wpt/wk-web-animations/interfaces/document-get-animations-expected.txt: Removed.
* http/wpt/wk-web-animations/interfaces/document-get-animations.html: Removed.
* http/wpt/wk-web-animations/interfaces/element-get-animations-expected.txt: Removed.
* http/wpt/wk-web-animations/interfaces/element-get-animations.html: Removed.
* http/wpt/wk-web-animations/interfaces/keyframe-effect-getComputedStyle-expected.txt: Removed.
* http/wpt/wk-web-animations/interfaces/keyframe-effect-getComputedStyle.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-creation-basic-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-creation-basic.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-current-time-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-current-time.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect-timing-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect-timing.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect-unique-relationship-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect-unique-relationship.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-effect.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-interface-effect-property-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-interface-effect-property.html: Removed.
* http/wpt/wk-web-animations/timing-model/animation-interface-start-time-property-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/animation-interface-start-time-property.html: Removed.
* http/wpt/wk-web-animations/timing-model/document-timeline-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/document-timeline.html: Removed.
* http/wpt/wk-web-animations/timing-model/keyframe-effect-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html: Removed.
* http/wpt/wk-web-animations/timing-model/keyframe-effect.html: Removed.
* http/wpt/wk-web-animations/timing-model/timeline-current-time-expected.txt: Removed.
* http/wpt/wk-web-animations/timing-model/timeline-current-time.html: Removed.

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

18 months ago[Win] Compile error: 'WebKitQuartzCoreAdditionsBase.h' not found.
pvollan@apple.com [Fri, 19 Jan 2018 17:58:15 +0000 (17:58 +0000)]
[Win] Compile error: 'WebKitQuartzCoreAdditionsBase.h' not found.
https://bugs.webkit.org/show_bug.cgi?id=181859
<rdar://problem/36659886>

Reviewed by Alex Christensen.

Use local include patch.

* WebKitQuartzCoreAdditions/API/WKCACFImage.h:
* WebKitQuartzCoreAdditions/API/WKCACFView.h:
* WebKitQuartzCoreAdditions/API/WKCACFViewPrivate.h:

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

18 months ago[Web Animations] Expose timing properties (delay, endDelay, fill, iterationStart...
graouts@webkit.org [Fri, 19 Jan 2018 17:56:53 +0000 (17:56 +0000)]
[Web Animations] Expose timing properties (delay, endDelay, fill, iterationStart, iterations, direction) and getComputedTiming()
https://bugs.webkit.org/show_bug.cgi?id=181857
<rdar://problem/36660081>

Reviewed by Dean Jackson.

Source/WebCore:

We start the work to implement the rest of the Web Animations timing and animation model by exposing more properties on
AnimationEffectTiming to control delay (delay, endDelay), looping (iterationStart, iterations), fill and direction.
Additionally, we expose the getComputedTiming() method on AnimationEffect, although it currently lacks some computed
properties that will come in later patch as we implement various processes defined by the spec. We also update the
existing duration() method on AnimationEffectTiming to be called iterationDuration() to match the terms used in the
specification.

Finally, we make all new properties, and update existing ones, that expose a time value go through the new utility
function secondsToWebAnimationsAPITime() to guarantee rounded values with microseconds precision, as advised by
the Web Animations specification.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/AnimationEffect.cpp:
(WebCore::AnimationEffect::localTime const):
(WebCore::AnimationEffect::getComputedTiming):
* animation/AnimationEffect.h:
* animation/AnimationEffect.idl:
* animation/AnimationEffectTiming.cpp:
(WebCore::AnimationEffectTiming::AnimationEffectTiming):
(WebCore::AnimationEffectTiming::setIterationStart):
(WebCore::AnimationEffectTiming::setIterations):
(WebCore::AnimationEffectTiming::bindingsDuration const):
(WebCore::AnimationEffectTiming::setBindingsDuration):
(WebCore::AnimationEffectTiming::endTime const):
(WebCore::AnimationEffectTiming::activeDuration const):
* animation/AnimationEffectTiming.h:
* animation/AnimationEffectTiming.idl:
* animation/AnimationPlaybackEvent.cpp:
(WebCore::AnimationPlaybackEvent::bindingsCurrentTime const):
(WebCore::AnimationPlaybackEvent::bindingsTimelineTime const):
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::bindingsCurrentTime):
* animation/ComputedTimingProperties.h: Added.
* animation/ComputedTimingProperties.idl: Added. We set nullable double values to a default value of "null" since
otherwise setting those properties to a null value would not set the properties in the converted JS dictionary.
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::create): Handle new timing properties passed in the KeyframeEffectOptions dictionary.
(WebCore::KeyframeEffect::applyAtLocalTime):
(WebCore::KeyframeEffect::getAnimatedStyle):
(WebCore::KeyframeEffect::startOrStopAccelerated):
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::bindingsStartTime const):
(WebCore::WebAnimation::bindingsCurrentTime const):
(WebCore::WebAnimation::effectEndTime const):
(WebCore::WebAnimation::timeToNextRequiredTick const):
* animation/WebAnimationUtilities.h: Added.
(WebCore::secondsToWebAnimationsAPITime):

LayoutTests:

Update expectations with progressions and new failure points now we expose more of the API.

* http/wpt/web-animations/animation-model/animation-types/discrete-animation-expected.txt:
* http/wpt/web-animations/interfaces/Animatable/animate-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finish-expected.txt:
* http/wpt/web-animations/interfaces/Animation/finished-expected.txt:
* http/wpt/web-animations/interfaces/Animation/pause-expected.txt:
* http/wpt/web-animations/interfaces/Animation/play-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/delay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/direction-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/duration-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/easing-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/endDelay-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/fill-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterationStart-expected.txt:
* http/wpt/web-animations/interfaces/AnimationEffectTiming/iterations-expected.txt:
* http/wpt/web-animations/interfaces/AnimationTimeline/document-timeline-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/active-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/current-iteration-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/local-time-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/phases-and-states-expected.txt:
* http/wpt/web-animations/timing-model/animation-effects/simple-iteration-progress-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-animation-start-time-expected.txt:
* http/wpt/web-animations/timing-model/animations/set-the-target-effect-of-an-animation-expected.txt:
* http/wpt/web-animations/timing-model/time-transformations/transformed-progress-expected.txt:
* http/wpt/wk-web-animations/timing-model/keyframe-effect-interface-timing-duration.html:

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

18 months agoRemove dead networking code
commit-queue@webkit.org [Fri, 19 Jan 2018 17:55:55 +0000 (17:55 +0000)]
Remove dead networking code
https://bugs.webkit.org/show_bug.cgi?id=181813

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by Tim Horton.

CFURLConnection is only used on Windows.

* platform/network/cf/ResourceError.h:
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::encodingRequiresPlatformData const):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::findCFURLRequestCopyContentDispositionEncodingFallbackArrayFunction):
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::setStorageSession):
* platform/network/cf/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):

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

18 months agoSoftlink VideoProcessing in WebKit
commit-queue@webkit.org [Fri, 19 Jan 2018 17:48:23 +0000 (17:48 +0000)]
Softlink VideoProcessing in WebKit
https://bugs.webkit.org/show_bug.cgi?id=181853
<rdar://problem/36590005>

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-19
Reviewed by Eric Carlson.

* Configurations/libwebrtc.xcconfig:
* Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.cpp: Added.
* Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/VideoProcessingSoftLink.h: Added.
* Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.h:
* Source/webrtc/sdk/objc/Framework/Classes/VideoProcessing/encoder_vcp.mm:
(internal::SetVTSessionProperty):
(webrtc::H264VideoToolboxEncoderVCP::Encode):
* Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/videocodecfactory.mm:
(webrtc::VideoToolboxVideoEncoderFactory::VideoToolboxVideoEncoderFactory):
* libwebrtc.xcodeproj/project.pbxproj:

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

18 months agoRemove unused WebViewPrivate _allowCookies
commit-queue@webkit.org [Fri, 19 Jan 2018 17:46:06 +0000 (17:46 +0000)]
Remove unused WebViewPrivate _allowCookies
https://bugs.webkit.org/show_bug.cgi?id=181812

Patch by Alex Christensen <achristensen@webkit.org> on 2018-01-19
Reviewed by Tim Horton.

Source/WebCore:

This SPI was in the original iOS upstreaming and has not been used in many years.

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setDefaultAllowCookies): Deleted.
(WebCore::ResourceRequestBase::defaultAllowCookies): Deleted.
* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::ResourceRequestBase):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView _setAllowCookies:]): Deleted.
(+[WebView _allowCookies]): Deleted.
* WebView/WebViewPrivate.h:

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

18 months agoMark http/tests/images/image-supports-video.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 17:45:06 +0000 (17:45 +0000)]
Mark http/tests/images/image-supports-video.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181862

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

18 months agoUpdate TestExpectations for media/W3C/audio/networkState/networkState_during_loadstar...
ryanhaddad@apple.com [Fri, 19 Jan 2018 17:38:15 +0000 (17:38 +0000)]
Update TestExpectations for media/W3C/audio/networkState/networkState_during_loadstart.html.
https://bugs.webkit.org/show_bug.cgi?id=123010

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

18 months agoMove select-out-of-floated-non-editable iOS Simulator expectations to iOS
jbedard@apple.com [Fri, 19 Jan 2018 17:12:04 +0000 (17:12 +0000)]
Move select-out-of-floated-non-editable iOS Simulator expectations to iOS

Unreviewed test gardening.

r222317 introduced these test expectations. These expectations should apply to both
Simulator and device testing.

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

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

18 months agoUse promises for basic-gestures.js and 'await' for the corresponding tests
fred.wang@free.fr [Fri, 19 Jan 2018 16:45:49 +0000 (16:45 +0000)]
Use promises for basic-gestures.js and 'await' for the corresponding tests
https://bugs.webkit.org/show_bug.cgi?id=181841

Patch by Frederic Wang <fwang@igalia.com> on 2018-01-19
Reviewed by Megan Gardner.

* fast/events/touch/ios/drag-to-autoscroll-in-single-line-editable.html: Remove redundant
check for testRunner.runUIScript, rewrite runUIScript calls to just await a promise, add the
async keyword to runTest and reindent.
Also remove extraneous space after + operator.
* fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-left-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-to-select-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Ditto.
* fast/events/touch/ios/long-press-to-select-text.html: Ditto.
* resources/basic-gestures.js: For all functions in this file, wrap the script source into a
runUIScript call and a new promise, reindent.

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

18 months agoMark svg/filters/feDiffuseLighting-bottomRightPixel.html as failing on Windows.
pvollan@apple.com [Fri, 19 Jan 2018 16:21:33 +0000 (16:21 +0000)]
Mark svg/filters/feDiffuseLighting-bottomRightPixel.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=181854

Unreviewed test gardening.

* platform/win/TestExpectations:

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

18 months ago[iOS] LayoutTest media/modern-media-controls/media-controller/ios/media-controller...
graouts@webkit.org [Fri, 19 Jan 2018 16:10:34 +0000 (16:10 +0000)]
[iOS] LayoutTest media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html fails on Internal bots
https://bugs.webkit.org/show_bug.cgi?id=181843
<rdar://problem/36061363>

The button we were trying to press was outside of the viewable screen area and so the tap wouldn't occur.
Resizing the video to fit in the window fixes the issue.

Reviewed by Youenn Fablet.

* media/modern-media-controls/media-controller/ios/media-controller-ios-do-not-hide-controls-when-tapping-button.html:

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

18 months agoWebDriver: driver environment not passed to pytest when running w3c tests
commit-queue@webkit.org [Fri, 19 Jan 2018 15:19:32 +0000 (15:19 +0000)]
WebDriver: driver environment not passed to pytest when running w3c tests
https://bugs.webkit.org/show_bug.cgi?id=181852

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2018-01-19
Reviewed by Carlos Alberto Lopez Perez.

That's why color codes are not used in the bots log for selenium tests but they appear in w3c tests.

* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.run):

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

18 months ago[GTK] WebDriver: wayland display no used in wayland bot
carlosgc@webkit.org [Fri, 19 Jan 2018 14:19:59 +0000 (14:19 +0000)]
[GTK] WebDriver: wayland display no used in wayland bot
https://bugs.webkit.org/show_bug.cgi?id=181851

Reviewed by Carlos Alberto Lopez Perez.

We need to handle the additionalArguments property in the WebDriverTests step.

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests.start):

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

18 months agoUnreviewed, reduce count of iteration to fix timing out debug JSC test
utatane.tea@gmail.com [Fri, 19 Jan 2018 13:06:42 +0000 (13:06 +0000)]
Unreviewed, reduce count of iteration to fix timing out debug JSC test
https://bugs.webkit.org/show_bug.cgi?id=181535

* stress/inserted-recovery-with-set-last-index.js:

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

19 months ago[GTK] TERM environment variable is not passed to the test driver.
clopez@igalia.com [Fri, 19 Jan 2018 12:22:00 +0000 (12:22 +0000)]
[GTK] TERM environment variable is not passed to the test driver.
https://bugs.webkit.org/show_bug.cgi?id=181847

Rubber-stamped by by Carlos Garcia Campos.

* Scripts/webkitpy/port/base.py:
(Port.to.setup_environ_for_server):

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

19 months agoWebDriver: run-webdriver-tests is crashing in the bots when creating results json...
carlosgc@webkit.org [Fri, 19 Jan 2018 11:54:20 +0000 (11:54 +0000)]
WebDriver: run-webdriver-tests is crashing in the bots when creating results json file
https://bugs.webkit.org/show_bug.cgi?id=181844

Reviewed by Carlos Alberto Lopez Perez.

We always try to create the directory where to store the json file, but when the filename is given directly,
like in the bots, the current dir is used.

* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.dump_results_to_json_file): Do not try to create the directory if dirname() returns an
empty string.

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

19 months ago[GTK] WebDriver tests are running outside the jhbuild env
carlosgc@webkit.org [Fri, 19 Jan 2018 09:58:04 +0000 (09:58 +0000)]
[GTK] WebDriver tests are running outside the jhbuild env
https://bugs.webkit.org/show_bug.cgi?id=181842

Reviewed by Žan Doberšek.

We need to enter jhbuild env in run-webdriver-tests.

* Scripts/run-webdriver-tests:

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

19 months ago[GTK] Run WebDriver tests in the bots
carlosgc@webkit.org [Fri, 19 Jan 2018 07:31:26 +0000 (07:31 +0000)]
[GTK] Run WebDriver tests in the bots
https://bugs.webkit.org/show_bug.cgi?id=181787

Reviewed by Michael Catanzaro.

Add a step to run WebDriver tests in the GTK test bots. The new step is not GTK specific, but only added to the
factory for the GTK port for now.

* BuildSlaveSupport/build.webkit.org-config/factories.py:
(TestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests):
(RunWebDriverTests.start):
(RunWebDriverTests.commandComplete):
(RunWebDriverTests.evaluateCommand):
(RunWebDriverTests.getText):
(RunWebDriverTests.getText2):

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

19 months agoMove helper files for iOS touch gestures into LayoutTests/resources
fred.wang@free.fr [Fri, 19 Jan 2018 07:03:50 +0000 (07:03 +0000)]
Move helper files for iOS touch gestures into LayoutTests/resources
https://bugs.webkit.org/show_bug.cgi?id=181798

Patch by Frederic Wang <fwang@igalia.com> on 2018-01-18
Reviewed by Wenson Hsieh.

* fast/events/touch/ios/drag-to-autoscroll-in-single-line-editable.html: Change URL of
basic-gestures.js ; remove gesture-helpers.js it seems unused and has the wrong URL anyway.
* fast/events/touch/ios/long-press-then-drag-down-to-change-selected-text.html: Change URL
of basic-gestures.js.
* fast/events/touch/ios/long-press-then-drag-left-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-right-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-to-select-text.html: Ditto.
* fast/events/touch/ios/long-press-then-drag-up-to-change-selected-text.html: Ditto.
* fast/events/touch/ios/long-press-to-select-and-tap-to-clear.html: Ditto.
* fast/events/touch/ios/long-press-to-select-text.html: Ditto.
* resources/basic-gestures.js: Renamed from LayoutTests/fast/events/touch/ios/resources/basic-gestures.js.
* resources/ui-debugging.js: Renamed from LayoutTests/fast/events/touch/ios/resources/ui-debugging.js.
Note that this file was introduced in r222517 but seems unused for now.

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

19 months agoMake in-process MessagePorts be (mostly) asynchronous
beidson@apple.com [Fri, 19 Jan 2018 06:33:11 +0000 (06:33 +0000)]
Make in-process MessagePorts be (mostly) asynchronous
https://bugs.webkit.org/show_bug.cgi?id=181454

Reviewed by Alex Christensen.

No new tests (Covered *brutally* by existing tests)

Part of making MessagePorts be a thing we can pass across processes is making them work async.

The existing "MessagePortChannel" method of abstraction was not cut out for this.
This patch gets rid of MessagePortChannel and adds a new MessagePortChannelProvider abstraction.
It then gets the new machinery working in-process (with some pieces of out-of-process in place)

One synchronous behavior this patch maintains is the hasPendingActivity() check used to support GC.
That will (creatively) be made async in the next followup.

More generally from MessagePorts, this patch also adds a "MessageWithMessagePorts" object to be used
with all forms of postMessage(). Much better.

* CMakeLists.txt:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

* dom/InProcessMessagePortChannel.cpp: Removed.
* dom/InProcessMessagePortChannel.h: Removed.
* dom/MessagePortChannel.cpp: Removed.
* dom/MessagePortChannel.h: Removed.

* dom/MessageChannel.cpp:
(WebCore::MessageChannel::create):
(WebCore::MessageChannel::MessageChannel):
(WebCore::m_port2): Deleted.
* dom/MessageChannel.h:
(WebCore::MessageChannel::create): Deleted.

* dom/MessagePort.cpp:
(WebCore::MessagePort::create):
(WebCore::MessagePort::MessagePort):
(WebCore::MessagePort::~MessagePort):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::messageAvailable):
(WebCore::MessagePort::start):
(WebCore::MessagePort::close):
(WebCore::MessagePort::contextDestroyed):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::hasPendingActivity const):
(WebCore::MessagePort::locallyEntangledPort const):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
(WebCore::MessagePort::entangleWithRemote): Deleted.
* dom/MessagePort.h:

* dom/MessagePortIdentifier.h:
(WebCore::MessagePortIdentifier::logString const):

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::processMessageWithMessagePortsSoon):
(WebCore::ScriptExecutionContext::dispatchMessagePortEvents):
(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon): Deleted.
* dom/ScriptExecutionContext.h:

Add a single object that represents two intertwined ports, tracks their pending
messages, tracks which process they're in, etc etc:
* dom/messageports/MessagePortChannel.cpp: Added.
(WebCore::MessagePortChannel::create):
(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::~MessagePortChannel):
(WebCore::MessagePortChannel::includesPort):
(WebCore::MessagePortChannel::entanglePortWithProcess):
(WebCore::MessagePortChannel::disentanglePort):
(WebCore::MessagePortChannel::closePort):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::takeAllMessagesForPort):
(WebCore::MessagePortChannel::hasAnyMessagesPendingOrInFlight const):
* dom/messageports/MessagePortChannel.h: Added.
(WebCore::MessagePortChannel::port1 const):
(WebCore::MessagePortChannel::port2 const):
(WebCore::MessagePortChannel::logString const):

Abstraction for creating and operating on MessagePorts in a potentially cross-process way:
* dom/messageports/MessagePortChannelProvider.cpp: Added.
(WebCore::MessagePortChannelProvider::singleton):
(WebCore::MessagePortChannelProvider::setSharedProvider):
* dom/messageports/MessagePortChannelProvider.h: Added.
(WebCore::MessagePortChannelProvider::~MessagePortChannelProvider):

Adds a concrete implementation of that provider to be used in-process (e.g. WK1):
* dom/messageports/MessagePortChannelProviderImpl.cpp: Added.
(WebCore::MessagePortChannelProviderImpl::~MessagePortChannelProviderImpl):
(WebCore::MessagePortChannelProviderImpl::performActionOnAppropriateThread):
(WebCore::MessagePortChannelProviderImpl::createNewMessagePortChannel):
(WebCore::MessagePortChannelProviderImpl::entangleLocalPortInThisProcessToRemote):
(WebCore::MessagePortChannelProviderImpl::messagePortDisentangled):
(WebCore::MessagePortChannelProviderImpl::messagePortClosed):
(WebCore::MessagePortChannelProviderImpl::postMessageToRemote):
(WebCore::MessagePortChannelProviderImpl::takeAllMessagesForPort):
(WebCore::MessagePortChannelProviderImpl::hasMessagesForPorts_temporarySync):
* dom/messageports/MessagePortChannelProviderImpl.h: Added.

Adds a main thread object to handle the set of all MessagePortChannels that are open.
For now it lives in the WebProcess, but for out-of-process it will live in the UIProcess:
* dom/messageports/MessagePortChannelRegistry.cpp: Added.
(WebCore::MessagePortChannelRegistry::~MessagePortChannelRegistry):
(WebCore::MessagePortChannelRegistry::didCreateMessagePortChannel):
(WebCore::MessagePortChannelRegistry::messagePortChannelCreated):
(WebCore::MessagePortChannelRegistry::messagePortChannelDestroyed):
(WebCore::MessagePortChannelRegistry::didEntangleLocalToRemote):
(WebCore::MessagePortChannelRegistry::didDisentangleMessagePort):
(WebCore::MessagePortChannelRegistry::didCloseMessagePort):
(WebCore::MessagePortChannelRegistry::didPostMessageToRemote):
(WebCore::MessagePortChannelRegistry::takeAllMessagesForPort):
(WebCore::MessagePortChannelRegistry::hasMessagesForPorts_temporarySync): This is named against style
  and weird on purpose - to call attention to how bad it is and how it's temporary.
(WebCore::MessagePortChannelRegistry::existingChannelContainingPort):
* dom/messageports/MessagePortChannelRegistry.h: Added.

Add an object that represents a "SerializedScriptValue for the message payload and the ports
that are being transferred along with that payload". This is used in all forms of postMessage():
* dom/messageports/MessageWithMessagePorts.cpp: Added.
* dom/messageports/MessageWithMessagePorts.h: Added.

* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::PostMessageTimer):
(WebCore::PostMessageTimer::event):
(WebCore::DOMWindow::postMessage):

* platform/Logging.h:

* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):

* workers/Worker.cpp:
(WebCore::Worker::postMessage):

* workers/WorkerGlobalScopeProxy.h:

* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:

* workers/WorkerObjectProxy.h:

* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::postMessage):

* workers/service/ServiceWorkerClient.cpp:
(WebCore::ServiceWorkerClient::postMessage):

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::postMessageToServiceWorker):

* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::fireMessageEvent):
(WebCore::ServiceWorkerThread::postMessageToServiceWorker):
* workers/service/context/ServiceWorkerThread.h:

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

19 months agoMark platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 06:17:19 +0000 (06:17 +0000)]
Mark platform/mac/webrtc/captureCanvas-webrtc-software-encoder.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=180171

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

19 months agoMark inspector/debugger/breakpoint-action-log.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 06:11:01 +0000 (06:11 +0000)]
Mark inspector/debugger/breakpoint-action-log.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181839

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

19 months agoMark storage/websql/database-lock-after-reload.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 06:04:53 +0000 (06:04 +0000)]
Mark storage/websql/database-lock-after-reload.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173928

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

19 months agoMark imported/w3c/web-platform-tests/IndexedDB/idbdatabase-createObjectStore-exceptio...
ryanhaddad@apple.com [Fri, 19 Jan 2018 06:04:51 +0000 (06:04 +0000)]
Mark imported/w3c/web-platform-tests/IndexedDB/idbdatabase-createObjectStore-exception-order.htm as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172243

Unreviewed test gardening.

* TestExpectations:

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

19 months agoMark js/slow-stress/Int32Array-alloc-huge-long-lived.html as slow on iOS.
ryanhaddad@apple.com [Fri, 19 Jan 2018 05:55:15 +0000 (05:55 +0000)]
Mark js/slow-stress/Int32Array-alloc-huge-long-lived.html as slow on iOS.
https://bugs.webkit.org/show_bug.cgi?id=181838

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

19 months agoAdd support for builderNameToIDMap in BuildbotSyncer
aakash_jain@apple.com [Fri, 19 Jan 2018 05:42:39 +0000 (05:42 +0000)]
Add support for builderNameToIDMap in BuildbotSyncer
https://bugs.webkit.org/show_bug.cgi?id=176526

Reviewed by Ryosuke Niwa.

* tools/js/buildbot-syncer.js:
(BuildbotSyncer._loadConfig): Added builderNameToIDMap parameter. It would be used later on.
(BuildbotSyncer._resolveBuildersWithPlatforms): Ditto.
(BuildbotSyncer._validateAndMergeConfig): Added builderID as a valid config parameter.
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.getBuilderNameToIDMap): Method to fetch BuilderNameToIDMap from Buildbot 0.9.
(BuildbotTriggerable.prototype.getBuilderNameToIDMapDeprecated): Method to fetch BuilderNameToIDMap from Buildbot 0.8.
(BuildbotTriggerable.prototype.initSyncers): Updated to use getBuilderNameToIDMap.
* unit-tests/buildbot-syncer-tests.js: Updated unit-tests.
* server-tests/resources/mock-data.js:
(MockData.buildbotBuildersURLDeprecated): URL for fetching Builders list.
(MockData.buildbotBuildersURL): Ditto for Buildbot 0.9
(MockData.mockBuildbotBuildersDeprecated): Sample builders data for Buildbot 0.8
(MockData.mockBuildbotBuilders): Ditto for Buildbot 0.9
* server-tests/tools-buildbot-triggerable-tests.js: Added test for getBuilderNameToIDMap. Updated tests to handle
newly added promise for fetching builders list from Buildbot.
* server-tests/tools-sync-buildbot-integration-tests.js: Ditto.

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

19 months agoMark media/W3C/video/networkState/networkState_during_loadstart.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 04:55:46 +0000 (04:55 +0000)]
Mark media/W3C/video/networkState/networkState_during_loadstart.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=179643

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

19 months agoCharts can be empty when values are all identical
rniwa@webkit.org [Fri, 19 Jan 2018 04:46:45 +0000 (04:46 +0000)]
Charts can be empty when values are all identical
https://bugs.webkit.org/show_bug.cgi?id=181828

Reviewed by Alexey Proskuryakov.

Fixed the bug that when SampleVarianceUpperTriangularMatrix can store -Infinity as the initial cost
of some entries when the sample standard deviation between two points turns out to be 0,
and cause splitIntoSegmentsUntilGoodEnough to return undefiend because no segmentation has a finite cost.

Also fixed the bug that the time series chart fails to show any data points when all data points have
identical values as the entire y-coordinate gets collapsed to an empty value range by adjusting the max value
when min & max values are identical.

* public/v3/components/time-series-chart.js:
(TimeSeriesChart.prototype._ensureValueRangeCache): Raise the max slightly when min & max are identical
to avoid the chart becoming empty. Otherwise valueDiff in _computeVerticalRenderingMetrics becomes 0
and value-to-y-coordinate conversion always results in NaN.
* public/shared/statistics.js:
(Statistics..SampleVarianceUpperTriangularMatrix):
* unit-tests/statistics-tests.js: Added a test case.

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

19 months agoMark media/video-main-content-allow-then-deny.html as flaky.
ryanhaddad@apple.com [Fri, 19 Jan 2018 04:33:17 +0000 (04:33 +0000)]
Mark media/video-main-content-allow-then-deny.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181830

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

19 months agoUpdate TestExpectations for fast/multicol/spanner-crash-when-adding-summary.html.
ryanhaddad@apple.com [Fri, 19 Jan 2018 04:29:33 +0000 (04:29 +0000)]
Update TestExpectations for fast/multicol/spanner-crash-when-adding-summary.html.

Unreviewed test gardening.

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

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

19 months agoMark imported/w3c/web-platform-tests/service-workers/service-worker/update-after...
ryanhaddad@apple.com [Fri, 19 Jan 2018 04:25:52 +0000 (04:25 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=181499

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

19 months agoUnreviewed build fix, removed unused lambda capture.
ryanhaddad@apple.com [Fri, 19 Jan 2018 01:35:06 +0000 (01:35 +0000)]
Unreviewed build fix, removed unused lambda capture.

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest):

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

19 months agoWe should be able to terminate service workers that are unresponsive
cdumez@apple.com [Fri, 19 Jan 2018 00:57:42 +0000 (00:57 +0000)]
We should be able to terminate service workers that are unresponsive
https://bugs.webkit.org/show_bug.cgi?id=181563
<rdar://problem/35280031>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/workers/service/postmessage-after-terminating-hung-worker.html

* workers/service/context/SWContextManager.cpp:
(WebCore::SWContextManager::terminateWorker):
Before calling WorkerThread::stop(), set a timer with the given timeout parameter.
If the worker thread has not stopped when the timer fires, forcefully exit the
service worker process. The StorageProcess will take care of relaunching the
service worker process if it exits abruptly.

(WebCore::SWContextManager::serviceWorkerFailedToTerminate):
Log error message if we failed to terminate a service worker and call exit().

(WebCore::SWContextManager::ServiceWorkerTerminationRequest::ServiceWorkerTerminationRequest):

* workers/service/context/SWContextManager.h:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::terminateWorker):
Use a 10 second timeout for forcefully exiting the service worker process when
the service worker in question fails to terminate.

(WebKit::WebSWContextManagerConnection::syncTerminateWorker):
Use a 100ms timeout for forcefully exiting the service worker process when
the service worker in question fails to terminate. This method is only called
from the layout tests, which is why we use a very short timeout.

Source/WTF:

* wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifier::loggingString const):
Allow using loggingString() from RELEASE_LOG().

LayoutTests:

Add layout test coverage.

* http/tests/workers/service/postmessage-after-terminating-hung-worker-expected.txt: Added.
* http/tests/workers/service/postmessage-after-terminating-hung-worker.html: Added.
* http/tests/workers/service/resources/postmessage-after-terminating-hung-worker.js: Added.
* http/tests/workers/service/resources/postmessage-echo-worker-mayhang.js: Added.

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

19 months agoBuild fix, remove a call to -[NSWindow setOneShot:]
ap@apple.com [Fri, 19 Jan 2018 00:43:56 +0000 (00:43 +0000)]
Build fix, remove a call to -[NSWindow setOneShot:]
https://bugs.webkit.org/show_bug.cgi?id=181809

Reviewed by Tim Horton.

* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _buildUI]):

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

19 months ago[WinCairo] Pass correct url for http test to test driver.
commit-queue@webkit.org [Fri, 19 Jan 2018 00:25:48 +0000 (00:25 +0000)]
[WinCairo] Pass correct url for http test to test driver.
https://bugs.webkit.org/show_bug.cgi?id=181814

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-01-18
Reviewed by Alex Christensen.

* Scripts/webkitpy/port/driver.py:
(Driver):
(Driver.http_test_path_to_uri):
(Driver.is_secure_path):
(Driver.http_base_url):
(Driver.uri_to_test):

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

19 months agoUnreviewed, update the triggerable name for 'sierra-release-perf-tests'
ryanhaddad@apple.com [Fri, 19 Jan 2018 00:19:00 +0000 (00:19 +0000)]
Unreviewed, update the triggerable name for 'sierra-release-perf-tests'

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

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

19 months agoSet the minimum executable allocator size properly
jfbastien@apple.com [Thu, 18 Jan 2018 23:53:23 +0000 (23:53 +0000)]
Set the minimum executable allocator size properly
https://bugs.webkit.org/show_bug.cgi?id=181816
<rdar://problem/36635533>

Reviewed by Saam Barati.

Executable allocator expects at least two page size's worth of
allocation in certain conditions, and that causes some tests to
now fail because they ask for less. Set that minimum correctly. We
were already rounding up to a page size, so having a minimum of 2
page sizes is fine.

* jit/ExecutableAllocator.cpp:
(JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):

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

19 months agoUnreviewed, suppress deprecation warnings to fix the build with a newer SDK.
ryanhaddad@apple.com [Thu, 18 Jan 2018 23:39:27 +0000 (23:39 +0000)]
Unreviewed, suppress deprecation warnings to fix the build with a newer SDK.

Source/WebKit:

* UIProcess/ios/WKPDFPageNumberIndicator.mm:
(-[WKPDFPageNumberIndicator _makeRoundedCorners]):

Source/WebKitLegacy/mac:

* Carbon/HIWebView.mm:
(overrideCGContext):
(restoreCGContext):

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

19 months agoDon't fetch more than two builds to check duplicity of builds in ReportProcessor
rniwa@webkit.org [Thu, 18 Jan 2018 23:01:46 +0000 (23:01 +0000)]
Don't fetch more than two builds to check duplicity of builds in ReportProcessor
https://bugs.webkit.org/show_bug.cgi?id=181786

Reviewed by Wenson Hsieh.

Limit the number of builds to check to avoid using a lot of memory with a long delay.

* public/include/report-processor.php:
(ReportProcessor::resolve_build_id):

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

19 months ago2018-01-18 Michael Saboff <msaboff@apple.com>
msaboff@apple.com [Thu, 18 Jan 2018 22:43:01 +0000 (22:43 +0000)]
2018-01-18  Michael Saboff  <msaboff@apple.com>

Unreviewed build fix for Windows

* interpreter/FrameTracers.h:
(JSC::assertStackPointerIsAligned): Can't use gcc style inlined assembly
on Windows.

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

19 months agoDo not go to the storage process when loading a main resource if there is no service...
commit-queue@webkit.org [Thu, 18 Jan 2018 21:12:55 +0000 (21:12 +0000)]
Do not go to the storage process when loading a main resource if there is no service worker registered
https://bugs.webkit.org/show_bug.cgi?id=181395

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-18
Reviewed by Chris Dumez.

Source/WebCore:

No observable behavior change.
Instead of creating a connection to know whether there is a potential service worker,
Ask the service worker provider that will use the connection if needed.
Otherwise, it will use a default value provided by the UIProcess.

Tested by cleaning all service workers and checking the computed value of the default value,
then observing whether pages registering service workers work well.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* workers/service/ServiceWorkerProvider.cpp:
(WebCore::ServiceWorkerProvider::mayHaveServiceWorkerRegisteredForOrigin):
* workers/service/ServiceWorkerProvider.h:

Source/WebKit:

Add a new web process creation parameter to know whether there is any service worker registered at web process creation time.
If there is none, the web process will then start to load HTTP resources from the network.
The connection to the storage process is then executed when receiving the first bytes of the main resource.
This connection is needed as other web processes may create service workers at any given time.
If there is one registered service worker, the web process will wait for its connection to the storage process to be active.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/ServiceWorkerProcessProxy.cpp:
(WebKit::ServiceWorkerProcessProxy::hasRegisteredServiceWorkers):
* UIProcess/ServiceWorkerProcessProxy.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::existingServiceWorkerConnectionForSession):
* WebProcess/Storage/WebServiceWorkerProvider.h:
* WebProcess/Storage/WebToStorageProcessConnection.h:
(WebKit::WebToStorageProcessConnection::existingServiceWorkerConnectionForSession):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

19 months agoPoisons should be initialized after Options are initialized.
mark.lam@apple.com [Thu, 18 Jan 2018 21:00:58 +0000 (21:00 +0000)]
Poisons should be initialized after Options are initialized.
https://bugs.webkit.org/show_bug.cgi?id=181807
<rdar://problem/36629138>

Reviewed by Keith Miller.

This is because poison initialization may depend on options.

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):

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

19 months agoAX: roles-computedRoleString.html layout test should support enabling/disabling indiv...
jdiggs@igalia.com [Thu, 18 Jan 2018 20:39:12 +0000 (20:39 +0000)]
AX: roles-computedRoleString.html layout test should support enabling/disabling individual test cases
https://bugs.webkit.org/show_bug.cgi?id=181806

Reviewed by Chris Fleizach.

Add a "data-platform" attribute to each element so that we can enable or disable
a given test case on a given platform. Update the platform expectations for GTK
to reflect changes and new support which happened in the interim. And remove the
test from the list of expected failures.

* accessibility/roles-computedRoleString.html:
* platform/gtk/TestExpectations:
* platform/gtk/accessibility/roles-computedRoleString-expected.txt:

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

19 months agoRegression(r223149): WebProcessProxy::didClose() no longer refs WebPageProxy objects
cdumez@apple.com [Thu, 18 Jan 2018 20:10:58 +0000 (20:10 +0000)]
Regression(r223149): WebProcessProxy::didClose() no longer refs WebPageProxy objects
https://bugs.webkit.org/show_bug.cgi?id=181771
<rdar://problem/36566237>

Reviewed by Brady Eidson.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didClose):
Use copyToVectorOf<RefPtr<WebPageProxy>>() to maintain pre-r223149 behavior
and ref the pages.

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

19 months ago[Xcode] Streamline and future-proof target-macOS-version-dependent build setting...
mitz@apple.com [Thu, 18 Jan 2018 19:49:51 +0000 (19:49 +0000)]
[Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
https://bugs.webkit.org/show_bug.cgi?id=181803

Reviewed by Tim Horton.

Source/bmalloc:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.

Source/JavaScriptCore:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
* Configurations/Version.xcconfig: Updated.
* Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
  useful for defining settings that depend on the target macOS version.

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.

Source/ThirdParty/libwebrtc:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
  useful for defining settings that depend on the target macOS version.
* Configurations/opus.xcconfig: Adopted macOSTargetConditionals helper.

Source/WebCore:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
* Configurations/Version.xcconfig: Updated.
* Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
  useful for defining settings that depend on the target macOS version.

Source/WebCore/PAL:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
* Configurations/Version.xcconfig: Updated.
* Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
  useful for defining settings that depend on the target macOS version.

Source/WebInspectorUI:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/Version.xcconfig: Ditto.

Source/WebKit:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
* Configurations/Version.xcconfig: Updated.
* Configurations/macOSTargetConditionals.xcconfig: Added.  Defines helper build settings
  useful for defining settings that depend on the target macOS version.

Source/WebKitLegacy/mac:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Ditto.
* Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals helpers.
* Configurations/Version.xcconfig: Updated.
* Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build settings
  useful for defining settings that depend on the target macOS version.

Source/WTF:

* Configurations/Base.xcconfig: Updated.
* Configurations/DebugRelease.xcconfig: Updated.

Tools:

* DumpRenderTree/mac/Configurations/Base.xcconfig: Updated.
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Ditto.
* ImageDiff/cg/Configurations/Base.xcconfig: Ditto.
* ImageDiff/cg/Configurations/DebugRelease.xcconfig: Ditto.
* MiniBrowser/Configurations/Base.xcconfig: Ditto.
* MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/Base.xcconfig: Ditto.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals
  helpers.
* TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build
  settings useful for defining settings that depend on the target macOS version.
* WebKitTestRunner/Configurations/Base.xcconfig: Updated.
* WebKitTestRunner/Configurations/DebugRelease.xcconfig: Updated.

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

19 months agoWeb Inspector: Canvas Tab: record button on canvas card doesn't always show on hover...
webkit@devinrousso.com [Thu, 18 Jan 2018 19:41:00 +0000 (19:41 +0000)]
Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
https://bugs.webkit.org/show_bug.cgi?id=179183

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CanvasOverviewContentView.css:
(.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.

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

19 months agoRemove Opensource El Capitan queues from buildbot
lingcherd_ho@apple.com [Thu, 18 Jan 2018 19:01:26 +0000 (19:01 +0000)]
Remove Opensource El Capitan queues from buildbot
https://bugs.webkit.org/show_bug.cgi?id=181712

Reviewed by Aakash Jain.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:

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

19 months agoService Workers restored from persistent storage have 'redundant' state
cdumez@apple.com [Thu, 18 Jan 2018 18:46:43 +0000 (18:46 +0000)]
Service Workers restored from persistent storage have 'redundant' state
https://bugs.webkit.org/show_bug.cgi?id=181749
<rdar://problem/36556486>

Reviewed by Youenn Fablet.

Source/WebCore:

Tested by new API test.

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::installContextData):
Make sure the SWServerWorker's state is set to "activated" after it is assigned to
the registrations' active slot. Otherwise, it stays in its default state (redundant).

Source/WebKit:

Allow service workers to intercept custom protocol loads as this is useful for
API testing.

* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::tryLoadingUsingURLSchemeHandler):
* WebProcess/Network/WebLoaderStrategy.h:

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[SWMessageHandlerForFetchTest userContentController:didReceiveScriptMessage:]):

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

19 months agoREGRESSION (r226068): [X86] Crash in JavaScriptCore ShadowChicken when handling excep...
msaboff@apple.com [Thu, 18 Jan 2018 18:44:30 +0000 (18:44 +0000)]
REGRESSION (r226068): [X86] Crash in JavaScriptCore ShadowChicken when handling exceptions
https://bugs.webkit.org/show_bug.cgi?id=181802

Reviewed by Filip Pizlo.

There where a few places where the stack isn't properly aligned for X86 when we call into C++ code.
Two places are where we call into exception handling code, the LLInt and from nativeForGenerator.
The other place was when we call into the operationOSRWriteBarrier().

Added an assert check that the stack is aligned on X86 platforms in the native call tracing code.
This helped find the other cases beyond the original problem.

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::osrWriteBarrier):
* interpreter/FrameTracers.h:
(JSC::assertStackPointerIsAligned):
(JSC::NativeCallFrameTracer::NativeCallFrameTracer):
(JSC::NativeCallFrameTracerWithRestore::NativeCallFrameTracerWithRestore):
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* llint/LowLevelInterpreter32_64.asm:

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

19 months ago[GTK] AX: Two layout tests crash with error 'g_strstr_len: assertion 'haystack !...
jdiggs@igalia.com [Thu, 18 Jan 2018 18:38:15 +0000 (18:38 +0000)]
[GTK] AX: Two layout tests crash with error 'g_strstr_len: assertion 'haystack != NULL' failed' in Accessibility::UIElement::url
https://bugs.webkit.org/show_bug.cgi?id=176796

Reviewed by Chris Fleizach.

Tools:

Add sanity check that we have a URL before calling g_strstr_len().

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::url):

LayoutTests:

Remove failing tests from Test Expectations. Update expected results of
xml-roles-exposed to reflect several bug fixes which were made in the
interim. Modify add-children-pseudo-element.html to account for platform
differences in the accessibility tree. Add an additional URL test because
we didn't have coverage for getting the URL of accessible links resulting
from native anchor elements.

* accessibility/add-children-pseudo-element.html: Modified.
* accessibility/gtk/link-url-expected.txt: Added.
* accessibility/gtk/link-url.html: Added.
* accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
* platform/gtk/TestExpectations: Removed failing tests.
* platform/gtk/accessibility/add-children-pseudo-element-expected.txt: Added.

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

19 months agoAdd triggers for Sierra test262 and perf queues
ryanhaddad@apple.com [Thu, 18 Jan 2018 18:31:42 +0000 (18:31 +0000)]
Add triggers for Sierra test262 and perf queues
https://bugs.webkit.org/show_bug.cgi?id=181799

Reviewed by Aakash Jain.

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

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

19 months agoMarked multiple imported/w3c/web-platform-tests/service-workers/ test as flaky
jlewis3@apple.com [Thu, 18 Jan 2018 18:12:58 +0000 (18:12 +0000)]
Marked multiple imported/w3c/web-platform-tests/service-workers/ test as flaky
https://bugs.webkit.org/show_bug.cgi?id=181750

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

19 months agoREGRESSION(r225650): The scores of MotionMark tests Multiply and Leaves dropped by 8%
antti@apple.com [Thu, 18 Jan 2018 17:50:00 +0000 (17:50 +0000)]
REGRESSION(r225650): The scores of MotionMark tests Multiply and Leaves dropped by 8%
https://bugs.webkit.org/show_bug.cgi?id=181460
<rdar://problem/36379776>

Reviewed by Ryosuke Niwa.

* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):

Don't do the expensive security origin test if the supplied sheet base URL is null. This
is true for rules coming from the same document.

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

19 months agoREGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search...
bfulgham@apple.com [Thu, 18 Jan 2018 17:49:44 +0000 (17:49 +0000)]
REGRESSION(r225858): Sandbox violations due to blocked access to Spotlight search preferences
https://bugs.webkit.org/show_bug.cgi?id=181797
<rdar://problem/36546412>

Reviewed by Eric Carlson.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Add the read permission for
'com.apple.lookup.shared' to support DataDetectors.

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

19 months agoREGRESSION (r223604): Setting :before/after pseudo element on <noscript> asserts
antti@apple.com [Thu, 18 Jan 2018 17:37:28 +0000 (17:37 +0000)]
REGRESSION (r223604): Setting :before/after pseudo element on <noscript> asserts
https://bugs.webkit.org/show_bug.cgi?id=181795
<rdar://problem/36334524>

Reviewed by David Kilzer.

Source/WebCore:

<noscript> disallows renderer generation outside CSS mechanisms, however we would still construct
PseudoElements for them during style resolution. These were never removed properly because the
pseudo element removal was tied to render tree teardown. Without proper removal the associated
animations were also not canceled.

Test: fast/css-generated-content/noscript-pseudo-anim-crash.html

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

Take care to get rid of PseudoElements when the element is removed from the tree.
This also cancels any associated animations.

LayoutTests:

* fast/css-generated-content/noscript-pseudo-anim-crash-expected.txt: Added.
* fast/css-generated-content/noscript-pseudo-anim-crash.html: Added.

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

19 months agoAX: Aria-activedescendant not supported
cfleizach@apple.com [Thu, 18 Jan 2018 17:26:23 +0000 (17:26 +0000)]
AX: Aria-activedescendant not supported
https://bugs.webkit.org/show_bug.cgi?id=161734
<rdar://problem/28202679>

Reviewed by Joanmarie Diggs.

Source/WebCore:

When a combo-box owns/controls a list/listbox/grid/tree, the owned element needs to check the active-descendant of the combobox when
checking if it has selected children.
The target of the selection change notification should also be the owned element in these cases.

Test: accessibility/aria-combobox-controlling-list.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectedListItem):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::canHaveSelectedChildren const):
(WebCore::AccessibilityRenderObject::selectedChildren):
* accessibility/AccessibilityRenderObject.h:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

* accessibility/aria-combobox-control-owns-elements-expected.txt: Added.
* accessibility/aria-combobox-control-owns-elements.html: Added.

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

19 months agoMark fast/forms/auto-fill-button/input-strong-password-auto-fill-button.html as faili...
pvollan@apple.com [Thu, 18 Jan 2018 16:52:35 +0000 (16:52 +0000)]
Mark fast/forms/auto-fill-button/input-strong-password-auto-fill-button.html as failing on Windows.
https://bugs.webkit.org/show_bug.cgi?id=181662

Unreviewed test gardening.

* platform/win/TestExpectations:

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

19 months ago[Xcode] Shared schemes in the WebKit workspace still have build pre-actions that...
mitz@apple.com [Thu, 18 Jan 2018 16:46:12 +0000 (16:46 +0000)]
[Xcode] Shared schemes in the WebKit workspace still have build pre-actions that invoke copy-webkitlibraries-to-product-directory
https://bugs.webkit.org/show_bug.cgi?id=181784

Reviewed by Anders Carlsson.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme: Remove the build pre-action.
* WebKit.xcworkspace/xcshareddata/xcschemes/All Tools.xcscheme: Ditto.

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

19 months agoREGRESSION (r224780): Text stroke not applied to video captions.
pvollan@apple.com [Thu, 18 Jan 2018 16:13:16 +0000 (16:13 +0000)]
REGRESSION (r224780): Text stroke not applied to video captions.
https://bugs.webkit.org/show_bug.cgi?id=181743
<rdar://problem/35874338>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: media/track/track-css-visible-stroke-expected.html
       media/track/track-css-visible-stroke.html

After r224780, it is no longer possible to mix text stroke styles with webkit
legacy text stroke styles.

* css/StyleResolver.cpp:
(WebCore::isValidCueStyleProperty):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS const):

LayoutTests:

* media/track/track-css-stroke-cues-expected.txt:
* media/track/track-css-stroke-cues.html:
* media/track/track-css-visible-stroke-expected.html: Added.
* media/track/track-css-visible-stroke.html: Added.

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

19 months ago[Payment Request] Support a default shipping address for Apple Pay
aestes@apple.com [Thu, 18 Jan 2018 15:42:08 +0000 (15:42 +0000)]
[Payment Request] Support a default shipping address for Apple Pay
https://bugs.webkit.org/show_bug.cgi?id=181754
<rdar://problem/36009733>

Reviewed by Brady Eidson.

Source/WebCore:

Move shippingContact from ApplePayPaymentRequest to ApplePayRequestBase. This allows
merchants to specify a default shipping address when using Apple Pay with Payment Request.

This also fixes a bug found during testing where
+[NSPersonNameComponentsFormatter localizedStringFromPersonNameComponents:style:options:]
would throw an exception when passed a nil NSPersonNameComponents.

Test: http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html

* Modules/applepay/ApplePayPaymentRequest.h:
* Modules/applepay/ApplePayPaymentRequest.idl:
* Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::convertAndValidate):
* Modules/applepay/ApplePayRequestBase.h:
* Modules/applepay/ApplePayRequestBase.idl:
* Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidate):
* Modules/applepay/ApplePaySessionPaymentRequest.h:
(WebCore::ApplePaySessionPaymentRequest::version const):
(WebCore::ApplePaySessionPaymentRequest::setVersion):
* Modules/applepay/cocoa/PaymentContactCocoa.mm:
(WebCore::convert):
* Modules/applepay/paymentrequest/ApplePayRequest.idl:
* testing/MockPaymentCoordinator.cpp:
(WebCore::MockPaymentCoordinator::showPaymentUI):
(WebCore::MockPaymentCoordinator::completeMerchantValidation):
* testing/MockPaymentCoordinator.h:

LayoutTests:

* http/tests/ssl/applepay/ApplePayRequestShippingContact.https-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayRequestShippingContact.https.html: Added.

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

19 months agoimported/w3c/web-platform-tests/viewport/viewport-resize-event-on-load-overflowing...
commit-queue@webkit.org [Thu, 18 Jan 2018 14:33:32 +0000 (14:33 +0000)]
imported/w3c/web-platform-tests/viewport/viewport-resize-event-on-load-overflowing-page.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181435

Patch by Ali Juma <ajuma@chromium.org> on 2018-01-18
Reviewed by Frédéric Wang.

Test gardening. The flakiness was fixed by r227054, so remove the test expectation.

* TestExpectations:

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

19 months agoUnreviewed. Update Selenium WebDriver imported tests.
carlosgc@webkit.org [Thu, 18 Jan 2018 10:11:12 +0000 (10:11 +0000)]
Unreviewed. Update Selenium WebDriver imported tests.

* imported/selenium/importer.json:
* imported/selenium/py/test/selenium/webdriver/common/executing_async_javascript_tests.py:
(reset_timeouts):

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

19 months agoLayout Test http/tests/images/image-supports-video.html is flaky
jer.noble@apple.com [Thu, 18 Jan 2018 08:33:14 +0000 (08:33 +0000)]
Layout Test http/tests/images/image-supports-video.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=181008
<rdar://problem/36143943>

Reviewed by Youenn Fablet.

Send a "Cache-control: nocache" header from the HTTP server when the image resource is
requested.

* http/tests/resources/redirect-to-video-if-accepted.php:
* platform/mac-wk1/TestExpectations:

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

19 months agoUnreviewed, rolling out r227096.
commit-queue@webkit.org [Thu, 18 Jan 2018 08:27:27 +0000 (08:27 +0000)]
Unreviewed, rolling out r227096.
https://bugs.webkit.org/show_bug.cgi?id=181788

"it caused a 15% octane regression" (Requested by saamyjoon on
#webkit).

Reverted changeset:

"Support MultiGetByOffset in the DFG"
https://bugs.webkit.org/show_bug.cgi?id=181466
https://trac.webkit.org/changeset/227096

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

19 months ago[iOS] Specify -[NSURL _title] for the associated URL when copying an image element
wenson_hsieh@apple.com [Thu, 18 Jan 2018 08:24:46 +0000 (08:24 +0000)]
[iOS] Specify -[NSURL _title] for the associated URL when copying an image element
https://bugs.webkit.org/show_bug.cgi?id=181783
<rdar://problem/35785445>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Always specify the -[NSURL _title] to be either the title specified in a PasteboardImage's inner PasteboardURL,
or if no title is specified, fall back to the user-visible URL string. This is because at least one internal
client always tries to use the -_title property to determine the title of a pasted URL, or if none is specified,
the -suggestedName. Since we need to set suggestedName to the preferred file name of the copied image and we
don't want the suggested name to become the title of the link, we need to explicitly set the link title.

In doing so, this patch also fixes a bug wherein we forget to set the _title of the NSURL we're registering to
an NSItemProvider.

Tests:  ActionSheetTests.CopyImageElementWithHREFAndTitle (new)
        ActionSheetTests.CopyImageElementWithHREF (modified)

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

Tools:

Augments an existing API test and adds a new test to make sure that the resulting NSItemProvider's NSURL when
copying an image contains a relevant title.

* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
* TestWebKitAPI/ios/UIKitSPI.h:

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

19 months agoTemporarily skip Speedometer until we fix the metrics.
rniwa@webkit.org [Thu, 18 Jan 2018 07:30:51 +0000 (07:30 +0000)]
Temporarily skip Speedometer until we fix the metrics.

* Skipped:

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

19 months agoRename config.json to config.json.sample
rniwa@webkit.org [Thu, 18 Jan 2018 07:24:43 +0000 (07:24 +0000)]
Rename config.json to config.json.sample
https://bugs.webkit.org/show_bug.cgi?id=181785

Reviewed by Wenson Hsieh.

* .gitignore: Added config.json.
* ReadMe.md: Updated the instruction.
* config.json.sample: Renamed from config.json.

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

19 months agoWebDriver: ignore the driver in selenium test names when getting expectations
carlosgc@webkit.org [Thu, 18 Jan 2018 06:51:30 +0000 (06:51 +0000)]
WebDriver: ignore the driver in selenium test names when getting expectations
https://bugs.webkit.org/show_bug.cgi?id=181738

Reviewed by Carlos Alberto Lopez Perez.

Tools:

In selenium tests, the driver is added as a parameter to every test which results in tests names like
foo[DriverName] or foo[DriverName-param2] in case of tests using more parameters. We don't want to include the
driver name in the test expectations file, so we need to remove it when querying the expectations.

* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(TestExpectationsMarker.__init__): Save the param to ignore.
(TestExpectationsMarker._item_name): Return the name of the test without the para to ignore.
(TestExpectationsMarker.pytest_collection_modifyitems): Use _item_name().
(run): Pass param to ignore to TestExpectationsMarker().
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__): Save the driver name.
(WebDriverSeleniumExecutor.run): Pass the driver name as param to ignore.

WebDriverTests:

Add some expectations for selenium tests.

* TestExpectations.json:

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

19 months ago[GTK][WPE] Show unit tests unexpectedly passing in the bots
carlosgc@webkit.org [Thu, 18 Jan 2018 06:50:12 +0000 (06:50 +0000)]
[GTK][WPE] Show unit tests unexpectedly passing in the bots
https://bugs.webkit.org/show_bug.cgi?id=181726

Reviewed by Michael Catanzaro.

Now that we have the info, let's show it also in the bots.

* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunGLibAPITests.commandComplete):

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

19 months agoUnreviewed build fixes in TestGroupResultsViewer.
rniwa@webkit.org [Thu, 18 Jan 2018 06:45:31 +0000 (06:45 +0000)]
Unreviewed build fixes in TestGroupResultsViewer.

* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.render): _renderCurrentMetricsLazily was never called.
(TestGroupResultsViewer.prototype._buildRowForMetric): Don't try to render null or NaN.

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

19 months agoFix perf dashboard tests for node v8
rniwa@webkit.org [Thu, 18 Jan 2018 06:06:50 +0000 (06:06 +0000)]
Fix perf dashboard tests for node v8
https://bugs.webkit.org/show_bug.cgi?id=181782

Reviewed by Wenson Hsieh.

Fixed the various tests for node.js v8, which is the latest LTS version.

* server-tests/api-manifest-tests.js: Replaced the missing Triggerable.acceptsTest by Triggerable.acceptedTests
after r226836.
* server-tests/api-measurement-set-tests.js: Added "Z" to the end timestamps to force UTF timezone now that Date
in node.js parses using the local timezone by default.
* server-tests/resources/test-server.js:
(TestServer.prototype._restoreDataDirectory): Fixed the bug that this function was erroneously using the async
function to rename a directory per new warnings. This code was racy, and it used to cause a test error occasionally.
* server-tests/tools-os-build-fetcher-tests.js: Fixed the assertions to make it work in the latest node.js.
* unit-tests/measurement-set-tests.js:
(waitForMeasurementSet): Wait for setTimeout to cycle through all microtasks instead of just two microtask cycles.

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

19 months agoWebVTT served via HLS never results in cues
jer.noble@apple.com [Thu, 18 Jan 2018 05:55:55 +0000 (05:55 +0000)]
WebVTT served via HLS never results in cues
https://bugs.webkit.org/show_bug.cgi?id=181773

Reviewed by Eric Carlson.

Source/WebCore:

Test: http/tests/media/hls/hls-webvtt-tracks.html

Three independant errors conspired to keep in-band WebVTT samples from parsing:

- The definition of ISOWebVTTCue::boxTypeName() was incorrect.
- ISOWebVTTCue::parse() didn't call it's superclass's parse() method (leading to an incorrect size and offset).
- Use String::fromUTF8() rather than String.adopt(StringVector&&).

* platform/graphics/iso/ISOVTTCue.cpp:
(WebCore::ISOWebVTTCue::parse):
* platform/graphics/iso/ISOVTTCue.h:
(WebCore::ISOWebVTTCue::boxTypeName):

LayoutTests:

* http/tests/media/hls/hls-webvtt-tracks-expected.txt: Added.
* http/tests/media/hls/hls-webvtt-tracks.html: Added.
* http/tests/media/resources/hls/subtitles/fileSequence0.webvtt: Added.
* http/tests/media/resources/hls/subtitles/prog_index.m3u8: Added.
* http/tests/media/resources/hls/test-webvtt.m3u8: Added.

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

19 months agoWeb Inspector: clicking on a path component that has no siblings should select it
webkit@devinrousso.com [Thu, 18 Jan 2018 05:03:26 +0000 (05:03 +0000)]
Web Inspector: clicking on a path component that has no siblings should select it
https://bugs.webkit.org/show_bug.cgi?id=181772

Reviewed by Joseph Pecoraro.

* UserInterface/Views/HierarchicalPathComponent.js:
(WI.HierarchicalPathComponent.prototype._updateSelectElement):
(WI.HierarchicalPathComponent.prototype._selectElementMouseDown):

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

19 months ago[DFG][FTL] Introduce PhantomNewRegexp and RegExpExecNonGlobalOrSticky
utatane.tea@gmail.com [Thu, 18 Jan 2018 04:17:32 +0000 (04:17 +0000)]
[DFG][FTL] Introduce PhantomNewRegexp and RegExpExecNonGlobalOrSticky
https://bugs.webkit.org/show_bug.cgi?id=181535

Reviewed by Saam Barati.

JSTests:

* stress/inserted-recovery-with-set-last-index.js: Added.
(shouldBe):
(foo):
* stress/materialize-regexp-at-osr-exit.js: Added.
(shouldBe):
(test):
* stress/materialize-regexp-cyclic-regexp-at-osr-exit.js: Added.
(shouldBe):
(test):
* stress/materialize-regexp-cyclic-regexp.js: Added.
(shouldBe):
(test):
(i.switch):
* stress/materialize-regexp-cyclic.js: Added.
(shouldBe):
(test):
(i.switch):
* stress/materialize-regexp-referenced-from-phantom-regexp-cyclic.js: Added.
(bar):
(foo):
(test):
* stress/materialize-regexp-referenced-from-phantom-regexp.js: Added.
(bar):
(foo):
(test):
* stress/materialize-regexp.js: Added.
(shouldBe):
(test):
* stress/phantom-regexp-regexp-exec.js: Added.
(shouldBe):
(test):
* stress/phantom-regexp-string-match.js: Added.
(shouldBe):
(test):
* stress/regexp-last-index-sinking.js: Added.
(shouldBe):
(test):

Source/JavaScriptCore:

When executing the code like `string.match(/regexp/)`, `/regexp/` object is created every time we execute this code.
However, user rarely cares about this `/regexp/` object. Typically, it is soon discarded even if it has `lastIndex`
information. So we should not create RegExpObject for this typical case.

This patch introduces PhantomNewRegexp. We convert NewRegexp node to PhantomNewRegexp in Object Allocation Sinking (OAS)
phase. We should do this analysis in OAS phase since we track modifications to `lastIndex` in the OAS phase. Even if
`lastIndex` is modified, it may not be read by users. So we have a chance to drop this NewRegexp beacause we carefully model
SetRegExpObjectLastIndex and GetRegExpObjectLastIndex in OAS phase.

This patch is a first attempt to drop NewRegexp. So we start optimizing it with the simple step: we first drop RegExp with
non-global and non-sticky one. We can later extend this optimization for RegExp with global flag. But this is not included
in this patch.

We convert RegExpExec to RegExpExecNonGlobalOrSticky if we find that the given RegExpObject's RegExp is not global/sticky
flagged. Since we do not need to touch `lastIndex` property in this case, RegExpExecNonGlobalOrSticky just takes RegExp
instead of RegExpObject. This offers the chance to make NewRegExp unused.

We also convert RegExpMatchFast to RegExpExecNonGlobalOrSticky if its RegExpObject's RegExp is non-global and non-sticky,
since they are the same behavior.

The above optimization completely removes NewRegexp in SixSpeed's regexp-u.{es5,es6}. The resulted execution time is
somewhat pure execution time of our Yarr implementation.

                             baseline                  patched

    regex-u.es5          34.8557+-0.5963     ^      6.1507+-0.5526        ^ definitely 5.6670x faster
    regex-u.es6          89.1919+-3.3851     ^     32.0917+-0.4260        ^ definitely 2.7793x faster

This patch does not change Octane/RegExp so much since it heavily uses String.prototype.replace, which is not handled in
this patch right now. We should support StringReplace node in subsequent patches.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGClobbersExitState.cpp:
(JSC::DFG::clobbersExitState):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGMayExit.cpp:
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToRegExpExecNonGlobalOrSticky):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToPhantomNewRegexp):
(JSC::DFG::Node::convertToSetRegExpObjectLastIndex):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::isPhantomAllocation):
(JSC::DFG::Node::hasIgnoreLastIndexIsWritable):
(JSC::DFG::Node::ignoreLastIndexIsWritable):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGPromotedHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGPromotedHeapLocation.h:
(JSC::DFG::PromotedLocationDescriptor::neededForMaterialization const):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewRegexp):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):
(JSC::DFG::SpeculativeJIT::compileRegExpExecNonGlobalOrSticky):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGValidate.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileRegExpExecNonGlobalOrSticky):
(JSC::FTL::DFG::LowerDFGToB3::compileNewRegexp):
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):
* jit/JITOperations.h:
* runtime/RegExpObject.h:
(JSC::RegExpObject::create):

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

19 months ago[FTL] Remove unused helper functions to convert node to PutHint
utatane.tea@gmail.com [Thu, 18 Jan 2018 03:15:26 +0000 (03:15 +0000)]
[FTL] Remove unused helper functions to convert node to PutHint
https://bugs.webkit.org/show_bug.cgi?id=181775

Reviewed by Saam Barati.

We are using PromotedHeapLocation::createHint. So they are not necessary.

* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutHint): Deleted.
(JSC::DFG::Node::convertToPutStructureHint): Deleted.
(JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
(JSC::DFG::Node::convertToPutClosureVarHint): Deleted.
* dfg/DFGNode.h:

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

19 months agoUnreviewed, suppress warnings on GCC
utatane.tea@gmail.com [Thu, 18 Jan 2018 02:45:46 +0000 (02:45 +0000)]
Unreviewed, suppress warnings on GCC

Since `length` and `p` are always positive or zero,
static_cast<unsigned>() does what we want.

* runtime/JSBigInt.cpp:
(JSC::JSBigInt::parseInt):

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

19 months agoDisable Atomics when SharedArrayBuffer isn’t enabled
sbarati@apple.com [Thu, 18 Jan 2018 01:58:25 +0000 (01:58 +0000)]
Disable Atomics when SharedArrayBuffer isn’t enabled
https://bugs.webkit.org/show_bug.cgi?id=181572
<rdar://problem/36553206>

Reviewed by Michael Saboff.

JSTests:

* stress/isLockFree.js:

Source/JavaScriptCore:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::createAtomicsProperty): Deleted.

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

19 months agoResource Load Statistics: Block cookies for prevalent resources without user interaction
wilander@apple.com [Thu, 18 Jan 2018 01:58:05 +0000 (01:58 +0000)]
Resource Load Statistics: Block cookies for prevalent resources without user interaction
https://bugs.webkit.org/show_bug.cgi?id=177394
<rdar://problem/34613960>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect.html
       http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html
       http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html
       http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html

* platform/network/NetworkStorageSession.h:
    Now exports NetworkStorageSession::nsCookieStorage().
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::setPrevalentDomainsToPartitionOrBlockCookies):
    Fixes the FIXME.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h:
    Declaration of _initWithIdentifier() on NSHTTPCookieStorage.

Source/WebKit:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
    Now has m_hasBeenSetToUseStatelessCookieStorage to handle
    cookie blocking.
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::statelessCookieStorage):
    Returns singleton empty, deny-all cookie storage for cookie blocking.
    The ugly pragma instructions for clang are because the NSString
    parameter for _initWithIdentifier was not marked nullable pre-Sierra.
(WebKit::NetworkDataTaskCocoa::applyCookieBlockingPolicy):
    Instead of just decision making, this now applies the policy.
(WebKit::NetworkDataTaskCocoa::applyCookiePartitioningPolicy):
    New method.
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
    Now blocks cookies for domains where cookies will be purged anyway.
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
    Now blocks cookies for domains where cookies will be purged anyway.
(WebKit::shouldChangePartition): Deleted.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
    Now downgrades for blocked cookies instead of partitioned cookies.
(-[WKNetworkSessionDelegate URLSession:task:_schemeUpgraded:completionHandler:]):
    Now downgrades for blocked cookies instead of partitioned cookies.

LayoutTests:

* http/tests/resourceLoadStatistics/add-blocking-to-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/add-blocking-to-redirect.html: Added.
* http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html:
* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-expected.txt: Added.
* http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context.html: Added.
* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-with-partitioning-timeout.html:
* http/tests/resourceLoadStatistics/remove-blocking-in-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/remove-blocking-in-redirect.html: Added.
* http/tests/resourceLoadStatistics/remove-partitioning-from-redirect-expected.txt: Removed.
* http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html: Removed.
    Test case reworked and is now remove-partitioning-in-redirect.html.
* http/tests/resourceLoadStatistics/remove-partitioning-in-redirect-expected.txt: Added.
* http/tests/resourceLoadStatistics/remove-partitioning-in-redirect.html: Added.
* platform/ios/TestExpectations:
    New tests marked as [ Pass ] for iOS.
* platform/mac-wk2/TestExpectations:
    New tests marked as [ Pass ] for High Sierra+.
* platform/wk2/TestExpectations:
    New tests skipped for WK2 in general.

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

19 months agoRemove linked-on test for Snow Leopard
dino@apple.com [Thu, 18 Jan 2018 01:47:44 +0000 (01:47 +0000)]
Remove linked-on test for Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=181770

Reviewed by Eric Carlson.

Source/WebCore:

Remove a very old linked-on-or-after test.

* platform/graphics/ca/GraphicsLayerCA.cpp:

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

19 months agoUnreviewed, rolling out r227098.
jlewis3@apple.com [Thu, 18 Jan 2018 01:31:36 +0000 (01:31 +0000)]
Unreviewed, rolling out r227098.

This broke the build.

Reverted changeset:

"Remove linked-on test for Snow Leopard"
https://bugs.webkit.org/show_bug.cgi?id=181770
https://trac.webkit.org/changeset/227098

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

19 months agoVersioning.
jmarcell@apple.com [Thu, 18 Jan 2018 00:59:26 +0000 (00:59 +0000)]
Versioning.

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

19 months agoRemove linked-on test for Snow Leopard
dino@apple.com [Thu, 18 Jan 2018 00:40:53 +0000 (00:40 +0000)]
Remove linked-on test for Snow Leopard
https://bugs.webkit.org/show_bug.cgi?id=181770

Reviewed by Eric Carlson.

Source/WebCore:

Remove a very old linked-on-or-after test.

* platform/graphics/ca/GraphicsLayerCA.cpp:

Source/WebCore/PAL:

No need for _CFExecutableLinkedOnOrAfter any more.

* pal/spi/cf/CFUtilitiesSPI.h:

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

19 months agoUnreviewed GTK+ gardening
aboya@igalia.com [Thu, 18 Jan 2018 00:39:05 +0000 (00:39 +0000)]
Unreviewed GTK+ gardening

* platform/gtk/TestExpectations:

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

19 months agoSupport MultiGetByOffset in the DFG
sbarati@apple.com [Thu, 18 Jan 2018 00:34:16 +0000 (00:34 +0000)]
Support MultiGetByOffset in the DFG
https://bugs.webkit.org/show_bug.cgi?id=181466

Reviewed by Keith Miller.

This seems to benefit Speedometer in my local testing. It seems like this
might be around a 0.5% improvement.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleGetById):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::supportsMultiGetByOffset):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

19 months ago[Curl] Use ResourceRequest::encodeWithPlatformData()
commit-queue@webkit.org [Thu, 18 Jan 2018 00:26:31 +0000 (00:26 +0000)]
[Curl] Use ResourceRequest::encodeWithPlatformData()
https://bugs.webkit.org/show_bug.cgi?id=181768

Patch by Stephan Szabo <stephan.szabo@sony.com> on 2018-01-17
Reviewed by Alex Christensen.

Source/WebCore:

No new tests, assertion hit in downstream port, should be covered by
existing tests.

* platform/network/curl/ResourceRequest.h:
(WebCore::ResourceRequest::encodeWithPlatformData const):
(WebCore::ResourceRequest::decodeWithPlatformData):

Source/WebKit:

* Shared/curl/WebCoreArgumentCodersCurl.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

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

19 months agoUse existing RGB colorspace instead of creating a new one
eric.carlson@apple.com [Thu, 18 Jan 2018 00:04:49 +0000 (00:04 +0000)]
Use existing RGB colorspace instead of creating a new one
https://bugs.webkit.org/show_bug.cgi?id=181765
<rdar://problem/36595753>

Reviewed by Dean Jackson.

* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Use sRGBColorSpaceRef instead
of creating a new static colorspace.

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

19 months agoUnreviewed, rolling out r227076.
jlewis3@apple.com [Wed, 17 Jan 2018 23:49:45 +0000 (23:49 +0000)]
Unreviewed, rolling out r227076.

This breaks internal builds

Reverted changeset:

"Resource Load Statistics: Block cookies for prevalent
resources without user interaction"
https://bugs.webkit.org/show_bug.cgi?id=177394
https://trac.webkit.org/changeset/227076

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

19 months agoinput and textarea elements should reveal selection in setSelection when focused
rniwa@webkit.org [Wed, 17 Jan 2018 23:19:45 +0000 (23:19 +0000)]
input and textarea elements should reveal selection in setSelection when focused
https://bugs.webkit.org/show_bug.cgi?id=181715
<rdar://problem/36570546>

Reviewed by Zalan Bujtas.

Made input and textarea elements reveal selection in FrameSelection::setSelection instead of by directly
invoking FrameSelection::revealSelection in their respective updateFocusAppearance to unify code paths.

Also added options to reveal selection up to the main frame to SetSelectionOption to be used in iOS.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::moveWithoutValidationTo): Takes SelectionRevealMode as an argument and converts
sets appropriate selection options.
(WebCore::FrameSelection::setSelection): Reconstruct SelectionRevealMode out of selection option sets.
(WebCore::FrameSelection::updateAndRevealSelection):
* editing/FrameSelection.h:
(WebCore::FrameSelection): Added RevealSelectionUpToMainFrame as a SelectionRevealMode and replaced
m_shouldRevealSelection by m_selectionRevealMode.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateFocusAppearance): Pass SelectionRevealMode to HTMLTextFormControlElement's
select and restoreCachedSelection instead of directly invoking FrameSelection::revealSelection.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::updateFocusAppearance): Ditto.
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::select):
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::restoreCachedSelection):
* html/HTMLTextFormControlElement.h:

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

19 months agoFix broken unittest after r227048
lingcherd_ho@apple.com [Wed, 17 Jan 2018 23:19:05 +0000 (23:19 +0000)]
Fix broken unittest after r227048
https://bugs.webkit.org/show_bug.cgi?id=181760

Reviewed by Aakash Jain.

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

19 months agoWEBKIT_FRAMEWORK should not modify file-global include directories
mcatanzaro@igalia.com [Wed, 17 Jan 2018 23:18:17 +0000 (23:18 +0000)]
WEBKIT_FRAMEWORK should not modify file-global include directories
https://bugs.webkit.org/show_bug.cgi?id=181656

Reviewed by Konstantin Tokarev.

.:

Only modify the system include directories of the target passed to WEBKIT_FRAMEWORK.

* Source/cmake/WebKitMacros.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformWPE.cmake:

Source/WebKit:

* PlatformGTK.cmake:
* PlatformWPE.cmake:

Tools:

* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/glib/CMakeLists.txt:

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

19 months ago[GTK] Try even harder not to static link WTF into libwebkit2gtk
mcatanzaro@igalia.com [Wed, 17 Jan 2018 23:16:28 +0000 (23:16 +0000)]
[GTK] Try even harder not to static link WTF into libwebkit2gtk
https://bugs.webkit.org/show_bug.cgi?id=181751

Reviewed by Alex Christensen.

We don't want two copies of WTF. It should only be in libjavascriptcoregtk.

* PlatformGTK.cmake:

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

19 months agoMarked http/wpt/resource-timing/rt-resources-per-worker.html as flaky on High Sierra.
jlewis3@apple.com [Wed, 17 Jan 2018 22:49:34 +0000 (22:49 +0000)]
Marked http/wpt/resource-timing/rt-resources-per-worker.html as flaky on High Sierra.
https://bugs.webkit.org/show_bug.cgi?id=180260

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

19 months agoMulticol: RenderMultiColumnFlow should not inherit the flow state
zalan@apple.com [Wed, 17 Jan 2018 22:37:23 +0000 (22:37 +0000)]
Multicol: RenderMultiColumnFlow should not inherit the flow state
https://bugs.webkit.org/show_bug.cgi?id=181762
<rdar://problem/35448565>

Reviewed by Simon Fraser.

Source/WebCore:

Do not compute the inherited flow state flag for RenderMultiColumnFlow.
It is (by definition) always inside a fragmented flow.

Test: fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::computedFragmentedFlowState):

LayoutTests:

* fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow-expected.txt: Added.
* fast/multicol/crash-when-out-of-flow-positioned-becomes-in-flow.html: Added.

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

19 months agoDeprecate Application Cache
achristensen@apple.com [Wed, 17 Jan 2018 22:34:16 +0000 (22:34 +0000)]
Deprecate Application Cache
https://bugs.webkit.org/show_bug.cgi?id=181764

Reviewed by Geoffrey Garen.

* features.json:

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

19 months ago[iOS] Re-enable LayoutTests in the storage/indexeddb directory
ryanhaddad@apple.com [Wed, 17 Jan 2018 22:25:05 +0000 (22:25 +0000)]
[iOS] Re-enable LayoutTests in the storage/indexeddb directory
https://bugs.webkit.org/show_bug.cgi?id=180958

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

19 months ago[iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage...
wenson_hsieh@apple.com [Wed, 17 Jan 2018 22:16:03 +0000 (22:16 +0000)]
[iOS simulator] API test WKAttachmentTests.InjectedBundleReplaceURLWhenPastingImage is failing
https://bugs.webkit.org/show_bug.cgi?id=181758

Reviewed by Tim Horton.

This test is failing because Editor::clientReplacementURLForResource expects a MIME type, but on iOS, the type
paramter passed into WebContentReader::readImage is a UTI; subsequently, the bundle editing delegate receives
a MIME type that's actually a UTI, which is incorrect. To address this, ensure that a MIME type is passed to
bundle SPI by converting the type in WebContentReader::readImage to a MIME type.

* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::WebContentReader::readImage):

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

19 months agoMark Alicia as committer in contributors.json
aboya@igalia.com [Wed, 17 Jan 2018 22:01:31 +0000 (22:01 +0000)]
Mark Alicia as committer in contributors.json

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

19 months agoREGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator:...
antti@apple.com [Wed, 17 Jan 2018 21:53:26 +0000 (21:53 +0000)]
REGRESSION (r226385?): Crash in com.apple.WebCore: WebCore::MediaQueryEvaluator::evaluate const + 32
https://bugs.webkit.org/show_bug.cgi?id=181742
<rdar://problem/36334726>

Reviewed by David Kilzer.

Source/WebCore:

Test: fast/media/mediaqueryevaluator-crash.html

* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):

Use WeakPtr<Document> instead of a plain Frame pointer.

(WebCore::MediaQueryEvaluator::evaluate const):

Get the frame via document.

* css/MediaQueryEvaluator.h:
* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):

Take care to clear style resolver.

LayoutTests:

* fast/media/mediaqueryevaluator-crash-expected.txt: Added.
* fast/media/mediaqueryevaluator-crash.html: Added.

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