WebKit-https.git
2 years agoSpeedometer 2.0: Elem test isn't updating DOM during the measurement
rniwa@webkit.org [Fri, 19 May 2017 10:09:13 +0000 (10:09 +0000)]
Speedometer 2.0: Elem test isn't updating DOM during the measurement
https://bugs.webkit.org/show_bug.cgi?id=172343

Reviewed by Antti Koivisto.

Elem test wasn't doing much work because it simply enqueues items into the work queue, which doesn't get
executed until the next requestAnimationFrame or setTimeout callback happens.

Expose elm's work function as contentWindow.elemWork and make the first use of rAF a synchronous callback
just as it would when requestAnimationFrame isn't defined, and make the second use of rAF queue up to
an array of callbacks, and have the test runner manually invoke each callback.

This increases the runtime of the Elm suite from 100ms to 300ms on Safari.

* Speedometer/resources/tests.js:
(processElmWorkQueue): Added. A helper which processes Elm's work queue and manually invokes render callbacks.
* Speedometer/resources/todomvc/functional-prog-examples/elm/dist/elm.js:

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

2 years agoSpeedometer 2.0: Flight.js test is sometime broken
rniwa@webkit.org [Fri, 19 May 2017 10:05:13 +0000 (10:05 +0000)]
Speedometer 2.0: Flight.js test is sometime broken
https://bugs.webkit.org/show_bug.cgi?id=172347

Reviewed by Antti Koivisto.

The bug was caused by the test runner only waiting for #new-todo, which happens before all other states are
updated in the Flight.js dependency example. As done in Speedometer v1, insert a dummy element with id set
to appIsReady and wait for this element to appear in the benchmark harness.

* Speedometer/resources/tests.js: Wait for #appIsReady.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/app/js/main.js: Removed the superflous call
to console.log.
(checkReady): Added. Insert #appIsReady if checkLoaded is no longer running at 50ms interval. Because this
could happen asynchronously, we check the absense of checkLoadedTimeoutId Ωevery 10ms for 5 times for
the total duration of 50ms. If checkLoadedTimeoutId was never present, we call it ready. If we ever observed
the presence of checkLoadedTimeoutId, wait another 50ms and start over.
* Speedometer/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
(.newContext.checkLoaded): Expose checkLoadedTimeoutId which is a timer ID used to check the dependency.

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

2 years ago[WK1] MiniBrowser should navigate when handling a dropped URL
wenson_hsieh@apple.com [Fri, 19 May 2017 10:02:12 +0000 (10:02 +0000)]
[WK1] MiniBrowser should navigate when handling a dropped URL
https://bugs.webkit.org/show_bug.cgi?id=172350

Reviewed by Tim Horton.

Allow all drop actions, including URL navigation, for WebKit1 MiniBrowser.

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController webView:dragDestinationActionMaskForDraggingInfo:]):

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

2 years ago[MSE][Mac] Support painting MSE video-element to canvas
jer.noble@apple.com [Fri, 19 May 2017 09:54:48 +0000 (09:54 +0000)]
[MSE][Mac] Support painting MSE video-element to canvas
https://bugs.webkit.org/show_bug.cgi?id=125157
<rdar://problem/23062016>

Reviewed by Eric Carlson.

* media/media-source/content/test-fragmented.mp4:

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

2 years agoUnreviewed build fix; add undefined functions and constants to the CoreMediaSoftLink...
jer.noble@apple.com [Fri, 19 May 2017 09:50:48 +0000 (09:50 +0000)]
Unreviewed build fix; add undefined functions and constants to the CoreMediaSoftLink.h, and use the
correct (and previously soft-linked) method in WebCoreDecompressionSession.

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::imageForTime):

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

2 years agoSpeedometer 2.0: jQuery and Inferno tests don't delete all ToDo items
rniwa@webkit.org [Fri, 19 May 2017 09:43:40 +0000 (09:43 +0000)]
Speedometer 2.0: jQuery and Inferno tests don't delete all ToDo items
https://bugs.webkit.org/show_bug.cgi?id=172341

Reviewed by Antti Koivisto.

The bug was caused by the fact TodoMVC examples for jQuery and Inferno JS create a new button
to delete the todo item each time todo items are rendered.

Fixed the bug by dynamically look for .destroy using querySelector for each item.

Also moved the deletion of the iframe from the end of each test suite to the beginning of each suite.
This will make debugging the issue like this easier on InteractiveRunner.html since the iframe
will stick around after stepping the last item in the suite.

* Speedometer/InteractiveRunner.html: Tweaked the CSS to make buttons to "Step" and "Run" always visible
even if the list of suites and subtests are too long to fit in the viewport.

* Speedometer/resources/benchmark-runner.js:
(BenchmarkRunner.prototype.step):
(BenchmarkRunner.prototype._runTestAndRecordResults):

* Speedometer/resources/tests.js: Fixed the bug for jQuery and Inferno. In the case of jQuery
we also have to fix the code for checking every ToDo item as completed as well.

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

2 years ago[MSE][Mac] Support painting MSE video-element to canvas
jer.noble@apple.com [Fri, 19 May 2017 09:41:23 +0000 (09:41 +0000)]
[MSE][Mac] Support painting MSE video-element to canvas
https://bugs.webkit.org/show_bug.cgi?id=125157
<rdar://problem/23062016>

Reviewed by Eric Carlson.

* media/media-source/content/test-fragmented.mp4: Add a 'edts' atom to move the presentation time for the
    first sample to 0:00.
* media/media-source/media-source-paint-to-canvas-expected.txt: Added.
* media/media-source/media-source-paint-to-canvas.html: Added.

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

2 years ago[JSC] Remove PLATFORM(WIN) references
commit-queue@webkit.org [Fri, 19 May 2017 09:39:28 +0000 (09:39 +0000)]
[JSC] Remove PLATFORM(WIN) references
https://bugs.webkit.org/show_bug.cgi?id=172294

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-19
Reviewed by Yusuke Suzuki.

* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::removeThread):
* llint/LLIntOfflineAsmConfig.h:
* runtime/ConfigFile.h:
* runtime/VM.cpp:
(JSC::VM::updateStackLimits):

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

2 years ago[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
utatane.tea@gmail.com [Fri, 19 May 2017 09:23:20 +0000 (09:23 +0000)]
[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
https://bugs.webkit.org/show_bug.cgi?id=172098

Reviewed by Saam Barati.

JSTests:

* stress/check-sub-class.js: Added.
(shouldBe):
(shouldThrow):
(calling):
(array.forEach):
(i.array.forEach):

Source/JavaScriptCore:

In this patch, we generalize CheckDOM to CheckSubClass.
It can accept any ClassInfo and perform ClassInfo check
in DFG / FTL. Now, we add a new function pointer to ClassInfo,
checkSubClassPatchpoint. It can create DOMJIT patchpoint
for that ClassInfo. It it natural that ClassInfo holds the
way to emit DOMJIT::Patchpoint to perform CheckSubClass
rather than having it in each DOMJIT getter / function
signature annotation.

One problem is that it enlarges the size of ClassInfo.
But this is the best place to put this function pointer.
By doing so, we can add a patchpoint for CheckSubClass
in an non-intrusive manner: WebCore can inject patchpoints
without interactive JSC.

We still have a way to reduce the size of ClassInfo if
we move ArrayBuffer related methods out to the other places.

This patch touches many files because we add a new function
pointer to ClassInfo. But they are basically mechanical change.

* API/JSAPIWrapperObject.mm:
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObject.cpp:
* API/ObjCCallbackFunction.mm:
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
* bytecode/DOMJITAccessCasePatchpointParams.h:
(JSC::DOMJITAccessCasePatchpointParams::DOMJITAccessCasePatchpointParams):
* bytecode/EvalCodeBlock.cpp:
* bytecode/FunctionCodeBlock.cpp:
* bytecode/GetterSetterAccessCase.cpp:
(JSC::GetterSetterAccessCase::emitDOMJITGetter):
* bytecode/ModuleProgramCodeBlock.cpp:
* bytecode/ProgramCodeBlock.cpp:
* bytecode/UnlinkedCodeBlock.cpp:
* bytecode/UnlinkedEvalCodeBlock.cpp:
* bytecode/UnlinkedFunctionCodeBlock.cpp:
* bytecode/UnlinkedFunctionExecutable.cpp:
* bytecode/UnlinkedModuleProgramCodeBlock.cpp:
* bytecode/UnlinkedProgramCodeBlock.cpp:
* debugger/DebuggerScope.cpp:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDOMJITPatchpointParams.h:
(JSC::DFG::DOMJITPatchpointParams::DOMJITPatchpointParams):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeCallDOM):
(JSC::DFG::FixupPhase::fixupCheckSubClass):
(JSC::DFG::FixupPhase::fixupCheckDOM): Deleted.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasClassInfo):
(JSC::DFG::Node::classInfo):
(JSC::DFG::Node::hasCheckDOMPatchpoint): Deleted.
(JSC::DFG::Node::checkDOMPatchpoint): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::SpeculativeJIT::compileCheckDOM): Deleted.
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::vm):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* domjit/DOMJITGetterSetter.h:
* domjit/DOMJITPatchpointParams.h:
(JSC::DOMJIT::PatchpointParams::PatchpointParams):
(JSC::DOMJIT::PatchpointParams::vm):
* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
(JSC::DOMJIT::Signature::checkDOM): Deleted.
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLDOMJITPatchpointParams.h:
(JSC::FTL::DOMJITPatchpointParams::DOMJITPatchpointParams):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckDOM): Deleted.
* inspector/JSInjectedScriptHost.cpp:
* inspector/JSInjectedScriptHostPrototype.cpp:
* inspector/JSJavaScriptCallFrame.cpp:
* inspector/JSJavaScriptCallFramePrototype.cpp:
* jsc.cpp:
(WTF::DOMJITNode::checkSubClassPatchpoint):
(WTF::DOMJITFunctionObject::checkSubClassPatchpoint):
(WTF::DOMJITFunctionObject::finishCreation):
(WTF::DOMJITCheckSubClassObject::DOMJITCheckSubClassObject):
(WTF::DOMJITCheckSubClassObject::createStructure):
(WTF::DOMJITCheckSubClassObject::create):
(WTF::DOMJITCheckSubClassObject::safeFunction):
(WTF::DOMJITCheckSubClassObject::unsafeFunction):
(WTF::DOMJITCheckSubClassObject::finishCreation):
(GlobalObject::finishCreation):
(functionCreateDOMJITCheckSubClassObject):
(WTF::DOMJITNode::checkDOMJITNode): Deleted.
(WTF::DOMJITFunctionObject::checkDOMJITNode): Deleted.
* runtime/AbstractModuleRecord.cpp:
* runtime/ArrayBufferNeuteringWatchpoint.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayIteratorPrototype.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/AsyncFunctionConstructor.cpp:
* runtime/AsyncFunctionPrototype.cpp:
* runtime/AtomicsObject.cpp:
* runtime/BooleanConstructor.cpp:
* runtime/BooleanObject.cpp:
* runtime/BooleanPrototype.cpp:
* runtime/ClassInfo.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(JSC::ClassInfo::dump):
* runtime/ClassInfo.h:
(JSC::ClassInfo::offsetOfParentClass):
* runtime/ClonedArguments.cpp:
* runtime/ConsoleObject.cpp:
* runtime/CustomGetterSetter.cpp:
* runtime/DateConstructor.cpp:
* runtime/DateInstance.cpp:
* runtime/DatePrototype.cpp:
* runtime/DirectArguments.cpp:
* runtime/Error.cpp:
* runtime/ErrorConstructor.cpp:
* runtime/ErrorInstance.cpp:
* runtime/ErrorPrototype.cpp:
* runtime/EvalExecutable.cpp:
* runtime/Exception.cpp:
* runtime/ExceptionHelpers.cpp:
* runtime/ExecutableBase.cpp:
* runtime/FunctionConstructor.cpp:
* runtime/FunctionExecutable.cpp:
* runtime/FunctionPrototype.cpp:
* runtime/FunctionRareData.cpp:
* runtime/GeneratorFunctionConstructor.cpp:
* runtime/GeneratorFunctionPrototype.cpp:
* runtime/GeneratorPrototype.cpp:
* runtime/GetterSetter.cpp:
* runtime/HashMapImpl.cpp:
* runtime/HashMapImpl.h:
* runtime/InferredType.cpp:
(JSC::InferredType::create):
* runtime/InferredTypeTable.cpp:
* runtime/InferredValue.cpp:
* runtime/InspectorInstrumentationObject.cpp:
* runtime/InternalFunction.cpp:
* runtime/IntlCollator.cpp:
* runtime/IntlCollatorConstructor.cpp:
* runtime/IntlCollatorPrototype.cpp:
* runtime/IntlDateTimeFormat.cpp:
* runtime/IntlDateTimeFormatConstructor.cpp:
* runtime/IntlDateTimeFormatPrototype.cpp:
* runtime/IntlNumberFormat.cpp:
* runtime/IntlNumberFormatConstructor.cpp:
* runtime/IntlNumberFormatPrototype.cpp:
* runtime/IntlObject.cpp:
* runtime/IteratorPrototype.cpp:
* runtime/JSAPIValueWrapper.cpp:
* runtime/JSArray.cpp:
* runtime/JSArrayBuffer.cpp:
* runtime/JSArrayBufferConstructor.cpp:
* runtime/JSArrayBufferPrototype.cpp:
* runtime/JSArrayBufferView.cpp:
* runtime/JSAsyncFunction.cpp:
* runtime/JSBoundFunction.cpp:
* runtime/JSCallee.cpp:
* runtime/JSCustomGetterSetterFunction.cpp:
* runtime/JSDataView.cpp:
* runtime/JSDataViewPrototype.cpp:
* runtime/JSEnvironmentRecord.cpp:
* runtime/JSFixedArray.cpp:
* runtime/JSFunction.cpp:
* runtime/JSGeneratorFunction.cpp:
* runtime/JSGlobalLexicalEnvironment.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSInternalPromise.cpp:
* runtime/JSInternalPromiseConstructor.cpp:
* runtime/JSInternalPromiseDeferred.cpp:
* runtime/JSInternalPromisePrototype.cpp:
* runtime/JSLexicalEnvironment.cpp:
* runtime/JSMap.cpp:
* runtime/JSMapIterator.cpp:
* runtime/JSModuleEnvironment.cpp:
* runtime/JSModuleLoader.cpp:
* runtime/JSModuleNamespaceObject.cpp:
* runtime/JSModuleRecord.cpp:
* runtime/JSNativeStdFunction.cpp:
* runtime/JSONObject.cpp:
* runtime/JSObject.cpp:
* runtime/JSPromise.cpp:
* runtime/JSPromiseConstructor.cpp:
* runtime/JSPromiseDeferred.cpp:
* runtime/JSPromisePrototype.cpp:
* runtime/JSPropertyNameEnumerator.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSProxy.cpp:
* runtime/JSScriptFetcher.cpp:
* runtime/JSSet.cpp:
* runtime/JSSetIterator.cpp:
* runtime/JSSourceCode.cpp:
* runtime/JSString.cpp:
* runtime/JSStringIterator.cpp:
* runtime/JSSymbolTableObject.cpp:
* runtime/JSTemplateRegistryKey.cpp:
* runtime/JSTypedArrayConstructors.cpp:
* runtime/JSTypedArrayPrototypes.cpp:
* runtime/JSTypedArrayViewConstructor.cpp:
* runtime/JSTypedArrays.cpp:
* runtime/JSWeakMap.cpp:
* runtime/JSWeakSet.cpp:
* runtime/JSWithScope.cpp:
* runtime/MapConstructor.cpp:
* runtime/MapIteratorPrototype.cpp:
* runtime/MapPrototype.cpp:
* runtime/MathObject.cpp:
* runtime/ModuleLoaderPrototype.cpp:
* runtime/ModuleProgramExecutable.cpp:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeExecutable.cpp:
* runtime/NativeStdFunctionCell.cpp:
* runtime/NullGetterFunction.cpp:
* runtime/NullSetterFunction.cpp:
* runtime/NumberConstructor.cpp:
* runtime/NumberObject.cpp:
* runtime/NumberPrototype.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectPrototype.cpp:
* runtime/ProgramExecutable.cpp:
* runtime/PropertyTable.cpp:
* runtime/ProxyConstructor.cpp:
* runtime/ProxyObject.cpp:
* runtime/ProxyRevoke.cpp:
* runtime/ReflectObject.cpp:
* runtime/RegExp.cpp:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/RegExpPrototype.cpp:
* runtime/ScopedArguments.cpp:
* runtime/ScopedArgumentsTable.cpp:
* runtime/ScriptExecutable.cpp:
* runtime/SetConstructor.cpp:
* runtime/SetIteratorPrototype.cpp:
* runtime/SetPrototype.cpp:
* runtime/SparseArrayValueMap.cpp:
* runtime/StrictEvalActivation.cpp:
* runtime/StringConstructor.cpp:
* runtime/StringIteratorPrototype.cpp:
* runtime/StringObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/Structure.cpp:
* runtime/StructureChain.cpp:
* runtime/StructureRareData.cpp:
* runtime/Symbol.cpp:
* runtime/SymbolConstructor.cpp:
* runtime/SymbolObject.cpp:
* runtime/SymbolPrototype.cpp:
* runtime/SymbolTable.cpp:
* runtime/WeakMapConstructor.cpp:
* runtime/WeakMapData.cpp:
* runtime/WeakMapPrototype.cpp:
* runtime/WeakSetConstructor.cpp:
* runtime/WeakSetPrototype.cpp:
* testRegExp.cpp:
* tools/JSDollarVM.cpp:
* tools/JSDollarVMPrototype.cpp:
* wasm/JSWebAssembly.cpp:
* wasm/js/JSWebAssemblyCodeBlock.cpp:
* wasm/js/JSWebAssemblyCompileError.cpp:
* wasm/js/JSWebAssemblyInstance.cpp:
* wasm/js/JSWebAssemblyLinkError.cpp:
* wasm/js/JSWebAssemblyMemory.cpp:
* wasm/js/JSWebAssemblyModule.cpp:
* wasm/js/JSWebAssemblyRuntimeError.cpp:
* wasm/js/JSWebAssemblyTable.cpp:
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
* wasm/js/WebAssemblyCompileErrorPrototype.cpp:
* wasm/js/WebAssemblyFunction.cpp:
* wasm/js/WebAssemblyFunctionBase.cpp:
* wasm/js/WebAssemblyInstanceConstructor.cpp:
* wasm/js/WebAssemblyInstancePrototype.cpp:
* wasm/js/WebAssemblyLinkErrorConstructor.cpp:
* wasm/js/WebAssemblyLinkErrorPrototype.cpp:
* wasm/js/WebAssemblyMemoryConstructor.cpp:
* wasm/js/WebAssemblyMemoryPrototype.cpp:
* wasm/js/WebAssemblyModuleConstructor.cpp:
* wasm/js/WebAssemblyModulePrototype.cpp:
* wasm/js/WebAssemblyModuleRecord.cpp:
* wasm/js/WebAssemblyPrototype.cpp:
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
* wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
* wasm/js/WebAssemblyTableConstructor.cpp:
* wasm/js/WebAssemblyTablePrototype.cpp:
* wasm/js/WebAssemblyToJSCallee.cpp:
* wasm/js/WebAssemblyWrapperFunction.cpp:

Source/WebCore:

Add DOMJIT interface IDL attribute. Which allows us to define checkSubClassPatchpointFor${className}
function for that ClassInfo. And we move CheckSubClass patchpoint implementation to ClassInfo's member

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowProperties.cpp:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateImplementationIterableFunctions):
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.json:
* bindings/scripts/test/JS/JSInterfaceName.cpp:
* bindings/scripts/test/JS/JSMapLike.cpp:
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestIterable.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bridge/c/CRuntimeObject.cpp:
* bridge/c/c_instance.cpp:
* bridge/objc/ObjCRuntimeObject.mm:
* bridge/objc/objc_instance.mm:
* bridge/objc/objc_runtime.mm:
* bridge/runtime_array.cpp:
* bridge/runtime_method.cpp:
* bridge/runtime_object.cpp:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/Node.idl:
* domjit/JSDocumentDOMJIT.cpp:
(WebCore::checkSubClassPatchpointForJSDocument):
(WebCore::DocumentDocumentElementDOMJIT::checkDOM): Deleted.
(WebCore::DocumentBodyDOMJIT::checkDOM): Deleted.
* domjit/JSDocumentFragmentDOMJIT.cpp: Copied from Source/JavaScriptCore/runtime/JSMap.cpp.
(WebCore::checkSubClassPatchpointForJSDocumentFragment):
* domjit/JSElementDOMJIT.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(WebCore::checkSubClassPatchpointForJSElement):
* domjit/JSEventDOMJIT.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(WebCore::checkSubClassPatchpointForJSEvent):
* domjit/JSNodeDOMJIT.cpp:
(WebCore::checkSubClassPatchpointForJSNode):
(WebCore::NodeFirstChildDOMJIT::checkDOM): Deleted.
(WebCore::NodeLastChildDOMJIT::checkDOM): Deleted.
(WebCore::NodeNextSiblingDOMJIT::checkDOM): Deleted.
(WebCore::NodePreviousSiblingDOMJIT::checkDOM): Deleted.
(WebCore::NodeParentNodeDOMJIT::checkDOM): Deleted.
(WebCore::NodeNodeTypeDOMJIT::checkDOM): Deleted.
(WebCore::NodeOwnerDocumentDOMJIT::checkDOM): Deleted.

Source/WebKit/mac:

* Plugins/Hosted/ProxyInstance.mm:
* Plugins/Hosted/ProxyRuntimeObject.mm:

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:

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

2 years agoSpeedometer 2.0: Vanilla JS test doesn't mark all todo items as completed
rniwa@webkit.org [Fri, 19 May 2017 09:19:01 +0000 (09:19 +0000)]
Speedometer 2.0: Vanilla JS test doesn't mark all todo items as completed
https://bugs.webkit.org/show_bug.cgi?id=172348

Reviewed by Antti Koivisto.

The bug was caused by the in-memory store class using the milisecond precision timestamp as an ID.
Because we inserts 50 items all at once, this can result in multiple data items sharing a single ID.

Fixed the bug by using a mononotically increasing ID instead.

* Speedometer/resources/todomvc/vanilla-examples/vanillajs/js/store.js:
(Store.prototype.save):

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

2 years agoUnreviewed GTK+ gardening.
zandobersek@gmail.com [Fri, 19 May 2017 09:11:47 +0000 (09:11 +0000)]
Unreviewed GTK+ gardening.

* platform/gtk/TestExpectations: Skip Apple Pay layout tests. Update one
http/tests/loading/resourceLoadStatistics test expectation.
* platform/gtk/http/tests/dom/document-attributes-null-handling-expected.txt: Update after r217091.

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

2 years ago[CMake] Add HAVE check for __int128_t
commit-queue@webkit.org [Fri, 19 May 2017 08:58:30 +0000 (08:58 +0000)]
[CMake] Add HAVE check for __int128_t
https://bugs.webkit.org/show_bug.cgi?id=172317

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-19
Reviewed by Yusuke Suzuki.

.:

* Source/cmake/OptionsCommon.cmake:

Source/WTF:

* wtf/MediaTime.cpp:
(WTF::MediaTime::setTimeScale):
* wtf/Platform.h:

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

2 years ago[WK2] Notify WebPageProxy client when an active process goes over the inactive memory...
akling@apple.com [Fri, 19 May 2017 06:54:28 +0000 (06:54 +0000)]
[WK2] Notify WebPageProxy client when an active process goes over the inactive memory limit
https://bugs.webkit.org/show_bug.cgi?id=172244
<rdar://problem/31800943>

Reviewed by Geoffrey Garen.

Source/WebKit2:

Add a WKPageUIClient callback that is invoked when an active process exceeds the inactive memory limit.

With the current state of the implementation, this means that a UI client can learn that backgrounding
a non-audible, non-capturing tab may cause it to get killed once the active/inactive hysteresis time
is over (8 minutes.)

The callback can be invoked multiple times if we exceed the limit, and then go under, and exceed again.

This is the callback:

    didExceedBackgroundResourceLimitWhileInForeground(WKPageRef, WKResourceLimit)

Where WKResourceLimit is one of { kWKResourceLimitMemory, kWKResourceLimitCPU }
The CPU enum value is a placeholder pending implementation soon.

* UIProcess/API/APIUIClient.h:
(API::UIClient::didExceedBackgroundResourceLimitWhileInForeground):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didExceedInactiveMemoryLimitWhileActive):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didExceedInactiveMemoryLimitWhileActive):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Source/WTF:

Add an installable callback to MemoryPressureHandler that gets invoked when an active process
exceeds the kill limit for an inactive process.

This allows a UI client to become aware that backgrounding a tab may cause it to get killed.

* wtf/MemoryPressureHandler.cpp:
(WTF::thresholdForMemoryKillWithProcessState):
(WTF::MemoryPressureHandler::thresholdForMemoryKill):
(WTF::MemoryPressureHandler::measurementTimerFired):
(WTF::MemoryPressureHandler::doesExceedInactiveLimitWhileActive):
(WTF::MemoryPressureHandler::doesNotExceedInactiveLimitWhileActive):
* wtf/MemoryPressureHandler.h:
(WTF::MemoryPressureHandler::setDidExceedInactiveLimitWhileActiveCallback):

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

2 years agoUpdate webidl2.js from upstream web-platform-tests
cdumez@apple.com [Fri, 19 May 2017 06:25:34 +0000 (06:25 +0000)]
Update webidl2.js from upstream web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=172342

Reviewed by Sam Weinig.

* web-platform-tests/fetch/api/headers/headers-idl.html:
Re-sync test from upstream 11216539e as the test would break otherwise with the new webidl2.js.

* web-platform-tests/resources/webidl2/*:
Re-sync webidl2.js from upstream web-platform-tests 11216539e.

* web-platform-tests/url/interfaces.any-expected.txt:
* web-platform-tests/url/interfaces.any.worker-expected.txt:
Rebaseline tests that are now actually working. They relied on this new webidl2.js version.

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

2 years agoUnreviewed gardening on ApplePaySession.html after r217078.
aestes@apple.com [Fri, 19 May 2017 05:58:30 +0000 (05:58 +0000)]
Unreviewed gardening on ApplePaySession.html after r217078.

* TestExpectations: Expect failure until webkit.org/b/172344 is fixed.

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

2 years ago[MSE][Mac] Support painting MSE video-element to canvas
jer.noble@apple.com [Fri, 19 May 2017 05:50:35 +0000 (05:50 +0000)]
[MSE][Mac] Support painting MSE video-element to canvas
https://bugs.webkit.org/show_bug.cgi?id=125157
<rdar://problem/23062016>

Reviewed by Eric Carlson.

Test: media/media-source/media-source-paint-to-canvas.html

In order to have access to decoded video data for painting, decode the encoded samples manually
instead of adding them to the AVSampleBufferDisplayLayer. To facilitate doing so, add a new
utility class WebCoreDecompressionSession, which can decode samples and store them.

For the purposes of this patch, to avoid double-decoding of video data and to avoid severe complication
of our sample delivery pipeline, we will only support painting of decoded video samples when the video is
not displayed in the DOM.

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::seekToTime): Always send waitForSeekCompleted() to give private a chance to delay seek completion.
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateReenqueSamples): Added.
* Modules/mediasource/SourceBuffer.h:
* WebCore.xcodeproj/project.pbxproj:
* platform/cf/CoreMediaSoftLink.cpp: Added new soft link macros.
* platform/cf/CoreMediaSoftLink.h: Ditto.
* platform/cocoa/CoreVideoSoftLink.cpp: Ditto.
* platform/cocoa/CoreVideoSoftLink.h: Ditto.
* platform/graphics/SourceBufferPrivateClient.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::sampleBufferDisplayLayer): Simple accessor.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::decompressionSession): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Update whether we should be displaying in a layer or decompression session..
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVisible): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::waitForSeekCompleted): m_seeking is now an enum.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seeking): Ditto.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekCompleted): Ditto. If waiting for a video frame, delay completing seek.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::nativeImageForCurrentTime): Call updateLastImage() and return result.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastImage): Fetch the image for the current time.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint): Pass to paintCurrentFrameInCanvas.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext): Get a native image, and render it.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged): Create or destroy a layer or decompression session as appropriate.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer): Creates a layer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer): Destroys a layer.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession): Creates a decompression session.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyDecompressionSession): Destroys a decompression session.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setHasAvailableVideoFrame): If seek completion delayed, complete now. Ditto for ready state change.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setReadyState): If waiting for a video frame, delay ready state change.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Deleted.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer): Deleted.
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
(WebCore::MediaSourcePrivateAVFObjC::hasVideo): Promote to a class function.
(WebCore::MediaSourcePrivateAVFObjC::hasSelectedVideo): Return whether any of the active source buffers have video and are selected.
(WebCore::MediaSourcePrivateAVFObjC::hasSelectedVideoChanged): Call setSourceBufferWithSelectedVideo().
(WebCore::MediaSourcePrivateAVFObjC::setVideoLayer): Set (or clear) the layer on the selected buffer.
(WebCore::MediaSourcePrivateAVFObjC::setDecompressionSession): Ditto for decompression session.
(WebCore::MediaSourcePrivateAVFObjC::setSourceBufferWithSelectedVideo): Remove the layer and decompression session from the unselected

        buffer and add the decompression session or layer to the newly selected buffer.
(WebCore::MediaSourcePrivateAVFObjCHasVideo): Deleted.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): Clear the videoLayer and decompressionSession.
(WebCore::SourceBufferPrivateAVFObjC::hasSelectedVideo): Return whether the buffer has a selected video track.
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): The media player now manages the video layer and decompression session lifetimes.
(WebCore::SourceBufferPrivateAVFObjC::flush): Flush the decompression session, if it exists.
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Enqueue to the decompression session, if it exists.
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): As the decompression session, if it exists.
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Tell the decompression session to stop requesting data, if it exists.
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Request media data from the decompression session, if it exists.
(WebCore::SourceBufferPrivateAVFObjC::setVideoLayer): Added.
(WebCore::SourceBufferPrivateAVFObjC::setDecompressionSession): Added.
* platform/graphics/cocoa/WebCoreDecompressionSession.h: Added.
(WebCore::WebCoreDecompressionSession::create):
(WebCore::WebCoreDecompressionSession::isInvalidated):
(WebCore::WebCoreDecompressionSession::createWeakPtr):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm: Added.
(WebCore::WebCoreDecompressionSession::WebCoreDecompressionSession): Register for media data requests.
(WebCore::WebCoreDecompressionSession::invalidate):  Unregister for same.
(WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaDataCallback): Pass to maybeBecomeReadyForMoreMediaData.
(WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaData): Check in-flight decodes, and decoded frame counts.
(WebCore::WebCoreDecompressionSession::enqueueSample): Pass the sample to be decoded on a background queue.
(WebCore::WebCoreDecompressionSession::decodeSample): Decode the sample.
(WebCore::WebCoreDecompressionSession::decompressionOutputCallback): Call handleDecompressionOutput.
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput): Pass decoded sample to be enqueued on the main thread.
(WebCore::WebCoreDecompressionSession::getFirstVideoFrame):
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample): Enqueue the frame (if it's a displayed frame).
(WebCore::WebCoreDecompressionSession::isReadyForMoreMediaData): Return whether we've hit our high water sample count.
(WebCore::WebCoreDecompressionSession::requestMediaDataWhenReady):
(WebCore::WebCoreDecompressionSession::stopRequestingMediaData): Unset the same.
(WebCore::WebCoreDecompressionSession::notifyWhenHasAvailableVideoFrame): Set a callback to notify when a decoded frame has been enqueued.
(WebCore::WebCoreDecompressionSession::imageForTime): Successively dequeue images until reaching one at or beyond the requested time.
(WebCore::WebCoreDecompressionSession::flush): Synchronously empty the producer and consumer queues.
(WebCore::WebCoreDecompressionSession::getDecodeTime): Utility method.
(WebCore::WebCoreDecompressionSession::getPresentationTime): Ditto.
(WebCore::WebCoreDecompressionSession::getDuration): Ditto.
(WebCore::WebCoreDecompressionSession::compareBuffers): Ditto.
* platform/cocoa/VideoToolboxSoftLink.cpp: Added.
* platform/cocoa/VideoToolboxSoftLink.h: Added.

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

2 years agoWebAssembly: exports is a getter
jfbastien@apple.com [Fri, 19 May 2017 05:27:28 +0000 (05:27 +0000)]
WebAssembly: exports is a getter
https://bugs.webkit.org/show_bug.cgi?id=172129

Reviewed by Saam Barati.

JSTests:

Update test to reflect new semantics.

* wasm/js-api/test_basic_api.js:
(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

As updated here: https://github.com/WebAssembly/design/pull/1062

* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::finishCreation): don't putDirect here anymore
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::moduleNamespaceObject): add accessor
* wasm/js/WebAssemblyFunctionBase.cpp: squelch causing a warning
* wasm/js/WebAssemblyInstancePrototype.cpp: use LUT
(JSC::getInstance): helper, as in surrounding files
(JSC::webAssemblyInstanceProtoFuncExports): instead of putDirect
* wasm/js/WebAssemblyMemoryPrototype.cpp: pass VM around as for Table
(JSC::getMemory):
(JSC::webAssemblyMemoryProtoFuncGrow):
(JSC::webAssemblyMemoryProtoFuncBuffer):
* wasm/js/WebAssemblyTablePrototype.cpp: static everywhere as with other code
(JSC::webAssemblyTableProtoFuncLength):
(JSC::webAssemblyTableProtoFuncGrow):
(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):

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

2 years ago[REGRESSION](r216901): Delete ImageDecoder if BitmapImage::destroyDecodedData() was...
commit-queue@webkit.org [Fri, 19 May 2017 04:09:45 +0000 (04:09 +0000)]
[REGRESSION](r216901): Delete ImageDecoder if BitmapImage::destroyDecodedData() was called to destroy all the decoded frames
https://bugs.webkit.org/show_bug.cgi?id=172325

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-18
Reviewed by Simon Fraser.

When calling BitmapImage::destroyDecodedData() with destroyAll = true, the
current ImageDecoder has to be deleted regardless the current frame needs
to be cached or not. This is true except when the image is animating.
Creating a new ImageDecoder for the animated image will lead to decoding
all the frames from frame-zero till the current frame.

Deleting the current ImageDecoder has the benefit of releasing its raster
data. We also must delete the current ImageDecoder when the CachedImage
switched its data SharedBuffer.

The fix is return the condition in BitmapImage::destroyDecodedData() to
be as it was before r216901.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):

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

2 years agoRe-sync url web-platform-tests
cdumez@apple.com [Fri, 19 May 2017 04:01:23 +0000 (04:01 +0000)]
Re-sync url web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=172333

Reviewed by Youenn Fablet.

Re-sync url web-platform-tests from upstream 11216539.

* web-platform-tests/url/README.md:
* web-platform-tests/url/a-element-expected.txt:
* web-platform-tests/url/a-element-origin-expected.txt:
* web-platform-tests/url/a-element-origin-xhtml-expected.txt:
* web-platform-tests/url/a-element-xhtml-expected.txt:
* web-platform-tests/url/failure-expected.txt:
* web-platform-tests/url/failure.html:
* web-platform-tests/url/historical.any-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker-expected.txt.
* web-platform-tests/url/historical.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.html.
* web-platform-tests/url/historical.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.js.
(self.GLOBAL.isWindow):
* web-platform-tests/url/historical.any.worker-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker-expected.txt.
* web-platform-tests/url/historical.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.html.
* web-platform-tests/url/historical.html: Removed.
* web-platform-tests/url/interfaces.any-expected.txt: Added.
* web-platform-tests/url/interfaces.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.html.
* web-platform-tests/url/interfaces.any.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/url/interfaces.html.
* web-platform-tests/url/interfaces.any.worker-expected.txt: Added.
* web-platform-tests/url/interfaces.any.worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/url/historical.worker.html.
* web-platform-tests/url/url-constructor-expected.txt:
* web-platform-tests/url/url-origin-expected.txt:
* web-platform-tests/url/urlsearchparams-constructor-expected.txt:
* web-platform-tests/url/urlsearchparams-constructor.html:
* web-platform-tests/url/urltestdata.json:
* web-platform-tests/url/w3c-import.log:

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

2 years agoProxy's [[Get]] passes incorrect receiver
sbarati@apple.com [Fri, 19 May 2017 03:51:14 +0000 (03:51 +0000)]
Proxy's [[Get]] passes incorrect receiver
https://bugs.webkit.org/show_bug.cgi?id=164849
<rdar://problem/31767058>

Reviewed by Yusuke Suzuki.

JSTests:

* stress/proxy-get-set-correct-receiver.js: Added.
(assert):
(test):
(test.let.target.set prop):
(test.let.target.get prop):
(test.get let):
* stress/proxy-set.js:
(let.target.get x):
* stress/reflect-set-proxy-set.js:
(let.target.get x):
* stress/reflect-set-receiver-proxy-set.js:
(let.target.get x):

Source/JavaScriptCore:

* runtime/ProxyObject.cpp:
(JSC::performProxyGet):

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

2 years agoUnreviewed, rolling out r217079.
ryanhaddad@apple.com [Fri, 19 May 2017 03:28:06 +0000 (03:28 +0000)]
Unreviewed, rolling out r217079.

This change broke internal builds.

Reverted changeset:

"Redundant ellipsis box triggers
ASSERT_WITH_SECURITY_IMPLICATION in InlineBox::parent()."
https://bugs.webkit.org/show_bug.cgi?id=172309
http://trac.webkit.org/changeset/217079

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

2 years ago[macOS Sierra] Layout Test http/tests/dom/document-attributes-null-handling.html...
cdumez@apple.com [Fri, 19 May 2017 03:21:54 +0000 (03:21 +0000)]
[macOS Sierra] Layout Test http/tests/dom/document-attributes-null-handling.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=172311

Reviewed by Andreas Kling.

Not sure why the cookies are sometimes returned by CFNetwork in a different order. However,
what matters and what we want to test is that the cookie was actually added so make the
test not rely on a specific order to address flakiness.

* http/tests/dom/document-attributes-null-handling-expected.txt:
* http/tests/dom/document-attributes-null-handling.html:

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

2 years agoAdd Speedometer 2.0 to browserbench.org for final testing
rniwa@webkit.org [Fri, 19 May 2017 03:11:13 +0000 (03:11 +0000)]
Add Speedometer 2.0 to browserbench.org for final testing
https://bugs.webkit.org/show_bug.cgi?id=172335

Rubber-stamped by Chris Dumez.

Stage Speedometer 2.0 here for the final testing before we call it official.

* Speedometer2.0: Copied from PerformanceTests/Speedometer.
* Speedometer2.0/Full.html: Removed.
* Speedometer2.0/index.html: Copied from PerformanceTests/Speedometer/index.html.

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

2 years agoREGRESSION (r216694 - 216712): Performance test Speedometer/Full.html is failing
rniwa@webkit.org [Fri, 19 May 2017 03:05:07 +0000 (03:05 +0000)]
REGRESSION (r216694 - 216712): Performance test Speedometer/Full.html is failing
https://bugs.webkit.org/show_bug.cgi?id=172077

Reviewed by Chris Dumez.

PerformanceTests:

Rename Full.html to index.html to match the convention of other benchmarks.

* Speedometer/index.html: Renamed from PerformanceTests/Speedometer/Full.html.

Tools:

Fixed perftest.py by updating the lines to ignore in Speedometer.

Also start report the results as "Speedometer" instead of "DoYouEvenBench/Full.html" to perf.webkit.org.

* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest._lines_to_ignore_in_parser_result): Updated for Speedometer 2.0.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._collect_tests): Use "Speedometer" instead of "Speedometer/index.html" as the test name.
(_generate_results_dict): Removed the workaround to keep reporting Speedometer as DoYouEvenBench.
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(MainTest.test_collect_tests_with_index_html_and_resources): Added.

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

2 years agoSpeedometer: check-in missing React TodoMVC dependency
rniwa@webkit.org [Fri, 19 May 2017 03:03:55 +0000 (03:03 +0000)]
Speedometer: check-in missing React TodoMVC dependency
https://bugs.webkit.org/show_bug.cgi?id=172213

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-18
Reviewed by Ryosuke Niwa.

* Speedometer/resources/todomvc/architecture-examples/react/index.html: fix director.min.js path.
* Speedometer/resources/todomvc/architecture-examples/react/node_modules/director/director.min.js: Added.

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

2 years agoWeb Inspector: Release InjectedScripts when frontends close
commit-queue@webkit.org [Fri, 19 May 2017 02:59:17 +0000 (02:59 +0000)]
Web Inspector: Release InjectedScripts when frontends close
https://bugs.webkit.org/show_bug.cgi?id=172313

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-05-18
Reviewed by Andreas Kling.

* inspector/InspectorController.cpp:
(WebCore::InspectorController::disconnectFrontend):
Release inspector resources together, including discarding injected
scripts so that they may be collected.

(WebCore::InspectorController::inspectedPageDestroyed):
(WebCore::InspectorController::disconnectAllFrontends):
Move the disconnect call inside of disconnectAllFrontends to establish
a pattern of releasing web inspector resources together.

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

2 years agoUnreviewed gardening on ApplePaySession.html after r217078.
aestes@apple.com [Fri, 19 May 2017 02:55:15 +0000 (02:55 +0000)]
Unreviewed gardening on ApplePaySession.html after r217078.

The ApplePayError tests are only expected to pass when APPLE_PAY_DELEGATE is enabled, so
this breaks them out into their own file so that they can be skipped independently from
ApplePaySession.html.

* http/tests/ssl/applepay/ApplePayError-expected.txt: Added.
* http/tests/ssl/applepay/ApplePayError.html: Added.
* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:
* platform/mac-wk2/TestExpectations:

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

2 years agoRebaseline js/dom/global-constructors-attributes.html after r217078.
ryanhaddad@apple.com [Fri, 19 May 2017 02:47:41 +0000 (02:47 +0000)]
Rebaseline js/dom/global-constructors-attributes.html after r217078.

Unreviewed test gardening.

* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

2 years agoAdd a newline after the URL in showLayerTree output.
simon.fraser@apple.com [Fri, 19 May 2017 01:54:49 +0000 (01:54 +0000)]
Add a newline after the URL in showLayerTree output.

Reviewed by Zalan Bujtas.

* rendering/RenderLayer.cpp:
(WebCore::showLayerTree):

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

2 years agoAttachment drag preview should not have the attachment outline
wenson_hsieh@apple.com [Fri, 19 May 2017 01:44:56 +0000 (01:44 +0000)]
Attachment drag preview should not have the attachment outline
https://bugs.webkit.org/show_bug.cgi?id=172327
<rdar://problem/32282831>

Reviewed by Tim Horton.

When creating a drag image for an attachment element, don't include borders around the attachment.

* page/DragController.cpp:
(WebCore::DragController::startDrag):
* rendering/RenderAttachment.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintAttachment):

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

2 years agoMake WebRTC logging happen in Release
commit-queue@webkit.org [Fri, 19 May 2017 01:43:36 +0000 (01:43 +0000)]
Make WebRTC logging happen in Release
https://bugs.webkit.org/show_bug.cgi?id=172307

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-18
Reviewed by Eric Carlson.

No change of behavior.
Move from LOG(WebRTC...) to RELEASE_LOG(WebRTC...).

* Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::newICECandidate):
(WebCore::PeerConnectionBackend::doneGatheringCandidates):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::queuedCreateOffer):
(WebCore::RTCPeerConnection::queuedCreateAnswer):
(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):

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

2 years ago[MediaStream] do not cache gUM permissions
eric.carlson@apple.com [Fri, 19 May 2017 01:16:47 +0000 (01:16 +0000)]
[MediaStream] do not cache gUM permissions
https://bugs.webkit.org/show_bug.cgi?id=172245

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, updated fast/mediastream/MediaDevices-getUserMedia.html.

* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): Add salt parameter.
* platform/mediastream/RealtimeMediaSourceCenter.h:

Source/WebKit2:

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::invalidatePendingRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):
(WebKit::FrameAuthorizationState::FrameAuthorizationState): Deleted.
(WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice): Deleted.
(WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice): Deleted.
(WebKit::FrameAuthorizationState::ensureSecurityOriginsAreEqual): Deleted.
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest): Deleted.
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
(WebKit::FrameAuthorizationState::setDeviceIdentifierHashSalt): Deleted.
(WebKit::FrameAuthorizationState::deviceIdentifierHashSalt): Deleted.
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
* UIProcess/UserMediaPermissionRequestProxy.h:
(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::deviceIdentifierHashSalt):

LayoutTests:

* fast/mediastream/MediaDevices-getUserMedia-expected.txt: Updated.
* fast/mediastream/MediaDevices-getUserMedia.html:
* http/tests/media/media-stream/get-user-media-prompt-expected.txt:
* http/tests/media/media-stream/get-user-media-prompt.html:

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

2 years agoData interaction conclusion snapshot has too much margin
timothy_horton@apple.com [Fri, 19 May 2017 00:47:59 +0000 (00:47 +0000)]
Data interaction conclusion snapshot has too much margin
https://bugs.webkit.org/show_bug.cgi?id=172323
<rdar://problem/32283772>

Reviewed by Beth Dakin.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didConcludeEditDataInteraction):
Disable the default TextIndicator margin.

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

2 years agoRedundant ellipsis box triggers ASSERT_WITH_SECURITY_IMPLICATION in InlineBox::parent().
zalan@apple.com [Fri, 19 May 2017 00:37:43 +0000 (00:37 +0000)]
Redundant ellipsis box triggers ASSERT_WITH_SECURITY_IMPLICATION in InlineBox::parent().
https://bugs.webkit.org/show_bug.cgi?id=172309
<rdar://problem/32262357>

Reviewed by Simon Fraser.

Source/WebCore:

This patch stops the redundant ellipsis box trigger ASSERT_WITH_SECURITY_IMPLICATION.

In RootInlineBox::placeEllipsis we construct an ellipsis box and append it to a static HashMap which
keeps track of the ellipsis boxes on each line. However when the line already has an ellipsis, we
re-use the existing one and this newly constructed (but redundant) box gets destroyed as we return from this function.
In InlineBox's d'tor, we let the parent know that now it has a dangling child and we assert on it
later, while accessing the children list. However this redundant ellipsis box was never added to the line,
so the assertion hits incorrectly.

Test: fast/inline/redundant-ellipsis-triggers-assert-incorrectly.html

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::EllipsisBox):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::invalidateParentChildList):
* rendering/InlineBox.h:
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::placeEllipsis): Use the newly created ellipsis box instead.

LayoutTests:

* fast/inline/redundant-ellipsis-triggers-assert-incorrectly-expected.txt: Added.
* fast/inline/redundant-ellipsis-triggers-assert-incorrectly.html: Added.

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

2 years agoENABLE(APPLE_PAY_DELEGATE) should be NO on macOS Sierra and earlier
aestes@apple.com [Fri, 19 May 2017 00:00:17 +0000 (00:00 +0000)]
ENABLE(APPLE_PAY_DELEGATE) should be NO on macOS Sierra and earlier
https://bugs.webkit.org/show_bug.cgi?id=172305

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

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

2 years agoWe need to destroy worker threads in jsc.cpp
sbarati@apple.com [Thu, 18 May 2017 23:47:23 +0000 (23:47 +0000)]
We need to destroy worker threads in jsc.cpp
https://bugs.webkit.org/show_bug.cgi?id=170751
<rdar://problem/31800412>

Reviewed by Filip Pizlo.

This patch fixes a bug where a $ agent worker would still
have compilation threads running after the thread the worker
was created on dies. This manifested itself inside DFG AI where
we would notice a string constant is atomic, then the worker
thread would die, destroying its atomic string table, then
we'd notice the same string is no longer atomic, and we'd crash
because we'd fail to see the same speculated type for the same
JSValue.

This patch makes it so that $ agent workers destroy their VM when
they're done executing. Before a VM gets destroyed, it ensures that
all its compilation threads finish.

* jsc.cpp:
(functionDollarAgentStart):
(runJSC):
(jscmain):

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

2 years agoAdd a test to ensure that media controls don't trigger composting of ancestors via...
simon.fraser@apple.com [Thu, 18 May 2017 23:27:37 +0000 (23:27 +0000)]
Add a test to ensure that media controls don't trigger composting of ancestors via "isolates blending"
https://bugs.webkit.org/show_bug.cgi?id=172320

Reviewed by Dean Jackson.

Test that makes some source-less and sourced audio and video controls, and dumps
the layer tree to ensure that they didn't trigger compositing on their ancestor
stacking context element.

* media/controls-should-not-trigger-isolates-blending-expected.txt: Added.
* media/controls-should-not-trigger-isolates-blending.html: Added.

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

2 years agoTransform misplaces element 50% of the time
dino@apple.com [Thu, 18 May 2017 23:22:16 +0000 (23:22 +0000)]
Transform misplaces element 50% of the time
https://bugs.webkit.org/show_bug.cgi?id=172300
Source/WebCore:

Reviewed by Simon Fraser.

A hardware-accelerated animation of the transform property
requires layout to happen if it contains a translate operation
using percentages, otherwise it may create an incorrect
animation. The "50% of the time" comes in to play because
the layout timer may sometimes fire before the animation
timer. The test case contains a example that is much more
likely to fail without this fix.

Test: animations/needs-layout.html

* page/animation/CSSAnimationController.cpp:
(WebCore::CSSAnimationControllerPrivate::animationTimerFired): If
we've been told that we need a layout, and we have one pending, then
force it before doing the rest of the animation logic.
(WebCore::CSSAnimationController::updateAnimations): Check if the
CompositeAnimation depends on layout, and tell the private controller
that it should check for the necessity of a layout as the animation
timer fires.

* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::animate): Ask the keyframes if this
animation depends on layout.

* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::hasAnimationThatDependsOnLayout):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::computeLayoutDependency): Look at all
the keyframe properties for something that is a translation using
percentages.

* page/animation/KeyframeAnimation.h:

LayoutTests:

<rdar://problem/29835668>

Reviewed by Simon Fraser.

A test case which has an animation that relies on
translation percentages. If all goes well, the
animating element will be completely obscured.

* animations/needs-layout-expected.html: Added.
* animations/needs-layout.html: Added.

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

2 years agoSelection around attachment elements should not persist when beginning a drag
wenson_hsieh@apple.com [Thu, 18 May 2017 23:20:34 +0000 (23:20 +0000)]
Selection around attachment elements should not persist when beginning a drag
https://bugs.webkit.org/show_bug.cgi?id=172319
<rdar://problem/32283008>

Reviewed by Tim Horton.

Source/WebCore:

When beginning to drag an attachment element, save and restore the visible selection when calling out to the
injected bundle for additional data, and when creating the drag image.

Augmented an existing API test: DataInteractionTests.AttachmentElementItemProviders.

* page/DragController.cpp:
(WebCore::DragController::startDrag):

Tools:

Tests that temporary selection around an attachment does not persist longer than it needs to.

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

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

2 years agoAdd FTL whitelist debugging option
msaboff@apple.com [Thu, 18 May 2017 23:11:30 +0000 (23:11 +0000)]
Add FTL whitelist debugging option
https://bugs.webkit.org/show_bug.cgi?id=172321

Reviewed by Saam Barati.

* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::ensureGlobalFTLWhitelist):
(JSC::DFG::TierUpCheckInjectionPhase::run):
* runtime/Options.h:
* tools/FunctionWhitelist.cpp:
(JSC::FunctionWhitelist::contains):

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

2 years agoREGRESSION (r?): Web Inspector: Shift-click on color square in Styles sidebar should...
drousso@apple.com [Thu, 18 May 2017 22:33:30 +0000 (22:33 +0000)]
REGRESSION (r?): Web Inspector: Shift-click on color square in Styles sidebar should not select text
https://bugs.webkit.org/show_bug.cgi?id=171902

Reviewed by Matt Baker.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleMouseUp):
Do not attempt to select text if the element being clicked is a bookmark (such as a swatch).

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

2 years agoCleanup: Remove unused functions from RuntimeEnabledFeatures
dbates@webkit.org [Thu, 18 May 2017 22:14:54 +0000 (22:14 +0000)]
Cleanup: Remove unused functions from RuntimeEnabledFeatures
https://bugs.webkit.org/show_bug.cgi?id=172315

Reviewed by Jer Noble.

* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::htmlMediaElementEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::htmlVideoElementEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::mediaControllerEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::mediaErrorEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::timeRangesEnabled): Deleted.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setDOMIteratorEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::domIteratorEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::setGeolocationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::geolocationEnabled): Deleted.

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

2 years agoAdd an Accessibility icon to webkit.org
jond@apple.com [Thu, 18 May 2017 22:10:43 +0000 (22:10 +0000)]
Add an Accessibility icon to webkit.org
https://bugs.webkit.org/show_bug.cgi?id=172298

Reviewed by Alexey Proskuryakov.

* wp-content/themes/webkit/images/icons.svg: Added accessibility icon to the sprite.
* wp-content/themes/webkit/style.css: New rule to use the accessibility icon from the icons sprite.
(.tile.category-accessibility .background-image):

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

2 years agoImprove error message for Access-Control-Allow-Origin violation due to misconfigured...
dbates@webkit.org [Thu, 18 May 2017 21:53:59 +0000 (21:53 +0000)]
Improve error message for Access-Control-Allow-Origin violation due to misconfigured server
https://bugs.webkit.org/show_bug.cgi?id=162819
<rdar://problem/28575938>

Reviewed by Joseph Pecoraro.

LayoutTests/imported/w3c:

Update expected result.

* web-platform-tests/fetch/api/cors/cors-multiple-origins-expected.txt:
* web-platform-tests/fetch/api/cors/cors-multiple-origins-worker-expected.txt:

Source/WebCore:

Inspired by Blink change:
<https://src.chromium.org/viewvc/blink?view=revision&revision=163406>

At most one Access-Control-Allow-Origin header may be in an HTTP response. Improve the
error message emitted on a CORS failure when Access-Control-Allow-Origin contains more
than one origin, indicated by the presence of a ',', as a way to help web developers/server
administrators differentiate between a misconfigured Access-Control-Allow-Origin header
and a misconfigured server.

* loader/CrossOriginAccessControl.cpp:
(WebCore::passesAccessControlCheck): Defined a local variable to hold the value of securityOrigin.toString()
and referenced this variable throughout the code to avoid computing the stringified security
origin more than once. Switched to using makeString() to concatenate error message when the
origin of the page does not match the value of the Access-Control-Allow-Origin header.

LayoutTests:

Add more tests when Access-Control-Allow-Origin has more than one value and group
with existing tests. Update expected results.

* http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
* http/tests/xmlhttprequest/resources/origin-exact-matching-iframe.html: Also extracted
the origin string for the page into a local variable called pageOrigin, making use of document.origin,
and referenced this variable instead of duplicating its value. Fixed various style nits.

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

2 years agoResource Load Statistics: Grandfather domains for existing data records
wilander@apple.com [Thu, 18 May 2017 21:50:04 +0000 (21:50 +0000)]
Resource Load Statistics: Grandfather domains for existing data records
https://bugs.webkit.org/show_bug.cgi?id=172155
<rdar://problem/24913532>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/grandfathering.html

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setGrandfathered):
(WebCore::ResourceLoadObserver::isGrandfathered):
(WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
(WebCore::ResourceLoadObserver::setGrandfatheringTime):
    Functions for testing and configuration.
    ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval() changed as a result of moving
    WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval() here.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatisticsStore.cpp:
(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
    Now contains endOfGrandfatheringTimestamp.
(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
    Now makes a call to m_grandfatherExistingWebsiteDataHandler().
(WebCore::ResourceLoadStatisticsStore::setGrandfatherExistingWebsiteDataCallback):
(WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
    Changed as a result of moving
    WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval() here.
(WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
(WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
    Renamed since it now also takes grandfathering into account.
(WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
    Fixed typo in local variable name.
(WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
(WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::dataRecordsWereRemoved):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::prevalentResourceDomainsWithoutUserInteraction): Deleted.
    Replaced by ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor().
* loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

When WebResourceLoadStatisticsStore starts fresh it needs
to scan existing website data records and 'grandfather' them to
allow ample time to capture user interaction.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
(WKResourceLoadStatisticsManagerSetGrandfathered):
(WKResourceLoadStatisticsManagerIsGrandfathered):
(WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
(WKResourceLoadStatisticsManagerSetGrandfatheringTime):
    Functions for testing and configuration.
* UIProcess/API/C/WKResourceLoadStatisticsManager.h:
* UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
    Added grandfathering configuration.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
    New function to get all top privately controlled domains that
    have website data.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
    Functions for testing and configuration.
    WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
    as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
    moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
* UIProcess/WebResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::initializeDataTypesToRemove):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
    Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
    that's where grandfathering happens.
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
    Moved registration of write persistent store callback and reading of Cocoa defaults to
    WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
    so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
    Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
    as handler for grandfathering since it involves reading of the website data store.
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
    Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
    New function to ask a WebsiteDataRecord for its top privately controlled domain.
* UIProcess/WebsiteData/WebsiteDataRecord.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
    New function to get all top privately controlled domains that
    have website data.
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Adds test infrastructure needed for the added functionality.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsGrandfathered):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback):
(WTR::TestRunner::statisticsDidScanDataRecordsCallback):
(WTR::TestRunner::setStatisticsGrandfatheringTime):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsGrandfathered):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::setStatisticsGrandfatheringTime):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/grandfathering-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/grandfathering.html: Added.
* platform/wk2/TestExpectations:
    Marked it Pass for WebKit2.

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

2 years agoWeb Inspector: Web Socket Document Icon
commit-queue@webkit.org [Thu, 18 May 2017 21:44:36 +0000 (21:44 +0000)]
Web Inspector: Web Socket Document Icon
https://bugs.webkit.org/show_bug.cgi?id=170023

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-05-18
Reviewed by Matt Baker.

Icons made by Jon Davis.

* UserInterface/Images/WebSocket.png: Added.
* UserInterface/Images/WebSocket@2x.png: Added.
* UserInterface/Images/WebSocketLarge.png: Added.
* UserInterface/Images/WebSocketLarge@2x.png: Added.
New icons for Web Socket resources.

* UserInterface/Views/ResourceIcons.css:
(body:matches(.mac-platform, .windows-platform) .resource-icon.resource-type-websocket .icon):
(body:matches(.mac-platform, .windows-platform) .large .resource-icon.resource-type-websocket .icon):
Use the icon.

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

2 years agoBindings: Require value for extended attributes EnabledAtRuntime and EnabledForWorld
dbates@webkit.org [Thu, 18 May 2017 21:35:31 +0000 (21:35 +0000)]
Bindings: Require value for extended attributes EnabledAtRuntime and EnabledForWorld
https://bugs.webkit.org/show_bug.cgi?id=172252

Reviewed by Sam Weinig.

According to Sam Weinig it is an anti-feature that EnabledAtRuntime can be specified
without a value. We should make it require a value for the name of the RuntimeEnabledFeatures
function to use in the generated code. For similar reasons we should also require
a value for the extended attribute EnabledForWorld.

* Modules/websockets/WebSocket.idl: Substitute EnabledAtRuntime=WebSocket for EnabledAtRuntime.
* bindings/scripts/CodeGeneratorJS.pm:
(GetRuntimeEnableFunctionName):
* html/HTMLAudioElement.idl: Substitute EnabledAtRuntime=Audio for EnabledAtRuntime.
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::audioEnabled):
(WebCore::RuntimeEnabledFeatures::htmlAudioElementEnabled): Deleted. This function duplicated
the functionality of RuntimeEnabledFeatures::audioEnabled(). Instead we explicitly
write EnabledAtRuntime=Audio in HTMLAudioElement.idl to use RuntimeEnabledFeatures::audioEnabled()
to determine whether to expose/conceal the HTMLAudioElement global constructor at runtime.
* page/RuntimeEnabledFeatures.h:

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

2 years agoFix wasm-mem-post-message.html test expectations
keith_miller@apple.com [Thu, 18 May 2017 20:49:36 +0000 (20:49 +0000)]
Fix wasm-mem-post-message.html test expectations
https://bugs.webkit.org/show_bug.cgi?id=172308

Unreviewed, test gardening.

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

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

2 years agoAllow nested timers to propagate user gestures so long as the total nested interval...
jer.noble@apple.com [Thu, 18 May 2017 20:32:01 +0000 (20:32 +0000)]
Allow nested timers to propagate user gestures so long as the total nested interval is less than 1s.
https://bugs.webkit.org/show_bug.cgi?id=172173

Reviewed by Andy Estes.

Source/WebCore:

Test: media/restricted-audio-playback-with-multiple-settimeouts.html

Store the current nested timer interval in DOMTimerFireState, and use that value to propagate the
nested interval through multiple invocations of setTimeout().

Drive-by fix: instead of manually resetting the nesting level in DOMTimer::fired(), add the
nesting level to the DOMTimerFireState, and reset the nesting level on the state's destruction.
This fixes one place in DOMTimer::fire() where an early return lead to the timer's nesting level
not being reset.

* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::DOMTimerFireState):
(WebCore::DOMTimerFireState::~DOMTimerFireState):
(WebCore::DOMTimerFireState::nestedTimerInterval):
(WebCore::shouldForwardUserGesture):
(WebCore::userGestureTokenToForward):
(WebCore::currentNestedTimerInterval):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:

LayoutTests:

* fast/events/popup-blocked-from-untrusted-mouse-click.html:
* fast/events/popup-blocking-timers4-expected.txt: Removed.
* fast/events/popup-blocking-timers4.html: Removed.
* media/restricted-audio-playback-with-multiple-settimeouts-expected.txt: Added.
* media/restricted-audio-playback-with-multiple-settimeouts.html: Added.
* platform/ios/TestExpectations:

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

2 years agoConstructor calls set this too early
fpizlo@apple.com [Thu, 18 May 2017 19:55:01 +0000 (19:55 +0000)]
Constructor calls set this too early
https://bugs.webkit.org/show_bug.cgi?id=172302

Reviewed by Saam Barati.

JSTests:

This tests all three kinds of constructs in BytecodeGenerator. All three were previously
wrong.

* stress/construct-overwritten-variable.js: Added.
(new.x.x):
* stress/construct-spread-overwritten-variable-2.js: Added.
(new.x.x):
* stress/construct-spread-overwritten-variable.js: Added.
(new.x.x):

Source/JavaScriptCore:

We were setting this before evaluating the arguments, so this code:

    var x = 42;
    new x(x = function() { });

Would crash because we would pass 42 as this, and create_this would treat it as a cell.
Dereferencing a non-cell is guaranteed to crash.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::NewExprNode::emitBytecode):
(JSC::FunctionCallValueNode::emitBytecode):

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

2 years agoEvaluating window named element may return wrong result
dbates@webkit.org [Thu, 18 May 2017 19:40:48 +0000 (19:40 +0000)]
Evaluating window named element may return wrong result
https://bugs.webkit.org/show_bug.cgi?id=166792
<rdar://problem/29801059>

Reviewed by Chris Dumez.

Add tests to ensure we do not regress evaluation of window named elements.

* http/tests/security/named-window-property-from-same-origin-inactive-document-expected.txt: Added.
* http/tests/security/named-window-property-from-same-origin-inactive-document.html: Added.
* http/tests/security/resources/innocent-victim-with-named-elements.html: Added.
* http/tests/security/xss-DENIED-named-window-property-from-cross-origin-inactive-document-expected.txt: Added.
* http/tests/security/xss-DENIED-named-window-property-from-cross-origin-inactive-document.html: Added.

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

2 years agoWebAssembly: perform stack checks
sbarati@apple.com [Thu, 18 May 2017 19:38:10 +0000 (19:38 +0000)]
WebAssembly: perform stack checks
https://bugs.webkit.org/show_bug.cgi?id=165546
<rdar://problem/29760307>

Reviewed by Filip Pizlo.

JSTests:

* wasm.yaml:
* wasm/function-tests/factorial.js:
* wasm/function-tests/float-sub.js:
* wasm/function-tests/stack-overflow.js: Added.
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.assertOverflows):
(assertOverflows.makeInstance):
(assertOverflows.makeInstance2):
(assertOverflows.assertThrows):
(assertOverflows):
(assertThrows.test.makeSignature):
(assertThrows.test.makeInstance):
(assertThrows.test):
(assertThrows):

Source/JavaScriptCore:

This patch adds stack checks to wasm. It implements it by storing the stack
bounds on the Context.

Stack checking works as normal, except we do a small optimization for terminal
nodes in the call tree (nodes that don't make any calls). These nodes will
only do a stack check if their frame size is beyond 1024 bytes. Otherwise,
it's assumed the parent that called them did their stack check for them.
This is because all things that make calls make sure to do an extra 1024
bytes whenever doing a stack check.

We also take into account stack size for potential JS calls when doing
stack checks since our JS stubs don't do this on their own. Each frame
will ensure it does a stack check large enough for any potential JS call
stubs it'll execute.

Surprisingly, this patch is neutral on WasmBench and TitzerBench.

* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
* runtime/Error.cpp:
(JSC::createRangeError):
(JSC::addErrorInfoAndGetBytecodeOffset):
I fixed a bug here where we assumed that the first frame that has line
and column info would be in our stack trace. This is not correct
since we limit our stack trace size. If everything in our limited
size stack trace is Wasm, then we won't have any frames with line
and column info.
* runtime/Error.h:
* runtime/ExceptionHelpers.cpp:
(JSC::createStackOverflowError):
* runtime/ExceptionHelpers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::webAssemblyToJSCalleeStructure):
* runtime/JSType.h:
* runtime/Options.h: I've added a new option that controls
whether or not we use fast TLS for the wasm context.
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
* wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* wasm/WasmContext.cpp:
(JSC::Wasm::loadContext):
(JSC::Wasm::storeContext):
* wasm/WasmContext.h:
(JSC::Wasm::useFastTLSForContext):
* wasm/WasmExceptionType.h:
* wasm/WasmMemoryInformation.h:
(JSC::Wasm::PinnedRegisterInfo::toSave):
* wasm/WasmThunks.cpp:
(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::throwStackOverflowFromWasmThunkGenerator):
(JSC::Wasm::Thunks::stub):
* wasm/WasmThunks.h:
* wasm/js/JSWebAssemblyInstance.h:
(JSC::JSWebAssemblyInstance::offsetOfCachedStackLimit):
(JSC::JSWebAssemblyInstance::cachedStackLimit):
(JSC::JSWebAssemblyInstance::setCachedStackLimit):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::finishCreation):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
* wasm/js/WebAssemblyToJSCallee.cpp: Make this a descendent of object.
This is needed for correctness because we may call into JS,
and then the first JS frame could stack overflow. When it stack
overflows, it rolls back one frame to the wasm->js call stub with
the wasm->js callee. It gets the lexical global object from this
frame, meaning it gets the global object from the callee. Therefore,
we must make it an object since all objects have global objects.
(JSC::WebAssemblyToJSCallee::create):
* wasm/js/WebAssemblyToJSCallee.h:

Tools:

Add some new testing modes for using and not using fast TLS wasm contexts.

* Scripts/run-jsc-stress-tests:

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

2 years agoRealtimeOutgoingAudioSource should use the source sample rate
commit-queue@webkit.org [Thu, 18 May 2017 19:07:55 +0000 (19:07 +0000)]
RealtimeOutgoingAudioSource should use the source sample rate
https://bugs.webkit.org/show_bug.cgi?id=172297

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-18
Reviewed by Eric Carlson.

Covered by manual tests.

* platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp:
(WebCore::RealtimeOutgoingAudioSource::audioSamplesAvailable): Using the audio source sample rate so that the converter does the right conversion.

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

2 years agoAdd "countryCode" to ApplePayErrorContactField
aestes@apple.com [Thu, 18 May 2017 18:57:10 +0000 (18:57 +0000)]
Add "countryCode" to ApplePayErrorContactField
https://bugs.webkit.org/show_bug.cgi?id=172264
<rdar://problem/32004909>

Reviewed by Anders Carlsson.

Source/WebCore:

Added ApplePayError tests to http/tests/ssl/applepay/ApplePaySession.html

* Modules/applepay/ApplePayError.idl:
* Modules/applepay/PaymentRequest.h:

Source/WebKit2:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toNSError):

LayoutTests:

* http/tests/ssl/applepay/ApplePaySession-expected.txt:
* http/tests/ssl/applepay/ApplePaySession.html:

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

2 years agoCleanup: Remove unnecessary call to AddToImplIncludes("RuntimeEnabledFeatures.h"...
dbates@webkit.org [Thu, 18 May 2017 18:56:32 +0000 (18:56 +0000)]
Cleanup: Remove unnecessary call to AddToImplIncludes("RuntimeEnabledFeatures.h") in GenerateImplementation()
https://bugs.webkit.org/show_bug.cgi?id=172236

Reviewed by Chris Dumez.

It is unnecessary for GenerateImplementation() to explicitly call AddToImplIncludes("RuntimeEnabledFeatures.h")
to add the header RuntimeEnabledFeatures.h to the list of headers in the generated implementation
as this header is added when GetRuntimeEnableFunctionName() is called. And GenerateImplementation()
calls GetRuntimeEnableFunctionName().

No functionality changed. So, no new tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

2 years agoAutomaticThread should wait longer before timing out
ggaren@apple.com [Thu, 18 May 2017 18:56:15 +0000 (18:56 +0000)]
AutomaticThread should wait longer before timing out
https://bugs.webkit.org/show_bug.cgi?id=172292

Reviewed by Filip Pizlo.

Increased the idle timeout from 1s => 10s.

This reduces the number of thread restarts on JetStream from
~150 => ~0. It also matches other thread pool APIs on Darwin.

Intuitively, it seems wrong for helper threads to idle exit during
hardcore benchmarking.

This patch in combination with a bmalloc fix seems to be a 1%-2% JetStream
speedup on my Mac Pro.

A nice side-benefit is that per-thread traces are easier to read.

* wtf/AutomaticThread.cpp:
(WTF::AutomaticThread::start):
* wtf/AutomaticThread.h:

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

2 years agoREGRESSION (r209608): Cross-origin plugin document opened in child window blocked...
dbates@webkit.org [Thu, 18 May 2017 18:55:45 +0000 (18:55 +0000)]
REGRESSION (r209608): Cross-origin plugin document opened in child window blocked by parent
window CSP when object-src 'none' is set
https://bugs.webkit.org/show_bug.cgi?id=172038
<rdar://problem/32258262>

Reviewed by Andy Estes.

Source/WebCore:

Fixes an issue where a cross-origin plugin document opened in a child window would inherit
the Content Security Policy (CSP) of its opener. In particular, a cross-origin plugin
document opened in a child window would be blocked when the CSP of its opener disallows
plugins (e.g. object-source 'none').

Prior to r209608 a document opened in a child window never inherited the CSP from its opener
and a plugin document loaded in a subframe would unconditionally inherit the CSP from its
parent frame. So, a plugin document opened in a child window would be allowed to load
regardless of whether its opener had a CSP that prevented plugins. Following r209608 a
document opened in a child window would inherit its CSP from its opener if and only if it
would inherit the security origin from its opener (e.g. about:blank) or was a plugin
document. The latter condition makes plugin documents opened in a child window unconditionally
inherit the CSP from their opener and is the cause of this bug. It seems reasonable to exempt
cross-origin plugin documents opened in a child window from the CSP inheritance rule because
such documents cannot compromise the origin of their opener. Same-origin plugin documents
opened in a child window will continue to inherit the CSP from their opener because such
documents can compromise the origin of their opener.

Tests: http/tests/security/contentSecurityPolicy/cross-origin-plugin-document-allowed-in-child-window.html
       http/tests/security/contentSecurityPolicy/plugin-blocked-in-about-blank-window.html
       http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window.html

* dom/Document.cpp:
(WebCore::Document::shouldInheritContentSecurityPolicyFromOwner): Added.
(WebCore::Document::initContentSecurityPolicy):
* dom/Document.h:

Tools:

Teach the test Netscape plugin to look for a URL that contains plugin-document-alert-and-notify-done.pl.
When it sees this URL it will show a JavaScript alert and call testRunner.notifyDone().

* DumpRenderTree/TestNetscapePlugIn/main.cpp:
(NPP_New):

LayoutTests:

Adds tests to ensure that a same-origin- and cross-origin- plugin document opened in a child
window inherit and do not inherit the CSP of its opener, respectively. Also adds a test to
ensure that an about:blank window inherits the CSP plugin policy of its opener.

* http/tests/plugins/resources/plugin-document-alert-and-notify-done.pl: Added.
* http/tests/security/contentSecurityPolicy/cross-origin-plugin-document-allowed-in-child-window-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/cross-origin-plugin-document-allowed-in-child-window.html: Added.
* http/tests/security/contentSecurityPolicy/plugin-blocked-in-about-blank-window-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/plugin-blocked-in-about-blank-window.html: Added.
* http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/same-origin-plugin-document-blocked-in-child-window.html: Added.
* platform/ios/TestExpectations: Skip added tests as iOS does not support plugins.

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

2 years ago[Win] Many layout tests are failing.
pvollan@apple.com [Thu, 18 May 2017 18:26:29 +0000 (18:26 +0000)]
[Win] Many layout tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=172286

Reviewed by Brent Fulgham.

Add a FIXME comment about unimplemented functions, instead of writing this to the test result file.

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::grantWebNotificationPermission):
(TestRunner::denyWebNotificationPermission):
(TestRunner::removeAllWebNotificationPermissions):
(TestRunner::simulateWebNotificationClick):

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

2 years agoWebAssembly API: test with neutered inputs
keith_miller@apple.com [Thu, 18 May 2017 18:22:19 +0000 (18:22 +0000)]
WebAssembly API: test with neutered inputs
https://bugs.webkit.org/show_bug.cgi?id=163899

Reviewed by JF Bastien.

JSTests:

* wasm/js-api/neutered-inputs.js: Added.
(const.testFunction):
(const.testConstructor):
* wasm/js-api/test_basic_api.js:
(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

Add tests to check that we properly throw a type error when
we get a transferred ArrayBuffer. Also, we should make sure
we cannot post message a wasm memory's ArrayBuffer.

* API/JSTypedArray.cpp:
(JSObjectGetArrayBufferBytesPtr):
* runtime/ArrayBuffer.cpp:
(JSC::ArrayBuffer::makeShared):
(JSC::ArrayBuffer::makeWasmMemory):
(JSC::ArrayBuffer::transferTo):
(JSC::ArrayBuffer::neuter):
(JSC::ArrayBuffer::notifyIncommingReferencesOfTransfer):
(JSC::errorMesasgeForTransfer):
* runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::isLocked):
(JSC::ArrayBuffer::isWasmMemory):
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::buffer):
(JSC::JSWebAssemblyMemory::grow):

Source/WebCore:

Make it not possible to transfer an ArrayBuffer that is backed by a
wasm memory.

Test: workers/wasm-mem-post-message.html

* bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::create):

LayoutTests:

This patch dups Saam's de-modularized builder.

* workers/sab/postMessage-transfer-type-error-expected.txt:
* workers/wasm-mem-post-message-expected.txt: Added.
* workers/wasm-mem-post-message.html: Added.
* workers/wasm-mem-post-message/test.js: Added.
(worker.onmessage):
* workers/wasm-mem-post-message/worker.js: Added.
(onmessage):
* workers/wasm-resources/builder.js: Added.
(const._fail):
(const.isNotA.assert.isNotA):
(const):
(switch.typeof):
(Builder):
(Builder.prototype.setChecked):
(Builder.prototype.setPreamble):
(Builder.prototype._functionIndexSpaceKeyHash):
(Builder.prototype._registerFunctionToIndexSpace):
(Builder.prototype._getFunctionFromIndexSpace):
(Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
(Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.const.codeBuilder.End.switch.case.string_appeared_here.e):
(Builder.prototype._registerSectionBuilders.this.Unknown):

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

2 years agoRemote Inspector: Be stricter about checking message types
joepeck@webkit.org [Thu, 18 May 2017 18:09:24 +0000 (18:09 +0000)]
Remote Inspector: Be stricter about checking message types
https://bugs.webkit.org/show_bug.cgi?id=172259
<rdar://problem/32264839>

Reviewed by Brian Burg.

* inspector/remote/cocoa/RemoteInspectorCocoa.mm:
(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::RemoteInspector::receivedDataMessage):
(Inspector::RemoteInspector::receivedDidCloseMessage):
(Inspector::RemoteInspector::receivedIndicateMessage):
(Inspector::RemoteInspector::receivedConnectionDiedMessage):
(Inspector::RemoteInspector::receivedAutomaticInspectionConfigurationMessage):
(Inspector::RemoteInspector::receivedAutomaticInspectionRejectMessage):
(Inspector::RemoteInspector::receivedAutomationSessionRequestMessage):
* inspector/remote/cocoa/RemoteInspectorXPCConnection.mm:
(Inspector::RemoteInspectorXPCConnection::deserializeMessage):
(Inspector::RemoteInspectorXPCConnection::handleEvent):
(Inspector::RemoteInspectorXPCConnection::sendMessage):
Bail if we don't receive the expected types for message data.

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

2 years agoDFG inlining should be hardened for the no-result case
fpizlo@apple.com [Thu, 18 May 2017 17:46:38 +0000 (17:46 +0000)]
DFG inlining should be hardened for the no-result case
https://bugs.webkit.org/show_bug.cgi?id=172290

Reviewed by Saam Barati.
JSTests:

* stress/array-constructor-no-result.js: Added.
(foo):
* stress/pow-no-result.js: Added.
(foo):

Source/JavaScriptCore:

Previously, if we were inlining a setter call, we might have a bad time because the setter's
result register is the invalid VirtualRegister(), and much of the intrinsic handling code
assumes that the result register is valid.

This doesn't usually cause problems because people don't usually point a setter at something
that we recognize as an intrinsic.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/air/AirAllocateRegistersAndStackByLinearScan.cpp: Fix a comment.
* dfg/DFGByteCodeParser.cpp: Make RELEASE_ASSERT give accurate stacks. I was getting an absurd stack from the assert I added in DelayedSetLocal.
(JSC::DFG::ByteCodeParser::DelayedSetLocal::DelayedSetLocal): Assert so we catch the problem sooner.
(JSC::DFG::ByteCodeParser::handleIntrinsicCall): Fix the bug.
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction): Fix the bug if constant internal functions were setter-inlineable (they ain't, because the bytecode parser doesn't fold GetSetter).
* runtime/Intrinsic.cpp: Added. I needed this to debug.
(JSC::intrinsicName):
(WTF::printInternal):
* runtime/Intrinsic.h:

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

2 years agoUnreviewed, rolling out r217031, r217032, and r217037.
commit-queue@webkit.org [Thu, 18 May 2017 17:42:43 +0000 (17:42 +0000)]
Unreviewed, rolling out r217031, r217032, and r217037.
https://bugs.webkit.org/show_bug.cgi?id=172293

cause linking errors in Windows (Requested by yusukesuzuki on
#webkit).

Reverted changesets:

"[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass"
https://bugs.webkit.org/show_bug.cgi?id=172098
http://trac.webkit.org/changeset/217031

"Unreviewed, rebaseline for newly added ClassInfo"
https://bugs.webkit.org/show_bug.cgi?id=172098
http://trac.webkit.org/changeset/217032

"Unreviewed, fix debug and non-JIT build"
https://bugs.webkit.org/show_bug.cgi?id=172098
http://trac.webkit.org/changeset/217037

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

2 years agoProtect MediaDeviceRequest instance during context destruction.
pvollan@apple.com [Thu, 18 May 2017 17:17:02 +0000 (17:17 +0000)]
Protect MediaDeviceRequest instance during context destruction.
https://bugs.webkit.org/show_bug.cgi?id=172285
<rdar://problem/30369017>

Reviewed by Brent Fulgham.

In MediaDevicesRequest::contextDestroyed(), the call to m_enumerationRequest->cancel() might
end up deleting itself (MediaDevicesRequest). The std::function member m_completionHandler
in MediaDevicesEnumerationRequest contains a captured variable of type
RefPtr<MediaDevicesRequest>. When m_completionHandler is set to null in the cancel() method,
the MediaDevicesRequest object will be deleted if the m_completionHandler member is holding
the last reference.

No new tests, since I am unable to reproduce.

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::contextDestroyed):

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

2 years agoUpdate web-platform-tests tools
cdumez@apple.com [Thu, 18 May 2017 17:07:51 +0000 (17:07 +0000)]
Update web-platform-tests tools
https://bugs.webkit.org/show_bug.cgi?id=172247

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline tests now that WPT tools were updated.

* web-platform-tests/FileAPI/idlharness-expected.txt:
* web-platform-tests/FileAPI/idlharness.worker-expected.txt:
* web-platform-tests/FileAPI/url/multi-global-origin-serialization.sub-expected.txt:
* web-platform-tests/IndexedDB/interfaces-expected.txt:
* web-platform-tests/IndexedDB/interfaces.worker-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits-expected.txt:
* web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys-expected.txt:
* web-platform-tests/WebCryptoAPI/idlharness-expected.txt:
* web-platform-tests/WebCryptoAPI/idlharness.worker-expected.txt:
* web-platform-tests/XMLHttpRequest/formdata-foreach-expected.txt:
* web-platform-tests/XMLHttpRequest/interfaces-expected.txt:
* web-platform-tests/XMLHttpRequest/responsetype-expected.txt:
* web-platform-tests/XMLHttpRequest/timeout-sync-expected.txt:
* web-platform-tests/background-fetch/interfaces.worker-expected.txt:
* web-platform-tests/cors/origin-expected.txt:
* web-platform-tests/custom-elements/custom-element-registry/define-expected.txt:
* web-platform-tests/custom-elements/parser/parser-fallsback-to-unknown-element-expected.txt:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_01-expected.txt:
* web-platform-tests/dom/nodes/Document-contentType/contentType/contenttype_datauri_02-expected.txt:
* web-platform-tests/encoding/idlharness-expected.txt:
* web-platform-tests/fetch/api/basic/integrity-sharedworker-expected.txt:
* web-platform-tests/fetch/api/headers/headers-idl-expected.txt:
* web-platform-tests/fetch/api/request/request-idl-expected.txt:
* web-platform-tests/fetch/api/response/response-idl-expected.txt:
* web-platform-tests/hr-time/idlharness-expected.txt:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:
* web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html:
* web-platform-tests/html/dom/reflection-embedded-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-1-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/allow-scripts-flag-changing-2-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/moving-documents-expected.txt:
* web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/HTMLElement/HTMLTrackElement/srclang-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/language-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/ready-states/autoplay-with-slow-text-tracks-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-parse-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-expected.txt:
* web-platform-tests/html/webappapis/scripting/processing-model-2/window-onerror-runtime-error-throw-expected.txt:
* web-platform-tests/notifications/interfaces-expected.txt:
* web-platform-tests/resource-timing/idlharness-expected.txt:
* web-platform-tests/resource-timing/rt-initiatorType-other-expected.txt:
* web-platform-tests/resources/idlharness.js:
(set exposed):
(IdlArray.prototype.test):
(IdlArray.prototype.assert_type_is):
(IdlInterface.prototype.test_self):
(IdlInterface.prototype.add_iterable_members):
(IdlInterface.prototype.test_member_iterable):
(IdlInterface.prototype.test_members):
(IdlInterface.prototype.test_primary_interface_of):
(IdlInterface.prototype.test_interface_of):
(IdlInterface.prototype.do_interface_attribute_asserts):
(IdlTypedef):
* web-platform-tests/resources/testharness.js:
(WindowTestEnvironment):
(WindowTestEnvironment.prototype._dispatch):
(WindowTestEnvironment.prototype._forEach_windows):
(ServiceWorkerTestEnvironment):
(promise_test):
* web-platform-tests/shadow-dom/Document-prototype-currentScript-expected.txt:
* web-platform-tests/streams/byte-length-queuing-strategy.sharedworker-expected.txt:
* web-platform-tests/streams/count-queuing-strategy.sharedworker-expected.txt:
* web-platform-tests/streams/piping/close-propagation-backward.sharedworker-expected.txt:
* web-platform-tests/streams/piping/close-propagation-forward.sharedworker-expected.txt:
* web-platform-tests/streams/piping/error-propagation-backward.sharedworker-expected.txt:
* web-platform-tests/streams/piping/error-propagation-forward.sharedworker-expected.txt:
* web-platform-tests/streams/piping/flow-control.sharedworker-expected.txt:
* web-platform-tests/streams/piping/general-expected.txt:
* web-platform-tests/streams/piping/general.sharedworker-expected.txt:
* web-platform-tests/streams/piping/multiple-propagation.sharedworker-expected.txt:
* web-platform-tests/streams/piping/pipe-through.sharedworker-expected.txt:
* web-platform-tests/streams/piping/transform-streams.sharedworker-expected.txt:
* web-platform-tests/streams/readable-byte-streams/general.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/bad-strategies.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/bad-underlying-sources.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/brand-checks.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/cancel.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/count-queuing-strategy-integration.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/default-reader.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/floating-point-total-queue-size.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/garbage-collection.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/general.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/pipe-through.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/readable-stream-reader.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/tee.sharedworker-expected.txt:
* web-platform-tests/streams/readable-streams/templated.sharedworker-expected.txt:
* web-platform-tests/tools/browserutils/__init__.py: Added.
* web-platform-tests/tools/browserutils/browser.py: Added.
(path):
(Browser):
(Browser.install):
(Browser.install_webdriver):
(Browser.version):
(Browser.requirements):
(Browser.prepare_environment):
(Firefox):
(Firefox.platform_string):
(Firefox.platform_string_geckodriver):
(Firefox.latest_nightly_listing):
(Firefox.get_from_nightly):
(Firefox.install):
(Firefox.find_binary):
(Firefox.find_certutil):
(Firefox.find_webdriver):
(Firefox.install_certutil):
(Firefox.install_prefs):
(Firefox._latest_geckodriver_version):
(Firefox.install_webdriver):
(Firefox.version):
(Chrome):
(Chrome.platform_string):
(Chrome.install):
(Chrome.find_webdriver):
(Chrome.install_webdriver):
(Chrome.version):
(Chrome.prepare_environment):
* web-platform-tests/tools/browserutils/utils.py: Added.
(Kwargs):
(Kwargs.set_if_none):
(call):
(get_git_cmd):
(get_git_cmd.git):
(seekable):
(untar):
(unzip):
(pwd):
(pwd.__init__):
(pwd.__enter__):
(pwd.__exit__):
(get):
* web-platform-tests/tools/browserutils/virtualenv.py: Added.
(Virtualenv):
(Virtualenv.__init__):
(Virtualenv.exists):
(Virtualenv.create):
(Virtualenv.bin_path):
(Virtualenv.pip_path):
(Virtualenv.activate):
(Virtualenv.start):
(Virtualenv.install_requirements):
* web-platform-tests/tools/browserutils/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/performance/w3c-import.log.
* web-platform-tests/tools/conftest.py:
* web-platform-tests/tools/gitignore/tests/w3c-import.log:
* web-platform-tests/tools/gitignore/w3c-import.log:
* web-platform-tests/tools/html5lib/doc/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/filters/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/serializer/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/performance/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/encoding/chardet/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/encoding/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/sanitizer/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/serializer/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/sniffer/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/tokenizer/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/tree-construction/scripted/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/tree-construction/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/validator/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/testdata/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/tests/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/treeadapters/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/treebuilders/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/treewalkers/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/trie/w3c-import.log:
* web-platform-tests/tools/html5lib/html5lib/w3c-import.log:
* web-platform-tests/tools/html5lib/utils/w3c-import.log:
* web-platform-tests/tools/html5lib/w3c-import.log:
* web-platform-tests/tools/lint/lint.py:
* web-platform-tests/tools/lint/tests/dummy/css-unique/match/support/tools/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/match/support/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/match/tools/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/match/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/not-match/support/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/not-match/tools/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/not-match/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/selectors/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/support/tools/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/support/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/tools/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css-unique/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/css/work-in-progress/foo/support/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/ref/w3c-import.log:
* web-platform-tests/tools/lint/tests/dummy/w3c-import.log:
* web-platform-tests/tools/lint/tests/w3c-import.log:
* web-platform-tests/tools/lint/w3c-import.log:
* web-platform-tests/tools/localpaths.py:
* web-platform-tests/tools/manifest/catalog/w3c-import.log:
* web-platform-tests/tools/manifest/tests/w3c-import.log:
* web-platform-tests/tools/manifest/w3c-import.log:
* web-platform-tests/tools/pytest.ini:
* web-platform-tests/tools/pytest/_pytest/_code/w3c-import.log:
* web-platform-tests/tools/pytest/_pytest/assertion/w3c-import.log:
* web-platform-tests/tools/pytest/_pytest/vendored_packages/pluggy-0.3.1.dist-info/w3c-import.log:
* web-platform-tests/tools/pytest/_pytest/vendored_packages/w3c-import.log:
* web-platform-tests/tools/pytest/_pytest/w3c-import.log:
* web-platform-tests/tools/pytest/bench/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/_templates/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/_themes/flask/static/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/_themes/flask/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/_themes/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/announce/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/assertion/global_testmodule_config/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/assertion/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/costlysetup/sub1/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/costlysetup/sub2/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/costlysetup/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/layout1/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/nonpython/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/py2py3/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/example/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/img/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/test/plugin/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/test/w3c-import.log:
* web-platform-tests/tools/pytest/doc/en/w3c-import.log:
* web-platform-tests/tools/pytest/extra/setup-py.test/w3c-import.log:
* web-platform-tests/tools/pytest/extra/w3c-import.log:
* web-platform-tests/tools/pytest/testing/code/w3c-import.log:
* web-platform-tests/tools/pytest/testing/cx_freeze/tests/w3c-import.log:
* web-platform-tests/tools/pytest/testing/cx_freeze/w3c-import.log:
* web-platform-tests/tools/pytest/testing/python/w3c-import.log:
* web-platform-tests/tools/pytest/testing/w3c-import.log:
* web-platform-tests/tools/pytest/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/example/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/test/cert/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/sub/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/test/testdata/handlers/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/test/testdata/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/test/w3c-import.log:
* web-platform-tests/tools/pywebsocket/src/w3c-import.log:
* web-platform-tests/tools/runner/css/w3c-import.log:
* web-platform-tests/tools/runner/fonts/w3c-import.log:
* web-platform-tests/tools/runner/w3c-import.log:
* web-platform-tests/tools/scripts/w3c-import.log:
* web-platform-tests/tools/serve/w3c-import.log:
* web-platform-tests/tools/six/documentation/w3c-import.log:
* web-platform-tests/tools/six/w3c-import.log:
* web-platform-tests/tools/sslutils/w3c-import.log:
* web-platform-tests/tools/tox.ini:
* web-platform-tests/tools/w3c-import.log:
* web-platform-tests/tools/webdriver/README.md:
* web-platform-tests/tools/webdriver/w3c-import.log:
* web-platform-tests/tools/webdriver/webdriver/client.py:
(Element.send_keys):
* web-platform-tests/tools/webdriver/webdriver/w3c-import.log:
* web-platform-tests/tools/wptrun.py: Added.
(WptrunnerHelpAction):
(WptrunnerHelpAction.__init__):
(WptrunnerHelpAction.__call__):
(create_parser):
(exit):
(args_general):
(check_environ):
(prompt_install):
(args_firefox):
(setup_firefox):
(args_chrome):
(setup_chrome):
(setup_edge):
(setup_sauce):
(setup_servo):
(setup_wptrunner):
(main):
* web-platform-tests/tools/wptrunner/LICENSE: Renamed from LayoutTests/imported/w3c/web-platform-tests/tools/LICENSE.
* web-platform-tests/tools/wptrunner/MANIFEST.in: Added.
* web-platform-tests/tools/wptrunner/README.rst: Added.
* web-platform-tests/tools/wptrunner/docs/Makefile: Added.
* web-platform-tests/tools/wptrunner/docs/architecture.svg: Added.
* web-platform-tests/tools/wptrunner/docs/conf.py: Added.
* web-platform-tests/tools/wptrunner/docs/design.rst: Added.
* web-platform-tests/tools/wptrunner/docs/expectation.rst: Added.
* web-platform-tests/tools/wptrunner/docs/index.rst: Added.
* web-platform-tests/tools/wptrunner/docs/make.bat: Added.
* web-platform-tests/tools/wptrunner/docs/usage.rst: Added.
* web-platform-tests/tools/wptrunner/docs/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/requirements.txt: Added.
* web-platform-tests/tools/wptrunner/requirements_chrome.txt: Added.
* web-platform-tests/tools/wptrunner/requirements_firefox.txt: Added.
* web-platform-tests/tools/wptrunner/requirements_sauce.txt: Added.
* web-platform-tests/tools/wptrunner/requirements_servo.txt: Added.
* web-platform-tests/tools/wptrunner/setup.py: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_and_fail.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_cycle_fail.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_match_fail.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_mismatch_fail.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_ref_timeout.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/reftest_timeout.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/reftest/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/firefox/__dir__.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/firefox/subdir/test_pref_reset.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/firefox/subdir/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/py/doc/img/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/firefox/test_pref_set.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/firefox/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/subdir/__dir__.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/subdir/testharness_1.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/subdir/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/testdata/encoding/chardet/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/testharness_0.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/testharness_error.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/testharness_timeout.html.ini: Added.
* web-platform-tests/tools/wptrunner/test/metadata/testharness/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/test.cfg.example: Added.
* web-platform-tests/tools/wptrunner/test/test.py: Added.
(setup_wptrunner_logging):
(ResultHandler):
(ResultHandler.__init__):
(ResultHandler.set_product):
(ResultHandler.__call__):
(test_settings):
(read_config):
(run_tests):
(settings_to_argv):
(set_from_args):
(run):
(get_parser):
(main):
* web-platform-tests/tools/wptrunner/test/testdata/reftest/green-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/green-ref-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/green-ref.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/green.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/red.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest.https-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest.https.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_and_fail-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_and_fail.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_and_fail_0-ref-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_and_fail_0-ref.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_0-ref-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_0-ref.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_1-ref-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_1-ref.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_fail-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_fail.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_fail_0-ref-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_cycle_fail_0-ref.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_match-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_match.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_match_fail-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_match_fail.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_mismatch-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_mismatch.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_mismatch_fail-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_mismatch_fail.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_or_0-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_or_0.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_ref_timeout-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_ref_timeout.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_timeout-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_timeout.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_wait_0-expected.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/reftest_wait_0.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/reftest/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/subdir/test_pref_inherit.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/subdir/test_pref_reset.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/subdir/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/performance/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/test_pref_dir.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/test_pref_set.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/firefox/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/subdir/testharness_1.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/subdir/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/py/doc/img/w3c-import.log.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/testharness.https.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/testharness_0.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/testharness_error.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/testharness_long_timeout.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/testharness_timeout.html: Added.
* web-platform-tests/tools/wptrunner/test/testdata/testharness/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/test/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/testdata/sanitizer/w3c-import.log.
* web-platform-tests/tools/wptrunner/tox.ini: Added.
* web-platform-tests/tools/wptrunner/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner.default.ini: Added.
* web-platform-tests/tools/wptrunner/wptrunner/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/b2g_setup/certtest_app.zip: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/b2g_setup/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/py/doc/img/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/base.py: Added.
(cmd_arg):
(get_free_port):
(browser_command):
(BrowserError):
(Browser):
(Browser.__init__):
(Browser.__init__.serving):
(Browser.__init__.also):
(Browser.__enter__):
(Browser.__exit__):
(Browser.setup):
(Browser.start):
(Browser.stop):
(Browser.pid):
(Browser.is_alive):
(Browser.setup_ssl):
(Browser.cleanup):
(Browser.executor_browser):
(Browser.executor_browser.for):
(Browser.log_crash):
(NullBrowser):
(NullBrowser.__init__):
(NullBrowser.start):
(NullBrowser.stop):
(NullBrowser.pid):
(NullBrowser.is_alive):
(NullBrowser.on_output):
(ExecutorBrowser):
(ExecutorBrowser.__init__):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py: Added.
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(ChromeBrowser):
(ChromeBrowser.__init__):
(ChromeBrowser.start):
(ChromeBrowser.stop):
(ChromeBrowser.pid):
(ChromeBrowser.is_alive):
(ChromeBrowser.cleanup):
(ChromeBrowser.executor_browser):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/edge.py: Added.
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(EdgeBrowser):
(EdgeBrowser.__init__):
(EdgeBrowser.start):
(EdgeBrowser.stop):
(EdgeBrowser.pid):
(EdgeBrowser.is_alive):
(EdgeBrowser.cleanup):
(EdgeBrowser.executor_browser):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py: Added.
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(run_info_extras):
(update_properties):
(FirefoxBrowser):
(FirefoxBrowser.__init__):
(FirefoxBrowser.start):
(FirefoxBrowser.load_prefs):
(FirefoxBrowser.stop):
(FirefoxBrowser.pid):
(FirefoxBrowser.on_output):
(FirefoxBrowser.is_alive):
(FirefoxBrowser.cleanup):
(FirefoxBrowser.executor_browser):
(FirefoxBrowser.log_crash):
(FirefoxBrowser.setup_ssl):
(FirefoxBrowser.setup_ssl.certutil):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce.py: Added.
(get_capabilities):
(get_sauce_config):
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(get_tar):
(SauceConnect):
(SauceConnect.__init__):
(SauceConnect.__enter__):
(SauceConnect.__exit__):
(SauceConnect.upload_prerun_exec):
(SauceException):
(SauceBrowser):
(SauceBrowser.__init__):
(SauceBrowser.start):
(SauceBrowser.stop):
(SauceBrowser.pid):
(SauceBrowser.is_alive):
(SauceBrowser.cleanup):
(SauceBrowser.executor_browser):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce_setup/edge-prerun.bat: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce_setup/safari-prerun.sh: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/sauce_setup/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/tests/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/server-locations.txt: Added.
* web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py: Added.
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(update_properties):
(ServoBrowser):
(ServoBrowser.__init__):
(ServoBrowser.executor_browser):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/servodriver.py: Added.
(check_args):
(browser_kwargs):
(executor_kwargs):
(env_extras):
(env_options):
(update_properties):
(make_hosts_file):
(ServoWebDriverBrowser):
(ServoWebDriverBrowser.__init__):
(ServoWebDriverBrowser.start):
(ServoWebDriverBrowser.stop):
(ServoWebDriverBrowser.pid):
(ServoWebDriverBrowser.on_output):
(ServoWebDriverBrowser.is_alive):
(ServoWebDriverBrowser.cleanup):
(ServoWebDriverBrowser.executor_browser):
* web-platform-tests/tools/wptrunner/wptrunner/browsers/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner/config.json: Added.
* web-platform-tests/tools/wptrunner/wptrunner/config.py: Added.
(ConfigDict):
(ConfigDict.__init__):
(ConfigDict.get_path):
(read):
(path):
(load):
* web-platform-tests/tools/wptrunner/wptrunner/environment.py: Added.
(do_delayed_imports):
(serve_path):
(get_ssl_kwargs):
(ssl_env):
(TestEnvironmentError):
(TestEnvironment):
(TestEnvironment.__init__):
(TestEnvironment.__enter__):
(TestEnvironment.__exit__):
(TestEnvironment.ignore_interrupts):
(TestEnvironment.process_interrupts):
(TestEnvironment.load_config):
(TestEnvironment.setup_server_logging):
(TestEnvironment.get_routes):
(TestEnvironment.ensure_started):
* web-platform-tests/tools/wptrunner/wptrunner/executors/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/executors/base.py: Added.
(executor_kwargs):
(strip_server):
(TestharnessResultConverter):
(TestharnessResultConverter.__call__):
(reftest_result_converter):
(pytest_result_converter):
(ExecutorException):
(ExecutorException.__init__):
(TestExecutor):
(TestExecutor.__init__):
(TestExecutor.__init__.for):
(TestExecutor.logger):
(TestExecutor.setup):
(TestExecutor.teardown):
(TestExecutor.run_test):
(TestExecutor.server_url):
(TestExecutor.test_url):
(TestExecutor.do_test):
(TestExecutor.on_environment_change):
(TestExecutor.result_from_exception):
(TestharnessExecutor):
(RefTestExecutor):
(RefTestExecutor.__init__):
(RefTestImplementation):
(RefTestImplementation.__init__):
(RefTestImplementation.logger):
(RefTestImplementation.get_hash):
(RefTestImplementation.is_pass):
(RefTestImplementation.run_test):
(RefTestImplementation.retake_screenshot):
(WdspecExecutor):
(Protocol):
(Protocol.__init__):
(Protocol.logger):
(Protocol.setup):
(Protocol.teardown):
(Protocol.wait):
* web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py: Added.
(do_delayed_imports):
(MarionetteProtocol):
(MarionetteProtocol.__init__):
(MarionetteProtocol.setup):
(MarionetteProtocol.teardown):
(MarionetteProtocol.is_alive):
(MarionetteProtocol.after_connect):
(MarionetteProtocol.set_timeout):
(MarionetteProtocol.load_runner):
(MarionetteProtocol.close_old_windows):
(MarionetteProtocol.wait):
(MarionetteProtocol.on_environment_change):
(MarionetteProtocol.set_pref):
(MarionetteProtocol.clear_user_pref):
(MarionetteProtocol.get_pref):
(MarionetteProtocol.clear_origin):
(RemoteMarionetteProtocol):
(RemoteMarionetteProtocol.__init__):
(RemoteMarionetteProtocol.setup):
(RemoteMarionetteProtocol.teardown):
(RemoteMarionetteProtocol.is_alive):
(ExecuteAsyncScriptRun):
(ExecuteAsyncScriptRun.__init__):
(ExecuteAsyncScriptRun.run):
(ExecuteAsyncScriptRun._run):
(MarionetteTestharnessExecutor):
(MarionetteTestharnessExecutor.__init__):
(MarionetteTestharnessExecutor.is_alive):
(MarionetteTestharnessExecutor.on_environment_change):
(MarionetteTestharnessExecutor.do_test):
(MarionetteTestharnessExecutor.do_testharness):
(MarionetteRefTestExecutor):
(MarionetteRefTestExecutor.__init__):
(MarionetteRefTestExecutor.is_alive):
(MarionetteRefTestExecutor.on_environment_change):
(MarionetteRefTestExecutor.do_test):
(MarionetteRefTestExecutor.screenshot):
(MarionetteRefTestExecutor._screenshot):
(WdspecRun):
(WdspecRun.__init__):
(WdspecRun.run):
(WdspecRun._run):
(MarionetteWdspecExecutor):
(MarionetteWdspecExecutor.__init__):
(MarionetteWdspecExecutor.is_alive):
(MarionetteWdspecExecutor.on_environment_change):
(MarionetteWdspecExecutor.do_test):
(MarionetteWdspecExecutor.do_wdspec):
(MarionetteWdspecExecutor.do_delayed_imports):
* web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py: Added.
(do_delayed_imports):
(SeleniumProtocol):
(SeleniumProtocol.__init__):
(SeleniumProtocol.setup):
(SeleniumProtocol.teardown):
(SeleniumProtocol.is_alive):
(SeleniumProtocol.after_connect):
(SeleniumProtocol.load_runner):
(SeleniumProtocol.wait):
(SeleniumRun):
(SeleniumRun.__init__):
(SeleniumRun.run):
(SeleniumRun._run):
(SeleniumTestharnessExecutor):
(SeleniumTestharnessExecutor.__init__):
(SeleniumTestharnessExecutor.is_alive):
(SeleniumTestharnessExecutor.on_environment_change):
(SeleniumTestharnessExecutor.do_test):
(SeleniumTestharnessExecutor.do_testharness):
(SeleniumRefTestExecutor):
(SeleniumRefTestExecutor.__init__):
(SeleniumRefTestExecutor.is_alive):
(SeleniumRefTestExecutor.do_test):
(SeleniumRefTestExecutor.screenshot):
(SeleniumRefTestExecutor._screenshot):
* web-platform-tests/tools/wptrunner/wptrunner/executors/executorservo.py: Added.
(make_hosts_file):
(ServoTestharnessExecutor):
(ServoTestharnessExecutor.__init__):
(ServoTestharnessExecutor.teardown):
(ServoTestharnessExecutor.do_test):
(ServoTestharnessExecutor.on_output):
(ServoTestharnessExecutor.on_finish):
(TempFilename):
(TempFilename.__init__):
(TempFilename.__enter__):
(TempFilename.__exit__):
(ServoRefTestExecutor):
(ServoRefTestExecutor.__init__):
(ServoRefTestExecutor.teardown):
(ServoRefTestExecutor.screenshot):
(ServoRefTestExecutor.do_test):
(ServoRefTestExecutor.on_output):
(ServoWdspecProtocol):
(ServoWdspecProtocol.__init__):
(ServoWdspecProtocol.setup):
(ServoWdspecProtocol.teardown):
(ServoWdspecProtocol.is_alive):
(ServoWdspecProtocol.do_delayed_imports):
(ServoWdspecExecutor):
(ServoWdspecExecutor.__init__):
(ServoWdspecExecutor.is_alive):
(ServoWdspecExecutor.on_environment_change):
(ServoWdspecExecutor.do_test):
(ServoWdspecExecutor.do_wdspec):
* web-platform-tests/tools/wptrunner/wptrunner/executors/executorservodriver.py: Added.
(do_delayed_imports):
(ServoWebDriverProtocol):
(ServoWebDriverProtocol.__init__):
(ServoWebDriverProtocol.setup):
(ServoWebDriverProtocol.teardown):
(ServoWebDriverProtocol.is_alive):
(ServoWebDriverProtocol.after_connect):
(ServoWebDriverProtocol.wait):
(ServoWebDriverProtocol.on_environment_change):
(ServoWebDriverRun):
(ServoWebDriverRun.__init__):
(ServoWebDriverRun.run):
(ServoWebDriverRun._run):
(timeout_func):
(ServoWebDriverTestharnessExecutor):
(ServoWebDriverTestharnessExecutor.__init__):
(ServoWebDriverTestharnessExecutor.on_protocol_change):
(ServoWebDriverTestharnessExecutor.is_alive):
(ServoWebDriverTestharnessExecutor.do_test):
(ServoWebDriverTestharnessExecutor.do_testharness):
(TimeoutError):
(ServoWebDriverRefTestExecutor):
(ServoWebDriverRefTestExecutor.__init__):
(ServoWebDriverRefTestExecutor.is_alive):
(ServoWebDriverRefTestExecutor.do_test):
(ServoWebDriverRefTestExecutor.screenshot):
(ServoWebDriverRefTestExecutor._screenshot):
* web-platform-tests/tools/wptrunner/wptrunner/executors/process.py: Added.
(ProcessTestExecutor):
(ProcessTestExecutor.__init__):
(ProcessTestExecutor.setup):
(ProcessTestExecutor.is_alive):
(ProcessTestExecutor.do_test):
* web-platform-tests/tools/wptrunner/wptrunner/executors/pytestrunner/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py: Added.
(do_delayed_imports):
(run):
(SubtestResultRecorder):
(SubtestResultRecorder.__init__):
(SubtestResultRecorder.pytest_runtest_logreport):
(SubtestResultRecorder.record_pass):
(SubtestResultRecorder.record_fail):
(SubtestResultRecorder.record_error):
(SubtestResultRecorder.record_skip):
(SubtestResultRecorder.record):
(TemporaryDirectory):
(TemporaryDirectory.__enter__):
(TemporaryDirectory.__exit__):
* web-platform-tests/tools/wptrunner/wptrunner/executors/pytestrunner/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait.js: Added.
(test):
* web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_servodriver.js: Added.
(check_done):
* web-platform-tests/tools/wptrunner/wptrunner/executors/reftest-wait_webdriver.js: Added.
(test):
* web-platform-tests/tools/wptrunner/wptrunner/executors/reftest.js: Added.
* web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_marionette.js: Added.
(listener):
(timeout.s.timer.setTimeout):
* web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_servodriver.js: Added.
* web-platform-tests/tools/wptrunner/wptrunner/executors/testharness_webdriver.js: Added.
(f):
(timer.setTimeout):
* web-platform-tests/tools/wptrunner/wptrunner/executors/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner/expected.py: Added.
(expected_path):
* web-platform-tests/tools/wptrunner/wptrunner/hosts.py: Added.
(HostsLine):
(HostsLine.__init__):
(HostsLine.from_string):
(HostsFile):
(HostsFile.__init__):
(HostsFile.set_host):
(HostsFile.from_file):
(HostsFile.to_string):
(HostsFile.to_file):
* web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py: Added.
(data_cls_getter):
(bool_prop):
(tags):
(prefs):
(prefs.value):
(ExpectedManifest):
(ExpectedManifest.__init__):
(ExpectedManifest.append):
(ExpectedManifest._remove_child):
(ExpectedManifest.get_test):
(ExpectedManifest.url):
(ExpectedManifest.disabled):
(ExpectedManifest.restart_after):
(ExpectedManifest.tags):
(ExpectedManifest.prefs):
(DirectoryManifest):
(DirectoryManifest.disabled):
(DirectoryManifest.restart_after):
(DirectoryManifest.tags):
(DirectoryManifest.prefs):
(TestNode):
(TestNode.__init__):
(TestNode.is_empty):
(TestNode.test_type):
(TestNode.id):
(TestNode.disabled):
(TestNode.restart_after):
(TestNode.tags):
(TestNode.prefs):
(TestNode.append):
(TestNode.get_subtest):
(SubtestNode):
(SubtestNode.__init__):
(SubtestNode.is_empty):
(get_manifest):
(get_dir_manifest):
* web-platform-tests/tools/wptrunner/wptrunner/manifestinclude.py: Added.
(IncludeManifest):
(IncludeManifest.__init__):
(IncludeManifest.create):
(IncludeManifest.append):
(IncludeManifest.include):
(IncludeManifest._include):
(IncludeManifest._get_components):
(IncludeManifest._add_rule):
(IncludeManifest.add_include):
(IncludeManifest.add_exclude):
(get_manifest):
* web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py: Added.
(ConditionError):
(data_cls_getter):
(ExpectedManifest):
(ExpectedManifest.__init__):
(ExpectedManifest.append):
(ExpectedManifest._remove_child):
(ExpectedManifest.get_test):
(ExpectedManifest.has_test):
(ExpectedManifest.url):
(TestNode):
(TestNode.__init__):
(TestNode.create):
(TestNode.is_empty):
(TestNode.test_type):
(TestNode.id):
(TestNode.disabled):
(TestNode.set_result):
(TestNode.coalesce_expected):
(TestNode._add_key_value):
(TestNode.clear_expected):
(TestNode.append):
(TestNode.get_subtest):
(SubtestNode):
(SubtestNode.__init__):
(SubtestNode.create):
(SubtestNode.is_empty):
(group_conditionals):
(make_expr):
(get_manifest):
(compile):
* web-platform-tests/tools/wptrunner/wptrunner/metadata.py: Added.
(load_test_manifests):
(update_expected):
(do_delayed_imports):
(files_in_repo):
(rev_range):
(paths_changed):
(load_change_data):
(unexpected_changes):
(update_from_logs):
(directory_manifests):
(write_changes):
(write_new_expected):
(ExpectedUpdater):
(ExpectedUpdater.__init__):
(ExpectedUpdater.update_from_log):
(ExpectedUpdater.suite_start):
(ExpectedUpdater.test_id):
(ExpectedUpdater.test_start):
(ExpectedUpdater.test_status):
(ExpectedUpdater.test_end):
(create_test_tree):
(create_expected):
(load_expected):
* web-platform-tests/tools/wptrunner/wptrunner/products.py: Added.
(products_enabled):
(product_module):
(load_product):
(load_product_update):
* web-platform-tests/tools/wptrunner/wptrunner/reduce.py: Added.
(setup_logging):
(group):
(next_power_of_two):
(Reducer):
(Reducer.__init__):
(Reducer.run):
(Reducer.unstable):
(Reducer.log_is_unstable):
(Reducer.log_is_unstable.handle_status):
(Reducer.log_is_unstable.handle_end):
(Reducer.get_initial_tests):
(do_reduce):
* web-platform-tests/tools/wptrunner/wptrunner/testharness_runner.html: Added.
* web-platform-tests/tools/wptrunner/wptrunner/testharnessreport-servo.js: Added.
(add_completion_callback):
* web-platform-tests/tools/wptrunner/wptrunner/testharnessreport-servodriver.js: Added.
(add_completion_callback.):
(add_completion_callback):
* web-platform-tests/tools/wptrunner/wptrunner/testharnessreport.js: Added.
* web-platform-tests/tools/wptrunner/wptrunner/testloader.py: Added.
(do_delayed_imports):
(TestChunker):
(TestChunker.__init__):
(TestChunker.__call__):
(Unchunked):
(Unchunked.__init__):
(Unchunked.__call__):
(HashChunker):
(HashChunker.__call__):
(DirectoryHashChunker):
(DirectoryHashChunker.__call__):
(EqualTimeChunker):
(EqualTimeChunker._group_by_directory):
(EqualTimeChunker._group_by_directory.PathData):
(EqualTimeChunker._group_by_directory.PathData.__init__):
(EqualTimeChunker._maybe_remove):
(EqualTimeChunker._maybe_add):
(EqualTimeChunker._maybe_move):
(EqualTimeChunker._badness):
(EqualTimeChunker._get_chunk):
(EqualTimeChunker._all_tests):
(EqualTimeChunker._chunked_tests):
(EqualTimeChunker._create_initial_chunks):
(EqualTimeChunker._create_initial_chunks.Chunk):
(EqualTimeChunker._create_initial_chunks.Chunk.__init__):
(EqualTimeChunker._create_initial_chunks.Chunk.appendleft):
(EqualTimeChunker._create_initial_chunks.Chunk.append):
(EqualTimeChunker._create_initial_chunks.Chunk.pop):
(EqualTimeChunker._create_initial_chunks.Chunk.popleft):
(EqualTimeChunker._create_initial_chunks.Chunk.badness):
(EqualTimeChunker._update_chunks):
(EqualTimeChunker._get_tests):
(EqualTimeChunker.__call__):
(TestFilter):
(TestFilter.__init__):
(TestFilter.__call__):
(TagFilter):
(TagFilter.__init__):
(TagFilter.__call__):
(ManifestLoader):
(ManifestLoader.__init__):
(ManifestLoader.load):
(ManifestLoader.create_manifest):
(ManifestLoader.update_manifest):
(ManifestLoader.load_manifest):
(iterfilter):
(TestLoader):
(TestLoader.__init__):
(TestLoader.test_ids):
(TestLoader.get_test):
(TestLoader.load_dir_metadata):
(TestLoader.load_metadata):
(TestLoader.iter_tests):
(TestLoader.iter_wpttest):
(TestLoader._load_tests):
(TestLoader.groups):
(TestSource):
(TestSource.queue_tests):
(TestSource.requeue_test):
(TestSource.__enter__):
(TestSource.__exit__):
(SingleTestSource):
(SingleTestSource.__init__):
(SingleTestSource.queue_tests):
(SingleTestSource.get_queue):
(SingleTestSource.requeue_test):
(PathGroupedSource):
(PathGroupedSource.__init__):
(PathGroupedSource.queue_tests):
(PathGroupedSource.get_queue):
(PathGroupedSource.requeue_test):
(PathGroupedSource.__exit__):
* web-platform-tests/tools/wptrunner/wptrunner/testrunner.py: Added.
(MessageLogger):
(MessageLogger.__init__):
(MessageLogger._log_data):
(MessageLogger.process_output):
(_log_func):
(_log_func.log):
(TestRunner):
(TestRunner.__init__):
(TestRunner.__init__.delegates):
(TestRunner.__enter__):
(TestRunner.__exit__):
(TestRunner.setup):
(TestRunner.teardown):
(TestRunner.run):
(TestRunner.stop):
(TestRunner.run_test):
(TestRunner.wait):
(TestRunner.send_message):
(start_runner):
(next_manager_number):
(BrowserManager):
(BrowserManager.__init__):
(BrowserManager.init):
(BrowserManager.send_message):
(BrowserManager.init_timeout):
(BrowserManager.after_init):
(BrowserManager.stop):
(BrowserManager.cleanup):
(BrowserManager.log_crash):
(BrowserManager.is_alive):
(_RunnerManagerState):
(TestRunnerManager):
(TestRunnerManager.__init__):
(TestRunnerManager.run):
(TestRunnerManager.wait_event):
(TestRunnerManager.should_stop):
(TestRunnerManager.start_init):
(TestRunnerManager.init):
(TestRunnerManager.start_test_runner):
(TestRunnerManager.init_succeeded):
(TestRunnerManager.init_failed):
(TestRunnerManager.get_next_test):
(TestRunnerManager.run_test):
(TestRunnerManager.test_ended):
(TestRunnerManager.wait_finished):
(TestRunnerManager.after_test_end):
(TestRunnerManager.restart_runner):
(TestRunnerManager.log):
(TestRunnerManager.error):
(TestRunnerManager.stop_runner):
(TestRunnerManager.teardown):
(TestRunnerManager.ensure_runner_stopped):
(TestRunnerManager.runner_teardown):
(TestRunnerManager.send_message):
(TestRunnerManager.cleanup):
(TestQueue):
(TestQueue.__init__):
(TestQueue.__enter__):
(TestQueue.__exit__):
(ManagerGroup):
(ManagerGroup.__init__):
(ManagerGroup.__enter__):
(ManagerGroup.__exit__):
(ManagerGroup.run):
(ManagerGroup.is_alive):
(ManagerGroup.wait):
(ManagerGroup.stop):
(ManagerGroup.unexpected_count):
* web-platform-tests/tools/wptrunner/wptrunner/tests/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/tests/test_chunker.py: Added.
(MockTest):
(MockTest.__init__):
(make_mock_manifest):
(TestEqualTimeChunker):
(TestEqualTimeChunker.test_include_all):
(TestEqualTimeChunker.test_include_all_1):
(TestEqualTimeChunker.test_long):
(TestEqualTimeChunker.test_long_1):
(TestEqualTimeChunker.test_too_few_dirs):
* web-platform-tests/tools/wptrunner/wptrunner/tests/test_hosts.py: Added.
(HostsTest):
(HostsTest.do_test):
(HostsTest.test_simple):
(test_blank_lines):
(test_whitespace):
(test_alignment):
(test_multiple_same_name):
* web-platform-tests/tools/wptrunner/wptrunner/tests/test_testloader.py: Added.
(test_filter_unicode):
* web-platform-tests/tools/wptrunner/wptrunner/tests/test_update.py: Added.
(TestExpectedUpdater):
(TestExpectedUpdater.create_manifest):
(TestExpectedUpdater.create_updater):
(TestExpectedUpdater.create_log):
(TestExpectedUpdater.coalesce_results):
(TestExpectedUpdater.test_update_0):
(TestExpectedUpdater.test_update_1):
(TestExpectedUpdater.test_new_subtest):
(TestExpectedUpdater.test_update_multiple_0):
(TestExpectedUpdater.test_update_multiple_1):
(TestExpectedUpdater.test_update_multiple_2):
(TestExpectedUpdater.test_update_multiple_3):
(TestExpectedUpdater.test_update_ignore_existing):
* web-platform-tests/tools/wptrunner/wptrunner/tests/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/performance/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/update/__init__.py: Added.
(remove_logging_args):
(setup_logging):
(run_update):
(main):
* web-platform-tests/tools/wptrunner/wptrunner/update/base.py: Added.
(Step):
(Step.__init__):
(Step.run):
(Step.run.for):
(Step.create):
(Step.restore):
(StepRunner):
(StepRunner.__init__):
(StepRunner.run):
* web-platform-tests/tools/wptrunner/wptrunner/update/metadata.py: Added.
(GetUpdatePropertyList):
(GetUpdatePropertyList.create):
(UpdateExpected):
(UpdateExpected.create):
(CreateMetadataPatch):
(CreateMetadataPatch.create):
(MetadataUpdateRunner):
* web-platform-tests/tools/wptrunner/wptrunner/update/state.py: Added.
(State):
(State.__new__):
(State.__init__):
(State.__getstate__):
(State.load):
(State.push):
(State.save):
(State.is_empty):
(State.clear):
(State.__setattr__):
(State.__getattr__):
(State.__contains__):
(State.update):
(State.keys):
(StateContext):
(StateContext.__init__):
(StateContext.__enter__):
(StateContext.__exit__):
* web-platform-tests/tools/wptrunner/wptrunner/update/sync.py: Added.
(copy_wpt_tree):
(add_license):
(UpdateCheckout):
(UpdateCheckout.create):
(UpdateCheckout.restore):
(GetSyncTargetCommit):
(GetSyncTargetCommit.create):
(LoadManifest):
(LoadManifest.create):
(UpdateManifest):
(UpdateManifest.create):
(CopyWorkTree):
(CopyWorkTree.create):
(CreateSyncPatch):
(CreateSyncPatch.create):
(SyncFromUpstreamRunner):
* web-platform-tests/tools/wptrunner/wptrunner/update/tree.py: Added.
(get_unique_name):
(NoVCSTree):
(NoVCSTree.__init__):
(NoVCSTree.is_type):
(NoVCSTree.is_clean):
(NoVCSTree.add_new):
(NoVCSTree.create_patch):
(NoVCSTree.update_patch):
(NoVCSTree.commit_patch):
(HgTree):
(HgTree.__init__):
(HgTree.__getstate__):
(HgTree.__setstate__):
(HgTree.is_type):
(HgTree.is_clean):
(HgTree.add_new):
(HgTree.create_patch):
(HgTree.update_patch):
(HgTree.commit_patch):
(HgTree.contains_commit):
(GitTree):
(GitTree.__init__):
(GitTree.__getstate__):
(GitTree.__setstate__):
(GitTree.is_type):
(GitTree.rev):
(GitTree.is_clean):
(GitTree.add_new):
(GitTree.list_refs):
(GitTree.list_remote):
(GitTree.get_remote_sha1):
(GitTree.create_patch):
(GitTree.update_patch):
(GitTree.commit_patch):
(GitTree.init):
(GitTree.checkout):
(GitTree.update):
(GitTree.clean):
(GitTree.paths):
(GitTree.submodules):
(GitTree.contains_commit):
(CommitMessage):
(CommitMessage.__init__):
(CommitMessage.__str__):
(CommitMessage._parse_message):
(Commit):
(Commit.__init__):
(Commit.__getstate__):
(Commit.__setstate__):
(Commit._get_meta):
* web-platform-tests/tools/wptrunner/wptrunner/update/update.py: Added.
(setup_paths):
(LoadConfig):
(LoadConfig.create):
(LoadTrees):
(LoadTrees.create):
(SyncFromUpstream):
(SyncFromUpstream.create):
(UpdateMetadata):
(UpdateMetadata.create):
(UpdateRunner):
(WPTUpdate):
(WPTUpdate.__init__):
(WPTUpdate.__init__.holding):
(WPTUpdate.run):
(WPTUpdate.abort):
* web-platform-tests/tools/wptrunner/wptrunner/update/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner/vcs.py: Added.
(vcs):
(vcs.inner):
(bind_to_repo):
(is_git_root):
* web-platform-tests/tools/wptrunner/wptrunner/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner/webdriver_server.py: Added.
(WebDriverServer):
(WebDriverServer.__init__):
(WebDriverServer.make_command):
(WebDriverServer.start):
(WebDriverServer._run):
(WebDriverServer.stop):
(WebDriverServer.is_alive):
(WebDriverServer.on_output):
(WebDriverServer.pid):
(WebDriverServer.url):
(WebDriverServer.port):
(WebDriverServer._find_next_free_port):
(SeleniumServer):
(SeleniumServer.make_command):
(ChromeDriverServer):
(ChromeDriverServer.__init__):
(ChromeDriverServer.make_command):
(EdgeDriverServer):
(EdgeDriverServer.__init__):
(EdgeDriverServer.make_command):
(GeckoDriverServer):
(GeckoDriverServer.__init__):
(GeckoDriverServer.make_command):
(ServoDriverServer):
(ServoDriverServer.__init__):
(ServoDriverServer.make_command):
(cmd_arg):
(get_free_port):
(wait_for_service):
* web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py: Added.
(abs_path):
(url_or_path):
(require_arg):
(create_parser):
(set_from_config):
(get_test_paths):
(exe_path):
(check_args):
(check_args_update):
(create_parser_update):
(create_parser_reduce):
(parse_args):
(parse_args_update):
(parse_args_reduce):
* web-platform-tests/tools/wptrunner/wptrunner/wptlogging.py: Added.
(setup):
(setup_stdlib_logger):
(LogLevelRewriter):
(LogLevelRewriter.__init__):
(LogLevelRewriter.__call__):
(LogThread):
(LogThread.__init__):
(LogThread.run):
(LoggingWrapper):
(LoggingWrapper.__init__):
(LoggingWrapper.write):
(LoggingWrapper.flush):
(CaptureIO):
(CaptureIO.__init__):
(CaptureIO.__enter__):
(CaptureIO.__exit__):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py: Added.
(ConditionalValue):
(ConditionalValue.__init__):
(ConditionalValue.value):
(ConditionalValue.__call__):
(ConditionalValue.set_value):
(ConditionalValue.remove):
(Compiler):
(Compiler.compile):
(Compiler.compile.of):
(Compiler.compile_condition):
(Compiler._initial_output_node):
(Compiler.visit_DataNode):
(Compiler.visit_KeyValueNode):
(Compiler.visit_ListNode):
(Compiler.visit_ValueNode):
(Compiler.visit_AtomNode):
(Compiler.visit_ConditionalNode):
(Compiler.visit_StringNode):
(Compiler.visit_StringNode.value):
(Compiler.visit_NumberNode):
(Compiler.visit_VariableNode):
(Compiler.visit_VariableNode.value):
(Compiler.visit_IndexNode):
(Compiler.visit_UnaryExpressionNode):
(Compiler.visit_BinaryExpressionNode):
(Compiler.visit_UnaryOperatorNode):
(Compiler.visit_BinaryOperatorNode):
(ManifestItem):
(ManifestItem.__init__):
(ManifestItem.__repr__):
(ManifestItem.__str__):
(ManifestItem.__contains__):
(ManifestItem.is_empty):
(ManifestItem.root):
(ManifestItem.name):
(ManifestItem.has_key):
(ManifestItem.get):
(ManifestItem.set):
(ManifestItem._add_key_value):
(ManifestItem.append):
(ManifestItem.remove):
(ManifestItem._remove_child):
(ManifestItem.iterchildren):
(ManifestItem._flatten):
(ManifestItem.iteritems):
(ManifestItem.iterkeys):
(ManifestItem.remove_value):
(compile_ast):
(compile):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/static.py: Added.
(Compiler):
(Compiler.compile):
(Compiler.compile.of):
(Compiler.visit_DataNode):
(Compiler.visit_KeyValueNode):
(Compiler.visit_ValueNode):
(Compiler.visit_AtomNode):
(Compiler.visit_ListNode):
(Compiler.visit_ConditionalNode):
(Compiler.visit_StringNode):
(Compiler.visit_NumberNode):
(Compiler.visit_VariableNode):
(Compiler.visit_IndexNode):
(Compiler.visit_UnaryExpressionNode):
(Compiler.visit_BinaryExpressionNode):
(Compiler.visit_UnaryOperatorNode):
(Compiler.visit_BinaryOperatorNode):
(ManifestItem):
(ManifestItem.__init__):
(ManifestItem.__repr__):
(ManifestItem.__str__):
(ManifestItem.is_empty):
(ManifestItem.root):
(ManifestItem.has_key):
(ManifestItem.get):
(ManifestItem.set):
(ManifestItem.remove):
(ManifestItem._remove_child):
(ManifestItem.iterchildren):
(ManifestItem._flatten):
(ManifestItem.iteritems):
(ManifestItem.iterkeys):
(ManifestItem.itervalues):
(ManifestItem.append):
(compile_ast):
(compile):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/html5lib/html5lib/tests/performance/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/node.py: Added.
(NodeVisitor):
(NodeVisitor.visit):
(NodeVisitor.visit.body):
(Node):
(Node.__init__):
(Node.append):
(Node.remove):
(Node.__repr__):
(Node.__str__):
(Node.__eq__):
(Node.copy):
(DataNode):
(DataNode.append):
(KeyValueNode):
(KeyValueNode.append):
(ListNode):
(ListNode.append):
(ValueNode):
(ValueNode.append):
(AtomNode):
(ConditionalNode):
(UnaryExpressionNode):
(UnaryExpressionNode.__init__):
(UnaryExpressionNode.append):
(UnaryExpressionNode.copy):
(BinaryExpressionNode):
(BinaryExpressionNode.__init__):
(BinaryExpressionNode.append):
(BinaryExpressionNode.copy):
(UnaryOperatorNode):
(UnaryOperatorNode.append):
(BinaryOperatorNode):
(BinaryOperatorNode.append):
(IndexNode):
(VariableNode):
(StringNode):
(NumberNode):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/parser.py: Added.
(ParseError):
(ParseError.__init__):
(decode):
(precedence):
(TokenTypes):
(TokenTypes.__init__):
(Tokenizer):
(Tokenizer.__init__):
(Tokenizer.reset):
(Tokenizer.tokenize):
(Tokenizer.char):
(Tokenizer.consume):
(Tokenizer.peek):
(Tokenizer.skip_whitespace):
(Tokenizer.eol_state):
(Tokenizer.line_start_state):
(Tokenizer.data_line_state):
(Tokenizer.heading_state):
(Tokenizer.key_state):
(Tokenizer.after_key_state):
(Tokenizer.list_start_state):
(Tokenizer.list_value_start_state):
(Tokenizer.list_value_state):
(Tokenizer.list_value_atom_state):
(Tokenizer.list_end_state):
(Tokenizer.value_state):
(Tokenizer.value_inner_state):
(Tokenizer.comment_state):
(Tokenizer.line_end_state):
(Tokenizer.consume_string):
(Tokenizer.expr_or_value_state):
(Tokenizer.expr_state):
(Tokenizer.operator_state):
(Tokenizer.digit_state):
(Tokenizer.ident_state):
(Tokenizer.consume_escape):
(Tokenizer.decode_escape):
(Tokenizer.escape_value):
(Parser):
(Parser.__init__):
(Parser.reset):
(Parser.parse):
(Parser.consume):
(Parser.expect):
(Parser.manifest):
(Parser.data_block):
(Parser.eof_or_end_group):
(Parser.value_block):
(Parser.list_value):
(Parser.expression_values):
(Parser.value):
(Parser.atom):
(Parser.expr_start):
(Parser.expr):
(Parser.expr_operand):
(Parser.expr_unary_op):
(Parser.expr_bin_op):
(Parser.expr_value):
(Parser.expr_number):
(Treebuilder):
(Treebuilder.__init__):
(Treebuilder.append):
(Treebuilder.pop):
(ExpressionBuilder):
(ExpressionBuilder.__init__):
(ExpressionBuilder.finish):
(ExpressionBuilder.left_paren):
(ExpressionBuilder.right_paren):
(ExpressionBuilder.push_operator):
(ExpressionBuilder.pop_operator):
(ExpressionBuilder.push_operand):
(ExpressionBuilder.pop_operand):
(ExpressionBuilder.is_empty):
(ExpressionBuilder.precedence):
(parse):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/serializer.py: Added.
(escape):
(ManifestSerializer):
(ManifestSerializer.__init__):
(ManifestSerializer.serialize):
(ManifestSerializer.visit_DataNode):
(ManifestSerializer.visit_KeyValueNode):
(ManifestSerializer.visit_ListNode):
(ManifestSerializer.visit_ValueNode):
(ManifestSerializer.visit_AtomNode):
(ManifestSerializer.visit_ConditionalNode):
(ManifestSerializer.visit_StringNode):
(ManifestSerializer.visit_NumberNode):
(ManifestSerializer.visit_VariableNode):
(ManifestSerializer.visit_IndexNode):
(ManifestSerializer.visit_UnaryExpressionNode):
(ManifestSerializer.visit_BinaryExpressionNode):
(ManifestSerializer.visit_UnaryOperatorNode):
(ManifestSerializer.visit_BinaryOperatorNode):
(serialize):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/__init__.py: Added.
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_conditional.py: Added.
(TestConditional):
(TestConditional.compile):
(TestConditional.test_get_0):
(test_get_1):
(test_get_2):
(test_get_3):
(test_set_0):
(test_set_1):
(test_set_2):
(test_api_0):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_parser.py: Added.
(TestExpression):
(TestExpression.setUp):
(TestExpression.parse):
(TestExpression.compare):
(TestExpression.match):
(TestExpression.test_expr_0):
(test_expr_1):
(test_atom_0):
(test_atom_1):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_serializer.py: Added.
(TokenizerTest):
(TokenizerTest.setUp):
(TokenizerTest.serialize):
(TokenizerTest.compare):
(TokenizerTest.test_0):
(test_1):
(test_2):
(test_3):
(test_4):
(test_5):
(test_6):
(test_7):
(test_8):
(test_9):
(test_10):
(test_11):
(test_12):
(test_13):
(test_14):
(test_15):
(test_16):
(test_17):
(test_18):
(test_escape_0):
(test_escape_1):
(test_escape_2):
(test_escape_3):
(test_escape_4):
(test_escape_5):
(test_escape_6):
(test_escape_7):
(test_escape_8):
(test_escape_9):
(test_escape_10):
(test_escape_11):
(test_atom_1):
(test_atom_2):
(test_atom_3):
(test_atom_4):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_static.py: Added.
(TestStatic):
(TestStatic.compile):
(TestStatic.test_get_0):
(test_get_1):
(test_get_3):
(test_get_4):
(test_api):
(test_is_empty_1):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/test_tokenizer.py: Added.
(TokenizerTest):
(TokenizerTest.setUp):
(TokenizerTest.tokenize):
(TokenizerTest.compare):
(TokenizerTest.test_heading_0):
(TokenizerTest.test_heading_1):
(TokenizerTest.test_heading_2):
(TokenizerTest.test_heading_3):
(TokenizerTest.test_heading_4):
(TokenizerTest.test_heading_5):
(TokenizerTest.test_heading_6):
(TokenizerTest.test_key_0):
(TokenizerTest.test_key_1):
(TokenizerTest.test_key_2):
(TokenizerTest.test_key_3):
(TokenizerTest.test_key_4):
(TokenizerTest.test_key_5):
(TokenizerTest.test_key_6):
(TokenizerTest.test_key_7):
(TokenizerTest.test_key_8):
(TokenizerTest.test_key_9):
(TokenizerTest.test_key_10):
(TokenizerTest.test_key_11):
(TokenizerTest.test_key_12):
(TokenizerTest.test_key_13):
(TokenizerTest.test_key_14):
(TokenizerTest.test_list_0):
(test_list_1):
(test_list_2):
(test_list_3):
(test_list_4):
(test_list_5):
(test_list_6):
(test_expr_0):
(test_expr_1):
(test_expr_2):
(test_expr_3):
(test_expr_4):
(test_expr_5):
(test_expr_6):
(test_expr_7):
(test_expr_8):
(test_expr_9):
(test_expr_10):
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/tests/w3c-import.log: Added.
* web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/tools/gitignore/w3c-import.log.
* web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py: Added.
(setup_logging):
(get_loader):
(list_test_groups):
(list_disabled):
(get_pause_after_test):
(run_tests):
(start):
(main):
* web-platform-tests/tools/wptrunner/wptrunner/wpttest.py: Added.
(Result):
(Result.__init__):
(Result.__repr__):
(SubtestResult):
(SubtestResult.__init__):
(SubtestResult.__repr__):
(TestharnessResult):
(TestharnessSubtestResult):
(ReftestResult):
(WdspecResult):
(WdspecSubtestResult):
(get_run_info):
(RunInfo):
(RunInfo.__init__):
(RunInfo._update_mozinfo):
(Test):
(Test.__init__):
(Test.__eq__):
(Test.from_manifest):
(Test.id):
(Test.keys):
(Test.abs_path):
(Test._get_metadata):
(Test.itermeta):
(Test.disabled):
(Test.restart_after):
(Test.tags):
(Test.prefs):
(Test.expected):
(Test.__repr__):
(TestharnessTest):
(TestharnessTest.id):
(ManualTest):
(ManualTest.id):
(ReftestTest):
(ReftestTest.__init__):
(ReftestTest.from_manifest):
(ReftestTest.id):
(ReftestTest.keys):
(WdspecTest):
(from_manifest):
* web-platform-tests/tools/wptserve/docs/w3c-import.log:
* web-platform-tests/tools/wptserve/tests/functional/docroot/subdir/w3c-import.log:
* web-platform-tests/tools/wptserve/tests/functional/docroot/w3c-import.log:
* web-platform-tests/tools/wptserve/tests/functional/w3c-import.log:
* web-platform-tests/tools/wptserve/w3c-import.log:
* web-platform-tests/tools/wptserve/wptserve/w3c-import.log:
* web-platform-tests/url/interfaces-expected.txt:

LayoutTests:

* platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt:

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

2 years agoDesign mode should not affect UA shadow trees
antti@apple.com [Thu, 18 May 2017 15:16:37 +0000 (15:16 +0000)]
Design mode should not affect UA shadow trees
https://bugs.webkit.org/show_bug.cgi?id=171854
<rdar://problem/32071037>

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: editing/deleting/search-shadow-tree-delete.html

* html/HTMLElement.cpp:
(WebCore::HTMLElement::editabilityFromContentEditableAttr):

    Ignore design mode for UA shadow trees.

* html/SearchInputType.cpp:
(WebCore::SearchInputType::~SearchInputType):
(WebCore::SearchInputType::createShadowSubtree):
(WebCore::SearchInputType::resultsButtonElement):
(WebCore::SearchInputType::cancelButtonElement):
* html/SearchInputType.h:

    Use RefPtr.

LayoutTests:

* editing/deleting/search-shadow-tree-delete-expected.txt: Added.
* editing/deleting/search-shadow-tree-delete.html: Added.

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

2 years ago[GTK][GStreamer][MSE] Crash on youtube when MSE is enabled but gstreamer cant find...
commit-queue@webkit.org [Thu, 18 May 2017 14:05:15 +0000 (14:05 +0000)]
[GTK][GStreamer][MSE] Crash on youtube when MSE is enabled but gstreamer cant find the decoder element.
https://bugs.webkit.org/show_bug.cgi?id=167120

Patch by Vanessa Chipirrás Navalón <vchipirras@igalia.com> on 2017-05-18
Reviewed by Žan Doberšek.

This is because supportCodecs() doesn't check in runtime which plugins the player has.
So, a static function which returns a map with the plugins has been created. That map is later
used in the supportsCodecs() method to check if the requested codec matches any of the map.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::initializeGStreamerAndRegisterWebKitElements):
The declaration is moved into this class.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::isAvailable): This function calls the implementation of
initializeGstreamerAndRegisterWebKitElements function.
(WebCore::MediaPlayerPrivateGStreamer::load): Ditto
(WebCore::mimeTypeSet): Ditto
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: It is static type to expose
initializeGStreamerAndRegisterWebKitElements() function to be called from internal function
"which runs before MediaPlayerPrivateGStreamerBase initialization but needs to have GStreamer initialized".
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::codecSet): It returns a map with the plugins has been created.
(WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs): To check if the requested codec
matches any of the map from codecSet().

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

2 years ago[Readable Streams API] Align getDesiredSize with spec
commit-queue@webkit.org [Thu, 18 May 2017 12:56:46 +0000 (12:56 +0000)]
[Readable Streams API] Align getDesiredSize with spec
https://bugs.webkit.org/show_bug.cgi?id=172220

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-05-18
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Updated test expectations (tests are now passing).

* web-platform-tests/streams/readable-byte-streams/general-expected.txt: Updated.
* web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt: Updated.
* web-platform-tests/streams/readable-streams/general-expected.txt: Updated.
* web-platform-tests/streams/readable-streams/general.dedicatedworker-expected.txt: Updated.

Source/WebCore:

Aligned implementation of getDesiredSize operation for both controllers:
- https://streams.spec.whatwg.org/#readable-stream-default-controller-get-desired-size
- https://streams.spec.whatwg.org/#readable-byte-stream-controller-get-desired-size

Implementation slightly differs from spec as queueTotalSize refactoring is not
yet implemented, but behavior is now similar.

No new tests (already covered by WPT tests, corresponding expectations have been updated).

* Modules/streams/ReadableByteStreamInternals.js:
(readableByteStreamControllerGetDesiredSize): Updated.
* Modules/streams/ReadableStreamInternals.js:
(readableStreamDefaultControllerGetDesiredSize): Updated.

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

2 years ago[WPE] Unreviewed build fix
csaavedra@igalia.com [Thu, 18 May 2017 12:00:31 +0000 (12:00 +0000)]
[WPE] Unreviewed build fix

Add missing header after r217041.
* UIProcess/API/wpe/WPEView.cpp:

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

2 years agoUnreviewed GTK+ gardening. Update expectations of tests failing after r217039.
magomez@igalia.com [Thu, 18 May 2017 11:28:41 +0000 (11:28 +0000)]
Unreviewed GTK+ gardening. Update expectations of tests failing after r217039.

* platform/gtk/TestExpectations:

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

2 years agoMore WebKit2 header cleanup
timothy_horton@apple.com [Thu, 18 May 2017 09:04:27 +0000 (09:04 +0000)]
More WebKit2 header cleanup
https://bugs.webkit.org/show_bug.cgi?id=172214

Reviewed by Simon Fraser.

* Shared/WebFindOptions.h:
* UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:
* UIProcess/Cocoa/WebViewImpl.mm:
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
* UIProcess/UserMediaPermissionRequestManagerProxy.h:
* UIProcess/UserMediaPermissionRequestProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setCompositionAsync):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/ViewGestureControllerMac.mm:
* WebProcess/ApplePay/WebPaymentCoordinator.cpp:
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
* WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
* WebProcess/Notifications/WebNotificationManager.cpp:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
* WebProcess/WebCoreSupport/WebValidationMessageClient.cpp:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setDeviceScaleFactor):
(WebKit::WebPage::centerSelectionInVisibleArea):
(WebKit::WebPage::findString):
(WebKit::WebPage::findStringMatches):
(WebKit::WebPage::getImageForFindMatch):
(WebKit::WebPage::selectFindMatch):
(WebKit::WebPage::hideFindUI):
(WebKit::WebPage::countStringMatches):
(WebKit::WebPage::didReceiveGeolocationPermissionDecision):
(WebKit::WebPage::mainFrameDidLayout):
(WebKit::WebPage::setCompositionAsync):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::findController):
(WebKit::WebPage::geolocationPermissionRequestManager):
* WebProcess/WebPage/WebURLSchemeTaskProxy.cpp:
Many small changes added up to a few percent. Removing UserMediaRequest
from UserMediaPermissionRequestProxy, which is included into WebPageProxy.h,
was worth another ~10% because it got VM.h out of WebPageProxy.h (like the
previous patch did with WebPage.h). In total, in my measurement (WebKit2
clean debug build) this is a ~15% speedup.

We really should figure out how to make DOMPromise.h not bring in all of
JavaScriptCore (or how to use promises without including DOMPromise.h in headers).

* Modules/mediastream/UserMediaController.cpp:
* Modules/mediastream/UserMediaController.h:

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

2 years agoWeb Inspector: [GTK] Adopt currentColor for mask SVG images
commit-queue@webkit.org [Thu, 18 May 2017 08:05:03 +0000 (08:05 +0000)]
Web Inspector: [GTK] Adopt currentColor for mask SVG images
https://bugs.webkit.org/show_bug.cgi?id=150603

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-05-18
Reviewed by Carlos Garcia Campos.

* UserInterface/Images/gtk/Circle.svg:
* UserInterface/Images/gtk/ClearBoth.svg:
* UserInterface/Images/gtk/ClearLeft.svg:
* UserInterface/Images/gtk/ClearRight.svg:
* UserInterface/Images/gtk/Close.svg:
* UserInterface/Images/gtk/CloseLarge.svg:
* UserInterface/Images/gtk/Console.svg:
* UserInterface/Images/gtk/Debugger.svg:
* UserInterface/Images/gtk/DockBottom.svg:
* UserInterface/Images/gtk/DockRight.svg:
* UserInterface/Images/gtk/DownloadArrow.svg:
* UserInterface/Images/gtk/Elements.svg:
* UserInterface/Images/gtk/Errors.svg:
* UserInterface/Images/gtk/Eye.svg:
* UserInterface/Images/gtk/FloatLeft.svg:
* UserInterface/Images/gtk/FloatRight.svg:
* UserInterface/Images/gtk/FontStyleItalic.svg:
* UserInterface/Images/gtk/FontStyleNormal.svg:
* UserInterface/Images/gtk/Gear.svg:
* UserInterface/Images/gtk/Issues.svg:
* UserInterface/Images/gtk/Logs.svg:
* UserInterface/Images/gtk/Minus.svg:
* UserInterface/Images/gtk/NavigationItemClear.svg:
* UserInterface/Images/gtk/NavigationItemTrash.svg:
* UserInterface/Images/gtk/Network.svg:
* UserInterface/Images/gtk/NewTab.svg:
* UserInterface/Images/gtk/NewTabPlus.svg:
* UserInterface/Images/gtk/Pause.svg:
* UserInterface/Images/gtk/Pencil.svg:
* UserInterface/Images/gtk/Plus13.svg:
* UserInterface/Images/gtk/Plus15.svg:
* UserInterface/Images/gtk/ReloadFull.svg:
* UserInterface/Images/gtk/ReloadToolbar.svg:
* UserInterface/Images/gtk/Resources.svg:
* UserInterface/Images/gtk/Search.svg:
* UserInterface/Images/gtk/SearchResults.svg:
* UserInterface/Images/gtk/SplitToggleUp.svg:
* UserInterface/Images/gtk/StepInto.svg:
* UserInterface/Images/gtk/StepOut.svg:
* UserInterface/Images/gtk/StepOver.svg:
* UserInterface/Images/gtk/Stop.svg:
* UserInterface/Images/gtk/Storage.svg:
* UserInterface/Images/gtk/TextAlignCenter.svg:
* UserInterface/Images/gtk/TextAlignJustify.svg:
* UserInterface/Images/gtk/TextAlignLeft.svg:
* UserInterface/Images/gtk/TextAlignRight.svg:
* UserInterface/Images/gtk/TextDecorationLineThrough.svg:
* UserInterface/Images/gtk/TextDecorationOverline.svg:
* UserInterface/Images/gtk/TextDecorationUnderline.svg:
* UserInterface/Images/gtk/TextTransformCapitalize.svg:
* UserInterface/Images/gtk/TextTransformLowercase.svg:
* UserInterface/Images/gtk/TextTransformUppercase.svg:
* UserInterface/Images/gtk/Time.svg:
* UserInterface/Images/gtk/Timeline.svg:
* UserInterface/Images/gtk/Undock.svg:
* UserInterface/Images/gtk/VisualStyleNone.svg:
* UserInterface/Images/gtk/VisualStylePropertyLinked.svg:
* UserInterface/Images/gtk/VisualStylePropertyUnlinked.svg:
* UserInterface/Images/gtk/Weight.svg:

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

2 years ago[Win] Remove usage of _snprintf
commit-queue@webkit.org [Thu, 18 May 2017 07:12:13 +0000 (07:12 +0000)]
[Win] Remove usage of _snprintf
https://bugs.webkit.org/show_bug.cgi?id=172251

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-18
Reviewed by Per Arne Vollan.

Source/WTF:

* wtf/DataLog.cpp:
(WTF::initializeLogFileOnce):
(WTF::setDataFile):

Tools:

* DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
* MiniBrowser/win/PageLoadTestClient.cpp:
(PageLoadTestClient::dumpRunStatistics):

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

2 years agoUnreviewed, fix debug and non-JIT build
utatane.tea@gmail.com [Thu, 18 May 2017 06:57:43 +0000 (06:57 +0000)]
Unreviewed, fix debug and non-JIT build
https://bugs.webkit.org/show_bug.cgi?id=172098

* jsc.cpp:
(WTF::DOMJITFunctionObject::checkSubClassPatchpoint):

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

2 years agoFix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList()
cdumez@apple.com [Thu, 18 May 2017 06:02:05 +0000 (06:02 +0000)]
Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList()
https://bugs.webkit.org/show_bug.cgi?id=172258

Reviewed by Brady Eidson.

Fix unsafe lambda capture in ContentRuleListStore::lookupContentRuleList(). The String
was moved instead of calling isolatedCopy(), even though we're passing the String to
another thread.

* UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::lookupContentRuleList):

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

2 years agoUnreviewed, rebaseline for newly added ClassInfo
utatane.tea@gmail.com [Thu, 18 May 2017 05:08:02 +0000 (05:08 +0000)]
Unreviewed, rebaseline for newly added ClassInfo
https://bugs.webkit.org/show_bug.cgi?id=172098

* wasm/js/WebAssemblyFunctionBase.cpp:

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

2 years ago[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
utatane.tea@gmail.com [Thu, 18 May 2017 04:59:38 +0000 (04:59 +0000)]
[JSC][DFG][DOMJIT] Extend CheckDOM to CheckSubClass
https://bugs.webkit.org/show_bug.cgi?id=172098

Reviewed by Saam Barati.

JSTests:

* stress/check-sub-class.js: Added.
(shouldBe):
(shouldThrow):
(calling):
(array.forEach):
(i.array.forEach):

Source/JavaScriptCore:

In this patch, we generalize CheckDOM to CheckSubClass.
It can accept any ClassInfo and perform ClassInfo check
in DFG / FTL. Now, we add a new function pointer to ClassInfo,
checkSubClassPatchpoint. It can create DOMJIT patchpoint
for that ClassInfo. It it natural that ClassInfo holds the
way to emit DOMJIT::Patchpoint to perform CheckSubClass
rather than having it in each DOMJIT getter / function
signature annotation.

One problem is that it enlarges the size of ClassInfo.
But this is the best place to put this function pointer.
By doing so, we can add a patchpoint for CheckSubClass
in an non-intrusive manner: WebCore can inject patchpoints
without interactive JSC.

We still have a way to reduce the size of ClassInfo if
we move ArrayBuffer related methods out to the other places.

This patch touches many files because we add a new function
pointer to ClassInfo. But they are basically mechanical change.

* API/JSAPIWrapperObject.mm:
* API/JSCallbackConstructor.cpp:
* API/JSCallbackFunction.cpp:
* API/JSCallbackObject.cpp:
* API/ObjCCallbackFunction.mm:
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
* bytecode/DOMJITAccessCasePatchpointParams.h:
(JSC::DOMJITAccessCasePatchpointParams::DOMJITAccessCasePatchpointParams):
* bytecode/EvalCodeBlock.cpp:
* bytecode/FunctionCodeBlock.cpp:
* bytecode/GetterSetterAccessCase.cpp:
(JSC::GetterSetterAccessCase::emitDOMJITGetter):
* bytecode/ModuleProgramCodeBlock.cpp:
* bytecode/ProgramCodeBlock.cpp:
* bytecode/UnlinkedCodeBlock.cpp:
* bytecode/UnlinkedEvalCodeBlock.cpp:
* bytecode/UnlinkedFunctionCodeBlock.cpp:
* bytecode/UnlinkedFunctionExecutable.cpp:
* bytecode/UnlinkedModuleProgramCodeBlock.cpp:
* bytecode/UnlinkedProgramCodeBlock.cpp:
* debugger/DebuggerScope.cpp:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDOMJITPatchpointParams.h:
(JSC::DFG::DOMJITPatchpointParams::DOMJITPatchpointParams):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeCallDOM):
(JSC::DFG::FixupPhase::fixupCheckSubClass):
(JSC::DFG::FixupPhase::fixupCheckDOM): Deleted.
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasClassInfo):
(JSC::DFG::Node::classInfo):
(JSC::DFG::Node::hasCheckDOMPatchpoint): Deleted.
(JSC::DFG::Node::checkDOMPatchpoint): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::SpeculativeJIT::compileCheckDOM): Deleted.
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::vm):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
In DFG, we rename CheckDOM to CheckSubClass. It just holds ClassInfo.
And ClassInfo knows how to perform CheckSubClass efficiently.
If ClassInfo does not have a way to perform CheckSubClass efficiently,
we just perform jsDynamicCast thing in ASM.
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* domjit/DOMJITGetterSetter.h:
* domjit/DOMJITPatchpointParams.h:
(JSC::DOMJIT::PatchpointParams::PatchpointParams):
(JSC::DOMJIT::PatchpointParams::vm):
* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
(JSC::DOMJIT::Signature::checkDOM): Deleted.
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLDOMJITPatchpointParams.h:
(JSC::FTL::DOMJITPatchpointParams::DOMJITPatchpointParams):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckDOM): Deleted.
* inspector/JSInjectedScriptHost.cpp:
* inspector/JSInjectedScriptHostPrototype.cpp:
* inspector/JSJavaScriptCallFrame.cpp:
* inspector/JSJavaScriptCallFramePrototype.cpp:
* jsc.cpp:
(WTF::DOMJITNode::checkSubClassPatchpoint):
(WTF::DOMJITFunctionObject::checkSubClassPatchpoint):
(WTF::DOMJITFunctionObject::finishCreation):
(WTF::DOMJITCheckSubClassObject::DOMJITCheckSubClassObject):
(WTF::DOMJITCheckSubClassObject::createStructure):
(WTF::DOMJITCheckSubClassObject::create):
(WTF::DOMJITCheckSubClassObject::safeFunction):
(WTF::DOMJITCheckSubClassObject::unsafeFunction):
(WTF::DOMJITCheckSubClassObject::finishCreation):
(GlobalObject::finishCreation):
(functionCreateDOMJITCheckSubClassObject):
(WTF::DOMJITNode::checkDOMJITNode): Deleted.
(WTF::DOMJITFunctionObject::checkDOMJITNode): Deleted.
* runtime/AbstractModuleRecord.cpp:
* runtime/ArrayBufferNeuteringWatchpoint.cpp:
* runtime/ArrayConstructor.cpp:
* runtime/ArrayIteratorPrototype.cpp:
* runtime/ArrayPrototype.cpp:
* runtime/AsyncFunctionConstructor.cpp:
* runtime/AsyncFunctionPrototype.cpp:
* runtime/AtomicsObject.cpp:
* runtime/BooleanConstructor.cpp:
* runtime/BooleanObject.cpp:
* runtime/BooleanPrototype.cpp:
* runtime/ClassInfo.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(JSC::ClassInfo::dump):
* runtime/ClassInfo.h:
(JSC::ClassInfo::offsetOfParentClass):
* runtime/ClonedArguments.cpp:
* runtime/ConsoleObject.cpp:
* runtime/CustomGetterSetter.cpp:
* runtime/DateConstructor.cpp:
* runtime/DateInstance.cpp:
* runtime/DatePrototype.cpp:
* runtime/DirectArguments.cpp:
* runtime/Error.cpp:
* runtime/ErrorConstructor.cpp:
* runtime/ErrorInstance.cpp:
* runtime/ErrorPrototype.cpp:
* runtime/EvalExecutable.cpp:
* runtime/Exception.cpp:
* runtime/ExceptionHelpers.cpp:
* runtime/ExecutableBase.cpp:
* runtime/FunctionConstructor.cpp:
* runtime/FunctionExecutable.cpp:
* runtime/FunctionPrototype.cpp:
* runtime/FunctionRareData.cpp:
* runtime/GeneratorFunctionConstructor.cpp:
* runtime/GeneratorFunctionPrototype.cpp:
* runtime/GeneratorPrototype.cpp:
* runtime/GetterSetter.cpp:
* runtime/HashMapImpl.cpp:
* runtime/HashMapImpl.h:
* runtime/InferredType.cpp:
(JSC::InferredType::create):
* runtime/InferredTypeTable.cpp:
* runtime/InferredValue.cpp:
* runtime/InspectorInstrumentationObject.cpp:
* runtime/InternalFunction.cpp:
* runtime/IntlCollator.cpp:
* runtime/IntlCollatorConstructor.cpp:
* runtime/IntlCollatorPrototype.cpp:
* runtime/IntlDateTimeFormat.cpp:
* runtime/IntlDateTimeFormatConstructor.cpp:
* runtime/IntlDateTimeFormatPrototype.cpp:
* runtime/IntlNumberFormat.cpp:
* runtime/IntlNumberFormatConstructor.cpp:
* runtime/IntlNumberFormatPrototype.cpp:
* runtime/IntlObject.cpp:
* runtime/IteratorPrototype.cpp:
* runtime/JSAPIValueWrapper.cpp:
* runtime/JSArray.cpp:
* runtime/JSArrayBuffer.cpp:
* runtime/JSArrayBufferConstructor.cpp:
* runtime/JSArrayBufferPrototype.cpp:
* runtime/JSArrayBufferView.cpp:
* runtime/JSAsyncFunction.cpp:
* runtime/JSBoundFunction.cpp:
* runtime/JSCallee.cpp:
* runtime/JSCustomGetterSetterFunction.cpp:
* runtime/JSDataView.cpp:
* runtime/JSDataViewPrototype.cpp:
* runtime/JSEnvironmentRecord.cpp:
* runtime/JSFixedArray.cpp:
* runtime/JSFunction.cpp:
* runtime/JSGeneratorFunction.cpp:
* runtime/JSGlobalLexicalEnvironment.cpp:
* runtime/JSGlobalObject.cpp:
* runtime/JSInternalPromise.cpp:
* runtime/JSInternalPromiseConstructor.cpp:
* runtime/JSInternalPromiseDeferred.cpp:
* runtime/JSInternalPromisePrototype.cpp:
* runtime/JSLexicalEnvironment.cpp:
* runtime/JSMap.cpp:
* runtime/JSMapIterator.cpp:
* runtime/JSModuleEnvironment.cpp:
* runtime/JSModuleLoader.cpp:
* runtime/JSModuleNamespaceObject.cpp:
* runtime/JSModuleRecord.cpp:
* runtime/JSNativeStdFunction.cpp:
* runtime/JSONObject.cpp:
* runtime/JSObject.cpp:
* runtime/JSPromise.cpp:
* runtime/JSPromiseConstructor.cpp:
* runtime/JSPromiseDeferred.cpp:
* runtime/JSPromisePrototype.cpp:
* runtime/JSPropertyNameEnumerator.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSProxy.cpp:
* runtime/JSScriptFetcher.cpp:
* runtime/JSSet.cpp:
* runtime/JSSetIterator.cpp:
* runtime/JSSourceCode.cpp:
* runtime/JSString.cpp:
* runtime/JSStringIterator.cpp:
* runtime/JSSymbolTableObject.cpp:
* runtime/JSTemplateRegistryKey.cpp:
* runtime/JSTypedArrayConstructors.cpp:
* runtime/JSTypedArrayPrototypes.cpp:
* runtime/JSTypedArrayViewConstructor.cpp:
* runtime/JSTypedArrays.cpp:
* runtime/JSWeakMap.cpp:
* runtime/JSWeakSet.cpp:
* runtime/JSWithScope.cpp:
* runtime/MapConstructor.cpp:
* runtime/MapIteratorPrototype.cpp:
* runtime/MapPrototype.cpp:
* runtime/MathObject.cpp:
* runtime/ModuleLoaderPrototype.cpp:
* runtime/ModuleProgramExecutable.cpp:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeExecutable.cpp:
* runtime/NativeStdFunctionCell.cpp:
* runtime/NullGetterFunction.cpp:
* runtime/NullSetterFunction.cpp:
* runtime/NumberConstructor.cpp:
* runtime/NumberObject.cpp:
* runtime/NumberPrototype.cpp:
* runtime/ObjectConstructor.cpp:
* runtime/ObjectPrototype.cpp:
* runtime/ProgramExecutable.cpp:
* runtime/PropertyTable.cpp:
* runtime/ProxyConstructor.cpp:
* runtime/ProxyObject.cpp:
* runtime/ProxyRevoke.cpp:
* runtime/ReflectObject.cpp:
* runtime/RegExp.cpp:
* runtime/RegExpConstructor.cpp:
* runtime/RegExpObject.cpp:
* runtime/RegExpPrototype.cpp:
* runtime/ScopedArguments.cpp:
* runtime/ScopedArgumentsTable.cpp:
* runtime/ScriptExecutable.cpp:
* runtime/SetConstructor.cpp:
* runtime/SetIteratorPrototype.cpp:
* runtime/SetPrototype.cpp:
* runtime/SparseArrayValueMap.cpp:
* runtime/StrictEvalActivation.cpp:
* runtime/StringConstructor.cpp:
* runtime/StringIteratorPrototype.cpp:
* runtime/StringObject.cpp:
* runtime/StringPrototype.cpp:
* runtime/Structure.cpp:
* runtime/StructureChain.cpp:
* runtime/StructureRareData.cpp:
* runtime/Symbol.cpp:
* runtime/SymbolConstructor.cpp:
* runtime/SymbolObject.cpp:
* runtime/SymbolPrototype.cpp:
* runtime/SymbolTable.cpp:
* runtime/WeakMapConstructor.cpp:
* runtime/WeakMapData.cpp:
* runtime/WeakMapPrototype.cpp:
* runtime/WeakSetConstructor.cpp:
* runtime/WeakSetPrototype.cpp:
* testRegExp.cpp:
* tools/JSDollarVM.cpp:
* tools/JSDollarVMPrototype.cpp:
* wasm/JSWebAssembly.cpp:
* wasm/js/JSWebAssemblyCodeBlock.cpp:
* wasm/js/JSWebAssemblyCompileError.cpp:
* wasm/js/JSWebAssemblyInstance.cpp:
* wasm/js/JSWebAssemblyLinkError.cpp:
* wasm/js/JSWebAssemblyMemory.cpp:
* wasm/js/JSWebAssemblyModule.cpp:
* wasm/js/JSWebAssemblyRuntimeError.cpp:
* wasm/js/JSWebAssemblyTable.cpp:
* wasm/js/WebAssemblyCompileErrorConstructor.cpp:
* wasm/js/WebAssemblyCompileErrorPrototype.cpp:
* wasm/js/WebAssemblyFunction.cpp:
* wasm/js/WebAssemblyInstanceConstructor.cpp:
* wasm/js/WebAssemblyInstancePrototype.cpp:
* wasm/js/WebAssemblyLinkErrorConstructor.cpp:
* wasm/js/WebAssemblyLinkErrorPrototype.cpp:
* wasm/js/WebAssemblyMemoryConstructor.cpp:
* wasm/js/WebAssemblyMemoryPrototype.cpp:
* wasm/js/WebAssemblyModuleConstructor.cpp:
* wasm/js/WebAssemblyModulePrototype.cpp:
* wasm/js/WebAssemblyModuleRecord.cpp:
* wasm/js/WebAssemblyPrototype.cpp:
* wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
* wasm/js/WebAssemblyRuntimeErrorPrototype.cpp:
* wasm/js/WebAssemblyTableConstructor.cpp:
* wasm/js/WebAssemblyTablePrototype.cpp:
* wasm/js/WebAssemblyToJSCallee.cpp:
* wasm/js/WebAssemblyWrapperFunction.cpp:

Source/WebCore:

Add DOMJIT interface IDL attribute. Which allows us to define checkSubClassPatchpoint function
for that ClassInfo. And we move CheckSubClass patchpoint implementation to ClassInfo's member.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMGlobalObject.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowProperties.cpp:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateImplementationIterableFunctions):
(GenerateConstructorHelperMethods):
* bindings/scripts/IDLAttributes.json:
* bindings/scripts/test/JS/JSInterfaceName.cpp:
* bindings/scripts/test/JS/JSMapLike.cpp:
* bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestCEReactions.cpp:
* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
* bindings/scripts/test/JS/JSTestIterable.cpp:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* bindings/scripts/test/JS/JSTestSerialization.cpp:
* bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
* bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bridge/c/CRuntimeObject.cpp:
* bridge/c/c_instance.cpp:
* bridge/objc/ObjCRuntimeObject.mm:
* bridge/objc/objc_instance.mm:
* bridge/objc/objc_runtime.mm:
* bridge/runtime_array.cpp:
* bridge/runtime_method.cpp:
* bridge/runtime_object.cpp:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/Node.idl:
* domjit/JSDocumentDOMJIT.cpp:
(WebCore::JSDocument::checkSubClassPatchpoint):
(WebCore::DocumentDocumentElementDOMJIT::checkDOM): Deleted.
(WebCore::DocumentBodyDOMJIT::checkDOM): Deleted.
* domjit/JSDocumentFragmentDOMJIT.cpp: Copied from Source/JavaScriptCore/runtime/JSMap.cpp.
(WebCore::JSDocumentFragment::checkSubClassPatchpoint):
* domjit/JSElementDOMJIT.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(WebCore::JSElement::checkSubClassPatchpoint):
* domjit/JSEventDOMJIT.cpp: Copied from Source/JavaScriptCore/tools/JSDollarVM.cpp.
(WebCore::JSEvent::checkSubClassPatchpoint):
* domjit/JSNodeDOMJIT.cpp:
(WebCore::JSNode::checkSubClassPatchpoint):
(WebCore::NodeFirstChildDOMJIT::checkDOM): Deleted.
(WebCore::NodeLastChildDOMJIT::checkDOM): Deleted.
(WebCore::NodeNextSiblingDOMJIT::checkDOM): Deleted.
(WebCore::NodePreviousSiblingDOMJIT::checkDOM): Deleted.
(WebCore::NodeParentNodeDOMJIT::checkDOM): Deleted.
(WebCore::NodeNodeTypeDOMJIT::checkDOM): Deleted.
(WebCore::NodeOwnerDocumentDOMJIT::checkDOM): Deleted.

Source/WebKit/mac:

* Plugins/Hosted/ProxyInstance.mm:
* Plugins/Hosted/ProxyRuntimeObject.mm:

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:

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

2 years agor216999 broke win build
commit-queue@webkit.org [Thu, 18 May 2017 04:07:23 +0000 (04:07 +0000)]
r216999 broke win build
https://bugs.webkit.org/show_bug.cgi?id=172257

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-17

* testing/Internals.cpp:
(WebCore::Internals::setPageVisibility): Moving setPageVisibility out of MEDIA_STREAM compilation flag.

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

2 years ago[Cocoa] errors are not propagated to PassKit when calling ApplePaySession.completePay...
aestes@apple.com [Thu, 18 May 2017 00:58:54 +0000 (00:58 +0000)]
[Cocoa] errors are not propagated to PassKit when calling ApplePaySession.completePayment()
https://bugs.webkit.org/show_bug.cgi?id=172253
<rdar://problem/32258020>

Reviewed by Dan Bernstein.

In ApplePaySession::completePayment(), releaseReturnValue() was being called twice on the
same convertedResult. Since the first call moved the errors vector out of convertedResult,
the vector is empty in the second call. It's the second call that sends the result to the
UI process, so we end up with an empty arary when we call PassKit's delegate completion
handler.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::completePayment):

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

2 years agoUnreviewed, rolling out r217014.
ryanhaddad@apple.com [Thu, 18 May 2017 00:37:10 +0000 (00:37 +0000)]
Unreviewed, rolling out r217014.

This change caused mac-wk2 LayoutTests to exit early due to
crashes.

Reverted changeset:

"Resource Load Statistics: Grandfather domains for existing
data records"
https://bugs.webkit.org/show_bug.cgi?id=172155
http://trac.webkit.org/changeset/217014

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

2 years agoTighten TextIterator::handleTextNode run-renderer mapping logic.
zalan@apple.com [Thu, 18 May 2017 00:29:07 +0000 (00:29 +0000)]
Tighten TextIterator::handleTextNode run-renderer mapping logic.
https://bugs.webkit.org/show_bug.cgi?id=172174

Reviewed by Antti Koivisto.

Source/WebCore:

This patch ensure that when runs and renderers are getting out of sync
we don't run into problems like webkit.org/b/172113 (where we end up
using incorrect content start/end positions).

* editing/TextIterator.cpp:
(WebCore::TextIterator::handleTextNode):

LayoutTests:

* fast/shadow-dom/slot-crash-expected.txt:

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

2 years agoUnreviewed, address mlam's review feedback.
fpizlo@apple.com [Thu, 18 May 2017 00:26:20 +0000 (00:26 +0000)]
Unreviewed, address mlam's review feedback.

* stress/arguments-elimination-varargs-too-many-args-arg-count.js:

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

2 years agoWe don't do context switches for Wasm->Wasm call indirect
sbarati@apple.com [Thu, 18 May 2017 00:23:56 +0000 (00:23 +0000)]
We don't do context switches for Wasm->Wasm call indirect
https://bugs.webkit.org/show_bug.cgi?id=172188
<rdar://problem/32231828>

Reviewed by Keith Miller.

JSTests:

* wasm/function-tests/context-switch.js: Added.
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance2):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.i2.makeInstance2):
(makeInstance):
(makeInstance2):
(assert.eq.makeInstance):
(assert.eq.makeInstance2):
(assert.eq):

Source/JavaScriptCore:

We did not do a context switch when doing an indirect call.
This is clearly wrong, since the thing we're making an indirect
call to could be from another instance. This patch fixes this
oversight by doing a very simple context switch. I've also opened
a bug to make indirect calls fast: https://bugs.webkit.org/show_bug.cgi?id=172197
since this patch adds yet another branch to the indirect call path.
I've also added tests that either throw or crash before this change.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wasm/WasmB3IRGenerator.cpp:
* wasm/js/JSWebAssemblyTable.h:
(JSC::JSWebAssemblyTable::offsetOfJSFunctions):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation): Deleted.
* wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::instance): Deleted.
(JSC::WebAssemblyFunction::offsetOfInstance): Deleted.
* wasm/js/WebAssemblyFunctionBase.cpp: Added.
(JSC::WebAssemblyFunctionBase::WebAssemblyFunctionBase):
(JSC::WebAssemblyFunctionBase::visitChildren):
(JSC::WebAssemblyFunctionBase::finishCreation):
* wasm/js/WebAssemblyFunctionBase.h: Added.
(JSC::WebAssemblyFunctionBase::instance):
(JSC::WebAssemblyFunctionBase::offsetOfInstance):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):
* wasm/js/WebAssemblyWrapperFunction.cpp:
(JSC::WebAssemblyWrapperFunction::create):
(JSC::WebAssemblyWrapperFunction::finishCreation):
(JSC::WebAssemblyWrapperFunction::visitChildren):
* wasm/js/WebAssemblyWrapperFunction.h:

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

2 years agoJSC: Incorrect LoadVarargs handling in ArgumentsEliminationPhase::transform
fpizlo@apple.com [Thu, 18 May 2017 00:22:43 +0000 (00:22 +0000)]
JSC: Incorrect LoadVarargs handling in ArgumentsEliminationPhase::transform
https://bugs.webkit.org/show_bug.cgi?id=172208

Reviewed by Saam Barati.

JSTests:

* stress/arguments-elimination-varargs-too-many-args-arg-count.js: Added.
(foo):
(bar):
(baz):

Source/JavaScriptCore:

* dfg/DFGArgumentsEliminationPhase.cpp:

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

2 years agoResource Load Statistics: Grandfather domains for existing data records
wilander@apple.com [Wed, 17 May 2017 23:55:24 +0000 (23:55 +0000)]
Resource Load Statistics: Grandfather domains for existing data records
https://bugs.webkit.org/show_bug.cgi?id=172155
<rdar://problem/24913532>

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/grandfathering.html

* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setGrandfathered):
(WebCore::ResourceLoadObserver::isGrandfathered):
(WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
(WebCore::ResourceLoadObserver::setGrandfatheringTime):
    Functions for testing and configuration.
    ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval() changed as a result of moving
    WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval() here.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatisticsStore.cpp:
(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
    Now contains endOfGrandfatheringTimestamp.
(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
    Now makes a call to m_grandfatherExistingWebsiteDataHandler().
(WebCore::ResourceLoadStatisticsStore::setGrandfatherExistingWebsiteDataCallback):
(WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
    Changed as a result of moving
    WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval() here.
(WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
(WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
    Renamed since it now also takes grandfathering into account.
(WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):
    Fixed typo in local variable name.
(WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
(WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::dataRecordsWereRemoved):
    Convenience function added.
(WebCore::ResourceLoadStatisticsStore::prevalentResourceDomainsWithoutUserInteraction): Deleted.
    Replaced by ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor().
* loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

When WebResourceLoadStatisticsStore starts fresh it needs
to scan existing website data records and 'grandfather' them to
allow ample time to capture user interaction.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:
(WKResourceLoadStatisticsManagerSetGrandfathered):
(WKResourceLoadStatisticsManagerIsGrandfathered):
(WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
(WKResourceLoadStatisticsManagerSetGrandfatheringTime):
    Functions for testing and configuration.
* UIProcess/API/C/WKResourceLoadStatisticsManager.h:
* UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:
(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):
    Added grandfathering configuration.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData):
    New function to get all top privately controlled domains that
    have website data.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebResourceLoadStatisticsManager.cpp:
(WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):
    Functions for testing and configuration.
    WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval() changed
    as a result of WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval()
    moving to WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
* UIProcess/WebResourceLoadStatisticsManager.h:
* UIProcess/WebResourceLoadStatisticsStore.cpp:
(WebKit::initializeDataTypesToRemove):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
    Moved handling of pending removal into WebCore::ResourceLoadStatisticsStore since
    that's where grandfathering happens.
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
    Moved registration of write persistent store callback and reading of Cocoa defaults to
    WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver without parameters
    so they are called for platforms without CFNETWORK_STORAGE_PARTITIONING.
    Now includes registering WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
    as handler for grandfathering since it involves reading of the website data store.
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval): Deleted.
    Now happens in WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval().
* UIProcess/WebResourceLoadStatisticsStore.h:
* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(WebKit::WebsiteDataRecord::topPrivatelyControlledDomain):
    New function to ask a WebsiteDataRecord for its top privately controlled domain.
* UIProcess/WebsiteData/WebsiteDataRecord.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData):
    New function to get all top privately controlled domains that
    have website data.
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

Adds test infrastructure needed for the added functionality.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsGrandfathered):
(WTR::TestRunner::isStatisticsGrandfathered):
(WTR::TestRunner::installStatisticsDidScanDataRecordsCallback):
(WTR::TestRunner::statisticsDidScanDataRecordsCallback):
(WTR::TestRunner::setStatisticsGrandfatheringTime):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsGrandfathered):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::setStatisticsGrandfatheringTime):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/tests/loading/resourceLoadStatistics/grandfathering-expected.txt: Added.
* http/tests/loading/resourceLoadStatistics/grandfathering.html: Added.
* platform/wk2/TestExpectations:
    Marked it Pass for WebKit2.

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

2 years ago[WK2][iOS] Allow access to additional IOHID user class
bfulgham@apple.com [Wed, 17 May 2017 23:40:56 +0000 (23:40 +0000)]
[WK2][iOS] Allow access to additional IOHID user class
https://bugs.webkit.org/show_bug.cgi?id=172198
<rdar://problem/31967635>

Reviewed by Alex Christensen.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:

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

2 years agoDebug ASSERT: WebCore::RenderImageResource::shutdown
zalan@apple.com [Wed, 17 May 2017 23:30:47 +0000 (23:30 +0000)]
Debug ASSERT: WebCore::RenderImageResource::shutdown
https://bugs.webkit.org/show_bug.cgi?id=172238
<rdar://problem/30064601>

Reviewed by Simon Fraser.

Source/WebCore:

While constructing new renderers, as part of the render tree update, we check if the insertion point is valid for them.
When this newly constructed child renderer can't be injected to a specific place, we destroy it right away.
This assert was added with the assumption that the image resource object gets initialized
(through RenderObject::initializeStyle) even when the renderer turns out to be invalid.

Test: fast/images/assert-when-insertion-point-is-incorrect.html

* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::RenderImageResource):
(WebCore::RenderImageResource::shutdown):
* rendering/RenderImageResource.h:

LayoutTests:

* fast/images/assert-when-insertion-point-is-incorrect-expected.txt: Added.
* fast/images/assert-when-insertion-point-is-incorrect.html: Added.

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

2 years ago[Win] Support $vm.getpid()
commit-queue@webkit.org [Wed, 17 May 2017 23:13:29 +0000 (23:13 +0000)]
[Win] Support $vm.getpid()
https://bugs.webkit.org/show_bug.cgi?id=172248

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-17
Reviewed by Mark Lam.

* tools/JSDollarVMPrototype.cpp:
(JSC::functionGetPID):
(JSC::JSDollarVMPrototype::finishCreation):

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

2 years agoFix ios-simulator API test after r216977
achristensen@apple.com [Wed, 17 May 2017 23:11:41 +0000 (23:11 +0000)]
Fix ios-simulator API test after r216977
https://bugs.webkit.org/show_bug.cgi?id=171987

* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStore.mm:
(TEST):
<rdar://problem/32260156> covers the investigation of this, but fixing it is
not as urgent as having the rest of this working. Notably the ephemeral part of the
test works, so something is just wrong with the persistent part.

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

2 years agoMark http/tests/appcache/404-resource-with-slow-main-resource.php as flaky on mac...
ryanhaddad@apple.com [Wed, 17 May 2017 22:34:41 +0000 (22:34 +0000)]
Mark http/tests/appcache/404-resource-with-slow-main-resource.php as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=172241

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

2 years agoAdd more assertions in BackgroundProcessResponsivenessTimer
cdumez@apple.com [Wed, 17 May 2017 21:58:45 +0000 (21:58 +0000)]
Add more assertions in BackgroundProcessResponsivenessTimer
https://bugs.webkit.org/show_bug.cgi?id=172239

Reviewed by Andreas Kling.

Add more assertions in BackgroundProcessResponsivenessTimer to help figure out the
source of <rdar://problem/32251578>.

* UIProcess/BackgroundProcessResponsivenessTimer.cpp:
(WebKit::BackgroundProcessResponsivenessTimer::updateState):
(WebKit::BackgroundProcessResponsivenessTimer::scheduleNextResponsivenessCheck):

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

2 years agoCrash under WebCore::AudioSourceProviderAVFObjC::process().
pvollan@apple.com [Wed, 17 May 2017 21:53:01 +0000 (21:53 +0000)]
Crash under WebCore::AudioSourceProviderAVFObjC::process().
https://bugs.webkit.org/show_bug.cgi?id=172101
rdar://problem/27446589

Reviewed by Jer Noble.

Calling the function MTAudioProcessingTapGetSourceAudio when the value of the
MTAudioProcessingTapRef parameter is null, will lead to a null dereference.
This can for example happen if MediaPlayerPrivateAVFoundationObjC::cancelLoad()
is called on the main thread while MediaToolbox is calling the
WebCore::AudioSourceProviderAVFObjC::processCallback function on a secondary
thread. MediaPlayerPrivateAVFoundationObjC::cancelLoad() will then call
AudioSourceProviderAVFObjC::setPlayerItem(nullptr), which will call
AudioSourceProviderAVFObjC::destroyMix(), which will set m_tap to null. When
AudioSourceProviderAVFObjC::process is called on the secondary thread, using
the m_tap member in the call to MTAudioProcessingTapGetSourceAudio, the process
will crash.

No new tests since I am not able to reproduce.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
(WebCore::AudioSourceProviderAVFObjC::initCallback):
(WebCore::AudioSourceProviderAVFObjC::process):

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

2 years agoSetting URL.search to '' results in a stringified URL ending in '?'
cdumez@apple.com [Wed, 17 May 2017 21:50:11 +0000 (21:50 +0000)]
Setting URL.search to '' results in a stringified URL ending in '?'
https://bugs.webkit.org/show_bug.cgi?id=162345
<rdar://problem/31800441>

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline web-platform-test now that more checks are passing.

* web-platform-tests/url/url-setters-expected.txt:

Source/WebCore:

As per the specification for the URL.search setter [1], if the given value is
the empty string, then we should set the URL's query to null. We would
previously set the URL's query to the empty string in this case. This aligns
our behavior with Firefox and Chrome.

[1] https://url.spec.whatwg.org/#dom-url-search

No new tests, updated existing tests.

* html/URLUtils.h:
(WebCore::URLUtils<T>::setSearch):

LayoutTests:

* fast/dom/DOMURL/set-href-attribute-search-expected.txt:
* fast/dom/DOMURL/set-href-attribute-search.html:
* fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js:
* fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt:
Update / rebaseline existing tests to reflect behavior change.

* platform/ios-wk1/TestExpectations:
* platform/mac-wk1/TestExpectations:
Unskip url-setters.html test as it seems to be passing for me on WK1.

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

2 years agoUnreviewed, rolling out r216955.
ryanhaddad@apple.com [Wed, 17 May 2017 21:49:22 +0000 (21:49 +0000)]
Unreviewed, rolling out r216955.

This change caused strange behavior with web-platform-tests
locally and on EWS.

Reverted changeset:

"webkitpy: Start servers before setting-up for testing"
https://bugs.webkit.org/show_bug.cgi?id=172176
http://trac.webkit.org/changeset/216955

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

2 years agoNo need to copy origin references in UserMediaPermissionRequestManagerProxy::getUserM...
commit-queue@webkit.org [Wed, 17 May 2017 21:48:51 +0000 (21:48 +0000)]
No need to copy origin references in UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo
https://bugs.webkit.org/show_bug.cgi?id=172242

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-17
Reviewed by Eric Carlson.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::getUserMediaPermissionInfo):

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

2 years ago[MediaStream] videoWidth and videoHeight should be set when 'loadedmetadata' event...
eric.carlson@apple.com [Wed, 17 May 2017 21:31:52 +0000 (21:31 +0000)]
[MediaStream] videoWidth and videoHeight should be set when 'loadedmetadata' event fires
https://bugs.webkit.org/show_bug.cgi?id=172223
<rdar://problem/31899755>

Reviewed by Jer Noble.

Source/WebCore:

Test: fast/mediastream/get-user-media-on-loadedmetadata.html

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState): If a stream has
a video track, return HaveNothing until we have a sample.

* platform/mediastream/RealtimeMediaSource.h:
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::tick): Optionally delay the next sample.
(WebCore::MockRealtimeAudioSource::delaySamples):
* platform/mock/MockRealtimeAudioSource.h:

* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::delaySamples):
(WebCore::MockRealtimeVideoSource::generateFrame): Optionally delay the next sample.
* platform/mock/MockRealtimeVideoSource.h:

* testing/Internals.cpp:
(WebCore::Internals::delayMediaStreamTrackSamples):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/mediastream/get-user-media-on-loadedmetadata-expected.txt: Added.
* fast/mediastream/get-user-media-on-loadedmetadata.html: Added.

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

2 years agoSource/bmalloc:
msaboff@apple.com [Wed, 17 May 2017 21:28:26 +0000 (21:28 +0000)]
Source/bmalloc:
[iOS] The Garbage Collector shouldn't rely on the bmalloc scavenger for up to date memory footprint info (172186)
https://bugs.webkit.org/show_bug.cgi?id=172186

Reviewed by Geoffrey Garen.

The calls memoryFootprint() and percentAvailableMemoryInUse() now make a system call to get
the current memory footprint value.

* bmalloc/Heap.h:
(bmalloc::Heap::memoryFootprint):
(bmalloc::Heap::percentAvailableMemoryInUse):

Source/JavaScriptCore:
[iOS] The Garbage Collector shouldn't rely on the bmalloc scavenger for up to date memory footprint info
https://bugs.webkit.org/show_bug.cgi?id=172186

Reviewed by Geoffrey Garen.

The calls to bmalloc::api::memoryFootprint() and ::percentAvailableMemoryInUse() now call
the OS to get up to date values.  In overCriticalMemoryThreshold(), we get the current value every
100th call and use a cached value the rest of the time.  When colleciton is done, we start with
a new overCriticalMemoryThreshold value for the next cycle.

The choice of 1 out of 100 calls was validated by using JetStream and verifying that it didn't impact
performance and still provides timely memory footprint data.  With additional debug logging, I
determined that we call overCriticalMemoryThreshold() over 20,000 times/second running JetStream.
Other logging showed that there were over 1700 calls to overCriticalMemoryThreshold() on average per
GC cycle.  Dividing both of these numbers by 100 seems reasonable.

* heap/Heap.cpp:
(JSC::Heap::overCriticalMemoryThreshold):
(JSC::Heap::updateAllocationLimits):
(JSC::Heap::shouldDoFullCollection):
* heap/Heap.h:

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

2 years agoiOS WebRTC Media Capture should not allow camera capture from background tab
commit-queue@webkit.org [Wed, 17 May 2017 21:08:26 +0000 (21:08 +0000)]
iOS WebRTC Media Capture should not allow camera capture from background tab
https://bugs.webkit.org/show_bug.cgi?id=172200

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-17
Reviewed by Eric Carlson.

Source/WebCore:

Test: platform/ios/mediastream/getUserMedia-disabled-in-background-tabs.html and manual tests.

Making Video Capture Factory aware of Document visibility changes.
On iOS, muting/unmuting the current video source according Document visibility.
Not using Document visibility change observer as factories are platform and cannot implement
the visibility observer interface without moving the visibility observer interface.

Introducing internals API to switch on/off the page visibility.

* dom/Document.cpp:
(WebCore::Document::visibilityStateChanged):
(WebCore::Document::notifyVisibilityChangedToMediaCapture):
* dom/Document.h:
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::RealtimeMediaSourceCenter::setVisibility):
* platform/mediastream/RealtimeMediaSourceCenter.h:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSourceFactory::setVisibility):
* testing/Internals.cpp:
(WebCore::Internals::setPageVisibility):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* platform/ios/mediastream/getUserMedia-disabled-in-background-tabs-expected.txt: Added.
* platform/ios/mediastream/getUserMedia-disabled-in-background-tabs.html: Added.

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

2 years agoWhen the image decoding thread makes a callOnMainThread(), ensure all the objects...
commit-queue@webkit.org [Wed, 17 May 2017 20:58:42 +0000 (20:58 +0000)]
When the image decoding thread makes a callOnMainThread(), ensure all the objects it needs are protected
https://bugs.webkit.org/show_bug.cgi?id=171614

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-05-17
Reviewed by David Kilzer.

The asynchronous image decoding was designed to not block the main thread if
the image is deleted. To achieve that we allow decoding the current frame
even if it is not going to be used after closing the decoding queue. We
protect all the objects which the decoding thread uses. But when a frame
finishes decoding the native image frame is cached on the main thread. Not
all of the objects are protected when the callOnMainThread() is dispatched.
The ImageFrameCache and the ImageDecoder objects are not protected.

This might lead to two kinds of crashes:
1. A segfault inside the ImageDecoder trying to access one of its member
2. A segfault inside the ImageFrameCache trying to access one of its frames

The fix is to protect the ImageFrameCache and the ImageDecoder when the
decoding thread makes a callOnMainThread(). Also switch all the pointers
the decoding threads protect to be ThreadSafeRefCounted.

* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/cg/ImageDecoderCG.h:
* platform/graphics/win/ImageDecoderDirect2D.h:
* platform/image-decoders/ImageDecoder.h:

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

2 years agoA URL type is vended for a non-URL plain text string when starting data interaction
wenson_hsieh@apple.com [Wed, 17 May 2017 20:56:04 +0000 (20:56 +0000)]
A URL type is vended for a non-URL plain text string when starting data interaction
https://bugs.webkit.org/show_bug.cgi?id=172228
<rdar://problem/32166729>

Reviewed by Andy Estes.

Source/WebCore:

Previously, when writing a plain text string to WebItemProviderPasteboard, we would write an NSString directly
to the item provider by using built-in functionality in NSString+UIItemProvider. However, this causes plain
strings such as "apple" to be considered URLs, since -[NSURL URLWithString:] creates a non-null NSURL. To fix
this, we instead write the string as UTF8 data, for the UTI kUTTypeUTF8PlainText, if the plain text is not a
URL. If the plain text is clearly a URL (determined by constructing a new WebCore URL with no base URL and the
plaintext string as the absolute URL) then we additionally write an NSURL to the pasteboard.

2 new API tests:
DataInteractionTests.SinglePlainTextWordTypeIdentifiers
DataInteractionTests.SinglePlainTextURLTypeIdentifiers

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

Tools:

Adds two new data interaction tests, SinglePlainTextWordTypeIdentifiers and SinglePlainTextURLTypeIdentifiers,
to verify that a URL UTI is not vended when beginning a data interaction on a single word, but that a URL is
still vended when beginning data interaction on something that resembles a link.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

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

2 years agoSpeedometer: adjust Ember TodoMVC to use full path
rniwa@webkit.org [Wed, 17 May 2017 20:52:39 +0000 (20:52 +0000)]
Speedometer: adjust Ember TodoMVC to use full path
https://bugs.webkit.org/show_bug.cgi?id=172211

Patch by Addy Osmani <addyosmani@gmail.com> on 2017-05-17
Reviewed by Ryosuke Niwa.

* Speedometer/resources/tests.js: use full path to Ember TodoMVC app.

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