WebKit-https.git
9 months ago[LFC] Rename LayoutFormattingState files to LayoutState
antti@apple.com [Sat, 8 Dec 2018 00:26:34 +0000 (00:26 +0000)]
[LFC] Rename LayoutFormattingState files to LayoutState
https://bugs.webkit.org/show_bug.cgi?id=192520

Reviewed by Zalan Bujtas.

Match the class name.

* layout/FormattingContext.cpp:
* layout/FormattingContextQuirks.cpp:
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp: Removed.
* layout/LayoutFormattingState.h: Removed.
* layout/LayoutState.cpp: Copied from Source/WebCore/layout/LayoutFormattingState.cpp.
* layout/LayoutState.h: Copied from Source/WebCore/layout/LayoutFormattingState.h.
* layout/Verification.cpp:
* layout/blockformatting/BlockFormattingContext.cpp:
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
* layout/blockformatting/BlockInvalidation.cpp:
* layout/floats/FloatAvoider.cpp:
* layout/floats/FloatingContext.cpp:
* layout/floats/FloatingState.cpp:
* layout/inlineformatting/InlineFormattingContext.cpp:
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
* layout/inlineformatting/InlineInvalidation.cpp:
* layout/layouttree/LayoutTreeBuilder.cpp:
* page/FrameViewLayoutContext.cpp:

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

9 months agoProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
cdumez@apple.com [Fri, 7 Dec 2018 23:56:07 +0000 (23:56 +0000)]
ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
https://bugs.webkit.org/show_bug.cgi?id=192362
<rdar://problem/46460360>

Reviewed by Ryosuke Niwa.

Move the call to _setCookieAcceptPolicy *after* we've constructed a WKWebView and thus
*after* we know for sure we have a network process to communicate the policy to.
This should address the failures on iOS.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

9 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 23:38:38 +0000 (23:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316
<rdar://problem/46563726>

Unreviewed.

* Source/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe: Removed.
Unneeded file.

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

9 months agoAdd keychain access entitlement to WebKitTestRunnerApp
jiewen_tan@apple.com [Fri, 7 Dec 2018 23:14:43 +0000 (23:14 +0000)]
Add keychain access entitlement to WebKitTestRunnerApp
https://bugs.webkit.org/show_bug.cgi?id=192489
<rdar://problem/45057952>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:

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

9 months agoWKWebProcessPlugInLoadDelegate should have API for saying which rendering events...
sbarati@apple.com [Fri, 7 Dec 2018 22:35:05 +0000 (22:35 +0000)]
WKWebProcessPlugInLoadDelegate should have API for saying which rendering events it wants to listen for
https://bugs.webkit.org/show_bug.cgi?id=192473

Reviewed by Andy Estes.

Source/WebKit:

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(PageLoaderClient::layoutMilestones const):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgress.mm: Added.
(-[DidFirstMeaningfulPaintRemoteObject didFirstMeaningfulPaint]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressPlugIn.mm: Added.
(-[RenderingProgressPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextControllerRenderingProgressEvents:]):
(-[RenderingProgressPlugIn webProcessPlugInBrowserContextController:renderingProgressDidChange:]):
* TestWebKitAPI/Tests/WebKitCocoa/RenderingProgressProtocol.h: Added.

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

9 months agoCSS Painting API code cleanup
justin_michaud@apple.com [Fri, 7 Dec 2018 21:57:49 +0000 (21:57 +0000)]
CSS Painting API code cleanup
https://bugs.webkit.org/show_bug.cgi?id=192480

Reviewed by Dean Jackson.

No new tests, since the existing tests should cover it.

* bindings/js/JSDOMWrapper.cpp:
(WebCore::outputConstraintSubspaceFor):
(WebCore::globalObjectOutputConstraintSubspaceFor):
* bindings/js/JSWorkletGlobalScopeBase.cpp:
(WebCore::toJS):
* css/CSSPaintCallback.h:
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::doCustomPaint):
* platform/graphics/CustomPaintImage.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::addCustomPaintWatchProperty):
(WebCore::changedCustomPaintWatchedProperty):
(WebCore::RenderStyle::changeRequiresRepaint const):
* worklets/PaintWorkletGlobalScope.cpp:
(WebCore::PaintWorkletGlobalScope::registerPaint):
* worklets/PaintWorkletGlobalScope.h:

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

9 months agoUpdate libwebrtc up to 0d007d7c4f
youenn@apple.com [Fri, 7 Dec 2018 21:38:23 +0000 (21:38 +0000)]
Update libwebrtc up to 0d007d7c4f
https://bugs.webkit.org/show_bug.cgi?id=192316

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Updating to latest libwebrtc will allows cherry-picking important bug fixes.

* Configurations/libwebrtc.iOS.exp:
* Configurations/libwebrtc.iOSsim.exp:
* Configurations/libwebrtc.mac.exp:
* Source/third_party/abseil-cpp: refreshed.
* Source/webrtc: refreshed.
* WebKit/0001-libwebrtc-changes.patch: Removed.
* libwebrtc.xcodeproj/project.pbxproj:

Source/WebCore:

Update include according new libwebrtc.

* platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

Source/WebKit:

Update code base according new libwebrtc backend
In particular, use directly int64_t for packet time.

* Configurations/WebKit.xcconfig:
* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::signalReadPacket):
* NetworkProcess/webrtc/LibWebRTCSocketClient.h:
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
* NetworkProcess/webrtc/NetworkRTCSocket.h:
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::signalReadPacket):

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

9 months agoREGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
jbedard@apple.com [Fri, 7 Dec 2018 21:15:17 +0000 (21:15 +0000)]
REGRESSION: run-webkit-tests may fail when using booted simulators (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Unreviewed infrastructure fix.

* Scripts/webkitpy/port/device_port.py:
(DevicePort.setup_test_run): Check that the number of initialized devices matches the
number of child processes.

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

9 months ago[iOS] Make WebGPU work with remote layer hosting
dino@apple.com [Fri, 7 Dec 2018 21:10:13 +0000 (21:10 +0000)]
[iOS] Make WebGPU work with remote layer hosting
https://bugs.webkit.org/show_bug.cgi?id=192508
<rdar://problem/46560649>

Reviewed by Tim Horton.

WebGPU wasn't working on iOS because we were not correctly
identifying the CALayers for remote hosting. Fix this by
adding a new CALayer type, WebGPULayer. This will also
eventually hold the code to render WebGPU into a canvas.

Covered by the existing reference tests (on device).

* SourcesCocoa.txt: Add new files.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Recognise the WebGPULayer
class for remote hosting.
(WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer):
(WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa):

* platform/graphics/cocoa/WebGPULayer.h: Added. Very simple inheritance
from CAMetalLayer.
* platform/graphics/cocoa/WebGPULayer.mm: Added.
(-[WebGPULayer init]):
(-[WebGPULayer copyImageSnapshotWithColorSpace:]):

* platform/graphics/gpu/GPUSwapChain.h: Reference WebGPULayer rather
than CALayer.

* platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Ensure that
the WebGPULayer has a reference back to this object, which it
will use in the future.
(WebCore::GPUSwapChain::create):
(WebCore::GPUSwapChain::GPUSwapChain):

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

9 months ago[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params...
tsavell@apple.com [Fri, 7 Dec 2018 20:41:23 +0000 (20:41 +0000)]
[ MacOS Debug ] Layout Test webgl/2.0.0/conformance2/textures/misc/tex-unpack-params.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=190892

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

9 months agoRename LayoutState to RenderLayoutState
antti@apple.com [Fri, 7 Dec 2018 20:10:14 +0000 (20:10 +0000)]
Rename LayoutState to RenderLayoutState
https://bugs.webkit.org/show_bug.cgi?id=192504

Reviewed by Zalan Bujtas.

The name is better used in LFC.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layoutState const):
(WebCore::FrameViewLayoutContext::pushLayoutState):
(WebCore::FrameViewLayoutContext::pushLayoutStateForPaginationIfNeeded):
* page/FrameViewLayoutContext.h:
* rendering/LayoutState.cpp: Removed.
* rendering/LayoutState.h: Removed.
* rendering/RenderBlock.cpp:
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
* rendering/RenderBlockLineLayout.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderFragmentedFlow.cpp:
* rendering/RenderGrid.cpp:
* rendering/RenderImage.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayoutState.cpp: Copied from Source/WebCore/rendering/LayoutState.cpp.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::RenderLayoutState::computeOffsets):
(WebCore::RenderLayoutState::computeClipRect):
(WebCore::RenderLayoutState::computePaginationInformation):
(WebCore::RenderLayoutState::pageLogicalOffset const):
(WebCore::RenderLayoutState::computeLineGridPaginationOrigin):
(WebCore::RenderLayoutState::propagateLineGridInfo):
(WebCore::RenderLayoutState::establishLineGrid):
(WebCore::RenderLayoutState::addLayoutDelta):
(WebCore::RenderLayoutState::layoutDeltaMatches const):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::computeOffsets): Deleted.
(WebCore::LayoutState::computeClipRect): Deleted.
(WebCore::LayoutState::computePaginationInformation): Deleted.
(WebCore::LayoutState::pageLogicalOffset const): Deleted.
(WebCore::LayoutState::computeLineGridPaginationOrigin): Deleted.
(WebCore::LayoutState::propagateLineGridInfo): Deleted.
(WebCore::LayoutState::establishLineGrid): Deleted.
(WebCore::LayoutState::addLayoutDelta): Deleted.
(WebCore::LayoutState::layoutDeltaMatches const): Deleted.
* rendering/RenderLayoutState.h: Copied from Source/WebCore/rendering/LayoutState.h.
(WebCore::RenderLayoutState::RenderLayoutState):
(WebCore::LayoutState::LayoutState): Deleted.
(WebCore::LayoutState::isPaginated const): Deleted.
(WebCore::LayoutState::pageLogicalHeight const): Deleted.
(WebCore::LayoutState::pageLogicalHeightChanged const): Deleted.
(WebCore::LayoutState::lineGrid const): Deleted.
(WebCore::LayoutState::lineGridOffset const): Deleted.
(WebCore::LayoutState::lineGridPaginationOrigin const): Deleted.
(WebCore::LayoutState::paintOffset const): Deleted.
(WebCore::LayoutState::layoutOffset const): Deleted.
(WebCore::LayoutState::pageOffset const): Deleted.
(WebCore::LayoutState::needsBlockDirectionLocationSetBeforeLayout const): Deleted.
(WebCore::LayoutState::renderer const): Deleted.
(WebCore::LayoutState::clipRect const): Deleted.
(WebCore::LayoutState::isClipped const): Deleted.
(WebCore::LayoutState::layoutDelta const): Deleted.
* rendering/RenderListBox.cpp:
* rendering/RenderMediaControlElements.cpp:
* rendering/RenderMultiColumnFlow.cpp:
* rendering/RenderTable.cpp:
* rendering/RenderTableRow.cpp:
* rendering/RenderTableSection.cpp:
* rendering/RenderVTTCue.cpp:
* rendering/RenderView.cpp:
* rendering/RenderView.h:
* rendering/RootInlineBox.cpp:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

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

9 months agoLayout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
tsavell@apple.com [Fri, 7 Dec 2018 19:32:23 +0000 (19:32 +0000)]
Layout Test fast/css/counters/element-removal-crash.xhtml is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=183389

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

9 months ago[LFC] Rename formattingContext() to createFormattingContext()
antti@apple.com [Fri, 7 Dec 2018 19:25:44 +0000 (19:25 +0000)]
[LFC] Rename formattingContext() to createFormattingContext()
https://bugs.webkit.org/show_bug.cgi?id=192500

Reviewed by Zalan Bujtas.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
* layout/FormattingState.h:
* layout/LayoutFormattingState.cpp:
(WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
* layout/blockformatting/BlockFormattingState.cpp:
(WebCore::Layout::BlockFormattingState::createFormattingContext):
(WebCore::Layout::BlockFormattingState::formattingContext): Deleted.
* layout/blockformatting/BlockFormattingState.h:
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
* layout/inlineformatting/InlineFormattingState.h:

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

9 months ago[ews-app] Send bug id as a build property
aakash_jain@apple.com [Fri, 7 Dec 2018 18:53:34 +0000 (18:53 +0000)]
[ews-app] Send bug id as a build property
https://bugs.webkit.org/show_bug.cgi?id=192494

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/fetcher.py:
(BugzillaPatchFetcher.fetch):

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

9 months ago[ews-build] Builds should have a link to patch and bug
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:39 +0000 (18:51 +0000)]
[ews-build] Builds should have a link to patch and bug
https://bugs.webkit.org/show_bug.cgi?id=192492

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(ConfigureBuild.add_patch_id_url): Method to add Patch URL.
(ConfigureBuild.add_bug_id_url): Method to add Bug URL.
(ConfigureBuild.getPatchURL): Method to get Patch URL.
(ConfigureBuild.getBugURL): Method to get Bug URL.

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

9 months agoUnreviewed, rolling out r238947.
tsavell@apple.com [Fri, 7 Dec 2018 18:51:36 +0000 (18:51 +0000)]
Unreviewed, rolling out r238947.

Revision caused fast/visual-viewport/tiled-drawing/zoomed-
fixed-scrolling-layers-state.html to constantly fail

Reverted changeset:

"Allow control over child order when adding nodes to the
scrolling tree"
https://bugs.webkit.org/show_bug.cgi?id=176914
https://trac.webkit.org/changeset/238947

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

9 months ago[ews-app] Configure logfile for ews-app logs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:51:06 +0000 (18:51 +0000)]
[ews-app] Configure logfile for ews-app logs
https://bugs.webkit.org/show_bug.cgi?id=192493

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/__init__.py:

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

9 months agoStyle queue exception on some security bugs
aakash_jain@apple.com [Fri, 7 Dec 2018 18:48:55 +0000 (18:48 +0000)]
Style queue exception on some security bugs
https://bugs.webkit.org/show_bug.cgi?id=190793

Reviewed by Lucas Forschler.

* Scripts/webkitpy/tool/steps/applywatchlist.py:
(ApplyWatchList.run):

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

9 months ago[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
aestes@apple.com [Fri, 7 Dec 2018 18:40:31 +0000 (18:40 +0000)]
[Cocoa] Add optional variants of SOFT_LINK_CLASS_FOR_SOURCE
https://bugs.webkit.org/show_bug.cgi?id=192498

Reviewed by Tim Horton.

Added SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL and SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT,
which behave like their non-optional variants but do not require their classes to exist.

* wtf/cocoa/SoftLinking.h:

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

9 months ago[Attachment Support] Cloned attachment elements lose their unique identifiers
wenson_hsieh@apple.com [Fri, 7 Dec 2018 18:37:58 +0000 (18:37 +0000)]
[Attachment Support] Cloned attachment elements lose their unique identifiers
https://bugs.webkit.org/show_bug.cgi?id=192483

Reviewed by Tim Horton.

Source/WebCore:

This patch adds logic to ensure that the unique identifier of a cloned attachment element is the same as the
unique identifier of the original attachment element. If the cloned attachment is inserted into the same
document as the original attachment, then we will exercise the same codepath for copied-and-pasted attachments,
and assign a new unique identifier to the attachment element, while creating a new `_WKAttachment` in the client
that's backed by the same `NSFileWrapper`.

Test: WKAttachmentTests.AttachmentIdentifierOfClonedAttachment

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::copyNonAttributePropertiesFromElement):
* html/HTMLAttachmentElement.h:

Tools:

Introduce a new API test.

* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):

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

9 months agoMerge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
commit-queue@webkit.org [Fri, 7 Dec 2018 18:33:43 +0000 (18:33 +0000)]
Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
https://bugs.webkit.org/show_bug.cgi?id=192288

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-07
Reviewed by Frédéric Wang.

Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
as they do the same thing. Also remove std::optional from parseAccessControlAllowList
since the function can't fail.

* WebCore.order:
* loader/CrossOriginAccessControl.cpp:
(WebCore::validatePreflightResponse):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::parse):
* loader/CrossOriginPreflightResultCache.h:
* platform/network/HTTPParsers.cpp:
(WebCore::parseAccessControlExposeHeadersAllowList): Deleted.
* platform/network/HTTPParsers.h:
(WebCore::parseAccessControlAllowList):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::filter):
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):

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

9 months ago[iOS] Don't update AVPlayerViewController currentTime while scrubbing
eric.carlson@apple.com [Fri, 7 Dec 2018 18:08:24 +0000 (18:08 +0000)]
[iOS] Don't update AVPlayerViewController currentTime while scrubbing
https://bugs.webkit.org/show_bug.cgi?id=192438
<rdar://problem/42977046>

Reviewed by Jer Noble.

No new tests, tested manually.

* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::currentTimeChanged): Don't report change during scrubbing.

* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController beginScrubbing:]): Set _isScrubbing.
(-[WebAVPlayerController endScrubbing:]): Ditto.
(-[WebAVPlayerController isScrubbing]): Return _isScrubbing.

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

9 months ago[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream...
commit-queue@webkit.org [Fri, 7 Dec 2018 10:48:56 +0000 (10:48 +0000)]
[WPE][GTK] Implement WebAudioSourceProviderGStreamer to allow bridging MediaStream and the WebAudio APIs
https://bugs.webkit.org/show_bug.cgi?id=186933

Source/WebCore:

Reusing the AudioSourceProviderGStreamer itself as it was doing almost everything we needed,
just added a constructor to be able to create it from a MediaStreamTrackPrivate and made it a
WebAudioSourceProvider which only means it is now a ThreadSafeRefCounted.

Sensibily refactored GStreamerMediaStreamSource so that we could reuse it to track a single
MediaStreamTrack.

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::~AudioSourceProviderGStreamer):
(WebCore::AudioSourceProviderGStreamer::setClient):
* platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
* platform/mediastream/MediaStreamTrackPrivate.cpp:
(WebCore::MediaStreamTrackPrivate::audioSourceProvider):
* platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
(WebCore::GStreamerAudioCapturer::GStreamerAudioCapturer):
* platform/mediastream/gstreamer/GStreamerAudioStreamDescription.h:
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcSetupSrc):
(WebCore::webkitMediaStreamSrcSetupAppSrc):
(WebCore::webkitMediaStreamSrcAddTrack):
(WebCore::webkitMediaStreamSrcSetStream):
(WebCore::webkitMediaStreamSrcNew):
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.h:
* platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp:
(WebCore::WrappedMockRealtimeAudioSource::WrappedMockRealtimeAudioSource):
(WebCore::WrappedMockRealtimeAudioSource::start):
(WebCore::WrappedMockRealtimeAudioSource::addHum):
(WebCore::WrappedMockRealtimeAudioSource::render):
(WebCore::WrappedMockRealtimeAudioSource::settingsDidChange):
(WebCore::MockGStreamerAudioCaptureSource::startProducingData):
* platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
(WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData): Handle the case where input buffers
  are "big" and process all the data we can for each runs of the method.

LayoutTests:

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-12-07
Reviewed by Philippe Normand.

Enabled all tests depending on that feature.

* platform/gtk/TestExpectations:
* webrtc/clone-audio-track.html:

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

9 months agoConsecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since...
jbedard@apple.com [Fri, 7 Dec 2018 06:18:33 +0000 (06:18 +0000)]
Consecutive DumpRenderTree crashes are happening again on WinCairo BuildBots since r238903
https://bugs.webkit.org/show_bug.cgi?id=192486

Unreviewed infrastructure fix.

WinCairo bots define WEBKIT_TEST_CHILD_PROCESSES to run less processes due to RAM restrictions.

* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options):

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

9 months agoMove USE_NEW_THEME out of WebCore's config.h
ap@apple.com [Fri, 7 Dec 2018 05:51:30 +0000 (05:51 +0000)]
Move USE_NEW_THEME out of WebCore's config.h
https://bugs.webkit.org/show_bug.cgi?id=192426

Reviewed by Tim Horton.

Source/WebCore:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

9 months agoInjected bundle for WebKitTestRunner leaks WKTypeRef objects
ddkilzer@apple.com [Fri, 7 Dec 2018 05:34:21 +0000 (05:34 +0000)]
Injected bundle for WebKitTestRunner leaks WKTypeRef objects
<https://webkit.org/b/192481>
<rdar://problem/46539059>

Reviewed by Simon Fraser.

Source/WebKit:

Change function parameter name from `returnData[Ref]` to
`returnRetainedData[Ref]` to document that the value returned is
a +1 retained WKTypeRef object.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundlePostSynchronousMessage):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePagePostSynchronousMessageForTesting):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:

Tools:

This patch:
- Fixes leaks in various injected bundle methods that return +1
  retained WKTypeRef objects via pointer.
- Asserts the returned object is the expected WKTypeRef.
- Replaces 0 with nullptr in many places.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didCreatePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::shouldDumpPixels const):
(WTR::TestRunner::whatToDump const):
(WTR::TestRunner::shouldWaitUntilDone const):
(WTR::TestRunner::shouldDumpFrameLoadCallbacks):
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
(WTR::TestRunner::secureEventInputIsEnabled const):
(WTR::TestRunner::isStatisticsPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
(WTR::TestRunner::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestRunner::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestRunner::isStatisticsHasHadUserInteraction):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::statisticsProcessStatisticsAndDataRecords):
(WTR::TestRunner::statisticsUpdateCookieBlocking):
(WTR::TestRunner::statisticsSubmitTelemetry):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearThroughWebsiteDataRemoval):
(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::hasDOMCache):
(WTR::TestRunner::domCacheSize):
(WTR::TestRunner::injectUserScript):
(WTR::TestRunner::keyExistsInKeychain):

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

9 months agoAllow control over child order when adding nodes to the scrolling tree
commit-queue@webkit.org [Fri, 7 Dec 2018 01:47:04 +0000 (01:47 +0000)]
Allow control over child order when adding nodes to the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=176914

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-06
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

Source/WebCore:

Previously ScrollingCoordinator just allowed nodes to be "attached" with a given parent,
but with no control over sibling order. To allow for correct hit-testing overflow and
frame scrolling nodes, we have to build the scrolling tree in z-order.

This patch adds a 'childIndex' parameter to attachNode() which gives control over
sibling order. For now, RenderLayerCompositor always uses the default 'notFound' value
for childIndex so the current behavior (appending new nodes at the end of child list) is
preserved.

No new tests, behavior unchanged and already covered by existing tests.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::attachToStateTree):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::attachToStateTree):
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::insertChild):
(WebCore::ScrollingStateNode::indexOfChild const):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
* page/scrolling/ScrollingStateTree.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode): Make explicit that we want to append
the new node at the end of child list.

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

9 months agoWe should ignore minimumEffectiveDeviceWidth if the page specifies device-width in...
commit-queue@webkit.org [Fri, 7 Dec 2018 01:35:25 +0000 (01:35 +0000)]
We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
https://bugs.webkit.org/show_bug.cgi?id=192377
<rdar://problem/46364206>

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2018-12-06
Reviewed by Tim Horton.

Source/WebCore:

If the page specifies width=device-width or initial-scale=1 in the viewport meta tag, we should use the
native device width and ignore the minimum effective device width in ViewportConfiguration. The patch
also introduces scalableNativeWebpageParameters() which uses the device width as default and also allows the page
to shrink-to-fit. If a page doesn't have viewport meta tag, or if the width argument isn't device-width
and the initial scale isn't 1, we will use scalableNativeWebpageParameters() as the default configuration.

Tests: fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html
       fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html

* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::updateDefaultConfiguration): pick the default configuration based on
    the page's viewport arguments. Also, we will always fall back to scalableNativeWebpageParameters() if we
    can ignore scaling constraints.
(WebCore::ViewportConfiguration::setViewportArguments): When page sends us new ViewportArguments, pick
    up the correponsding default configuration before updating the configuration.
(WebCore::ViewportConfiguration::setCanIgnoreScalingConstraints): When m_canIgnoreScalingConstraints is
    changed, try to pick up the correponsding default configuration.
(WebCore::ViewportConfiguration::scalableNativeWebpageParameters): Add a new default set of viewport Parameters
    this is very close to nativeWebpageParameters() excpet that it allows shrink to fit and its minimum scale
    is 0.25. We will use this Parameters for pages that doesn't have viewport meta tag; or the width is
    not device-width and initial scale is not 1.
(WebCore::ViewportConfiguration::updateConfiguration): If the page's viewport argument doesn't override
    the default width, use the m_minimumLayoutSize.width().
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): A helper method to tell
    if we should avoid using minimum effective device width.
(WebCore::ViewportConfiguration::canOverrideConfigurationParameters const): If we are using a default
    configuration that is neither nativeWebpageParameters() nor scalableNativeWebpageParameters(), don't override
    it.
(WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): Add a helper method to return minimum
    effective device width based on shouldIgnoreMinimumEffectiveDeviceWidth().
(WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor const): Use minimumEffectiveDeviceWidth().

Source/WebKit:

Since we are using page's viewport arguments to decide the default viewport parameters and
whether we can use mininum effective device width, we should always call setViewportArguments()
regardless of shouldIgnoreMetaViewport settings.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewportPropertiesDidChange): Always call setViewportArguments().
(WebKit::WebPage::didCommitLoad): Ditto.

LayoutTests:

* fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width-expected.txt: Added.
* fast/viewport/ios/ignore-minimum-device-width-for-page-with-viewport-device-width.html: Added.
* fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta-expected.txt: Added.
* fast/viewport/ios/use-minimum-device-width-for-page-without-viewport-meta.html: Added.

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

9 months agoREGRESSION: run-webkit-tests may fail when using booted simulators
jbedard@apple.com [Thu, 6 Dec 2018 23:21:33 +0000 (23:21 +0000)]
REGRESSION: run-webkit-tests may fail when using booted simulators
https://bugs.webkit.org/show_bug.cgi?id=192470
<rdar://problem/46532001>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run): Logging uses the number of child processes to print out information about how efficiently tests
were sharded after the fact. This number is the most meaningful if it is the maximum number of child processes used.
* Scripts/webkitpy/port/base.py:
(Port.max_child_processes): By default, Ports do not support running on any specific kind of device.
* Scripts/webkitpy/port/device_port.py:
(DevicePort.default_child_processes): Rather than using the currently initialized devices as a proxy for how many
child processes are being used, check the device manager every time. Regardless of which devices are attached or
available, iOS cannot boot watchOS devices and vice-versa. dedicated_simulators is not a known argument to
device_count_for_type, use use_booted_simulator instead.
(DevicePort.max_child_processes): Simulators can boot more devices than what is specified by device_count_for_type,
but, if no devices are available, then max_child_processes should return 0 even for simulators.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest):
(IOSDeviceTest.test_max_child_processes):
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest):
(IOSSimulatorTest.test_max_child_processes):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase):
(PortTestCase.test_max_child_processes):
* Scripts/webkitpy/port/watch_simulator_unittest.py:
(WatchSimulatorTest):
(WatchSimulatorTest.test_max_child_processes):

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

9 months agowebkitpy: Ignore case when comparing device types (Follow-up fix)
jbedard@apple.com [Thu, 6 Dec 2018 23:05:36 +0000 (23:05 +0000)]
webkitpy: Ignore case when comparing device types (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=192409
<rdar://problem/46491558>

Unreviewed typo fix.

* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest.test_comparison_lower_case):
(DeviceTypeTest.test_comparsion_lower_case): Deleted.

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

9 months agoContent Extensions: Misc fixes to debugging / perf testing code
aperez@igalia.com [Thu, 6 Dec 2018 22:34:54 +0000 (22:34 +0000)]
Content Extensions: Misc fixes to debugging / perf testing code
https://bugs.webkit.org/show_bug.cgi?id=192474

Reviewed by Mark Lam.

This make it possible to build the content extensions support with the
debugging features enabled. In particular, building with
CONTENT_EXTENSIONS_PERFORMANCE_REPORTING enabled was broken.

No new tests needed.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList): Remove usage of removed
variables machinesWihthoutConditionsCount,
totalBytecodeSizeForMachinesWithoutConditions,
machinesWithConditionsCount, and
totalBytecodeSizeForMachinesWithConditions.
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::debugPrintDot const):
Use "%" PRIu64 instead of "%llu" to format uint64_t values.
* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::debugPrintDot const):
Use "%" PRIu64 instead of "%llu" to format uint64_t values.

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

9 months agoWeb Share API: share overlay does not stick to the Safari window
timothy_horton@apple.com [Thu, 6 Dec 2018 22:11:45 +0000 (22:11 +0000)]
Web Share API: share overlay does not stick to the Safari window
https://bugs.webkit.org/show_bug.cgi?id=192469
<rdar://problem/46074833>

Reviewed by Wenson Hsieh.

* UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheet sharingServicePicker:didChooseSharingService:]):
(-[WKShareSheet sharingServicePicker:delegateForSharingService:]):
(-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
(-[WKShareSheet sharingService:didFailToShareItems:error:]):
(-[WKShareSheet sharingService:didShareItems:]):
Implement another NSSharingServicePickerDelegate method to return
an *NSSharingService* delegate when needed.

Implement an NSSharingServiceDelegate method to return the window that
the service's UI should attach to.

Also, instead of notifying the Web Content process when a service is picked
(or not) in the NSSharingServicePicker, wait until the share has completed
(or failed) to send didComplete. This both makes the return completion
value more accurate (matching iOS, if you cancel the share during the
recipient choice step, it will now fail), and avoids explicitly tearing
down the NSSharingServicePicker too early, which breaks the UI attaching mechanism.

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

9 months agowebkitpy: Create device given lower-case DeviceType
jbedard@apple.com [Thu, 6 Dec 2018 22:09:19 +0000 (22:09 +0000)]
webkitpy: Create device given lower-case DeviceType
<https://bugs.webkit.org/show_bug.cgi?id=192472>
<rdar://problem/46532650>

Reviewed by Lucas Forschler.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._get_device_identifier_for_type): Comparing simctl device identifiers with DeviceTypes
should be letter-case agnostic.
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(test_lower_case_device_type):

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

9 months ago[iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
wenson_hsieh@apple.com [Thu, 6 Dec 2018 21:22:19 +0000 (21:22 +0000)]
[iOS] WKWebView should match UITextView behavior when editing text with an RTL keyboard
https://bugs.webkit.org/show_bug.cgi?id=187554
<rdar://problem/42075638>

Reviewed by Tim Horton.

Source/WebKit:

Add support for automatically switching the base writing direction to the default writing direction with respect
to the current keyboard in an editable WKWebView by implementing `-setBaseWritingDirection:forRange:`. On iOS 12
and earlier, UIKit invokes this protocol method whenever the keyboard is changed to one with a different writing
direction, although in some other versions of iOS, this only happens when first focusing an editable area.

Test: editing/input/ios/rtl-keyboard-input-on-focus.html

* Platform/spi/ios/UIKitSPI.h:

Declare UIKeyboardImpl IPI methods mostly for use in WebKitTestRunner (with the exception of
`-setInitialDirection`, which we may invoke when we receive the first post-layout EditorState update after
focusing an editable element).

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::increaseListLevel):
(WebKit::WebPageProxy::decreaseListLevel):
(WebKit::WebPageProxy::changeListType):
(WebKit::WebPageProxy::setBaseWritingDirection):

Drive-by style fixes: make these bail and return early if `!isValid()`.

(WebKit::WebPageProxy::resetStateAfterProcessExited):

Reset assisted node state in the UI process upon web process termination.

* UIProcess/WebPageProxy.h:

Add plumbing for `setBaseWritingDirection`, from `WebPageProxy` to `WebPage` to `Editor`.

* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didReceiveEditorStateUpdateAfterFocus):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView baseWritingDirectionForPosition:inDirection:]):
(coreWritingDirection):
(-[WKContentView setBaseWritingDirection:forRange:]):

Support `-setBaseWritingDirectionForPosition:forRange:`, but only in the case where the given range is the
selected range. This is all that's currently needed to fulfill the requirements in <rdar://problem/42075638>,
though we could potentially add full support for this in the future by mapping the given text range to a DOM
range and moving the selection prior to setting the base writing direction.

(-[WKContentView _didReceiveEditorStateUpdateAfterFocus]):

Add a hook to notify WKContentView when the first post-layout EditorState has been received in the UI process.
When this is invoked, if the web view is editable and the selection is not a range, we call into `UIKeyboardImpl`
to change the initial writing direction if necessary.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
(WebKit::WebPageProxy::stopAssistingNode):
(WebKit::WebPageProxy::editorStateChanged):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setBaseWritingDirection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Tools:

Add support for simulating the keyboard input mode in layout tests using UIScriptController, as well as a new
`TestOption` to make the web view editable.

* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestController.h:
(WTR::TestController::overriddenKeyboardInputMode const):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
(WTR::swizzleCurrentInputMode):
(WTR::TestController::setKeyboardInputModeIdentifier):

Swizzle out several `UIKeyboardInputModeController` methods in order to convince UIKit that the user has
selected a `UIKeyboardInputMode` corresponding to the given identifier. The call to
`-prepareKeyboardInputModeFromPreferences:` is also necessary on iOS 12 in order to update cached writing
direction state in UIKit.

* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setKeyboardInputModeIdentifier):
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/win/PlatformWebViewWin.cpp:
(WTR::PlatformWebView::setEditable):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::setEditable):

LayoutTests:

Add a new layout test to verify that when focusing an editable WKWebView using a right-to-left keyboard input
mode, we will set the base writing direction to be right-to-left, and vice versa.

* TestExpectations:
* editing/input/ios/rtl-keyboard-input-on-focus-expected.txt: Added.
* editing/input/ios/rtl-keyboard-input-on-focus.html: Added.
* platform/ios-wk2/TestExpectations:
* resources/ui-helper.js:

Add a UIHelper method to set the keyboard input mode to the given identifier. Example identifiers are "en_US"
(the default U.S. English keyboard) and "he_IL" (the Hebrew keyboard, which is right-to-left).

(window.UIHelper.setKeyboardInputModeIdentifier):
(window.UIHelper):

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

9 months agoWeb Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left...
mattbaker@apple.com [Thu, 6 Dec 2018 20:37:55 +0000 (20:37 +0000)]
Web Inspector: REGRESSION(r238602): Elements: collapsing a DOM node with the left arrow doesn't work
https://bugs.webkit.org/show_bug.cgi?id=192353
<rdar://problem/46455019>

Reviewed by Devin Rousso.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.deselect):
Don't early return when the element is not the selected tree element.
This condition no longer holds now that TreeOutline supports multiple selection.

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

9 months ago-[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originatin...
david_quesada@apple.com [Thu, 6 Dec 2018 20:07:38 +0000 (20:07 +0000)]
-[WKProcessPool _resumeDownloadFromData:path:] should allow specifying the originating web view
https://bugs.webkit.org/show_bug.cgi?id=192411
rdar://problem/46492487

Reviewed by Alex Christensen.

* UIProcess/API/C/WKContext.cpp:
(WKContextResumeDownload):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _resumeDownloadFromData:path:originatingWebView:]):
(-[WKProcessPool _resumeDownloadFromData:path:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::resumeDownload):
 - Set the originating page of the DownloadProxy.
 - If the originating page is non-null, use its session ID for the download.
 - Remove a FIXME. It's possible to do this now by providing the web view whose session
   should be used for the download.
* UIProcess/WebProcessPool.h:

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

9 months agoUnreviewed, a quick fix after r238919
jiewen_tan@apple.com [Thu, 6 Dec 2018 19:35:35 +0000 (19:35 +0000)]
Unreviewed, a quick fix after r238919

Add an early return such that the error message is actually meaningful.

* UIProcess/WebAuthentication/Mock/MockHidService.cpp:
(WebKit::MockHidService::platformStartDiscovery):

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

9 months agoLayout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
jiewen_tan@apple.com [Thu, 6 Dec 2018 19:32:38 +0000 (19:32 +0000)]
Layout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=181957

Reviewed by Youenn Fablet.

Since the timing information is a multiplier of a small delta, it is likely that
two timing information are the same as they are so close that fall into the same
bucket. Therefore, this patch releases the check of 't0 !== t1'.

* http/tests/misc/resource-timing-resolution-expected.txt:
* http/tests/misc/resource-timing-resolution.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

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

9 months agostress/big-wasm-memory tests failing on 32-bit JSC bot
keith_miller@apple.com [Thu, 6 Dec 2018 18:59:44 +0000 (18:59 +0000)]
stress/big-wasm-memory tests failing on 32-bit JSC bot
https://bugs.webkit.org/show_bug.cgi?id=192020

Reviewed by Saam Barati.

Not every platform has WebAssembly, e.g. 32-bit, so we should exit
the wasm stress tests if the WebAssembly object does not exist.

* stress/big-wasm-memory-grow-no-max.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory-grow.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.

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

9 months agoRemove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
achristensen@apple.com [Thu, 6 Dec 2018 16:55:45 +0000 (16:55 +0000)]
Remove unused LoaderStrategy::storeDerivedDataToCache and associated dead code
https://bugs.webkit.org/show_bug.cgi?id=192452

Reviewed by Anders Carlsson.

Source/WebCore:

* loader/LoaderStrategy.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didRetrieveDerivedDataFromCache): Deleted.
* loader/ResourceLoader.h:
* loader/ResourceLoaderOptions.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didRetrieveDerivedDataFromCache): Deleted.
* loader/SubresourceLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::isolatedCopy const):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::didRetrieveDerivedDataFromCache): Deleted.

Source/WebKit:

This was introduced in r210835 but never used.
It's preventing me from making the disk cache associated with a SessionID/NetworkSession.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::storeDerivedDataToCache): Deleted.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):
* NetworkProcess/NetworkResourceLoadParameters.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueDidReceiveResponse):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
(WebKit::NetworkResourceLoader::continueProcessingCachedEntryAfterDidReceiveResponse): Deleted.
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::storeDerivedDataToCache): Deleted.
* WebProcess/Network/WebLoaderStrategy.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didRetrieveDerivedData): Deleted.
* WebProcess/Network/WebResourceLoader.messages.in:

Source/WebKitLegacy:

* WebCoreSupport/WebResourceLoadScheduler.h:

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

9 months agoimported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is flaky...
tsavell@apple.com [Thu, 6 Dec 2018 16:48:56 +0000 (16:48 +0000)]
imported/w3c/web-platform-tests/css/mediaqueries/test_media_queries.html is flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=191565

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

9 months ago[LFC][BFC][MarginCollapsing] HeightAndMargin::margin is always the non-collapsed...
zalan@apple.com [Thu, 6 Dec 2018 15:24:56 +0000 (15:24 +0000)]
[LFC][BFC][MarginCollapsing] HeightAndMargin::margin is always the non-collapsed margin value.
https://bugs.webkit.org/show_bug.cgi?id=192345

Reviewed by Antti Koivisto.

Rename HeightAndMargin::margin to HeightAndMargin::nonCollapsedMargin.

* layout/FormattingContext.cpp:
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
* layout/LayoutUnits.h:
(WebCore::Layout::HeightAndMargin::usedMarginValues const):
* layout/blockformatting/BlockFormattingContext.cpp:
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
* layout/blockformatting/BlockFormattingContextQuirks.cpp:
(WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::computeHeightAndMargin const):

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

9 months ago[LFC][BFC][MarginCollapsing] Add MarginCollapse::establishesBlockFormattingContext
zalan@apple.com [Thu, 6 Dec 2018 15:21:48 +0000 (15:21 +0000)]
[LFC][BFC][MarginCollapsing] Add MarginCollapse::establishesBlockFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=192297

Reviewed by Antti Koivisto.

WebKit treats the document element renderer as a block formatting context root.

* layout/blockformatting/BlockMarginCollapse.cpp:
(WebCore::Layout::establishesBlockFormattingContext):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginTopCollapsedWithParent):
(WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBottomCollapsedWithParent):

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

9 months ago[GStreamer] -DENABLE_VIDEO=ON -DENABLE_OPENGL=OFF still tries to build GstreamerGL
commit-queue@webkit.org [Thu, 6 Dec 2018 13:07:46 +0000 (13:07 +0000)]
[GStreamer] -DENABLE_VIDEO=ON -DENABLE_OPENGL=OFF still tries to build GstreamerGL
https://bugs.webkit.org/show_bug.cgi?id=191998

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-06
Reviewed by Philippe Normand.

Fix compilation with -DENABLE_VIDEO=ON and -DENABLE_OPENGL=OFF due to GStreamerGL.

.:

* Source/cmake/GStreamerDependencies.cmake: "DEFINED ENABLE_OPENGL" is always false because ENABLE_OPENGL
is not a CMake variable (WEBKIT_OPTION_DEFINE macro does not define ENABLE_OPENGL variable per se, but other
variables and appends it to a list).
* Source/cmake/OptionsGTK.cmake: GStreamerDefinitions.cmake was included twice by mistake. Second should be GStreamerDependencies.cmake.

Source/WebCore:

No new tests required. Only fixing the build with certain flags.

* Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:
(WebCore::CanvasCaptureMediaStreamTrack::Source::canvasChanged): add required #if ENABLE(WEBGL).

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

9 months agoREGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation:...
commit-queue@webkit.org [Thu, 6 Dec 2018 12:40:47 +0000 (12:40 +0000)]
REGRESSION(r231043): [GTK] Undefined references to WebCore::LayerRepresentation::* with -DENABLE_OPENGL=OFF builds
https://bugs.webkit.org/show_bug.cgi?id=191997

Patch by Carlos Eduardo Ramalho <cadubentzen@gmail.com> on 2018-12-06
Reviewed by Philippe Normand.

.:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF

* Source/cmake/OptionsGTK.cmake: make ENABLE_ASYNC_SCROLLING depend on ENABLE_OPENGL

Source/WebCore:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.

No new tests required. Only fixing build.

* platform/gtk/PlatformWheelEventGtk.cpp:
(WebCore::PlatformWheelEvent::PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)

Source/WebKit:

Fix build with -DENABLE_OPENGL=OFF and -DENABLE_VIDEO=OFF.

* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): add required #if ENABLE(ASYNC_SCROLLING)

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

9 months agoREGRESSION(PSON): Process swapping code doesn't set DisplayID in WebContent process
rniwa@webkit.org [Thu, 6 Dec 2018 06:12:28 +0000 (06:12 +0000)]
REGRESSION(PSON): Process swapping code doesn't set DisplayID in WebContent process
https://bugs.webkit.org/show_bug.cgi?id=192290

Reviewed by Simon Fraser.

Fixed the bug by updating the DisplayID upon attaching to a WebContent process
after a process swap as well as after the previous WebContent process had crashed.

Unfortunately no new tests since WebKitTestRunner / DumpRenderTree should use 0 as DisplayID
as they have an off-screen NSWindow. The issue that this results in no fallback for
the animation timer is tracked by webkit.org/b/192448.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::didRelaunchProcess):

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

9 months agospeculationFromCell() should speculate non-Identifier strings as SpecString instead...
mark.lam@apple.com [Thu, 6 Dec 2018 04:34:27 +0000 (04:34 +0000)]
speculationFromCell() should speculate non-Identifier strings as SpecString instead of SpecStringVar.
https://bugs.webkit.org/show_bug.cgi?id=192441
<rdar://problem/46480355>

Reviewed by Saam Barati.

JSTests:

* stress/regress-192441.js: Added.

Source/JavaScriptCore:

This is because a regular String (non-Identifier) can be converted into an
Identifier.  During DFG/FTL compilation, AbstractValue::checkConsistency() may
expect a value to be of type SpecStringVar, but the mutator thread may have
converted the string into an Identifier.  This creates a race where
AbstractValue::checkConsistency() may fail because it sees a SpecStringIdent when
it expects the a SpecStringVar.

The fix is to speculate non-Identifier strings as type SpecString which allows it
to be SpecStringVar or SpecStringIndent.

* bytecode/SpeculatedType.cpp:
(JSC::speculationFromCell):

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

9 months agoRemove a document entry from NetworkMDNSRegister::m_services when document goes away
youenn@apple.com [Thu, 6 Dec 2018 03:46:37 +0000 (03:46 +0000)]
Remove a document entry from NetworkMDNSRegister::m_services when document goes away
https://bugs.webkit.org/show_bug.cgi?id=192429

Reviewed by Eric Carlson.

* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
(WebKit::NetworkMDNSRegister::unregisterMDNSNames):
We should remove the entry to limit the size of the map.

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

9 months ago[Cocoa] Share ClassMethodSwizzler and InstanceMethodSwizzler between TestWebKitAPI...
wenson_hsieh@apple.com [Thu, 6 Dec 2018 03:09:29 +0000 (03:09 +0000)]
[Cocoa] Share ClassMethodSwizzler and InstanceMethodSwizzler between TestWebKitAPI and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=192437

Reviewed by Tim Horton.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* TestRunnerShared/cocoa/ClassMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.h.
* TestRunnerShared/cocoa/ClassMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/ClassMethodSwizzler.mm.
(ClassMethodSwizzler::ClassMethodSwizzler):
(ClassMethodSwizzler::~ClassMethodSwizzler):
* TestRunnerShared/cocoa/InstanceMethodSwizzler.h: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.h.
* TestRunnerShared/cocoa/InstanceMethodSwizzler.mm: Renamed from Tools/TestWebKitAPI/cocoa/InstanceMethodSwizzler.mm.
(InstanceMethodSwizzler::InstanceMethodSwizzler):
(InstanceMethodSwizzler::~InstanceMethodSwizzler):

Move these swizzling helper classes into TestRunnerShared.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm:
* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(safeBrowsingView):
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDefaultNavigationDelegate.mm:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView initWithFrame:configuration:addToWindow:]):

Remove namespacing around ClassMethodSwizzler and InstanceMethodSwizzler in a few API tests.

* TestWebKitAPI/mac/TestFontOptions.mm:
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::ClassMethodSwizzler::ClassMethodSwizzler): Deleted.
(WTR::ClassMethodSwizzler::~ClassMethodSwizzler): Deleted.

Remove this duplicate implementation of ClassMethodSwizzler in WebKitTestRunner.

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

9 months ago[GTK] Unreviewed test gardening
aboya@igalia.com [Thu, 6 Dec 2018 03:02:19 +0000 (03:02 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=192436

* platform/gtk/TestExpectations:
* platform/gtk/editing/deleting/delete-emoji-1-expected.txt:
* platform/gtk/editing/deleting/delete-emoji-expected.txt:
* platform/wpe/animations/lineheight-animation-expected.txt:
* platform/wpe/animations/simultaneous-start-transform-expected.txt:
* platform/wpe/animations/width-using-ems-expected.txt:
* platform/wpe/legacy-animation-engine/animations/lineheight-animation-expected.txt:
* platform/wpe/legacy-animation-engine/animations/simultaneous-start-transform-expected.txt:
* platform/wpe/legacy-animation-engine/animations/width-using-ems-expected.txt:

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

9 months ago[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https...
jiewen_tan@apple.com [Thu, 6 Dec 2018 02:28:23 +0000 (02:28 +0000)]
[Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=192061

Reviewed by Dewei Zhu.

Part 1.

Add some loggings to determine possible causes for the flakiness.

* UIProcess/WebAuthentication/Cocoa/HidService.mm:
(WebKit::HidService::continueAddDeviceAfterGetInfo):
* UIProcess/WebAuthentication/Mock/MockHidService.cpp:
(WebKit::MockHidService::platformStartDiscovery):

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

9 months agoREGRESSION: Layout Test http/tests/security/cross-origin-css-resource-timing.html...
youenn@apple.com [Thu, 6 Dec 2018 00:13:46 +0000 (00:13 +0000)]
REGRESSION: Layout Test http/tests/security/cross-origin-css-resource-timing.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=192408
<rdar://problem/46492201>

Reviewed by Ryosuke Niwa.

Some of the tests are loading the same subresource and check for resource timing.
We need to clear internal caches to have stable results.

* http/tests/security/clean-origin-css-exposed-resource-timing.html:
* http/tests/security/cross-origin-clean-css-resource-timing.html:
* http/tests/security/cross-origin-css-resource-timing.html:

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

9 months agoWeb Inspector: SelectionController should not extend the selection when allowsMultipl...
mattbaker@apple.com [Wed, 5 Dec 2018 23:50:08 +0000 (23:50 +0000)]
Web Inspector: SelectionController should not extend the selection when allowsMultipleSelection is false
https://bugs.webkit.org/show_bug.cgi?id=192390
<rdar://problem/46473624>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Controllers/SelectionController.js:
(WI.SelectionController.prototype.selectItem):

LayoutTests:

* inspector/table/table-selection-expected.txt:
* inspector/table/table-selection.html:
Drive-by fix: removed `allowsMultipleSelection` check from test case
Table.SelectMultipleRows.ExtendSelection since it is tested in Table.AllowsMultipleSelection.

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

9 months ago[PlayStation] Enable WebCore
don.olmstead@sony.com [Wed, 5 Dec 2018 23:25:47 +0000 (23:25 +0000)]
[PlayStation] Enable WebCore
https://bugs.webkit.org/show_bug.cgi?id=192384

Reviewed by Brent Fulgham.

.:

Adds CMake options for building WebCore on PlayStation.

* Source/cmake/FindLibPSL.cmake:
* Source/cmake/FindNghttp2.cmake: Copied from Source/cmake/FindWPE.cmake.
* Source/cmake/FindPixman.cmake: Added.
* Source/cmake/FindWPE.cmake:
* Source/cmake/OptionsPlayStation.cmake:

Source/WebCore:

Implements WebCore for the PlayStation platform.

* PlatformPlayStation.cmake: Added.
* loader/cache/CachedResourceLoader.cpp:
* platform/generic/KeyedDecoderGeneric.cpp: Added.
(WebCore::KeyedDecoder::decoder):
(WebCore::KeyedDecoderGeneric::KeyedDecoderGeneric):
(WebCore::KeyedDecoderGeneric::~KeyedDecoderGeneric):
(WebCore::KeyedDecoderGeneric::decodeBytes):
(WebCore::KeyedDecoderGeneric::decodeBool):
(WebCore::KeyedDecoderGeneric::decodeUInt32):
(WebCore::KeyedDecoderGeneric::decodeUInt64):
(WebCore::KeyedDecoderGeneric::decodeInt32):
(WebCore::KeyedDecoderGeneric::decodeInt64):
(WebCore::KeyedDecoderGeneric::decodeFloat):
(WebCore::KeyedDecoderGeneric::decodeDouble):
(WebCore::KeyedDecoderGeneric::decodeString):
(WebCore::KeyedDecoderGeneric::beginObject):
(WebCore::KeyedDecoderGeneric::endObject):
(WebCore::KeyedDecoderGeneric::beginArray):
(WebCore::KeyedDecoderGeneric::beginArrayElement):
(WebCore::KeyedDecoderGeneric::endArrayElement):
(WebCore::KeyedDecoderGeneric::endArray):
* platform/generic/KeyedDecoderGeneric.h: Added.
* platform/generic/KeyedEncoderGeneric.cpp: Added.
(WebCore::KeyedEncoder::encoder):
(WebCore::KeyedEncoderGeneric::KeyedEncoderGeneric):
(WebCore::KeyedEncoderGeneric::~KeyedEncoderGeneric):
(WebCore::KeyedEncoderGeneric::encodeBytes):
(WebCore::KeyedEncoderGeneric::encodeBool):
(WebCore::KeyedEncoderGeneric::encodeUInt32):
(WebCore::KeyedEncoderGeneric::encodeUInt64):
(WebCore::KeyedEncoderGeneric::encodeInt32):
(WebCore::KeyedEncoderGeneric::encodeInt64):
(WebCore::KeyedEncoderGeneric::encodeFloat):
(WebCore::KeyedEncoderGeneric::encodeDouble):
(WebCore::KeyedEncoderGeneric::encodeString):
(WebCore::KeyedEncoderGeneric::beginObject):
(WebCore::KeyedEncoderGeneric::endObject):
(WebCore::KeyedEncoderGeneric::beginArray):
(WebCore::KeyedEncoderGeneric::beginArrayElement):
(WebCore::KeyedEncoderGeneric::endArrayElement):
(WebCore::KeyedEncoderGeneric::endArray):
(WebCore::KeyedEncoderGeneric::finishEncoding):
* platform/generic/KeyedEncoderGeneric.h: Added.
* platform/network/curl/NetworkStorageSessionCurl.cpp:
(WebCore::defaultCookieJarPath):
* platform/network/playstation/CurlSSLHandlePlayStation.cpp: Added.
(WebCore::getCACertPathEnv):
(WebCore::CurlSSLHandle::platformInitialize):
* platform/network/playstation/NetworkStateNotifierPlayStation.cpp: Added.
(WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
(WebCore::NetworkStateNotifier::startObserving):
* platform/playstation/EventLoopPlayStation.cpp: Added.
(WebCore::EventLoop::cycle):
* platform/playstation/MIMETypeRegistryPlayStation.cpp: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
* platform/playstation/PlatformScreenPlayStation.cpp: Added.
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::screenHasInvertedColors):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
(WebCore::screenSupportsExtendedColor):
* platform/playstation/ScrollbarThemePlayStation.cpp: Added.
(WebCore::ScrollbarTheme::nativeTheme):
(WebCore::ScrollbarThemePlayStation::scrollbarThickness):
(WebCore::ScrollbarThemePlayStation::hasButtons):
(WebCore::ScrollbarThemePlayStation::hasThumb):
(WebCore::ScrollbarThemePlayStation::backButtonRect):
(WebCore::ScrollbarThemePlayStation::forwardButtonRect):
(WebCore::ScrollbarThemePlayStation::trackRect):
(WebCore::ScrollbarThemePlayStation::paintTrackBackground):
(WebCore::ScrollbarThemePlayStation::paintThumb):
* platform/playstation/ScrollbarThemePlayStation.h: Added.
* platform/playstation/UserAgentPlayStation.cpp: Added.
(WebCore::standardUserAgent):
(WebCore::standardUserAgentForURL):
* rendering/RenderThemePlayStation.cpp: Added.
(WebCore::RenderTheme::singleton):
(WebCore::RenderThemePlayStation::updateCachedSystemFontDescription const):
* rendering/RenderThemePlayStation.h: Added.

Source/WebCore/PAL:

Implements PAL for the PlayStation platform.

* pal/PlatformPlayStation.cmake: Added.

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

9 months agoNull pointer crash in DocumentOrderedMap::getElementById via FormAssociatedElement...
rniwa@webkit.org [Wed, 5 Dec 2018 23:06:49 +0000 (23:06 +0000)]
Null pointer crash in DocumentOrderedMap::getElementById via FormAssociatedElement::findAssociatedForm
https://bugs.webkit.org/show_bug.cgi?id=192392

Reviewed by Dean Jackson.

Source/WebCore:

The crash was caused by FormAssociatedElement::findAssociatedForm invoking DocumentOrderedMap::getElementById
and de-referencing nullptr Attribute* via IdTargetObserver before Element::attributeChanged had updated
ElementData::m_idForStyleResolution.

Fixed it by updating m_idForStyleResolution before invoking IdTargetObservers.

Test: fast/dom/remove-id-form-associated-elemet-id-observer-crash.html

* dom/Element.cpp:
(WebCore::Element::attributeChanged): Fixed the bug.

LayoutTests:

Added a regression test.

* fast/dom/remove-id-form-associated-elemet-id-observer-crash-expected.txt: Added.
* fast/dom/remove-id-form-associated-elemet-id-observer-crash.html: Added.

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

9 months agoSimplify logic inside WebPageProxy::continueNavigationInNewProcess()
cdumez@apple.com [Wed, 5 Dec 2018 22:44:30 +0000 (22:44 +0000)]
Simplify logic inside WebPageProxy::continueNavigationInNewProcess()
https://bugs.webkit.org/show_bug.cgi?id=192404

Reviewed by Alex Christensen.

Simplify get the item state from the current back/forward list item, instead of
relying on WebBackForwardList::filteredItemStates().

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):

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

9 months agowebkitpy: Clean-up apple_additions
jbedard@apple.com [Wed, 5 Dec 2018 22:34:51 +0000 (22:34 +0000)]
webkitpy: Clean-up apple_additions
https://bugs.webkit.org/show_bug.cgi?id=192413
<rdar://problem/46493491>

Reviewed by Lucas Forschler.

After the addition of watchOS, some functions which were originally iOS specific were
generalized to include all devices.

* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort._driver_class): Replace iOS specific call with generalized device call.
(IOSDevicePort.path_to_crash_logs): Ditto.
(IOSDevicePort.clean_up_test_run): Ditto.

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

9 months agoEnable the possibility to do video capture in UIProcess
youenn@apple.com [Wed, 5 Dec 2018 22:32:26 +0000 (22:32 +0000)]
Enable the possibility to do video capture in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=192394

Reviewed by Eric Carlson.

Source/WebCore:

Create IOSurface-backed sample buffers so that we can easily send them through IPC.
Manually tested.

* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::setSizeAndFrameRateWithPreset):

Source/WebKit:

Add two web preferences to toggle audio/video capture in UIProcess or WebProcess.
Add mechanism for video capture that was not implemented yet.

* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCaptureAudioInUIProcessEnabled):
(WKPreferencesGetCaptureAudioInUIProcessEnabled):
(WKPreferencesSetCaptureVideoInUIProcessEnabled):
(WKPreferencesGetCaptureVideoInUIProcessEnabled):
* UIProcess/API/C/WKPreferencesRef.h:
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::updateBoolValueForInternalDebugFeatureKey):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::createWebPage):
* WebProcess/cocoa/UserMediaCaptureManager.cpp:
(WebKit::UserMediaCaptureManager::initialize):

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

9 months agoUpdate ServiceWorkerContainer::getRegistration lambdas
youenn@apple.com [Wed, 5 Dec 2018 21:35:50 +0000 (21:35 +0000)]
Update ServiceWorkerContainer::getRegistration lambdas
https://bugs.webkit.org/show_bug.cgi?id=192376

Reviewed by Chris Dumez.

There is no need to pass 'this' in lambdas as the last lambda
takes a ScriptExecutionContext&.
No change of behavior.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::getRegistration):
(WebCore::ServiceWorkerContainer::getRegistrations):

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

9 months ago[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker...
youenn@apple.com [Wed, 5 Dec 2018 21:15:36 +0000 (21:15 +0000)]
[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=189727
<rdar://problem/44584993>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Make the test more deterministic and output more test to ease debugging.

* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https-expected.txt:
* web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html:
* web-platform-tests/service-workers/service-worker/resources/fetch-cors-xhr-iframe.html:

LayoutTests:

* TestExpectations:
* platform/ios/TestExpectations:

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

9 months agowebkitpy: Ignore case when comparing device types
jbedard@apple.com [Wed, 5 Dec 2018 21:02:46 +0000 (21:02 +0000)]
webkitpy: Ignore case when comparing device types
https://bugs.webkit.org/show_bug.cgi?id=192409
<rdar://problem/46491558>

Reviewed by Lucas Forschler.

This allows DeviceTypes constructed with lowercase strings to correctly compare
against DeviceTypes coming from the simulator runtime.

* Scripts/webkitpy/xcode/device_type.py:
(DeviceType.__eq__):
(DeviceType.__contains__):
* Scripts/webkitpy/xcode/device_type_unittest.py:
(DeviceTypeTest):
(DeviceTypeTest.test_comparsion_lower_case):

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

9 months agoCrash under WebCore::cachedDocumentWrapper()
cdumez@apple.com [Wed, 5 Dec 2018 20:58:55 +0000 (20:58 +0000)]
Crash under WebCore::cachedDocumentWrapper()
https://bugs.webkit.org/show_bug.cgi?id=192421
<rdar://problem/37114163>

Reviewed by Alex Christensen.

Fix potential null defererence of the value returned by toJSDOMWindow(). For example,
if the window is frameless, it would return null.

* bindings/js/JSDocumentCustom.cpp:
(WebCore::cachedDocumentWrapper):

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

9 months ago[MediaStream] Cleanup up Mac screen capture class
eric.carlson@apple.com [Wed, 5 Dec 2018 20:21:54 +0000 (20:21 +0000)]
[MediaStream] Cleanup up Mac screen capture class
https://bugs.webkit.org/show_bug.cgi?id=192379
<rdar://problem/46465458>

Reviewed by Youenn Fablet.

No new tests, tested manually.

* platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp:
(WebCore::DisplayCaptureManagerCocoa::captureDevices): Initialize Screen devices first so
they are first in the list of devices.

* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
(WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream): Cleanup. Always capture at the
native screen size to work around a bug.
(WebCore::ScreenDisplayCaptureSourceMac::settingsDidChange): Deleted.

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

9 months agowebkitpy: Sort tests by associated device type
jbedard@apple.com [Wed, 5 Dec 2018 19:30:47 +0000 (19:30 +0000)]
webkitpy: Sort tests by associated device type
https://bugs.webkit.org/show_bug.cgi?id=192161
<rdar://problem/46345392>

Reviewed by Lucas Forschler.

Sort tests by device type and make an effort to run each specified device type.
Do not run tests if their specified device is not available.

* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.is_watchos): Add watchos bits to platform info.
(PlatformInfo._determine_os_name): Ditto.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager.run): Assign each test a device type. Then, generate a list of
device types to sequentially iterate through. Note that a test will run
on the first device which matches.
(Manager._end_test_run): Handle the case where no devices are available and no
tests are run.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(_set_up_derived_options): Manage child processes in manager.
* Scripts/webkitpy/port/base.py:
(Port):
(Port.default_child_processes): Accept additional arguments.
(Port.max_child_processes): Add upper limit for number of child processes.
* Scripts/webkitpy/port/device_port.py:
(DevicePort):
(DevicePort._device_type_with_version): Adds version to the DeviceType.
(DevicePort.default_child_processes): Allows default_child_processes to be
attached to a device type.
(DevicePort.max_child_processes): Add upper limit to the maximum number of child processes.
(DevicePort.setup_test_run): Use _device_type_with_version.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort):
(IOSDevicePort.default_child_processes): Deleted.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.default_child_processes): Deleted.
(IOSSimulatorPort.check_sys_deps): Deleted.
* Scripts/webkitpy/port/mac.py:
(MacPort.default_child_processes): Accept additional arguments.
* Scripts/webkitpy/port/test.py:
* Scripts/webkitpy/port/watch_device.py:
(WatchDevicePort):
(WatchDevicePort.default_child_processes): Deleted.
* Scripts/webkitpy/port/watch_simulator.py:
(WatchSimulatorPort.default_child_processes): Deleted.
(WatchSimulatorPort.check_sys_deps): Deleted.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager):
(SimulatedDeviceManager.device_count_for_type): Count the number of devices
available for a specific device type.

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

9 months agoUnreviewed, rolling out r238844, r238846, and r238874.
commit-queue@webkit.org [Wed, 5 Dec 2018 19:21:23 +0000 (19:21 +0000)]
Unreviewed, rolling out r238844, r238846, and r238874.
https://bugs.webkit.org/show_bug.cgi?id=192414

The layout tests added with this change are flaky. (Requested
by ryanhaddad on #webkit).

Reverted changesets:

"Implement non-timeslice mode encoding for MediaRecorder"
https://bugs.webkit.org/show_bug.cgi?id=192069
https://trac.webkit.org/changeset/238844

"Fix the build"
https://trac.webkit.org/changeset/238846

"Fix MediaRecorder flaky tests"
https://bugs.webkit.org/show_bug.cgi?id=192371
https://trac.webkit.org/changeset/238874

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

9 months agoUnreviewed, add myself to some watch lists.
drousso@apple.com [Wed, 5 Dec 2018 19:19:00 +0000 (19:19 +0000)]
Unreviewed, add myself to some watch lists.

* Scripts/webkitpy/common/config/watchlist:

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

9 months agoMake WebsiteDataStoreConfiguration a proper API object
achristensen@apple.com [Wed, 5 Dec 2018 18:42:21 +0000 (18:42 +0000)]
Make WebsiteDataStoreConfiguration a proper API object
https://bugs.webkit.org/show_bug.cgi?id=192380

Reviewed by Youenn Fablet.

In the immediate future I'll need to add things to _WKWebsiteDataStoreConfiguration.
Instead of making ivars, setting them, copying them to a local object, make this a wrapper of an API::Object
like all our other ObjC API objects are.

* Shared/API/APIObject.h:
(API::Object::wrapper const):
(API::Object::wrapper): Deleted.
* Shared/Cocoa/APIObject.mm:
(API::Object::ref const):
(API::Object::deref const):
(API::Object::newObject):
(API::Object::ref): Deleted.
(API::Object::deref): Deleted.
* Sources.txt:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::createLegacy):
(API::WebsiteDataStore::WebsiteDataStore):
(API::WebsiteDataStore::legacyDefaultDataStoreConfiguration):
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultDataStoreConfiguration):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration _webStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setWebStorageDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _indexedDBDatabaseDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setIndexedDBDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _webSQLDatabaseDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setWebSQLDatabaseDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _cookieStorageFile]):
(-[_WKWebsiteDataStoreConfiguration _setCookieStorageFile:]):
(-[_WKWebsiteDataStoreConfiguration _resourceLoadStatisticsDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setResourceLoadStatisticsDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
(-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
(-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
(-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]):
(-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]):
(-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]):
(-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]):
(-[_WKWebsiteDataStoreConfiguration _apiObject]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfigurationInternal.h: Added.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::retrieveCacheStorageParameters):
* UIProcess/WebProcessPool.cpp:
(WebKit::legacyWebsiteDataStoreConfiguration):
(WebKit::WebProcessPool::mayHaveRegisteredServiceWorkers):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::create):
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::Configuration::Configuration): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::cacheStoragePerOriginQuota const):
(WebKit::WebsiteDataStore::setCacheStoragePerOriginQuota):
(WebKit::WebsiteDataStore::cacheStorageDirectory const):
(WebKit::WebsiteDataStore::setCacheStorageDirectory):
(WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
(WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
(WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const):
(WebKit::WebsiteDataStore::resolvedMediaCacheDirectory const):
(WebKit::WebsiteDataStore::resolvedMediaKeysDirectory const):
(WebKit::WebsiteDataStore::resolvedDatabaseDirectory const):
(WebKit::WebsiteDataStore::resolvedJavaScriptConfigurationDirectory const):
(WebKit::WebsiteDataStore::resolvedCookieStorageFile const):
(WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const):
(WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):
(WebKit::WebsiteDataStore::resolvedResourceLoadStatisticsDirectory const):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp: Added.
(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):
* UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h: Added.
(WebKit::WebsiteDataStoreConfiguration::create):
(WebKit::WebsiteDataStoreConfiguration::cacheStoragePerOriginQuota):
(WebKit::WebsiteDataStoreConfiguration::setCacheStoragePerOriginQuota):
(WebKit::WebsiteDataStoreConfiguration::applicationCacheDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setApplicationCacheDirectory):
(WebKit::WebsiteDataStoreConfiguration::mediaCacheDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setMediaCacheDirectory):
(WebKit::WebsiteDataStoreConfiguration::mediaKeysStorageDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setMediaKeysStorageDirectory):
(WebKit::WebsiteDataStoreConfiguration::javaScriptConfigurationDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setJavaScriptConfigurationDirectory):
(WebKit::WebsiteDataStoreConfiguration::webStorageDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setWebStorageDirectory):
(WebKit::WebsiteDataStoreConfiguration::indexedDBDatabaseDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setIndexedDBDatabaseDirectory):
(WebKit::WebsiteDataStoreConfiguration::webSQLDatabaseDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setWebSQLDatabaseDirectory):
(WebKit::WebsiteDataStoreConfiguration::localStorageDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setLocalStorageDirectory):
(WebKit::WebsiteDataStoreConfiguration::cookieStorageFile const):
(WebKit::WebsiteDataStoreConfiguration::setCookieStorageFile):
(WebKit::WebsiteDataStoreConfiguration::resourceLoadStatisticsDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setResourceLoadStatisticsDirectory):
(WebKit::WebsiteDataStoreConfiguration::networkCacheDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setNetworkCacheDirectory):
(WebKit::WebsiteDataStoreConfiguration::cacheStorageDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setCacheStorageDirectory):
(WebKit::WebsiteDataStoreConfiguration::applicationCacheFlatFileSubdirectoryName const):
(WebKit::WebsiteDataStoreConfiguration::setApplicationCacheFlatFileSubdirectoryName):
(WebKit::WebsiteDataStoreConfiguration::serviceWorkerRegistrationDirectory const):
(WebKit::WebsiteDataStoreConfiguration::setServiceWorkerRegistrationDirectory):
(WebKit::WebsiteDataStoreConfiguration::sourceApplicationBundleIdentifier const):
(WebKit::WebsiteDataStoreConfiguration::setSourceApplicationBundleIdentifier):
(WebKit::WebsiteDataStoreConfiguration::sourceApplicationSecondaryIdentifier const):
(WebKit::WebsiteDataStoreConfiguration::setSourceApplicationSecondaryIdentifier):
* WebKit.xcodeproj/project.pbxproj:

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

9 months agoLayout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
pvollan@apple.com [Wed, 5 Dec 2018 18:33:14 +0000 (18:33 +0000)]
Layout Test http/tests/misc/resource-timing-resolution.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=181957

Unreviewed test gardening.

* platform/win/TestExpectations:

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

9 months agoMinor refactoring of the scrolling code
simon.fraser@apple.com [Wed, 5 Dec 2018 18:20:56 +0000 (18:20 +0000)]
Minor refactoring of the scrolling code
https://bugs.webkit.org/show_bug.cgi?id=192398

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-05
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

This patch performs some minor refactoring of the scrolling code:
- Rename ScrollingCoordinator::uniqueScrollLayerID() to uniqueScrollingNodeID() since it
  is really a node id.
- Inline ScrollingStateTree::setRootStateNode() so we only need to forward declare
  ScrollingStateFrameScrollingNode in headers.
- Pass argument to ScrollingStateTree::addNode() as a reference rather than a pointer.
- Initialize ScrollingStateTree::m_changedProperties and ScrollingStateTree::m_parent in
  the header file.
- Remove obsolete comment about ScrollingCoordinatorMac.

No new tests, behavior unchanged.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::uniqueScrollingNodeID):
(WebCore::ScrollingCoordinator::uniqueScrollLayerID): Deleted.
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::setRootStateNode):
(WebCore::ScrollingStateTree::addNode):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::setRootStateNode): Deleted.
* page/scrolling/ScrollingTree.cpp:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):

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

9 months agoTurn WritingDirection into an enum class
wenson_hsieh@apple.com [Wed, 5 Dec 2018 17:51:03 +0000 (17:51 +0000)]
Turn WritingDirection into an enum class
https://bugs.webkit.org/show_bug.cgi?id=192401
Work towards <rdar://problem/42075638>

Reviewed by Dan Bernstein.

Change WritingDirection from an enum to an enum class. No change in behavior.

Source/WebCore:

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::applyInlineStyle):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::textDirection const):
(WebCore::EditingStyle::textDirectionForSelection):
* editing/Editor.cpp:
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::baseWritingDirectionForSelectionStart const):
* editing/EditorCommand.cpp:
(WebCore::stateTextWritingDirectionLeftToRight):
(WebCore::stateTextWritingDirectionNatural):
(WebCore::stateTextWritingDirectionRightToLeft):
* editing/WritingDirection.h:

Additionally wrap this enum in `namespace WebCore`, and update the copyright year.

* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
* testing/Internals.cpp:
(WebCore::Internals::setBaseWritingDirection):

Source/WebKit:

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::setTextDirection):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame selectionBaseWritingDirection]):
(-[WebFrame setBaseWritingDirection:]):

Source/WebKitLegacy/mac:

* WebView/WebHTMLView.mm:
(-[WebHTMLView toggleBaseWritingDirection:]):
(-[WebHTMLView changeBaseWritingDirection:]):
(-[WebHTMLView _changeBaseWritingDirectionTo:]):

Source/WebKitLegacy/win:

* WebFrame.cpp:
(WebFrame::setTextDirection):

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

9 months agoImport css overscroll behavior WPT test
commit-queue@webkit.org [Wed, 5 Dec 2018 16:05:58 +0000 (16:05 +0000)]
Import css overscroll behavior WPT test
https://bugs.webkit.org/show_bug.cgi?id=192397

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-05
Reviewed by Manuel Rego Casasnovas.

* resources/import-expectations.json:
* web-platform-tests/css/css-overscroll-behavior/META.yml: Added.
* web-platform-tests/css/css-overscroll-behavior/inheritance-expected.txt: Added.
* web-platform-tests/css/css-overscroll-behavior/inheritance.html: Added.
* web-platform-tests/css/css-overscroll-behavior/w3c-import.log: Added.

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

9 months ago[MSE][GStreamer] Remove the AppendPipeline state machine
aboya@igalia.com [Wed, 5 Dec 2018 14:56:33 +0000 (14:56 +0000)]
[MSE][GStreamer] Remove the AppendPipeline state machine
https://bugs.webkit.org/show_bug.cgi?id=192204

Reviewed by Xabier Rodriguez-Calvar.

LayoutTests/imported/w3c:

Added a test checking that initialization segments with invalid codec
identifiers are flagged as errors.

* web-platform-tests/media-source/mediasource-invalid-codec-expected.txt: Added.
* web-platform-tests/media-source/mediasource-invalid-codec.html: Added.
* web-platform-tests/media-source/mp4/invalid-codec.mp4: Added.
* web-platform-tests/media-source/webm/invalid-codec.webm: Added.

Source/WebCore:

This patch tries to reduce the complexity of the AppendPipeline by
removing the appendState state machine and cleaning all the
conditional code around it that is not necessary anymore.

For the most part the behavior is the same, but some edge cases have
been improved in the process:

Demuxing errors now result in the append being flagged as
ParsingFailed and the error being propagated to the application. This
fixes media/media-source/media-source-error-crash.html (or at least
gets it up to date with cross platform expectations).

AbortableTaskQueue now allows the task handler to perform an abort
safely. This is used in the GstBus error message sync handler, since
it needs to ask the MainThread to raise a parse error, which will in
turn abort. An API test has been added for this new functionality.
Also, code has been added to the API tests to ensure the correct
destruction of the response object, especially in this case.

The code handling invalid track codecs has been made clearer by also
explicitly raising a parse error, but it should not expose behavior
differences for the application. A test has been added for this
behavior: web-platform-tests/media-source/mediasource-invalid-codec.html

The reporting of EOS events have been made more rigorous. EOS is only
expected after a demuxing error, otherwise it's a g_critical.

AppendPipeline::abort() has been renamed to
AppendPipeline::resetParserState() to honor the fact that it's not
only called when the user calls abort() and match better the names
used in the spec.

Test: imported/w3c/web-platform-tests/media-source/mediasource-invalid-codec.html

* platform/AbortableTaskQueue.h:
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::assertedElementSetState):
(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::~AppendPipeline):
(WebCore::AppendPipeline::handleErrorSyncMessage):
(WebCore::AppendPipeline::appsrcEndOfAppendCheckerProbe):
(WebCore::AppendPipeline::handleNeedContextSyncMessage):
(WebCore::AppendPipeline::appsinkCapsChanged):
(WebCore::AppendPipeline::handleEndOfAppend):
(WebCore::AppendPipeline::appsinkNewSample):
(WebCore::AppendPipeline::didReceiveInitializationSegment):
(WebCore::AppendPipeline::resetParserState):
(WebCore::AppendPipeline::pushNewBuffer):
(WebCore::AppendPipeline::handleAppsinkNewSampleFromStreamingThread):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromStreamingThread):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
(WebCore::AppendPipeline::dumpAppendState): Deleted.
(WebCore::AppendPipeline::demuxerNoMorePads): Deleted.
(WebCore::AppendPipeline::setAppendState): Deleted.
(WebCore::AppendPipeline::appsinkEOS): Deleted.
(WebCore::AppendPipeline::resetPipeline): Deleted.
(WebCore::AppendPipeline::abort): Deleted.
* platform/graphics/gstreamer/mse/AppendPipeline.h:
(WebCore::AppendPipeline::appendState): Deleted.
* platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
(WebCore::MediaSourceClientGStreamerMSE::abort):
(WebCore::MediaSourceClientGStreamerMSE::resetParserState):
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::appendParsingFailed):
* platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:

Tools:

Updated AbortableTaskQueue tests:

Added test: AbortedBySyncTaskHandler.

Renamed test: AbortDuringSyncTask -> AbortBeforeSyncTaskRun (in
order to avoid confusion with the new test).

Added checks for the correct destruction of response objects.

* TestWebKitAPI/Tests/WebCore/AbortableTaskQueue.cpp:
(TestWebKitAPI::FancyResponse::FancyResponse):
(TestWebKitAPI::FancyResponse::~FancyResponse):
(TestWebKitAPI::TEST):

LayoutTests:

Removed timeout expectations for
media/media-source/media-source-error-crash.html

Added expectations for mediasource-invalid-codec.html for Mac, where
WebM is not supported.

* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:
* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-invalid-codec-expected.txt: Added.

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

9 months ago[Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests...
commit-queue@webkit.org [Wed, 5 Dec 2018 11:10:56 +0000 (11:10 +0000)]
[Mac] HEAD requests changed to GET after 301, 302, and 303 redirections (http/tests/xmlhttprequest/head-redirection.html)
https://bugs.webkit.org/show_bug.cgi?id=114965

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-05
Reviewed by Frédéric Wang.

LayoutTests/imported/w3c:

Update test expectations.

* web-platform-tests/fetch/api/redirect/redirect-method-expected.txt:
* web-platform-tests/fetch/api/redirect/redirect-method-worker-expected.txt:

Source/WebCore:

HEAD requests should not be changed to GET after 303 redirects, see [1].
This was fixed earlier for GTK [2].

Behavior matches Firefox and Chrome.

[1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
[2] https://bugs.webkit.org/show_bug.cgi?id=110127

Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
       web-platform-tests/fetch/api/redirect/redirect-method-worker.html
       http/tests/xmlhttprequest/head-redirection.html

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest):

Source/WebKit:

HEAD requests should not be changed to GET after 303 redirects, see [1].
This was fixed earlier for GTK [2].

Behavior matches Firefox and Chrome.

[1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4
[2] https://bugs.webkit.org/show_bug.cgi?id=110127

Tests: web-platform-tests/fetch/api/redirect/redirect-method.html
       web-platform-tests/fetch/api/redirect/redirect-method-worker.html
       http/tests/xmlhttprequest/head-redirection.html

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

LayoutTests:

Update these since we now expect to pass head-redirection.html here.

* platform/ios/TestExpectations:
* platform/mac/http/tests/xmlhttprequest/head-redirection-expected.txt: Removed.

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

9 months agoAlign with Fetch on data: URLs
commit-queue@webkit.org [Wed, 5 Dec 2018 09:26:27 +0000 (09:26 +0000)]
Align with Fetch on data: URLs
https://bugs.webkit.org/show_bug.cgi?id=182325

Patch by Rob Buis <rbuis@igalia.com> on 2018-12-05
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Update improved test expectations.

* web-platform-tests/fetch/api/basic/scheme-data.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-data.any.worker-expected.txt:

Source/WebCore:

Do not accept data URLs that do not contain a comma
character, as specified in the relevant specs [1, 2].

Behavior matches Firefox and Chrome.

Test: web-platform-tests/fetch/api/basic/scheme-data.any.html

[1] https://tools.ietf.org/html/rfc2397
[2] https://fetch.spec.whatwg.org/#data-url-processor

* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::parseMediaType):
(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::DecodeTask::process):
(WebCore::DataURLDecoder::createDecodeTask):
(WebCore::DataURLDecoder::decode):

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

9 months agoUnreviewed build fix.
fred.wang@free.fr [Wed, 5 Dec 2018 08:26:03 +0000 (08:26 +0000)]
Unreviewed build fix.

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-05

* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm: Add missing header.

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

9 months ago[css-grid] Crash on debug changing the style of a positioned element
jfernandez@igalia.com [Wed, 5 Dec 2018 08:17:10 +0000 (08:17 +0000)]
[css-grid] Crash on debug changing the style of a positioned element
https://bugs.webkit.org/show_bug.cgi?id=191473

Reviewed by Dean Jackson and Zalan Bujtas.

Source/WebCore:

When an box becomes {out-of,in}-flow, it may be re-parented and it may become a grid
item. In that case, we must mark the RenderGrid as dirty, so that the grid items
placement logic is executed again.

Test: fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html

* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::childFlowStateChangesAndAffectsParentBlock): Consider the case of a box's new parent being a grid container.

LayoutTests:

Regression test to ensure that the grid placement logic is executed
when a positioned item becomes a grid item.

* fast/css-grid-layout/grid-crash-out-of-flow-positioned-element-expected.txt:
* fast/css-grid-layout/grid-crash-out-of-flow-positioned-element.html:
* TestExpectations: Remove a Skip entry, since the test doesn't crash anymore.

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

9 months agoRemove using namespace WebCore and WebKit under WebKit/Shared/API
Hironori.Fujii@sony.com [Wed, 5 Dec 2018 06:52:17 +0000 (06:52 +0000)]
Remove using namespace WebCore and WebKit under WebKit/Shared/API
https://bugs.webkit.org/show_bug.cgi?id=192352

Reviewed by Alex Christensen.

Removed using namespace statements, and use namespace prefix
instead.

* Shared/API/APIURLRequest.cpp:
* Shared/API/APIURLResponse.cpp:
* Shared/API/c/WKArray.cpp:
* Shared/API/c/WKCertificateInfo.cpp:
* Shared/API/c/WKConnectionRef.cpp:
* Shared/API/c/WKContextMenuItem.cpp:
* Shared/API/c/WKData.cpp:
* Shared/API/c/WKDictionary.cpp:
* Shared/API/c/WKErrorRef.cpp:
* Shared/API/c/WKGeometry.cpp:
* Shared/API/c/WKImage.cpp:
* Shared/API/c/WKMutableArray.cpp:
* Shared/API/c/WKMutableDictionary.cpp:
* Shared/API/c/WKNumber.cpp:
* Shared/API/c/WKPluginInformation.cpp:
* Shared/API/c/WKRenderLayer.cpp:
* Shared/API/c/WKRenderObject.cpp:
* Shared/API/c/WKSecurityOriginRef.cpp:
* Shared/API/c/WKSerializedScriptValue.cpp:
* Shared/API/c/WKString.cpp:
* Shared/API/c/WKType.cpp:
* Shared/API/c/WKURL.cpp:
* Shared/API/c/WKURLRequest.cpp:
* Shared/API/c/WKURLResponse.cpp:
* Shared/API/c/WKUserContentURLPattern.cpp:
* Shared/API/c/cairo/WKImageCairo.cpp:
* Shared/API/c/curl/WKCertificateInfoCurl.cpp:

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

9 months agoRemove source application identifiers from NetworkProcessCreationParameters
achristensen@apple.com [Wed, 5 Dec 2018 05:51:20 +0000 (05:51 +0000)]
Remove source application identifiers from NetworkProcessCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=192372

Reviewed by Brady Eidson.

The _WKWebProcessPoolConfiguration way of setting these was deprecated in http://trac.webkit.org/r235127
The replacement was adopted in <rdar://problem/46359330>
The transition process is done!  Time to remove the old code.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* NetworkProcess/cocoa/NetworkSessionCocoa.h:
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
(WebKit::globalSourceApplicationAuditTokenData): Deleted.
(WebKit::globalSourceApplicationBundleIdentifier): Deleted.
(WebKit::globalSourceApplicationSecondaryIdentifier): Deleted.
(WebKit::NetworkSessionCocoa::setSourceApplicationAuditTokenData): Deleted.
(WebKit::NetworkSessionCocoa::setSourceApplicationBundleIdentifier): Deleted.
(WebKit::NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier): Deleted.
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration sourceApplicationBundleIdentifier]):
(-[_WKProcessPoolConfiguration setSourceApplicationBundleIdentifier:]):
(-[_WKProcessPoolConfiguration sourceApplicationSecondaryIdentifier]):
(-[_WKProcessPoolConfiguration setSourceApplicationSecondaryIdentifier:]):
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard):
(WebKit::toPKPaymentRequest):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::configuration):

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

9 months agoAlways pass scrollingGeometry to update*ScrollingNode functions
commit-queue@webkit.org [Wed, 5 Dec 2018 03:58:01 +0000 (03:58 +0000)]
Always pass scrollingGeometry to update*ScrollingNode functions
https://bugs.webkit.org/show_bug.cgi?id=192358

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-04
Reviewed by Simon Fraser.

Currently, the scrollingGeometry parameter of updateOverflowScrollingNode is always used
while the one of updateFrameScrollingNode is never used. Both of them are passed as possibly
null pointers. This commit makes things more consistent by making the parameter a reference
and explicitly setting the scrollingGeometry of updateFrameScrollingNode. This will help
other efforts (such as support for macOS/iOS asynchronous scrolling of overflow nodes /
subframes or for CSS overscroll-behavior) for which new data members have to be passed to the
scrolling nodes.

No new tests, no behavior changes.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::updateFrameScrollingNode):
(WebCore::ScrollingCoordinator::updateOverflowScrollingNode):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

9 months agoDFG's StrengthReduction phase should not reduce Construct into DirectContruct when...
mark.lam@apple.com [Wed, 5 Dec 2018 03:23:54 +0000 (03:23 +0000)]
DFG's StrengthReduction phase should not reduce Construct into DirectContruct when the executable does not have constructAbility.
https://bugs.webkit.org/show_bug.cgi?id=192386
<rdar://problem/46445516>

Reviewed by Saam Barati.

JSTests:

* stress/regress-192386.js: Added.

Source/JavaScriptCore:

This violates an invariant documented by a RELEASE_ASSERT in operationLinkDirectCall().

* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

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

9 months agoAttempt to de-flake this test by scrolling a bit more.
simon.fraser@apple.com [Wed, 5 Dec 2018 02:18:07 +0000 (02:18 +0000)]
Attempt to de-flake this test by scrolling a bit more.

* compositing/fixed-with-main-thread-scrolling.html:

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

9 months agoWeb Inspector: Add style editing debug mode
nvasilyev@apple.com [Wed, 5 Dec 2018 01:37:03 +0000 (01:37 +0000)]
Web Inspector: Add style editing debug mode
https://bugs.webkit.org/show_bug.cgi?id=192282
<rdar://problem/46399176>

Reviewed by Matt Baker.

Introduce a style editing debug mode to help to troubleshoot complex bugs in the style editor.

  - Log CSS changes;
  - Display red border for locked style declarations.

* UserInterface/Base/Setting.js:
* UserInterface/Models/CSSProperty.js:
(WI.CSSProperty.prototype._updateOwnerStyleText):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.prototype._createDebugSettingsView):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
(.spreadsheet-style-declaration-editor.debug-style-locked::after):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateDebugLockStatus):

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

9 months agoUnreviewed. Update W3C WebDriver imported tests.
bburg@apple.com [Wed, 5 Dec 2018 01:04:22 +0000 (01:04 +0000)]
Unreviewed. Update W3C WebDriver imported tests.
<rdar://problem/46470254>

* imported/w3c/importer.json:
* imported/w3c/tools/webdriver/webdriver/client.py:
* imported/w3c/tools/webdriver/webdriver/error.py:
* imported/w3c/tools/wptrunner/docs/design.rst:
* imported/w3c/tools/wptrunner/requirements.txt:
* imported/w3c/tools/wptrunner/requirements_chrome.txt:
* imported/w3c/tools/wptrunner/requirements_chrome_android.txt:
* imported/w3c/tools/wptrunner/requirements_edge.txt:
* imported/w3c/tools/wptrunner/requirements_firefox.txt:
* imported/w3c/tools/wptrunner/requirements_ie.txt:
* imported/w3c/tools/wptrunner/requirements_opera.txt:
* imported/w3c/tools/wptrunner/requirements_safari.txt:
* imported/w3c/tools/wptrunner/requirements_sauce.txt:
* imported/w3c/tools/wptrunner/tox.ini:
* imported/w3c/tools/wptrunner/wptrunner/browsers/__init__.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/base.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/chrome.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/edge_webdriver.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/browsers/fennec.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/safari.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/sauce.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/servodriver.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/webkit.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/base.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executormarionette.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorwebdriver.py: Copied from WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py.
* imported/w3c/tools/wptrunner/wptrunner/executors/protocol.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/runner.js: Added.
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_webdriver.js:
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js:
* imported/w3c/tools/wptrunner/wptrunner/formatters.py:
* imported/w3c/tools/wptrunner/wptrunner/manifestexpected.py:
* imported/w3c/tools/wptrunner/wptrunner/stability.py:
* imported/w3c/tools/wptrunner/wptrunner/testdriver-extra.js:
* imported/w3c/tools/wptrunner/wptrunner/testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/testrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/base.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_formatters.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_stability.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_update.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_wpttest.py:
* imported/w3c/tools/wptrunner/wptrunner/update/tree.py:
* imported/w3c/tools/wptrunner/wptrunner/update/update.py:
* imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py:
* imported/w3c/tools/wptrunner/wptrunner/wptcommandline.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/parser.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_parser.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py:
* imported/w3c/tools/wptrunner/wptrunner/wptrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/wpttest.py:
* imported/w3c/webdriver/tests/add_cookie/add.py:
* imported/w3c/webdriver/tests/add_cookie/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/back/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/conftest.py:
* imported/w3c/webdriver/tests/delete_all_cookies/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/delete_session/delete.py:
* imported/w3c/webdriver/tests/element_clear/clear.py:
* imported/w3c/webdriver/tests/element_clear/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/element_click/center_point.py: Added.
* imported/w3c/webdriver/tests/element_click/interactability.py:
* imported/w3c/webdriver/tests/element_click/scroll_into_view.py:
* imported/w3c/webdriver/tests/element_click/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/element_send_keys/file_upload.py:
* imported/w3c/webdriver/tests/element_send_keys/interactability.py:
* imported/w3c/webdriver/tests/element_send_keys/scroll_into_view.py:
* imported/w3c/webdriver/tests/element_send_keys/send_keys.py:
* imported/w3c/webdriver/tests/execute_async_script/execute_async.py:
* imported/w3c/webdriver/tests/execute_script/execute.py:
* imported/w3c/webdriver/tests/execute_script/promise.py: Added.
* imported/w3c/webdriver/tests/find_element/find.py:
* imported/w3c/webdriver/tests/find_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_element_from_element/find.py:
* imported/w3c/webdriver/tests/find_element_from_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_elements/find.py:
* imported/w3c/webdriver/tests/find_elements/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_elements_from_element/find.py:
* imported/w3c/webdriver/tests/find_elements_from_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py.
* imported/w3c/webdriver/tests/fullscreen_window/fullscreen.py:
* imported/w3c/webdriver/tests/fullscreen_window/stress.py: Added.
* imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py:
* imported/w3c/webdriver/tests/get_active_element/get.py:
* imported/w3c/webdriver/tests/get_active_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_current_url/get.py:
* imported/w3c/webdriver/tests/get_element_attribute/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_attribute/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_css_value/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_css_value/get.py: Added.
* imported/w3c/webdriver/tests/get_element_css_value/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_rect/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_rect/get.py: Added.
* imported/w3c/webdriver/tests/get_element_rect/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_text/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_named_cookie/get.py:
* imported/w3c/webdriver/tests/get_named_cookie/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_page_source/__init__.py: Added.
* imported/w3c/webdriver/tests/get_page_source/source.py: Added.
* imported/w3c/webdriver/tests/get_page_source/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_title/get.py:
* imported/w3c/webdriver/tests/get_window_handle/__init__.py: Added.
* imported/w3c/webdriver/tests/get_window_handle/get.py: Added.
* imported/w3c/webdriver/tests/get_window_handle/user_prompts.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/__init__.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/get.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/user_prompts.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/__init__.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/enabled.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/maximize_window/maximize.py:
* imported/w3c/webdriver/tests/maximize_window/stress.py: Added.
* imported/w3c/webdriver/tests/minimize_window/minimize.py:
* imported/w3c/webdriver/tests/minimize_window/stress.py: Added.
* imported/w3c/webdriver/tests/minimize_window/user_prompts.py:
* imported/w3c/webdriver/tests/navigate_to/navigate.py:
* imported/w3c/webdriver/tests/navigate_to/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/new_session/invalid_capabilities.py:
* imported/w3c/webdriver/tests/new_session/platform_name.py:
* imported/w3c/webdriver/tests/new_session/response.py:
* imported/w3c/webdriver/tests/new_session/support/create.py:
* imported/w3c/webdriver/tests/perform_actions/__init__.py: Added.
* imported/w3c/webdriver/tests/perform_actions/conftest.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_events.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_modifiers.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_shortcuts.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_special_keys.py: Added.
* imported/w3c/webdriver/tests/perform_actions/none.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_contextmenu.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_dblclick.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_modifier_click.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_origin.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_pause_dblclick.py: Added.
* imported/w3c/webdriver/tests/perform_actions/sequence.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/__init__.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/keys.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/mouse.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/refine.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/test_actions_wdspec.html: Added.
* imported/w3c/webdriver/tests/perform_actions/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/perform_actions/validity.py: Added.
* imported/w3c/webdriver/tests/permissions/set.py: Added.
* imported/w3c/webdriver/tests/release_actions/__init__.py: Added.
* imported/w3c/webdriver/tests/release_actions/conftest.py: Added.
* imported/w3c/webdriver/tests/release_actions/release.py: Added.
* imported/w3c/webdriver/tests/release_actions/sequence.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/__init__.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/refine.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/test_actions_wdspec.html: Added.
* imported/w3c/webdriver/tests/send_alert_text/send.py:
* imported/w3c/webdriver/tests/set_timeouts/set.py:
* imported/w3c/webdriver/tests/set_timeouts/user_prompts.py: Added.
* imported/w3c/webdriver/tests/set_window_rect/set.py:
* imported/w3c/webdriver/tests/support/asserts.py:
* imported/w3c/webdriver/tests/support/defaults.py: Added.
* imported/w3c/webdriver/tests/support/fixtures.py:
* imported/w3c/webdriver/tests/support/helpers.py: Added.
* imported/w3c/webdriver/tests/support/http_request.py:
* imported/w3c/webdriver/tests/support/image.py: Added.
* imported/w3c/webdriver/tests/support/inline.py:
* imported/w3c/webdriver/tests/support/sync.py: Added.
* imported/w3c/webdriver/tests/switch_to_frame/switch.py:
* imported/w3c/webdriver/tests/switch_to_window/switch.py:
* imported/w3c/webdriver/tests/take_element_screenshot/__init__.py: Added.
* imported/w3c/webdriver/tests/take_element_screenshot/screenshot.py: Added.
* imported/w3c/webdriver/tests/take_element_screenshot/user_prompts.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/__init__.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/screenshot.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/user_prompts.py: Added.
* imported/w3c/importer.json:
* imported/w3c/tools/webdriver/webdriver/client.py:
* imported/w3c/tools/webdriver/webdriver/error.py:
* imported/w3c/tools/wptrunner/docs/design.rst:
* imported/w3c/tools/wptrunner/requirements.txt:
* imported/w3c/tools/wptrunner/requirements_chrome.txt:
* imported/w3c/tools/wptrunner/requirements_chrome_android.txt:
* imported/w3c/tools/wptrunner/requirements_edge.txt:
* imported/w3c/tools/wptrunner/requirements_firefox.txt:
* imported/w3c/tools/wptrunner/requirements_ie.txt:
* imported/w3c/tools/wptrunner/requirements_opera.txt:
* imported/w3c/tools/wptrunner/requirements_safari.txt:
* imported/w3c/tools/wptrunner/requirements_sauce.txt:
* imported/w3c/tools/wptrunner/tox.ini:
* imported/w3c/tools/wptrunner/wptrunner/browsers/__init__.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/base.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/chrome.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/edge_webdriver.py: Added.
* imported/w3c/tools/wptrunner/wptrunner/browsers/fennec.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/firefox.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/safari.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/sauce.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/servodriver.py:
* imported/w3c/tools/wptrunner/wptrunner/browsers/webkit.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/base.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executormarionette.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorservo.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/executorwebdriver.py: Copied from WebDriverTests/imported/w3c/tools/wptrunner/wptrunner/executors/executorselenium.py.
* imported/w3c/tools/wptrunner/wptrunner/executors/protocol.py:
* imported/w3c/tools/wptrunner/wptrunner/executors/runner.js: Added.
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_webdriver.js:
* imported/w3c/tools/wptrunner/wptrunner/executors/testharness_webdriver_resume.js:
* imported/w3c/tools/wptrunner/wptrunner/formatters.py:
* imported/w3c/tools/wptrunner/wptrunner/manifestexpected.py:
* imported/w3c/tools/wptrunner/wptrunner/stability.py:
* imported/w3c/tools/wptrunner/wptrunner/testdriver-extra.js:
* imported/w3c/tools/wptrunner/wptrunner/testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/testrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/base.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_formatters.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_stability.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_testloader.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_update.py:
* imported/w3c/tools/wptrunner/wptrunner/tests/test_wpttest.py:
* imported/w3c/tools/wptrunner/wptrunner/update/tree.py:
* imported/w3c/tools/wptrunner/wptrunner/update/update.py:
* imported/w3c/tools/wptrunner/wptrunner/webdriver_server.py:
* imported/w3c/tools/wptrunner/wptrunner/wptcommandline.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/parser.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_parser.py:
* imported/w3c/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py:
* imported/w3c/tools/wptrunner/wptrunner/wptrunner.py:
* imported/w3c/tools/wptrunner/wptrunner/wpttest.py:
* imported/w3c/webdriver/tests/add_cookie/add.py:
* imported/w3c/webdriver/tests/add_cookie/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/back/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/conftest.py:
* imported/w3c/webdriver/tests/delete_all_cookies/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/delete_session/delete.py:
* imported/w3c/webdriver/tests/element_clear/clear.py:
* imported/w3c/webdriver/tests/element_clear/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/element_click/center_point.py: Added.
* imported/w3c/webdriver/tests/element_click/interactability.py:
* imported/w3c/webdriver/tests/element_click/scroll_into_view.py:
* imported/w3c/webdriver/tests/element_click/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/element_send_keys/file_upload.py:
* imported/w3c/webdriver/tests/element_send_keys/interactability.py:
* imported/w3c/webdriver/tests/element_send_keys/scroll_into_view.py:
* imported/w3c/webdriver/tests/element_send_keys/send_keys.py:
* imported/w3c/webdriver/tests/execute_async_script/execute_async.py:
* imported/w3c/webdriver/tests/execute_script/execute.py:
* imported/w3c/webdriver/tests/execute_script/promise.py: Added.
* imported/w3c/webdriver/tests/find_element/find.py:
* imported/w3c/webdriver/tests/find_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_element_from_element/find.py:
* imported/w3c/webdriver/tests/find_element_from_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_elements/find.py:
* imported/w3c/webdriver/tests/find_elements/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/find_elements_from_element/find.py:
* imported/w3c/webdriver/tests/find_elements_from_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py.
* imported/w3c/webdriver/tests/fullscreen_window/fullscreen.py:
* imported/w3c/webdriver/tests/fullscreen_window/stress.py: Added.
* imported/w3c/webdriver/tests/fullscreen_window/user_prompts.py:
* imported/w3c/webdriver/tests/get_active_element/get.py:
* imported/w3c/webdriver/tests/get_active_element/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_current_url/get.py:
* imported/w3c/webdriver/tests/get_element_attribute/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_attribute/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_css_value/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_css_value/get.py: Added.
* imported/w3c/webdriver/tests/get_element_css_value/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_rect/__init__.py: Added.
* imported/w3c/webdriver/tests/get_element_rect/get.py: Added.
* imported/w3c/webdriver/tests/get_element_rect/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_element_text/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_named_cookie/get.py:
* imported/w3c/webdriver/tests/get_named_cookie/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_page_source/__init__.py: Added.
* imported/w3c/webdriver/tests/get_page_source/source.py: Added.
* imported/w3c/webdriver/tests/get_page_source/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/get_title/get.py:
* imported/w3c/webdriver/tests/get_window_handle/__init__.py: Added.
* imported/w3c/webdriver/tests/get_window_handle/get.py: Added.
* imported/w3c/webdriver/tests/get_window_handle/user_prompts.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/__init__.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/get.py: Added.
* imported/w3c/webdriver/tests/get_window_handles/user_prompts.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/__init__.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/enabled.py: Added.
* imported/w3c/webdriver/tests/is_element_enabled/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/maximize_window/maximize.py:
* imported/w3c/webdriver/tests/maximize_window/stress.py: Added.
* imported/w3c/webdriver/tests/minimize_window/minimize.py:
* imported/w3c/webdriver/tests/minimize_window/stress.py: Added.
* imported/w3c/webdriver/tests/minimize_window/user_prompts.py:
* imported/w3c/webdriver/tests/navigate_to/navigate.py:
* imported/w3c/webdriver/tests/navigate_to/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/new_session/invalid_capabilities.py:
* imported/w3c/webdriver/tests/new_session/platform_name.py:
* imported/w3c/webdriver/tests/new_session/response.py:
* imported/w3c/webdriver/tests/new_session/support/create.py:
* imported/w3c/webdriver/tests/perform_actions/__init__.py: Added.
* imported/w3c/webdriver/tests/perform_actions/conftest.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_events.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_modifiers.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_shortcuts.py: Added.
* imported/w3c/webdriver/tests/perform_actions/key_special_keys.py: Added.
* imported/w3c/webdriver/tests/perform_actions/none.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_contextmenu.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_dblclick.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_modifier_click.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_origin.py: Added.
* imported/w3c/webdriver/tests/perform_actions/pointer_pause_dblclick.py: Added.
* imported/w3c/webdriver/tests/perform_actions/sequence.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/__init__.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/keys.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/mouse.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/refine.py: Added.
* imported/w3c/webdriver/tests/perform_actions/support/test_actions_wdspec.html: Added.
* imported/w3c/webdriver/tests/perform_actions/user_prompts.py: Copied from WebDriverTests/imported/w3c/webdriver/tests/minimize_window/user_prompts.py.
* imported/w3c/webdriver/tests/perform_actions/validity.py: Added.
* imported/w3c/webdriver/tests/permissions/set.py: Added.
* imported/w3c/webdriver/tests/release_actions/__init__.py: Added.
* imported/w3c/webdriver/tests/release_actions/conftest.py: Added.
* imported/w3c/webdriver/tests/release_actions/release.py: Added.
* imported/w3c/webdriver/tests/release_actions/sequence.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/__init__.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/refine.py: Added.
* imported/w3c/webdriver/tests/release_actions/support/test_actions_wdspec.html: Added.
* imported/w3c/webdriver/tests/send_alert_text/send.py:
* imported/w3c/webdriver/tests/set_timeouts/set.py:
* imported/w3c/webdriver/tests/set_timeouts/user_prompts.py: Added.
* imported/w3c/webdriver/tests/set_window_rect/set.py:
* imported/w3c/webdriver/tests/support/asserts.py:
* imported/w3c/webdriver/tests/support/defaults.py: Added.
* imported/w3c/webdriver/tests/support/fixtures.py:
* imported/w3c/webdriver/tests/support/helpers.py: Added.
* imported/w3c/webdriver/tests/support/http_request.py:
* imported/w3c/webdriver/tests/support/image.py: Added.
* imported/w3c/webdriver/tests/support/inline.py:
* imported/w3c/webdriver/tests/support/sync.py: Added.
* imported/w3c/webdriver/tests/switch_to_frame/switch.py:
* imported/w3c/webdriver/tests/switch_to_window/switch.py:
* imported/w3c/webdriver/tests/take_element_screenshot/__init__.py: Added.
* imported/w3c/webdriver/tests/take_element_screenshot/screenshot.py: Added.
* imported/w3c/webdriver/tests/take_element_screenshot/user_prompts.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/__init__.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/screenshot.py: Added.
* imported/w3c/webdriver/tests/take_screenshot/user_prompts.py: Added.

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

9 months agoCrash in HTMLCollection::updateNamedElementCache
rniwa@webkit.org [Wed, 5 Dec 2018 00:30:23 +0000 (00:30 +0000)]
Crash in HTMLCollection::updateNamedElementCache
https://bugs.webkit.org/show_bug.cgi?id=192347

Reviewed by Darin Adler.

Source/WebCore:

The bug was caused by CollectionIndexCache's nodeAt caching the length of 1
when there are no matching elements in the subtree when the index is non-zero.

A related bug was fixed in r182125 but we were not considering the possibility
that the index given to this function might be non-zero even when there were
no matching elements.

Test: fast/dom/options-collection-zero-length-crash.html

* dom/CollectionIndexCache.h:
(WebCore::CollectionIndexCache<Collection, Iterator>::nodeAt):

LayoutTests:

Added a regression test. We can't simply call select.options.item
to catch this crash because the generated bidning code first call length()
to check if the index is within the valid range.

* fast/dom/options-collection-zero-length-crash-expected.txt: Added.
* fast/dom/options-collection-zero-length-crash.html: Added.

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

9 months agoDon't report resource timing to parent frame for history items
jiewen_tan@apple.com [Tue, 4 Dec 2018 23:01:29 +0000 (23:01 +0000)]
Don't report resource timing to parent frame for history items
https://bugs.webkit.org/show_bug.cgi?id=192273
<rdar://problem/45163764>

Reviewed by Youenn Fablet.

Source/WebCore:

We should not report history items to its parent frame as those are less
interested to its parent and might not be the first navigation in the iframes.

This change aligns the behavior when a cached document is not available for the
history item with the available case as we don't report resource timing for any
cached main document.

Test: http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadDifferentDocumentItem):

LayoutTests:

* http/tests/misc/resource-timing-navigation-in-restored-iframe-2-expected.txt: Added.
* http/tests/misc/resource-timing-navigation-in-restored-iframe-2.html: Copied from LayoutTests/http/tests/misc/resource-timing-navigation-in-restored-iframe.html.
* http/tests/misc/resource-timing-navigation-in-restored-iframe.html:

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

9 months agoREGRESSION (r238090): position:fixed sidebar on https://www.w3.org/TR/SVG2/coords...
simon.fraser@apple.com [Tue, 4 Dec 2018 22:58:36 +0000 (22:58 +0000)]
REGRESSION (r238090): position:fixed sidebar on https://w3.org/TR/SVG2/coords.html does not stay fixed
https://bugs.webkit.org/show_bug.cgi?id=192320
<rdar://problem/46429833>

Reviewed by Zalan Bujtas.
Source/WebCore:

Re-land r238840 with a more reliable test.

When we fall into slow scrolling mode (for example, because of background-attachment: fixed),
RenderLayerCompositor::updateCompositingLayers() needs to set the geometry dirty bit on layers
for viewport-constrained objects so we update them.

This is only necessary for page scrolling; for overflow scrolls, updateLayerPositions() already
does enough dirtying that fixed layers nested inside scrollers get updated.

Test: compositing/fixed-with-main-thread-scrolling.html

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):

LayoutTests:

* compositing/fixed-with-main-thread-scrolling-expected.html: Added.
* compositing/fixed-with-main-thread-scrolling.html: Added.
* platform/ios/TestExpectations:

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

9 months ago[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker...
youenn@apple.com [Tue, 4 Dec 2018 22:33:24 +0000 (22:33 +0000)]
[iOS] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/fetch-cors-xhr.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=189727
<rdar://problem/44584993>

Unreviewed.

* platform/ios/TestExpectations: Update expectation to dump JS console lines in stderr.

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

9 months agoFix MediaRecorder flaky tests
youenn@apple.com [Tue, 4 Dec 2018 21:40:44 +0000 (21:40 +0000)]
Fix MediaRecorder flaky tests
https://bugs.webkit.org/show_bug.cgi?id=192371

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
Reset to use real MediaRecorder by default.

LayoutTests:

Updated tests to make them less flaky and more debuggable.

* http/wpt/mediarecorder/MediaRecorder-AV-audio-only-dataavailable.html:
* http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
* http/wpt/mediarecorder/MediaRecorder-AV-video-only-dataavailable.html:
* platform/gtk/TestExpectations:
* platform/wpe/TestExpectations:

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

9 months agoCalling getUserMedia in a link that was opened with target="_blank" does not work...
youenn@apple.com [Tue, 4 Dec 2018 20:57:56 +0000 (20:57 +0000)]
Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
https://bugs.webkit.org/show_bug.cgi?id=188088
<rdar://problem/42681448>

Reviewed by Eric Carlson.

On closing a page, we need to make sure to consider that the capture is ended,
as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::endedCaptureSession):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):

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

9 months agoCSS Painting API should allow image values in inputProperties
justin_michaud@apple.com [Tue, 4 Dec 2018 20:25:02 +0000 (20:25 +0000)]
CSS Painting API should allow image values in inputProperties
https://bugs.webkit.org/show_bug.cgi?id=192200

Reviewed by Dean Jackson.

Source/WebCore:

Adds new TypedOMCSSImageValue wrapper. We rename all the existing ones so that the naming is consistent (CSSImageValue is already a thing).
Finally, we let CanvasRenderingContext2DBase render these.

Tests: fast/css-custom-paint/arguments.html
       fast/css-custom-paint/image.html

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/CallTracerTypes.h:
* bindings/js/JSTypedOMCSSStyleValueCustom.cpp: Renamed from Source/WebCore/bindings/js/JSCSSStyleValueCustom.cpp.
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/WebCoreBuiltinNames.h:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::customPropertyValue):
* css/CSSCustomPropertyValue.cpp:
(WebCore::CSSCustomPropertyValue::equals const):
(WebCore::CSSCustomPropertyValue::customCSSText const):
(WebCore::CSSCustomPropertyValue::tokens const):
* css/CSSCustomPropertyValue.h:
* css/CSSPaintImageValue.cpp:
(WebCore::CSSPaintImageValue::image):
* css/typedom/StylePropertyMapReadOnly.h:
(WebCore::StylePropertyMapReadOnly::create):
(WebCore::StylePropertyMapReadOnly::get const):
(WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly):
* css/typedom/StylePropertyMapReadOnly.idl:
* css/typedom/TypedOMCSSImageValue.h: Copied from Source/WebCore/css/typedom/CSSUnitValue.h.
* css/typedom/TypedOMCSSImageValue.idl: Copied from Source/WebCore/css/typedom/CSSStyleValue.idl.
* css/typedom/TypedOMCSSNumericValue.h: Renamed from Source/WebCore/css/typedom/CSSNumericValue.h.
* css/typedom/TypedOMCSSNumericValue.idl: Renamed from Source/WebCore/css/typedom/CSSNumericValue.idl.
* css/typedom/TypedOMCSSStyleValue.h: Renamed from Source/WebCore/css/typedom/CSSStyleValue.h.
(WebCore::TypedOMCSSStyleValue::isImageValue):
* css/typedom/TypedOMCSSStyleValue.idl: Renamed from Source/WebCore/css/typedom/CSSStyleValue.idl.
* css/typedom/TypedOMCSSUnitValue.h: Renamed from Source/WebCore/css/typedom/CSSUnitValue.h.
* css/typedom/TypedOMCSSUnitValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnitValue.idl.
* css/typedom/TypedOMCSSUnparsedValue.h: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.h.
* css/typedom/TypedOMCSSUnparsedValue.idl: Renamed from Source/WebCore/css/typedom/CSSUnparsedValue.idl.
* html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createPromise):
* html/ImageBitmap.h:
* html/canvas/CanvasDrawImage.idl:
* html/canvas/CanvasFillStrokeStyles.idl:
* html/canvas/CanvasRenderingContext.cpp:
(WebCore::CanvasRenderingContext::checkOrigin):
* html/canvas/CanvasRenderingContext.h:
* html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::size):
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::createPattern):
* html/canvas/CanvasRenderingContext2DBase.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::buildAction):
* page/WindowOrWorkerGlobalScope.idl:
* platform/graphics/CustomPaintImage.cpp:
(WebCore::CustomPaintImage::doCustomPaint):

LayoutTests:

* fast/css-custom-paint/arguments-expected.html: Added.
* fast/css-custom-paint/arguments.html: Added.
* fast/css-custom-paint/image-expected.html: Added.
* fast/css-custom-paint/image.html: Added.
* fast/css-custom-paint/resources/test-image.png: Added.

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

9 months agoWeb Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights...
mattbaker@apple.com [Tue, 4 Dec 2018 20:07:09 +0000 (20:07 +0000)]
Web Inspector: REGRESSION(r238602): Elements: changing selection no longer highlights the selected node
https://bugs.webkit.org/show_bug.cgi?id=192354
<rdar://problem/46444438>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline.prototype._treeKeyDown):
(WI.TreeOutline.prototype._handleMouseDown):

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

9 months agoProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
cdumez@apple.com [Tue, 4 Dec 2018 19:44:45 +0000 (19:44 +0000)]
ProcessSwap.UseSessionCookiesAfterProcessSwapInPrivateBrowsing API test is failing
https://bugs.webkit.org/show_bug.cgi?id=192362

Reviewed by Alex Christensen.

Set the cookie policy to Accept to make sure the cookies are saved.

* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:

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

9 months agoRegression(r238817) PSON Page Cache API tests are failing
cdumez@apple.com [Tue, 4 Dec 2018 19:44:09 +0000 (19:44 +0000)]
Regression(r238817) PSON Page Cache API tests are failing
https://bugs.webkit.org/show_bug.cgi?id=192348

Reviewed by Alex Christensen.

Source/WebCore:

* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):
* page/MemoryRelease.h:

Source/WebKit:

Before suspending a WebProcess on iOS, we normally fake a memory pressure signal
so that the suspended process uses as little memory as possible while suspended.
Among other things, this will clear the page cache. This is an issue in the case
of process-swap on navigation because we keep suspended web processes around to
keep Page Cache functional.

To address the issue, when a WebProcess is about to get suspended, we check if
the process has any suspended WebPage (WebPage used for PSON PageCache support)
and we bypass the PageCache clearing if it does.

Our API tests did not catch this before r238817 because the NavigationState's
assertion was preventing the old WebProcesses from suspending for 3 seconds,
which was enough for those tests to complete.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::SuspendedPageProxy):
(WebKit::SuspendedPageProxy::didFinishLoad):
* UIProcess/SuspendedPageProxy.h:
Take a background assertion until the suspension load is complete, to make sure
the suspension load has a chance to complete before the process gets suspended.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::hasPageRequiringPageCacheWhileSuspended const):
(WebKit::WebProcess::actualPrepareToSuspend):
* WebProcess/WebProcess.h:

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

9 months ago[WPE][GTK] Update GLib
mcatanzaro@igalia.com [Tue, 4 Dec 2018 19:42:59 +0000 (19:42 +0000)]
[WPE][GTK] Update GLib
https://bugs.webkit.org/show_bug.cgi?id=191222

Reviewed by Žan Doberšek.

When I try running API tests locally, they crash with:

GLib-GIO-WARNING **: unknown schema extension 'd'

We need to update our old glib to support the 'd' value type, otherwise schemas that may
exist on the host using this type will cause instant crashes.

Also, switch the GLib build to use meson. This requires updating meson as well.

* gtk/jhbuild.modules:
* gtk/patches/glib-cast-function-type.patch: Removed.
* gtk/patches/glib-gtester-do-not-consider-skipped-tests-as-failures.patch: Removed.
* wpe/jhbuild.modules:
* wpe/patches/glib-cast-function-type.patch: Removed.
* wpe/patches/glib-revert-wakeup-changes.patch: Removed.

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

9 months ago[ews-app] Run BugzillaPatchFetcher periodically
aakash_jain@apple.com [Tue, 4 Dec 2018 19:34:45 +0000 (19:34 +0000)]
[ews-app] Run BugzillaPatchFetcher periodically
https://bugs.webkit.org/show_bug.cgi?id=192241

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/__init__.py:
* BuildSlaveSupport/ews-app/ews/apps.py:
(EwsConfig.ready): This method is called by Django on startup.
* BuildSlaveSupport/ews-app/ews/fetcher.py:
(FetchLoop): Class which invokes BugzillaPatchFetcher every 60s.

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

9 months agoWeb Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page...
joepeck@webkit.org [Tue, 4 Dec 2018 19:07:57 +0000 (19:07 +0000)]
Web Inspector: REGRESSION(r238330): Timeline auto-capture does not work after page transition
https://bugs.webkit.org/show_bug.cgi?id=192248
<rdar://problem/46390199>

Reviewed by Devin Rousso.

* UserInterface/Base/Main.js:
(WI.transitionPageTarget):
Let the TimelineManager perform work on page transitions.

* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.initializeTarget):
Initialize the autocapture state of the target.

(WI.TimelineManager.prototype.transitionPageTarget):
When transitioning pages perform a legacy (frontend based) timeline capture.

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

9 months agowebkitpy: Support unicode in MeteredStream
jbedard@apple.com [Tue, 4 Dec 2018 19:00:26 +0000 (19:00 +0000)]
webkitpy: Support unicode in MeteredStream
https://bugs.webkit.org/show_bug.cgi?id=192260

Reviewed by Aakash Jain.

It's possible that the test runner returns unicode characters to be logged when
running layout tests.

* Scripts/webkitpy/layout_tests/views/metered_stream.py:
(MeteredStream.write): Print message without attempting to encode/decode it.
* Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
(RegularTest.test_unicode):

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

9 months ago[ESNext][BigInt] Support logic operations
ticaiolima@gmail.com [Tue, 4 Dec 2018 18:55:27 +0000 (18:55 +0000)]
[ESNext][BigInt] Support logic operations
https://bugs.webkit.org/show_bug.cgi?id=179903

Reviewed by Yusuke Suzuki.

JSTests:

* stress/big-int-branch-usage.js: Added.
* stress/big-int-logical-and.js: Added.
* stress/big-int-logical-not.js: Added.
* stress/big-int-logical-or.js: Added.

Source/JavaScriptCore:

We are introducing in this patch the ToBoolean support for JSBigInt.
With this change, we can implement the correct behavior of BigInt as
operand of logical opertions. During JIT genertion into DFG and FTL,
we are using JSBigInt::m_length to verify if the number is 0n or not,
following the same approach used by JSString. This is also safe in the case
of BigInt, because only 0n has m_length == 0.

We are not including BigInt speculation into Branch nodes in this
patch, but the plan is to implement it in further patches.

* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::isBigInt):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitConvertValueToBoolean):
(JSC::AssemblyHelpers::branchIfValue):
* runtime/JSBigInt.cpp:
(JSC::JSBigInt::isZero const):
(JSC::JSBigInt::offsetOfLength):
(JSC::JSBigInt::toBoolean const):
(JSC::JSBigInt::isZero): Deleted.
* runtime/JSBigInt.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::toBoolean const):
(JSC::JSCell::pureToBoolean const):

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

9 months agoUnreviewed, rolling out r238838.
ryanhaddad@apple.com [Tue, 4 Dec 2018 18:50:52 +0000 (18:50 +0000)]
Unreviewed, rolling out r238838.

The layout test added with this change is failing on iOS.

Reverted changeset:

"Thick overlines and line-throughs grow in the wrong
direction"
https://bugs.webkit.org/show_bug.cgi?id=192264
https://trac.webkit.org/changeset/238838

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

9 months agoWeb Inspector: Elements: $0 is shown for all selected elements
mattbaker@apple.com [Tue, 4 Dec 2018 18:17:16 +0000 (18:17 +0000)]
Web Inspector: Elements: $0 is shown for all selected elements
https://bugs.webkit.org/show_bug.cgi?id=192119
<rdar://problem/46327554>

Reviewed by Devin Rousso.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype.layout):
(WI.DOMTreeContentView.prototype._domTreeSelectionDidChange):
Update the selected DOM node using the TreeOutline's selection change
event, instead of in `onselect`, which wasn't always called.

* UserInterface/Views/DOMTreeElement.js:
(WI.DOMTreeElement.prototype.onselect): Deleted.
(WI.DOMTreeElement.prototype.ondeselect): Deleted.
Eliminate `onselect` and `ondeselect`. TreeOutline clients should use
the TreeOutline.Event.SelectedDidChange event instead.

* UserInterface/Views/DOMTreeOutline.css:
(.tree-outline.dom li.last-selected > span::after):
(.tree-outline.dom:focus li.last-selected > span::after):
(.tree-outline.dom li.selected > span::after): Deleted.
(.tree-outline.dom:focus li.selected > span::after): Deleted.
* UserInterface/Views/DOMTreeOutline.js:
(WI.DOMTreeOutline.prototype.updateSelection): Deleted.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WI.DebuggerSidebarPanel.prototype._handleDebuggerObjectDisplayLocationDidChange):
* UserInterface/Views/FolderizedTreeElement.js:
(WI.FolderizedTreeElement.prototype._addTreeElement):
* UserInterface/Views/NavigationSidebarPanel.js:
(WI.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
(WI.NavigationSidebarPanel.prototype._treeElementWasFiltered):
(WI.NavigationSidebarPanel):
* UserInterface/Views/OpenResourceDialog.js:
(WI.OpenResourceDialog.prototype._populateResourceTreeOutline):
(WI.OpenResourceDialog.prototype._handleKeydownEvent):
* UserInterface/Views/SourceCodeTreeElement.js:
(WI.SourceCodeTreeElement.prototype.descendantResourceTreeElementTypeDidChange):
* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype.select):
(WI.TreeElement.prototype.revealAndSelect):
(WI.TreeElement.prototype.deselect):
Remove `suppressOnDeselect` and rename `suppressOnSelect` to `suppressNotification`.
Now that `ondeselect` has been removed `suppressOnDeselect` is no longer
meaningful, as TreeOutline generates a single `SelectedDidChange` event
when the selected item changes. In the case of `revealAndSelect`, both
arguments had the same value.

* UserInterface/Views/TreeOutline.js:
(WI.TreeOutline):
(WI.TreeOutline.prototype.selectionControllerSelectionDidChange):
Add a unique class name to the last selected TreeElement to distinguish
it from other selected elements.

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