WebKit-https.git
2 years agoUnreviewed, update Beacon API status to "In Development".
cdumez@apple.com [Wed, 2 Aug 2017 04:47:45 +0000 (04:47 +0000)]
Unreviewed, update Beacon API status to "In Development".

* features.json:

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

2 years agoAdd initial support for navigator.sendBeacon
cdumez@apple.com [Wed, 2 Aug 2017 04:44:23 +0000 (04:44 +0000)]
Add initial support for navigator.sendBeacon
https://bugs.webkit.org/show_bug.cgi?id=175007
<rdar://problem/33547728>

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Import more beacon web-platform-tests and rebaseline the one we had
already imported now that navigator.sendBeacon is exposed.

* resources/import-expectations.json:
* resources/resource-files.json:
* web-platform-tests/beacon/beacon-basic-blob-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-blob.html: Added.
* web-platform-tests/beacon/beacon-basic-blobMax-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-blobMax.html: Added.
* web-platform-tests/beacon/beacon-basic-buffersource-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-buffersource.html: Added.
* web-platform-tests/beacon/beacon-basic-buffersourceMax-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-buffersourceMax.html: Added.
* web-platform-tests/beacon/beacon-basic-formdata-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-formdata.html: Added.
* web-platform-tests/beacon/beacon-basic-formdataMax-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-formdataMax.html: Added.
* web-platform-tests/beacon/beacon-basic-string-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-string.html: Added.
* web-platform-tests/beacon/beacon-basic-stringMax-expected.txt: Added.
* web-platform-tests/beacon/beacon-basic-stringMax.html: Added.
* web-platform-tests/beacon/beacon-common.js: Added.
(allTests.forEach):
(CreateArrayBufferFromPayload):
(CreateEmptyFormDataPayload):
(CreateFormDataFromPayload):
(initSession.return.add):
(initSession):
(runTests.):
(runTests):
(continueAfterSendingBeacon):
(waitForResults.):
(waitForResults):
(runSendInIframeAndNavigateTests.self.buildId):
(runSendInIframeAndNavigateTests.window.onmessage):
(runSendInIframeAndNavigateTests.self.sendFunc):
(runSendInIframeAndNavigateTests.iframe.onload):
* web-platform-tests/beacon/beacon-cors.window.js: Added.
(false.forEach.self.buildId):
(false.forEach.self.buildBaseUrl):
(false.forEach.self.buildTargetUrl):
(false.forEach):
* web-platform-tests/beacon/beacon-error.window.js: Added.
(test):
* web-platform-tests/beacon/beacon-redirect.window.js: Added.
(308.forEach.self.buildId):
(308.forEach.self.buildTargetUrl):
(308.forEach):
* web-platform-tests/beacon/fetch-keepalive-navigate.iFrame.html: Added.
* web-platform-tests/beacon/headers/header-content-type-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-no-referrer-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-no-referrer-when-downgrade.https-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-origin-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-origin-when-cross-origin-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-same-origin-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-strict-origin-when-cross-origin.https-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-strict-origin.https-expected.txt:
* web-platform-tests/beacon/headers/header-referrer-unsafe-url.https-expected.txt:
* web-platform-tests/beacon/resources/beacon.py: Added.
(build_stash_key):
(main):
(main.wrap_key):
* web-platform-tests/beacon/resources/w3c-import.log:
* web-platform-tests/beacon/w3c-import.log: Added.
* web-platform-tests/url/failure-expected.txt:

Source/WebCore:

Add initial support for navigator.sendBeacon behind an experimental
feature runtime flag. The specification is available at:
- https://w3c.github.io/beacon/

The current implementation supports sending beacons with all types of
payloads except for ReadableStream. Some functionality is incomplete
and will be taken care of in follow-up patches:
- Support for CORS preflight for the cases where it is required. We currently
  return false and do not send the beacon in such cases.
- Better support for redirects.
- Use a more power-friendly network priority for beacon requests.

Tests: http/tests/blink/sendbeacon/*
       http/tests/security/mixedContent/beacon/insecure-beacon-in-iframe.html
       http/wpt/beacon/*
       imported/blink/fast/beacon/*
       imported/w3c/web-platform-tests/beacon/*

* CMakeLists.txt:
* DerivedSources.make:
* Modules/beacon/NavigatorBeacon.cpp: Added.
(WebCore::NavigatorBeacon::sendBeacon):
* Modules/beacon/NavigatorBeacon.h: Added.
* Modules/beacon/NavigatorBeacon.idl: Added.
* WebCore.xcodeproj/project.pbxproj:
* loader/PingLoader.cpp:
(WebCore::PingLoader::sendBeacon):
* loader/PingLoader.h:

Source/WebKit:

Add experimental feature flag for the Beacon API, disabled by default.

* Shared/WebPreferencesDefinitions.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Source/WebKitLegacy/mac:

Add setting to toggle support for the Beacon API (it is disabled by default).

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences beaconAPIEnabled]):
(-[WebPreferences setBeaconAPIEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

Enable the Beacon API at runtime in the context of layout tests since the
feature is currently disabled by default.

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setModernMediaControlsEnabled):
(WTR::TestRunner::setBeaconAPIEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* fast/dom/navigator-detached-no-crash-expected.txt:
Rebaseline test now that sendBeacon is exposed on navigator.

* http/tests/blink/sendbeacon/beacon-cookie-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-cookie.html: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin-redirect-blob-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin-redirect-blob.html: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin-redirect-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin-redirect.html: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin.html: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin.https-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-cross-origin.https.html: Added.
* http/tests/blink/sendbeacon/beacon-detached-no-crash-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-detached-no-crash.html: Added.
* http/tests/blink/sendbeacon/beacon-same-origin-expected.txt: Added.
* http/tests/blink/sendbeacon/beacon-same-origin.html: Added.
* http/tests/blink/sendbeacon/connect-src-beacon-allowed-expected.txt: Added.
* http/tests/blink/sendbeacon/connect-src-beacon-allowed.html: Added.
* http/tests/blink/sendbeacon/resources/check-beacon.php: Added.
* http/tests/blink/sendbeacon/resources/save-beacon.php: Added.
Import more beacon test coverage from Blink.

* http/wpt/beacon/connect-src-beacon-blocked.sub-expected.txt: Added.
* http/wpt/beacon/connect-src-beacon-blocked.sub.html: Added.
Improve test coverage for sendBeacon and CSP.

* http/wpt/beacon/headers/header-content-type-same-origin-expected.txt: Added.
* http/wpt/beacon/headers/header-content-type-same-origin.html: Added.
Improve test coverage for sendBeacon with various types of payload. The test is done
using same origin as we do not currently support sending some of those payloads cross
origin yet.

* imported/blink/fast/beacon/beacon-basic-expected.txt: Added.
* imported/blink/fast/beacon/beacon-basic.html: Added.
Import basic Beacon test coverage from Blink.

* resources/window-postmessage-open-close.html: Added.
* tests-options.json:

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

2 years agoUpdate Bot Watcher's Dashboard for Buildbot 0.9
aakash_jain@apple.com [Wed, 2 Aug 2017 03:22:15 +0000 (03:22 +0000)]
Update Bot Watcher's Dashboard for Buildbot 0.9
https://bugs.webkit.org/show_bug.cgi?id=174777

Reviewed by Daniel Bates.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot): Check if USE_BUILDBOT_VERSION_LESS_THAN_09 is passed.
(Buildbot.prototype._computeBuilderNameToIDMap): Fetch the builder name to ID mapping from buidbot and store
in a dictionary.
(Buildbot.prototype.buildPageURLForIteration): Updated URL as per Buildbot 0.9 format. Buildbot 0.9 currently does not support
builder name in the build url. See <https://github.com/buildbot/buildbot/issues/3465>.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(isMultiCodebaseGotRevisionProperty): Adapting to new data format.
(parseRevisionProperty): Ditto.
(BuildbotIteration.prototype.failureLogURL): Return the URL to build page if precise failure url is not available. For
Buildbot 0.9, build page URL would be appropriate in most cases as per the new UI.
(BuildbotIteration.prototype._parseData): Parsing the data as per new data format. Many variable names and data types
have changed in Buildbot 0.9.
(BuildbotIteration.prototype._adjustBuildDataForBuildbot09): Adjust the Buildbot 0.8 data to new format.
(BuildbotIteration.prototype._updateIfDataAvailable): Update method for Buildbot 0.9 data. We are performing two API calls,
one for build information, another for step information of that build. We need to wait until data from both REST API calls are available.
(BuildbotIteration.prototype._deprecatedUpdateWithData): Renamed from _updateWithData, used for Buildbot 0.8 data.
(BuildbotIteration.prototype.get buildURL): URL to fetch build information from Buildbot. Also fetches got_revision property.
(BuildbotIteration.prototype.get buildStepsURL): URL to fetch the steps information from Buildbot.
(BuildbotIteration.prototype.urlFailedToLoad): Callback method to be used when URL fails to load. Made it a separate function now.
(BuildbotIteration.prototype.update): Modified to support both Buildbot 0.9 and 0.8 data format.
(BuildbotIteration.prototype.actualUpdate): Update method for Buildbot 0.9 data.
(BuildbotIteration.prototype.deprecatedUpdate): Update method for Buildbot 0.8 data.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue.prototype.get baseURL): Updated URL as per Buildbot 0.9 format.
(BuildbotQueue.prototype.get allIterationsURL): Ditto.
(BuildbotQueue.prototype.get overviewURL): Ditto.
(BuildbotQueue.prototype.get buildsURL): URL to fetch builds data in Buildbot 0.9.
(BuildbotQueue.prototype.get buildsInfoURL): Returns the appropriate URL to use to fetch builds information from
Buildbot 0.8 or 0.9.
(BuildbotQueue.prototype.getBuilds): Method compatible with both Buildbot 0.8 and 0.9 to get build information from data
fetched from Buildbot. Also, reversing the Buildbot 0.8 data to make it similar to 0.9 data format.
(BuildbotQueue.prototype.isBuildComplete): Method compatible with both Buildbot 0.8 and 0.9 to check if the build has completed.
(BuildbotQueue.prototype.getIterationID):  Method compatible with both Buildbot 0.8 and 0.9 to get the Iteration ID.
(BuildbotQueue.prototype.update): Supports both Buildbot 0.8 and 0.9. Buildbot 0.9 REST API doesn't have cachedBuilds and currentBuilds.
Therefore we are fetching information for fixed number of build.
Also iterating the loop incrementally since the build data is already reverse sorted.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js:
(BuildbotTestResults.prototype._parseResults): Updated as per Buildbot 0.9 format. Note that we do not
need to worry about 0.8 or 0.9 data format here, since the data is already converted to 0.9 format.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): Pass the USE_BUILDBOT_VERSION_LESS_THAN_09 flag.

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

2 years agoWeb Inspector: simplify WebInspector with WI
drousso@apple.com [Wed, 2 Aug 2017 03:09:57 +0000 (03:09 +0000)]
Web Inspector: simplify WebInspector with WI
https://bugs.webkit.org/show_bug.cgi?id=175058

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* .eslintrc:

* Tools/PrettyPrinting/FormatterDebug.js:
* Tools/PrettyPrinting/index.html:

* UserInterface/Main.html:
* UserInterface/Test.html:

* UserInterface/Base/*.js:
* UserInterface/Controllers/*.js:
* UserInterface/Debug/*.js:
* UserInterface/Models/*.js:
* UserInterface/Protocol/*.js:
* UserInterface/Proxies/*.js:
* UserInterface/Test/*.js:
* UserInterface/Views/*.js:

Tools:

* Scripts/check-inspector-strings:
(extract_ui_strings):
* Scripts/extract-localizable-js-strings:

LayoutTests:

* http/tests/inspector/**/*.html:
* http/tests/websocket/tests/hybi/inspector/**/*.html:
* inspector/**/*.html:

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

2 years agoBmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in...
fpizlo@apple.com [Wed, 2 Aug 2017 01:50:16 +0000 (01:50 +0000)]
Bmalloc and GC should put auxiliaries (butterflies, typed array backing stores) in a gigacage (separate multi-GB VM region)
https://bugs.webkit.org/show_bug.cgi?id=174727

Reviewed by Mark Lam.
Source/bmalloc:

This adds a mechanism for managing multiple isolated heaps in bmalloc. For now, these isoheaps
(isolated heaps) have a very simple relationship with each other and with the rest of bmalloc:

- You have to choose how many isoheaps you will have statically. See numHeaps in HeapKind.h.

- Because numHeaps is static, each isoheap gets fast thread-local allocation. Basically, we have a
  Cache for each heap kind.

- Each isoheap gets its own Heap.

- Each Heap gets a scavenger thread.

- Some things, like Zone/VMHeap/Scavenger, are per-process.

Most of the per-HeapKind functionality is handled by PerHeapKind<>.

This approach is ideal for supporting special per-HeapKind behaviors. For now we have two heaps:
the Primary heap for normal malloc and the Gigacage. The gigacage is a 64GB-aligned 64GB virtual
region that we now use for variable-length random-access allocations. No Primary allocations will
go into the Gigacage.

* CMakeLists.txt:
* bmalloc.xcodeproj/project.pbxproj:
* bmalloc/AllocationKind.h: Added.
* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator):
(bmalloc::Allocator::tryAllocate):
(bmalloc::Allocator::allocateImpl):
(bmalloc::Allocator::reallocate):
(bmalloc::Allocator::refillAllocatorSlowCase):
(bmalloc::Allocator::allocateLarge):
* bmalloc/Allocator.h:
* bmalloc/BExport.h: Added.
* bmalloc/Cache.cpp:
(bmalloc::Cache::scavenge):
(bmalloc::Cache::Cache):
(bmalloc::Cache::tryAllocateSlowCaseNullCache):
(bmalloc::Cache::allocateSlowCaseNullCache):
(bmalloc::Cache::deallocateSlowCaseNullCache):
(bmalloc::Cache::reallocateSlowCaseNullCache):
(bmalloc::Cache::operator new): Deleted.
(bmalloc::Cache::operator delete): Deleted.
* bmalloc/Cache.h:
(bmalloc::Cache::tryAllocate):
(bmalloc::Cache::allocate):
(bmalloc::Cache::deallocate):
(bmalloc::Cache::reallocate):
* bmalloc/Deallocator.cpp:
(bmalloc::Deallocator::Deallocator):
(bmalloc::Deallocator::scavenge):
(bmalloc::Deallocator::processObjectLog):
(bmalloc::Deallocator::deallocateSlowCase):
* bmalloc/Deallocator.h:
* bmalloc/Gigacage.cpp: Added.
(Gigacage::Callback::Callback):
(Gigacage::Callback::function):
(Gigacage::Callbacks::Callbacks):
(Gigacage::ensureGigacage):
(Gigacage::disableGigacage):
(Gigacage::addDisableCallback):
(Gigacage::removeDisableCallback):
* bmalloc/Gigacage.h: Added.
(Gigacage::caged):
(Gigacage::isCaged):
* bmalloc/Heap.cpp:
(bmalloc::Heap::Heap):
(bmalloc::Heap::usingGigacage):
(bmalloc::Heap::concurrentScavenge):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::allocateLarge):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
* bmalloc/Heap.h:
(bmalloc::Heap::mutex):
(bmalloc::Heap::kind const):
(bmalloc::Heap::setScavengerThreadQOSClass): Deleted.
* bmalloc/HeapKind.h: Added.
* bmalloc/ObjectType.cpp:
(bmalloc::objectType):
* bmalloc/ObjectType.h:
* bmalloc/PerHeapKind.h: Added.
(bmalloc::PerHeapKindBase::PerHeapKindBase):
(bmalloc::PerHeapKindBase::size):
(bmalloc::PerHeapKindBase::at):
(bmalloc::PerHeapKindBase::at const):
(bmalloc::PerHeapKindBase::operator[]):
(bmalloc::PerHeapKindBase::operator[] const):
(bmalloc::StaticPerHeapKind::StaticPerHeapKind):
(bmalloc::PerHeapKind::PerHeapKind):
(bmalloc::PerHeapKind::~PerHeapKind):
* bmalloc/PerThread.h:
(bmalloc::PerThread<T>::destructor):
(bmalloc::PerThread<T>::getSlowCase):
(bmalloc::PerThreadStorage<Cache>::get): Deleted.
(bmalloc::PerThreadStorage<Cache>::init): Deleted.
* bmalloc/Scavenger.cpp: Added.
(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::scavenge):
* bmalloc/Scavenger.h: Added.
(bmalloc::Scavenger::setScavengerThreadQOSClass):
(bmalloc::Scavenger::requestedScavengerThreadQOSClass const):
* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::tryAllocateLargeChunk):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::Zone):
* bmalloc/Zone.h:
* bmalloc/bmalloc.h:
(bmalloc::api::tryMalloc):
(bmalloc::api::malloc):
(bmalloc::api::tryMemalign):
(bmalloc::api::memalign):
(bmalloc::api::realloc):
(bmalloc::api::tryLargeMemalignVirtual):
(bmalloc::api::free):
(bmalloc::api::freeLargeVirtual):
(bmalloc::api::scavengeThisThread):
(bmalloc::api::scavenge):
(bmalloc::api::isEnabled):
(bmalloc::api::setScavengerThreadQOSClass):
* bmalloc/mbmalloc.cpp:

Source/JavaScriptCore:

This adopts the Gigacage for the GigacageSubspace, which we use for Auxiliary allocations. Also, in
one place in the code - the FTL codegen for butterfly and typed array access - we "cage" the accesses
themselves. Basically, we do masking to ensure that the pointer points into the gigacage.

This is neutral on JetStream.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3InsertionSet.cpp:
(JSC::B3::InsertionSet::execute):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGClobberize.cpp:
(JSC::DFG::readsOverlap):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixedButterflyAccessUncagingPhase.cpp: Added.
(JSC::DFG::performFixedButterflyAccessUncaging):
* dfg/DFGFixedButterflyAccessUncagingPhase.h: Added.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileGetButterfly):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetButterfly):
(JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucket):
(JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
(JSC::FTL::DFG::LowerDFGToB3::compileToLowerCase):
(JSC::FTL::DFG::LowerDFGToB3::caged):
* heap/GigacageSubspace.cpp: Added.
(JSC::GigacageSubspace::GigacageSubspace):
(JSC::GigacageSubspace::~GigacageSubspace):
(JSC::GigacageSubspace::tryAllocateAlignedMemory):
(JSC::GigacageSubspace::freeAlignedMemory):
(JSC::GigacageSubspace::canTradeBlocksWith):
* heap/GigacageSubspace.h: Added.
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::lastChanceToFinalize):
(JSC::Heap::finalize):
(JSC::Heap::sweepInFinalize):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::shouldDoFullCollection):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::reportWebAssemblyFastMemoriesAllocated): Deleted.
(JSC::Heap::webAssemblyFastMemoriesThisCycleAtThreshold const): Deleted.
(JSC::Heap::sweepLargeAllocations): Deleted.
(JSC::Heap::didAllocateWebAssemblyFastMemories): Deleted.
* heap/Heap.h:
* heap/LargeAllocation.cpp:
(JSC::LargeAllocation::tryCreate):
(JSC::LargeAllocation::destroy):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateWithoutCollecting):
(JSC::MarkedAllocator::tryAllocateBlock):
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::tryCreate):
(JSC::MarkedBlock::Handle::Handle):
(JSC::MarkedBlock::Handle::~Handle):
(JSC::MarkedBlock::Handle::didAddToAllocator):
(JSC::MarkedBlock::Handle::subspace const): Deleted.
* heap/MarkedBlock.h:
(JSC::MarkedBlock::Handle::subspace const):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::~MarkedSpace):
(JSC::MarkedSpace::freeMemory):
(JSC::MarkedSpace::prepareForAllocation):
(JSC::MarkedSpace::addMarkedAllocator):
(JSC::MarkedSpace::findEmptyBlockToSteal): Deleted.
* heap/MarkedSpace.h:
(JSC::MarkedSpace::firstAllocator const):
(JSC::MarkedSpace::allocatorForEmptyAllocation const): Deleted.
* heap/Subspace.cpp:
(JSC::Subspace::Subspace):
(JSC::Subspace::canTradeBlocksWith):
(JSC::Subspace::tryAllocateAlignedMemory):
(JSC::Subspace::freeAlignedMemory):
(JSC::Subspace::prepareForAllocation):
(JSC::Subspace::findEmptyBlockToSteal):
* heap/Subspace.h:
(JSC::Subspace::didCreateFirstAllocator):
* heap/SubspaceInlines.h:
(JSC::Subspace::forEachAllocator):
(JSC::Subspace::forEachMarkedBlock):
(JSC::Subspace::forEachNotEmptyMarkedBlock):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitDoubleLoad):
(JSC::JIT::emitContiguousLoad):
(JSC::JIT::emitArrayStorageLoad):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):
* jsc.cpp:
(fillBufferWithContentsOfFile):
(functionReadFile):
(gigacageDisabled):
(jscmain):
* llint/LowLevelInterpreter64.asm:
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::tryCreate):
* runtime/IndexingHeader.h:
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSArrayBuffer.cpp:
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::finalize):
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
* runtime/JSObject.h:
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/Options.h:
* runtime/ScopedArgumentsTable.h:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
(JSC::VM::gigacageDisabledCallback):
(JSC::VM::gigacageDisabled):
* runtime/VM.h:
(JSC::VM::fireGigacageEnabledIfNecessary):
(JSC::VM::gigacageEnabled):
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::emitCheckAndPreparePointer):
* wasm/WasmCodeBlock.cpp:
(JSC::Wasm::CodeBlock::isSafeToRun):
* wasm/WasmMemory.cpp:
(JSC::Wasm::makeString):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::addressIsInActiveFastMemory):
(JSC::Wasm::Memory::grow):
(JSC::Wasm::Memory::initializePreallocations): Deleted.
(JSC::Wasm::Memory::maxFastMemoryCount): Deleted.
* wasm/WasmMemory.h:
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::create):
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::finishCreation):
* wasm/js/JSWebAssemblyMemory.h:
(JSC::JSWebAssemblyMemory::subspaceFor):

Source/WebCore:

No new tests because no change in behavior.

Needed to teach Metal how to allocate in the Gigacage.

* platform/graphics/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::contents):

Source/WebKit:

The WebProcess should never disable the Gigacage by allocating typed arrays outside the Gigacage. So,
we add a callback that crashes the process.

* WebProcess/WebProcess.cpp:
(WebKit::gigacageDisabled):
(WebKit::m_webSQLiteDatabaseTracker):

Source/WTF:

For the Gigacage project to have minimal impact, we need to have some abstraction that allows code to
avoid having to guard itself with #if's. This adds a Gigacage abstraction that overlays the Gigacage
namespace from bmalloc, which always lets you call things like Gigacage::caged and Gigacage::tryMalloc.

Because of how many places need to possibly allocate in a gigacage, or possibly perform caged accesses,
it's better to hide the question of whether or not it's enabled inside this API.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
* wtf/Gigacage.cpp: Added.
(Gigacage::tryMalloc):
(Gigacage::tryAllocateVirtualPages):
(Gigacage::freeVirtualPages):
(Gigacage::tryAlignedMalloc):
(Gigacage::alignedFree):
(Gigacage::free):
* wtf/Gigacage.h: Added.
(Gigacage::ensureGigacage):
(Gigacage::disableGigacage):
(Gigacage::addDisableCallback):
(Gigacage::removeDisableCallback):
(Gigacage::caged):
(Gigacage::isCaged):
(Gigacage::tryAlignedMalloc):
(Gigacage::alignedFree):
(Gigacage::free):

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

2 years ago[WinCairo] Implement Font::platformBoundsForGlyph
commit-queue@webkit.org [Wed, 2 Aug 2017 01:08:48 +0000 (01:08 +0000)]
[WinCairo] Implement Font::platformBoundsForGlyph
https://bugs.webkit.org/show_bug.cgi?id=174813

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-08-01
Reviewed by Alex Christensen.

Test: fast/text/emphasis.html

* platform/graphics/win/SimpleFontDataCairoWin.cpp:
(WebCore::Font::platformBoundsForGlyph): Implemented by copying
the code from Font::boundsForGDIGlyph().

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

2 years agoAdded expectations files for El Capitan.
jlewis3@apple.com [Wed, 2 Aug 2017 00:36:05 +0000 (00:36 +0000)]
Added expectations files for El Capitan.
https://bugs.webkit.org/show_bug.cgi?id=175061

Unreviewed test gardening.

* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-basic.any.worker-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-no-preflight.any.worker-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any-expected.txt: Added.
* platform/mac-elcapitan/imported/w3c/web-platform-tests/fetch/api/cors/cors-origin.any.worker-expected.txt: Added.

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

2 years agoWeb Automation: add event to notify service when a page's main frame window object...
bburg@apple.com [Tue, 1 Aug 2017 23:31:47 +0000 (23:31 +0000)]
Web Automation: add event to notify service when a page's main frame window object has cleared
https://bugs.webkit.org/show_bug.cgi?id=174987
<rdar://problem/36602634>

Reviewed by Carlos Garcia Campos.

* UIProcess/Automation/Automation.json: Add new event.

* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::navigationOccurredForFrame):
(WebKit::WebAutomationSession::willClosePage):
When a WebPage navigates or closes, send the browsingContextCleared event.
Any element handles for elements in the browsing context are no longer valid.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
Add a new hook into the active automation session so it is notified when a page closes.

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

2 years agoWeb Inspector: create Recording tab for displaying recordings
drousso@apple.com [Tue, 1 Aug 2017 23:00:46 +0000 (23:00 +0000)]
Web Inspector: create Recording tab for displaying recordings
https://bugs.webkit.org/show_bug.cgi?id=174484

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
* UserInterface/Test.html:

* UserInterface/Controllers/CanvasManager.js:
(WebInspector.CanvasManager.prototype.recordingFinished):
* UserInterface/Models/Canvas.js:
(WebInspector.Canvas.prototype.toggleRecording):

* UserInterface/Models/Recording.js:
(WebInspector.Recording):
(WebInspector.Recording.synthesizeError):
(WebInspector.Recording.prototype.get actions):
(WebInspector.Recording.prototype.get source):
(WebInspector.Recording.prototype.set source):
(WebInspector.Recording.prototype.swizzle):

* UserInterface/Models/RecordingAction.js:
(WebInspector.RecordingAction):
(WebInspector.RecordingAction.isFunctionForType):
(WebInspector.RecordingAction.get name):
(WebInspector.RecordingAction.get parameters):
(WebInspector.RecordingAction.prototype.get valid):
(WebInspector.RecordingAction.prototype.set valid):
(WebInspector.RecordingAction.get isFunction):
(WebInspector.RecordingAction.get isGetter):
(WebInspector.RecordingAction.get isVisual):
(WebInspector.RecordingAction.get stateModifiers):
(WebInspector.RecordingAction.prototype.swizzle):
(WebInspector.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex):

* UserInterface/Models/RecordingInitialStateAction.js: Added.
(WebInspector.RecordingInitialStateAction):

* UserInterface/Views/RecordingTabContentView.js: Added.
(WebInspector.RecordingTabContentView):
(WebInspector.RecordingTabContentView.tabInfo):
(WebInspector.RecordingTabContentView.prototype.get type):
(WebInspector.RecordingTabContentView.prototype.canShowRepresentedObject):
(WebInspector.RecordingTabContentView.prototype.showRepresentedObject):
(WebInspector.RecordingTabContentView.prototype.restoreStateFromCookie):
(WebInspector.RecordingTabContentView.prototype.saveStateToCookie):
(WebInspector.RecordingTabContentView.prototype.closed):
(WebInspector.RecordingTabContentView.prototype._updateActionIndex):
(WebInspector.RecordingTabContentView.prototype._scrubberNavigationItemValueChanged):
(WebInspector.RecordingTabContentView.prototype._navigationSidebarImport):
(WebInspector.RecordingTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):

* UserInterface/Views/RecordingContentView.js: Added.
(WebInspector.RecordingContentView):
(WebInspector.RecordingContentView.prototype.get navigationItems):
(WebInspector.RecordingContentView.prototype.updateActionIndex):
(WebInspector.RecordingContentView.prototype.shown):
(WebInspector.RecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.RecordingContentView.prototype._generateContentCanvas2D):
(WebInspector.RecordingContentView.prototype._applyAction):
(WebInspector.RecordingContentView.prototype._updateImageGrid):
(WebInspector.RecordingContentView.prototype._showGridButtonClicked):
* UserInterface/Views/RecordingContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/CanvasContentView.css.
(.content-view:not(.tab).recording):
(.content-view:not(.tab).recording > .preview-container):
(.content-view:not(.tab).recording canvas):

* UserInterface/Views/RecordingNavigationSidebarPanel.js: Added.
(WebInspector.RecordingNavigationSidebarPanel):
(WebInspector.RecordingNavigationSidebarPanel.disallowInstanceForClass):
(WebInspector.RecordingNavigationSidebarPanel.prototype.set recording):
(WebInspector.RecordingNavigationSidebarPanel.prototype.updateActionIndex):
(WebInspector.RecordingNavigationSidebarPanel.prototype.initialLayout):
(WebInspector.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked):
(WebInspector.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked):
* UserInterface/Views/RecordingNavigationSidebarPanel.css: Added.
(.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.recording > .content > .tree-outline):
(.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded):
(.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
(body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
(body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before):
(.sidebar > .panel.navigation.recording > .content .action > .icon):
(.sidebar > .panel.navigation.recording > .content .action.function > .icon):
(.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon):
(.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon):
(.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon):
(.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon):
(.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon):
(.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon):
(.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon):
(.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon):
(body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon):
(body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon):
(.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)):
(.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled):
(.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,):

* UserInterface/Views/RecordingStateDetailsSidebarPanel.js: Added.
(WebInspector.RecordingStateDetailsSidebarPanel):
(WebInspector.RecordingStateDetailsSidebarPanel.disallowInstanceForClass):
(WebInspector.RecordingStateDetailsSidebarPanel.prototype.inspect):
(WebInspector.RecordingStateDetailsSidebarPanel.prototype.set recording):
(WebInspector.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex):
(WebInspector.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
* UserInterface/Views/RecordingStateDetailsSidebarPanel.css: Added.
(.sidebar > .panel.details.recording-state > .content > .data-grid):
(.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified):
(.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard):
(.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable):

* UserInterface/Views/RecordingActionTreeElement.js: Added.
(WebInspector.RecordingActionTreeElement):
(WebInspector.RecordingActionTreeElement._generateDOM):
(WebInspector.RecordingActionTreeElement.prototype.get index):
(WebInspector.RecordingActionTreeElement.get filterableData):
(WebInspector.RecordingActionTreeElement.prototype.get filterableData):
(WebInspector.RecordingActionTreeElement.prototype.onattach):
(WebInspector.RecordingActionTreeElement.prototype.populateContextMenu):

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.instanceForClass):

* UserInterface/Base/FileUtilites.js: Added.
(WebInspector.saveDataToFile): Moved from UserInterface/Base/Main.js
(WebInspector.loadDataFromFile):

* UserInterface/Views/ButtonNavigationItem.js:
(WebInspector.ButtonNavigationItem.prototype._mouseClicked):
Send the native event as part of the data.

* UserInterface/Views/CanvasContentView.js:
(WebInspector.CanvasContentView):
(WebInspector.CanvasContentView.prototype.get navigationItems):
(WebInspector.CanvasContentView.prototype.initialLayout):
(WebInspector.CanvasContentView.prototype.closed):
(WebInspector.CanvasContentView.prototype._toggleRecording):
(WebInspector.CanvasContentView.prototype._recordingFinished):
* UserInterface/Views/CanvasContentView.css:
(.content-view.canvas):

* UserInterface/Views/CanvasDetailsSidebarPanel.js:
(WebInspector.CanvasDetailsSidebarPanel.prototype.inspect):

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.createFromRepresentedObject):
(WebInspector.ContentView.isViewable):
* UserInterface/Views/ScrubberNavigationItem.js: Added.
(WebInspector.ScrubberNavigationItem):
(WebInspector.ScrubberNavigationItem.prototype.get value):
(WebInspector.ScrubberNavigationItem.prototype.set value):
(WebInspector.ScrubberNavigationItem.prototype.get min):
(WebInspector.ScrubberNavigationItem.prototype.set min):
(WebInspector.ScrubberNavigationItem.prototype.get max):
(WebInspector.ScrubberNavigationItem.prototype.set max):
(WebInspector.ScrubberNavigationItem.prototype.set disabled):
(WebInspector.ScrubberNavigationItem.prototype.get additionalClassNames):
(WebInspector.ScrubberNavigationItem.prototype._sliderChanged):
* UserInterface/Views/ScrubberNavigationItem.css: Added.
(.navigation-bar .item.scrubber):
(.navigation-bar .item.scrubber > input):
(.navigation-bar .item.scrubber > input[disabled]):
Allow the flexible space to be replaced with a navigation item at construction.

* UserInterface/Views/DataGridNode.js:
(WebInspector.DataGridNode):
(WebInspector.DataGridNode.prototype.get element):
Allow a list of CSS classes to be added to the node's element.

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
(WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView):
(WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
Move experimental settings to their own panel.

* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView.prototype.get navigationSidebarPanel):
Save the NavigationSidebarPanel after it's constructed.

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

* UserInterface/Images/Recording.svg: Added.
* UserInterface/Images/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordRenderingFrame.svg.
* UserInterface/Images/gtk/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/TimelineRecordRenderingFrame.svg.
* UserInterface/Views/TimelineIcons.css:
(.rendering-frame-record .icon):

* UserInterface/Views/DOMTreeOutline.css:
(@keyframes node-state-changed):
* UserInterface/Views/Main.css:
(:matches(img, canvas).show-grid):
(img.show-grid): Deleted.
* UserInterface/Views/NavigationBar.css:
(.navigation-bar):
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline):
* UserInterface/Views/TimelineTabContentView.css:
(.timeline.tab.content-view .navigation-bar > .item.radio):
* UserInterface/Views/TimelineView.css:
(.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline):
* UserInterface/Views/Variables.css:
(:root):
Create CSS variables for the DOM modification flash color and the color striping.

LayoutTests:

* inspector/unit-tests/number-utilities-expected.txt:
* inspector/unit-tests/number-utilities.html:

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

2 years ago[PAL][Win] Copy forwarding headers
commit-queue@webkit.org [Tue, 1 Aug 2017 22:33:18 +0000 (22:33 +0000)]
[PAL][Win] Copy forwarding headers
https://bugs.webkit.org/show_bug.cgi?id=175012

Patch by Yoshiaki Jitsukawa <jitsu@rd.scei.sony.co.jp> on 2017-08-01
Reviewed by Myles C. Maxfield.

* pal/PlatformAppleWin.cmake: Added.
* pal/PlatformWin.cmake:
* pal/PlatformWinCairo.cmake: Added.

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

2 years agoREGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank...
zalan@apple.com [Tue, 1 Aug 2017 21:42:28 +0000 (21:42 +0000)]
REGRESSION (r217197): New Yorker website hangs for a long time on load, lots of blank tiles
https://bugs.webkit.org/show_bug.cgi?id=175009
<rdar://problem/33505791>

Reviewed by Simon Fraser.

Source/WebCore:

This patch ensures that we report the desktop, non-frame-flattened frame size for media queries in subframes.
Some websites don't expect the iframes to be expanded to the size of the content and when the media query
callback mutates the content (triggering frame resize), they might end up getting into a never ending layout.

Test: fast/frames/flattening/media-query-growing-content.html

* css/MediaQueryEvaluator.cpp:
(WebCore::orientationEvaluate):
(WebCore::aspectRatioEvaluate):
(WebCore::heightEvaluate):
(WebCore::widthEvaluate):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::layoutSizeForMediaQuery const):
(WebCore::FrameView::evaluateMediaQueryList):
* page/FrameView.h:

LayoutTests:

* fast/frames/flattening/media-query-growing-content-expected.txt: Added.
* fast/frames/flattening/media-query-growing-content.html: Added.
* fast/frames/flattening/resources/media-query-min-height-with-flattening.html: Added.

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

2 years agoLayout tests with 'https' suffix should be run over HTTPS
commit-queue@webkit.org [Tue, 1 Aug 2017 21:02:37 +0000 (21:02 +0000)]
Layout tests with 'https' suffix should be run over HTTPS
https://bugs.webkit.org/show_bug.cgi?id=174992

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

Tools:

Updating the test-name <-> uri conversion routines to use https when test names contain ".https." in them.
This covers WPT tests, WPT WebKit tests and HTTP layout tests.
Covered by corresponding unit tests.

* Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
(run_server):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(base_http_url):
(base_https_url):
(base_url): Deleted.
* Scripts/webkitpy/port/base.py:
(Port.to.web_platform_test_server_base_http_url):
(Port.to):
(Port.to.web_platform_test_server_base_https_url):
(Port.to.web_platform_test_server_base_url): Deleted.
* Scripts/webkitpy/port/driver.py:
(Driver.__init__):
(Driver.wpt_test_path_to_uri):
(Driver):
(Driver.http_test_path_to_uri):
(Driver.test_to_uri):
(Driver.uri_to_test):
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test_test_to_uri):
(DriverTest.test_uri_to_test):

LayoutTests:

Updating test to allow display insecure content as otherwise the test would not complete now that it is run over HTTPS.
Adding WK1 expected files as the warning message is not printed.

* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt:
* http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html:
* platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added.

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

2 years agoMarked imported/w3c/IndexedDB-private-browsing/idbfactory_open.html as flaky.
jlewis3@apple.com [Tue, 1 Aug 2017 20:47:21 +0000 (20:47 +0000)]
Marked imported/w3c/IndexedDB-private-browsing/idbfactory_open.html as flaky.
<rdar://problem/33555052>

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:

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

2 years agoAdd tests to detect mistakes in backward compatibility when the structured clone...
jiewen_tan@apple.com [Tue, 1 Aug 2017 20:00:49 +0000 (20:00 +0000)]
Add tests to detect mistakes in backward compatibility when the structured clone algorithm is changed in the future
https://bugs.webkit.org/show_bug.cgi?id=173998

Reviewed by Darin Adler.

Source/WebCore:

* bindings/js/SerializedScriptValue.cpp:
Add a comment.

Tools:

Since the structured clone algorithm is used for data stored in persistent databases, we need tests to help us
detect mistakes in backward compatibility in the future when we change it.

The way it works is to read from a pre-baked database and see if all the values are matched with the expectations.
Surprisedly, some of structured clonable objects cannot be stored into the indexedDB. Those are FileList,
ObjectReference, MessagePortReference, ArrayBufferView, ArrayBufferTransfer, NonMapProperties, NonSetProperties,
SharedArrayBuffer, WasmModule, DOMPointReadOnly, DOMPoint, DOMRectReadOnly, DOMRect, DOMMatrixReadOnly, DOMMatrix,
DOMQuad and Error. CryptoKey objects are not included as well as they need new API for encrypting/decrypting the
internal key data slot.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibility.mm: Added.
(-[IndexedDBStructuredCloneBackwardCompatibilityMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):
Here is the API test that moves the pre-baked database to the location where TestWebKitAPI can read from.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibility.sqlite3: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibility.sqlite3-shm: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibility.sqlite3-wal: Added.
These are the pre-baked databases.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibilityRead.html: Added.
This is the actual test that do all the reads and comparisons.
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBStructuredCloneBackwardCompatibilityWrite.html: Added.
This is the page that bakes the database. It never runs automatically. It is for someone who needs to teach
IndexedDB new stuffs. Then it can be used to bake the database again.

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

2 years ago[WebCrypto] Add PKCS#8 import test that covers `parameters` and `publicKey` values...
zandobersek@gmail.com [Tue, 1 Aug 2017 19:18:11 +0000 (19:18 +0000)]
[WebCrypto] Add PKCS#8 import test that covers `parameters` and `publicKey` values in ECPrivateKey
https://bugs.webkit.org/show_bug.cgi?id=174420

Reviewed by Darin Adler.

Add test cases that cover testing of the optional ECParameters and publicKey bit string
attributes in the ECPrivateKey ASN.1 structure that's embedded in the PKCS#8 PrivateKeyInfo
ASN.1 structure.

Per the spec, if the ECParameters attribute in the ECPrivateKey structure is present, the
relevant curve object identifier should match the same curve identifier that's used in the
ECParameters attribute of the AlgorithmIdentifier structure in PrivateKeyInfo. Both of these
should of course match the curve that was specified for the import operation.

For the publicKey bit string, the data contained there should be properly formatted for
the specific curve, meaning it should be of proper curve-specific size and that it should
use 0x04 as the leading byte, signalling an uncompressed EC point. On top of that the public
key should have a valid value that positions it on the specified elliptic curve.

These cases are covered for PKCS#8 key imports for P-256 and P-384 curves and for both ECDH
and ECDSA algorithms in the newly-introduced tests. They are skipped on all platforms since
no implementation in WebKit can pass them yet.

* TestExpectations:
* crypto/subtle/ecdh-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey-expected.txt: Added.
* crypto/subtle/ecdh-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey.html: Added.
* crypto/subtle/ecdh-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey-expected.txt: Added.
* crypto/subtle/ecdh-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey.html: Added.
* crypto/subtle/ecdsa-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey-expected.txt: Added.
* crypto/subtle/ecdsa-import-pkcs8-key-p256-validate-ecprivatekey-parameters-publickey.html: Added.
* crypto/subtle/ecdsa-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey-expected.txt: Added.
* crypto/subtle/ecdsa-import-pkcs8-key-p384-validate-ecprivatekey-parameters-publickey.html: Added.

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

2 years agoAPI test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
beidson@apple.com [Tue, 1 Aug 2017 19:03:59 +0000 (19:03 +0000)]
API test URLSchemeHandler.Exceptions is Exiting out early on macOS Debug..
https://bugs.webkit.org/show_bug.cgi?id=175030

Reviewed by Andy Estes.

Source/WebKit:

* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Release the API wrapped on the next
  spin of the runloop.

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm:
(-[TaskSchemeHandler webView:startURLSchemeTask:]): Stop calling an invalid NSError constructor.

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

2 years agoUnreviewed, rolling out r220089.
jlewis3@apple.com [Tue, 1 Aug 2017 18:50:45 +0000 (18:50 +0000)]
Unreviewed, rolling out r220089.

This caused multiple crashes on macOS Debug testers.

Reverted changeset:

"Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
QualifiedName"
https://bugs.webkit.org/show_bug.cgi?id=175010
http://trac.webkit.org/changeset/220089

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

2 years agoPart 2 of: Rename DatabaseProcess to StorageProcess.
beidson@apple.com [Tue, 1 Aug 2017 18:18:03 +0000 (18:18 +0000)]
Part 2 of: Rename DatabaseProcess to StorageProcess.
https://bugs.webkit.org/show_bug.cgi?id=174880

Reviewed by Andy Estes.

Source/WebKit:

Rename some more variables, classes, etc. to reflect the change.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles):

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::grantSandboxExtensionsToStorageProcessForBlobs):
(WebKit::NetworkProcess::didGrantSandboxExtensionsToStorageProcessForBlobs):
(WebKit::NetworkProcess::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
(WebKit::NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:

* Shared/ProcessExecutablePath.h:
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfStorageProcess):
(WebKit::executablePathOfDatabaseProcess): Deleted.
* Shared/wpe/ProcessExecutablePathWPE.cpp:
(WebKit::executablePathOfStorageProcess):
(WebKit::executablePathOfDatabaseProcess): Deleted.

* StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp:
(WebKit::WebIDBConnectionToClient::putOrAdd):

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::postStorageTask):
(WebKit::StorageProcess::performNextStorageTask):
(WebKit::StorageProcess::createStorageToWebProcessConnection):
(WebKit::StorageProcess::fetchWebsiteData):
(WebKit::StorageProcess::postDatabaseTask): Deleted.
(WebKit::StorageProcess::performNextDatabaseTask): Deleted.
(WebKit::StorageProcess::createDatabaseToWebProcessConnection): Deleted.
* StorageProcess/StorageProcess.h:
* StorageProcess/StorageProcess.messages.in:
* StorageProcess/mac/StorageProcessMac.mm:
(WebKit::StorageProcess::initializeProcessName):

* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseProcessIdentifier):

* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _terminateStorageProcess]):
(-[WKProcessPool _storageProcessIdentifier]):
(-[WKProcessPool _terminateDatabaseProcess]): Deleted.
(-[WKProcessPool _databaseProcessIdentifier]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

* UIProcess/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::getLaunchOptions):

* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::serviceName):
* UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp:
(WebKit::ProcessLauncher::launchProcess):

* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToStorageProcessForBlobs):
(WebKit::NetworkProcessProxy::grantSandboxExtensionsToDatabaseProcessForBlobs): Deleted.
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:

* UIProcess/Storage/StorageProcessProxy.cpp:
(WebKit::StorageProcessProxy::getLaunchOptions):
(WebKit::StorageProcessProxy::getStorageProcessConnection):
(WebKit::StorageProcessProxy::didClose):
(WebKit::StorageProcessProxy::didCreateStorageToWebProcessConnection):
(WebKit::StorageProcessProxy::didFinishLaunching):
(WebKit::StorageProcessProxy::getDatabaseProcessConnection): Deleted.
(WebKit::StorageProcessProxy::didCreateDatabaseToWebProcessConnection): Deleted.
* UIProcess/Storage/StorageProcessProxy.h:
* UIProcess/Storage/StorageProcessProxy.messages.in:

* UIProcess/WebContextClient.cpp:
(WebKit::WebContextClient::storageProcessDidCrash):
(WebKit::WebContextClient::databaseProcessDidCrash): Deleted.
* UIProcess/WebContextClient.h:

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::getStorageProcessConnection):
(WebKit::WebProcessPool::storageProcessCrashed):
(WebKit::WebProcessPool::pageAddedToProcess):
(WebKit::WebProcessPool::storageProcessIdentifier):
(WebKit::WebProcessPool::terminateStorageProcess):
(WebKit::WebProcessPool::ensureDatabaseProcessAndWebsiteDataStore): Deleted.
(WebKit::WebProcessPool::getDatabaseProcessConnection): Deleted.
(WebKit::WebProcessPool::databaseProcessCrashed): Deleted.
(WebKit::WebProcessPool::databaseProcessIdentifier): Deleted.
(WebKit::WebProcessPool::terminateDatabaseProcess): Deleted.
* UIProcess/WebProcessPool.h:
(WebKit::WebProcessPool::sendToStorageProcessRelaunchingIfNecessary):
(WebKit::WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary): Deleted.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getStorageProcessConnection):
(WebKit::WebProcessProxy::getDatabaseProcessConnection): Deleted.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::storageProcessParameters):
(WebKit::WebsiteDataStore::databaseProcessParameters): Deleted.
* UIProcess/WebsiteData/WebsiteDataStore.h:

* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::messageSenderConnection):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:

* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):

* WebProcess/Storage/WebToStorageProcessConnection.cpp:
(WebKit::WebToStorageProcessConnection::WebToStorageProcessConnection):
(WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection):
(WebKit::WebToStorageProcessConnection::didReceiveMessage):
(WebKit::WebToStorageProcessConnection::didClose):
(WebKit::WebToStorageProcessConnection::didReceiveInvalidMessage):
(WebKit::WebToStorageProcessConnection::idbConnectionToServerForSession):
(WebKit::WebToDatabaseProcessConnection::WebToDatabaseProcessConnection): Deleted.
(WebKit::WebToDatabaseProcessConnection::~WebToDatabaseProcessConnection): Deleted.
(WebKit::WebToDatabaseProcessConnection::didReceiveMessage): Deleted.
(WebKit::WebToDatabaseProcessConnection::didClose): Deleted.
(WebKit::WebToDatabaseProcessConnection::didReceiveInvalidMessage): Deleted.
(WebKit::WebToDatabaseProcessConnection::idbConnectionToServerForSession): Deleted.
* WebProcess/Storage/WebToStorageProcessConnection.h:
(WebKit::WebToStorageProcessConnection::create):
(WebKit::WebToDatabaseProcessConnection::create): Deleted.
(WebKit::WebToDatabaseProcessConnection::connection): Deleted.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::webToStorageProcessConnectionClosed):
(WebKit::WebProcess::webToStorageProcessConnection):
(WebKit::WebProcess::ensureWebToStorageProcessConnection):
(WebKit::WebProcess::webToDatabaseProcessConnectionClosed): Deleted.
(WebKit::WebProcess::webToDatabaseProcessConnection): Deleted.
(WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Deleted.
* WebProcess/WebProcess.h:

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/IDBDeleteRecovery.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IDBIndexUpgradeToV2.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBDatabaseProcessKill.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/ResourceLoadStatistics.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:
* TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:

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

2 years ago[GTK] Layout test fast/forms/content-with-margins-inside-button.html is failing
commit-queue@webkit.org [Tue, 1 Aug 2017 16:42:18 +0000 (16:42 +0000)]
[GTK] Layout test fast/forms/content-with-margins-inside-button.html is failing
https://bugs.webkit.org/show_bug.cgi?id=174610

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Darin Adler.

Use an explicit text color for content-with-margins-inside-button.html.

This makes the test pass in the GTK port.

I also changed the formatting of the CSS to make it more readable.

* fast/forms/content-with-margins-inside-button-expected.html:
* fast/forms/content-with-margins-inside-button.html:
* platform/gtk/TestExpectations:

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

2 years agoRemove obsolete failure expectations for wpt XHR tests.
commit-queue@webkit.org [Tue, 1 Aug 2017 16:24:20 +0000 (16:24 +0000)]
Remove obsolete failure expectations for wpt XHR tests.
https://bugs.webkit.org/show_bug.cgi?id=175024

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Darin Adler.

* TestExpectations:
* platform/gtk/TestExpectations:

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

2 years agoRemove obsolete failure expectations for style-01.html.
commit-queue@webkit.org [Tue, 1 Aug 2017 16:22:25 +0000 (16:22 +0000)]
Remove obsolete failure expectations for style-01.html.
https://bugs.webkit.org/show_bug.cgi?id=175026

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Darin Adler.

* TestExpectations:

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

2 years agoRemove obsolete failure expectation for Document-characterSet-normalization.html.
commit-queue@webkit.org [Tue, 1 Aug 2017 16:20:34 +0000 (16:20 +0000)]
Remove obsolete failure expectation for Document-characterSet-normalization.html.
https://bugs.webkit.org/show_bug.cgi?id=175022

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Sam Weinig.

The expectations were updated in r204605.

* platform/gtk/TestExpectations:

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

2 years agoRemove obsolete failure expectation for regional-indicators.html.
commit-queue@webkit.org [Tue, 1 Aug 2017 16:18:43 +0000 (16:18 +0000)]
Remove obsolete failure expectation for regional-indicators.html.
https://bugs.webkit.org/show_bug.cgi?id=175021

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Sam Weinig.

* platform/gtk/TestExpectations:

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

2 years agoREGRESSION(r205909): Layout test editing/pasteboard/image-in-iframe.html is failing
commit-queue@webkit.org [Tue, 1 Aug 2017 16:16:26 +0000 (16:16 +0000)]
REGRESSION(r205909): Layout test editing/pasteboard/image-in-iframe.html is failing
https://bugs.webkit.org/show_bug.cgi?id=163185

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Sam Weinig.

Remove obsolete failure expectation for image-in-iframe.html.

The bug was fixed in r212428. (The test was also broken by both landings for
bug 170956, until r216174 fixed it again.)

* platform/gtk/TestExpectations:

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

2 years agoREGRESSION (r220052): http/tests/media/video-play-stall.html times out
darin@apple.com [Tue, 1 Aug 2017 16:13:55 +0000 (16:13 +0000)]
REGRESSION (r220052): http/tests/media/video-play-stall.html times out
https://bugs.webkit.org/show_bug.cgi?id=174988

Reviewed by Sam Weinig.

* TestExpectations: Stop skipping this test.

* http/tests/media/video-play-stall.html: Use a 0-duration timeout to sidestep an
issue where the test runner never thinks the test is done because of the stalled
media loading, and times out. The behaviors here aren't great, but there is no
reason to think that this confused state has any effect on web browsing; just on
our test runners in a test that intentionally has a still loading video in it.

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

2 years agoImplement __builtin_clzl for MSVC
commit-queue@webkit.org [Tue, 1 Aug 2017 15:56:20 +0000 (15:56 +0000)]
Implement __builtin_clzl for MSVC
https://bugs.webkit.org/show_bug.cgi?id=174232

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-08-01
Reviewed by Geoffrey Garen.

* bmalloc/Algorithm.h:
(bmalloc::clzl):
(bmalloc::clzl<1>):
(bmalloc::__builtin_clzl):
* bmalloc/BPlatform.h:

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

2 years ago[JSC] Remove unnecessary print from stress\promise-finally.js test
gskachkov@gmail.com [Tue, 1 Aug 2017 14:32:36 +0000 (14:32 +0000)]
[JSC] Remove unnecessary print from stress\promise-finally.js test
https://bugs.webkit.org/show_bug.cgi?id=175015

Reviewed by Yusuke Suzuki.

* stress/promise-finally.js:
(p.finally):
(then):

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

2 years ago[WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement
commit-queue@webkit.org [Tue, 1 Aug 2017 14:23:29 +0000 (14:23 +0000)]
[WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement
https://bugs.webkit.org/show_bug.cgi?id=175006

Patch by Sam Weinig <sam@webkit.org> on 2017-08-01
Reviewed by Chris Dumez.

Use the standard way of augmenting GC, visitAdditionalChildren, rather
than using a private name to create ownership.

* bindings/js/JSHTMLTemplateElementCustom.cpp:
(WebCore::JSHTMLTemplateElement::visitAdditionalChildren):
(WebCore::JSHTMLTemplateElement::content const): Deleted.
* html/HTMLTemplateElement.idl:

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

2 years agoPart 1 of: Rename DatabaseProcess to StorageProcess.
beidson@apple.com [Tue, 1 Aug 2017 14:19:31 +0000 (14:19 +0000)]
Part 1 of: Rename DatabaseProcess to StorageProcess.
https://bugs.webkit.org/show_bug.cgi?id=174879

Reviewed by Andy Estes.

.:

* Source/cmake/OptionsWPE.cmake:
* Source/cmake/gtksymbols.filter:

Source/WebKit:

This patch is all about renaming source files and renaming the process itself (touching build system files, etc etc).

Some renaming in actual code did result (Some class/struct names, method names, etc)

Part 2 (174880) will go through and update all references in code itself from "Database" to "Storage"

* CMakeLists.txt:
* DerivedSources.make:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWPE.cmake:
* WebKit.xcodeproj/project.pbxproj:

* Configurations/StorageService.xcconfig: Renamed from Source/WebKit/Configurations/DatabaseService.xcconfig.
* StorageProcess/EntryPoint/mac/XPCService/StorageService/Info.plist: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist.
* StorageProcess/mac/com.apple.WebKit.Databases.sb.in: Renamed from Source/WebKit/DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in.

* Shared/Storage/StorageProcessCreationParameters.cpp: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.cpp.
* Shared/Storage/StorageProcessCreationParameters.h: Renamed from Source/WebKit/Shared/Databases/DatabaseProcessCreationParameters.h.

* StorageProcess/EntryPoint/mac/XPCService/StorageServiceEntryPoint.mm: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm.
* StorageProcess/EntryPoint/unix/StorageProcessMain.cpp: Renamed from Source/WebKit/DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp.

* StorageProcess/IndexedDB/WebIDBConnectionToClient.cpp: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.cpp.
* StorageProcess/IndexedDB/WebIDBConnectionToClient.h: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.h.
* StorageProcess/IndexedDB/WebIDBConnectionToClient.messages.in: Renamed from Source/WebKit/DatabaseProcess/IndexedDB/WebIDBConnectionToClient.messages.in.

* StorageProcess/StorageProcess.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.cpp.
* StorageProcess/StorageProcess.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.h.
* StorageProcess/StorageProcess.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseProcess.messages.in.

* StorageProcess/StorageToWebProcessConnection.cpp: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.cpp.
* StorageProcess/StorageToWebProcessConnection.h: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.h.
* StorageProcess/StorageToWebProcessConnection.messages.in: Renamed from Source/WebKit/DatabaseProcess/DatabaseToWebProcessConnection.messages.in.

* StorageProcess/gtk/StorageProcessMainGtk.cpp: Renamed from Source/WebKit/DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp.
* StorageProcess/ios/StorageProcessIOS.mm: Renamed from Source/WebKit/DatabaseProcess/ios/DatabaseProcessIOS.mm.
* StorageProcess/mac/StorageProcessMac.mm: Renamed from Source/WebKit/DatabaseProcess/mac/DatabaseProcessMac.mm.
* StorageProcess/unix/StorageProcessMainUnix.h: Renamed from Source/WebKit/DatabaseProcess/unix/DatabaseProcessMainUnix.h.
* UIProcess/Network/NetworkProcessProxy.cpp:

* UIProcess/Storage/StorageProcessProxy.cpp: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.cpp.
* UIProcess/Storage/StorageProcessProxy.h: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.h.
* UIProcess/Storage/StorageProcessProxy.messages.in: Renamed from Source/WebKit/UIProcess/Databases/DatabaseProcessProxy.messages.in.

* UIProcess/WebContextSupplement.h:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
* UIProcess/WebsiteData/WebsiteDataStore.h:
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
* WebProcess/Databases/WebDatabaseProvider.cpp:

* WebProcess/Storage/WebToStorageProcessConnection.cpp: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.cpp.
* WebProcess/Storage/WebToStorageProcessConnection.h: Renamed from Source/WebKit/WebProcess/Databases/WebToDatabaseProcessConnection.h.

* WebProcess/WebProcess.cpp:

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

2 years agoCorrect the line numbers in GTK's scheme-about.any-expected.txt.
commit-queue@webkit.org [Tue, 1 Aug 2017 13:13:43 +0000 (13:13 +0000)]
Correct the line numbers in GTK's scheme-about.any-expected.txt.
https://bugs.webkit.org/show_bug.cgi?id=175017

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-08-01
Reviewed by Sam Weinig.

The code fix landed in r220050.

* platform/gtk/imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:

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

2 years ago[GCrypt] Gather crypto constants in a single location
zandobersek@gmail.com [Tue, 1 Aug 2017 11:49:51 +0000 (11:49 +0000)]
[GCrypt] Gather crypto constants in a single location
https://bugs.webkit.org/show_bug.cgi?id=174091

Reviewed by Jiewen Tan.

Gather common constants used across the libgcrypt-specific Web Crypto
implementations in a single place -- in the GCryptUtilities.h header,
inside the CryptoConstants namespace. The various ASN.1 object identifiers
and other helper values are placed inside, in the std::array<uint8_t, N>
container.

Additionally, CryptoConstants::matches() helper function is provided. It
compares the provided data-and-size pair with the given std::array
container and returns true if the std::memcmp() call returns 0.

Changes in CryptoKeyEC and CryptoKeyRSA consist mostly of switching to the
use of CryptoConstants::matches() and the CryptoConstants data arrays, as
well as some whitespace cleanup.

Additionallity in CryptoKeyEC, the helper functions covering various curve
attributes are reordered, renamed and reorganized for simplicity.

No new tests -- no changes in behavior.

* crypto/gcrypt/CryptoKeyECGCrypt.cpp:
(WebCore::curveIdentifier):
(WebCore::curveSize):
(WebCore::curveUncompressedFieldElementSize):
(WebCore::curveUncompressedPointSize):
(WebCore::CryptoKeyEC::platformImportRaw):
(WebCore::CryptoKeyEC::platformImportJWKPublic):
(WebCore::CryptoKeyEC::platformImportJWKPrivate):
(WebCore::supportedAlgorithmIdentifier):
(WebCore::curveForIdentifier):
(WebCore::CryptoKeyEC::platformImportSpki):
(WebCore::CryptoKeyEC::platformExportRaw):
(WebCore::CryptoKeyEC::platformAddFieldElements):
(WebCore::CryptoKeyEC::platformExportSpki):
(WebCore::CryptoKeyEC::platformExportPkcs8):
(WebCore::uncompressedPointSizeForCurve): Deleted.
(WebCore::uncompressedFieldElementSizeForCurve): Deleted.
* crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
(WebCore::supportedAlgorithmIdentifier):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportSpki):
(WebCore::CryptoKeyRSA::exportPkcs8):
* crypto/gcrypt/GCryptUtilities.h:
(WebCore::CryptoConstants::matches):

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

2 years ago[CMake] WebKitFS.cmake depends on options set in Option cmake files that are included...
mcatanzaro@igalia.com [Tue, 1 Aug 2017 08:08:56 +0000 (08:08 +0000)]
[CMake] WebKitFS.cmake depends on options set in Option cmake files that are included later
https://bugs.webkit.org/show_bug.cgi?id=174855

Reviewed by Carlos Garcia Campos.

.:

Create derived sources directories in WebKitCommon.cmake instead of WebKitFS.cmake, which is
too soon. I tried changing the include order, but other stuff in WebKitFS.cmake really is
needed before including the port options file.

* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFS.cmake:

Source/WebDriver:

Don't create derived sources directory here anymore.

* PlatformGTK.cmake:

Source/WebKit:

Don't create derived sources directory here anymore.

* PlatformGTK.cmake:
* PlatformMac.cmake:
* PlatformWPE.cmake:

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

2 years agoUse LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames
commit-queue@webkit.org [Tue, 1 Aug 2017 06:42:51 +0000 (06:42 +0000)]
Use LazyNeverDestroyed instead of DEFINE_GLOBAL for MediaFeatureNames
https://bugs.webkit.org/show_bug.cgi?id=175008

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-07-31
Reviewed by Alex Christensen.

No new tests because no behavior change.

Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.

* css/MediaFeatureNames.cpp:
(WebCore::MediaFeatureNames::init): Do not include
<wtf/StaticConstructors.h>. Use LazyNeverDestroyed instead of
DEFINE_GLOBAL. Call LazyNeverDestroyed::construct instead of
placement new.
* css/MediaFeatureNames.h: Use LazyNeverDestroyed.
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::evaluate const): Dereference with ->.

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

2 years agoUse LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
commit-queue@webkit.org [Tue, 1 Aug 2017 06:40:04 +0000 (06:40 +0000)]
Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
https://bugs.webkit.org/show_bug.cgi?id=175010

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-07-31
Reviewed by Alex Christensen.

No new tests because no behavior change.

Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.

* dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
instead of placement new.
* dom/QualifiedName.h: Use LazyNeverDestroyed.

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

2 years agoRemove some obsolete expected failures blamed on the threaded compositor.
commit-queue@webkit.org [Tue, 1 Aug 2017 06:37:49 +0000 (06:37 +0000)]
Remove some obsolete expected failures blamed on the threaded compositor.
https://bugs.webkit.org/show_bug.cgi?id=174982

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-07-31
Reviewed by Sergio Villar Senin.

* platform/gtk/TestExpectations:

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

2 years agoFix JSCOnly ARM buildbots after r220047
ossy@webkit.org [Tue, 1 Aug 2017 05:28:05 +0000 (05:28 +0000)]
Fix JSCOnly ARM buildbots after r220047
https://bugs.webkit.org/show_bug.cgi?id=174993

Reviewed by Saam Barati.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(BuildAndRemoteJSCTestsFactory.__init__):

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

2 years agoSpeedometer 2.0: Remove <base> from Angular 4 test
commit-queue@webkit.org [Tue, 1 Aug 2017 00:39:16 +0000 (00:39 +0000)]
Speedometer 2.0: Remove <base> from Angular 4 test
https://bugs.webkit.org/show_bug.cgi?id=175004

Patch by Mathias Bynens <mathias@qiwi.be> on 2017-07-31
Reviewed by Ryosuke Niwa.

* Speedometer/resources/todomvc/architecture-examples/angular/dist/index.html: Remove <base>.
* Speedometer/resources/todomvc/architecture-examples/angular/src/index.html: Remove <base>.

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

2 years agoSupport quirk for letting media autoplay if the user interacted with at least one...
mrajca@apple.com [Tue, 1 Aug 2017 00:39:06 +0000 (00:39 +0000)]
Support quirk for letting media autoplay if the user interacted with at least one media element.
https://bugs.webkit.org/show_bug.cgi?id=175005
<rdar://problem/33476038>

Reviewed by Eric Carlson.

If the user has interacted with at least one media element, let other media elements auto-play
as a quirk.

* dom/Document.cpp:
(WebCore::Document::updateIsPlayingMedia):
* dom/Document.h:
(WebCore::Document::noteUserInteractionWithMediaElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
* html/MediaElementSession.cpp:
(WebCore::needsDocumentLevelMediaUserGestureQuirk):
(WebCore::MediaElementSession::playbackPermitted const):
* page/MediaProducer.h:

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

2 years agoAX: CFEqual is failing on text markers with exact same data
n_wang@apple.com [Tue, 1 Aug 2017 00:18:00 +0000 (00:18 +0000)]
AX: CFEqual is failing on text markers with exact same data
https://bugs.webkit.org/show_bug.cgi?id=175002
<rdar://problem/33636985>

Reviewed by Chris Fleizach.

We should zero the memory of the TextMarkerData instance so that it
can be tested for byte-equivalence.

Made sure this change won't break any of the existing tests.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):

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

2 years agoAdded some UNLIKELYs to operationOptimize().
mark.lam@apple.com [Mon, 31 Jul 2017 23:30:38 +0000 (23:30 +0000)]
Added some UNLIKELYs to operationOptimize().
https://bugs.webkit.org/show_bug.cgi?id=174976

Reviewed by JF Bastien.

* jit/JITOperations.cpp:

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

2 years agoBuild fix. Fixed a typo. task.id() isn't a thing in this function.
rniwa@webkit.org [Mon, 31 Jul 2017 23:30:25 +0000 (23:30 +0000)]
Build fix. Fixed a typo. task.id() isn't a thing in this function.

* public/v3/models/test-group.js:
(TestGroup.createWithCustomConfiguration):

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

2 years agoFixed some comment typos.
mark.lam@apple.com [Mon, 31 Jul 2017 22:59:40 +0000 (22:59 +0000)]
Fixed some comment typos.

Not reviewed.

* bmalloc/PerProcess.h:

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

2 years agoMake more things LLInt constexprs
keith_miller@apple.com [Mon, 31 Jul 2017 22:47:04 +0000 (22:47 +0000)]
Make more things LLInt constexprs
https://bugs.webkit.org/show_bug.cgi?id=174994

Reviewed by Saam Barati.

This patch makes more const values in the LLInt constexprs.
It also deletes all of the no longer necessary static_asserts in
LLIntData.cpp. Finally, it fixes a typo in parser.rb.

* interpreter/ShadowChicken.h:
(JSC::ShadowChicken::Packet::tailMarker):
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
* offlineasm/generate_offset_extractor.rb:
* offlineasm/parser.rb:

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

2 years agoPropagate user gesture tokens when script elements are loaded.
mrajca@apple.com [Mon, 31 Jul 2017 22:34:47 +0000 (22:34 +0000)]
Propagate user gesture tokens when script elements are loaded.
https://bugs.webkit.org/show_bug.cgi?id=174959

Reviewed by Eric Carlson.

Propagate user gesture tokens when script elements are loaded (i.e. between the time an
element is created and its onload handler is invoked).

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::dispatchLoadEventRespectingUserGestureIndicator):
(WebCore::ScriptElement::executeScriptAndDispatchEvent):
(WebCore::ScriptElement::executePendingScript):
* dom/ScriptElement.h:

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

2 years agoUnreviewed, test gardening
jiewen_tan@apple.com [Mon, 31 Jul 2017 21:45:47 +0000 (21:45 +0000)]
Unreviewed, test gardening

* platform/mac-highsierra/TestExpectations:
* platform/mac-highsierra/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2_long_empty.https-expected.txt: Added.
* platform/mac-highsierra/imported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/test_pbkdf2_short_empty.https-expected.txt: Added.

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

2 years agoSkipped http/tests/media/video-play-stall.html.
jlewis3@apple.com [Mon, 31 Jul 2017 21:43:02 +0000 (21:43 +0000)]
Skipped  http/tests/media/video-play-stall.html.
https://bugs.webkit.org/show_bug.cgi?id=174988

Unreviewed test gardening.
* TestExpectations:

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

2 years agoWebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
dbates@webkit.org [Mon, 31 Jul 2017 21:26:26 +0000 (21:26 +0000)]
WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction() may not be able to
determine page that initiated navigation
https://bugs.webkit.org/show_bug.cgi?id=174531

Remove a comment from WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction()
about determining the originating page independently from the originating frame. There
does not seem to be much value to fixing this. We can always revisit this issue if we
discover a strong motivating example. See <https://bugs.webkit.org/show_bug.cgi?id=174531#c1>
for more details.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

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

2 years agoUnreviewed, rolling out r220048.
jlewis3@apple.com [Mon, 31 Jul 2017 20:31:05 +0000 (20:31 +0000)]
Unreviewed, rolling out r220048.

This revision caused multiple crashes in fast/images. See
webkit.org/b/174990

Reverted changeset:

"RenderImageResourceStyleImage::image() should return the
nullImage() if the image is not available"
https://bugs.webkit.org/show_bug.cgi?id=174874
http://trac.webkit.org/changeset/220048

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

2 years agoDo not mark all web-platform tests as slow, as this increases time spent on layout...
pvollan@apple.com [Mon, 31 Jul 2017 18:36:54 +0000 (18:36 +0000)]
Do not mark all web-platform tests as slow, as this increases time spent on layout tests.
Only mark individual web-platform tests as slow.

Unreviewed test gardening.

* platform/win/TestExpectations:

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

2 years agoRemove unnecessary exceptions from storage code
commit-queue@webkit.org [Mon, 31 Jul 2017 18:05:09 +0000 (18:05 +0000)]
Remove unnecessary exceptions from storage code
https://bugs.webkit.org/show_bug.cgi?id=174572

Patch by Sam Weinig <sam@webkit.org> on 2017-07-31
Reviewed by Chris Dumez.

Source/WebCore:

Remove checks for canAccessStorage() and the exceptions they would cause.
These were used for Storage in ephemeral sessions, but they are now supported.
Add checks for a null frame to functions that can mutate the storage, as the
frame is needed for that, and it retains our existing behavior for disconnected
frames. By removing these checks / exceptions, we can fully generate Storage.idl.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSStorageCustom.cpp: Removed.
Remove JSStorageCustom.cpp

* loader/EmptyClients.cpp:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* storage/StorageArea.h:
Remove canAccessStorage.

* storage/Storage.cpp:
(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
(WebCore::Storage::isSupportedPropertyName):
(WebCore::Storage::supportedPropertyNames):
* storage/Storage.h:
* storage/Storage.idl:
Remove canAccessStorage checks and corresponding exceptions. Add supportedPropertyNames
to allow the removal of the [CustomGetOwnPropertyNames].

Source/WebKit:

* WebProcess/Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::canAccessStorage): Deleted.
* WebProcess/Storage/StorageAreaImpl.h:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
Remove canAccessStorage. It is no longer called.

Source/WebKitLegacy:

* Storage/StorageAreaImpl.cpp:
(WebKit::StorageAreaImpl::canAccessStorage): Deleted.
* Storage/StorageAreaImpl.h:
Remove canAccessStorage. It is no longer called.

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

2 years agoUnreviewed, update test262 results for optional catch binding
utatane.tea@gmail.com [Mon, 31 Jul 2017 17:42:00 +0000 (17:42 +0000)]
Unreviewed, update test262 results for optional catch binding

* test262.yaml:

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

2 years agoUnreviewed, rolling out r220060.
jlewis3@apple.com [Mon, 31 Jul 2017 16:32:16 +0000 (16:32 +0000)]
Unreviewed, rolling out r220060.

This broke our internal builds. Contact reviewer of patch for
more information.

Reverted changeset:

"Merge WTFThreadData to Thread::current"
https://bugs.webkit.org/show_bug.cgi?id=174716
http://trac.webkit.org/changeset/220060

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

2 years ago[JSC] Support optional catch binding
utatane.tea@gmail.com [Mon, 31 Jul 2017 16:15:32 +0000 (16:15 +0000)]
[JSC] Support optional catch binding
https://bugs.webkit.org/show_bug.cgi?id=174981

Reviewed by Saam Barati.

JSTests:

* stress/optional-catch-binding-syntax.js: Added.
(testSyntax):
(testSyntaxError):
(catch.catch):
* stress/optional-catch-binding.js: Added.
(shouldBe):
(throwException):

Source/JavaScriptCore:

This patch implements optional catch binding proposal[1], which is now stage 3.
This proposal adds a new `catch` brace with no error value binding.

    ```
        try {
            ...
        } catch {
            ...
        }
    ```

Sometimes we do not need to get error value actually. For example, the function returns
boolean which means whether the function succeeds.

    ```
    function parse(result) // -> bool
    {
         try {
             parseInner(result);
         } catch {
             return false;
         }
         return true;
    }
    ```

In the above case, we are not interested in the actual error value. Without this syntax,
we always need to introduce a binding for an error value that is just ignored.

[1]: https://michaelficarra.github.io/optional-catch-binding-proposal/

* bytecompiler/NodesCodegen.cpp:
(JSC::TryNode::emitBytecode):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseTryStatement):

LayoutTests:

Rebaseline existing tests.

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:
* sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T4-expected.txt:
* sputnik/Conformance/12_Statement/12.14_The_try_Statement/S12.14_A16_T4.html:

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

2 years agoMany web-platform tests are slow on Windows.
pvollan@apple.com [Mon, 31 Jul 2017 15:13:26 +0000 (15:13 +0000)]
Many web-platform tests are slow on Windows.

Unreviewed test gardening, mark web-platform tests as slow.

* platform/win/TestExpectations:

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

2 years agoMerge WTFThreadData to Thread::current
utatane.tea@gmail.com [Mon, 31 Jul 2017 11:23:41 +0000 (11:23 +0000)]
Merge WTFThreadData to Thread::current
https://bugs.webkit.org/show_bug.cgi?id=174716

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Use Thread::current() instead.

* API/JSContext.mm:
(+[JSContext currentContext]):
(+[JSContext currentThis]):
(+[JSContext currentCallee]):
(+[JSContext currentArguments]):
(-[JSContext beginCallbackWithData:calleeValue:thisValue:argumentCount:arguments:]):
(-[JSContext endCallbackWithData:]):
* heap/Heap.cpp:
(JSC::Heap::requestCollection):
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::checkModuleSyntax):
(JSC::evaluate):
(JSC::loadAndEvaluateModule):
(JSC::loadModule):
(JSC::linkAndEvaluateModule):
(JSC::importModule):
* runtime/Identifier.cpp:
(JSC::Identifier::checkCurrentAtomicStringTable):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
(JSC::JSLock::willReleaseLock):
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::grabAllLocks):
* runtime/JSLock.h:
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::updateStackLimits):
(JSC::VM::committedStackByteCount):
* runtime/VM.h:
(JSC::VM::isSafeToRecurse const):
* runtime/VMEntryScope.cpp:
(JSC::VMEntryScope::VMEntryScope):
* runtime/VMInlines.h:
(JSC::VM::ensureStackCapacityFor):
* yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::isSafeToRecurse const):

Source/WebCore:

Use Thread::current() instead.

* fileapi/AsyncFileStream.cpp:
* platform/ThreadGlobalData.cpp:
(WebCore::ThreadGlobalData::ThreadGlobalData):
* platform/graphics/cocoa/WebCoreDecompressionSession.h:
* platform/ios/wak/WebCoreThread.mm:
(StartWebThread):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

Source/WTF:

We placed thread specific data in WTFThreadData previously. But now, we have a new good place
to put thread specific data: WTF::Thread. Before this patch, WTFThreadData and WTF::Thread
sometimes have the completely same fields (m_stack etc.) due to initialization order limitations.
This patch merges WTFThreadData to WTF::Thread. We apply WTFThreadData's initialization style
to WTF::Thread. So, WTF::Thread's holder now uses fast TLS for darwin environment. Thus,
Thread::current() access is now accelerated. And WTF::Thread::current() can be accessed even
before calling WTF::initializeThreading.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/LockAlgorithm.h:
* wtf/LockAlgorithmInlines.h:
* wtf/MainThread.h:
* wtf/ParkingLot.cpp:
* wtf/StackStats.cpp:
(WTF::StackStats::PerThreadStats::PerThreadStats):
(WTF::StackStats::CheckPoint::CheckPoint):
(WTF::StackStats::CheckPoint::~CheckPoint):
(WTF::StackStats::probe):
(WTF::StackStats::LayoutCheckPoint::LayoutCheckPoint):
* wtf/ThreadHolder.cpp:
(WTF::ThreadHolder::initializeCurrent):
* wtf/ThreadHolder.h:
(WTF::ThreadHolder::ThreadHolder):
(WTF::ThreadHolder::currentMayBeNull):
(WTF::ThreadHolder::current):
* wtf/ThreadHolderPthreads.cpp:
(WTF::ThreadHolder::initialize):
(WTF::ThreadHolder::destruct):
(WTF::ThreadHolder::current): Deleted.
* wtf/ThreadHolderWin.cpp:
(WTF::ThreadHolder::currentDying):
(WTF::ThreadHolder::initialize):
(WTF::ThreadHolder::current): Deleted.
* wtf/Threading.cpp:
(WTF::Thread::initializeInThread):
(WTF::Thread::entryPoint):
(WTF::Thread::didExit):
(WTF::initializeThreading):
(WTF::Thread::currentMayBeNull): Deleted.
* wtf/Threading.h:
(WTF::Thread::atomicStringTable):
(WTF::Thread::setCurrentAtomicStringTable):
(WTF::Thread::stackStats):
(WTF::Thread::savedStackPointerAtVMEntry):
(WTF::Thread::setSavedStackPointerAtVMEntry):
(WTF::Thread::savedLastStackTop):
(WTF::Thread::setSavedLastStackTop):
(WTF::Thread::current):
* wtf/ThreadingPrimitives.h:
* wtf/ThreadingPthreads.cpp:
(WTF::Thread::createCurrentThread):
(WTF::Thread::current): Deleted.
* wtf/ThreadingWin.cpp:
(WTF::Thread::createCurrentThread):
(WTF::Thread::current): Deleted.
* wtf/WTFThreadData.cpp: Removed.
* wtf/WTFThreadData.h: Removed.
* wtf/text/AtomicString.cpp:
* wtf/text/AtomicStringImpl.cpp:
(WTF::stringTable):
* wtf/text/AtomicStringTable.cpp:
(WTF::AtomicStringTable::create):
* wtf/text/AtomicStringTable.h:

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

2 years ago[GTK] Layout test fast/css/image-set-unprefixed.html is failing
commit-queue@webkit.org [Mon, 31 Jul 2017 11:09:35 +0000 (11:09 +0000)]
[GTK] Layout test fast/css/image-set-unprefixed.html is failing
https://bugs.webkit.org/show_bug.cgi?id=163975

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-07-31
Reviewed by Žan Doberšek.

Remove obsolete expectation for image-set-unprefixed.html.

It appears to have started passing with the test change in r209543.

* platform/gtk/TestExpectations:

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

2 years agoCreated a bool pretty printer at WTF for debugging purposes
calvaris@igalia.com [Mon, 31 Jul 2017 09:14:58 +0000 (09:14 +0000)]
Created a bool pretty printer at WTF for debugging purposes
https://bugs.webkit.org/show_bug.cgi?id=174893

Reviewed by Darin Adler.

Source/WebCore:

Use WTF::boolPrettyPrinter in debugging messages.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::supportsKeySystem):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::seek):

Source/WTF:

* wtf/PrintStream.cpp:
(WTF::printInternal): The overload taking bool uses boolForPrinting
* wtf/PrintStream.h:
(WTF::boolForPrinting): Converts a bool in "true" or "false".

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

2 years ago[GTK] Layout Tests fast/dom/{Element,Range}/getClientRects.html are failing
commit-queue@webkit.org [Mon, 31 Jul 2017 09:07:41 +0000 (09:07 +0000)]
[GTK] Layout Tests fast/dom/{Element,Range}/getClientRects.html are failing
https://bugs.webkit.org/show_bug.cgi?id=141700

Patch by Ms2ger <Ms2ger@igalia.com> on 2017-07-31
Reviewed by Sam Weinig.

Add gtk-specific expectations for getClientRects tests.

Since these expectations depend on text metrics, it is unsurprising that they
are platform-dependent.

* platform/gtk/TestExpectations:
* platform/gtk/fast/dom/Element/getClientRects-expected.txt: Added.
* platform/gtk/fast/dom/Range/getClientRects-expected.txt:

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

2 years agoVersioning.
bshafiei@apple.com [Mon, 31 Jul 2017 08:20:18 +0000 (08:20 +0000)]
Versioning.

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

2 years agoUnreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0,
zandobersek@gmail.com [Mon, 31 Jul 2017 06:59:59 +0000 (06:59 +0000)]
Unreviewed. Suppress the -Wextra compiler warning when building with GCC 6.3.0,
explicitly initializing the RefCounted<> base class in the
FetchHeaders(const FetchHeaders&) constructor.

Note that while that's the signature of the copy constructor for the FetchHeaders
class, the base RefCounted<> class is not copyable, so the default RefCounted<>
constructor is used, but the FetchHeaders resources are normally copied into the
new object from the one that's passed in.

* Modules/fetch/FetchHeaders.h:
(WebCore::FetchHeaders::FetchHeaders):

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

2 years ago[WTF] Introduce Private Symbols
utatane.tea@gmail.com [Mon, 31 Jul 2017 04:57:15 +0000 (04:57 +0000)]
[WTF] Introduce Private Symbols
https://bugs.webkit.org/show_bug.cgi?id=174935

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use SymbolImpl::isPrivate().

* builtins/BuiltinNames.cpp:
* builtins/BuiltinNames.h:
(JSC::BuiltinNames::isPrivateName): Deleted.
* builtins/BuiltinUtils.h:
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::lookup):
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::isPrivateName): Deleted.
* runtime/CommonIdentifiers.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createUndefinedVariableError):
* runtime/Identifier.h:
(JSC::Identifier::isPrivateName):
* runtime/IdentifierInlines.h:
(JSC::identifierToSafePublicJSValue):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorAssign):
(JSC::defineProperties):
(JSC::setIntegrityLevel):
(JSC::testIntegrityLevel):
(JSC::ownPropertyKeys):
* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):
* runtime/PropertyName.h:
(JSC::PropertyName::isPrivateName):
* runtime/ProxyObject.cpp:
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::performDelete):
(JSC::ProxyObject::performDefineOwnProperty):

Source/WTF:

Upcoming proposal of class fields[1] requires private fields.
The simple way to implement it is adding a property with a private symbol.
Currently, we have private symbols for internal properties. They are usual
Symbols managed by the hash table. So basically private symbols are statically
created in BuiltinNames. However this new proposal encourages users to create
such private symbols more and more.

So, this patch introduces notion of "Private" into WTF SymbolImpl. This patch
adds PrivateSymbolImpl. This is SymbolImpl with "Private" flag. We do not need
to look up the symbol from the hash table to check whether the given symbol
is a private one.

[1]: https://github.com/tc39/proposal-class-fields

* wtf/text/StringImpl.h:
* wtf/text/SymbolImpl.cpp:
(WTF::PrivateSymbolImpl::create):
(WTF::PrivateSymbolImpl::createNullSymbol):
* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::isPrivate):
(WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl):
(WTF::SymbolImpl::SymbolImpl):
(WTF::PrivateSymbolImpl::PrivateSymbolImpl):

Tools:

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

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

2 years agoRemove code in HTMLObjectElement attribute parsing that forces style resolution and...
darin@apple.com [Sun, 30 Jul 2017 21:44:01 +0000 (21:44 +0000)]
Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
https://bugs.webkit.org/show_bug.cgi?id=130653

Reviewed by Antti Koivisto.

Source/WebCore:

Also fixes a bug where load events are delivered prematurely in some cases
when an object, embed, frame, or iframe element is still loading.

* dom/Document.cpp:
(WebCore::Document::loadEventDelayTimerFired): Added a call to
FrameLoader::checkLoadComplete. Goes along with the change to
FrameLoader::checkLoadCompleteForThisFrame, which now respects the
isDelayingLoadEvent flag.

* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::HTMLAppletElement): Removed the createdByParser argument,
no longer needed by the base class.
(WebCore::HTMLAppletElement::create): Added call to finishCreating, which is now part of
the process of creating any object in a class derived from HTMLPlugInImageElement.
(WebCore::HTMLAppletElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
is only called when it's becoming false; avoids a false/true/false round trip that can
cause trouble.
* html/HTMLAppletElement.h: Updated for the above.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::HTMLEmbedElement): Removed the createdByParser argument,
no longer needed by the base class.
(WebCore::HTMLEmbedElement::create): Added call to finishCreating, which is now part of
the process of creating any object in a class derived from HTMLPlugInImageElement.
(WebCore::HTMLEmbedElement::parseAttribute): Changed srcAttr to call
updateImageLoaderWithNewURLSoon to do the image loading logic.
(WebCore::HTMLEmbedElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
is only called when it's becoming false; avoids a false/true/false round trip that can
cause trouble.
* html/HTMLEmbedElement.h: Updated for the above.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState): Call setShouldDelayLoadEvent(false) when
transitioning to HAVE_CURRENT_DATA (or beyond), even if we have already fired a loadeddata
event in the past. This matches what the HTML specification calls for, but only if you
read it carefully. Without this change, and with the more complete implementation of
load event delay below, one of the regression tests hangs because are permanently stuck
dealying load events. Also added a FIXME about other code that likely has a similar
problem; the symptom is likely to be subtle and minor, though.

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement): Removed the createdByParser argument,
no longer needed by the base class.
(WebCore::HTMLObjectElement::create): Added call to finishCreating, which is now part of
the process of creating any object in a class derived from HTMLPlugInImageElement.
(WebCore::HTMLObjectElement::parseAttribute): Changed dataAttr to use
updateImageLoaderWithNewURLSoon. Explicitly call scheduleUpdateForAfterStyleResolution
since just calling invalidateStyleAndRenderersForSubtree alone is no longer sufficient.
(WebCore::HTMLObjectElement::updateWidget): Rearranged logic so setNeedsWidgetUpdate
is only called when it's becoming false; avoids a false/true/false round trip that can
cause trouble.
(WebCore::HTMLObjectElement::childrenChanged): Added calls to the new
scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
(WebCore::HTMLObjectElement::renderFallbackContent): Remove the call to
updateStyleIfNeeded. This is the main change that the title of this bug refers to.
* html/HTMLObjectElement.h: Updated for the above. Also removed the
clearUseFallbackContent function because it's clearer to set the data member in
line at the single call site in HTMLObjectElement::parseAttribute.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Removed the createdByParser
argument; no need to set an m_needsWidgetUpdate flag differently for parser cases now.
(WebCore::HTMLPlugInImageElement::finshCreating): Added. To be called after creating
an element to do work that can't be done in a constructor.
(WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
scheduleUpdateForAfterStyleResolution function.
(WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
class; cleans things up, even though it's just an assertion.
(WebCore::HTMLPlugInImageElement::willDetachRenderers): Removed the call to
setNeedsWidgetUpdate(true) here; no longer needed because the new logic already
does the right thing in this case.
(WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): Deleted. Now handled by
updateAfterStyleResolution instead.
(WebCore::HTMLPlugInImageElement::finishParsingChildren): Deleted. Handling updates
after parsing all the children now comes naturally out of the new implementation.
(WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
Schedules a call to updateAfterStyleResolution when needed, and equally importantly,
increments the load event delay count to make sure that loads that are part of that
update can participate in decision about whether it's time for the load event.
(WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
m_needsImageReload boolean in cases where no actual loading is done.
(WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Update load event delay
count when moving an element that is in the middle of loading. This lets the
updateAfterStyleResolution function do the right thing even when the element is
moved without leaving anything stuck in a strange state.
(WebCore::HTMLPlugInImageElement::prepareForDocumentSuspension): Call the new
scheduleUpdateForAfterStyleResolution since invalidating style is no longer sufficient.
(WebCore::HTMLPlugInImageElement::startLoadingImage): Deleted. Now handled by
updateAfterStyleResolution instead.
(WebCore::HTMLPlugInImageElement::updateImageLoaderWithNewURLSoon): Added. Does all
the right things for when an image URL is changed; for use by the concrete derived classes.
* html/HTMLPlugInImageElement.h: Updated for above changes. Also made m_imageLoader
private rather than protected, and added the two new boolean data members.

* html/HTMLTagNames.in: Removed unneeded constructorNeedsCreatedByParser flags for
applet, embed, and object.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoadingInAPISense): Return true if the document is
delaying a load event.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame): Don't do any work if
isDelayingLoadEvent is true; otherwise this function can have a side effect of
triggering the load event.
(WebCore::FrameLoader::detachFromParent): Schedule a checkLoadComplete here, too, not
just a checkCompleted. This is relevant if the frame we are detaching was delaying
a load event because it no longer will be and so the load might be complete.

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didFinishLoadForFrame): Omit now-unneeded "shouldDump" argument
when calling frameDidChangeLocation.
(WTR::InjectedBundlePage::frameDidChangeLocation): Removed "shouldDump" argument. This was
causing WebKitTestRunner to not dump anything in cases where DumpRenderTree will dump, and
thus causing mysterious failures of a couple of tests. There are two remaining issues:
1) WebKitTestRunner won't run its dump code if there is no "page", and there is no such
consideration in DumpRenderTree and 2) Both DumpRenderTree and WebKitTestRunner share the
same logic flaw that causes "top loading frame" to get set to one of the subframes in
tests where  the following sequence occurs: test calls waitUntilDone, main frame finishes
loading, subframe starts loading. It would be good to clean that up some day, but for now
this patch makes the two work identically rather than changing both.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Updated for change above.

LayoutTests:

* fast/text/international/embed-bidi-style-in-isolate-crash.html: Removed onerror attribute
in the audio element in this test. The error event does fire during the test, which causes
the test to fail. Before, the test was prematurely exiting before the load failed, preventing
the test from failing, but also meaning we didn't finish running the test.

* imported/blink/fast/dom/Window/open-window-features-fuzz.html: Use waitUntilDone and
notifyDone to prevent the test from exiting prematurely. Use a URL that won't trigger loading
outside the web browser; the URL is not what mattered to this test. Before, the test was
prematurely exiting before the test ran. Note also, that I don't think this is testing
much effectively; not sure we are getting any benefit from this test since before it was
not really running to completion anyway.

* media/event-queue-crash-expected.txt: Updated expectations to expect syntax error. Before
there was a race and often the test exited before the syntax error could be logged.

* platform/mac/TestExpectations: Removed flakiness expectation from the
media/event-queue-crash.html test. What made it flaky was a race with the load event,
and that race should be fixed by the change to FrameLoader::checkLoadCompleteForThisFrame.
The same race existed on all platforms, not just Mac, so this flakiness expectation should
be in the main TextExpectations file if anywhere. But I believe it is not needed at all.
For media/modern-media-controls/media-documents/background-color-and-centering.html,
added image failure expectation because under modern WebKit on Mac the image now captures
the upper left hand corner of the controls overlay. Still seems to pass on iOS and the bug
this was created for was iOS-specific, so should be OK for now.

* webarchive/loading/video-in-webarchive-expected.txt: Updated. The old result shows evidence
of a premature load event, fixed by the change to FrameLoader::checkLoadCompleteForThisFrame.

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

2 years ago[WK2] Replace RetainPtr<> with auto when adopting allocated ObjC objects in DataInter...
wenson_hsieh@apple.com [Sun, 30 Jul 2017 21:35:17 +0000 (21:35 +0000)]
[WK2] Replace RetainPtr<> with auto when adopting allocated ObjC objects in DataInteractionTests
https://bugs.webkit.org/show_bug.cgi?id=174963

Reviewed by Darin Adler.

Replaces several uses of RetainPtr<>s with auto. Some test cases in this file use auto, while other test cases declare using
RetainPtr<>. This patch changes them to all use auto.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):

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

2 years ago[WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobal...
weinig@apple.com [Sun, 30 Jul 2017 20:27:19 +0000 (20:27 +0000)]
[WebIDL] Remove JS builtin bindings for FetchRequest, DOMWindowFetch and WorkerGlobalScopeFetch
https://bugs.webkit.org/show_bug.cgi?id=174974

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/basic/mode-same-origin.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-about.any-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-blob-expected.txt:
* web-platform-tests/fetch/api/basic/scheme-others-expected.txt:
* web-platform-tests/fetch/api/cors/cors-cookies.any-expected.txt:
* web-platform-tests/fetch/api/policies/referrer-origin-when-cross-origin-expected.txt:
* web-platform-tests/fetch/api/request/request-bad-port-expected.txt:
Update results to have the correct line number for exceptions reported in the console.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Modules/fetch/DOMWindowFetch.js: Removed.
* Modules/fetch/FetchRequest.js: Removed.
* Modules/fetch/WorkerGlobalScopeFetch.js: Removed.
Remove builtin files.

* Modules/fetch/DOMWindowFetch.cpp:
(WebCore::DOMWindowFetch::fetch):
* Modules/fetch/DOMWindowFetch.h:
* Modules/fetch/DOMWindowFetch.idl:
* Modules/fetch/WorkerGlobalScopeFetch.cpp:
(WebCore::WorkerGlobalScopeFetch::fetch):
* Modules/fetch/WorkerGlobalScopeFetch.h:
* Modules/fetch/WorkerGlobalScopeFetch.idl:
Remove builtin and instead create FetchRequest in the implementation.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::extractBody):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchResponse.cpp:
* Modules/fetch/FetchResponse.h:
Rename FetchBody::BindingDataType to FetchBody::Init to match its IDL naming.

* Modules/fetch/FetchHeaders.cpp:
(WebCore::appendToHeaderMap):
(WebCore::fillHeaderMap):
(WebCore::FetchHeaders::create):
(WebCore::FetchHeaders::fill):
* Modules/fetch/FetchHeaders.h:
Add helpers to implement the fill algorithm for various input types.
Leave the existing fill for now, as it is still used by the FetchResponse
builtin, but will eventually be removed.

* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::initializeOptions):
(WebCore::FetchRequest::initializeWith):
(WebCore::FetchRequest::setBody):
(WebCore::FetchRequest::create):
(WebCore::FetchRequest::setBodyFromInputRequest): Deleted.
* Modules/fetch/FetchRequest.h:
Migrate builtin code to the implementation. This is 1-to-1 re-implementation,
so I did not attempt to fix any conformance issues. That will come in follow up.

* Modules/fetch/FetchRequest.idl:
Replace builtins with an IDL constructor.

* Modules/fetch/FetchRequestInit.h:
* Modules/fetch/FetchRequestInit.idl:
Add missing headers and body to FetchRequestInit.

LayoutTests:

* http/tests/inspector/network/fetch-network-data-expected.txt:
Update results to have the correct line number for exceptions reported in the console.

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

2 years agoAdd URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
beidson@apple.com [Sun, 30 Jul 2017 17:36:26 +0000 (17:36 +0000)]
Add URLSchemeHandler API tests that verify the lack of URLSchemeTask object leaks.
https://bugs.webkit.org/show_bug.cgi?id=174958

Reviewed by Darin Adler.

Source/WebKit:

* UIProcess/API/APIURLSchemeTask.h:

* UIProcess/API/C/WKTestingSupport.cpp:
(WKGetAPIURLSchemeTaskInstanceCount):
(WKGetWebURLSchemeTaskInstanceCount):
* UIProcess/API/C/WKTestingSupport.h:

* UIProcess/WebURLSchemeTask.h:

* WebKit.xcodeproj/project.pbxproj:

Source/WTF:

This patch adds a new template class "InstanceCounted<T>".

For each specialization, "InstanceCounted" will keep track of the total number of
instances in existence.

This makes explicate leak checking in API tests possible.

Since this adds some runtime and storage overhead the code that actually does anything
is only compiled in debug builds.

* WTF.xcodeproj/project.pbxproj:
* wtf/InstanceCounted.h: Added.
(WTF::InstanceCounted::InstanceCounted):
(WTF::InstanceCounted::instanceCount):
(WTF::InstanceCounted::~InstanceCounted):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-leaks.mm: Added.
(-[LeakSchemeHandler webView:startURLSchemeTask:]):
(-[LeakSchemeHandler webView:stopURLSchemeTask:]):
(runUntilTasksInFlight):
(TEST):

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

2 years agoRenderImageResourceStyleImage::image() should return the nullImage() if the image...
commit-queue@webkit.org [Sun, 30 Jul 2017 07:38:31 +0000 (07:38 +0000)]
RenderImageResourceStyleImage::image() should return the nullImage() if the image is not available
https://bugs.webkit.org/show_bug.cgi?id=174874
<rdar://problem/33530130>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-07-30
Reviewed by Darin Adler.

Source/WebCore:

If an <img> element has image content data for a none cached image, e.g.
-webkit-named-image, RenderImageResourceStyleImage will be created and
attached to the RenderImage. RenderImageResourceStyleImage::m_cachedImage
will be set to null because the m_styleImage->isCachedImage() is false in
this case. When ImageLoader finishes loading the url of the src attribute,
RenderImageResource::setCachedImage() will be called to set m_cachedImage.

A crash will happen when the RenderImage is destroyed. Destroying the
RenderImage calls RenderImageResourceStyleImage::shutdown() which checks
m_cachedImage and finds it not null, so it calls RenderImageResourceStyleImage::image()
which ends up calling CSSNamedImageValue::image() which returns a null pointer
because the size is empty. RenderImageResourceStyleImage::shutdown() calls
image()->stopAnimation() without checking the return value of image().

Like the base class virtual method RenderImageResource::image(),
RenderImageResourceStyleImage::image() should return the nullImage() if
the image is not available.

Test: fast/images/image-element-image-content-data.html

* css/CSSCrossfadeValue.cpp:
* css/CSSFilterImageValue.cpp:
* page/EventHandler.cpp:
* page/PageSerializer.cpp:
* rendering/RenderElement.cpp:
* rendering/RenderImageResource.cpp:
* rendering/RenderImageResourceStyleImage.cpp:
(WebCore::RenderImageResourceStyleImage::initialize):

(WebCore::RenderImageResourceStyleImage::shutdown): Revert back the changes
of r208511 in this function. Add a call to image()->stopAnimation() without
checking the return of image() since it will return the nullImage() if
the image not available. There is no need to check m_cachedImage before
calling image() because image() does not check or access m_cachedImage.

(WebCore::RenderImageResourceStyleImage::image): The base class method
RenderImageResource::image() returns the nullImage() if the image not
available. This is because CachedImage::imageForRenderer() returns
the nullImage() if the image is not available; see CachedImage.h. We should
do the same for the derived class for consistency.

* rendering/style/ContentData.cpp:
* rendering/style/StyleCachedImage.cpp:
* style/StylePendingResources.cpp:

LayoutTests:

* fast/images/image-element-image-content-data-expected.txt: Added.
* fast/images/image-element-image-content-data.html: Added.

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

2 years agoLLInt offsets extractor should be able to handle C++ constexprs
keith_miller@apple.com [Sun, 30 Jul 2017 03:01:12 +0000 (03:01 +0000)]
LLInt offsets extractor should be able to handle C++ constexprs
https://bugs.webkit.org/show_bug.cgi?id=174964

Reviewed by Saam Barati.

This patch adds new syntax to the offline asm language. The new keyword,
constexpr, takes the subsequent identifier and maps it to a C++ constexpr
expression. Additionally, if the value is not an identifier you can wrap it in
parentheses. e.g. constexpr (myConstexprFunction() + OBJECT_OFFSET(Foo, bar)),
which will get converted into:
static_cast<int64_t>(myConstexprFunction() + OBJECT_OFFSET(Foo, bar));

This patch also changes the data format the LLIntOffsetsExtractor
binary produces.  Previously, it would produce unsigned values,
after this patch every value is an int64_t.  Using an int64_t is
useful because it means that we can represent any constant needed.
int32_t masks are sign extended then passed then converted to a
negative literal sting in the assembler so it will be the constant
expected.

* llint/LLIntOffsetsExtractor.cpp:
(JSC::LLIntOffsetsExtractor::dummy):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/asm.rb:
* offlineasm/ast.rb:
* offlineasm/generate_offset_extractor.rb:
* offlineasm/offsets.rb:
* offlineasm/parser.rb:
* offlineasm/transform.rb:

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

2 years agoUnreviewed, build fix for GTK and WPE about StorageProcess renaming
utatane.tea@gmail.com [Sat, 29 Jul 2017 19:51:10 +0000 (19:51 +0000)]
Unreviewed, build fix for GTK and WPE about StorageProcess renaming

.:

* Source/cmake/OptionsWPE.cmake:

Source/WebKit:

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

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

2 years agoUnreviewed, rollout r220044 because it set the bots on fire.
fpizlo@apple.com [Sat, 29 Jul 2017 19:36:47 +0000 (19:36 +0000)]
Unreviewed, rollout r220044 because it set the bots on fire.

It seems that the "-Wunguarded-availability-new" pragma is not widely supported. So, a bunch of the
Mac bots are now unable to build and that includes EWS.

Fixing by rolling it out.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
(-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::flush):

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

2 years agoFixed building for macOS 10.12 with the macOS 10.13 SDK.
mitz@apple.com [Sat, 29 Jul 2017 16:25:13 +0000 (16:25 +0000)]
Fixed building for macOS 10.12 with the macOS 10.13 SDK.

Suppressed the unguarded-availability-new warning around uses of AVSampleBufferAudioRenderer
and AVSampleBufferRenderSynchronizer. Even though the 10.13 SDK declares them as available
starting in that release, they have been available as SPI earlier.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableAudioSample):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener beginObservingRenderer:]):
(-[WebAVSampleBufferErrorListener stopObservingRenderer:]):
(-[WebAVSampleBufferErrorListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError):
(WebCore::SourceBufferPrivateAVFObjC::flush):

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

2 years agoSpeedometer 2.0: Document vanilla/es2015 build process
commit-queue@webkit.org [Sat, 29 Jul 2017 11:38:07 +0000 (11:38 +0000)]
Speedometer 2.0: Document vanilla/es2015 build process
https://bugs.webkit.org/show_bug.cgi?id=174894

Patch by Mathias Bynens <mathias@chromium.org> on 2017-07-29
Reviewed by Ryosuke Niwa.

* Speedometer/resources/todomvc/vanilla-examples/es2015/README.md: Added.
* Speedometer/resources/todomvc/vanilla-examples/es2015/index.html: Made title consistent.

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

2 years agoAX: findMatchingObjects doesn't work when the startObject is ignored
n_wang@apple.com [Sat, 29 Jul 2017 10:27:00 +0000 (10:27 +0000)]
AX: findMatchingObjects doesn't work when the startObject is ignored
https://bugs.webkit.org/show_bug.cgi?id=174965

Reviewed by Chris Fleizach.

Source/WebCore:

findMatchingObjects would return a wrong element if we pass in an ignored
start object. To fix this, we should use the closest accessible sibling as
the start object.

Test: accessibility/mac/search-predicate-from-ignored-element.html

* accessibility/AccessibilityObject.cpp:
(WebCore::appendChildrenToArray):

LayoutTests:

* accessibility/mac/search-predicate-from-ignored-element-expected.txt: Added.
* accessibility/mac/search-predicate-from-ignored-element.html: Added.

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

2 years agoAX: FKA: Buttons need a visible focus indicator
commit-queue@webkit.org [Sat, 29 Jul 2017 10:00:33 +0000 (10:00 +0000)]
AX: FKA: Buttons need a visible focus indicator
https://bugs.webkit.org/show_bug.cgi?id=171040
<rdar://problem/30922548>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-07-29
Reviewed by Antoine Quint.

Source/WebCore:

Added a background color for the focus state of the icon buttons in modern media controls.

Test: media/modern-media-controls/button/button-focus-state.html

* Modules/modern-media-controls/controls/button.css:
(button:focus):
(button:focus > picture):
* Modules/modern-media-controls/controls/slider.css:
(.slider > input):

LayoutTests:

* media/modern-media-controls/button/button-focus-state-expected.txt: Added.
* media/modern-media-controls/button/button-focus-state.html: Added.
* platform/ios-simulator/TestExpectations:
* platform/mac-elcapitan/TestExpectations:

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

2 years ago[Mac][WebKit2] WebKit sandbox errors while streaming Netflix
bfulgham@apple.com [Sat, 29 Jul 2017 02:39:38 +0000 (02:39 +0000)]
[Mac][WebKit2] WebKit sandbox errors while streaming Netflix
https://bugs.webkit.org/show_bug.cgi?id=174955
<rdar://problem/33583994>

Reviewed by Alex Christensen.

Wider testing with the stricter sandboxing rules identified three more IOKit properties we need to expose:
- CEAModeID
- CEAPixelRepetition
- IOFBHDMIDongleROM

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

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

2 years ago[WebIDL] Remove JS builtin bindings for FetchHeaders
commit-queue@webkit.org [Sat, 29 Jul 2017 02:35:56 +0000 (02:35 +0000)]
[WebIDL] Remove JS builtin bindings for FetchHeaders
https://bugs.webkit.org/show_bug.cgi?id=174905

Patch by Sam Weinig <sam@webkit.org> on 2017-07-28
Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/headers/headers-basic-expected.txt:
* web-platform-tests/fetch/api/headers/headers-record-expected.txt:
Update results for more passing tests.

Source/WebCore:

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Modules/fetch/FetchHeaders.js: Removed.
Remove FetchHeaders.js

* Modules/fetch/FetchHeaders.cpp:
(WebCore::appendToHeaderMap):
(WebCore::FetchHeaders::create):
(WebCore::FetchHeaders::append):
* Modules/fetch/FetchHeaders.h:
(WebCore::FetchHeaders::FetchHeaders):
Add create function for generated constructor.
Add appendToHeaderMap static function which takes the functionality
from the existing append function, and makes it useable in create.

* Modules/fetch/FetchHeaders.idl:
Replace [JSBuiltinConstructor] with real constructor. Keep other builtin
attributes as they are still used by other Fetch code.

* bindings/js/JSDOMConvertRecord.h:
Fix record conversion to work with proxies by changing to use the method table
for getOwnPropertyNames, and undefined values by not excluding undefined values.

LayoutTests:

* fetch/header-constructor-is-array-expected.txt:
* fetch/header-constructor-is-array.html:
Update test to match spec. An array with out a prototype will not yield
a valid Header as it is not iterable.

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

2 years agoUnreviewed, rolling out r219986.
commit-queue@webkit.org [Sat, 29 Jul 2017 00:57:22 +0000 (00:57 +0000)]
Unreviewed, rolling out r219986.
https://bugs.webkit.org/show_bug.cgi?id=174962

"broke PLT on iOS (rdar://problem/33602751)" (Requested by
estes on #webkit).

Reverted changeset:

"Part 1 of: Rename DatabaseProcess to StorageProcess."
https://bugs.webkit.org/show_bug.cgi?id=174879
http://trac.webkit.org/changeset/219986

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

2 years agoUnreviewed, rolling out r219990.
commit-queue@webkit.org [Sat, 29 Jul 2017 00:52:02 +0000 (00:52 +0000)]
Unreviewed, rolling out r219990.
https://bugs.webkit.org/show_bug.cgi?id=174961

"broke PLT on iOS (rdar://problem/33602751)" (Requested by
estes on #webkit).

Reverted changeset:

"Part 2 of: Rename DatabaseProcess to StorageProcess."
https://bugs.webkit.org/show_bug.cgi?id=174880
http://trac.webkit.org/changeset/219990

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

2 years agoWeb Inspector: capture an async stack trace when web content calls addEventListener
mattbaker@apple.com [Sat, 29 Jul 2017 00:33:12 +0000 (00:33 +0000)]
Web Inspector: capture an async stack trace when web content calls addEventListener
https://bugs.webkit.org/show_bug.cgi?id=174739
<rdar://problem/33468197>

Reviewed by Brian Burg.

Source/JavaScriptCore:

Allow debugger agents to perform custom logic when asynchronous stack
trace data is cleared. For example, the PageDebuggerAgent would clear
its list of registered listeners for which call stacks have been recorded.

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::clearAsyncStackTraceData):
* inspector/agents/InspectorDebuggerAgent.h:

Source/WebCore:

Test: inspector/debugger/async-stack-trace.html

Add instrumentation to EventTarget to support showing asynchronous
stack traces when the debugger breaks in a script event listener.

* dom/EventTarget.cpp:
(WebCore::EventTarget::addEventListener):
(WebCore::EventTarget::removeEventListener):
(WebCore::EventTarget::fireEventListeners):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::didAddEventListenerImpl):
(WebCore::InspectorInstrumentation::willRemoveEventListenerImpl):
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::didAddEventListener):
(WebCore::InspectorInstrumentation::willRemoveEventListener):
(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore::InspectorInstrumentation::didHandleEvent):
* inspector/PageDebuggerAgent.cpp:
(WebCore::PageDebuggerAgent::didClearAsyncStackTraceData):
(WebCore::PageDebuggerAgent::didAddEventListener):
(WebCore::PageDebuggerAgent::willRemoveEventListener):
(WebCore::PageDebuggerAgent::willHandleEvent):
* inspector/PageDebuggerAgent.h:

LayoutTests:

Add test case checking that async stack traces are recorded for addEventListener.

* inspector/debugger/async-stack-trace-expected.txt:
* inspector/debugger/async-stack-trace.html:

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

2 years agoDon't add autoplay restrictions to media elements created in response to user gestures.
mrajca@apple.com [Sat, 29 Jul 2017 00:25:49 +0000 (00:25 +0000)]
Don't add autoplay restrictions to media elements created in response to user gestures.
https://bugs.webkit.org/show_bug.cgi?id=174947

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/video-create-with-user-gesture.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):

LayoutTests:

Skip the test on iOS because "runWithKeyDown" does not work there.

Jer: "Turns out the problem with iOS is that the WKTR EventSender is basically unwritten. It
doesn't support sending mouse, key, or touch events, so our "do this during a user gesture"
helper in video-test.js doesn't work."

* media/video-create-with-user-gesture-expected.txt: Added.
* media/video-create-with-user-gesture.html: Added.
* platform/ios/TestExpectations:

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

2 years agoThe test imported/w3c/web-platform-tests/fetch/api/basic/accept-header.any.html is...
pvollan@apple.com [Fri, 28 Jul 2017 23:21:10 +0000 (23:21 +0000)]
The test imported/w3c/web-platform-tests/fetch/api/basic/accept-header.any.html is slow on Windows.

Unreviewed test gardening, mark test as slow.

* platform/win/TestExpectations:

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

2 years agoAPI tests that use URLSchemeHandler are failing.
beidson@apple.com [Fri, 28 Jul 2017 23:19:50 +0000 (23:19 +0000)]
API tests that use URLSchemeHandler are failing.
https://bugs.webkit.org/show_bug.cgi?id=174950

Reviewed by Alex Christensen.

Source/WebKit:

Make sure that in all cases where we remove the last task from the page->task map...
...We also remove the map itself.

* UIProcess/WebURLSchemeHandler.cpp:
(WebKit::WebURLSchemeHandler::stopTask):
(WebKit::WebURLSchemeHandler::taskCompleted):
(WebKit::WebURLSchemeHandler::removeTaskFromPageMap):
* UIProcess/WebURLSchemeHandler.h:

Tools:

Fix the NoMIMEType test to be correct.

* TestWebKitAPI/Tests/WebKit2Cocoa/WKURLSchemeHandler-1.mm:
(-[SchemeHandler initWithData:mimeType:]):
(-[SchemeHandler webView:startURLSchemeTask:]):
(TEST):

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

2 years agoprepare-ChangeLog should not list added layout tests in PAL ChangeLog
dbates@webkit.org [Fri, 28 Jul 2017 22:31:37 +0000 (22:31 +0000)]
prepare-ChangeLog should not list added layout tests in PAL ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=174876

Reviewed by Alex Christensen.

Do not list added layout tests in the PAL ChangeLog as such tests are unlikely to be related
to a PAL change. Unit tests are more appropriate for PAL changes than layout tests because
they provide a more direct way to test the platform abstraction.

As a side effect of this change we no longer list added layout tests in WebCore/platform/gtk/po/ChangeLog.

* Scripts/prepare-ChangeLog:
(generateNewChangeLogs): Only list added layout tests in the WebCore ChangeLog regardless
of the current working directory.

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

2 years agoUnreviewed, rolling out r220016.
jlewis3@apple.com [Fri, 28 Jul 2017 22:21:02 +0000 (22:21 +0000)]
Unreviewed, rolling out r220016.

Test needs to be unskipped due to configuration change in High
Sierra.

Reverted changeset:

"Marked fast/images/pdf-as-image-with-annotations.html as
image failure."
http://trac.webkit.org/changeset/220016

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

2 years agoUsing "auto <function()> -> returnType" breaks prepare-ChangeLog
jbedard@apple.com [Fri, 28 Jul 2017 22:04:02 +0000 (22:04 +0000)]
Using "auto <function()> -> returnType" breaks prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=174930

Unreviewed test fix.

We need to check parentheses before printing 'const' or 'volatile' in the ChangeLog.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):

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

2 years agoMarked fast/images/pdf-as-image-with-annotations.html as image failure.
jlewis3@apple.com [Fri, 28 Jul 2017 21:58:38 +0000 (21:58 +0000)]
Marked fast/images/pdf-as-image-with-annotations.html as image failure.
<rdar://problem/33550614>

Unreviewed test gardening.

* platform/mac-highsierra/TestExpectations:

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

2 years agoMarked multiple iimported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ as...
jlewis3@apple.com [Fri, 28 Jul 2017 21:09:21 +0000 (21:09 +0000)]
Marked multiple iimported/w3c/web-platform-tests/WebCryptoAPI/derive_bits_keys/ as failing.
<rdar://problem/33548297>

Unreviewed test gardening.

* platform/mac-highsierra/TestExpectations:

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

2 years agoWebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from...
commit-queue@webkit.org [Fri, 28 Jul 2017 21:08:57 +0000 (21:08 +0000)]
WebMediaSessionHelper calls -[UIApplication beginReceivingRemoteControlEvents] from WebThread
https://bugs.webkit.org/show_bug.cgi?id=174934
rdar://problem/33586772

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-28
Reviewed by Eric Carlson.

No new tests because no effect on DOM.

This dispatches a UIKit call to the main thread since it might happen on WebThread in WK1.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):

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

2 years agoMarked imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html as flaky.
jlewis3@apple.com [Fri, 28 Jul 2017 20:49:34 +0000 (20:49 +0000)]
Marked imported/w3c/IndexedDB-private-browsing/idbfactory_open12.html as flaky.
<rdar://problem/33555052>

Unreviewed test gardening.

* platform/ios-wk2/TestExpectations:
* platform/mac-highsierra/TestExpectations:

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

2 years agoObjectToStringAdaptiveStructureWatchpoint should not fire if it's dying imminently.
mark.lam@apple.com [Fri, 28 Jul 2017 20:29:09 +0000 (20:29 +0000)]
ObjectToStringAdaptiveStructureWatchpoint should not fire if it's dying imminently.
https://bugs.webkit.org/show_bug.cgi?id=174948
<rdar://problem/33495680>

Reviewed by Filip Pizlo.

JSTests:

* stress/regress-174948.js: Added.

Source/JavaScriptCore:

ObjectToStringAdaptiveStructureWatchpoint is owned by StructureRareData.  If its
owner StructureRareData is already known to be dead (in terms of GC liveness) but
hasn't been destructed yet (i.e. not swept by the GC yet), we should ignore all
requests to fire this watchpoint.

If the GC had the chance to sweep the StructureRareData, thereby destructing the
ObjectToStringAdaptiveStructureWatchpoint, it (the watchpoint) would have removed
itself from the WatchpointSet it was on.  Hence, it would not have been fired.

But since the watchpoint hasn't been destructed yet, it still remains on the
WatchpointSet and needs to guard against being fired in this state.  The fix is
to simply return early if its owner StructureRareData is not live.  This has the
effect of the watchpoint fire being a no-op, which is equivalent to the watchpoint
not firing as we would expect.

This patch also removes some cargo cult copying of watchpoint code which
instantiates a StringFireDetail.  In a few cases, that StringFireDetail is never
used.  This patch removes these unnecessary instantiations.

* bytecode/LLIntPrototypeLoadAdaptiveStructureWatchpoint.cpp:
(JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint::fireInternal):
* runtime/StructureRareData.cpp:
(JSC::ObjectToStringAdaptiveStructureWatchpoint::fireInternal):
(JSC::ObjectToStringAdaptiveInferredPropertyValueWatchpoint::handleFire):

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

2 years agoWKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
beidson@apple.com [Fri, 28 Jul 2017 20:03:42 +0000 (20:03 +0000)]
WKURLSchemeTaskImpl instances are being abandoned (except if the task is stopped).
<rdar://problem/33568276> and https://bugs.webkit.org/show_bug.cgi?id=174895

Reviewed by Alex Christensen.

There was a lot going on here:
- There was an unbroken cycle between URLSchemeHandlers and URLSchemeTasks
- WKURLSchemeTasks were not destroying their API::URLSchemeTask implementation object
- When a WKWebView was dealloc'ed, it was not cleaning up the related UIProcess tasks
- If the NetworkingProcess crashed, WebProcesses were not cleaning up their tasks
  (and therefore the UIProcess tasks were also not getting cleaned up)
- If a WebProcess crashed, the UIProcess was not cleaning up the related tasks

* UIProcess/API/Cocoa/WKURLSchemeTask.mm:
(-[WKURLSchemeTaskImpl dealloc]): Call API::~URLSchemeTask

* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.h:
* UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
(WebKit::WebURLSchemeHandlerCocoa::platformTaskCompleted): Clear out the API wrapper map
  so the wrapper and implementation object can both be destroyed.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close): Call stopAllURLSchemeTasks.
(WebKit::WebPageProxy::processDidTerminate): Call stopAllURLSchemeTasks.
(WebKit::WebPageProxy::stopAllURLSchemeTasks):
* UIProcess/WebPageProxy.h:

* UIProcess/WebURLSchemeHandler.cpp:
(WebKit::WebURLSchemeHandler::startTask):
(WebKit::WebURLSchemeHandler::stopAllTasksForPage):
(WebKit::WebURLSchemeHandler::stopTask):
(WebKit::WebURLSchemeHandler::taskCompleted):
* UIProcess/WebURLSchemeHandler.h:

* UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::WebURLSchemeTask):
* UIProcess/WebURLSchemeTask.h:
(WebKit::WebURLSchemeTask::pageID): Store separate from the WebPage so messaging
  is possible even after the WebPage* has been cleared.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::stopAllURLSchemeTasks):
* WebProcess/WebPage/WebPage.h:

* WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
(WebKit::WebURLSchemeHandlerProxy::stopAllTasks):
(WebKit::WebURLSchemeHandlerProxy::taskDidComplete):
(WebKit::WebURLSchemeHandlerProxy::taskDidStopLoading):
(WebKit::WebURLSchemeHandlerProxy::removeTask):
* WebProcess/WebPage/WebURLSchemeHandlerProxy.h:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed): Call stopAllURLSchemeTasks
  for each WebPage.

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

2 years agoUsing "auto <function()> -> returnType" breaks prepare-ChangeLog
jfbastien@apple.com [Fri, 28 Jul 2017 18:54:33 +0000 (18:54 +0000)]
Using "auto <function()> -> returnType" breaks prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=174930

Reviewed by Daniel Bates.

Teach prepare-ChangeLog about C++ auto arrow return, and while I'm
here also teach it about const and volatile overloads. I didn't do
reference and rvalue reference overloads because we don't really
use them, and the current parser throws away those characters and
it doesn't seem worth making it more complex.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp):
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests.cpp:
(Foo::Arrow::arrow):
(Foo::Arrow::otherArrow):
(Foo::Arrow::otherArrow const):
(Foo::Arrow::otherArrow volatile):
(Foo::Arrow::otherArrow const volatile):

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

2 years ago[macOS] Reeder's defaults font is Times instead of San Francisco
mmaxfield@apple.com [Fri, 28 Jul 2017 18:36:37 +0000 (18:36 +0000)]
[macOS] Reeder's defaults font is Times instead of San Francisco
https://bugs.webkit.org/show_bug.cgi?id=174885
<rdar://problem/33462483>

Reviewed by Simon Fraser.

Source/WebCore:

Reeder uses explicit dot-prefixed names in its source code. Within Core Text,
dot-prefixed names cannot be matched case insensitively. The solution is to
not case-fold these family names, and to make our caches case sensitive for
these special names.

Tests: fast/text/font-lookup-dot-prefix-case-sensitive-2.html
       fast/text/font-lookup-dot-prefix-case-sensitive.html

* platform/graphics/FontCache.cpp:
(WebCore::FontPlatformDataCacheKey::operator==):
(WebCore::FontPlatformDataCacheKeyHash::hash):
* platform/graphics/FontCascade.cpp:
(WebCore::keysMatch):
(WebCore::computeFontCascadeCacheHash):
* platform/graphics/FontDescription.cpp:
(WebCore::FontCascadeDescription::familyNamesAreEqual):
(WebCore::FontCascadeDescription::familyNameHash):
(WebCore::FontCascadeDescription::foldedFamilyName):
* platform/graphics/FontDescription.h:
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontDatabase::fontForPostScriptName):

LayoutTests:

* fast/text/font-lookup-dot-prefix-case-sensitive-2-expected.html: Added.
* fast/text/font-lookup-dot-prefix-case-sensitive-2.html: Added.
* fast/text/font-lookup-dot-prefix-case-sensitive-expected-mismatch.html: Added.
* fast/text/font-lookup-dot-prefix-case-sensitive.html: Added.

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

2 years agoWeb Inspector: Record actions performed on CanvasRenderingContext2D
drousso@apple.com [Fri, 28 Jul 2017 18:22:17 +0000 (18:22 +0000)]
Web Inspector: Record actions performed on CanvasRenderingContext2D
https://bugs.webkit.org/show_bug.cgi?id=174482

Reviewed by Joseph Pecoraro.

Source/WebCore:

Tests: inspector/canvas/recording-2d.html
       inspector/canvas/recording.html

* html/canvas/CanvasRenderingContext2D.idl:
Add CallTracingCallback to interface to record all API calls.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::paint):
If a recording is active, mark the current frame as completed.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeGetterBodyDefinition):
(GenerateAttributeSetterBodyDefinition):
(GenerateImplementationFunctionCall):
(GenerateCallTracerParameter):
(GenerateCallTracer):
* bindings/scripts/test/TestCallTracer.idl:
* bindings/scripts/test/JS/JSTestCallTracer.cpp:
(WebCore::setJSTestCallTracerTestAttributeInterfaceSetter):
(WebCore::setJSTestCallTracerTestAttributeSpecifiedSetter):
(WebCore::jsTestCallTracerTestAttributeWithVariantGetter):
(WebCore::jsTestCallTracerTestAttributeWithVariant):
(WebCore::setJSTestCallTracerTestAttributeWithVariantSetter):
(WebCore::setJSTestCallTracerTestAttributeWithVariant):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationInterfaceBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationSpecifiedBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithArgumentsBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithNullableArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgumentBody):
(WebCore::jsTestCallTracerPrototypeFunctionTestOperationWithVariantArgument):
* inspector/InspectorCanvas.h:
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::recordAction):
(WebCore::InspectorCanvas::buildAction):
Change CallTracer IDL generation to flatten any variants so that all types for the
parameters of an action are able to be listed in a single variant. This prevents possible
ambiguity when constructing the variant, as they require that exactly one type be
constructible and a sub-variant might not satisfy that condition. This was only an issue for
older mac SDKs.

* bindings/js/CallTracer.h:
* bindings/js/CallTracer.cpp:
(WebCore::CallTracer::recordCanvasAction):
* bindings/js/CallTracerTypes.h:
* inspector/InspectorCanvasAgent.h:
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::recordCanvasAction):
* inspector/InspectorInstrumentation.h:
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::recordCanvasAction):
(WebCore::InspectorInstrumentation::recordCanvasActionImpl):
Rename CanvasActionParameterVariant to RecordCanvasActionVariant to match what is expected by
the IDL generator. Also remove unnecessary includes now that they are in CallTracerTypes.h.

* CMakeLists.txt:
* bindings/js/JSBindingsAllInOne.cpp:
Add CallTracer for CMake builds.

LayoutTests:

* inspector/canvas/recording-2d-expected.txt: Added.
* inspector/canvas/recording-2d.html: Added.
* inspector/canvas/recording-expected.txt: Added.
* inspector/canvas/recording.html: Added.
Take a recording of all CanvasRenderingContext2D actions and dump the recorded JSON data.

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

2 years ago[GTK] Building with ENABLE_VIDEO=OFF fails
aperez@igalia.com [Fri, 28 Jul 2017 18:06:59 +0000 (18:06 +0000)]
[GTK] Building with ENABLE_VIDEO=OFF fails
https://bugs.webkit.org/show_bug.cgi?id=174940

Reviewed by Alex Christensen.

.:

Code guarded by ENABLE(MEDIA_STREAM) requires the definition of HTMLVideoElement to
be available, which in turn is guarded by ENABLE(VIDEO).

* Source/cmake/WebKitFeatures.cmake: Make ENABLE_MEDIA_STREAM depend on ENABLE_VIDEO.

Tools:

When GStreamer usage is completely disabled at build time, CMake does not query pkg-config for the GStreamer.
This adds missing USE(GSTREAMER) guards in order to make testing code buildable when GStreamer usage is disabled.

* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(methodCallCallback): Add missing USE(GSTREAMER) guard.

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

2 years ago[WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary...
commit-queue@webkit.org [Fri, 28 Jul 2017 17:29:12 +0000 (17:29 +0000)]
[WebIDL] Split-up and cleanup Fetch IDL files in preparation for removing unnecessary js builtins
https://bugs.webkit.org/show_bug.cgi?id=174915

Patch by Sam Weinig <sam@webkit.org> on 2017-07-28
Reviewed by Alex Christensen.

- Split FetchRequest enums and Init dictionary out of FetchRequest so they
  can be used from other files like WorkerGlobalScopeFetch and DOMWindowFetch.
- Add missing FetchResponseInit. Currently unused but will be in a subsequent patch.
- Add and update comments about missing properties and functions.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* Modules/fetch/DOMWindowFetch.idl:
* Modules/fetch/FetchBody.idl:
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchHeaders.h:
* Modules/fetch/FetchHeaders.idl:
* Modules/fetch/FetchReferrerPolicy.h: Added.
* Modules/fetch/FetchReferrerPolicy.idl: Added.
* Modules/fetch/FetchRequest.h:
* Modules/fetch/FetchRequest.idl:
* Modules/fetch/FetchRequestCache.h: Added.
* Modules/fetch/FetchRequestCache.idl: Added.
* Modules/fetch/FetchRequestCredentials.h: Added.
* Modules/fetch/FetchRequestCredentials.idl: Added.
* Modules/fetch/FetchRequestInit.h: Added.
* Modules/fetch/FetchRequestInit.idl: Added.
* Modules/fetch/FetchRequestMode.h: Added.
* Modules/fetch/FetchRequestMode.idl: Added.
* Modules/fetch/FetchRequestRedirect.h: Added.
* Modules/fetch/FetchRequestRedirect.idl: Added.
* Modules/fetch/FetchResponse.h:
* Modules/fetch/FetchResponse.idl:
* Modules/fetch/WorkerGlobalScopeFetch.idl:

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

2 years agoThe test imported/w3c/web-platform-tests/cors/allow-headers.htm is slow on Windows.
pvollan@apple.com [Fri, 28 Jul 2017 17:28:05 +0000 (17:28 +0000)]
The test imported/w3c/web-platform-tests/cors/allow-headers.htm is slow on Windows.

Unreviewed test gardening, mark test as slow.

* platform/win/TestExpectations:

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

2 years agoWeb Inspector: Cleanup unused/invalid parameters for TreeElements
drousso@apple.com [Fri, 28 Jul 2017 17:27:43 +0000 (17:27 +0000)]
Web Inspector: Cleanup unused/invalid parameters for TreeElements
https://bugs.webkit.org/show_bug.cgi?id=173987

Reviewed by Brian Burg.

* UserInterface/Views/TreeElement.js:
* UserInterface/Views/GeneralTreeElement.js:

* UserInterface/Views/ApplicationCacheFrameTreeElement.js:
* UserInterface/Views/BreakpointTreeElement.js:
* UserInterface/Views/CSSStyleSheetTreeElement.js:
* UserInterface/Views/CallFrameTreeElement.js:
* UserInterface/Views/ContentFlowTreeElement.js:
* UserInterface/Views/DOMNodeTreeElement.js:
* UserInterface/Views/DatabaseTableTreeElement.js:
* UserInterface/Views/DatabaseTreeElement.js:
* UserInterface/Views/FolderTreeElement.js:
* UserInterface/Views/FolderizedTreeElement.js:
* UserInterface/Views/FrameTreeElement.js:
* UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js:
* UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js:
* UserInterface/Views/IndexedDatabaseTreeElement.js:
* UserInterface/Views/IssueTreeElement.js:
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
* UserInterface/Views/ProfileNodeTreeElement.js:
* UserInterface/Views/ResourceTreeElement.js:
* UserInterface/Views/ScriptTreeElement.js:
* UserInterface/Views/SearchResultTreeElement.js:
* UserInterface/Views/SourceCodeTreeElement.js:
* UserInterface/Views/SourceMapResourceTreeElement.js:
* UserInterface/Views/StorageTreeElement.js:
* UserInterface/Views/TimelineRecordTreeElement.js:
* UserInterface/Views/TypeTreeElement.js:

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

2 years agoREGRESSION(r216944): Fallback fonts erroneously visible when the primary font is...
mmaxfield@apple.com [Fri, 28 Jul 2017 17:06:29 +0000 (17:06 +0000)]
REGRESSION(r216944): Fallback fonts erroneously visible when the primary font is loading
https://bugs.webkit.org/show_bug.cgi?id=174772
<rdar://problem/33267643>

Reviewed by Simon Fraser.

Source/WebCore:

During a font load, we try pretty hard to find a font to use that isn't the
last resort font (which happens to be Times). We do this by iterating through
all the fonts in the font-family list, as well as through all the relevant
@font-face blocks which share the requested font family name.

Unfortunately, if we find one of these fallback fonts, we were simply using it
directly, which means that it was being drawn as visible (because the
visibility setting lives inside the Font object). Instead, we should carry the
invisibility setting from the interstitial font to this used fallback font.

This patch is an extension of r219221, which fixed the problem only for system
fallback fonts. This patch adopts the same methodology to all fallback fonts.

Test: http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html

* platform/graphics/FontCascadeFonts.cpp:
(WebCore::FontCascadeFonts::glyphDataForVariant):
(WebCore::glyphPageFromFontRanges):
* platform/graphics/FontRanges.cpp:
(WebCore::FontRanges::glyphDataForCharacter):

LayoutTests:

* http/tests/webfont/font-loading-system-fallback-visibility-FontRanges-expected.html: Added.
* http/tests/webfont/font-loading-system-fallback-visibility-FontRanges.html: Added.

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

2 years agoREGRESSION(r125147): Layout Test svg/dom/SVGScriptElement/script-change-externalResou...
pvollan@apple.com [Fri, 28 Jul 2017 16:52:35 +0000 (16:52 +0000)]
REGRESSION(r125147): Layout Test svg/dom/SVGScriptElement/script-change-externalResourcesRequired-while-loading.svg is failing
https://bugs.webkit.org/show_bug.cgi?id=93589

Unreviewed test gardening, this test is also a flaky timeout on Windows.

* platform/win/TestExpectations:

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

2 years agoFix typo in scrollPositionChangedViaDelegatedScrolling
fred.wang@free.fr [Fri, 28 Jul 2017 15:38:04 +0000 (15:38 +0000)]
Fix typo in scrollPositionChangedViaDelegatedScrolling
https://bugs.webkit.org/show_bug.cgi?id=174937

Patch by Frederic Wang <fwang@igalia.cpm> on 2017-07-28
Reviewed by Wenson Hsieh.

Source/WebCore:

No new tests, fix typo in the inUserInteraction parameter.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
* page/scrolling/ScrollingTree.h:

Source/WebKit:

* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):

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