WebKit-https.git
18 months agoCrash under SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&)
cdumez@apple.com [Sat, 24 Feb 2018 06:36:07 +0000 (06:36 +0000)]
Crash under SchemeRegistry::shouldTreatURLSchemeAsLocal(WTF::String const&)
https://bugs.webkit.org/show_bug.cgi?id=183066
<rdar://problem/37804111>

Reviewed by Ryosuke Niwa.

SecurityOrigin objects are constructed on various threads. However, someone added a
shouldTreatAsPotentiallyTrustworthy() call to the SecurityOrigin constructor which
was not thread safe. This is because this function relies on SchemeRegistry::shouldTreatURLSchemeAsSecure()
and SchemeRegistry::shouldTreatURLSchemeAsLocal() which were relying on global static HashMaps without
locks.

Update SecurityOrigin to initialize m_isPotentiallyTrustworthy lazily, to avoid paying
initialization cost in the constructor. This is only queries by SecurityContext::isSecureContext().

Make SchemeRegistry::shouldTreatURLSchemeAsLocal() and SchemeRegistry::shouldTreatURLSchemeAsSecure()
thread-safe, since they are needed to initialize SecurityOrigin::m_isPotentiallyTrustworthy from
various threads.

SchemeRegistry::shouldTreatURLSchemeAsSecure() is only called from SecurityOrigin (which requires
thread-safety), and getUserMedia() which is not hot code so the extra locking there should not
be an issue.

SchemeRegistry::shouldTreatURLSchemeAsLocal() is called from SecurityOrigin (which requires thread-
safety). It is also called from isQuickLookPreviewURL(), MHTMLArchive::create(), Page::userStyleSheetLocationChanged(),
isRemoteWebArchive() and HTMLPlugInImageElement. All these are not hot code so I do not think
we need a fast path.

* page/SecurityOrigin.cpp:
(WebCore::isLoopbackIPAddress):
(WebCore::shouldTreatAsPotentiallyTrustworthy):
(WebCore::SecurityOrigin::isPotentiallyTrustworthy const):
(WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
* page/SecurityOrigin.h:
* platform/SchemeRegistry.cpp:
(WebCore::localURLSchemesLock):
(WebCore::localURLSchemes):
(WebCore::secureSchemesLock):
(WebCore::secureSchemes):
(WebCore::SchemeRegistry::registerURLSchemeAsLocal):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsLocal):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsLocal):
(WebCore::SchemeRegistry::registerURLSchemeAsSecure):
(WebCore::SchemeRegistry::shouldTreatURLSchemeAsSecure):
* platform/SchemeRegistry.h:

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

18 months ago[Curl] Cookie Database files are wrongfully getting deleted when the database is...
commit-queue@webkit.org [Sat, 24 Feb 2018 02:01:36 +0000 (02:01 +0000)]
[Curl] Cookie Database files are wrongfully getting deleted when the database is opened
https://bugs.webkit.org/show_bug.cgi?id=183051

Patch by Christopher Reid <chris.reid@sony.com> on 2018-02-23
Reviewed by Per Arne Vollan.

The file stat logic was backwards causing a wrongful detection of database corruption.
Fixed the logic and abstracted these calls to use FileSystem.

* platform/network/curl/CookieJarDB.cpp:

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

18 months agoMake Number.isInteger an intrinsic
sbarati@apple.com [Sat, 24 Feb 2018 00:48:32 +0000 (00:48 +0000)]
Make Number.isInteger an intrinsic
https://bugs.webkit.org/show_bug.cgi?id=183088

Reviewed by JF Bastien.

JSTests:

* stress/number-is-integer-intrinsic.js: Added.

Source/JavaScriptCore:

When profiling the ML subtest in ARES, I noticed it was spending some
time in Number.isInteger. This patch makes that operation an intrinsic
in the DFG/FTL. It might be a speedup by 1% or so on that subtest, but
it's likely not an aggregate speedup on ARES. However, it is definitely
faster than calling into a builtin function, so we might as well have
it as an intrinsic.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNumberIsInteger):
(JSC::FTL::DFG::LowerDFGToB3::unboxDouble):
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::finishCreation):
(JSC::numberConstructorFuncIsInteger):
* runtime/NumberConstructor.h:
(JSC::NumberConstructor::isIntegerImpl):

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

18 months agoIntroduce ITP debug logging as an opt-in developer feature
wilander@apple.com [Fri, 23 Feb 2018 23:26:40 +0000 (23:26 +0000)]
Introduce ITP debug logging as an opt-in developer feature
https://bugs.webkit.org/show_bug.cgi?id=183065
<rdar://problem/37803761>

Reviewed by Brent Fulgham.

Source/WebKit:

* Platform/Logging.h:
    Added a dedicated channel for Resource Load Statistics debug logging
    since this will be part of a developer-facing feature and should not
    be mixed with general Resource Load Statistics logging.
* UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:
(WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):
    Now picks up the user default setting for
    ResourceLoadStatisticsDebugLoggingEnabled.
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
    Now logs for which domains it purges website data if
    ResourceLoadStatisticsDebugLoggingEnabled is set.
(WebKit::WebResourceLoadStatisticsStore::updateCookiePartitioning):
    Now logs for which domains it partitions and blocks cookies
    in third-party contexts if ResourceLoadStatisticsDebugLoggingEnabled
    is set.
* UIProcess/WebResourceLoadStatisticsStore.h:

Source/WTF:

* wtf/Assertions.h:
    Introduces RELEASE_LOG_INFO() and RELEASE_LOG_INFO_IF().

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

18 months agoWebAssembly: cache memory address / size on instance
gskachkov@gmail.com [Fri, 23 Feb 2018 23:16:59 +0000 (23:16 +0000)]
WebAssembly: cache memory address / size on instance
https://bugs.webkit.org/show_bug.cgi?id=177305

Reviewed by JF Bastien.

JSTests:

* wasm/function-tests/memory-reuse.js: Added.
(createWasmInstance):
(doCheckTrap):
(doMemoryGrow):
(doCheck):
(checkWasmInstancesWithSharedMemory):

Source/JavaScriptCore:

Cache memory address/size in wasm:Instance to avoid load wasm:Memory
object during access to memory and memory size property in JiT

* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmInstance.h:
(JSC::Wasm::Instance::cachedMemory const):
(JSC::Wasm::Instance::cachedMemorySize const):
(JSC::Wasm::Instance::createWeakPtr):
(JSC::Wasm::Instance::setMemory):
(JSC::Wasm::Instance::updateCachedMemory):
(JSC::Wasm::Instance::offsetOfCachedMemory):
(JSC::Wasm::Instance::offsetOfCachedMemorySize):
(JSC::Wasm::Instance::offsetOfCachedIndexingMask):
(JSC::Wasm::Instance::allocationSize):
* wasm/WasmMemory.cpp:
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::registerInstance):
* wasm/WasmMemory.h:
(JSC::Wasm::Memory::indexingMask):
* wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::evaluate):

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

18 months ago[macOS] Correct sandbox violation during media playback
bfulgham@apple.com [Fri, 23 Feb 2018 22:19:37 +0000 (22:19 +0000)]
[macOS] Correct sandbox violation during media playback
https://bugs.webkit.org/show_bug.cgi?id=183092
<rdar://problem/37718495>

Reviewed by Eric Carlson.

* WebProcess/com.apple.WebProcess.sb.in:

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

18 months ago[RenderTreeBuilder] Make RenderTreeBuilder::* classes WTF_MAKE_FAST_ALLOCATED
zalan@apple.com [Fri, 23 Feb 2018 18:39:21 +0000 (18:39 +0000)]
[RenderTreeBuilder] Make RenderTreeBuilder::* classes WTF_MAKE_FAST_ALLOCATED
https://bugs.webkit.org/show_bug.cgi?id=183084
<rdar://problem/37828706>

Reviewed by Antti Koivisto.

* rendering/updating/RenderTreeBuilderBlock.h:
* rendering/updating/RenderTreeBuilderBlockFlow.h:
* rendering/updating/RenderTreeBuilderContinuation.h:
* rendering/updating/RenderTreeBuilderFirstLetter.h:
* rendering/updating/RenderTreeBuilderFormControls.h:
* rendering/updating/RenderTreeBuilderFullScreen.h:
* rendering/updating/RenderTreeBuilderInline.h:
* rendering/updating/RenderTreeBuilderList.h:
* rendering/updating/RenderTreeBuilderMathML.h:
* rendering/updating/RenderTreeBuilderMultiColumn.h:
* rendering/updating/RenderTreeBuilderRuby.h:
* rendering/updating/RenderTreeBuilderSVG.h:
* rendering/updating/RenderTreeBuilderTable.h:
* rendering/updating/RenderTreeUpdaterGeneratedContent.h:

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

18 months agowarning: unused variable 'InitialBufferSize' in Assertions.cpp
commit-queue@webkit.org [Fri, 23 Feb 2018 18:37:35 +0000 (18:37 +0000)]
warning: unused variable 'InitialBufferSize' in Assertions.cpp
https://bugs.webkit.org/show_bug.cgi?id=183076

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2018-02-23
Reviewed by Yusuke Suzuki.

* wtf/Assertions.cpp: Moved the definition of InitialBufferSize to inside #if.

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

18 months agoArgumentsEliminationPhase has a branch on GetByOffset that should be an assert
sbarati@apple.com [Fri, 23 Feb 2018 18:35:56 +0000 (18:35 +0000)]
ArgumentsEliminationPhase has a branch on GetByOffset that should be an assert
https://bugs.webkit.org/show_bug.cgi?id=182982

Reviewed by Yusuke Suzuki.

I don't know why this check was not always an assert. When we see
a GetByOffset on an eliminated allocation, that allocation *must*
be a PhantomClonedArguments. If it weren't, the GetByOffset would
have escaped it. Because this transformation happens by visiting
blocks in pre-order, and by visiting nodes in a block starting from
index zero to index block->size() - 1, we're guaranteed that eliminated
allocations get transformed before users of it, since we visit nodes
in dominator order.

* dfg/DFGArgumentsEliminationPhase.cpp:

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

18 months ago[MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo...
commit-queue@webkit.org [Fri, 23 Feb 2018 18:32:42 +0000 (18:32 +0000)]
[MSVC] Unknown a type definition error in WebResourceLoadStatisticsStore on wincairo webkit
https://bugs.webkit.org/show_bug.cgi?id=182873

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-23
Reviewed by Yusuke Suzuki.

* UIProcess/WebResourceLoadStatisticsStore.h:

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

18 months ago[JSC] Implement $vm.ftlTrue function for FTL testing
utatane.tea@gmail.com [Fri, 23 Feb 2018 17:54:06 +0000 (17:54 +0000)]
[JSC] Implement $vm.ftlTrue function for FTL testing
https://bugs.webkit.org/show_bug.cgi?id=183071

Reviewed by Mark Lam.

JSTests:

* stress/dead-fiat-value-to-int52-then-exit-not-double.js:
(foo):
* stress/dead-fiat-value-to-int52-then-exit-not-int52.js:
(foo):
* stress/dead-fiat-value-to-int52.js:
(foo):
* stress/dead-osr-entry-value.js:
(foo):
* stress/fiat-value-to-int52-then-exit-not-double.js:
(foo):
* stress/fiat-value-to-int52-then-exit-not-int52.js:
(foo):
* stress/fiat-value-to-int52-then-fail-to-fold.js:
(foo):
* stress/fiat-value-to-int52-then-fold.js:
(foo):
* stress/fiat-value-to-int52.js:
(foo):
* stress/fold-based-on-int32-proof-mul-branch.js:
(foo):
* stress/fold-profiled-call-to-call.js:
(foo):
* stress/fold-to-double-constant-then-exit.js:
(foo):
* stress/fold-to-int52-constant-then-exit.js:
(foo):
* stress/fold-to-primitive-in-cfa.js:
(foo):
* stress/fold-to-primitive-to-identity-in-cfa.js:
(foo):
* stress/has-indexed-property-array-storage-ftl.js: Added.
(shouldBe):
(test1):
(test2):
* stress/has-indexed-property-slow-put-array-storage-ftl.js: Added.
(shouldBe):
(test1):
(test2):
* stress/int52-ai-add-then-filter-int32.js:
(foo):
* stress/int52-ai-mul-and-clean-neg-zero-then-filter-int32.js:
(foo):
* stress/int52-ai-mul-then-filter-int32.js:
(foo):
* stress/int52-ai-neg-then-filter-int32.js:
(foo):
* stress/int52-ai-sub-then-filter-int32.js:
(foo):
* stress/licm-pre-header-cannot-exit-nested.js:
(foo):
* stress/licm-pre-header-cannot-exit.js:
(foo):
* stress/sparse-array-entry-update-144067.js:
(useMemoryToTriggerGCs):
* stress/test-spec-misc.js:
(foo):
* stress/tricky-array-bounds-checks.js:
(foo):

Source/JavaScriptCore:

Add $vm.ftlTrue, which becomes true if the caller is compiled in FTL.
This is useful for testing whether the caller function is compiled in FTL.

We also remove duplicate DFGTrue function in jsc.cpp. We have $vm.dfgTrue.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionFalse1):
(functionFalse2): Deleted.
* runtime/Intrinsic.cpp:
(JSC::intrinsicName):
* runtime/Intrinsic.h:
* tools/JSDollarVM.cpp:
(JSC::functionFTLTrue):
(JSC::JSDollarVM::finishCreation):

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

18 months ago[RenderTreeBuilder] Move RenderFullScreen::createPlaceholder to RenderTreeBuilder
zalan@apple.com [Fri, 23 Feb 2018 16:16:27 +0000 (16:16 +0000)]
[RenderTreeBuilder] Move RenderFullScreen::createPlaceholder to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183027
<rdar://problem/37773058>

Reviewed by Antti Koivisto.

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::setFullScreenRenderer):
* dom/Document.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreenPlaceholder::RenderFullScreenPlaceholder):
(WebCore::RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder const):
(WebCore::RenderFullScreen::wrapNewRenderer):
(WebCore::RenderFullScreen::wrapExistingRenderer):
(): Deleted.
(WebCore::RenderFullScreen::createPlaceholder): Deleted.
* rendering/RenderFullScreen.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::createPlaceholderForFullScreen):
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderFullScreen.cpp:
(WebCore::RenderTreeBuilder::FullScreen::createPlaceholder):
* rendering/updating/RenderTreeBuilderFullScreen.h:

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

18 months ago[RenderTreeBuilder] Add WARN_UNUSED_RETURN to detach()
zalan@apple.com [Fri, 23 Feb 2018 14:52:45 +0000 (14:52 +0000)]
[RenderTreeBuilder] Add WARN_UNUSED_RETURN to detach()
https://bugs.webkit.org/show_bug.cgi?id=183073
<rdar://problem/37814585>

Reviewed by Antti Koivisto.

So that we don't destroy a renderer accidentally.

* rendering/updating/RenderTreeBuilderBlock.h:
* rendering/updating/RenderTreeBuilderRuby.h:
* rendering/updating/RenderTreeBuilderSVG.h:

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

18 months agoREGRESSION (r228445): A big pause button shows over YouTube videos if you tap "Tap...
graouts@webkit.org [Fri, 23 Feb 2018 13:53:13 +0000 (13:53 +0000)]
REGRESSION (r228445): A big pause button shows over YouTube videos if you tap "Tap To Unmute" on iOS
https://bugs.webkit.org/show_bug.cgi?id=183074
<rdar://problem/37747028>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html

In the fix for webkit.org/b/182668, we made it so that when the "controls" attribute is absent from a media
element we stop listening to the bulk of media events and prevent controls from updating any DOM properties
so as to minimize the amount of CPU usage by the Web process.

An unfortunate side effect was that, if the media controls were disabled at the time the video starts playing,
the StartSupport class would thus not catch the "play" event and would not be able to set the "hasPlayed"
property to "true" on the MediaController, which would then prevent the _shouldShowStartButton() from returning
"false". As a result, if the "controls" attribute was turned back on after the media started playing, they
would default to showing the start button, which would be then in the play state, ie. showing the pause icon.

We now set the "hasPlayed" property in the "play" event handler on MediaController, which is always registered
regardless of the "controls" attribute setting. We also ensure we invalidate the "showStartButton" property on
the media controls when StartSupport is enabled, which is the case when the "controls" attribute is toggled back
to "true" from a previous "false" value.

* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.handleEvent):
* Modules/modern-media-controls/media/start-support.js:
(StartSupport):
(StartSupport.prototype.enable):
(StartSupport.prototype.handleEvent):
(StartSupport.prototype._updateShowsStartButton):

LayoutTests:

Add a new test that set controls on the video, then immediately removes them, plays the video and turns the controls
back on as soon as the video starts to check that the "showsStartButton" property is false on the media controls.
Prior to this patch this test would fail.

* media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play-expected.txt: Added.
* media/modern-media-controls/start-support/start-support-disable-controls-and-re-enable-post-play.html: Added.
* platform/ios/TestExpectations:

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

18 months ago[GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
carlosgc@webkit.org [Fri, 23 Feb 2018 12:53:04 +0000 (12:53 +0000)]
[GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=173655
<rdar://problem/37706341>

Reviewed by Philippe Normand.

Source/WebCore:

Do not assume gst is only used in the WebProcess, the MIMETypeRegistry also uses gst to get the list of
supported media types. Move the code to extract gst options from the process command line to a helper function
and use it in the UI process to pass the options to the WebProcess, but also in the current process when gst is
initialized without providing options.

Fixes several unit tests that use MIMETypeRegistry in the UI process.

* platform/graphics/gstreamer/GStreamerUtilities.cpp:
(WebCore::extractGStreamerOptionsFromCommandLine): Helper to get the gst options from the current process
command line.
(WebCore::initializeGStreamer): Ensure this is called once. Get the gst options from the given vector or extract
it from the command line if not provided.
* platform/graphics/gstreamer/GStreamerUtilities.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements): Bring back the gst
initialization here.

Source/WebKit:

Actually pass the gst command line options to the WebProcess. The options in /proc/self/cmdline are separated by
null characters, so we are effectively passing always the first option only, which is the program name. Then, in
the web process we always ignore the first option and providing WebProcess unconditionally, so we were doing
nothing.

* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Use WebCore::extractGStreamerOptionsFromCommandLine()
* UIProcess/wpe/WebProcessPoolWPE.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Ditto.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Move the vector.

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

18 months ago[GStreamer] HTTP totalBytes query returns 0 after seeking (sometimes)
philn@webkit.org [Fri, 23 Feb 2018 10:06:46 +0000 (10:06 +0000)]
[GStreamer] HTTP totalBytes query returns 0 after seeking (sometimes)
https://bugs.webkit.org/show_bug.cgi?id=183002

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webkit_web_src_init): Initialize member variables. Also no need
to set the appsrc size at that point.
(webKitWebSrcStop): There is no need to reset the size when
seeking. Size should in most cases represent the Content-Length
response attribute, even when seeking.
(webKitWebSrcStart): No need to reset the size attribute.
(webKitWebSrcQueryWithParent): Let appsrc handle DURATION queries.
(CachedResourceStreamingClient::responseReceived): Emit duration notification one time only.

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

18 months ago[GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
philn@webkit.org [Fri, 23 Feb 2018 09:57:37 +0000 (09:57 +0000)]
[GStreamer] media/video-src-blob-using-open-panel.html crashes in Debug
https://bugs.webkit.org/show_bug.cgi?id=183005

Reviewed by Xabier Rodriguez-Calvar.

Test: media/video-src-blob-using-open-panel.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::convertToInternalProtocol): Also convert blob URIs
because they're handled by our httpsrc element.
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcGetProtocols): Prefix blob URIs too, for consistency purpose.

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

18 months ago[FTL] Support HasIndexedProperty for ArrayStorage and SlowPutArrayStorage
utatane.tea@gmail.com [Fri, 23 Feb 2018 06:41:50 +0000 (06:41 +0000)]
[FTL] Support HasIndexedProperty for ArrayStorage and SlowPutArrayStorage
https://bugs.webkit.org/show_bug.cgi?id=182792

Reviewed by Mark Lam.

JSTests:

* stress/has-indexed-property-array-storage.js: Added.
(shouldBe):
(test1):
(test2):
* stress/has-indexed-property-slow-put-array-storage.js: Added.
(shouldBe):
(test1):
(test2):

Source/JavaScriptCore:

This patch adds HasIndexedProperty for ArrayStorage and SlowPutArrayStorage in FTL.
HasIndexedProperty with ArrayStorage frequently causes FTL compilation failures
in web-tooling-benchmarks.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):

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

18 months agoRemove currentTime() / currentTimeMS()
utatane.tea@gmail.com [Fri, 23 Feb 2018 04:18:17 +0000 (04:18 +0000)]
Remove currentTime() / currentTimeMS()
https://bugs.webkit.org/show_bug.cgi?id=183052

Reviewed by Mark Lam.

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::haveSuitableCachedPosition):
* dom/DOMTimeStamp.h:
(WebCore::convertSecondsToDOMTimeStamp):
* fileapi/File.cpp:
(WebCore::File::File):
(WebCore::File::lastModified const):
* history/HistoryItem.cpp:
(WebCore::generateSequenceNumber):
* html/BaseDateAndTimeInputType.cpp:
(WebCore::BaseDateAndTimeInputType::defaultValueForStepUp const):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::defaultValueForStepUp const):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::defaultValueForStepUp const):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::defaultValueForStepUp const):
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::willSendWebSocketHandshakeRequest):
* loader/EmptyFrameLoaderClient.h:
* loader/FormSubmission.cpp:
(WebCore::generateFormDataIdentifier):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::clientRedirected):
* loader/FrameLoader.h:
* loader/FrameLoaderClient.h:
* loader/NavigationScheduler.cpp:
* page/History.cpp:
(WebCore::History::stateObjectAdded):
* page/History.h:
* page/PageOverlay.cpp:
(WebCore::PageOverlay::startFadeAnimation):
(WebCore::PageOverlay::fadeAnimationTimerFired):
* page/PageOverlay.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawNativeImage):
* platform/ios/LegacyTileLayerPool.h:
* platform/ios/LegacyTileLayerPool.mm:
(WebCore::LegacyTileLayerPool::LegacyTileLayerPool):
(WebCore::LegacyTileLayerPool::addLayer):
(WebCore::LegacyTileLayerPool::decayedCapacity const):
(WebCore::LegacyTileLayerPool::prune):
* platform/ios/SystemMemoryIOS.cpp:
(WebCore::systemMemoryLevel):
* platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp:
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:

Source/WebKit:

* NetworkProcess/cache/CacheStorageEngineCache.cpp:
* PluginProcess/WebProcessConnection.cpp:
* Shared/WebProcessCreationParameters.h:
* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::WebMemorySampler::sampleWebKit const):
* Shared/mac/WebMemorySampler.mac.mm:
(WebKit::WebMemorySampler::sampleWebKit const):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::setIconDataForIconURL):
(WebKit::IconDatabase::synchronousLoadDecisionForIconURL):
(WebKit::IconDatabase::performURLImport):
* UIProcess/DrawingAreaProxyImpl.cpp:
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::expirationTimeFromNow):
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy const):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsFilteringOutEntriesAddedAfterTime):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::startMemorySampler):
(WebKit::WebProcessPool::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime):
* UIProcess/WebProcessPool.h:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:
(API::InjectedBundle::PageLoaderClient::willPerformClientRedirectForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::isPlugInAutoStartOriginHash):
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
(WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
(WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
* WebProcess/wpe/WebProcessMainWPE.cpp:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchWillPerformClientRedirect):

Source/WebKitLegacy/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchWillPerformClientRedirect):
* WebCoreSupport/WebFrameLoaderClient.h:
* WebDownload.h:
* WebDownloadCFNet.cpp:
(WebDownload::didStart):
(WebDownload::didReceiveData):
(WebDownload::didFinish):

Source/WTF:

This patch removes WTF::currentTime() and WTF::currentTimeMS().
We have fancy WallTime APIs. It has strong types like WallTime and Seconds,
and this reduces the chance of bugs mixing doubles which represent milliseconds
and seconds.

* wtf/Condition.h:
* wtf/CurrentTime.cpp:
(WTF::currentTime):
(WTF::WallTime::now):
* wtf/CurrentTime.h:
(WTF::currentTimeMS): Deleted.
* wtf/DateMath.h:
(WTF::jsCurrentTime):
* wtf/ParkingLot.cpp:
(WTF::ParkingLot::parkConditionallyImpl):
* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
(WTF::ThreadCondition::timedWait):
* wtf/ThreadingWin.cpp:
(WTF::ThreadCondition::timedWait):
(WTF::absoluteTimeToWaitTimeoutInterval):
* wtf/WallTime.cpp:
(WTF::WallTime::now): Deleted.
* wtf/WallTime.h:

Tools:

* DumpRenderTree/TestRunner.cpp:
(preciseTimeCallback):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPosition):
* TestWebKitAPI/Tests/WTF/Condition.cpp:
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
* WebKitTestRunner/GeolocationProviderMock.cpp:
(WTR::GeolocationProviderMock::setPosition):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::preciseTime):

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

18 months agoThe WebContent process should not use NSScreen in the screenDepth implementation.
pvollan@apple.com [Fri, 23 Feb 2018 00:17:38 +0000 (00:17 +0000)]
The WebContent process should not use NSScreen in the screenDepth implementation.
https://bugs.webkit.org/show_bug.cgi?id=183048

Reviewed by Brent Fulgham.

NSScreen method calls should be done in the UIProcess, since these calls will communicate with
the WindowServer. The screen depth property can be retrieved in the UIProcess, and sent to the
WebContent process, where it is cached. Whenever screen properties change, the UIProcess will
send the new screen properties to the WebProcess.

No new tests, covered by existing tests.

* platform/ScreenProperties.h:
(WebCore::ScreenProperties::encode const):
(WebCore::ScreenProperties::decode):
* platform/mac/PlatformScreenMac.mm:
(WebCore::getScreenProperties):
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenRect):
(WebCore::screenAvailableRect):

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

18 months ago[RenderTreeBuilder] Rename insertChild() -> attach(), takeChild() -> detach() and...
zalan@apple.com [Thu, 22 Feb 2018 23:19:44 +0000 (23:19 +0000)]
[RenderTreeBuilder] Rename insertChild() -> attach(), takeChild() -> detach() and removeAndDestroy() -> destroy()
https://bugs.webkit.org/show_bug.cgi?id=183061
<rdar://problem/37800269>

Reviewed by Ryosuke Niwa.

...and moveChildTo() -> move() (moveChildrenTo() -> moveChildren()),
removeFromParentAndDestroyCleaningUpAnonymousWrappers() -> destroyAndCleanUpAnonymousWrappers()

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::destroyRenderTree):
(WebCore::Document::setFullScreenRenderer):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::styleDidChange):
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setText):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::didAttachChild):
(WebCore::RenderElement::didInsertChild): Deleted.
* rendering/RenderElement.h:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::wrapNewRenderer):
(WebCore::RenderFullScreen::wrapExistingRenderer):
(WebCore::RenderFullScreen::unwrapRenderer):
(WebCore::RenderFullScreen::createPlaceholder):
* rendering/RenderMenuList.cpp:
(RenderMenuList::didAttachChild):
(RenderMenuList::setText):
(RenderMenuList::didInsertChild): Deleted.
* rendering/RenderMenuList.h:
* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::updateTextRenderer):
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::setText):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::destroy):
(WebCore::RenderTreeBuilder::attach):
(WebCore::RenderTreeBuilder::attachIgnoringContinuation):
(WebCore::RenderTreeBuilder::detach):
(WebCore::RenderTreeBuilder::attachToRenderElement):
(WebCore::RenderTreeBuilder::attachToRenderElementInternal):
(WebCore::RenderTreeBuilder::move):
(WebCore::RenderTreeBuilder::moveAllChildren):
(WebCore::RenderTreeBuilder::moveChildren):
(WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloats):
(WebCore::RenderTreeBuilder::makeChildrenNonInline):
(WebCore::RenderTreeBuilder::splitAnonymousBoxesAroundChild):
(WebCore::RenderTreeBuilder::childFlowStateChangesAndAffectsParentBlock):
(WebCore::RenderTreeBuilder::destroyAndCleanUpAnonymousWrappers):
(WebCore::RenderTreeBuilder::detachFromRenderGrid):
(WebCore::RenderTreeBuilder::detachFromRenderElement):
(WebCore::RenderTreeBuilder::attachToRenderGrid):
(WebCore::RenderTreeBuilder::removeAndDestroy): Deleted.
(WebCore::RenderTreeBuilder::insertChild): Deleted.
(WebCore::RenderTreeBuilder::insertChildIgnoringContinuation): Deleted.
(WebCore::RenderTreeBuilder::takeChild): Deleted.
(WebCore::RenderTreeBuilder::insertChildToRenderElement): Deleted.
(WebCore::RenderTreeBuilder::insertChildToRenderElementInternal): Deleted.
(WebCore::RenderTreeBuilder::moveChildTo): Deleted.
(WebCore::RenderTreeBuilder::moveAllChildrenTo): Deleted.
(WebCore::RenderTreeBuilder::moveChildrenTo): Deleted.
(WebCore::RenderTreeBuilder::moveAllChildrenIncludingFloatsTo): Deleted.
(WebCore::RenderTreeBuilder::removeFromParentAndDestroyCleaningUpAnonymousWrappers): Deleted.
(WebCore::RenderTreeBuilder::takeChildFromRenderGrid): Deleted.
(WebCore::RenderTreeBuilder::takeChildFromRenderElement): Deleted.
(WebCore::RenderTreeBuilder::insertChildToRenderGrid): Deleted.
* rendering/updating/RenderTreeBuilder.h:
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::attach):
(WebCore::RenderTreeBuilder::Block::insertChildToContinuation):
(WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation):
(WebCore::RenderTreeBuilder::Block::removeLeftoverAnonymousBlock):
(WebCore::RenderTreeBuilder::Block::detach):
(WebCore::RenderTreeBuilder::Block::dropAnonymousBoxChild):
(WebCore::RenderTreeBuilder::Block::insertChild): Deleted.
(WebCore::RenderTreeBuilder::Block::insertChildIgnoringContinuation): Deleted.
(WebCore::RenderTreeBuilder::Block::takeChild): Deleted.
* rendering/updating/RenderTreeBuilderBlock.h:
* rendering/updating/RenderTreeBuilderBlockFlow.cpp:
(WebCore::RenderTreeBuilder::BlockFlow::attach):
(WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloats):
(WebCore::RenderTreeBuilder::BlockFlow::insertChild): Deleted.
(WebCore::RenderTreeBuilder::BlockFlow::moveAllChildrenIncludingFloatsTo): Deleted.
* rendering/updating/RenderTreeBuilderBlockFlow.h:
* rendering/updating/RenderTreeBuilderContinuation.cpp:
(WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy):
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
* rendering/updating/RenderTreeBuilderFormControls.cpp:
(WebCore::RenderTreeBuilder::FormControls::attach):
(WebCore::RenderTreeBuilder::FormControls::detach):
(WebCore::RenderTreeBuilder::FormControls::findOrCreateParentForChild):
(WebCore::RenderTreeBuilder::FormControls::insertChild): Deleted.
(WebCore::RenderTreeBuilder::FormControls::takeChild): Deleted.
* rendering/updating/RenderTreeBuilderFormControls.h:
* rendering/updating/RenderTreeBuilderFullScreen.cpp:
(WebCore::RenderTreeBuilder::FullScreen::cleanupOnDestroy):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::attach):
(WebCore::RenderTreeBuilder::Inline::insertChildToContinuation):
(WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
(WebCore::RenderTreeBuilder::Inline::splitFlow):
(WebCore::RenderTreeBuilder::Inline::splitInlines):
(WebCore::RenderTreeBuilder::Inline::childBecameNonInline):
(WebCore::RenderTreeBuilder::Inline::insertChild): Deleted.
(WebCore::RenderTreeBuilder::Inline::insertChildIgnoringContinuation): Deleted.
* rendering/updating/RenderTreeBuilderInline.h:
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* rendering/updating/RenderTreeBuilderMathML.cpp:
(WebCore::RenderTreeBuilder::MathML::makeFences):
(WebCore::RenderTreeBuilder::MathML::attach):
(WebCore::RenderTreeBuilder::MathML::insertChild): Deleted.
* rendering/updating/RenderTreeBuilderMathML.h:
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
(WebCore::RenderTreeBuilder::MultiColumn::handleSpannerRemoval):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::RenderTreeBuilder::Ruby::moveInlineChildren):
(WebCore::RenderTreeBuilder::Ruby::moveBlockChildren):
(WebCore::RenderTreeBuilder::Ruby::attach):
(WebCore::RenderTreeBuilder::Ruby::findOrCreateParentForChild):
(WebCore::RenderTreeBuilder::Ruby::rubyBaseSafe):
(WebCore::RenderTreeBuilder::Ruby::detach):
(WebCore::RenderTreeBuilder::Ruby::insertChild): Deleted.
(WebCore::RenderTreeBuilder::Ruby::takeChild): Deleted.
* rendering/updating/RenderTreeBuilderRuby.h:
* rendering/updating/RenderTreeBuilderSVG.cpp:
(WebCore::RenderTreeBuilder::SVG::attach):
(WebCore::RenderTreeBuilder::SVG::detach):
(WebCore::RenderTreeBuilder::SVG::insertChild): Deleted.
(WebCore::RenderTreeBuilder::SVG::takeChild): Deleted.
* rendering/updating/RenderTreeBuilderSVG.h:
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
(WebCore::RenderTreeBuilder::Table::attach):
(WebCore::RenderTreeBuilder::Table::collapseAndDestroyAnonymousSiblingRows):
(WebCore::RenderTreeBuilder::Table::insertChild): Deleted.
* rendering/updating/RenderTreeBuilderTable.h:
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::RenderTreeUpdater::createTextRenderer):
(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownTextRenderer):
(WebCore::RenderTreeUpdater::tearDownLeftoverPaginationRenderersIfNeeded):
* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::createContentRenderers):

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

18 months agoWeb Inspector: REGRESSION (r228349): ImageBitmap builtin is now runtime guarded
mattbaker@apple.com [Thu, 22 Feb 2018 22:58:50 +0000 (22:58 +0000)]
Web Inspector: REGRESSION (r228349): ImageBitmap builtin is now runtime guarded
https://bugs.webkit.org/show_bug.cgi?id=183056
<rdar://problem/37799067>

Reviewed by Joseph Pecoraro.

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::WebInspectorUI):

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

18 months agoCaches::initialize should call all pending initialization callbacks in case of error
commit-queue@webkit.org [Thu, 22 Feb 2018 22:53:41 +0000 (22:53 +0000)]
Caches::initialize should call all pending initialization callbacks in case of error
https://bugs.webkit.org/show_bug.cgi?id=183062

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

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::initialize):
(WebKit::CacheStorage::Caches::initializeSize):

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

18 months agoCacheStorage::Engine::Caches::writeRecord is not always calling the completion handler
commit-queue@webkit.org [Thu, 22 Feb 2018 22:50:19 +0000 (22:50 +0000)]
CacheStorage::Engine::Caches::writeRecord is not always calling the completion handler
https://bugs.webkit.org/show_bug.cgi?id=183055

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

Source/WebKit:

Add a completion handler to Storage::store.
Use it instead in Caches::writeRecord.
This ensures that the Cache add/put promise will be called once all write operations have been done.

* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::writeRecord):
* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
(WebKit::NetworkCache::Storage::finishWriteOperation):
(WebKit::NetworkCache::Storage::store):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::store):

LayoutTests:

* http/tests/cache-storage/resources/cache-persistency-iframe.html:

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

18 months agoResourceRequestBase::isolatedCopy() fails to isolate copy the cachePartition
cdumez@apple.com [Thu, 22 Feb 2018 22:36:47 +0000 (22:36 +0000)]
ResourceRequestBase::isolatedCopy() fails to isolate copy the cachePartition
https://bugs.webkit.org/show_bug.cgi?id=183059
<rdar://problem/37800202>

Reviewed by Youenn Fablet.

Update ResourceRequestBase::setAsIsolatedCopy() to call isolatedCopy() on the cachePartition as well,
given that it is a String and it would not be safe to send it to another thread otherwise.

* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::setAsIsolatedCopy):

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

18 months agoAdd an entitlement check for service worker on iOS
rniwa@webkit.org [Thu, 22 Feb 2018 22:05:06 +0000 (22:05 +0000)]
Add an entitlement check for service worker on iOS
https://bugs.webkit.org/show_bug.cgi?id=182865

Reviewed by Dan Bernstein.

Addressed Dan's comment by using xpc_connection_copy_entitlement_value instead of obtaining the audit token first.

* Shared/mac/SandboxUtilities.h:
* Shared/mac/SandboxUtilities.mm:
(WebKit::connectedProcessHasEntitlement):
* StorageProcess/ios/StorageProcessIOS.mm:
(WebKit::StorageProcess::parentProcessHasServiceWorkerEntitlement const):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::parentProcessHasServiceWorkerEntitlement const):

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

18 months agoRefactor MacroAssembler code to improve reuse and extensibility.
mark.lam@apple.com [Thu, 22 Feb 2018 21:53:12 +0000 (21:53 +0000)]
Refactor MacroAssembler code to improve reuse and extensibility.
https://bugs.webkit.org/show_bug.cgi?id=183054
<rdar://problem/37797337>

Reviewed by Saam Barati.

* assembler/ARM64Assembler.h:
* assembler/MacroAssembler.cpp:
* assembler/MacroAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::canCompact):
(JSC::MacroAssemblerARM64::computeJumpType):
(JSC::MacroAssemblerARM64::jumpSizeDelta):
(JSC::MacroAssemblerARM64::link):
(JSC::MacroAssemblerARM64::load64):
(JSC::MacroAssemblerARM64::load64WithAddressOffsetPatch):
(JSC::MacroAssemblerARM64::load32):
(JSC::MacroAssemblerARM64::load32WithAddressOffsetPatch):
(JSC::MacroAssemblerARM64::load16):
(JSC::MacroAssemblerARM64::load16SignedExtendTo32):
(JSC::MacroAssemblerARM64::load8):
(JSC::MacroAssemblerARM64::load8SignedExtendTo32):
(JSC::MacroAssemblerARM64::store64):
(JSC::MacroAssemblerARM64::store64WithAddressOffsetPatch):
(JSC::MacroAssemblerARM64::store32):
(JSC::MacroAssemblerARM64::store32WithAddressOffsetPatch):
(JSC::MacroAssemblerARM64::store16):
(JSC::MacroAssemblerARM64::store8):
(JSC::MacroAssemblerARM64::getEffectiveAddress):
(JSC::MacroAssemblerARM64::branchDoubleNonZero):
(JSC::MacroAssemblerARM64::branchDoubleZeroOrNaN):
(JSC::MacroAssemblerARM64::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerARM64::loadDouble):
(JSC::MacroAssemblerARM64::loadFloat):
(JSC::MacroAssemblerARM64::moveConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::moveDoubleConditionallyAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::storeDouble):
(JSC::MacroAssemblerARM64::storeFloat):
(JSC::MacroAssemblerARM64::call):
(JSC::MacroAssemblerARM64::jump):
(JSC::MacroAssemblerARM64::tailRecursiveCall):
(JSC::MacroAssemblerARM64::setCarry):
(JSC::MacroAssemblerARM64::reemitInitialMoveWithPatch):
(JSC::MacroAssemblerARM64::isBreakpoint):
(JSC::MacroAssemblerARM64::invert):
(JSC::MacroAssemblerARM64::readCallTarget):
(JSC::MacroAssemblerARM64::replaceWithVMHalt):
(JSC::MacroAssemblerARM64::replaceWithJump):
(JSC::MacroAssemblerARM64::maxJumpReplacementSize):
(JSC::MacroAssemblerARM64::patchableJumpSize):
(JSC::MacroAssemblerARM64::repatchCall):
(JSC::MacroAssemblerARM64::makeBranch):
(JSC::MacroAssemblerARM64::makeCompareAndBranch):
(JSC::MacroAssemblerARM64::makeTestBitAndBranch):
(JSC::MacroAssemblerARM64::ARM64Condition):
(JSC::MacroAssemblerARM64::moveWithFixedWidth):
(JSC::MacroAssemblerARM64::load):
(JSC::MacroAssemblerARM64::store):
(JSC::MacroAssemblerARM64::tryLoadWithOffset):
(JSC::MacroAssemblerARM64::tryLoadSignedWithOffset):
(JSC::MacroAssemblerARM64::tryStoreWithOffset):
(JSC::MacroAssemblerARM64::jumpAfterFloatingPointCompare):
(JSC::MacroAssemblerARM64::linkCall):
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86Common.h:
* assembler/ProbeStack.h:
- Removed a forward declaration of an obsolete class.

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

18 months agoServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrati...
cdumez@apple.com [Thu, 22 Feb 2018 21:40:38 +0000 (21:40 +0000)]
ServiceWorkerContainer::startScriptFetchForJob() fails to isolate copy the registrationKey before passing it to the main thread
https://bugs.webkit.org/show_bug.cgi?id=183050
<rdar://problem/37796881>

Reviewed by Youenn Fablet.

Create an isolated copy of the registrationKey before passing it to the main thread in ServiceWorkerContainer's
startScriptFetchForJob() / jobFinishedLoadingScript() / jobFailedLoadingScript().

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::startScriptFetchForJob):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):

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

18 months agoFetch event release assert should take into account the fetch mode
commit-queue@webkit.org [Thu, 22 Feb 2018 20:42:54 +0000 (20:42 +0000)]
Fetch event release assert should take into account the fetch mode
https://bugs.webkit.org/show_bug.cgi?id=183047

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

In case of navigation tasks, we should use the request URL and not the origin of the loading client.

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::isValidFetch):
(WebKit::WebSWContextManagerConnection::startFetch):

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

18 months ago[WinCairo] Fix compile errors in WebPageWin.cpp and WebProcessWin.cpp due to WebCore...
commit-queue@webkit.org [Thu, 22 Feb 2018 19:50:57 +0000 (19:50 +0000)]
[WinCairo] Fix compile errors in WebPageWin.cpp and WebProcessWin.cpp due to WebCore forwarding header paths
https://bugs.webkit.org/show_bug.cgi?id=182969

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-22
Reviewed by Konstantin Tokarev.

* WebProcess/WebPage/win/WebPageWin.cpp:
* WebProcess/win/WebProcessWin.cpp:

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

18 months agoServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passin...
cdumez@apple.com [Thu, 22 Feb 2018 19:46:18 +0000 (19:46 +0000)]
ServiceWorkerContainer::scheduleJob() fails to isolate copy the jobData before passing it to the main thread
https://bugs.webkit.org/show_bug.cgi?id=183046
<rdar://problem/37793395>

Reviewed by Youenn Fablet.

Make sure we isolate copy the jobData before passing it to the main thread in ServiceWorkerContainer::scheduleJob().
The jobData contains Strings / URLs so it is not safe to have non-isolated copies of it on various threads.

* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::scheduleJob):

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

18 months ago[Curl] Fix warning on clang.
commit-queue@webkit.org [Thu, 22 Feb 2018 19:41:18 +0000 (19:41 +0000)]
[Curl] Fix warning on clang.
https://bugs.webkit.org/show_bug.cgi?id=182986

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-02-22
Reviewed by Konstantin Tokarev.

No new tests because there's no behaviro changes.

* platform/network/curl/CurlResourceHandleDelegate.cpp:
(WebCore::CurlResourceHandleDelegate::curlDidSendData):
(WebCore::CurlResourceHandleDelegate::curlDidReceiveBuffer):
(WebCore::CurlResourceHandleDelegate::curlDidFailWithError):
* platform/network/curl/CurlResourceHandleDelegate.h:

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

18 months agoRemove sleep(double) and sleepMS(double) interfaces
utatane.tea@gmail.com [Thu, 22 Feb 2018 18:54:07 +0000 (18:54 +0000)]
Remove sleep(double) and sleepMS(double) interfaces
https://bugs.webkit.org/show_bug.cgi?id=183038

Reviewed by Mark Lam.

Source/JavaScriptCore:

* bytecode/SuperSampler.cpp:
(JSC::initializeSuperSampler):

Source/WebKit:

* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::createPluginAsynchronously):
* UIProcess/linux/MemoryPressureMonitor.cpp:
(WebKit::pollIntervalForUsedMemoryPercentage):
(WebKit::MemoryPressureMonitor::MemoryPressureMonitor):
* WebProcess/wpe/WebProcessMainWPE.cpp:

Source/WTF:

This patch removes sleep(double) and sleepMS(double) interfaces.
We can just use sleep(Seconds) instead.

* benchmarks/LockFairnessTest.cpp:
* benchmarks/LockSpeedTest.cpp:
* wtf/CurrentTime.cpp:
(WTF::sleep):
* wtf/CurrentTime.h:
(WTF::sleepMS): Deleted.
* wtf/DebugUtilities.h:
* wtf/Seconds.cpp:
(WTF::sleep): Deleted.
* wtf/Seconds.h:
* wtf/StackShotProfiler.h:

Tools:

* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::indicateTestFailure):
* DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
(EvaluteJSWithinNPP_New::NPP_New):
* DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
(InvokeDestroysPluginWithinNPP_New::NPP_New):
* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
* TestWebKitAPI/Tests/WTF/Signals.cpp:
(TEST):
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
(TestWebKitAPI::testThreadGroup):
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
(TestWebKitAPI::Util::sleep):

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

18 months agoAdd release logging for CacheStorage::Engine disk related functions
commit-queue@webkit.org [Thu, 22 Feb 2018 18:51:54 +0000 (18:51 +0000)]
Add release logging for CacheStorage::Engine disk related functions
https://bugs.webkit.org/show_bug.cgi?id=183042

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

* NetworkProcess/cache/CacheStorageEngine.cpp:
(WebKit::CacheStorage::Engine::writeFile):
(WebKit::CacheStorage::Engine::readFile):

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

18 months agoWorkerCacheStorageConnection::doRemove can assert in case two frames try to delete...
commit-queue@webkit.org [Thu, 22 Feb 2018 18:48:34 +0000 (18:48 +0000)]
WorkerCacheStorageConnection::doRemove can assert in case two frames try to delete the same cache at the same time
https://bugs.webkit.org/show_bug.cgi?id=183041

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

* Modules/cache/WorkerCacheStorageConnection.cpp:
(WebCore::WorkerCacheStorageConnection::doRemove): Update the assertion to accept the
case of an already deleted cache, i.e. returned identifer is 0.

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

18 months agoRemove some code leftovers in LibWebRTCMediaEndpoint and RealtimeOutgoingVideoSource...
commit-queue@webkit.org [Thu, 22 Feb 2018 18:32:43 +0000 (18:32 +0000)]
Remove some code leftovers in LibWebRTCMediaEndpoint and RealtimeOutgoingVideoSource classes
https://bugs.webkit.org/show_bug.cgi?id=183031

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-02-22
Reviewed by Youenn Fablet.

This include and namespace are not required in the file.

Just removing unused code, no tests required.

* Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

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

18 months agoDocument.open() cancels existing provisional load but not navigation policy check
cdumez@apple.com [Thu, 22 Feb 2018 18:29:26 +0000 (18:29 +0000)]
Document.open() cancels existing provisional load but not navigation policy check
https://bugs.webkit.org/show_bug.cgi?id=183012
<rdar://problem/37755831>

Reviewed by Alex Christensen.

Source/WebCore:

Test: fast/dom/Document/open-with-pending-load-async-policy.html

* dom/Document.cpp:
(WebCore::Document::open):
The existing code was calling FrameLoader::stopAllLoaders() when the loader's state
is FrameStateProvisional. The issue is that the FrameLoader's state only gets set
to FrameStateProvisional after the policy decision for the navigation is made.
This means that we fail to cancel a pending load if is still in the policy decision
stage, which can happen when the policy decision is made asynchronously. We now
also cancel such pending navigation policy checks as well.

* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
Make sure the m_delegateIsDecidingNavigationPolicy flag gets reset inside the
lambda. Otherwise, it gets reset too early when the policy decision is made
asynchronously.

LayoutTests:

Add layout test coverage.

* fast/dom/Document/open-with-pending-load-async-policy-expected.txt: Added.
* fast/dom/Document/open-with-pending-load-async-policy.html: Added.

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

18 months agoUpdated expectations for http/tests/appcache/404-resource-with-slow-main-resource...
jlewis3@apple.com [Thu, 22 Feb 2018 18:22:24 +0000 (18:22 +0000)]
Updated expectations for http/tests/appcache/404-resource-with-slow-main-resource.php.
https://bugs.webkit.org/show_bug.cgi?id=153503

Unreviewed test gardening.

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

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

18 months agoUnreviewed, rolling out r228902.
jlewis3@apple.com [Thu, 22 Feb 2018 18:01:08 +0000 (18:01 +0000)]
Unreviewed, rolling out r228902.

This broke internal builds.

Reverted changeset:

"[Cocoa] Web Automation: provide a way to ask clients the type
of a JavaScript dialog"
https://bugs.webkit.org/show_bug.cgi?id=182660
https://trac.webkit.org/changeset/228902

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

18 months agoAdd release asserts for service worker fetch and postMessage events
cdumez@apple.com [Thu, 22 Feb 2018 16:55:53 +0000 (16:55 +0000)]
Add release asserts for service worker fetch and postMessage events
https://bugs.webkit.org/show_bug.cgi?id=183025
rdar://problem/37765052

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-22
Reviewed by Daniel Bates.

Source/WebCore:

Add release assertion so that a service worker will only dispatch a message event
for clients and service workers with the same origin.
No change of behavior.

* platform/network/ResourceRequestBase.h:
* workers/service/context/ServiceWorkerThread.cpp:
(WebCore::ServiceWorkerThread::postMessageToServiceWorker):
* workers/service/context/ServiceWorkerThreadProxy.h:

Source/WebKit:

Add assertion to protect interception of a fetch load by a service worker with
a different origin from the page.

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::startFetch):

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

18 months agoMark http/tests/preload/onerror_event.html as a flaky crash on Windows.
pvollan@apple.com [Thu, 22 Feb 2018 16:43:45 +0000 (16:43 +0000)]
Mark http/tests/preload/onerror_event.html as a flaky crash on Windows.
https://bugs.webkit.org/show_bug.cgi?id=179297

Unreviewed test gardening.

* platform/win/TestExpectations:

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

18 months agoincluding both gl3.h and gl2.h when USE_OPENGL_ES is enabled
magomez@igalia.com [Thu, 22 Feb 2018 15:33:03 +0000 (15:33 +0000)]
including both gl3.h and gl2.h when USE_OPENGL_ES is enabled
https://bugs.webkit.org/show_bug.cgi?id=183008

Reviewed by Michael Catanzaro.

Don't include GLES3 headers as we stick to GLES2 API resources.

No new tests, no behavior change.

* platform/graphics/GLContext.cpp:

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

18 months agoUnreviewed GTK+ gardening after r228915.
magomez@igalia.com [Thu, 22 Feb 2018 14:57:36 +0000 (14:57 +0000)]
Unreviewed GTK+ gardening after r228915.

* platform/gtk/TestExpectations:

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

18 months ago[GTK][WPE] Fix some build errors in service workers code
Ms2ger@igalia.com [Thu, 22 Feb 2018 09:31:02 +0000 (09:31 +0000)]
[GTK][WPE] Fix some build errors in service workers code
https://bugs.webkit.org/show_bug.cgi?id=182966

Reviewed by Žan Doberšek.

Source/WebCore:

No new tests: no change in behavior.

* workers/service/ServiceWorkerProvider.h: add missing forward declaration.

Source/WebKit:

* CMakeLists.txt: add missing files.
* StorageProcess/ServiceWorker/WebSWServerConnection.cpp: add missing includes.
* UIProcess/ServiceWorkerProcessProxy.cpp: use #include rather than #import in C++; add missing ifdef.
* UIProcess/ServiceWorkerProcessProxy.h: add missing ifdef.
* WebProcess/Storage/WebSWClientConnection.cpp: add missing includes.
* WebProcess/Storage/WebSWContextManagerConnection.cpp: add missing includes.
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
  call the function that exists outside cocoa.

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

18 months ago[RenderTreeBuilder] Move RenderObject::insertedInto() mutation logic to RenderTreeBuilder
zalan@apple.com [Thu, 22 Feb 2018 06:17:45 +0000 (06:17 +0000)]
[RenderTreeBuilder] Move RenderObject::insertedInto() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183022
<rdar://problem/37764326>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::insertedIntoTree):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::insertChildToRenderElementInternal):
(WebCore::RenderTreeBuilder::moveChildrenTo):
(WebCore::RenderTreeBuilder::multiColumnDescendantInserted): Deleted.
* rendering/updating/RenderTreeBuilder.h:

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

18 months agoInclude all Cocoa sources in all Cocoa platform builds
timothy_horton@apple.com [Thu, 22 Feb 2018 03:49:05 +0000 (03:49 +0000)]
Include all Cocoa sources in all Cocoa platform builds
https://bugs.webkit.org/show_bug.cgi?id=183026
<rdar://problem/37513101>

Reviewed by Dan Bernstein.

Similar to r228571, don't have separate Sources files for iOS and Mac.
All sources now have #ifdefs that ensure that only the right ones
build on the right platforms. This makes it much easier to reason
about what builds where by just looking at the sources.

* SourcesCocoa.txt:
* SourcesIOS.txt: Removed.
* SourcesMac.txt: Removed.
* WebCore.xcodeproj/project.pbxproj:
* editing/WebContentReader.h:
* platform/mediastream/mac/ScreenDisplayCaptureSourceMac.h:

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

18 months agoMake SubstituteResource take a ResourceResponse r-value
commit-queue@webkit.org [Thu, 22 Feb 2018 00:28:20 +0000 (00:28 +0000)]
Make SubstituteResource take a ResourceResponse r-value
https://bugs.webkit.org/show_bug.cgi?id=183020

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-21
Reviewed by Alex Christensen.

No change of behavior.
Make SubstituteResource take a ResourceResponse r-value.
Update ArchiveResource accordingly.
Take benefit of that in ApplicationCacheResource to set the response source to ApplicationCache
before passing it to SubstituteResource constructor.

* loader/SubstituteResource.h:
(WebCore::SubstituteResource::SubstituteResource):
(WebCore::SubstituteResource::resourceResponse): Deleted.
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::create):
(WebCore::ApplicationCacheResource::ApplicationCacheResource):
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::create): Deleted.
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::ArchiveResource):

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

18 months ago[RenderTreeBuilder] ::willBeRemoved() does not need RenderTreeBuilder anymore.
zalan@apple.com [Thu, 22 Feb 2018 00:20:40 +0000 (00:20 +0000)]
[RenderTreeBuilder] ::willBeRemoved() does not need RenderTreeBuilder anymore.
https://bugs.webkit.org/show_bug.cgi?id=183019
<rdar://problem/37761421>

Reviewed by Antti Koivisto.

All the willBeDestroyed() mutations have been moved over to RenderTreeBuilder.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willBeDestroyed):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
* rendering/RenderBox.h:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::willBeDestroyed):
* rendering/RenderBoxModelObject.h:
* rendering/RenderCounter.cpp:
(WebCore::RenderCounter::willBeDestroyed):
* rendering/RenderCounter.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::willBeDestroyed):
* rendering/RenderElement.h:
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::willBeDestroyed):
* rendering/RenderEmbeddedObject.h:
* rendering/RenderFragmentedFlow.cpp:
(WebCore::RenderFragmentedFlow::willBeDestroyed):
* rendering/RenderFragmentedFlow.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::willBeDestroyed):
* rendering/RenderImage.h:
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
* rendering/RenderInline.h:
* rendering/RenderLayerModelObject.cpp:
(WebCore::RenderLayerModelObject::willBeDestroyed):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::willBeDestroyed):
* rendering/RenderListBox.h:
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::willBeDestroyed):
* rendering/RenderListMarker.h:
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::willBeDestroyed):
* rendering/RenderMenuList.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::destroy):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::willBeDestroyed):
* rendering/RenderReplaced.h:
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::willBeDestroyed):
* rendering/RenderSearchField.h:
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::willBeDestroyed):
* rendering/RenderSnapshottedPlugIn.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::willBeDestroyed):
* rendering/RenderText.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::willBeDestroyed):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::willBeDestroyed):
* rendering/RenderVideo.h:
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::willBeDestroyed):
* rendering/RenderWidget.h:
* rendering/svg/RenderSVGBlock.cpp:
(WebCore::RenderSVGBlock::willBeDestroyed):
* rendering/svg/RenderSVGBlock.h:
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::willBeDestroyed):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.cpp:
(WebCore::RenderSVGInline::willBeDestroyed):
* rendering/svg/RenderSVGInline.h:
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::willBeDestroyed):
* rendering/svg/RenderSVGModelObject.h:
* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::willBeDestroyed):
* rendering/svg/RenderSVGResourceContainer.h:
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::willBeDestroyed):
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::willBeDestroyed):
* rendering/svg/RenderSVGText.h:

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

18 months agoThe WebContent process should not use NSScreen in the screenAvailableRect/screenRect...
pvollan@apple.com [Thu, 22 Feb 2018 00:19:58 +0000 (00:19 +0000)]
The WebContent process should not use NSScreen in the screenAvailableRect/screenRect implementations.
https://bugs.webkit.org/show_bug.cgi?id=182855

Reviewed by Brent Fulgham.

On macOS, the functions screenAvailableRect and screenRect is implemented using NSScreen, which is communicating
with the WindowServer. To avoid this WindowServer communication from the WebContent process when calling
screenAvailableRect and screenRect, it is possible to let the UIProcess send a message to the WebContent
process whenever there is a change in the display properties, and have the WebContent process cache these
display properties. This message should also be sent to a newly started WebContent process.

Source/WebCore:

No new tests, covered by existing tests.

* WebCore.xcodeproj/project.pbxproj:
* platform/PlatformScreen.h:
* platform/mac/PlatformScreenMac.mm:
(WebCore::getScreenProperties):
(WebCore::screenProperties):
(WebCore::setScreenProperties):
(WebCore::screenRect):
(WebCore::screenAvailableRect):
* platform/ScreenProperties.h: Added.
(WebCore::ScreenProperties::encode const):
(WebCore::ScreenProperties::decode):

Source/WebKit:

* UIProcess/WebProcessPool.cpp:
(WebKit::displayReconfigurationCallBack):
(WebKit::registerDisplayConfigurationCallback):
(WebKit::WebProcessPool::initializeNewWebProcess):
(WebKit::WebProcessPool::warmInitialProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setScreenProperties):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

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

18 months agoAdd delay to make cookie purge catch up when running http/tests/resourceLoadStatistic...
wilander@apple.com [Thu, 22 Feb 2018 00:17:37 +0000 (00:17 +0000)]
Add delay to make cookie purge catch up when running http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html
https://bugs.webkit.org/show_bug.cgi?id=183024
<rdar://problem/37765207>

Unreviewed test gardening.

* http/tests/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
    Added a setTimeout() delay.

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

18 months ago[Curl] Curl Cookie Database File should be configurable using NetworkProcessCreationP...
commit-queue@webkit.org [Thu, 22 Feb 2018 00:10:25 +0000 (00:10 +0000)]
[Curl] Curl Cookie Database File should be configurable using NetworkProcessCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=182751

Patch by Christopher Reid <chris.reid@sony.com> on 2018-02-21
Reviewed by Youenn Fablet.

Source/WebCore:

No change in behavior.

Adding support to set a custom CookieJar Database.
Took CookieJarDB::open() out of its constructor because both the Network and Web process
were trying to open the journal files but one process was failing due to a lack of permission.
Now the database file is lazily opened and only the Network process will try to open the database.
Some cleanup was done to CookieJarDB too.

* platform/network/NetworkStorageSession.h:
* platform/network/curl/CookieJarDB.cpp:
* platform/network/curl/CookieJarDB.h:
* platform/network/curl/NetworkStorageSessionCurl.cpp:

Source/WebKit:

Adding a cookiePersistentStorageFile parameter to Curl's NetworkProcessCreationParameters.
This parameter is based on Soup's cookiePersistentStoragePath.
This parameter is not used yet, it is added to prepare for WinCairo WebKit support.

* NetworkProcess/NetworkProcessCreationParameters.cpp:
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/curl/NetworkProcessCurl.cpp:
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/curl/WebCookieManagerCurl.cpp:

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

18 months agoRegression(r228708): Crash under WebCore::MediaResource::responseReceived(WebCore...
cdumez@apple.com [Wed, 21 Feb 2018 23:56:16 +0000 (23:56 +0000)]
Regression(r228708): Crash under WebCore::MediaResource::responseReceived(WebCore::CachedResource&, WebCore::ResourceResponse const&)
https://bugs.webkit.org/show_bug.cgi?id=183018
<rdar://problem/37754154>

Reviewed by Eric Carlson.

The fix at r228708 was trying to address the fact that avplayer sometimes
deallocates WebCoreNSURLSessionDataTask objects on a non-main thread, which
was not safe because its _resource data member needs to be deallocated on
the main thread.

The issue is that r228708 caused _resource to outlive its WebCoreNSURLSessionDataTask.
This is an issue because _resource has a client data member (of type WebCoreNSURLSessionDataTaskClient)
which has a raw pointer to the WebCoreNSURLSessionDataTask. This means that the main thread could
call methods like responseReceived() on the resource, which would call responseReceived() on the
client, which would try to call [WebCoreNSURLSessionDataTask receivedResponse:] with an invalid
m_task pointer.

To address the issue, I introduced a clearTask() method on WebCoreNSURLSessionDataTaskClient, which
gets called from a non-main thread to clear the client's m_task pointer when the task is destroyed
on a non-main thread. So that this is safe, every time the client tries to use m_task, we now
acquire a lock for thread-safety and do a null-check on m_task.

No new tests, no known reproduction case.

* platform/graphics/PlatformMediaResourceLoader.h:
(WebCore::PlatformMediaResource::client):
* platform/network/cocoa/WebCoreNSURLSession.mm:
(WebCore::WebCoreNSURLSessionDataTaskClient::clearTask):
(WebCore::WebCoreNSURLSessionDataTaskClient::dataSent):
(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::shouldCacheResponse):
(WebCore::WebCoreNSURLSessionDataTaskClient::dataReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::redirectReceived):
(WebCore::WebCoreNSURLSessionDataTaskClient::accessControlCheckFailed):
(WebCore::WebCoreNSURLSessionDataTaskClient::loadFailed):
(WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished):
(-[WebCoreNSURLSessionDataTask dealloc]):

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

18 months ago[Cocoa] Web Automation: provide a way to ask clients the type of a JavaScript dialog
bburg@apple.com [Wed, 21 Feb 2018 23:31:15 +0000 (23:31 +0000)]
[Cocoa] Web Automation: provide a way to ask clients the type of a JavaScript dialog
https://bugs.webkit.org/show_bug.cgi?id=182660
<rdar://problem/37408183>

Reviewed by Tim Horton and Carlos Garcia Campos.

Add another delegate method to ask what type of dialog is being shown.
This is used to implement §18.4 Step 5, where sending text to a dialog
without a prompt will return several different kinds of errors.

No new tests, covered by web platform tests once Safari side has landed.

* UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h: Update FIXME radar numbers.
* UIProcess/Cocoa/AutomationSessionClient.h:
* UIProcess/Cocoa/AutomationSessionClient.mm:
(WebKit::AutomationSessionClient::AutomationSessionClient):
(WebKit::toImpl):
(WebKit::AutomationSessionClient::typeOfCurrentJavaScriptDialogOnPage):
If there is no current dialog to be checked, the client can return the 'None'
type. This gets converted into a std::nullopt and causes a command error later.

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

18 months agoMove AppCache loading to the NetworkProcess
commit-queue@webkit.org [Wed, 21 Feb 2018 22:37:27 +0000 (22:37 +0000)]
Move AppCache loading to the NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=178540
<rdar://problem/37119346>

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-21
Reviewed by Alex Christensen.

Source/WebCore:

Covered by existing tests.

Use ApplicationResourceLoader for cache entry loading.
Remove all ResourceHandle use from ApplicationCacheGroup.
Renamed m_loader in m_manifestLoader and added a new m_entryLoader to load cache entries.

Updated ApplicationCacheResourceLoader to handle different types of CachedResource.
This allows in particular to handle redirections based on the resource type and create the ApplicationCacheResource with the right type.
Use Include as credentials mode as per specification.

Add a new ApplicationCache ResourceResonse::Source.
This allows fixing an assertion and should allow better inspector support if needs be.

* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::responseSource):
* loader/ResourceLoader.cpp:
(WebCore::logResourceResponseSource):
* loader/SubstituteResource.h:
(WebCore::SubstituteResource::resourceResponse):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
(WebCore::ApplicationCacheGroup::startLoadingEntry):
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::ApplicationCacheResource):
* loader/appcache/ApplicationCacheResourceLoader.cpp:
(WebCore::ApplicationCacheResourceLoader::create):
(WebCore::ApplicationCacheResourceLoader::ApplicationCacheResourceLoader):
(WebCore::ApplicationCacheResourceLoader::responseReceived):
(WebCore::ApplicationCacheResourceLoader::redirectReceived):
* loader/appcache/ApplicationCacheResourceLoader.h:
* platform/network/ResourceResponseBase.h:
* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo const):
* testing/Internals.cpp:
(WebCore::responseSourceToString):

LayoutTests:

There is no guarantee that aborting in an event handler will be executed before some loads finish,
as the events are fired asynchronously.
Making tests less flaky by waiting some time before fnishing some loads.

* http/tests/appcache/abort-cache-onchecking.html:
* http/tests/appcache/resource-redirect-2-expected.txt:
* http/tests/appcache/resources/abort-cache-onchecking-resource-404.manifest:
* http/tests/appcache/resources/abort-cache-onchecking.manifest: Removed.
* http/tests/appcache/resources/abort-cache-onchecking.manifest.php: Added.
* http/tests/appcache/resources/abort-cache-ondownloading.manifest:
* http/tests/appcache/resources/abort-cache-ondownloading.text: Removed.
* http/tests/appcache/resources/abort-cache-ondownloading.text.php: Added.
* http/tests/appcache/resources/not-exist.vob.php: Added.

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

18 months ago[CMake] Expose HAVE macros globally
don.olmstead@sony.com [Wed, 21 Feb 2018 22:34:01 +0000 (22:34 +0000)]
[CMake] Expose HAVE macros globally
https://bugs.webkit.org/show_bug.cgi?id=183011

Reviewed by Michael Catanzaro.

* Source/cmake/OptionsCommon.cmake:
* Source/cmake/WebKitFeatures.cmake:

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

18 months ago[RenderTreeBuilder] Move RenderBoxModelObject::willBeRemoved() mutation logic to...
zalan@apple.com [Wed, 21 Feb 2018 22:27:00 +0000 (22:27 +0000)]
[RenderTreeBuilder] Move RenderBoxModelObject::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183014
<rdar://problem/37757428>

Reviewed by Antti Koivisto.

No change in functionality.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::~RenderBoxModelObject):
(WebCore::RenderBoxModelObject::willBeDestroyed):
(WebCore::RenderBoxModelObject::continuationChainNode const):
(): Deleted.
(WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations): Deleted.
* rendering/RenderBoxModelObject.h:
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::RenderTreeBuilder):
(WebCore::RenderTreeBuilder::removeAndDestroy):
* rendering/updating/RenderTreeBuilder.h:
(WebCore::RenderTreeBuilder::continuationBuilder):
* rendering/updating/RenderTreeBuilderContinuation.cpp: Added.
(WebCore::RenderTreeBuilder::Continuation::Continuation):
(WebCore::RenderTreeBuilder::Continuation::cleanupOnDestroy):
* rendering/updating/RenderTreeBuilderContinuation.h: Added.

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

18 months ago[CMake] Split declaration of JSC headers into public and private
don.olmstead@sony.com [Wed, 21 Feb 2018 22:02:03 +0000 (22:02 +0000)]
[CMake] Split declaration of JSC headers into public and private
https://bugs.webkit.org/show_bug.cgi?id=182980

Reviewed by Michael Catanzaro.

* CMakeLists.txt:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWPE.cmake:
* PlatformWin.cmake:

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

18 months agoServiceWorkerJob::m_lastResponse is unneeded
commit-queue@webkit.org [Wed, 21 Feb 2018 21:51:31 +0000 (21:51 +0000)]
ServiceWorkerJob::m_lastResponse is unneeded
https://bugs.webkit.org/show_bug.cgi?id=183013

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

Remove this field since not used anywhere.

* workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::didReceiveResponse):
* workers/service/ServiceWorkerJob.h:

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

18 months agoVersioning.
jmarcell@apple.com [Wed, 21 Feb 2018 21:51:23 +0000 (21:51 +0000)]
Versioning.

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

18 months ago[WinCairo] Fix compile errors of WebProcess and NetworkProcess due to no implementati...
commit-queue@webkit.org [Wed, 21 Feb 2018 21:41:06 +0000 (21:41 +0000)]
[WinCairo] Fix compile errors of WebProcess and NetworkProcess due to no implementation for windows
https://bugs.webkit.org/show_bug.cgi?id=182870

Patch by Yousuke Kimoto <yousuke.kimoto@sony.com> on 2018-02-21
Reviewed by Youenn Fablet.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openFrontendConnection):
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::establishConnection):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection):

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

18 months agoUse ResourceLoader to load appcache manifest
commit-queue@webkit.org [Wed, 21 Feb 2018 20:21:59 +0000 (20:21 +0000)]
Use ResourceLoader to load appcache manifest
https://bugs.webkit.org/show_bug.cgi?id=182861

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-21
Reviewed by Alex Christensen.

Source/WebCore:

Covered by updated tests.

Add ApplicationCacheResourceLoader to load an ApplicationCacheResource from a ResourceLoader.
Make use of it to load the app cache manifest.
Future work should load entries using the same loader.

Remove manifest handle.
Ensure that DocumentLoader does not register the manifest resource loader as its lifetime
is handled by its ApplicationCacheGroup.

Add a ResourceLoader option to bypass the application cache.
Use it for manifest loading.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::addSubresourceLoader):
* loader/ResourceLoaderOptions.h:
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::stopLoading):
(WebCore::ApplicationCacheGroup::update):
(WebCore::ApplicationCacheGroup::createRequest):
(WebCore::ApplicationCacheGroup::didReceiveResponseAsync):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFinishLoading):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
* loader/appcache/ApplicationCacheGroup.h:
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadResource):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForRedirect):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForResponse):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForError):
* loader/appcache/ApplicationCacheResourceLoader.cpp: Added.
* loader/appcache/ApplicationCacheResourceLoader.h: Added.

LayoutTests:

* http/tests/appcache/fail-on-update-2-expected.txt:
* http/tests/appcache/manifest-redirect-2-expected.txt:
* http/tests/appcache/offline-access-expected.txt:

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

18 months ago[CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
don.olmstead@sony.com [Wed, 21 Feb 2018 20:01:22 +0000 (20:01 +0000)]
[CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
https://bugs.webkit.org/show_bug.cgi?id=182883

Reviewed by Per Arne Vollan.

.:

* Source/cmake/OptionsAppleWin.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

No new tests. No change in behavior.

* WebCorePrefix.h:
* config.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebKit:

* config.h:

Source/WebKitLegacy/win:

* WebKitPrefix.h:

Source/WTF:

* wtf/Platform.h:

Tools:

* DumpRenderTree/config.h:
* TestWebKitAPI/config.h:

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

18 months ago[GTK] Unsafe g_setenv use in MiniBrowser main
mcatanzaro@igalia.com [Wed, 21 Feb 2018 19:55:40 +0000 (19:55 +0000)]
[GTK] Unsafe g_setenv use in MiniBrowser main
https://bugs.webkit.org/show_bug.cgi?id=182978

Reviewed by Carlos Garcia Campos.

setenv (and g_setenv) will randomly crash if called too late.

* MiniBrowser/gtk/main.c:
(main):

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

18 months ago[RenderTreeBuilder] Move RenderView::willBeRemoved() mutation logic to RenderTreeBuilder
zalan@apple.com [Wed, 21 Feb 2018 19:50:23 +0000 (19:50 +0000)]
[RenderTreeBuilder] Move RenderView::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=183009

Reviewed by Antti Koivisto.

No change in functionality.

* dom/Document.cpp:
(WebCore::Document::destroyRenderTree):
* rendering/RenderView.cpp:
(WebCore::RenderView::~RenderView):
(WebCore::RenderView::willBeDestroyed): Deleted.
* rendering/RenderView.h:

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

18 months ago[GTK] USE_UPOWER causes crashes inside a chroot or on systems with broken dbus/upower
mcatanzaro@igalia.com [Wed, 21 Feb 2018 19:42:35 +0000 (19:42 +0000)]
[GTK] USE_UPOWER causes crashes inside a chroot or on systems with broken dbus/upower
https://bugs.webkit.org/show_bug.cgi?id=181825

Reviewed by Carlos Garcia Campos.

.:

Get rid of the upower-glib dependency. We will use upower's D-Bus API instead.

* Source/cmake/FindUPowerGLib.cmake: Removed.
* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

We could fix this crash, but that would not be good enough, because upower-glib is a
synchronous API that wraps D-Bus calls. That's not acceptable for use in the web process.
Rewrite LowPowerModeNotifierGLib to use upower's D-Bus API directly, instead.

Note that this also enables LowPowerModeNotifier for WPE, since the USE(UPOWER) build
flag is no longer needed.

* platform/LowPowerModeNotifier.cpp:
* platform/LowPowerModeNotifier.h:
* platform/glib/LowPowerModeNotifierGLib.cpp:
(WebCore::LowPowerModeNotifier::LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::updateWarningLevel):
(WebCore::LowPowerModeNotifier::warningLevelChanged):
(WebCore::LowPowerModeNotifier::gPropertiesChangedCallback):
(WebCore::LowPowerModeNotifier::~LowPowerModeNotifier):
(WebCore::LowPowerModeNotifier::updateState): Deleted.
(WebCore::LowPowerModeNotifier::warningLevelCallback): Deleted.

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

18 months agoWeb Automation: failed provisional loads cause "Navigate To" command to hang
bburg@apple.com [Wed, 21 Feb 2018 19:41:03 +0000 (19:41 +0000)]
Web Automation: failed provisional loads cause "Navigate To" command to hang
https://bugs.webkit.org/show_bug.cgi?id=183007
<rdar://problem/37751819>

Reviewed by Andy Estes.

This hang was revealed by WPT test current_url.py::get_current_url_file_protocol. Now the
test simply fails because Safari chooses a policy of 'Ignore' for externally-opened files.
I filed an upstream issue with the test here: https://github.com/w3c/webdriver/issues/1232

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
Notify the session that the load failed in the frame, just like we do
for non-provisional failed loads and successful loads.

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

18 months agoVTTCue constructor should use 'double' type for startTime / endTime
cdumez@apple.com [Wed, 21 Feb 2018 19:36:47 +0000 (19:36 +0000)]
VTTCue constructor should use 'double' type for startTime / endTime
https://bugs.webkit.org/show_bug.cgi?id=182988

Reviewed by Eric Carlson.

Source/WebCore:

VTTCue constructor should use 'double' type for startTime / endTime, not
'unrestricted double':
- https://w3c.github.io/webvtt/#the-vttcue-interface

Otherwise, we end up potentially returning NaN for TextTrackCue.startTime / endTime,
even though those correctly use type 'double':
- https://html.spec.whatwg.org/multipage/media.html#texttrackcue

The new behavior is consistent with Firefox and Chrome.

No new tests, updated existing test.

* bindings/js/JSDOMConvertNumbers.h:
(WebCore::JSConverter<IDLDouble>::convert):
Add assertion to make sure our implementation never tries to return NaN
for an IDL attribute of type 'double'. This would be invalid as per Web
IDL spec and would crash if the NaN being returned was impure as JSValue
could not store it as a double.

* html/track/VTTCue.idl:
Update constructor parameters to use 'double' type instead of 'unrestricted
double', as per:
- https://w3c.github.io/webvtt/#the-vttcue-interface

LayoutTests:

Update existing test to reflect behavior change.

* media/track/track-add-remove-cue-expected.txt:
* media/track/track-add-remove-cue.html:

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

18 months agowebkitpy NetworkTransaction should retry on URLError
aakash_jain@apple.com [Wed, 21 Feb 2018 19:27:52 +0000 (19:27 +0000)]
webkitpy NetworkTransaction should retry on URLError
https://bugs.webkit.org/show_bug.cgi?id=182987

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Retry on urllib2.URLError.

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

18 months ago[RenderTreeBuilder] Move RenderTextFragment::willBeRemoved() mutation logic to Render...
zalan@apple.com [Wed, 21 Feb 2018 18:45:56 +0000 (18:45 +0000)]
[RenderTreeBuilder] Move RenderTextFragment::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182946
<rdar://problem/37690039>

Reviewed by Antti Koivisto.

No change in functionality.

* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::willBeDestroyed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::takeChild):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::cleanupOnRemoval):
* rendering/updating/RenderTreeBuilderFirstLetter.h:

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

18 months agoTest gardening.
commit-queue@webkit.org [Wed, 21 Feb 2018 18:26:58 +0000 (18:26 +0000)]
Test gardening.
https://bugs.webkit.org/show_bug.cgi?id=183006

Unreviewed test gardening.

Patch by Ms2ger <Ms2ger@gmail.com> on 2018-02-21

* TestExpectations: add ietestcenter/css3/valuesandunits/units-000.htm.
* platform/gtk/TestExpectations: remove ietestcenter/css3/valuesandunits/units-000.htm.
* platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: update for r228827.
* platform/ios/TestExpectations: remove ietestcenter/css3/valuesandunits/units-000.htm.
* platform/mac/TestExpectations: remove ietestcenter/css3/valuesandunits/units-000.htm.
* platform/win/TestExpectations: remove ietestcenter/css3/valuesandunits/units-000.htm.
* platform/wpe/TestExpectations: remove ietestcenter/css3/valuesandunits/units-000.htm.
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: update for r228827.

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

18 months ago[GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
Ms2ger@igalia.com [Wed, 21 Feb 2018 18:19:03 +0000 (18:19 +0000)]
[GCrypt] Remove unsound assertion from CryptoKeyRSA::exportData().
https://bugs.webkit.org/show_bug.cgi?id=183001

Reviewed by Philippe Normand.

This function is called from structured cloning, in particular when storing
a key in IndexedDB. This would trip the assertion if the key in question is
non-exportable.

The assertion was copied from the macOS implementation in r172389; it was
subsequently removed there in r172898 to handle this case.

Test: crypto/subtle/rsa-indexeddb-non-exportable.html

* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::CryptoKeyRSA::exportData const): remove assertion.

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

18 months ago[WTR][WPE] Correct the process names in TestController.
Ms2ger@igalia.com [Wed, 21 Feb 2018 18:16:20 +0000 (18:16 +0000)]
[WTR][WPE] Correct the process names in TestController.
https://bugs.webkit.org/show_bug.cgi?id=178700

Reviewed by Michael Catanzaro.

Similar to r228731 for GTK.

* Scripts/webkitpy/port/wpe.py:
(WPEPort._get_crash_log): removed the code to convert WebProcess name.
* WebKitTestRunner/TestController.cpp: return the correct process names for WPE.
(WTR::TestController::webProcessName):
(WTR::TestController::networkProcessName):
(WTR::TestController::databaseProcessName):

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

18 months agoUpdate test expectations
cturner@igalia.com [Wed, 21 Feb 2018 18:12:59 +0000 (18:12 +0000)]
Update test expectations
https://bugs.webkit.org/show_bug.cgi?id=182973

Unreviewed gardening.

* platform/gtk/TestExpectations:

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

18 months ago[ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRa...
Ms2ger@igalia.com [Wed, 21 Feb 2018 17:57:07 +0000 (17:57 +0000)]
[ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRange().
https://bugs.webkit.org/show_bug.cgi?id=183000

Reviewed by Joanmarie Diggs.

It is never initialized, but is passed to atk_attribute_set_free.
This caused a crash in accessibility/content-editable-as-textarea.html on the debug bots.

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

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

18 months agoRebaseline web animations tests after r228717
cturner@igalia.com [Wed, 21 Feb 2018 17:54:33 +0000 (17:54 +0000)]
Rebaseline web animations tests after r228717
https://bugs.webkit.org/show_bug.cgi?id=182970

Reviewed by Antoine Quint.

* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added.
* platform/gtk/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added.

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

18 months ago[Cocoa] Make system-ui obey the user-installed-font policy
mmaxfield@apple.com [Wed, 21 Feb 2018 17:34:45 +0000 (17:34 +0000)]
[Cocoa] Make system-ui obey the user-installed-font policy
https://bugs.webkit.org/show_bug.cgi?id=182860
<rdar://problem/36158249>

Reviewed by Antti Koivisto.

Source/WebCore:

We have a completely different codepath for system-ui which makes it follow the system's
font cascade list. This codepath (along with all the other relevant places which create
system fonts) needs to obey the AllowUserInstalledFonts enum. This patch is fairly
mechanical; we simply are hooking up the flag across SystemFontDatabase.

There are a few places which creates system fonts which this patch doesn't touch. This is
not a problem because all the remaining places either:
1) Simply pull out some attributes of the font (name, weight, size, etc.) and then throw
away the font object itself, or
2) Use the font in an environment where script cannot access the characters rendered (such
as DragImages or the fullscreen placeholder view or the inside of the attachment element).

Test: fast/text/user-installed-fonts/system-ui.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::collectionForFamily):
(WebCore::FontDatabase::fontForPostScriptName):
(WebCore::fontWithFamily):
(WebCore::installedFontMandatoryAttributes):
(WebCore::createSpecificFontForInstalledFonts):
* platform/graphics/cocoa/FontCacheCoreText.h:
* platform/graphics/cocoa/FontDescriptionCocoa.cpp:
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator== const):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash const):
(WebCore::SystemFontDatabase::systemFontCascadeList):
(WebCore::SystemFontDatabase::removeCascadeList):
(WebCore::SystemFontDatabase::computeCascadeList):
(WebCore::systemFontParameters):
(WebCore::systemFontCascadeList):
(WebCore::FontCascadeDescription::effectiveFamilyCount const):
(WebCore::FontCascadeDescription::effectiveFamilyAt const):
* platform/graphics/ios/FontCacheIOS.mm:
(WebCore::platformFontWithFamilySpecialCase):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::platformFontWithFamilySpecialCase):

Tools:

Create a font, FakeHelvetica-ArmenianCharacter.ttf, which supports a particular Armenian
character which isn't isn't supported by any other font on the system.

* WebKitTestRunner/FakeHelvetica-ArmenianCharacter.ttf:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:

LayoutTests:

FakeHelvetica-ArmenianCharacter.ttf is a font which supports a particular Armenian character which
isn't supported by any other font on the system. Installing this font will cause it to be added to
the 'system-ui' font cascade list. When we disable user-installed-fonts, this font should not be
used to render the character.

* fast/text/user-installed-fonts/system-ui-expected-mismatch.html:
* fast/text/user-installed-fonts/system-ui.html:

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

18 months agoUnreviewed attempt to fix build after r228867.
cdumez@apple.com [Wed, 21 Feb 2018 17:08:45 +0000 (17:08 +0000)]
Unreviewed attempt to fix build after r228867.

* Modules/webvr/VRStageParameters.cpp:

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

18 months ago[GStreamer] Rewrite purgeInvalid*Tracks methods
philn@webkit.org [Wed, 21 Feb 2018 17:00:53 +0000 (17:00 +0000)]
[GStreamer] Rewrite purgeInvalid*Tracks methods
https://bugs.webkit.org/show_bug.cgi?id=183004

Reviewed by Carlos Garcia Campos.

Removing items from a hashmap while iterating is bad.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks):
Safely remove items from the hashmap using removeIf().
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto.

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

18 months agoUnreviewed attempt to fix build after r228867.
cdumez@apple.com [Wed, 21 Feb 2018 17:00:21 +0000 (17:00 +0000)]
Unreviewed attempt to fix build after r228867.

* Modules/webvr/VRStageParameters.cpp:

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

18 months ago[GStreamer] Crash in Debug build when purging invalid tracks
philn@webkit.org [Wed, 21 Feb 2018 13:26:51 +0000 (13:26 +0000)]
[GStreamer] Crash in Debug build when purging invalid tracks
https://bugs.webkit.org/show_bug.cgi?id=182997

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidAudioTracks): Clear the hashmap when there is no valid track left.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidVideoTracks): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): Ditto.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Demote debugging, this appears too much at least with playbin2.
(WebCore::TrackPrivateBaseGStreamer::getTag): Ditto.

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

18 months ago[GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1
philn@webkit.org [Wed, 21 Feb 2018 13:25:26 +0000 (13:25 +0000)]
[GStreamer] We need to adopt GstGlDisplays after GStreamer 1.13.1
https://bugs.webkit.org/show_bug.cgi?id=182996

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Adopt references when running with GStreamer 1.13.1 to avoid
memory leaks.

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

18 months ago[GTK] Layout test media/track/track-in-band-duplicate-tracks-when-source-changes...
philn@webkit.org [Wed, 21 Feb 2018 11:42:05 +0000 (11:42 +0000)]
[GTK] Layout test media/track/track-in-band-duplicate-tracks-when-source-changes.html failing since r228617
https://bugs.webkit.org/show_bug.cgi?id=160131
<rdar://problem/35873985>

Reviewed by Michael Catanzaro.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): We
can't assume the pad has a sticky event here like implemented in
InbandTextTrackPrivateGStreamer because it might be emitted after
the track was created. So fallback to a dummy stream ID like in
the Audio and Video tracks.

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

18 months ago[WebVR][OpenVR] Retrieve stage parameters
svillar@igalia.com [Wed, 21 Feb 2018 10:47:14 +0000 (10:47 +0000)]
[WebVR][OpenVR] Retrieve stage parameters
https://bugs.webkit.org/show_bug.cgi?id=182976

Reviewed by Žan Doberšek.

Use OpenVR to retrieve stage parameters, i.e., play area size and
the transformation from sitting to standing position. It includes
the same fallback used by Firefox to provide sensible values in case
we cannot get the required information from the VR SDK (it's quite
common not to have defined a play area).

* Modules/webvr/VRDisplay.cpp:
(WebCore::VRDisplay::stageParameters const):
* Modules/webvr/VRDisplay.h:
* Modules/webvr/VRStageParameters.cpp:
(WebCore::VRStageParameters::VRStageParameters):
(WebCore::VRStageParameters::sittingToStandingTransform const):
(WebCore::VRStageParameters::sizeX const):
(WebCore::VRStageParameters::sizeZ const):
* Modules/webvr/VRStageParameters.h:
(WebCore::VRStageParameters::create):
* platform/vr/VRPlatformDisplay.h:
* platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:
(WebCore::VRPlatformDisplayOpenVR::VRPlatformDisplayOpenVR):
(WebCore::VRPlatformDisplayOpenVR::updateStageParameters):
* platform/vr/openvr/VRPlatformDisplayOpenVR.h:

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

18 months ago[GStreamer] Create a Wayland GL display instead of EGL
philn@webkit.org [Wed, 21 Feb 2018 09:34:35 +0000 (09:34 +0000)]
[GStreamer] Create a Wayland GL display instead of EGL
https://bugs.webkit.org/show_bug.cgi?id=182968

Reviewed by Xabier Rodriguez-Calvar.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Add logging and instantiate a GstDisplayWayland display instead of
an EGL display when running under a Wayland compositor.

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

18 months ago[RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTr...
zalan@apple.com [Wed, 21 Feb 2018 08:25:39 +0000 (08:25 +0000)]
[RenderTreeBuilder] Move RenderFullScreen::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182947
<rdar://problem/37690848>

Reviewed by Antti Koivisto.

No change in functionality.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/RenderFullScreen.cpp:
(WebCore::RenderFullScreen::willBeDestroyed):
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::takeChild):
* rendering/updating/RenderTreeBuilder.h:
(WebCore::RenderTreeBuilder::fullScreenBuilder):
* rendering/updating/RenderTreeBuilderFullScreen.cpp: Added.
(WebCore::RenderTreeBuilder::FullScreen::FullScreen):
(WebCore::RenderTreeBuilder::FullScreen::cleanupOnRemoval):
* rendering/updating/RenderTreeBuilderFullScreen.h: Added.
* rendering/updating/RenderTreeBuilderMathML.cpp:

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

18 months agoDFG::VarargsForwardingPhase should eliminate getting argument length
sbarati@apple.com [Wed, 21 Feb 2018 06:56:11 +0000 (06:56 +0000)]
DFG::VarargsForwardingPhase should eliminate getting argument length
https://bugs.webkit.org/show_bug.cgi?id=182959

Reviewed by Keith Miller.

JSTests:

* microbenchmarks/forward-arguments-dont-escape-on-arguments-length.js: Added.

Source/JavaScriptCore:

This patch teaches the DFG VarargsForwardingPhase to not treat
length accesses on Cloned/Direct Arguments objects as escapes.
It teaches this phase to materialize the length in the same
way the ArgumentsEliminationPhase does.

This is around a 0.5-1% speedup on ARES6 on my iMac. It speeds
up the ML subtest by 2-4%.

This patch also extends compileGetArgumentCountIncludingThis to take
a parameter that is the inline call frame to load from (in the case
where the inline call frame is a varargs frame). This allows the
the emitCodeToGetArgumentsArrayLength helper function to just emit
a GetArgumentCountIncludingThis node instead of a GetLocal. If we
emitted a GetLocal, we'd need to rerun CPS rethreading.

* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGArgumentsUtilities.cpp:
(JSC::DFG::emitCodeToGetArgumentsArrayLength):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getArgumentCount):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGNode.h:
(JSC::DFG::Node::argumentsInlineCallFrame):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetArgumentCountIncludingThis):

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

18 months agoTry to fix the 32-bit build after r228857
timothy_horton@apple.com [Wed, 21 Feb 2018 05:48:38 +0000 (05:48 +0000)]
Try to fix the 32-bit build after r228857

* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):

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

18 months ago[RenderTreeBuilder] Move RenderListItem::willBeRemoved() mutation logic to RenderTree...
zalan@apple.com [Wed, 21 Feb 2018 04:39:29 +0000 (04:39 +0000)]
[RenderTreeBuilder] Move RenderListItem::willBeRemoved() mutation logic to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=182943
<rdar://problem/37689029>

Reviewed by Antti Koivisto.

We don't need to destroy the marker in RenderListItem::willBeRemoved(), because it gets deleted
in RenderTreeBuilder::removeAndDestroy() together with RenderListItem (as long as the marker is
the RenderListItem's descendent).

Covered by existing tests.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::~RenderListItem):
(WebCore::RenderListItem::willBeDestroyed): Deleted.
* rendering/RenderListItem.h:

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

18 months agoAX: Keyboard focus not following VoiceOver cursor into web content or within web...
n_wang@apple.com [Wed, 21 Feb 2018 04:17:20 +0000 (04:17 +0000)]
AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
https://bugs.webkit.org/show_bug.cgi?id=182752
<rdar://problem/37518233>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Call the assistive technology specific method for becoming first responder.

Test: accessibility/mac/accessibility-make-first-responder.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
* page/ChromeClient.h:

Source/WebKit:

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::assistiveTechnologyMakeFirstResponder):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::assistiveTechnologyMakeFirstResponder):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::assistiveTechnologyMakeFirstResponder):
* WebProcess/WebCoreSupport/WebChromeClient.h:

Tools:

* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):

LayoutTests:

* accessibility/mac/accessibility-make-first-responder-expected.txt: Added.
* accessibility/mac/accessibility-make-first-responder.html: Added.
* platform/mac-wk1/TestExpectations:

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

18 months agoWeb Automation: combine session commands to resize and move top-level browsing contexts
bburg@apple.com [Wed, 21 Feb 2018 04:13:42 +0000 (04:13 +0000)]
Web Automation: combine session commands to resize and move top-level browsing contexts
https://bugs.webkit.org/show_bug.cgi?id=182749
<rdar://problem/37515170>

Reviewed by Andy Estes.

Source/WebDriver:

The new command can take either size or origin. Just have one session command for use by endpoints.

* Session.cpp:
(WebDriver::Session::setWindowRect):
(WebDriver::Session::moveToplevelBrowsingContextWindow): Deleted.
(WebDriver::Session::resizeToplevelBrowsingContextWindow): Deleted.
* Session.h:

Source/WebKit:

Since moving and resizing the window are both accomplished by setting the window frame,
and the W3C WebDriver specification has a Get/Set Window Rect command, it's time to
deduplicate these two methods which basically do the same thing.

Adopt modern JSON::Value getters that return std::optional<float>. I have been trying
to move the protocol over to this style wholesale, but it is probably easier to do
this conversion in smaller pieces. And so, I have started to do so.

This change is covered by existing WebDriver tests.

* UIProcess/Automation/Automation.json: Add new command.
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::setWindowFrameOfBrowsingContext): Added.
(WebKit::WebAutomationSession::resizeWindowOfBrowsingContext): Deleted.
(WebKit::WebAutomationSession::moveWindowOfBrowsingContext): Deleted.
* UIProcess/Automation/WebAutomationSession.h:

Source/WTF:

* wtf/JSONValues.h: add a getDouble() implementation that returns a std::optional<T>
rather than using an out-parameter. I'd like to move more code to this style.

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

18 months ago[GTK] jhbuild: Remove gtk-doc
commit-queue@webkit.org [Wed, 21 Feb 2018 03:27:09 +0000 (03:27 +0000)]
[GTK] jhbuild: Remove gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=182956

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2018-02-20
Reviewed by Michael Catanzaro.

jhbuild doesn't need to build gtk-doc because major LTS Linux
distributions have gtk-doc v1.25, and
Tools/gtk/install-dependencies installs gtk-doc.

* gtk/jhbuild.modules: Removed gtk-doc.

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

18 months agoASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a...
bburg@apple.com [Wed, 21 Feb 2018 02:17:57 +0000 (02:17 +0000)]
ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
https://bugs.webkit.org/show_bug.cgi?id=182991
<rdar://problem/37620578>

Reviewed by Timothy Hatcher.

Sometimes when running more than one session end-to-end with the same browser instance,
UIProcess would crash under addMessageReceiver because another WebAutomationSession was still
registered. This is hard to reproduce, but upon code inspection, the receiver management code
is somewhat problematic because it only runs when the WebAutomationSession destructor runs.
In some cases the client could retain two sessions and cause the first one to never remove itself
as the message receiver.

Instead of unregistering the session as a message receiver underneath the session's destructor,
do this whenever a new session supplants an old session since there is only one active session at a time.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::~WebAutomationSession):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setAutomationSession):

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

18 months agoIntroduce HAVE(IOSURFACE_ACCELERATOR)
timothy_horton@apple.com [Wed, 21 Feb 2018 01:32:26 +0000 (01:32 +0000)]
Introduce HAVE(IOSURFACE_ACCELERATOR)
https://bugs.webkit.org/show_bug.cgi?id=182955
<rdar://problem/37699510>

Reviewed by Sam Weinig.

Source/WebCore:

No new tests, no change in behavior.

Introduce HAVE(IOSURFACE_ACCELERATOR) and guard all uses of
IOSurfaceAccelerator behind it.

Rename USE(IOSURFACE) to HAVE(IOSURFACE) for accuracy.

* page/cocoa/MemoryReleaseCocoa.mm:
* platform/graphics/ca/TileController.cpp:
* platform/graphics/cg/IOSurfacePool.cpp:
* platform/graphics/cg/IOSurfacePool.h:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
* platform/graphics/cocoa/IOSurfacePoolCocoa.mm:
* platform/graphics/cv/VideoTextureCopierCV.cpp:
* platform/graphics/cv/VideoTextureCopierCV.h:

Source/WebCore/PAL:

* pal/spi/cg/CoreGraphicsSPI.h:
* pal/spi/cocoa/IOSurfaceSPI.h:
* pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

* Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
* Shared/cg/ShareableBitmapCG.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
* UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:

Source/WTF:

* wtf/Platform.h:

Tools:

* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage):

WebKitLibraries:

* WebKitPrivateFrameworkStubs/iOS/10/IOSurface.framework/IOSurface.tbd:
* WebKitPrivateFrameworkStubs/iOS/10/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/11/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd: Added.
Switch IOSurfaceAccelerator symbols over to the still-private IOSurfaceAccelerator framework.

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

18 months agoProvisional load may get committed before receiving the decidePolicyForNavigationResp...
cdumez@apple.com [Wed, 21 Feb 2018 01:08:28 +0000 (01:08 +0000)]
Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
https://bugs.webkit.org/show_bug.cgi?id=182720
<rdar://problem/37515204>

Reviewed by Alex Christensen.

Source/WebCore:

Wait for the policy response from the client after receiving a resource response,
before sending the NetworkResourceLoader::ContinueDidReceiveResponse IPC back to
the NetworkProcess. Otherwise, the network process may start sending us data and
we may end up committing the provisional load before receiving the policy decision
fron the client.

Change is covered by new API test.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
* loader/NetscapePlugInStreamLoader.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::deliverResponseAndData):
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::didReceiveResponseAsync):
* loader/ResourceLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didReceiveResponsePolicy):
(WebCore::SubresourceLoader::willCancel):
* loader/SubresourceLoader.h:
* loader/ios/PreviewLoader.mm:
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):

Source/WebKit:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
* WebProcess/Storage/ServiceWorkerClientFetch.cpp:
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):
* WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
(WebKit::WebURLSchemeTaskProxy::didReceiveResponse):

Source/WTF:

Add convenience CompletionHandlerCallingScope class which calls its CompletionHandler
when destroyed, and provides a release() methods to manually call the completionHandler.

* wtf/CompletionHandler.h:
(WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope):
(WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope):
(WTF::CompletionHandlerCallingScope::CompletionHandler<void):

Tools:

Add API test coverage.

* TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:
(-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TestWebKitAPI::TEST):

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

18 months agoCrash under JSC::JSCell::toNumber(JSC::ExecState*)
cdumez@apple.com [Wed, 21 Feb 2018 00:51:06 +0000 (00:51 +0000)]
Crash under JSC::JSCell::toNumber(JSC::ExecState*)
https://bugs.webkit.org/show_bug.cgi?id=182984
<rdar://problem/37694346>

Reviewed by Mark Lam.

Source/WebCore:

The issue was caused by DOMMatrix attributes potentially returning "impure"
NaN values. We would call JSC::jsNumber(double) to construct the JSValue
but this is only safe for pure NaN values. Make sure we purify the double
returned by the implementation for IDL attributes of type 'unrestricted double'
before calling JSC::jsNumber(double).

No new tests, extended existing test.

* bindings/js/JSDOMConvertNumbers.h:
(WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
* testing/TypeConversions.h:
(WebCore::TypeConversions::testImpureNaNUnrestrictedDouble const):
(WebCore::TypeConversions::testImpureNaN2UnrestrictedDouble const):
(WebCore::TypeConversions::testQuietNaNUnrestrictedDouble const):
* testing/TypeConversions.idl:

LayoutTests:

Add layout test coverage.

* js/dom/webidl-type-mapping-expected.txt:
* js/dom/webidl-type-mapping.html:

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

18 months agoMark two imported/w3c/web-platform-tests/2dcontext/imagebitmap tests as flaky on...
ryanhaddad@apple.com [Wed, 21 Feb 2018 00:35:11 +0000 (00:35 +0000)]
Mark two imported/w3c/web-platform-tests/2dcontext/imagebitmap tests as flaky on iOS.
https://bugs.webkit.org/show_bug.cgi?id=182833

Unreviewed test gardening.

* platform/ios/TestExpectations:

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

18 months agoMake more use of USE(OPENGL_ES) where it makes sense
timothy_horton@apple.com [Tue, 20 Feb 2018 23:34:00 +0000 (23:34 +0000)]
Make more use of USE(OPENGL_ES) where it makes sense
https://bugs.webkit.org/show_bug.cgi?id=182957
<rdar://problem/37699443>

Reviewed by Dan Bernstein.

No new tests, no behavior change.

Make use of USE(OPENGL_ES) for CoreVideo functions that differ based
on GL availability. Also adjust GraphicsContext3D in the same way.

* platform/cocoa/CoreVideoSoftLink.cpp:
* platform/cocoa/CoreVideoSoftLink.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/cv/TextureCacheCV.mm:
(WebCore::TextureCacheCV::create):
(WebCore::TextureCacheCV::textureFromImage):
* platform/graphics/cv/VideoTextureCopierCV.cpp:
(WebCore::enumToStringMap):
(WebCore::VideoTextureCopierCV::initializeContextObjects):
(WebCore::VideoTextureCopierCV::initializeUVContextObjects):
(WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
(WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):

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

18 months agoAlways inline soft linking functions to work around a clang bug
timothy_horton@apple.com [Tue, 20 Feb 2018 23:11:32 +0000 (23:11 +0000)]
Always inline soft linking functions to work around a clang bug
https://bugs.webkit.org/show_bug.cgi?id=182985
<rdar://problem/37587017>

Reviewed by Dan Bernstein.

* wtf/cocoa/SoftLinking.h:
In some cases, clang will emit a weak extern symbol for a re-declared
symbol that has availability attributes on it. To avoid this, always
inline to avoid emitting a second symbol.

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

18 months agoUnreviewed, rolling out r228829.
jlewis3@apple.com [Tue, 20 Feb 2018 23:02:01 +0000 (23:02 +0000)]
Unreviewed, rolling out r228829.

This caused a consistent failure in the API test
WebKit.InteractionDeadlockAfterCrash on iOS Simulator

Reverted changeset:

"Switch to UIWKTextInteractionAssistant for non-editable text"
https://bugs.webkit.org/show_bug.cgi?id=182834
https://trac.webkit.org/changeset/228829

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

18 months agoSkip tests that need ENABLE_LINK_PREFETCH
rego@igalia.com [Tue, 20 Feb 2018 21:45:27 +0000 (21:45 +0000)]
Skip tests that need ENABLE_LINK_PREFETCH
https://bugs.webkit.org/show_bug.cgi?id=182981

Unreviewed gardening.

These tests were marked in the different TestExpectations fails of each port,
when actually none of them were testing this code as ENABLE_LINK_PREFETCH is disabled by default
(even in development builds).

The patch just moves the flagged tests from the port specific TestExpectations files
to the generic TestExpectations file skipping them.

* TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios/TestExpectations:
* platform/mac/TestExpectations:
* platform/win/TestExpectations:

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