⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Dec 21, 2019:

8:19 PM Changeset in webkit [253868] by BJ Burg
  • 44 edits
    4 copies
    5 adds in trunk/Source

Web Inspector: add InspectedTargetTypes diagnostic event and related hooks
https://bugs.webkit.org/show_bug.cgi?id=205174
<rdar://problem/57887953>

Reviewed by Devin Rousso.

Source/WebCore:

Expose debuggable information via InspectorFrontendHost.

  • WebCore.xcodeproj/project.pbxproj: Add new files.
  • inspector/InspectorFrontendClient.h: Add new methods.
  • testing/Internals.cpp: Implement new methods.
  • inspector/InspectorFrontendHost.idl:
  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::debuggableTypeToString):
(WebCore::InspectorFrontendHost::debuggableInfo const):
(WebCore::InspectorFrontendHost::debuggableType): Deleted.
Expose a DebuggableInfo dictionary via the .debuggableInfo getter.

Source/WebInspectorUI:

This change adds a new diagnostic recorder that reports information about
inspected targets and their type / version information.

  • UserInterface/Base/DebuggableType.js:

(WI.DebuggableType.fromString):
Move the static parsing factory method to DebuggableType class.

  • UserInterface/Main.html: Add new files.
  • UserInterface/Base/Main.js:

(WI.contentLoaded): Add new diagnostic recorder.

  • UserInterface/Protocol/InspectorBackend.js:

(InspectorBackendClass.prototype.activateDomain):
Adapt to InspectorFrontendHost changes.

  • UserInterface/Test/TestAppController.js:

(WI.TestAppController):

  • UserInterface/Controllers/AppController.js:

(WI.AppController):
Adapt to InspectorFrontendHost changes.

Source/WebKit:

This change supplies Web Inspector with information about the debuggable that
it is connected to. This is used for diagnostics and to customize the UI based
on the target type being inspected.

For remote Web Inspector, WebKit clients can populate an instance of
_WKInspectorDebuggableInfo and use it when calling into
-[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:].

For local Web Inspector, WebInspectorProxy fills in information for the local
debuggable by consulting SystemVersion.plist (on Mac port).

The new enum _WKInspectorDebuggableType replaces _WKRemoteWebInspectorDebuggableType.
Its WebCore equivalent is Inspector::DebuggableType. The type and other information
are carried around in a _WKInspectorDebuggableInfo class. The equivalents for this
class are API::DebuggableInfo and DebuggableInfoData (for sending over IPC).

The DebuggableInfoData is sent as part of the initial message from UIProcess
to an Inspector WebProcess, similar to how a debuggableType string was sent before.

  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:

Add new files.

  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject): Add new object type.

  • Shared/WebCoreArgumentCoders.h: Add EnumTraits for Inspector::DebuggableType.
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewControllerPrivate.h:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:

(legacyDebuggableTypeToModernDebuggableType):
(-[_WKRemoteWebInspectorViewController loadForDebuggableType:backendCommandsURL:]):
(-[_WKRemoteWebInspectorViewController loadForDebuggable:backendCommandsURL:]):
(debuggableTypeString): Deleted.
Use the new enum in a new method that clients can switch over to. The old method
can be removed when it is no longer being used.

  • UIProcess/RemoteWebInspectorProxy.h:
  • UIProcess/RemoteWebInspectorProxy.cpp:

(WebKit::RemoteWebInspectorProxy::RemoteWebInspectorProxy):
(WebKit::RemoteWebInspectorProxy::load):
(WebKit::RemoteWebInspectorProxy::reopen):
Send DebuggableInfoData struct to RemoteWebInspectorUI.

  • UIProcess/WebInspectorProxy.h:
  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::openLocalInspectorFrontend):
(WebKit::WebInspectorProxy::infoForLocalDebuggable):
Send DebuggableInfoData struct to WebInspectorUI.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::systemVersionPlist):
(WebKit::WebInspectorProxy::infoForLocalDebuggable):
Add Mac implementation for local debuggables.

  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::infoForLocalDebuggable):

  • UIProcess/win/WebInspectorProxyWin.cpp:

(WebKit::WebInspectorProxy::infoForLocalDebuggable):

  • UIProcess/wpe/WebInspectorProxyWPE.cpp:

(WebKit::WebInspectorProxy::infoForLocalDebuggable):
Add stubs for other platforms.

  • UIProcess/glib/RemoteInspectorClient.cpp:
  • UIProcess/socket/RemoteInspectorClient.h:
  • UIProcess/socket/RemoteInspectorClient.cpp:

(WebKit::RemoteInspectorClient::inspect):
(WebKit::debuggableTypeToString):
(WebKit::RemoteInspectorClient::setTargetList):
Use Inspector::DebuggableType instead of String for debuggable type.

  • WebProcess/WebPage/RemoteWebInspectorUI.messages.in:
  • WebProcess/WebPage/RemoteWebInspectorUI.h:
  • WebProcess/WebPage/RemoteWebInspectorUI.cpp:

(WebKit::RemoteWebInspectorUI::initialize):
(WebKit::RemoteWebInspectorUI::debuggableType const):
(WebKit::RemoteWebInspectorUI::targetPlatformName const):
(WebKit::RemoteWebInspectorUI::targetBuildVersion const):
(WebKit::RemoteWebInspectorUI::targetProductVersion const):
(WebKit::RemoteWebInspectorUI::targetIsSimulator const):
Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost.

  • WebProcess/WebPage/WebInspectorUI.messages.in:
  • WebProcess/WebPage/WebInspectorUI.h:
  • WebProcess/WebPage/WebInspectorUI.cpp:

(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::targetPlatformName const):
(WebKit::WebInspectorUI::targetBuildVersion const):
(WebKit::WebInspectorUI::targetProductVersion const):
Implement new methods needed by InspectorFrontendClient / InspectorFrontendHost.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebInspectorClient.h:
7:12 PM Changeset in webkit [253867] by ysuzuki@apple.com
  • 93 edits
    2 adds in trunk

[JSC] Improve our bound function implementation
https://bugs.webkit.org/show_bug.cgi?id=205327

Reviewed by Keith Miller.

JSTests:

  • microbenchmarks/function-bind-no-inlining-repeat-call.js: Added.

(assert):
(test):
(test2):
(foo):
(let.start.Date.now):

  • stress/bind-args.js: Added.

(shouldBe):
(test):
(test2):

Source/JavaScriptCore:

This patch improves Function#bind, and calling bound function with bound arguments.

  1. Rename CallFrameSlot::argumentCount to CallFrameSlot::argumentCountIncludingThis.
  2. Do not include name in NativeExecutable for JSBoundFunction. Putting name in NativeExecutable is assuming that function + name pair is almost identical. This is true in host functions except for JSBoundFunction. JSBoundFunction should hold its name in JSBoundFunction.
  3. Cache NativeExecutable for JSBoundFunction in the VM. We use a hash-map in JITThunk for NativeExecutables because we assume that host-function creation cannot be done by the user program: each executable is pre-defined to exactly one object by the environment, and there is no way to create host-functions repeatedly from the user-program. The only exception to this is JSBoundFunction so caching it on the VM avoids the hash-map lookup. This is not true for JSBoundFunction.
  4. ThunkGenerator should support JSBoundFunction call with bound arguments. It turns out that Speedometer2/React-Redux-TodoMVC is using bound function with bound arguments. Additionally, it is used. This is really bad: when dispatching an event, we first call this function from C++, entering JS world, going back to C++ world again, and entering JS world to call bound function again. By using ThunkGenerator, we can eliminate this back and forth by directly calling the bound JS Executable from the thunk. Previously, bound arguments are stored in JSArray. But it is difficult to access them from thunk since we need to consider have-a-bad-time case. Instead, we use JSImmutableButterfly to save bound arguments so that JIT thunk can quickly access arguments. To capture arguments as JSImmutableButterfly in JS world, we introduce op_create_arguments_butterfly, and handle it in all tiers.
  5. It turns out that eager materialization of "length" in JSBoundFunction takes long time while it is rarely used. This patch makes length lazily reified for JSBoundFunction.
  6. To make Function.prototype.bind faster, we track whether "name" and "length" properties of JSFunction is modified or not. This skips has-own-length-property check, which makes Function.prototype.bind 11~% faster.

Combining things above, creation of JSBoundFunction is 80~% faster. And calling bound function with bound arguments is 3~x faster.
This improves Speedometer2/React-TodoMVC by ~3%.

  • builtins/FunctionPrototype.js:

(bind):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateImpl):

  • bytecode/AccessCaseSnippetParams.cpp:

(JSC::SlowPathCallGeneratorWithArguments::generateImpl):

  • bytecode/BytecodeIntrinsicRegistry.h:
  • bytecode/BytecodeList.rb:
  • bytecode/BytecodeUseDef.cpp:

(JSC::computeUsesForBytecodeIndexImpl):
(JSC::computeDefsForBytecodeIndexImpl):

  • bytecode/VirtualRegister.cpp:

(JSC::VirtualRegister::dump const):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitCreateArgumentsButterfly):

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::BytecodeIntrinsicNode::emit_intrinsic_createArgumentsButterfly):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArgumentsUtilities.cpp:

(JSC::DFG::argumentsInvolveStackSlot):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::flushImpl):
(JSC::DFG::ByteCodeParser::handleVarargsInlining):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::isLiveInBytecode):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::forAllLocalsLiveInBytecode):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::emitStoreCallSiteIndex):

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::emitRestoreArguments):
(JSC::DFG::reifyInlinedCallFrames):
(JSC::DFG::OSRExit::emitRestoreArguments):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::reifyInlinedCallFrames):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileCreateArgumentsButterfly):
(JSC::DFG::SpeculativeJIT::compileGetArgumentCountIncludingThis):
(JSC::DFG::SpeculativeJIT::compileSetArgumentCountIncludingThis):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStackLayoutPhase.cpp:

(JSC::DFG::StackLayoutPhase::run):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateArgumentsButterfly):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArgumentCountIncludingThis):
(JSC::FTL::DFG::LowerDFGToB3::compileSetArgumentCountIncludingThis):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
(JSC::FTL::DFG::LowerDFGToB3::getArgumentsLength):
(JSC::FTL::DFG::LowerDFGToB3::callPreflight):

  • ftl/FTLSlowPathCall.h:

(JSC::FTL::callOperation):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::callSiteAsRawBits const):
(JSC::CallFrame::unsafeCallSiteAsRawBits const):
(JSC::CallFrame::setCurrentVPC):

  • interpreter/CallFrame.h:

(JSC::CallFrame::argumentCountIncludingThis const):
(JSC::CallFrame::setArgumentCountIncludingThis):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::jitAssertArgumentCountSane):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::argumentCount):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::prepareForTailCallSlow):

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::dump const):
(JSC::CallFrameShuffler::prepareForTailCall):
(JSC::CallFrameShuffler::prepareAny):

  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::compileWithoutLinking):

  • jit/JITCall.cpp:

(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileSetupFrame):
(JSC::JIT::compileOpCall):

  • jit/JITInlines.h:

(JSC::JIT::updateTopCallFrame):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::SpecializedThunkJIT):

  • jit/ThunkGenerators.cpp:

(JSC::arityFixupGenerator):
(JSC::boundFunctionCallGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator): Deleted.

  • jit/ThunkGenerators.h:
  • jsc.cpp:
  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • llint/WebAssembly.asm:
  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:
  • runtime/ExecutableBase.h:
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::FunctionRareData):

  • runtime/FunctionRareData.h:
  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
  • runtime/JSBoundFunction.cpp:

(JSC::boundThisNoArgsFunctionCall):
(JSC::boundFunctionCall):
(JSC::boundThisNoArgsFunctionConstruct):
(JSC::boundFunctionConstruct):
(JSC::JSBoundFunction::create):
(JSC::JSBoundFunction::JSBoundFunction):
(JSC::JSBoundFunction::boundArgsCopy):
(JSC::JSBoundFunction::visitChildren):

  • runtime/JSBoundFunction.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):
(JSC::JSFunction::name):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::deleteProperty):
(JSC::JSFunction::defineOwnProperty):
(JSC::JSFunction::reifyLength):
(JSC::JSFunction::reifyLazyPropertyIfNeeded):
(JSC::JSFunction::reifyLazyPropertyForHostOrBuiltinIfNeeded):
(JSC::JSFunction::reifyLazyBoundNameIfNeeded):

  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::areNameAndLengthOriginal):

  • runtime/JSGlobalObject.cpp:

(JSC::makeBoundFunction):
(JSC::hasOwnLengthProperty):

  • runtime/JSObject.h:

(JSC::getJSFunction):
(JSC::getCallData): Deleted.
(JSC::getConstructData): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::getCallData):
(JSC::getConstructData):

  • runtime/VM.cpp:

(JSC::thunkGeneratorForIntrinsic):
(JSC::VM::getBoundFunction):

  • runtime/VM.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

Tools:

Support running slow-microbenchmarks.

  • Scripts/run-jsc-benchmarks:

LayoutTests:

  • inspector/model/remote-object-get-properties-expected.txt:
  • inspector/runtime/getDisplayableProperties-expected.txt:
  • inspector/runtime/getProperties-expected.txt:
7:09 PM Changeset in webkit [253866] by eric.carlson@apple.com
  • 8 edits
    1 add in trunk/Source/WebKit

[Media in GPU process] Add remote media player configuration
https://bugs.webkit.org/show_bug.cgi?id=205541
<rdar://problem/58137418>

Reviewed by Simon Fraser.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::createMediaPlayer):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.messages.in:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerMediaKeysStorageDirectory const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerReferrer const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerUserAgent const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerSourceApplicationIdentifier const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerNetworkInterfaceName const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerMediaCacheDirectory const):
(WebKit::RemoteMediaPlayerProxy::mediaContentTypesRequiringHardwareSupport const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerPreferredAudioCharacteristics const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerShouldUsePersistentCache const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideo const):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerKeyNeeded):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerGetRawCookies const):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:

(WebKit::RemoteMediaPlayerProxy::mediaPlayerLogIdentifier):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::createRemoteMediaPlayer):

4:43 PM Changeset in webkit [253865] by Darin Adler
  • 31 edits in trunk/Source/JavaScriptCore

Make JSString values from literals in a single consistent style
https://bugs.webkit.org/show_bug.cgi?id=205517

Reviewed by Saam Barati.

Some call sites did it like this:

jsNontrivialString(vm, "literal"_s)

Others did it one of these:

jsString(vm, "literal")
jsNontrivialString(vm, "literal")

Changed all the call sites to do it the first, *slightly* more efficient, way.

  • runtime/ArrayIteratorPrototype.cpp:

(JSC::ArrayIteratorPrototype::finishCreation):

  • runtime/AsyncFunctionPrototype.cpp:

(JSC::AsyncFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorFunctionPrototype.cpp:

(JSC::AsyncGeneratorFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorPrototype.cpp:

(JSC::AsyncGeneratorPrototype::finishCreation):

  • runtime/BigIntPrototype.cpp:

(JSC::BigIntPrototype::finishCreation):

  • runtime/GeneratorFunctionPrototype.cpp:

(JSC::GeneratorFunctionPrototype::finishCreation):

  • runtime/GeneratorPrototype.cpp:

(JSC::GeneratorPrototype::finishCreation):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototype::finishCreation):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::formatToParts):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::formatToParts):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototype::finishCreation):

  • runtime/IntlPluralRulesPrototype.cpp:

(JSC::IntlPluralRulesPrototype::finishCreation):

  • runtime/JSDataViewPrototype.cpp:

(JSC::JSDataViewPrototype::finishCreation):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):

  • runtime/JSONObject.cpp:

(JSC::JSONObject::finishCreation):

  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::finishCreation):

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::typedArrayViewProtoGetterFuncToStringTag):

  • runtime/MapIteratorPrototype.cpp:

(JSC::MapIteratorPrototype::finishCreation):

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):

  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoGetterSource):

  • runtime/RegExpStringIteratorPrototype.cpp:

(JSC::RegExpStringIteratorPrototype::finishCreation):

  • runtime/SetIteratorPrototype.cpp:

(JSC::SetIteratorPrototype::finishCreation):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):

  • runtime/StringIteratorPrototype.cpp:

(JSC::StringIteratorPrototype::finishCreation):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):

  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakObjectRefPrototype.cpp:

(JSC::WeakObjectRefPrototype::finishCreation):

  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):
Call jsNontrivialString instead of jsString and use the _s suffix.

9:18 AM Changeset in webkit [253864] by Antti Koivisto
  • 5 edits in trunk/Source

Move Vector HashTraits to HashTraits.h to fix GCC build
https://bugs.webkit.org/show_bug.cgi?id=205540

Reviewed by Zalan Bujtas.

Source/WebCore:

  • contentextensions/DFAMinimizer.cpp:

ActionKey HashTrait claims that emptyValueIsZero. Now with Vector HashTrait having emptyValueIsZero too
HashMap<ActionKey, Vector<>> started taking the optimized path.

However ActionKey empty value wasn't actually zero because Empty enum value wasn't 0.

Source/WTF:

GCC is stricter than LLVM with partial specializations

Error: partial specialization of struct WTF::HashTraits<WTF::Vector<U, otherCapacity, WTF::CrashOnOverflow, 16> >
after instantiation of struct WTF::HashTraits<WTF::Vector<WTF::String> >

  • wtf/HashTraits.h:
  • wtf/VectorHash.h:
6:58 AM Changeset in webkit [253863] by Kate Cheney
  • 19 edits in trunk

Add timeStamp to ITP database
https://bugs.webkit.org/show_bug.cgi?id=205121
<rdar://problem/57633021>

Reviewed by John Wilander.

Source/WebCore:

  • loader/ResourceLoadStatistics.h:

Source/WebKit:

This patch adds support for collecting most-recently-updated
timestamps for third-party/first-party domain pairs in the ITP database.
It updates the timestamp when new statistics are merged into the
database. It then exposes the timestamp via the
_getResourceLoadStatisticsDataSummary API.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
(WebKit::ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList):
Changed INSERT OR IGNORE queries to be INSERT OR REPLACE so the timestamp
will be replaced upon a new attempted insert into one of the
third-party/first-party relationship tables.
ResourceLoadStatisticsDatabaseStore::insertDomainRelationshipList now
checks for the keyword "REPLACE" to know if another bind is needed
to update the timestamp.

(WebKit::ResourceLoadStatisticsDatabaseStore::getMostRecentlyUpdatedTimestamp):
Queries the most recent time that the third party has appeared as a
subframe or subresource under the first party or redirected to the first party.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:
  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

(WebKit::ThirdPartyDataForSpecificFirstParty::toString const):
Updated the toString to check if the timestamp occured in the last
24 hours for testing purposes. It doesn't print the specific time
because it would change for every run and could not be tested.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _setUseITPDatabase:completionHandler:]):
Added new function that enables the ITP Database backend so the
timestamp parameter can be tested in in TestWebKitAPI.

  • UIProcess/API/APIResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.h:
  • UIProcess/API/Cocoa/_WKResourceLoadStatisticsFirstParty.mm:

(-[_WKResourceLoadStatisticsFirstParty timeLastUpdated]):
Added the new timestamp parameter to the _WKResourceLoadStatisticsFirstParty.mm
class and its wrapper to be sent via API call.

Tools:

Added checks to test that the timestamp is properly exposed via API
in the ITP database backend. This also adds an API test case using the
ITP database store. It was previously only testing the ITP memory store.

  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

LayoutTests:

This patch updates test expectations which call
dumpResourceLoadStatistics to reflect the new timestamp parameter that
is now printed with the ITP data summary.

  • http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access-database-expected.txt:
  • http/tests/resourceLoadStatistics/aggregate-sorted-data-no-storage-access-expected.txt:
  • http/tests/storageAccess/aggregate-sorted-data-with-storage-access-database-expected.txt:
  • http/tests/storageAccess/aggregate-sorted-data-with-storage-access-expected.txt:
1:49 AM Changeset in webkit [253862] by ysuzuki@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

[JSC] Remove m_globalObject field from JSFunction
https://bugs.webkit.org/show_bug.cgi?id=205533

Reviewed by Mark Lam.

JSFunction::m_globalObject is used only when it is using NativeExecutable.
And when using NativeExecutable, JSCallee::m_scope is always pointing JSGlobalObject.
This patch removes JSFunction::m_globalObject field.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

  • jit/ThunkGenerators.cpp:

(JSC::nativeForGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):

  • runtime/JSFunction.h:

(JSC::JSFunction::offsetOfGlobalObject): Deleted.
(JSC::JSFunction::globalObject const): Deleted.

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::JSFunction):

Dec 20, 2019:

11:35 PM Changeset in webkit [253861] by eric.carlson@apple.com
  • 20 edits
    1 add in trunk/Source

[Media in GPU process] Get audio playing
https://bugs.webkit.org/show_bug.cgi?id=205511
<rdar://problem/58120354>

Reviewed by Jer Noble.

Source/WebCore:

Tested manually with a modified sandbox because it isn't possible to load media
in the GPU process yet.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::bufferedTimeRangesChanged):
(WebCore::MediaPlayer::seekableTimeRangesChanged):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/PlatformTimeRanges.cpp:

(WebCore::PlatformTimeRanges::PlatformTimeRanges):
(WebCore::PlatformTimeRanges::clear):

  • platform/graphics/PlatformTimeRanges.h:

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::updateCachedState):
(WebKit::MediaPlayerPrivateRemote::maximumDurationToCacheMediaTime const):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:
6:09 PM Changeset in webkit [253860] by rniwa@webkit.org
  • 4 edits in trunk

TextManipulationController should respect new token orders
https://bugs.webkit.org/show_bug.cgi?id=205378

Reviewed by Wenson Hsieh.

Source/WebCore:

Updated TextManipulationController::replace to remove all existing content and insert new tokens in the order they appear.

To do this, we first find the common ancestor of all nodes in the paragraph and then remove all nodes in between.

Then we'd insert the node identified by the token identifier and all its ancestors at where they appear. In the case
the same token is used for the second time, we clone its node. For each leaf node, we find the closest ancestor which
had already been inserted by the previous token, and append the leaf node along with its ancestors to it.

I'm expecting to make a lot of refinements & followups to this algorithm in the future but this seems to get basics done.

Tests: TextManipulation.CompleteTextManipulationReplaceSimpleSingleParagraph

TextManipulation.CompleteTextManipulationDisgardsTokens
TextManipulation.CompleteTextManipulationReordersContent
TextManipulation.CompleteTextManipulationCanSplitContent
TextManipulation.CompleteTextManipulationCanMergeContent
TextManipulation.CompleteTextManipulationFailWhenContentIsRemoved
TextManipulation.CompleteTextManipulationFailWhenExcludedContentAppearsMoreThanOnce
TextManipulation.CompleteTextManipulationPreservesExcludedContent

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::didCreateRendererForElement):
(WebCore::TextManipulationController::completeManipulation):
(WebCore::TextManipulationController::replace):

Tools:

Added a bunch of tests for WKTextManipulation.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TextManipulation.CompleteTextManipulationReplaceSimpleSingleParagraph):
(TextManipulation.CompleteTextManipulationDisgardsTokens):
(TextManipulation.CompleteTextManipulationReordersContent):
(TextManipulation.CompleteTextManipulationCanSplitContent):
(TextManipulation.CompleteTextManipulationCanMergeContent):
(TextManipulation.CompleteTextManipulationFailWhenContentIsRemoved):
(TextManipulation.CompleteTextManipulationFailWhenExcludedContentAppearsMoreThanOnce):
(TextManipulation.CompleteTextManipulationPreservesExcludedContent):

5:52 PM Changeset in webkit [253859] by Nikita Vasilyev
  • 8 edits in trunk/Source/WebInspectorUI

Web Inspector: Gradient editor: opacity slider is too close to the right edge of the popover
https://bugs.webkit.org/show_bug.cgi?id=203643
<rdar://problem/56762879>

Reviewed by Devin Rousso.

Replace absolute positioning in the color picker with static layout.

  • UserInterface/Views/ColorPicker.css:

(.color-picker .wrapper):
(.color-picker :matches(.color-square, .slider)):
(.color-picker .slider):
(.color-picker .hue):
(@media (color-gamut: p3) .color-picker.gamut-p3 > .hue):
(.color-picker > .color-inputs):
(.color-picker > .color-inputs > div):
(.color-picker > .color-inputs > div:not([hidden]) + div):
The 1st visible div should have no left margin even if it's preceded by a hidden div.

  • UserInterface/Views/ColorPicker.js:

(WI.ColorPicker):
(WI.ColorPicker.prototype._updateOpacitySlider):

  • UserInterface/Views/GradientEditor.css:

(.gradient-editor.editing-color):
(.gradient-editor > .color-picker .slider):

  • UserInterface/Views/GradientEditor.js:

(WI.GradientEditor):

  • UserInterface/Views/Slider.css:

(.slider):
(.slider > img):
(body[dir=ltr] .slider > img):
(body[dir=rtl] .slider > img):

  • UserInterface/Views/Slider.js:

(WI.Slider):
(WI.Slider.prototype.set value):
(WI.Slider.prototype.set knobY):
(WI.Slider.prototype.get maxY):
(WI.Slider.prototype.recalculateKnobY):
(WI.Slider.prototype._handleMousedown):
(WI.Slider.prototype._handleMousemove):

  • UserInterface/Views/Variables.css:

(:root):
Convert WI.Slider to be vertical by default. WI.Slider used to define a hozirontal slider.
It is only used by the color picker, where it's vertical. The slider was rotated with CSS
transformation. This made it problematic to use in the static layout.

5:49 PM Changeset in webkit [253858] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebCore

REGRESSION (r253807): crash in storage/indexeddb/modern/opendatabase-request-private.html
https://bugs.webkit.org/show_bug.cgi?id=205515

Reviewed by Alex Christensen.

When m_openRequests of IDBTransaction is empty, we expect all requests associated with the transactions should
be completed, but in IDBOpenDBRequest, we removed the request from m_openRequests before
m_currentlyCompletingRequest finished. This is because the order of calling ActiveDOMObject::stop() is random.

  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::cancelForStop):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::connectionClosedFromServer):

5:33 PM Changeset in webkit [253857] by Megan Gardner
  • 12 edits
    13 adds in trunk

Paint highlights specified in CSS Highlight API
https://bugs.webkit.org/show_bug.cgi?id=205318

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-highlight-api/highlight-text-across-elements-expected.html: Added.
  • web-platform-tests/css/css-highlight-api/highlight-text-across-elements.html: Added.
  • web-platform-tests/css/css-highlight-api/highlight-text-expected.html: Added.
  • web-platform-tests/css/css-highlight-api/highlight-text.html: Added.

Source/WebCore:

Render highlights when present, similar to the way we render selection.

Tests: imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text-across-elements.html

imported/w3c/web-platform-tests/css/css-highlight-api/highlight-text.html

  • Modules/highlight/HighlightMap.h:

(WebCore::HighlightMap::map const):

Add a getter for the internal HashMap.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::verifySelectionState const):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::clampedStartEndForState const):
(WebCore::InlineTextBox::selectionStartEnd const):
(WebCore::InlineTextBox::highlightStartEnd const):
(WebCore::InlineTextBox::resolveStyleForMarkedText):

Use the highlight name from the HighlightRangeGroup to obtain the style from the renderer.

(WebCore::InlineTextBox::collectMarkedTextsForHighlights const):

Render the highlights when painting text. Determine if a highlight is present in the current RenderObject, and
add additional MarkedText to be rendered when painting

  • rendering/InlineTextBox.h:
  • rendering/MarkedText.cpp:

(WebCore::subdivide):

  • rendering/MarkedText.h:

(WebCore::MarkedText::operator== const):

Expand MarkedText to take a style name.

  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::setContext):
(WebCore::SelectionRangeData::selectionStateForRenderer):
(WebCore::SelectionRangeData::set):

  • rendering/SelectionRangeData.h:

Leverage SelectionRangeData for highlights.

Tools:

Expand MarkedText to take a style name.

  • TestWebKitAPI/Tests/WebCore/MarkedText.cpp:

(WebCore::operator<<):

5:13 PM Changeset in webkit [253856] by Chris Dumez
  • 4 edits
    1 delete in trunk

[iOS Debug] imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=205506
<rdar://problem/58118091>

Reviewed by Darin Adler.

Source/WebCore:

Drop iOS specific hack in FrameLoader::checkCompleted() that was causing this crash in iOS Debug.
This hack was added a long time ago to fix back/forward navigation after clicking an intra PDF
document hyperlink. I have verified on iOS 13 that the behavior is unchanged without this code:

  • Back/forward navigation within a PDF work in UIWebView and do not work in WKWebView

No new tests, unskipped existing test.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted):

LayoutTests:

  • platform/ios-wk2/TestExpectations:

Remove Crash expectation for this test in iOS Debug.

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https-expected.txt: Removed.

Drop iOS-specific baseline now that the behavior is consistent across platforms.

5:04 PM Changeset in webkit [253855] by Chris Dumez
  • 5 edits in trunk

[Bindings] Add @@toStringTag to our iterator prototype object
https://bugs.webkit.org/show_bug.cgi?id=205516

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline WPT tests that are now passing.

  • web-platform-tests/WebIDL/ecmascript-binding/default-iterator-object-expected.txt:
  • web-platform-tests/WebIDL/ecmascript-binding/iterator-prototype-object-expected.txt:

Source/WebCore:

Add @@ toStringTag to our iterator prototype object, as per:

No new tests, rebaselined existing tests.

  • bindings/js/JSDOMIterator.h:

(WebCore::IteratorTraits>::finishCreation):

4:05 PM Changeset in webkit [253854] by Ross Kirsling
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Memory usage statistics should be attainable without WebCore
https://bugs.webkit.org/show_bug.cgi?id=205366

Reviewed by Keith Miller.

  • API/JSBase.cpp:

(JSGetMemoryUsageStatistics):

  • API/JSBasePrivate.h:

Add a private JSC API exposing the same Heap stats as WebCore's PerformanceLogging::memoryUsageStatistics.

3:51 PM Changeset in webkit [253853] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit

Enable HDR Media Capabilities by default
https://bugs.webkit.org/show_bug.cgi?id=205518
<rdar://problem/57674289>

Reviewed by Eric Carlson.

  • Shared/WebPreferences.yaml:
3:43 PM Changeset in webkit [253852] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

MediaKeySession.load() fails
https://bugs.webkit.org/show_bug.cgi?id=205467

Reviewed by Eric Carlson.

Invert the storageURL condition in load().

Drive-by fix: ask the group for it's sessionID, not the session, if it exists.

  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:

(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::loadSession):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):

3:30 PM Changeset in webkit [253851] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Add some missing skips in LayoutTests/gpu-process/TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=205523

Patch by Peng Liu <Peng Liu> on 2019-12-20
Reviewed by Eric Carlson.

  • gpu-process/TestExpectations:
3:24 PM Changeset in webkit [253850] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Clean up and generalize some interaction additions
https://bugs.webkit.org/show_bug.cgi?id=205430

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):

3:21 PM Changeset in webkit [253849] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

Expose approximate caret extents for the hit line via InteractionInformationAtPosition
https://bugs.webkit.org/show_bug.cgi?id=205526
<rdar://problem/57983076>

Reviewed by Dean Jackson.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::positionInformation):
Compute and expose the union of first and last caret rects on the line.

  • Shared/ios/InteractionInformationAtPosition.h:
  • Shared/ios/InteractionInformationAtPosition.mm:

(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):

  • Shared/ios/InteractionInformationRequest.cpp:

(WebKit::InteractionInformationRequest::encode const):
(WebKit::InteractionInformationRequest::decode):
(WebKit::InteractionInformationRequest::isValidForRequest):

  • Shared/ios/InteractionInformationRequest.h:

Also, add a bit so that we can only fetch this data when needed.

3:15 PM Changeset in webkit [253848] by Brent Fulgham
  • 5 edits in trunk

Remove access to 'com.apple.cfprefsd.agent' from the macOS sandbox
https://bugs.webkit.org/show_bug.cgi?id=205478
<rdar://problem/57915066>

Reviewed by Darin Adler.

Source/WebKit:

Telemetry and thorough testing has confirmed that we do not need access to this
mach service, and so should remove it.

Tested by fast/sandboxing/mac

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

LayoutTests:

  • fast/sandbox/mac/sandbox-mach-lookup-expected.txt:
  • fast/sandbox/mac/sandbox-mach-lookup.html:
2:59 PM Changeset in webkit [253847] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

sendBeacon on Safari 13 seeing high failure rates
https://bugs.webkit.org/show_bug.cgi?id=204665
<rdar://problem/57522622>

Reviewed by Darin Adler.

Revert r245344 to try and reduce our failure rate for Beacon. This is the only change
to our Beacon implementation that I am aware we made in Safari 13. Using a lower priority
for Beacon makes it more likely that the Beacon load is still pending when the network
process exits, which would interrupt the Beacon.

Since we're trying to convince developers to move away from synchronous XHR and to using
the Beacon API intead, it is important that our Beacon API be as reliable as possible.

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):

  • loader/PingLoader.cpp:

(WebCore::PingLoader::sendPing):

2:52 PM Changeset in webkit [253846] by ap@apple.com
  • 3 edits in trunk/LayoutTests

Update TestExpectatipons for media/track/track-in-band-cues-added-once.html
https://bugs.webkit.org/show_bug.cgi?id=142152

The test no longer times out on bots or in local testing. It is still a flaky failure.

  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
2:30 PM Changeset in webkit [253845] by Jonathan Bedard
  • 2 edits in trunk/Tools

lldbwebkittester: Strip CLANG_DEBUG_INFORMATION_LEVEL option while building
https://bugs.webkit.org/show_bug.cgi?id=205513

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitdirs.pm:

(buildXCodeProject): Strip CLANG_DEBUG_INFORMATION_LEVEL from lldbWebKitTester.

1:51 PM Changeset in webkit [253844] by Truitt Savell
  • 11 edits in trunk/Source

Unreviewed, rolling out r253820.

Broke Mac testing

Reverted changeset:

"Invalidate only affected elements after media query
evaluation changes"
https://bugs.webkit.org/show_bug.cgi?id=205392
https://trac.webkit.org/changeset/253820

1:44 PM Changeset in webkit [253843] by Truitt Savell
  • 2 edits in trunk/LayoutTests

REGRESSION: fast/shadow-dom/link-element-in-shadow-tree.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=171784

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:40 PM Changeset in webkit [253842] by Alan Coon
  • 1 copy in tags/Safari-609.1.13

Tag Safari-609.1.13.

1:36 PM Changeset in webkit [253841] by BJ Burg
  • 2 edits in trunk/Source/WebKit

Unreviewed, try to fix the non-unified sources build.

  • UIProcess/WebAuthentication/Mock/MockAuthenticatorManager.cpp:

(WebKit::MockAuthenticatorManager::filterTransports const):
The current chunking of unified source files seems to provide a
'using namespace WebCore' for these references to AuthenticatorTransport.
Add a namespace qualification so that this file compiles by itself.

1:03 PM Changeset in webkit [253840] by Simon Fraser
  • 9 edits in trunk/Tools

Add a Custom User Agent menu to MiniBrowser, and related cleanup
https://bugs.webkit.org/show_bug.cgi?id=205507

Reviewed by Wenson Hsieh.

Add a User Agent" submenu to the Settings menu, and construct it with some built-in
UA strings. When changed, it sets the customUserAgent on the WKWebView/WebView and
triggers a reload.

I also rearranged the menus so that "Settings" and "Debug" are no longer to the right
of the "Help" menu, which means getting the Settings menu from the xib. It was then
easier if SettingsController was no longer a singleton, but owned by AppDelegate.
Added a category on NSApplication to make it easier to get to BrowserAppDelegate
and thence to the SettingsController.

  • MiniBrowser/mac/AppDelegate.h:
  • MiniBrowser/mac/AppDelegate.m:

(-[NSApplication browserAppDelegate]):
(-[BrowserAppDelegate awakeFromNib]):
(-[BrowserAppDelegate defaultConfiguration]):
(-[BrowserAppDelegate defaultPreferences]):
(-[BrowserAppDelegate createBrowserWindowController:]):
(-[BrowserAppDelegate newWindow:]):
(-[BrowserAppDelegate newPrivateWindow:]):
(-[BrowserAppDelegate applicationDidFinishLaunching:]):
(-[BrowserAppDelegate _updateNewWindowKeyEquivalents]):
(-[BrowserAppDelegate userContentContoller]):
(defaultConfiguration): Deleted.
(defaultPreferences): Deleted.

  • MiniBrowser/mac/ExtensionManagerWindowController.m:

(-[ExtensionManagerWindowController init]):
(-[ExtensionManagerWindowController add:]):
(-[ExtensionManagerWindowController remove:]):

  • MiniBrowser/mac/MainMenu.xib:
  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController initWithMenu:]):
(-[SettingsController dealloc]):
(-[SettingsController _populateMenu]):
(+[SettingsController userAgentData]):
(-[SettingsController buildUserAgentsMenu:]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController _toggleBooleanDefault:]):
(-[SettingsController toggleExperimentalFeature:]):
(-[SettingsController toggleInternalDebugFeature:]):
(-[SettingsController customUserAgent]):
(-[SettingsController changeCutomUserAgent:]):
(+[SettingsController shared]): Deleted.
(-[SettingsController init]): Deleted.
(-[SettingsController menu]): Deleted.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController awakeFromNib]):
(-[WK1BrowserWindowController userAgentDidChange:]):
(-[WK1BrowserWindowController windowWillClose:]):
(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController initWithConfiguration:]):
(-[WK2BrowserWindowController userAgentDidChange:]):
(-[WK2BrowserWindowController windowWillClose:]):
(-[WK2BrowserWindowController didChangeSettings]):

12:51 PM Changeset in webkit [253839] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Include WKPDFConfiguration, WKFindConfiguration, and WKFindResult in umbrella header
https://bugs.webkit.org/show_bug.cgi?id=205432
<rdar://problem/58067946>

Patch by James Savage <James Savage> on 2019-12-20
Reviewed by Wenson Hsieh.

  • Shared/API/Cocoa/WebKit.h: Include new headers.
12:43 PM Changeset in webkit [253838] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

SWServer can be created without any path to store registrations in non ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=205500

Reviewed by Simon Fraser.

No change of behavior in release.
Remove debug assert and log the case of a non ephemeral session without a path.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::SWServer):

12:42 PM Changeset in webkit [253837] by BJ Burg
  • 29 edits in trunk/Source

Web Inspector: convert some InspectorFrontendHost methods to getters
https://bugs.webkit.org/show_bug.cgi?id=205475

Reviewed by Devin Rousso.

Source/WebCore:

No reason for these to be method calls, so expose as getters / attributes instead.

  • inspector/InspectorFrontendClient.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::isRemote const):
(WebCore::debuggableTypeToString):
(WebCore::InspectorFrontendHost::localizedStringsURL): Deleted.
(WebCore::InspectorFrontendHost::backendCommandsURL): Deleted.
(WebCore::InspectorFrontendHost::debuggableType): Deleted.
(WebCore::InspectorFrontendHost::inspectionLevel): Deleted.
(WebCore::InspectorFrontendHost::platform): Deleted.
(WebCore::InspectorFrontendHost::port): Deleted.

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:
  • testing/Internals.cpp:

Source/WebInspectorUI:

No reason for these to be method calls, so expose as getters / attributes instead.

  • UserInterface/Base/LoadLocalizedStrings.js:
  • UserInterface/Base/Main.js:
  • UserInterface/Base/ObjectStore.js:

(WI.ObjectStore.get _databaseName):

  • UserInterface/Base/Platform.js:
  • UserInterface/Base/Setting.js:

(WI.Setting._localStorageKey):

  • UserInterface/Debug/Bootstrap.js:

(WI.runBootstrapOperations):

  • UserInterface/Protocol/LoadInspectorBackendCommands.js:

Source/WebKit:

No reason for these to be method calls, so expose as getters / attributes instead.

  • WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp:

(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.

  • WebProcess/WebPage/mac/WebInspectorUIMac.mm:

(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.

  • WebProcess/WebPage/win/WebInspectorUIWin.cpp:

(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.

  • WebProcess/WebPage/wpe/WebInspectorUIWPE.cpp:

(WebKit::WebInspectorUI::localizedStringsURL const):
(WebKit::RemoteWebInspectorUI::localizedStringsURL const):
(WebKit::WebInspectorUI::localizedStringsURL): Deleted.
(WebKit::RemoteWebInspectorUI::localizedStringsURL): Deleted.

Source/WebKitLegacy/ios:

  • WebCoreSupport/WebInspectorClientIOS.mm:

(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebInspectorClient.h:
  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.

Source/WebKitLegacy/win:

  • WebCoreSupport/WebInspectorClient.cpp:

(WebInspectorFrontendClient::localizedStringsURL const):
(WebInspectorFrontendClient::localizedStringsURL): Deleted.

  • WebCoreSupport/WebInspectorClient.h:
12:40 PM Changeset in webkit [253836] by Truitt Savell
  • 2 edits in trunk/LayoutTests

Flaky crash in AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC on webaudio/silent-audio-interrupted-in-background.html
https://bugs.webkit.org/show_bug.cgi?id=202064

Unreviewed test gardening.

  • platform/mac/TestExpectations:
12:33 PM Changeset in webkit [253835] by Andres Gonzalez
  • 9 edits in trunk/Source/WebCore

IsolatedObject support for multiple parameterized attributes.
https://bugs.webkit.org/show_bug.cgi?id=205508

Reviewed by Chris Fleizach.

  • AXObjectCache now keeps the PageIdentifier so that it is possible to

retrieve it on the secondary thread without querying the Document.

  • isIncrementor is exposed on AXCoreObject for spin button support.
  • Several parameterized attributes implementation related to

TextMarkers are now dispatch to the main thread.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::setIsolatedTreeFocusedObject):
(WebCore::AXObjectCache::isolatedTreeRootObject):
(WebCore::AXObjectCache::remove):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.h:
  • accessibility/AccessibilityObjectInterface.h:
  • accessibility/AccessibilitySpinButton.h:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:

(WebCore::AXIsolatedObject::AXIsolatedObject):
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::updateBackingStore):
(WebCore::AXIsolatedObject::findTextRanges const):
(WebCore::AXIsolatedObject::performTextOperation):
(WebCore::AXIsolatedObject::axObjectCache const):
(WebCore::AXIsolatedObject::widget const):
(WebCore::AXIsolatedObject::document const):
(WebCore::AXIsolatedObject::documentFrameView const):
(WebCore::AXIsolatedObject::isLoaded const): Implemented in header.
(WebCore::AXIsolatedObject::supportsPath const): Implemented in header.

  • accessibility/isolatedtree/AXIsolatedTreeNode.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper subrole]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

12:27 PM Changeset in webkit [253834] by commit-queue@webkit.org
  • 9 edits
    2 copies
    1 move in trunk/Source

Allow a managed configuration to re-enable TLS 1.0 and 1.1
https://bugs.webkit.org/show_bug.cgi?id=205479
<rdar://problem/54493516>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-12-20
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

Manually verified using the managed configuration attached to rdar://problem/56727605

  • PAL.xcodeproj/project.pbxproj:
  • pal/ios/ManagedConfigurationSoftLink.h: Added.
  • pal/ios/ManagedConfigurationSoftLink.mm: Added.
  • pal/spi/ios/ManagedConfigurationSPI.h: Copied from Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h.

Source/WebKit:

  • Platform/spi/ios/ManagedConfigurationSPI.h: Removed.
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView _defineForWebView:]):

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

11:40 AM Changeset in webkit [253833] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Share code for computing the absolute positioned line boxes for a range
https://bugs.webkit.org/show_bug.cgi?id=205510

Reviewed by Wenson Hsieh.

Implement RenderTextLineBoxes::absoluteRectsForRange() in terms of absoluteQuadsForRange()
to remove almost identical code. This makes absoluteRectsForRange() a tiny bit slower. If
it turns out this slowness isn't so tiny then we should use revert this change and implement
again using templates to avoid duplication.

Also moved absoluteQuadsForRange() to be above absoluteRectsForRange() to group these
related functions closer together.

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::absoluteQuadsForRange const): No change, though I moved it
to be above absoluteRectsForRange().
(WebCore::RenderTextLineBoxes::absoluteRectsForRange const): Implement in terms of absoluteQuadsForRange().

  • rendering/RenderTextLineBoxes.h: Group absolute*ForRange() declarations.
11:18 AM Changeset in webkit [253832] by Truitt Savell
  • 4 edits
    50 adds in trunk/LayoutTests

Unreviewed, rolling out r253831.

Inadvertent rollout of r253829

Reverted changeset:

"Unreviewed, rolling out r253829."
https://bugs.webkit.org/show_bug.cgi?id=205502
https://trac.webkit.org/changeset/253831

11:17 AM Changeset in webkit [253831] by Truitt Savell
  • 4 edits
    1 delete in trunk/LayoutTests

Unreviewed, rolling out r253829.

This is blocking the rollout of r253705

Reverted changeset:

"Import web-platform-tests/subresource-integrity tests from
usptream"
https://bugs.webkit.org/show_bug.cgi?id=205502
https://trac.webkit.org/changeset/253829

11:11 AM Changeset in webkit [253830] by Chris Dumez
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/beacon/beacon-redirect.window.html has been flaky since it was imported in r253760
https://bugs.webkit.org/show_bug.cgi?id=205504
<rdar://problem/58115444>

Unreviewed, mark test as flaky.

11:03 AM Changeset in webkit [253829] by Chris Dumez
  • 4 edits
    50 adds in trunk/LayoutTests

Import web-platform-tests/subresource-integrity tests from usptream
https://bugs.webkit.org/show_bug.cgi?id=205502

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import web-platform-tests/subresource-integrity tests from usptream 5f8d15ebdcf0495c271c.

  • web-platform-tests/subresource-integrity/*: Added.

LayoutTests:

10:13 AM Changeset in webkit [253828] by Chris Dumez
  • 2 edits in trunk/LayoutTests

[iOS Debug] imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=205506

Unreviewed, mark imported/w3c/web-platform-tests/html/dom/usvstring-reflection.https.html as crashing
on iOS Debug. The test has been crashing on this platform since it was imported in r253791.

  • platform/ios-wk2/TestExpectations:
9:57 AM Changeset in webkit [253827] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

Remove the certificate info checks related to getUserMedia
https://bugs.webkit.org/show_bug.cgi?id=205493

Reviewed by Eric Carlson.

Now that navigator.mediaDevices is SecureContext, we do not need to do the same checks in UserMediaController.
UserMediaController was also checking the certificate info which is not necessary for MediaDevices.
Covered by manual tests.

  • Modules/mediastream/UserMediaController.cpp:

(WebCore::isSecure):
(WebCore::isAllowedByFeaturePolicy): Deleted.
(WebCore::isAllowedToUse): Deleted.
(WebCore::UserMediaController::canCallGetUserMedia const): Deleted.
(WebCore::UserMediaController::logGetUserMediaDenial): Deleted.

9:40 AM Changeset in webkit [253826] by youenn@apple.com
  • 6 edits in trunk/Source/WebKit

Set whether to use mock capture devices at GPUProcess creation time.
https://bugs.webkit.org/show_bug.cgi?id=205492

Reviewed by Eric Carlson.

This ensures UIProcess remains always in sync with GPUProcess.
Covered by fast/mediastream/captureAudioInGPUProcess.html.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::initializeGPUProcess):
(WebKit::GPUProcess::setMockCaptureDevicesEnabled):

  • GPUProcess/GPUProcess.h:
  • GPUProcess/GPUProcessCreationParameters.cpp:

(WebKit::GPUProcessCreationParameters::encode const):
(WebKit::GPUProcessCreationParameters::decode):

  • GPUProcess/GPUProcessCreationParameters.h:
  • UIProcess/GPU/GPUProcessProxy.cpp:

(WebKit::GPUProcessProxy::singleton):

9:37 AM Changeset in webkit [253825] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

webrtc/video-autoplay.html is flaky on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=205495

Reviewed by Eric Carlson.

  • webrtc/video-autoplay-expected.txt:
  • webrtc/video-autoplay.html:

Do test one video at a time so that one video does not interrupt the other.

9:34 AM Changeset in webkit [253824] by dino@apple.com
  • 19 edits in trunk/Source

Build ANGLE as a dynamic library
https://bugs.webkit.org/show_bug.cgi?id=204708
Source/ThirdParty/ANGLE:

rdar://57349384

Reviewed by Tim Horton.

Take 2 at attempting this. The first time was rolled out
due to failures in Apple's upstream build system.

Modify ANGLE to build as a dynamic library. My (not thorough) testing suggests
this will reduce the in-flight binary size on Apple's build systems by at least
a factor of 10 (it was over 1G). Building release for x86_64-only:

  • Previously: libANGLE.a -- 306 MB
  • Now: libANGLE-shared.dylib -- 6.7 MB

In order to do this, some symbols needed to be exported from the
"sh" namespace (which are used in ANGLEWebKitBridge, but not when
ANGLE's rendering backend is active).

While here, I turned on some more build options, like ARC.

Lastly, I added a build phase that creates a fake libANGLE.a
because Apple's build system thinks that WebCore still needs it.

  • ANGLE.xcodeproj/project.pbxproj: Link with IOKit and IOSurface frameworks, and

product a dylib product.

  • Configurations/ANGLE.xcconfig: Update the configuration for a dynamic library.
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • include/GLSLANG/ShaderLang.h: Add ANGLE_EXPORT to some functions to make

sure they will be visible in the exported library.

  • include/GLSLANG/ShaderVars.h:
  • src/libANGLE/renderer/gl/cgl/DisplayCGL.mm: Change reinterpret_cast to a normal

C cast so it can be annotated with bridge.
(rx::DisplayCGL::isValidNativeWindow const):

  • src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm: Ditto.

(rx::WindowSurfaceCGL::WindowSurfaceCGL):
(rx::WindowSurfaceCGL::~WindowSurfaceCGL):

  • src/libANGLE/renderer/gl/eagl/DisplayEAGL.mm: Ditto.
  • src/libANGLE/renderer/gl/eagl/WindowSurfaceEAGL.mm: Ditto.

Source/WebCore:

Reviewed by Tim Horton.

Weak link against libANGLE-shared.dylib rather than strong link to libANGLE.a.

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/ANGLEWebKitBridge.cpp:

(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::ANGLEWebKitBridge::angleAvailable):

  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::GraphicsContext3D):

8:46 AM Changeset in webkit [253823] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, mark imported/w3c/web-platform-tests/2dcontext/wide-gamut-canvas as flaky.

Those were recently imported from upstream.

8:39 AM Changeset in webkit [253822] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip imported/w3c/web-platform-tests/2dcontext/wide-gamut-canvas/canvas-createImageBitmap-e_srgb.html

This test has been timing out since it was imported and slows down our test runs for no reason.

8:34 AM Changeset in webkit [253821] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Re-skip imported/w3c/web-platform-tests/service-workers/service-worker/client-navigate.https.html

I had unskipped this test in r253704 because it no longer appeared to time out on my machine. However,
it sill appears to time out on the bots (at least flakily).

8:34 AM Changeset in webkit [253820] by Antti Koivisto
  • 11 edits in trunk/Source

Invalidate only affected elements after media query evaluation changes
https://bugs.webkit.org/show_bug.cgi?id=205392

Reviewed by Zalan Bujtas.

Source/WebCore:

We currently invalidate style of the whole tree when a media query evaluation changes.
We can do better by constructing an invalidation RuleSet and invalidating only those
elements that are potentially affected.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::addRule):
(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):

Construct and cache an invalidation RuleSet and associate with a set of media query changes.

(WebCore::Style::RuleSet::MediaQueryCollector::pushAndEvaluate):
(WebCore::Style::RuleSet::MediaQueryCollector::pop):
(WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):

Collect RuleFeatures which we later use to build invalidation RuleSet.

(WebCore::Style::RuleSet::MediaQueryCollector::addRulePositionIfNeeded): Deleted.

  • style/RuleSet.h:

(WebCore::Style::DynamicMediaQueryEvaluationChanges::append):

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::evaluateDynamicMediaQueries):

  • style/StyleResolver.h:
  • style/StyleScope.cpp:

(WebCore::Style::Scope::evaluateMediaQueries):

Use the invalidation RuleSet for accurate style invalidation.

  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::evaluteDynamicMediaQueryRules):

Collect invalidation RuleSets for author/user/user agent style.

  • style/StyleScopeRuleSets.h:

Source/WTF:

Fix GCC build error

Error: partial specialization of ‘struct WTF::HashTraits<WTF::Vector<U, otherCapacity, WTF::CrashOnOverflow, 16> >’

after instantiation of ‘struct WTF::HashTraits<WTF::Vector<WTF::String> >’

  • wtf/HashTraits.h:
  • wtf/VectorHash.h:

Move to HashTraits to HashTraits.h so it gets specialized before any instantiation.

8:31 AM Changeset in webkit [253819] by Chris Dumez
  • 4 edits in trunk/LayoutTests

Unreviewed, address flakiness of imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test.html

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/scripting-1/the-script-element/css-module/css-module-worker-test-expected.txt:

LayoutTests:

8:29 AM Changeset in webkit [253818] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, skip http/wpt/html/semantics/text-level-semantics/the-a-element/a-download-click-404.html on macOS wk1

We do not support the download attribute on this platform.

  • platform/mac-wk1/TestExpectations:
8:10 AM Changeset in webkit [253817] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

[GTK][WPE] Wrong visualization of Conic gradients in high resolution displays
https://bugs.webkit.org/show_bug.cgi?id=205444

Reviewed by Carlos Alberto Lopez Perez.

Reduce the size of the separation between sections since a separation of
1 pixel is too wide in high resolution displays.

  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::addConicSector):

5:50 AM Changeset in webkit [253816] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Unreviewed, address review comment missed in the initial commit.

  • layout/inlineformatting/InlineLineBreaker.h:
  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):
(WebCore::Layout::LineLayoutContext::commitContent):

5:44 AM Changeset in webkit [253815] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Refactor LineLayoutContext class
https://bugs.webkit.org/show_bug.cgi?id=205494
<rdar://problem/58109493>

Reviewed by Antti Koivisto.

This patch is in preparation for being able to pre-scan the inline content for soft wrap opportunities.

Currently processing the inline content means pushing the inline items to an uncommitted queue until after
we find a soft wrap opportunity and then we ask the LineBreaker whether this uncommitted, "continuous content" can be placed
on the current line.
while (has unprocessed inline item) {

get next inline item
if (inline item is at a soft wrap opportunity)

sumbit uncommitted queue to line breaking

else

add to uncommitted queue

}
This patch omits the uncommitted queue by collecting the inline items first. This removes some code complexity and it also
helps to be able to pre-scan the content for soft wrap opportunities.
while (has unprocessed inline item) {

get next continuous content
submit content to line breaking

}

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::LineBreaker::ContinousContent::ContinousContent):

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::Run::Run):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::ContinousContent::hasIntrusiveFloats const):
(WebCore::Layout::ContinousContent::runs const):
(WebCore::Layout::ContinousContent::floats const):
(WebCore::Layout::ContinousContent::endsWithLineBreak const):
(WebCore::Layout::ContinousContent::setEndsWithLineBreak):
(WebCore::Layout::ContinousContent::append):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::nextContinousContentForLine):
(WebCore::Layout::LineLayoutContext::addFloatItems):
(WebCore::Layout::LineLayoutContext::placeInlineContentOnCurrentLine):
(WebCore::Layout::LineLayoutContext::commitContent):
(WebCore::Layout::LineLayoutContext::commitPendingContent): Deleted.
(WebCore::Layout::LineLayoutContext::placeInlineItem): Deleted.
(WebCore::Layout::LineLayoutContext::processUncommittedContent): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::append): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::reset): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::shrink): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:

(WebCore::Layout::LineLayoutContext::formattingContext const):
(WebCore::Layout::LineLayoutContext::root const):
(WebCore::Layout::LineLayoutContext::UncommittedContent::width const): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::size): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::isEmpty): Deleted.
(WebCore::Layout::LineLayoutContext::UncommittedContent::runs const): Deleted.

5:35 AM Changeset in webkit [253814] by commit-queue@webkit.org
  • 5 edits in trunk

Fetch: handle emtpy Location value
https://bugs.webkit.org/show_bug.cgi?id=205462

Patch by Rob Buis <rbuis@igalia.com> on 2019-12-20
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Update improved test results.

  • web-platform-tests/fetch/api/redirect/redirect-empty-location.any-expected.txt:
  • web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker-expected.txt:

Source/WebCore:

Handle empty Location value on redirect as specified here:
https://fetch.spec.whatwg.org/#concept-http-redirect-fetch step 3

Tests: web-platform-tests/fetch/api/redirect/redirect-empty-location.any.html

web-platform-tests/fetch/api/redirect/redirect-empty-location.any.worker.html

  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::didReceiveResponse):

5:15 AM Changeset in webkit [253813] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

DOMPromise::whenPromiseIsSettled is asserting in service worker
https://bugs.webkit.org/show_bug.cgi?id=205440

Reviewed by Chris Dumez.

The promise.get(@then) is sometimes throwing an exception probably due to service worker being stopped.
We need to catch the JS exception and exit early if the getter fails.
Covered by existing service worker tests in debug mode.

  • bindings/js/JSDOMPromise.cpp:

(WebCore::DOMPromise::whenPromiseIsSettled):

3:52 AM Changeset in webkit [253812] by youenn@apple.com
  • 7 edits in trunk/Source/WebCore

Make ServiceWorker::postMessage use the exec state from the JS binding layer
https://bugs.webkit.org/show_bug.cgi?id=205395

Reviewed by Chris Dumez.

Instead of using ScriptExecutionContext::execState, we can ask the JS binding layer to pass the exec state and use it.
Since ServiceWorker is an ActiveDOMObject, we use its scriptExecutionContext() to compute the ServiceWorker source identifier.
We do the same for ServiceWorkerClient which is a context destruction observer and which only lives in Service Worker scope so calling ScriptExecutionContext::execState is suboptimal.

No change of behavior.

  • workers/service/ServiceWorker.cpp:

(WebCore::ServiceWorker::postMessage):

  • workers/service/ServiceWorker.h:
  • workers/service/ServiceWorker.idl:
  • workers/service/ServiceWorkerClient.cpp:

(WebCore::ServiceWorkerClient::postMessage):

  • workers/service/ServiceWorkerClient.h:
  • workers/service/ServiceWorkerClient.idl:
2:31 AM Changeset in webkit [253811] by jiewen_tan@apple.com
  • 19 edits
    3 adds in trunk

[WebAuthn] Implement coders for CTAP ClientPIN requests and responses
https://bugs.webkit.org/show_bug.cgi?id=205376
<rdar://problem/58034395>

Reviewed by Brent Fulgham.

Source/WebCore:

This patch implements coders for authenticatorClientPIN requests and responses
following the spec:
https://fidoalliance.org/specs/fido-v2.0-ps-20190130/fido-client-to-authenticator-protocol-v2.0-ps-20190130.html#authenticatorClientPIN

Specifically, it
i) implements authenticatorClientPIN subCommand: getRetries, getKeyAgreement and getPINToken;
ii) adds pinAuth/pinProtocol to authenticatorMakeCredential/authenticatorGetAssertion.

The authenticatorClientPIN subCommands are based on a Chromium patch:
https://chromium-review.googlesource.com/c/chromium/src/+/1457004 Specifically, it adopts the
interfaces from that patch, but rewrites the BoringSSL-based crypto features using WebCore's
WebCrypto implementation. This allows us to focus on high level crypto interfaces, and lets
WebCrypto handle the underlying crypto library. Also, the original Chromium patch lacks tests.
We introduce a large set of API tests to confirm proper function.

This patch also makes the AES CBC, EDCH, and HMAC platform* implementations public, so that
these implementations can be shared by WebAuthentication and test infrastructure.

Covered by API tests.

  • Modules/webauthn/WebAuthenticationConstants.h:
  • Modules/webauthn/cbor/CBORReader.cpp:

(cbor::CBORReader::readCBORMap):
Let CBORReader recognize negative map keys.

  • Modules/webauthn/fido/DeviceRequestConverter.cpp:

(fido::encodeMakeCredenitalRequestAsCBOR):
(fido::encodeGetAssertionRequestAsCBOR):

  • Modules/webauthn/fido/DeviceRequestConverter.h:
  • Modules/webauthn/fido/Pin.cpp: Added.

(fido::pin::hasAtLeastFourCodepoints):
(fido::pin::makePinAuth):
(fido::pin::encodeRawPublicKey):
(fido::pin::validateAndConvertToUTF8):
(fido::pin::encodePinCommand):
(fido::pin::RetriesResponse::parse):
(fido::pin::KeyAgreementResponse::KeyAgreementResponse):
(fido::pin::KeyAgreementResponse::parse):
(fido::pin::KeyAgreementResponse::parseFromCOSE):
(fido::pin::encodeCOSEPublicKey):
(fido::pin::TokenResponse::TokenResponse):
(fido::pin::TokenResponse::parse):
(fido::pin::TokenResponse::pinAuth const):
(fido::pin::TokenResponse::token const):
(fido::pin::encodeAsCBOR):
(fido::pin::TokenRequest::tryCreate):
(fido::pin::TokenRequest::TokenRequest):
(fido::pin::TokenRequest::sharedKey const):

  • Modules/webauthn/fido/Pin.h: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • crypto/CryptoAlgorithm.h:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/keys/CryptoKeyAES.cpp:
  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyEC.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::algorithm const):

Tools:

Adds API tests.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/CtapPinTest.cpp: Added.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/CtapRequestTest.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebCore/FidoTestData.h:
Note: See TracTimeline for information about the timeline view.