Timeline



Mar 2, 2022:

11:31 PM Changeset in webkit [290770] by commit-queue@webkit.org
  • 4 edits in trunk

Treat empty intersection correctly in RenderLayer::getRectToExpose
https://bugs.webkit.org/show_bug.cgi?id=237189

Patch by Rob Buis <rbuis@igalia.com> on 2022-03-02
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/content-visibility/content-visibility-050-expected.txt:

Source/WebCore:

The case where the target rect to reveal had zero height and was outside of the visible rect, the
classification was wrongly that the target was visible, fix this to classify as hidden instead.

Test: imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-050.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::getRectToExpose const):

11:08 PM Changeset in webkit [290769] by commit-queue@webkit.org
  • 12 edits in trunk/Source/JavaScriptCore

Unreviewed, reverting r290717.
https://bugs.webkit.org/show_bug.cgi?id=237409

Speedometer2

Reverted changeset:

"Add a DeferTraps scope"
https://bugs.webkit.org/show_bug.cgi?id=237306
https://commits.webkit.org/r290717

10:49 PM Changeset in webkit [290768] by Justin Michaud
  • 93 edits in trunk/Source/JavaScriptCore

Refactor OpcodeTraits to support the possibility of having 2-byte WASM opcode ids in bytecode streams
https://bugs.webkit.org/show_bug.cgi?id=237347

The number of WASM opcodes will increase beyond 255 when WASM SIMD is implemented, and so this patch
changes OpcodeTraits to allow for the possibility of having two-byte WASM opcodes without regressing
JS. We have to thread these OpcodeTraits everywhere that they are used so that code can read the
correct value when decoding an instruction stream. This patch does not change the size of WASM opcodes
yet, although I have tested that the test suite still passes if we do increase the opcode size.

Reviewed by Keith Miller.

  • bytecode/BytecodeBasicBlock.cpp:

(JSC::BytecodeBasicBlock<OpcodeTraits>::BytecodeBasicBlock):
(JSC::BytecodeBasicBlock<OpcodeTraits>::addLength):
(JSC::BytecodeBasicBlock<OpcodeTraits>::shrinkToFit):
(JSC::isJumpTarget):
(JSC::BytecodeBasicBlock<OpcodeTraits>::computeImpl):
(JSC::BytecodeBasicBlock<JSOpcodeTraits>::compute):
(JSC::BytecodeBasicBlock::BytecodeBasicBlock): Deleted.
(JSC::BytecodeBasicBlock::addLength): Deleted.
(JSC::BytecodeBasicBlock::shrinkToFit): Deleted.
(JSC::BytecodeBasicBlock::computeImpl): Deleted.
(JSC::BytecodeBasicBlock::compute): Deleted.

  • bytecode/BytecodeBasicBlock.h:

(JSC::BytecodeBasicBlock::addSuccessor):

  • bytecode/BytecodeDumper.cpp:

(JSC::BytecodeDumperBase<InstructionStreamType>::printLocationAndOp):
(JSC::BytecodeDumperBase<InstructionStreamType>::dumpValue):
(JSC::BytecodeDumper<Block>::outOfLineJumpOffset const):
(JSC::BytecodeDumper<Block>::dumpBytecode):
(JSC::dumpHeader):
(JSC::CodeBlockBytecodeDumper<Block>::dumpBlock):
(JSC::CodeBlockBytecodeDumper<Block>::dumpGraph):
(JSC::Wasm::BytecodeDumper::dumpBlock):
(JSC::Wasm::BytecodeDumper::registerName const):
(JSC::Wasm::BytecodeDumper::outOfLineJumpOffset const):
(JSC::BytecodeDumperBase::printLocationAndOp): Deleted.
(JSC::BytecodeDumperBase::dumpValue): Deleted.

  • bytecode/BytecodeDumper.h:
  • bytecode/BytecodeGeneratorification.cpp:

(JSC::BytecodeGeneratorification::BytecodeGeneratorification):
(JSC::BytecodeGeneratorification::enterPoint const):
(JSC::BytecodeGeneratorification::instructions const):
(JSC::GeneratorLivenessAnalysis::run):
(JSC::performGeneratorification):

  • bytecode/BytecodeGeneratorification.h:
  • bytecode/BytecodeGraph.h:

(JSC::BytecodeGraph::blockContainsBytecodeOffset):
(JSC::BytecodeGraph::findBasicBlockForBytecodeOffset):
(JSC::BytecodeGraph::findBasicBlockWithLeaderOffset):
(JSC::BytecodeGraph::at const):
(JSC::BytecodeGraph::operator[] const):
(JSC::BytecodeGraph::first):
(JSC::BytecodeGraph::last):
(JSC::BytecodeGraph::dump):
(JSC::BytecodeGraph::BytecodeGraph):

  • bytecode/BytecodeLivenessAnalysis.cpp:

(JSC::BytecodeLivenessAnalysis::computeFullLiveness):
(JSC::BytecodeLivenessAnalysis::dumpResults):

  • bytecode/BytecodeLivenessAnalysis.h:
  • bytecode/BytecodeLivenessAnalysisInlines.h:

(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexDef):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUse):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndexUseInExceptionHandler):
(JSC::BytecodeLivenessPropagation::stepOverBytecodeIndex):
(JSC::BytecodeLivenessPropagation::stepOverInstruction):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForInstruction):
(JSC::BytecodeLivenessPropagation::computeLocalLivenessForBlock):
(JSC::BytecodeLivenessPropagation::getLivenessInfoAtInstruction):
(JSC::BytecodeLivenessPropagation::runLivenessFixpoint):

  • bytecode/BytecodeRewriter.cpp:

(JSC::BytecodeRewriter::insertImpl):
(JSC::BytecodeRewriter::adjustJumpTargets):

  • bytecode/BytecodeRewriter.h:

(JSC::BytecodeRewriter::InsertionPoint::InsertionPoint):
(JSC::BytecodeRewriter::Fragment::Fragment):
(JSC::BytecodeRewriter::BytecodeRewriter):
(JSC::BytecodeRewriter::insertFragmentBefore):
(JSC::BytecodeRewriter::insertFragmentAfter):
(JSC::BytecodeRewriter::replaceBytecodeWithFragment):
(JSC::BytecodeRewriter::adjustAbsoluteOffset):
(JSC::BytecodeRewriter::adjustJumpTarget):

  • bytecode/BytecodeUseDef.cpp:

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

  • bytecode/BytecodeUseDef.h:

(JSC::computeUsesForBytecodeIndex):
(JSC::computeDefsForBytecodeIndex):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::hasOpDebugForLineAndColumn):
(JSC::CodeBlock::notifyLexicalBindingUpdate):
(JSC::CodeBlock::validate):
(JSC::CodeBlock::outOfLineJumpOffset):
(JSC::CodeBlock::outOfLineJumpTarget):
(JSC::CodeBlock::binaryArithProfileForPC):
(JSC::CodeBlock::unaryArithProfileForPC):
(JSC::CodeBlock::insertBasicBlockBoundariesForControlFlowProfiler):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::outOfLineJumpOffset):
(JSC::CodeBlock::bytecodeOffset):
(JSC::CodeBlock::bytecodeIndex):
(JSC::CodeBlock::instructions const):
(JSC::CodeBlock::instructionAt const):

  • bytecode/Instruction.h:

(JSC::BaseInstruction::opcodeID const):
(JSC::BaseInstruction::name const):
(JSC::BaseInstruction::isWide16 const):
(JSC::BaseInstruction::isWide32 const):
(JSC::BaseInstruction::width const):
(JSC::BaseInstruction::hasMetadata const):
(JSC::BaseInstruction::hasCheckpoints const):
(JSC::BaseInstruction::numberOfCheckpoints const):
(JSC::BaseInstruction::sizeShiftAmount const):
(JSC::BaseInstruction::opcodeIDWidth const):
(JSC::BaseInstruction::opcodeIDBytes const):
(JSC::BaseInstruction::size const):
(JSC::BaseInstruction::is const):
(JSC::BaseInstruction::as const):
(JSC::BaseInstruction::asKnownWidth const):
(JSC::BaseInstruction::cast):
(JSC::BaseInstruction::cast const):
(JSC::BaseInstruction::wide16 const):
(JSC::BaseInstruction::wide32 const):

  • bytecode/InstructionStream.cpp:

(JSC::InstructionStream::InstructionStream): Deleted.
(JSC::InstructionStream::sizeInBytes const): Deleted.
(JSC::InstructionStream::contains const): Deleted.

  • bytecode/InstructionStream.h:

(JSC::InstructionStream::sizeInBytes const):
(JSC::InstructionStream::BaseRef::operator-> const):
(JSC::InstructionStream::BaseRef::ptr const):
(JSC::InstructionStream::BaseRef::unwrap const):
(JSC::InstructionStream::MutableRef::operator->):
(JSC::InstructionStream::MutableRef::operator-> const):
(JSC::InstructionStream::MutableRef::ptr):
(JSC::InstructionStream::MutableRef::ptr const):
(JSC::InstructionStream::MutableRef::unwrap):
(JSC::InstructionStream::MutableRef::unwrap const):
(JSC::InstructionStream::iterator::operator++):
(JSC::InstructionStream::contains const):
(JSC::InstructionStream::InstructionStream):
(JSC::InstructionStreamWriter::InstructionStreamWriter):
(JSC::InstructionStreamWriter::finalize):
(JSC::InstructionStreamWriter::swap):
(JSC::InstructionStreamWriter::iterator::operator++):

  • bytecode/Opcode.h:
  • bytecode/OpcodeInlines.h:

(JSC::isOpcodeShape):

  • bytecode/OpcodeSize.h:
  • bytecode/PreciseJumpTargets.cpp:

(JSC::getJumpTargetsForInstruction):
(JSC::computePreciseJumpTargetsInternal):
(JSC::computePreciseJumpTargets):
(JSC::recomputePreciseJumpTargets):
(JSC::findJumpTargetsForInstruction):

  • bytecode/PreciseJumpTargets.h:
  • bytecode/PreciseJumpTargetsInlines.h:

(JSC::jumpTargetForInstruction):
(JSC::extractStoredJumpTargetsForInstruction):
(JSC::updateStoredJumpTargetsForInstruction):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::dumpLineColumnEntry):
(JSC::UnlinkedCodeBlock::instructions const):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::instructionAt const):
(JSC::UnlinkedCodeBlock::bytecodeOffset):
(JSC::UnlinkedCodeBlock::opProfileControlFlowBytecodeOffsets const):
(JSC::UnlinkedCodeBlock::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlockGenerator.cpp:

(JSC::UnlinkedCodeBlockGenerator::finalize):
(JSC::UnlinkedCodeBlockGenerator::applyModification):
(JSC::UnlinkedCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):

  • bytecode/UnlinkedCodeBlockGenerator.h:

(JSC::UnlinkedCodeBlockGenerator::addOpProfileControlFlowBytecodeOffset):
(JSC::UnlinkedCodeBlockGenerator::outOfLineJumpOffset):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::instructions const):
(JSC::BytecodeGenerator::withWriter):

  • bytecompiler/BytecodeGeneratorBase.h:
  • bytecompiler/BytecodeGeneratorBaseInlines.h:

(JSC::BytecodeGeneratorBase<Traits>::recordOpcode):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode16):
(JSC::BytecodeGeneratorBase<Traits>::alignWideOpcode32):

  • bytecompiler/StaticPropertyAnalysis.h:

(JSC::StaticPropertyAnalysis::create):
(JSC::StaticPropertyAnalysis::StaticPropertyAnalysis):

  • bytecompiler/StaticPropertyAnalyzer.h:

(JSC::StaticPropertyAnalyzer::createThis):
(JSC::StaticPropertyAnalyzer::newObject):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleVarargsCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::parseGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parseCodeBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGCapabilities.h:

(JSC::DFG::capabilityLevel):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):
(JSC::DFG::adjustAndJumpToTarget):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileLoopHint):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

  • generator/Argument.rb:
  • generator/DSL.rb:
  • generator/Opcode.rb:
  • interpreter/AbstractPC.h:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::currentVPC const):
(JSC::CallFrame::setCurrentVPC):

  • interpreter/CallFrame.h:
  • interpreter/Interpreter.cpp:

(JSC::CatchInfo::CatchInfo):

  • interpreter/Interpreter.h:
  • jit/JIT.cpp:

(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_jless):
(JSC::JIT::emit_op_jlesseq):
(JSC::JIT::emit_op_jgreater):
(JSC::JIT::emit_op_jgreatereq):
(JSC::JIT::emit_op_jnless):
(JSC::JIT::emit_op_jnlesseq):
(JSC::JIT::emit_op_jngreater):
(JSC::JIT::emit_op_jngreatereq):
(JSC::JIT::emitSlow_op_jless):
(JSC::JIT::emitSlow_op_jlesseq):
(JSC::JIT::emitSlow_op_jgreater):
(JSC::JIT::emitSlow_op_jgreatereq):
(JSC::JIT::emitSlow_op_jnless):
(JSC::JIT::emitSlow_op_jnlesseq):
(JSC::JIT::emitSlow_op_jngreater):
(JSC::JIT::emitSlow_op_jngreatereq):
(JSC::JIT::emit_op_below):
(JSC::JIT::emit_op_beloweq):
(JSC::JIT::emit_op_jbelow):
(JSC::JIT::emit_op_jbeloweq):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareUnsignedAndJump):
(JSC::JIT::emit_compareUnsigned):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emit_op_pow):
(JSC::JIT::emitSlow_op_pow):
(JSC::JIT::emit_op_negate):
(JSC::JIT::emitSlow_op_negate):
(JSC::JIT::emitBitBinaryOpFastPath):
(JSC::JIT::emit_op_bitnot):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitRightShiftFastPath):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
(JSC::JIT::emit_op_div):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emit_op_sub):
(JSC::JIT::emitSlow_op_sub):

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_ret):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emit_op_call):
(JSC::JIT::emit_op_tail_call):
(JSC::JIT::emit_op_call_eval):
(JSC::JIT::emit_op_call_varargs):
(JSC::JIT::emit_op_tail_call_varargs):
(JSC::JIT::emit_op_tail_call_forward_arguments):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::emit_op_construct):
(JSC::JIT::emitSlow_op_call):
(JSC::JIT::emitSlow_op_tail_call):
(JSC::JIT::emitSlow_op_call_eval):
(JSC::JIT::emitSlow_op_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_varargs):
(JSC::JIT::emitSlow_op_tail_call_forward_arguments):
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emitSlow_op_construct):
(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emitSlow_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITInlines.h:

(JSC::JIT::fastPathResumePoint const):
(JSC::JIT::jumpTarget):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_mov):
(JSC::JIT::emit_op_end):
(JSC::JIT::emit_op_jmp):
(JSC::JIT::emit_op_new_object):
(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_overrides_has_instance):
(JSC::JIT::emit_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emit_op_is_empty):
(JSC::JIT::emit_op_typeof_is_undefined):
(JSC::JIT::emit_op_is_undefined_or_null):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_big_int):
(JSC::JIT::emit_op_is_cell_with_type):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_to_primitive):
(JSC::JIT::emit_op_to_property_key):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emit_op_not):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_jeq_null):
(JSC::JIT::emit_op_jneq_null):
(JSC::JIT::emit_op_jundefined_or_null):
(JSC::JIT::emit_op_jnundefined_or_null):
(JSC::JIT::emit_op_jeq_ptr):
(JSC::JIT::emit_op_jneq_ptr):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_stricteq):
(JSC::JIT::emit_op_nstricteq):
(JSC::JIT::compileOpStrictEqJump):
(JSC::JIT::emit_op_jstricteq):
(JSC::JIT::emit_op_jnstricteq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_to_numeric):
(JSC::JIT::emit_op_to_string):
(JSC::JIT::emit_op_to_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_identity_with_profile):
(JSC::JIT::emit_op_get_parent_scope):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emit_op_get_scope):
(JSC::JIT::emit_op_to_this):
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emit_op_check_tdz):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_check_traps):
(JSC::JIT::emit_op_nop):
(JSC::JIT::emit_op_super_sampler_begin):
(JSC::JIT::emit_op_super_sampler_end):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emit_op_new_func):
(JSC::JIT::emit_op_new_generator_func):
(JSC::JIT::emit_op_new_async_generator_func):
(JSC::JIT::emit_op_new_async_func):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_new_func_exp):
(JSC::JIT::emit_op_new_generator_func_exp):
(JSC::JIT::emit_op_new_async_func_exp):
(JSC::JIT::emit_op_new_async_generator_func_exp):
(JSC::JIT::emit_op_new_array):
(JSC::JIT::emit_op_new_array_with_size):
(JSC::JIT::emit_op_profile_type):
(JSC::JIT::emit_op_log_shadow_chicken_prologue):
(JSC::JIT::emit_op_log_shadow_chicken_tail):
(JSC::JIT::emit_op_profile_control_flow):
(JSC::JIT::emit_op_argument_count):
(JSC::JIT::emit_op_get_rest_length):
(JSC::JIT::emit_op_get_argument):
(JSC::JIT::emit_op_get_prototype_of):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_jeq):
(JSC::JIT::emit_op_jneq):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emitSlow_op_jeq):
(JSC::JIT::emitSlow_op_jneq):
(JSC::JIT::emit_op_stricteq):
(JSC::JIT::emit_op_nstricteq):
(JSC::JIT::emit_op_jstricteq):
(JSC::JIT::emit_op_jnstricteq):
(JSC::JIT::emitSlow_op_jstricteq):
(JSC::JIT::emitSlow_op_jnstricteq):

  • jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emit_op_put_by_val_direct):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emit_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emit_op_in_by_val):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::emit_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emit_op_has_private_brand):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emit_op_get_from_scope):
(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::emit_op_get_from_arguments):
(JSC::JIT::emit_op_put_to_arguments):
(JSC::JIT::emit_op_get_internal_field):
(JSC::JIT::emit_op_put_internal_field):
(JSC::JIT::emit_op_get_property_enumerator):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emitSlow_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):

  • llint/LLIntData.cpp:

(JSC::LLInt::initialize):

  • llint/LLIntData.h:

(JSC::LLInt::exceptionInstructions):
(JSC::LLInt::wasmExceptionInstructions):

  • llint/LLIntExceptions.cpp:

(JSC::LLInt::returnToThrow):
(JSC::LLInt::wasmReturnToThrow):

  • llint/LLIntExceptions.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::llint_trace_operand):
(JSC::LLInt::llint_trace_value):
(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::performLLIntGetByID):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::commonCallEval):
(JSC::LLInt::dispatchToNextInstructionDuringExit):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter.cpp:

(JSC::CLoopRegister::operator const JSInstruction*):
(JSC::CLoop::execute):
(JSC::CLoopRegister::operator const Instruction*): Deleted.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • llint/WebAssembly.asm:
  • runtime/CachedTypes.cpp:

(JSC::CachedInstructionStream::encode):
(JSC::CachedInstructionStream::decode const):
(JSC::CachedCodeBlock::instructions const):

  • runtime/CommonSlowPaths.cpp:

(JSC::updateArithProfileForBinaryArithOp):
(JSC::iteratorOpenTryFastImpl):
(JSC::iteratorNextTryFastImpl):

  • runtime/CommonSlowPaths.h:
  • runtime/JSCConfig.h:
  • runtime/JSCJSValue.h:
  • runtime/SlowPathFunction.h:
  • runtime/VM.cpp:

(JSC::VM::addLoopHintExecutionCounter):
(JSC::VM::getLoopHintExecutionCounter):
(JSC::VM::removeLoopHintExecutionCounter):

  • runtime/VM.h:
  • wasm/WasmCallee.cpp:

(JSC::Wasm::LLIntCallee::LLIntCallee):
(JSC::Wasm::LLIntCallee::outOfLineJumpOffset):
(JSC::Wasm::LLIntCallee::outOfLineJumpTarget):

  • wasm/WasmCallee.h:
  • wasm/WasmFunctionCodeBlockGenerator.cpp:

(JSC::Wasm::FunctionCodeBlockGenerator::setInstructions):
(JSC::Wasm::FunctionCodeBlockGenerator::addOutOfLineJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset):

  • wasm/WasmFunctionCodeBlockGenerator.h:

(JSC::Wasm::FunctionCodeBlockGenerator::constantRegisters const):
(JSC::Wasm::FunctionCodeBlockGenerator::instructions const):
(JSC::Wasm::FunctionCodeBlockGenerator::addJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::numberOfJumpTargets):
(JSC::Wasm::FunctionCodeBlockGenerator::lastJumpTarget):
(JSC::Wasm::FunctionCodeBlockGenerator::outOfLineJumpOffset):
(JSC::Wasm::FunctionCodeBlockGenerator::bytecodeOffset):
(JSC::Wasm::FunctionCodeBlockGenerator::tierUpCounter):

  • wasm/WasmGeneratorTraits.h:
  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::addSwitch):
(JSC::GenericLabel<Wasm::GeneratorTraits>::setLocation):

  • wasm/WasmLLIntTierUpCounter.cpp:

(JSC::Wasm::LLIntTierUpCounter::addOSREntryDataForLoop):
(JSC::Wasm::LLIntTierUpCounter::osrEntryDataForLoop const const):

  • wasm/WasmLLIntTierUpCounter.h:

(JSC::Wasm::LLIntTierUpCounter::LLIntTierUpCounter):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):
(JSC::LLInt::slow_path_wasm_throw_exception):
(JSC::LLInt::slow_path_wasm_popcount):
(JSC::LLInt::slow_path_wasm_popcountll):

  • wasm/WasmSlowPaths.h:
10:23 PM Changeset in webkit [290767] by Lauro Moura
  • 2 edits in trunk/Tools

[Tools] Fix linux_get_crash_log.py error logging with python3
https://bugs.webkit.org/show_bug.cgi?id=237404

Reviewed by Fujii Hironori.

Avoid issues generating error logs after 247736@main defaulted to
python3.

  • Scripts/webkitpy/port/linux_get_crash_log.py:

(GDBCrashLogGenerator._get_gdb_output): Encode returncode before
appending to bytes.

9:08 PM Changeset in webkit [290766] by sihui_liu@apple.com
  • 20 edits
    4 deletes in trunk/Source/WebKit

REGRESSION (r289474): cacheStoragePath is empty in NetworkStorageManager::localOriginStorageManager
https://bugs.webkit.org/show_bug.cgi?id=237335

Reviewed by Chris Dumez.

CacheStorage::Engine::storagePath returns emptyString if salt file under rootDirectory cannot be read or
written, so we need to make sure sandbox extension for rootDirectory is consumed before calling storagePath
(in createNetworkStorageManager of NetworkSession).

This patch also refactors code about adding session in network process. Now we would create
NetworkStorageManager when NetworkSession is created.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::updateQuotaBasedOnSpaceUsageForTesting):
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFilesForIndexedDB):

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
(WebKit::NetworkProcess::addStorageSession):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::hasLocalStorage):
(WebKit::NetworkProcess::fetchWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::deleteAndRestrictWebsiteDataForRegistrableDomains):
(WebKit::NetworkProcess::registrableDomainsWithWebsiteData):
(WebKit::NetworkProcess::prepareToSuspend):
(WebKit::NetworkProcess::resume):
(WebKit::NetworkProcess::syncLocalStorage):
(WebKit::NetworkProcess::resetQuota):
(WebKit::NetworkProcess::clearStorage):
(WebKit::NetworkProcess::didIncreaseQuota):
(WebKit::NetworkProcess::renameOriginInWebsiteData):
(WebKit::NetworkProcess::uiProcessBundleIdentifier):
(WebKit::NetworkProcess::connectionToWebProcessClosed):
(WebKit::NetworkProcess::ensureSession): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::uiProcessBundleIdentifier const): Deleted.

  • NetworkProcess/NetworkSession.cpp:

(WebKit::createNetworkStorageManager):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::lowMemoryHandler):
(WebKit::NetworkSession::addServiceWorkerSession): Deleted.
(WebKit::NetworkSession::addStorageManagerSession): Deleted.

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::storageManager):

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/RemoteNetworkingContext.h: Removed.
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::requestSpace):

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::uiProcessBundleIdentifier):

  • NetworkProcess/curl/RemoteNetworkingContextCurl.cpp: Removed.
  • NetworkProcess/mac/RemoteNetworkingContext.mm: Removed.
  • NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Removed.
  • PlatformPlayStation.cmake:
  • PlatformWin.cmake:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):
(WebKit::WebsiteDataStoreParameters::~WebsiteDataStoreParameters): Deleted.

  • Shared/WebsiteDataStoreParameters.h:

(): Deleted.

  • SourcesCocoa.txt:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::addSession):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resolvedIndexedDBDirectory const):
(WebKit::WebsiteDataStore::resolvedIndexedDatabaseDirectory const): Deleted.

9:05 PM Changeset in webkit [290765] by sihui_liu@apple.com
  • 14 edits in trunk

Throw proper exception on failed removeEntry() calls
https://bugs.webkit.org/show_bug.cgi?id=237382
<rdar://89232969>

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getDirectoryHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-getFileHandle.https.any.worker-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any-expected.txt:
  • web-platform-tests/file-system-access/sandboxed_FileSystemDirectoryHandle-removeEntry.https.any.worker-expected.txt:

Source/WebKit:

Updated existing tests.

  • NetworkProcess/storage/FileSystemStorageError.h:

(WebKit::convertToException):

  • NetworkProcess/storage/FileSystemStorageHandle.cpp:

(WebKit::FileSystemStorageHandle::removeEntry):

LayoutTests:

  • storage/filesystemaccess/handle-move-expected.txt:
  • storage/filesystemaccess/handle-move-worker-expected.txt:
  • storage/filesystemaccess/resources/handle-move.js:

(async test):

6:56 PM Changeset in webkit [290764] by Robert Jenner
  • 2 edits in trunk/LayoutTests

WindowServer returned not alive with context:,unresponsive work processor(s)
<rdar://86037417>

Unreviewed test gardening. Skipping tests on iOS due to tests causing WindowServer to crash.

  • platform/ios-wk2/TestExpectations:
6:44 PM Changeset in webkit [290763] by Robert Jenner
  • 4 edits in trunk/LayoutTests

Unreviewed, reverting r290658.

r290658 broke two tests for iOS, slowing down EWS.

Reverted changeset:

"fast/mediastream/getUserMedia-to-canvas-1.html and
fast/mediastream/getUserMedia-to-canvas-2.html are failing on
MacOS when remote video frame flag is enabled"
https://bugs.webkit.org/show_bug.cgi?id=237042
https://commits.webkit.org/r290658

5:03 PM Changeset in webkit [290762] by Andres Gonzalez
  • 5 edits in trunk/Source/WebCore

ITM: Checkbox state change is not updated in isolated tree
https://bugs.webkit.org/show_bug.cgi?id=237381
rdar://89529486

Reviewed by Chris Fleizach.

Fixes the following test in isolated tree mode:
accessibility/mac/checked-status-tree-items.html
accessibility/aria-switch-checked.html

  • accessibility/isolatedtree/AXIsolatedObject.cpp:

(WebCore::AXIsolatedObject::initializeAttributeData):
Properly initializes the properties SupportsCheckedState, IsChecked and
ButtonState.
(WebCore::AXIsolatedObject::getOrRetrievePropertyValue):
Uses the new template method propertyValue(PropertyName).

  • accessibility/isolatedtree/AXIsolatedObject.h:

(WebCore::AXIsolatedObject::propertyValue const):

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateNodeProperty):
Updates both IsChecked and ButtonState.

  • accessibility/isolatedtree/AXIsolatedTree.h:
4:29 PM Changeset in webkit [290761] by commit-queue@webkit.org
  • 8 edits in trunk/Source

[WebGPU] Implement GPUDeviceDescriptor.requiredLimits
https://bugs.webkit.org/show_bug.cgi?id=232741
Source/WebCore:

<rdar://problem/85325316>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • Modules/WebGPU/GPUDeviceDescriptor.h:

(WebCore::GPUDeviceDescriptor::convertToBacking const):

  • Modules/WebGPU/GPUDeviceDescriptor.idl:

Source/WebCore/PAL:

<rdar://problem/85325316>

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • pal/graphics/WebGPU/WebGPUDeviceDescriptor.h:

Source/WebKit:

rdar://problem/85325316

Patch by Dan Glastonbury <djg@apple.com> on 2022-03-02
Reviewed by Myles C. Maxfield.

Implement IDL bindings for requiredLimits attribute of
GPUDeviceDescriptor.

  • Shared/WebGPU/WebGPUDeviceDescriptor.cpp:

(WebKit::WebGPU::ConvertToBackingContext::convertToBacking):
(WebKit::WebGPU::ConvertFromBackingContext::convertFromBacking):

  • Shared/WebGPU/WebGPUDeviceDescriptor.h:

(WebKit::WebGPU::DeviceDescriptor::encode const):
(WebKit::WebGPU::DeviceDescriptor::decode):

4:08 PM Changeset in webkit [290760] by Simon Fraser
  • 5 edits
    2 adds in trunk

Rendering issues with many dynamically-added sticky elements inside overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=237378
<rdar://83745510>

Reviewed by Cameron McCormack.

Source/WebCore:

A bug was filed describing a symptom where position:sticky elements would eventually
fail to render when many of them were dynamically added inside a non-stacking context
overflow scroll.

Debugging showed that CALayers were accumulating, causing us to hit per-process IOSurface
limits, at which point content fails to render (this is being fixed via rdar://89640915).
Further debugging showed that these layers were unparented, and being entrained by
ScrollingStateStickyNodes, which were accumulating in ScrollingStateTree's m_unparentedNodes.

This happened because with this scrolling configuration, each ScrollingStateStickyNode
is parented via a ScrollingStateOverflowScrollProxyNode which is referenced by entries
in RenderLayerBacking's m_ancestorClippingStack. On cleanup, the ScrollingStateOverflowScrollProxyNode
was unparented first, leaving the ScrollingStateStickyNode in m_unparentedNodes.

The fix is to have ScrollingStateTree::unparentChildrenAndDestroyNode() remove nodes
from m_unparentedNodes.

To test, add a m_unparentedNodes count to scrollingStateTreeAsText output, which means
having scrollingStateTreeAsText() as a member function on ScrollingStateTree.

Test: scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes.html

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const):

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
(WebCore::ScrollingStateTree::scrollingStateTreeAsText const):

  • page/scrolling/ScrollingStateTree.h:

LayoutTests:

  • scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/accumulated-unparented-sticky-nodes.html: Added.
3:59 PM Changeset in webkit [290759] by Jonathan Bedard
  • 7 edits in trunk/Tools

[webkitcorepy] Add Terminal.open_url
https://bugs.webkit.org/show_bug.cgi?id=237386
<rdar://problem/89703756>

Reviewed by Don Olmstead.

Different platforms have different commands to open URLs.

  • Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:

(Terminal): Add list of valid URL prefixes.
(Terminal.open_url): If terminal is interactive, open the provided URL.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.main): Invoke Terminal.open_url.

Canonical link: https://commits.webkit.org/248003@main

3:25 PM Changeset in webkit [290758] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[AppSSO] Correct logging messages to avoid confusing screeners that an error has occurred
https://bugs.webkit.org/show_bug.cgi?id=237390
<rdar://problem/89710486>

Reviewed by Simon Fraser.

The phrasing of the message in 'SOAuthorizationCoordinator::tryAuthorize' when a URL is not relevant for
AppSSO flows is:

AUTHORIZATIONCOORDINATOR_RELEASE_LOG("tryAuthorize: Cannot authorize the requested URL.");

This leads people spelunking logs to believe that the URL can't be authorized (perhaps due to an error).

Instead, we should more accurately report that the URL is not one that is mediated through an AppSSO flow,
and so no AppSSO processing is needed.

  • UIProcess/Cocoa/SOAuthorization/SOAuthorizationCoordinator.mm:

(WebKit::SOAuthorizationCoordinator::tryAuthorize):

3:09 PM Changeset in webkit [290757] by Chris Dumez
  • 2 edits in trunk/Tools

Unreviewed, address post-landing feedback from Darin on r290743

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

2:28 PM Changeset in webkit [290756] by Oriol Brufau
  • 39 edits
    4 deletes in trunk

[css] Implement 'text-decoration' as a shorthand.
https://bugs.webkit.org/show_bug.cgi?id=237175

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update tests to take into account that 'text-decoration' is a shorthand.

  • web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • web-platform-tests/css/css-variables/variable-presentation-attribute-expected.txt:
  • web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:

Source/WebCore:

The 'text-decoration' property was considered to be a longhand, sharing
a computed value with 'text-decoration-line'.

This patch switches 'text-decoration' into a shorthand of the following
longhands: 'text-decoration-line', 'text-decoration-thickness',
'text-decoration-style' and 'text-decoration-color'. This is according
to https://www.w3.org/TR/css-text-decor-4/#text-decoration-property

For now I'm keeping the grammar as-is, so 'text-decoration' will only
accept values that are valid in 'text-decoration-line', but will set
the other longhands to the initial value. This should probably change
in a follow-up.

I'm also keeping '-webkit-text-decoration' as-is, as a shorthand of
'text-decoration-{line,style,color}', not including thickness for some
obscure reason. '-webkit-text-decoration' should probably be removed
anyways.

There is a bunch of editing code that was getting/setting/removing
'text-decoration' as a longhand, so I'm switching that to:

  • Use 'text-decoration-line' when getting values.
  • Use 'text-decoration' when setting values, and use a string for the value, this parses it and sets each longhand to the correct value.
  • Use 'text-decoration' get removing declarations, effectively removing all longhands.

This preserves the previous behavior as much as possible.

Tests: fast/css/getComputedStyle/computed-style.html

fast/css/getComputedStyle/computed-style-without-renderer.html
fast/css/getComputedStyle/getComputedStyle-text-decoration.html
fast/css/style-enumerate-properties.html
fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html
fast/css3-text/css3-text-decoration/text-decoration-dashed.html
fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html
fast/css3-text/css3-text-decoration/text-decoration-dotted.html
imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.html
imported/w3c/web-platform-tests/css/css-variables/variable-presentation-attribute.html
imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree.html
svg/css/getComputedStyle-basic.xhtml

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSProperties.json:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::styleWithResolvedTextDecorations const):
(WebCore::EditingStyle::collapseTextDecorationProperties):
(WebCore::textDecorationValueList):
(WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
(WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode const):
(WebCore::EditingStyle::mergeStyle):
(WebCore::EditingStyle::removeEquivalentProperties):
(WebCore::reconcileTextDecorationProperties):
(WebCore::StyleChange::StyleChange):
(WebCore::setTextDecorationProperty):
(WebCore::StyleChange::extractTextStyles):
(WebCore::diffTextDecorations):
(WebCore::extractPropertiesNotIn):

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverterCaches::propertyValueForNode):
(HTMLConverter::computedAttributesForElement):

  • editing/markup.cpp:

(WebCore::serializePreservingVisualAppearanceInternal):

  • style/PropertyAllowlist.cpp:

(WebCore::Style::isValidCueStyleProperty):

LayoutTests:

Update tests to take into account that 'text-decoration' is a shorthand.

  • editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt:
  • fast/css/getComputedStyle/computed-style-expected.txt:
  • fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-text-decoration-expected.txt:
  • fast/css/getComputedStyle/getComputedStyle-text-decoration.html:
  • fast/css/getComputedStyle/resources/property-names.js:
  • fast/css/style-enumerate-properties-expected.txt:
  • fast/css/style-enumerate-properties.html:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand-expected.txt:
  • fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-shorthand.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dashed-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dashed.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-dashed.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted-expected-mismatch.html:
  • fast/css3-text/css3-text-decoration/text-decoration-dotted.html:
  • fast/events/input-events-paste-rich-datatransfer-expected.txt:
  • platform/glib/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/glib/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/glib/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/gtk/fast/events/input-events-paste-rich-datatransfer-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/gtk/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/fast/css/getComputedStyle/computed-style-expected.txt: Removed.
  • platform/ios/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: Removed.
  • platform/ios/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/ios/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • platform/ios/svg/css/getComputedStyle-basic-expected.txt: Removed.
  • platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
  • platform/wpe/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt:
  • svg/css/getComputedStyle-basic-expected.txt:
2:07 PM Changeset in webkit [290755] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Completion handler is not called when WebAuthn invoked without proper entitlements
https://bugs.webkit.org/show_bug.cgi?id=237380
<rdar://problem/89700242>

Reviewed by Chris Dumez.

WebAuthn is not permitted outside of Web Browser applications. When an application that lacks
the full web browser entitlement attempts to invoke WebAuthn flows, we do an early return. However,
the completion handler for this flow is bypassed, preventing applications from being informed of
this problem.

  • WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:

(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
(WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):

1:25 PM Changeset in webkit [290754] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS] Seatbelt sandbox profile entitlement is deprecated
https://bugs.webkit.org/show_bug.cgi?id=237374

Reviewed by Brent Fulgham.

Replace with new entitlement.

  • Scripts/process-entitlements.sh:
1:12 PM Changeset in webkit [290753] by Jonathan Bedard
  • 2 edits in trunk/Tools

[Python-3] Invoke webkit-patch with Python 3 by default
https://bugs.webkit.org/show_bug.cgi?id=231591
<rdar://problem/84153640>

Reviewed by Ryan Haddad.

  • Scripts/webkit-patch: Change shebang to Python 3.
1:10 PM Changeset in webkit [290752] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

[iOS] Hard link AVPictureInPictureController
https://bugs.webkit.org/show_bug.cgi?id=237227

Reviewed by Brent Fulgham.

Hard linking instead of soft linking should be a small performance improvement.

  • Configurations/WebKit.xcconfig:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

1:04 PM Changeset in webkit [290751] by J Pascoe
  • 5 edits in trunk/LayoutTests

[WebAuthn] Remove obsolete failed attestation tests
https://bugs.webkit.org/show_bug.cgi?id=237346
rdar://problem/89647260

Reviewed by Brent Fulgham.

The removed items tested that creation fails whenever attestation fails, however
we've changed behavior such that creation succeeds with 'none' attestation in this
case, making these failure tests obsolete.

  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https-expected.txt:
  • http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
12:59 PM Changeset in webkit [290750] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS Debug ] editing/async-clipboard/* 20 tests are flaky timeouts on iOS.
https://bugs.webkit.org/show_bug.cgi?id=237372

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-02

  • platform/ios-wk2/TestExpectations:
12:56 PM Changeset in webkit [290749] by Robert Jenner
  • 2 edits in trunk/LayoutTests

REGRESSION(r290539): [ iOS ] 2X http/wpt/webauthn/public-key-credential-create-failure-local (layout-tests) are constant text failures
https://bugs.webkit.org/show_bug.cgi?id=237346

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
12:53 PM BuildingCairoOnWindows edited by Fujii Hironori
(diff)
12:53 PM Changeset in webkit [290748] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Derive branch name from bug title
https://bugs.webkit.org/show_bug.cgi?id=237284
<rdar://problem/89578241 >

Reviewed by Dewei Zhu.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/branch.py:

(Branch.to_branch_name): Convert string (particularly a bug title) to potential branch name.
(Branch.main): If provided branch name is actually a bug number or URL, use the title
of that bug as the branch name.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/branch_unittest.py:

(TestBranch):
(TestBranch.test_prompt_git):
(TestBranch.test_prompt_number):
(TestBranch.test_prompt_url):
(TestBranch.test_invalid_branch):
(TestBranch.test_to_branch_name):

Canonical link: https://commits.webkit.org/247992@main

12:41 PM Changeset in webkit [290747] by Jonathan Bedard
  • 9 edits in trunk

[git-webkit] Sync personal fork by default
https://bugs.webkit.org/show_bug.cgi?id=237324
<rdar://problem/89618617>

Reviewed by Dewei Zhu.

  • metadata/project_config: Add webkitscmpy.update-fork option.
  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:

(Git): Add new webkitscmpy.update-fork option.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:

(PullRequest.main): If we are rebasing the source branch, we should push that synced branch
to a user's personal fork, if such a fork exists.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/pull_request_unittest.py:

Canonical link: https://commits.webkit.org/247991@main

12:18 PM Changeset in webkit [290746] by Wenson Hsieh
  • 15 edits in trunk

[iOS] Copy context menu action should be titled "Copy Link" when long pressing a non-image link
https://bugs.webkit.org/show_bug.cgi?id=237367
rdar://77397886

Reviewed by Devin Rousso.

Source/WebCore:

Add a localizable string for "Copy Link". See WebKit/ChangeLog for more details.

  • en.lproj/Localizable.strings:

Source/WebKit:

Change the current title of the "Copy" context menu action to "Copy Link", when showing the context menu for a
non-image link. See below for more details.

Tests: fast/events/touch/ios/long-press-on-link.html

fast/events/touch/ios/long-press-on-image.html

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:userInfo:]):
(-[_WKActivatedElementInfo _isImage]):

Add a helper method to return whether or not the activated element represents an image. Crucially, this will
return YES in the case of image links, even though the activated element type is _WKActivatedElementTypeLink.
We consult this below to still show "Copy" in the case of image links, instead of "Copy Link".

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):
(+[_WKElementAction _elementActionWithType:info:assistant:]):

Add a _WKActivatedElementInfo argument to -_elementActionWithType:assistant:, and use this to set a custom
title for the menu action in the case of the Copy action for non-image links.

(+[_WKElementAction _elementActionWithType:assistant:]): Deleted.

  • UIProcess/API/Cocoa/_WKElementActionInternal.h:
  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant _appendOpenActionsForURL:actions:elementInfo:]):
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):

Additionally use -_isImage instead of -image here when supplying several default Visual Look Up-related
items; -image is misleading here, since it returns a non-null result even in the case of non-image elements,
if a node snapshot was requested by the client. It's also a bit wasteful, since it means we currently create an
image from the bitmap data while performing this check, when we really only need to know whether the hit-tested
element was an image element.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _simulateElementAction:atLocation:]):
(-[WKContentView _contentsOfUserInterfaceItem:]):
(-[WKContentView _contextMenuInteraction:configurationForMenuAtLocation:completion:]):

Include the titles of all visible menu items as an additional argument in the "contents of user interface item"
dictionary, in the case of context menus. To do this, we take advantage of the -updateVisibleMenuWithBlock:
API, which passes the currently visible UIMenu, to collect the titles of each visible menu item, and then
simply return the visible menu as-is.

See adjusted layout tests for more information.

(-[WKContentView contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):

Move the call to -_didShowContextMenu to the animation completion block, such that we invoke the testing
completion handler for didShowContextMenuCallback after the menu is actually visible. Importantly, this allows
us to query the list of visible menu item titles above, by calling -updateVisibleMenuWithBlock:.

  • UIProcess/mac/DisplayCaptureSessionManager.mm:

(WebKit::alertForWindowSelection):

Drive-by fix: add quotes around the description argument to the UI string macro to fix an error when running
the update-webkit-localizable-strings script.

LayoutTests:

Adjust a couple of layout tests to check for items labeled "Copy" (in the case of an image) and "Copy Link" (in
the case of a link).

  • fast/events/touch/ios/long-press-on-image-expected.txt:
  • fast/events/touch/ios/long-press-on-image.html:
  • fast/events/touch/ios/long-press-on-link-expected.txt:
  • fast/events/touch/ios/long-press-on-link.html:
11:58 AM Changeset in webkit [290745] by mmaxfield@apple.com
  • 4 edits
    2 adds in trunk/LayoutTests

[Cocoa] The behavior of navigator-language-ru changed in Monterey / iOS 15
https://bugs.webkit.org/show_bug.cgi?id=237384
<rdar://problem/80335706>

Unreviewed test gardening.

Add a new test for the new behavior, but keep the old one too for older OSes.

  • fast/text/international/system-language/navigator-language/navigator-language-ru-2-expected.txt: Added.
  • fast/text/international/system-language/navigator-language/navigator-language-ru-2.html: Added.
  • platform/ios-14/TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac-wk2/TestExpectations:
11:47 AM Changeset in webkit [290744] by J Pascoe
  • 2 edits in trunk/Source/WebKit

[WebAuthn] Ensure presenter gets dismissed on iOS
https://bugs.webkit.org/show_bug.cgi?id=237336
rdar://81609371

Reviewed by Brent Fulgham.

Always call [m_presenter dismissWithError] to ensure presenter gets dismissed.

  • UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:

(WebKit::AuthenticatorPresenterCoordinator::dimissPresenter):

11:39 AM Changeset in webkit [290743] by Chris Dumez
  • 13 edits in trunk

Mousemove events double-firing in Safari
https://bugs.webkit.org/show_bug.cgi?id=237342
<rdar://88025610>

Reviewed by Wenson Hsieh.

Source/WebKit:

When we constructed a WebViewImpl, we would add a mouse tracking area to the view,
so that mouseMoved/mouseEntered/mouseExited would get called and we would be able
to forward these mouse events to the WebContent process. However, when the view
becomes first responder, an implicit mouse tracking area also gets added. As a
result, we would get duplicate calls to mouseMoved/mouseEntered/mouseExited.

We consulted with the AppKit team and their recommendation was to use a different
owner object for our mouse tracking area and have that object forward the
mouseMoved/mouseEntered/mouseExited calls to our WebViewImpl. In doing so, we
can stop forwarding mouseMoved/mouseEntered/mouseExited calls from WKWebView &
WKView, which are NOT for our mouse tracking area.

No new tests, I tried but wasn't able to write an API test for this.
I had trouble making the test window key so that the view would receive
the (duplicate) mousemove events. I validated via logging that we are no longer
getting duplicate mousemove events. I also checked on
https://www.vsynctester.com/testing/mouse.html that the output now looks correct.

  • UIProcess/API/Cocoa/WKViewPrivate.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/mac/WKView.mm:

(-[WKView _simulateMouseMove:]):
(-[WKView mouseMoved:]): Deleted.
(-[WKView mouseEntered:]): Deleted.
(-[WKView mouseExited:]): Deleted.

  • UIProcess/API/mac/WKWebViewMac.mm:

(-[WKWebView _simulateMouseMove:]):
(-[WKWebView mouseMoved:]): Deleted.
(-[WKWebView mouseEntered:]): Deleted.
(-[WKWebView mouseExited:]): Deleted.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKMouseTrackingObserver initWithViewImpl:]):
(-[WKMouseTrackingObserver mouseMoved:]):
(-[WKMouseTrackingObserver mouseEntered:]):
(-[WKMouseTrackingObserver mouseExited:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::updatePrimaryTrackingAreaOptions):
(WebKit::WebViewImpl::setPrimaryTrackingArea): Deleted.

  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):

Tools:

Call [WKWebView _simulateMouseMove:] SPI instead of calling [WKWebView mouseMoved:]
since the latter calls are now being ignored.

  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView mouseMoveToPoint:withFlags:]):

  • TestWebKitAPI/mac/PlatformWebViewMac.mm:

(TestWebKitAPI::PlatformWebView::simulateMouseMove):

  • WebKitTestRunner/mac/EventSenderProxy.mm:

(WTR::EventSenderProxy::mouseMoveTo):

11:26 AM Changeset in webkit [290742] by Russell Epstein
  • 1 copy in tags/Safari-614.1.3.8

Tag Safari-614.1.3.8.

11:21 AM Changeset in webkit [290741] by graouts@webkit.org
  • 5 edits in trunk

[web-animations] setting the composite property on a keyframe effect should invalidate the target style
https://bugs.webkit.org/show_bug.cgi?id=237356

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-filling-expected.txt:

Source/WebCore:

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setComposite):

  • animation/KeyframeEffect.h:

(WebCore::KeyframeEffect::setComposite): Deleted.

11:06 AM Changeset in webkit [290740] by Russell Epstein
  • 9 edits in branches/safari-614.1.3-branch/Source

Versioning.

WebKit-7614.1.3.8

10:59 AM Changeset in webkit [290739] by sihui_liu@apple.com
  • 10 edits in trunk

Add assertion that no two sessions share the same general storage directory
https://bugs.webkit.org/show_bug.cgi?id=236844
<rdar://problem/89178566>

Reviewed by Chris Dumez.

Source/WebKit:

rdar://89190571 shows that there can be two WebsiteDataStores using the same general storage directory, when
initializing network process. This can lead to corruption because storage code of each session runs on its own
WorkQueue (or thread) in network process. If two sessions (WebsiteDataStores) use the same directory, the
directory and its files may be accessed concurrently. The correct usage is creating different persistent
sessions with different paths. Let's add an assertion to help find problematic use case.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::cacheStorageDirectory const):
(WebKit::WebsiteDataStore::resolvedGeneralStorageDirectory const):
(WebKit::WebsiteDataStore::generalStorageDirectory const): Deleted.

Tools:

Update the tests where two WebsiteDataStores are created with the same general storage directory.

  • TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm:

(emptyObservationsDBPath):
(emptyPcmDBPath):
(cleanUp):

  • TestWebKitAPI/Tests/WebKitCocoa/PushAPI.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(runWebsiteDataStoreCustomPaths):

10:53 AM Changeset in webkit [290738] by Tyler Wilcock
  • 2 edits in trunk/Source/WebCore

AX: Handle null FileList in RenderFileUploadControl::fileTextValue()
https://bugs.webkit.org/show_bug.cgi?id=237349

Reviewed by Chris Fleizach.

In rare circumstances, it's possible for the FileList associated
with RenderFileUploadControl::inputElement (HTMLInputElement::files())
to be null. This causes a crash in RenderFileUploadControl::fileTextValue().

In this patch, we avoid this crash by handling a null FileList
and returning a null String.

  • rendering/RenderFileUploadControl.cpp:

(WebCore::RenderFileUploadControl::fileTextValue const):
Handle null input.files() and return a null String rather than ASSERTing.

10:52 AM Changeset in webkit [290737] by Alan Coon
  • 1 copy in branches/safari-test-branch

New branch.

10:48 AM Changeset in webkit [290736] by sihui_liu@apple.com
  • 2 edits in trunk/Tools

Add test coverage for deleting FileSystem data when file is being written
https://bugs.webkit.org/show_bug.cgi?id=237353

Reviewed by Chris Dumez.

Verify that file can be removed from disk, and active FileSystemSyncAccessHandle is invalidated in this case.

  • TestWebKitAPI/Tests/WebKitCocoa/FileSystemAccess.mm:
10:47 AM Changeset in webkit [290735] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

Outline-width with transition don't animate correctly
https://bugs.webkit.org/show_bug.cgi?id=173708

Reviewed by Antti Koivisto.

Source/WebCore:

Account for a change in outline size when checking whether a style change affects
visual overflow.

No new test for this, I'm not sure how to write one since the issue is failing to
repaint during an animation but WKTR seems to force a repaint for reftests.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeAffectsVisualOverflow const):

LayoutTests:

Add a repaint test that checks that the outline is accounted for during the transition.

  • fast/repaint/outline-transition-expected.txt: Added.
  • fast/repaint/outline-transition.html: Added.
9:09 AM Changeset in webkit [290734] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RTL] Image alt text has incorrect bidi reordering
https://bugs.webkit.org/show_bug.cgi?id=237366
<rdar://problem/89687229>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/images/alt-text-with-right-to-left-inline-direction-reordering.html

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced): Enable bidi reordering.

LayoutTests:

  • fast/images/alt-text-with-right-to-left-inline-direction-reordering-expected-mismatch.html: Added.
  • fast/images/alt-text-with-right-to-left-inline-direction-reordering.html: Added.
9:07 AM Changeset in webkit [290733] by youenn@apple.com
  • 11 edits in trunk/Source

Rename MediaSampleAVFObjC::createImageSample to MediaSampleAVFObjC::createFromPixelBuffer
https://bugs.webkit.org/show_bug.cgi?id=237354

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior, this is a renaming.

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::toMediaSample):

  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:

(WebCore::MediaSampleAVFObjC::createFromPixelBuffer):
(WebCore::MediaSampleAVFObjC::createImageSample): Deleted.

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

(WebCore::MediaSampleAVFObjC::createFromPixelBuffer):
(WebCore::MediaSampleAVFObjC::createImageSample): Deleted.

  • platform/graphics/cocoa/GraphicsContextGLCocoa.mm:

(WebCore::GraphicsContextGLCocoa::paintCompositedResultsToMediaSample):

  • platform/mediastream/RealtimeVideoSource.cpp:

(WebCore::RealtimeVideoSource::adaptVideoSample):

Source/WebKit:

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::SourceProxy::rotateVideoFrameIfNeeded):

  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:

(WebKit::SharedVideoFrameReader::read):

  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::RemoteVideo::videoSampleAvailable):

8:59 AM Changeset in webkit [290732] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebKit

IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to compile
https://bugs.webkit.org/show_bug.cgi?id=237195

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-02
Reviewed by Antti Koivisto.
Reland after revert:
Add missing includes to JSC inlines, needed for ASAN build. Compile
failure was hidden my unified build.

IPC testing API needs convert message data buffer, IPC::Decoder, to
JSValue. This is a run-time operation.
IPC message decoding is based on templates, a compile time operation.
IPC generator generates MessageArgumentDescriptions.cpp with
a big switch. The switch has a case for each message name. The case would
call templated jsValueForDecodedArguments<Arguments>, where the Arguments
is the type tuple for the message arguments.

The above would mean that MessageArgumentDescriptions would need to
include all the headers for all the messages in WebKit in order
to populate the Arguments tuple for particular message.
This would cause MessageArgumentDescriptions to be slow to compile because
it would need all the headers in Source/WebKit related to message parameter types.

This would show up as slow compiles that would consume much memory (5-6gb) and do a
lot of work.

It would also have to compile the MessageArgumentDescriptions each time
any of the headers were touched.

Change this so that the big switch calls a declared but not defined
template jsValueForDecodedMessage<MessageName> for each MessageName case in the
switch.

Instantiate the template for each message in the *MessageReceiver.cpp file
that each message receiver has. This file already has to include all the
headers used for that particular message receiver. These files are small and compile
fast.

After this change MessageArgumentDescriptions.cpp only includes the message
definition headers, does not use much more than the standard 1gb+ of memory
while compiling and is relatively fast to compile. Also if any of the dependent
headers are touched, only the corresponding small *MessageReceiver.cpp files are compiled.

This change is needed for further improve the JS testing API implementation.
Adding new operations that employ the same strategy, eg. switch and a complex
template instantiation, would possibly just make the matter worse. New operations
that are needed are message sends, which use templates similarly to the message
decode case that is implement here.

This change regenerates the checked-in test content that can be used to review
what kind of changes the real MessageArgumentDescriptions.cpp and MessageReceiver.cpps
get.

  • Platform/IPC/JSIPCBinding.h:
  • Scripts/webkit/messages.py:

(generate_message_handler):
(generate_js_value_conversion_function):
(generate_message_argument_description_implementation):

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::jsValueForReplyArguments):

  • Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_SendCVPixelBuffer>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_ReceiveCVPixelBuffer>):

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithIfMessage_LoadURL>):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_SendImageData>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_ReceiveImageData>):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_ExperimentalOperation>):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_SendSemaphore>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_ReceiveSemaphore>):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStreamBuffer_SendStreamBuffer>):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendString>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendStringSynchronized>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_ReceiveMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendAndReceiveMachSendRight>):

  • Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSynchronousMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSynchronousMessage>):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_ExperimentalOperation>):

8:45 AM Changeset in webkit [290731] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[iOS][WP] Stop generating certain sandbox violation reports
https://bugs.webkit.org/show_bug.cgi?id=237364

Reviewed by Chris Dumez.

Stop generating certain common sandbox violation reports in the WebContent process on iOS, since that
can improve performance. We will still get telemetry for these violations.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
7:27 AM Changeset in webkit [290730] by graouts@webkit.org
  • 15 edits in trunk

[web-animations] changes to font-size should recompute keyframes
https://bugs.webkit.org/show_bug.cgi?id=237357

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-animations/responsive/column-width-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-expected.txt:
  • web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-context-filling-expected.txt:
  • web-platform-tests/web-animations/responsive/fontSize-expected.txt:
  • web-platform-tests/web-animations/responsive/perspective-expected.txt:
  • web-platform-tests/web-animations/responsive/textIndent-expected.txt:
  • web-platform-tests/web-animations/responsive/to-style-change-expected.txt:

Source/WebCore:

When we compute keyframes, it's possible that some values are specified using "em" units
and thus dependent on the current value for font-size. If the font-size changes over time,
we must recompute keyframes to ensure that any such value is updated.

To ensure that we correctly determine when the font-size changed, we pass a pointer to the
style seen when we last udpated animations so that we only consider a change in font-size
provided we've ever resolved animations.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::propertyAffectingKeyframeResolutionDidChange):
(WebCore::KeyframeEffect::propertyAffectingLogicalPropertiesDidChange): Deleted.

  • animation/KeyframeEffect.h:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::applyKeyframeEffects):

  • animation/KeyframeEffectStack.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

  • style/Styleable.h:

(WebCore::Styleable::applyKeyframeEffects const):

7:23 AM Changeset in webkit [290729] by Oriol Brufau
  • 6 edits in trunk

[css-cascade] Support 'revert-layer' in @keyframes
https://bugs.webkit.org/show_bug.cgi?id=237152

Reviewed by Antti Koivisto.

Source/WebCore:

In @keyframes, 'revert-layer' should roll back the cascaded value to
author origin. Resolver::styleForKeyframe already has the base style of
the element, so we only need to avoid applying properties with the
'revert-layer' value.

Test: imported/w3c/web-platform-tests/css/css-cascade/revert-layer-010.html.html

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyProperty):

  • style/StyleBuilderState.h:

(WebCore::Style::BuilderState::setIsBuildingKeyframeStyle):

  • style/StyleResolver.cpp:

(WebCore::Style::Resolver::styleForKeyframe):

LayoutTests:

Expect test to pass.

7:06 AM Changeset in webkit [290728] by commit-queue@webkit.org
  • 15 edits in trunk/Source

[GTK] setDragImage ignores offset
https://bugs.webkit.org/show_bug.cgi?id=237292

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-03-02
Reviewed by Carlos Garcia Campos.

Source/WebCore:

To fix this, I need DataTransfer to expose its dragLocation, which is the offset passed to
setDragImage.

  • dom/DataTransfer.h:

(WebCore::DataTransfer::dragLocation const):

Source/WebKit:

Plumb the offset from the last place we have access to a DataTransfer object down to
DragSource, where it's ultimately used. This allows web content to properly position the
drag image under the mouse cursor.

  • UIProcess/API/gtk/DragSource.h:
  • UIProcess/API/gtk/DragSourceGtk3.cpp:

(WebKit::DragSource::begin):

  • UIProcess/API/gtk/DragSourceGtk4.cpp:

(WebKit::DragSource::begin):

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::startDrag):

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseStartDrag):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startDrag):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::WebDragClient::startDrag):

7:03 AM Changeset in webkit [290727] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Build failure with libstdc++ (>= 6) when cross-compiling (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697
<rdar://problem/89613152>

Reviewed by Carlos Garcia Campos.

  • Source/cmake/WebKitCompilerFlags.cmake: Go through CMake instead of the plain "env"

program for the sake of portability.

6:49 AM Changeset in webkit [290726] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RTL] Incorrect alt text position in right to left context
https://bugs.webkit.org/show_bug.cgi?id=237352
<rdar://problem/89657704>

Reviewed by Simon Fraser.

Source/WebCore:

Take the inline direction into account when computing the alt text location.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced): This is mostly moving things around/modernizing it.

LayoutTests:

  • fast/images/alt-text-with-right-to-left-inline-direction-expected-mismatch.html: Added.
  • fast/images/alt-text-with-right-to-left-inline-direction.html: Added.
5:49 AM Changeset in webkit [290725] by youenn@apple.com
  • 2 edits in trunk/Source/WebKit

Annotate LibWebRTC with thread safety macros
https://bugs.webkit.org/show_bug.cgi?id=237321
<rdar://problem/89625577>

Unreviewed, addressing post commit style change.
No change of behavior.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
12:50 AM Changeset in webkit [290724] by Carlos Garcia Campos
  • 6 edits in trunk

REGRESSION(r216096): [GTK] Test accessibility/gtk/menu-list-unfocused-notifications.html is failing since r216096
https://bugs.webkit.org/show_bug.cgi?id=171598

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Enable accessibility when a WTR observer is added.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::addNotificationObserver):

LayoutTests:

Since r216096 the notification for menu list changes is deffered, so we need to wait one run loop cycle to get
the notifications. Also update the test to ignore notifications that are not interesting like AXLoadComplete and
AXElementBusyChanged, and update expectations for the new behavior with ATSPI where the notification is emitted
on the menu and not the combo.

  • accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
  • accessibility/gtk/menu-list-unfocused-notifications.html:
  • platform/gtk/TestExpectations:
12:49 AM Changeset in webkit [290723] by Carlos Garcia Campos
  • 3 edits in trunk/LayoutTests

[ATSPI] Test accessibility/select-element-at-index.html is failing
https://bugs.webkit.org/show_bug.cgi?id=237315

Reviewed by Adrian Perez de Castro.

This is because the test contains platform specific behavior for ATK that was migrated to ATSPI by mistake. We
should behave like all other ports now.

  • accessibility/select-element-at-index.html:
  • platform/glib/TestExpectations:
12:09 AM Changeset in webkit [290722] by commit-queue@webkit.org
  • 31 edits
    7 copies
    3 adds in trunk

Add SPI _WKDataTask
https://bugs.webkit.org/show_bug.cgi?id=237234

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-02
Reviewed by Tim Horton.

Source/WebKit:

When I added WKWebView._requestResource:completionHandler: I overlooked a few things.
First, it is unable to support HTTPS because I didn't hook up authentication challenge handling to it.
Second, it is unable to have a maximum accepted response length, which is a requirement for an adopter.
To make these possible, I made _WKDataTask which is related to WKDownload and NSURLSessionDataTask.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::dataTaskWithRequest):
(WebKit::NetworkProcess::cancelDataTask):
(WebKit::NetworkProcess::requestResource): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::dataTaskWithRequest):
(WebKit::NetworkSession::cancelDataTask):
(WebKit::NetworkSession::requestResource): Deleted.

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::dataTaskWithRequest):
(WebKit::NetworkSessionCocoa::cancelDataTask):
(WebKit::NetworkSessionCocoa::removeDataTask):
(WebKit::NetworkSessionCocoa::requestResource): Deleted.

  • NetworkProcess/cocoa/WKURLSessionTaskDelegate.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • NetworkProcess/cocoa/WKURLSessionTaskDelegate.mm: Added.

(-[WKURLSessionTaskDelegate initWithIdentifier:session:]):
(-[WKURLSessionTaskDelegate connection]):
(-[WKURLSessionTaskDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(-[WKURLSessionTaskDelegate URLSession:dataTask:didReceiveData:]):
(-[WKURLSessionTaskDelegate URLSession:task:didCompleteWithError:]):

  • Scripts/webkit/messages.py:

(types_that_cannot_be_forward_declared):

  • Shared/API/APIObject.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h:
  • Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.mm:

(WebKit::fromAuthenticationChallengeDisposition):

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/DataTaskIdentifier.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIDataTask.cpp: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTask::setClient):
(API::DataTask::cancel):
(API::DataTask::DataTask):

  • UIProcess/API/APIDataTask.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTask::create):
(API::DataTask::page):
(API::DataTask::client const):

  • UIProcess/API/APIDataTaskClient.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.

(API::DataTaskClient::create):
(API::DataTaskClient::~DataTaskClient):
(API::DataTaskClient::didReceiveChallenge const):
(API::DataTaskClient::willPerformHTTPRedirection const):
(API::DataTaskClient::didReceiveResponse const):
(API::DataTaskClient::didReceiveData const):
(API::DataTaskClient::didCompleteWithError const):

  • UIProcess/API/APIInspectorExtensionClient.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _dataTaskWithRequest:completionHandler:]):
(-[WKWebView _requestResource:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDataTask.h: Copied from Source/WebKit/UIProcess/API/APIInspectorExtensionClient.h.
  • UIProcess/API/Cocoa/_WKDataTask.mm: Added.

(-[_WKDataTask cancel]):
(-[_WKDataTask webView]):
(-[_WKDataTask delegate]):
(-[_WKDataTask setDelegate:]):
(-[_WKDataTask dealloc]):
(-[_WKDataTask _apiObject]):

  • UIProcess/API/Cocoa/_WKDataTaskDelegate.h: Added.
  • UIProcess/API/Cocoa/_WKDataTaskInternal.h: Copied from Source/WebKit/Shared/Authentication/cocoa/AuthenticationChallengeDispositionCocoa.h.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::dataTaskWithRequest):
(WebKit::NetworkProcessProxy::dataTaskReceivedChallenge):
(WebKit::NetworkProcessProxy::dataTaskWillPerformHTTPRedirection):
(WebKit::NetworkProcessProxy::dataTaskDidReceiveResponse):
(WebKit::NetworkProcessProxy::dataTaskDidReceiveData):
(WebKit::NetworkProcessProxy::dataTaskDidCompleteWithError):
(WebKit::NetworkProcessProxy::requestResource): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/NetworkProcessProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dataTaskWithRequest):
(WebKit::WebPageProxy::requestResource): Deleted.

  • UIProcess/WebPageProxy.h:
  • WebKit.xcodeproj/project.pbxproj:

Source/WTF:

  • wtf/PlatformHave.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/NetworkProcess.mm:

(-[TestDataTaskDelegate dataTask:didReceiveAuthenticationChallenge:completionHandler:]):
(-[TestDataTaskDelegate dataTask:didReceiveResponse:decisionHandler:]):
(-[TestDataTaskDelegate dataTask:didReceiveData:]):
(-[TestDataTaskDelegate dataTask:didCompleteWithError:]):
(TEST):

Mar 1, 2022:

11:08 PM Changeset in webkit [290721] by youenn@apple.com
  • 17 edits in trunk/Source

Remove RemoteVideoSample support from ImageTransferSessionVT
https://bugs.webkit.org/show_bug.cgi?id=237318

Reviewed by Eric Carlson.

Source/WebCore:

No change of behavior.

  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/graphics/cv/ImageTransferSessionVT.mm:
  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeVideoCaptureSource.cpp:

Source/WebKit:

Remove no longer needed forward declaration or include of RemoteVideoSample.
Remove ImageTransferSessionVT::createMediaSample(RemoteVideoSample&&) and replace it with direct use of MediaSampleAVFObjC.

No change of behavior.

  • GPUProcess/webrtc/RemoteMediaRecorder.cpp:
  • GPUProcess/webrtc/RemoteMediaRecorder.h:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.cpp:
  • GPUProcess/webrtc/RemoteSampleBufferDisplayLayer.h:
  • WebProcess/GPU/webrtc/MediaRecorderPrivate.cpp:
  • WebProcess/GPU/webrtc/SampleBufferDisplayLayer.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:
  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteRealtimeAudioSource.h:
  • WebProcess/cocoa/RemoteRealtimeMediaSourceProxy.h:
  • WebProcess/cocoa/UserMediaCaptureManager.h:
10:42 PM Changeset in webkit [290720] by Devin Rousso
  • 13 edits
    2 adds in trunk

Web Inspector: add a switch to control whether breakpoint evaluations (condition, ignore count, actions) are also affected by script blackboxing
https://bugs.webkit.org/show_bug.cgi?id=235274

Reviewed by Patrick Angle.

Source/JavaScriptCore:

Being able to defer breakpoint evaluations until the next actual pause can sometimes be far
more useful than doing the breakpoint evaluations at the breakpoint's original location.

As an example, configuring the All Events breakpoint with a console.trace() action and
auto-continue enabled would not provide much useful information without also blackboxing
breakpoint evaluations as the original pause location of the All Events breakpoint is on the
first line of the event handler, meaning that if the script containing the event handler is
blackboxed then the console.trace() would still only show that location even though the
Sources Tab would show the first line of code outside of that script (due to the blackbox).
Being able to also blackbox breakpoint evaluations would instead cause the console.trace()
action to have the same output as the Sources Tab, since it's evaluation would be deferred
until execution actually paused, which is further inside the event handler.

  • debugger/Debugger.cpp:

(JSC::Debugger::Debugger):
(JSC::Debugger::didHitBreakpoint):
(JSC::Debugger::evaluateBreakpointCondition):
(JSC::Debugger::continueProgram):
(JSC::Debugger::pauseIfNeeded):
(JSC::Debugger::didExecuteProgram):
(JSC::Debugger::setBlackboxBreakpointEvaluations): Added.
Keep track of every Breakpoint wants to pause but is deferred due to blackboxing.
Depending on whether breakpoint evaluations are also blackboxed (based on the flag set via
the piping code/logic below), check if the script attempting to be paused in is blackboxed
before or after handling breakpoint evaluations.
Side effects of this change are:

  • breakpoint conditions are now evaluated right before that breakpoint's actions, instead of evaluating all breakpoint conditions before all breakpoint actions
  • if breakpoint evaluations are blackboxed, more than two breakpoints can now be evaluated

during a single pause attempt depending on how may deferrals (with breakpoints) happened

  • debugger/Debugger.h:

(JSC::Debugger::Observer::didDeferBreakpointPause): Added.
Add a way to notify InspectorDebuggerAgent of deferred breakpoint pauses so that the
correct originalReason will be used after a deferred pause.

  • inspector/protocol/Debugger.json:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::setBlackboxBreakpointEvaluations): Added.
(Inspector::InspectorDebuggerAgent::didDeferBreakpointPause): Added.
Add a setBlackboxBreakpointEvaluations command that passes directly to Debugger.

Source/WebInspectorUI:

Being able to defer breakpoint evaluations until the next actual pause can sometimes be far
more useful than doing the breakpoint evaluations at the breakpoint's original location.

As an example, configuring the All Events breakpoint with a console.trace() action and
auto-continue enabled would not provide much useful information without also blackboxing
breakpoint evaluations as the original pause location of the All Events breakpoint is on the
first line of the event handler, meaning that if the script containing the event handler is
blackboxed then the console.trace() would still only show that location even though the
Sources Tab would show the first line of code outside of that script (due to the blackbox).
Being able to also blackbox breakpoint evaluations would instead cause the console.trace()
action to have the same output as the Sources Tab, since it's evaluation would be deferred
until execution actually paused, which is further inside the event handler

  • UserInterface/Base/Setting.js:
  • UserInterface/Controllers/DebuggerManager.js:

(WI.DebuggerManager.supportsBlackboxingBreakpointEvaluations): Added.
(WI.DebuggerManager.prototype.async initializeTarget):
(WI.DebuggerManager.prototype._setBlackboxBreakpointEvaluations): Added.
(WI.DebuggerManager.prototype._handleBlackboxBreakpointEvaluationsChange): Added.
Create a global WI.Setting for this feature and handle changes from the code below.

  • UserInterface/Views/BlackboxSettingsView.js:

(WI.BlackboxSettingsView.prototype.initialLayout):

  • UserInterface/Views/BlackboxSettingsView.css:

(.settings-view.blackbox > p > label): Added.
(.settings-view.blackbox > p > label > input): Added.
(.settings-view.blackbox > p > label > span): Added.
Add a checkbox and explanation of this new feature in the Blackbox pane of the Settings Tab.

  • Localizations/en.lproj/localizedStrings.js:

LayoutTests:

  • inspector/debugger/setBlackboxBreakpointEvaluations.html: Added.
  • inspector/debugger/setBlackboxBreakpointEvaluations-expected.txt: Added.
10:05 PM Changeset in webkit [290719] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/bmalloc

[libpas] Add missing PlayStation implementation.
https://bugs.webkit.org/show_bug.cgi?id=237341

Reviewed by Yusuke Suzuki.

  • libpas/src/libpas/pas_monotonic_time.c:

(pas_get_current_monotonic_time_nanoseconds):

10:03 PM Changeset in webkit [290718] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

Fix deprecations for ERB.new in GenerateSettings.rb
https://bugs.webkit.org/show_bug.cgi?id=237237

Reviewed by Don Olmstead.

Ruby 3.1.0 reported the following warning:

GenerateSettings.rb:283: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
GenerateSettings.rb:283: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

r290104 and r290331 fixed the same problem for
GeneratePreferences.rb, but forgot GenerateSettings.rb.

  • Scripts/GenerateSettings.rb: Use the keyword argument for ERB.new for Ruby 2.6+.
7:42 PM Changeset in webkit [290717] by sbarati@apple.com
  • 12 edits in trunk/Source/JavaScriptCore

Add a DeferTraps scope
https://bugs.webkit.org/show_bug.cgi?id=237306
<rdar://83494949>

Reviewed by Mark Lam.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::noticeIncomingCall):

  • bytecode/CodeBlock.h:
  • bytecode/RepatchInlines.h:

(JSC::linkFor):
(JSC::virtualForWithFunction):

  • dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeModuleProgram):

  • interpreter/InterpreterInlines.h:

(JSC::Interpreter::execute):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::installCode):

  • runtime/VMTraps.cpp:

(JSC::VMTraps::handleTraps):
(JSC::VMTraps::takeTopPriorityTrap):

  • runtime/VMTraps.h:

(JSC::VMTraps::needHandling const):
(JSC::VMTraps::hasTrapBit):
(JSC::VMTraps::setTrapBit):

  • runtime/VMTrapsInlines.h:

(JSC::DeferTraps::DeferTraps):
(JSC::DeferTraps::~DeferTraps):

6:11 PM Changeset in webkit [290716] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS ] pointerevents/mouse/* 10 pointer event tests are constant timeouts or failures on iOS.
https://bugs.webkit.org/show_bug.cgi?id=237348

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/ios-wk2/TestExpectations:
6:03 PM Changeset in webkit [290715] by Andres Gonzalez
  • 2 edits in trunk/Source/WebCore

Unnecessary copy of Vector of children IDs in AXIsolatedTree::updateChildren.
https://bugs.webkit.org/show_bug.cgi?id=237338
<rdar://problem/89633856>

Reviewed by Chris Fleizach.

Changed the copy of this Vector to a move.

  • accessibility/isolatedtree/AXIsolatedTree.cpp:

(WebCore::AXIsolatedTree::updateChildren):

5:53 PM Changeset in webkit [290714] by Robert Jenner
  • 13 edits in trunk/Source/WebKit

Unreviewed, reverting r290588.

Patch r290588 caused ASAN build to fail on macOS

Reverted changeset:

"IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to
compile"
https://bugs.webkit.org/show_bug.cgi?id=237195
https://commits.webkit.org/r290588

5:42 PM Changeset in webkit [290713] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

Fix clean build

  • UnifiedSources-output.xcfilelist:
5:07 PM Changeset in webkit [290712] by Wenson Hsieh
  • 8 edits in trunk

Clipboard Paste dialog doesn't show on external monitors
https://bugs.webkit.org/show_bug.cgi?id=236395
rdar://88943577

Reviewed by Tim Horton.

Source/WebKit:

Fix the bug by aligning the way we generate synthetic mouse click NSEvents in WebKit2 macOS, when:

  1. Showing the standard web content context menu
  2. Showing the DOM paste menu
  3. Showing the context menu for PDFs

Critically, this makes AppKit choose the correct NSScreen when presenting the popup menu when showing the DOM
paste menu, if the last mouse down event is nil upon presenting the menu.

Covered by adding a debug assertion to verify that we aren't trying to present popup menus from a nil event
during DOM paste.

  • UIProcess/API/mac/WKWebViewTestingMac.mm:

(-[WKWebView _activeMenu]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::requestDOMPasteAccess):

  • UIProcess/WebPageProxy.h:
  • UIProcess/mac/WebContextMenuProxyMac.mm:

(WebKit::WebContextMenuProxyMac::showContextMenuWithItems):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::showPDFContextMenu):
(WebKit::WebPageProxy::activeContextMenu const):

Renamed from platformActiveContextMenu. The "platform" prefix in front of this method was unnecessary, since
this is only invoked from macOS-only code that expects an NSMenu anyways.

(WebKit::WebPageProxy::createSyntheticEventForContextMenu const):

Add a helper method to create a synthetic NSEvent at the given location that's suitable for presenting a context
menu; use this new helper in the three places described above.

(WebKit::WebPageProxy::platformActiveContextMenu const): Deleted.

Tools:

Adjust the swizzled implementation of -popUpContextMenu:withEvent:forView: to additionally verify that the
NSEvent we're presenting the menu with isn't nil.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::swizzledPopUpContextMenu):

4:41 PM Changeset in webkit [290711] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations: r290542 fixed a number of crashing tests.
4:29 PM Changeset in webkit [290710] by jonlee@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations:
  • platform/ios/TestExpectations: r290438 fixed a test failure.
4:27 PM Changeset in webkit [290709] by Alan Coon
  • 1 edit in branches/safari-613-branch/Source/WTF/Scripts/Preferences/WebPreferences.yaml

Apply patch. rdar://problem/89126114

4:27 PM Changeset in webkit [290708] by Alan Coon
  • 14 edits
    2 deletes in branches/safari-613-branch

Revert r289282. rdar://problem/88876661

4:20 PM Changeset in webkit [290707] by jonlee@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.

  • gpu-process/TestExpectations: r290542 fixed a number of crashing tests.
3:59 PM Changeset in webkit [290706] by Alan Bujtas
  • 3 edits
    2 adds in trunk

REGRESSION(r285232) https://alvaromontoro.github.io/almond.css/demo/ looks wrong in Safari, ok in Chrome and Firefox
https://bugs.webkit.org/show_bug.cgi?id=237276
<rdar://problem/89566459>

Reviewed by Simon Fraser.

Source/WebCore:

r285232 introduced the isFixed() check as a resolvable preferred width type, but percent values are also resolvable as
block layout gets the horizontal constraint from the containing block chain (unlike the height percent values) -i.e. 'width: 50%' can be resolved during preferred width computation.

Test: fast/css-grid-layout/ascpect-ratio-with-percent-width.html

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const):

LayoutTests:

  • fast/css-grid-layout/ascpect-ratio-with-percent-width-expected.html: Added.
  • fast/css-grid-layout/ascpect-ratio-with-percent-width.html: Added.
3:51 PM Changeset in webkit [290705] by Fujii Hironori
  • 12 edits in trunk

WTF::SentinelLinkedList::iterator should have operator++ for range-for loop
https://bugs.webkit.org/show_bug.cgi?id=237265

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

SentinelLinkedList::iterator isn't a pointer of node now, it
should be deferenced before comparing with a pointer.

  • bytecode/Watchpoint.cpp:

(JSC::WatchpointSet::fireAllWatchpoints):

  • heap/HandleSet.cpp:

(JSC::HandleSet::visitStrongHandles):
(JSC::HandleSet::protectedGlobalObjectCount):

  • heap/HandleSet.h:

(JSC::HandleSet::forEachStrongHandle):

  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::tryAllocateFromLowerTier):

  • heap/SubspaceInlines.h:

(JSC::Subspace::forEachPreciseAllocation):

  • jsc.cpp:

(Workers::broadcast):

Source/WTF:

SentinelLinkedList had three problems.

  1. Even though it has begin() and end(), using SentinelLinkedList with range-for loop resulted in a broken node because iterator::operator++ didn't work as expected.
  2. If I used a SentinelLinkedList in a movable type, the sentinel pointer gets stale after moving the object. move-ctor should be deleted.
  3. It didn't have const_iterator.
  • wtf/OrderMaker.h:

(WTF::OrderMaker::iterator::iterator):
(WTF::OrderMaker::iterator::operator*):
(WTF::OrderMaker::iterator::operator++):
(WTF::OrderMaker::iterator::operator== const):

  • wtf/SentinelLinkedList.h:

(WTF::BasicRawSentinelNode::prev const):
(WTF::BasicRawSentinelNode::next const):
(WTF::SentinelLinkedList::BaseIterator::BaseIterator):
(WTF::SentinelLinkedList::BaseIterator::operator* const):
(WTF::SentinelLinkedList::BaseIterator::operator-> const):
(WTF::SentinelLinkedList::BaseIterator::operator++):
(WTF::SentinelLinkedList::BaseIterator::operator--):
(WTF::SentinelLinkedList::BaseIterator::operator== const):
(WTF::SentinelLinkedList::BaseIterator::operator!= const):
(WTF::SentinelLinkedList::forEach):
(WTF::RawNode>::begin):
(WTF::RawNode>::end):
(WTF::RawNode>::begin const):
(WTF::RawNode>::end const):
(WTF::BasicRawSentinelNode::prev): Deleted.
(WTF::BasicRawSentinelNode::next): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/SentinelLinkedList.cpp:

(TestWebKitAPI::TEST):

3:50 PM Changeset in webkit [290704] by Alan Coon
  • 4 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290087. rdar://problem/88713302

Source/ThirdParty/ANGLE:
Metal ANGLE: vertex array does not correctly observe contents of data buffers
https://bugs.webkit.org/show_bug.cgi?id=236733
<rdar://problem/88713302>
<rdar://problem/88499073>

Patch by Kyle Piddington <Kyle Piddington> on 2022-02-17
Reviewed by Dean Jackson.

Similar to previous bug (236427), we were not correctly observing changes to the
vertex buffer data. This caused us to miss rebinding vertex buffers
when data was updated without causing conversion

  • src/libANGLE/renderer/metal/VertexArrayMtl.h:
  • src/libANGLE/renderer/metal/VertexArrayMtl.mm: (rx::VertexArrayMtl::syncState): (rx::VertexArrayMtl::setupDraw): (rx::VertexArrayMtl::syncDirtyAttrib):

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

3:50 PM Changeset in webkit [290703] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Apply patch. rdar://problem/87136345

3:50 PM Changeset in webkit [290702] by Alan Coon
  • 6 edits in branches/safari-613-branch

Apply patch. rdar://problem/89009881

3:50 PM Changeset in webkit [290701] by Alan Coon
  • 8 edits
    2 adds in branches/safari-613-branch

Cherry-pick r290512. rdar://problem/86582214

[Tables] Incorrect table sizing when colgroup comes after tbody
https://bugs.webkit.org/show_bug.cgi?id=237205
<rdar://86582214>

Reviewed by Antti Koivisto.

Source/WebCore:

Let's use the colgroup for table sizing even when it comes after any thead, tbody, tfoot, and tr elements.
This makes WebKit match other rendering engines (see https://src.chromium.org/viewvc/blink?revision=159442&view=revision)

Test: fast/table/table-sizing-fails-when-colgroup-comes-after-content.html

  • rendering/RenderTable.cpp: (WebCore::RenderTable::firstColumn const):
  • rendering/RenderTableCol.cpp: (WebCore::RenderTableCol::nextColumn const):

LayoutTests:

  • fast/table/table-sizing-fails-when-colgroup-comes-after-content-expected.html: Added.
  • fast/table/table-sizing-fails-when-colgroup-comes-after-content.html: Added.
  • platform/mac/tables/mozilla_expected_failures/dom/appendCol1-expected.txt: Progression.
  • platform/mac/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt: Progression.

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

3:49 PM Changeset in webkit [290700] by Alan Coon
  • 3 edits
    6 adds in branches/safari-613-branch

Cherry-pick r290156. rdar://problem/89154452

ServiceWorkerGlobalScope+PushAPI requires PushAPIEnabled
https://bugs.webkit.org/show_bug.cgi?id=236846

Patch by Sam Sneddon <Sam Sneddon> on 2022-02-18
Reviewed by Chris Dumez.

Source/WebCore:

Tests: http/wpt/push-api/onpush-disabled.html

http/wpt/push-api/onpush-enabled.html

  • Modules/push-api/ServiceWorkerGlobalScope+PushAPI.idl:

LayoutTests:

  • http/wpt/push-api/onpush-disabled-expected.txt: Added.
  • http/wpt/push-api/onpush-disabled.html: Added.
  • http/wpt/push-api/onpush-disabled.js: Added. (test):
  • http/wpt/push-api/onpush-enabled-expected.txt: Added.
  • http/wpt/push-api/onpush-enabled.html: Added.
  • http/wpt/push-api/onpush-enabled.js: Added. (test):

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

3:49 PM Changeset in webkit [290699] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290152. rdar://problem/88327814

Keep promise in scope when calling DeferredPromise::reject
https://bugs.webkit.org/show_bug.cgi?id=236454

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-18
Reviewed by Darin Adler.

Keep promise in scope when calling DeferredPromise::reject, as createDOMException
could go through a path that invokes GC on its owner and the promise.

  • Modules/fetch/FetchBodyConsumer.cpp: (WebCore::FetchBodyConsumer::resolveWithFormData):

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

3:49 PM Changeset in webkit [290698] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290109. rdar://problem/89072235

Crash under ScrollingCoordinatorMac::hasNodeWithAnimatedScrollChanged()
https://bugs.webkit.org/show_bug.cgi?id=236810
<rdar://89072235>

Reviewed by Dean Jackson.

Crash data suggests that r288933 didn't fix the crash entirely.

Although the code paths I can find appear to hold the lock, there may be an
opportunity for m_scrollingCoordinator to get nulled out after we null-check it
but before the copy for the main thread dispatch.

So make a RefPtr on the stack, null-check it, and then move it into the callback.

  • page/scrolling/ThreadedScrollingTree.cpp: (WebCore::ThreadedScrollingTree::reportSynchronousScrollingReasonsChanged): (WebCore::ThreadedScrollingTree::reportExposedUnfilledArea): (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): (WebCore::ThreadedScrollingTree::handleWheelEventPhase): (WebCore::ThreadedScrollingTree::setActiveScrollSnapIndices): (WebCore::ThreadedScrollingTree::hasNodeWithAnimatedScrollChanged):

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

3:49 PM Changeset in webkit [290697] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r290066. rdar://problem/89072361

[macOS][WP] Add required syscall to sandbox
https://bugs.webkit.org/show_bug.cgi?id=236781
<rdar://89072361>

Reviewed by Chris Dumez.

Add required syscall to the WebContent process' sandbox on macOS. This patch also adds back a set of
syscalls that were removed in https://commits.webkit.org/r286778 for current and previous versions
of macOS. These syscalls will be denied going forward.

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

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

3:49 PM Changeset in webkit [290696] by Alan Coon
  • 3 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r290054. rdar://problem/89093315

[macOS] Light appearance text fields are invisible in Increased Contrast mode
https://bugs.webkit.org/show_bug.cgi?id=236753
rdar://89093315

Reviewed by Wenson Hsieh.

In Big Sur, the artwork for many form controls, including text fields, was
changed at the system level. When painting native text fields, WebKit has
long used the "borders only" option to support painting custom background
colors. System-level changes in Big Sur broke the behavior of light appearance
"borders only" text fields in Increased Contrast mode.

Until the artwork is updated at the system-level, work around the issue
in WebKit by painting our own borders for text fields under the necessary
conditions.

No new tests, as tests that change system preferences are often unreliable,
and we do not have existing hooks to toggle Increased Contrast mode.

  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::shouldPaintCustomTextField const): (WebCore::RenderThemeMac::paintTextField):

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

3:49 PM Changeset in webkit [290695] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/ThirdParty/ANGLE

Cherry-pick r290011. rdar://problem/89024095

REGRESSION (iOS 15.4b3): Catastrophic (20x) performance regression in texImage2D from mp4 video
https://bugs.webkit.org/show_bug.cgi?id=236699

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-17
Reviewed by Darin Adler.

Disable the validation for IOSurface pixel formats.
We might pass non-public formats that do not have sensible IOSurfaceGetBytesPerElementOfPlane
to verify with this logic.

Will add test in bug 236759.

Previous bugs of the same:
EAGL:
Textures Fail to Render in WebGL from HLS Stream on iPhone 12 [iOS 14.2]
bug 218637, r273582, 234632@main
CGL:
REGRESSION(Safari 15, BigSur): Poor video texture upload performance with MacBook M1, ANGLE OpenGL backend
bug 232235, r286960, 245183@main

  • src/libANGLE/renderer/metal/IOSurfaceSurfaceMtl.mm: (rx::IOSurfaceSurfaceMtl::ValidateAttributes):

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

3:49 PM Changeset in webkit [290694] by Alan Coon
  • 18 edits in branches/safari-613-branch/Source

Cherry-pick r290005. rdar://problem/87596724

CrashTracer: com.apple.WebKit.WebContent at JavaScriptCore: bmalloc_allocate_impl_impl_slow
https://bugs.webkit.org/show_bug.cgi?id=236695
rdar://87596724

Reviewed by Jer Noble.

Source/WebCore:

When a new FragmentedSharedBuffer is received from the network process, it is proactively coalesced
into a SharedBuffer during each call to CachedResource::updateBuffer(). This causes a large number
of re-allocations and copies; essentially re-allocating each time the resource's buffer receives
one more chunk of data.
Instead we only flatten the data buffer once all data have been received.

Running speedtest.net with a gigabit link, we see a reduction of peak
memory use in the content process by about 40% (from 740MB to under 440MB of
physical memory, 1.7GB of memory allocation vs 535MB)

Covered by existing tests.

  • editing/ios/EditorIOS.mm: (WebCore::Editor::writeImageToPasteboard):
  • editing/mac/EditorMac.mm: (WebCore::Editor::writeImageToPasteboard):
  • loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didFinishLoading):
  • loader/cache/CachedApplicationManifest.cpp: (WebCore::CachedApplicationManifest::finishLoading):
  • loader/cache/CachedCSSStyleSheet.cpp: (WebCore::CachedCSSStyleSheet::finishLoading):
  • loader/cache/CachedFont.cpp: (WebCore::CachedFont::ensureCustomFontData):
  • loader/cache/CachedImage.cpp: (WebCore::CachedImage::updateImageData):
  • loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::calculateIncrementalDataChunk const): (WebCore::CachedRawResource::updateBuffer): (WebCore::CachedRawResource::finishLoading):
  • loader/cache/CachedRawResource.h:
  • loader/cache/CachedResource.h: (WebCore::CachedResource::resourceBuffer const):
  • loader/cache/CachedScript.cpp: (WebCore::CachedScript::script):
  • loader/cache/CachedXSLStyleSheet.cpp: (WebCore::CachedXSLStyleSheet::finishLoading):

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading): Fly-by fix, the IPC::DataReference would reference a SharedBuffer going out of scope before it was sent over IPC.

Source/WebKitLegacy/mac:

  • WebView/WebHTMLView.mm: (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):

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

3:49 PM Changeset in webkit [290693] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289995. rdar://problem/87462825

REGRESSION(r285885) Unable to exit Trip Details in Amtrak app
https://bugs.webkit.org/show_bug.cgi?id=236732
<rdar://87462825>

Reviewed by Simon Fraser.

Source/WebCore:

Starting from r285885 an (effective)”overflow: clip” value is set on any block box with “contain: paint”.
It is supposed to ensure we don’t paint outside of the box’s border box (note that "contain: paint", as the name implies, should only affect painting).

However this effective value trickles in to layout affecting certain layout constraints.
In case of flex, it makes the flex layout think that the box is really a clipped box and it starts flexing it accordingly producing incorrect size.
What it means is that the minimum preferred size ends up being 0px because now with "let's clip all the overflow content"
0px is indeed the smallest size a box could take that does not produce overflow (while with the initial, “overflow: visible” value,
its minimum width would likely be > 0px -provided it has some content. Also note that setting “overflow: clip” on the box in the markup
(so it becomes an explicit clip value and not just an “effective” implicit clip through “contain: paint”) produces
the exact same rendering meaning that this effective property value does affect layout).

This is a partial revert of r285885 (focusing on where the flex algorithm consults with the flex items' overflow values).

Test: fast/flexbox/incorrect-min-size-with-paint-contain.html

  • rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::mainAxisOverflowForChild const): (WebCore::RenderFlexibleBox::crossAxisOverflowForChild const):

LayoutTests:

  • fast/flexbox/incorrect-min-size-with-paint-contain-expected.html: Added.
  • fast/flexbox/incorrect-min-size-with-paint-contain.html: Added.

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

3:49 PM Changeset in webkit [290692] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WTF

Cherry-pick r289974. rdar://problem/89008799

Unreviewed, reverting r286874.
https://bugs.webkit.org/show_bug.cgi?id=236734

Broke Apple Music pages which use the resolution media query

Reverted changeset:

"Enable the 'resolution' media query by default"
https://bugs.webkit.org/show_bug.cgi?id=78087
https://commits.webkit.org/r286874

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

3:49 PM Changeset in webkit [290691] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r289942. rdar://problem/88827167

[Cocoa] Update audio session category before setting NowPlaying status
https://bugs.webkit.org/show_bug.cgi?id=236620
rdar://88827167

Reviewed by Jer Noble.

NowPlaying doesn't update correctly when the audio category changes from Ambient
to Playback after becoming active, so always set the category first.

Tested manually.

  • platform/audio/PlatformMediaSession.cpp: (WebCore::PlatformMediaSession::clientWillBeginPlayback): Set "preparingToPlay" before calling sessionWillBeginPlayback so updateSessionState can tell that playback is about to begin.
  • platform/audio/PlatformMediaSession.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm: (WebCore::MediaSessionManagerCocoa::updateSessionState): Consider a session to potentially have audio if it is preparing to play.

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

3:49 PM Changeset in webkit [290690] by Alan Coon
  • 7 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289693. rdar://problem/88264857

Suppress style invalidation when matching :checked
https://bugs.webkit.org/show_bug.cgi?id=235910

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-12
Reviewed by Antti Koivisto.

Source/WebCore:

Suppress style invalidation when matching :checked for option elements.

Test: fast/selectors/has-select-option-crash.html

  • css/SelectorCheckerTestFunctions.h: (WebCore::isChecked):
  • html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::selected const): (WebCore::HTMLOptionElement::setSelectedState):
  • html/HTMLOptionElement.h:
  • html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::updateListItemSelectedStates): (WebCore::HTMLSelectElement::recalcListItems const):
  • html/HTMLSelectElement.h:

LayoutTests:

  • fast/selectors/has-select-option-crash-expected.txt: Added.
  • fast/selectors/has-select-option-crash.html: Added.

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

3:49 PM Changeset in webkit [290689] by Alan Coon
  • 6 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289526. rdar://problem/87061239

[:has() pseudo-class] Nullptr crash with non-function :has
https://bugs.webkit.org/show_bug.cgi?id=236431
rdar://87061239

Reviewed by Cameron McCormack.

LayoutTests/imported/w3c:

  • web-platform-tests/css/selectors/parsing/parse-has-expected.txt:
  • web-platform-tests/css/selectors/parsing/parse-has.html:

Source/WebCore:

Test: fast/selectors/malformed-has.html

  • css/parser/CSSSelectorParser.cpp: (WebCore::isOnlyPseudoClassFunction):

:has() is legal, plain :has is not.

LayoutTests:

  • fast/selectors/malformed-has-expected.txt: Added.
  • fast/selectors/malformed-has.html: Added.

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

3:49 PM Changeset in webkit [290688] by Alan Coon
  • 4 edits in branches/safari-613-branch

Cherry-pick r289502. rdar://problem/88528286

WKWebView: WKURLSchemeHandler “request to the end of the resource” produces an invalid header
https://bugs.webkit.org/show_bug.cgi?id=236401
rdar://88528286

Reviewed by Brent Fulgham.

Source/WebCore:

https://webkit.org/b/203302 added support for Range requests to AVAssetResourceLoadingDataRequest,
but it incorrectly used '*' instead of for "last-byte-pos:" for a request to the end of the resource.

API test URLSchemeHandler.Ranges was updated.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: (WebCore::WebCoreAVFResourceLoader::startLoading):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:

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

3:49 PM Changeset in webkit [290687] by Alan Coon
  • 4 edits in branches/safari-613-branch/Source/WebCore

Cherry-pick r289493. rdar://problem/88321921

Register strings in CSSTokenizer created from preprocessing
https://bugs.webkit.org/show_bug.cgi?id=236309

Patch by Gabriel Nava Marino <gnavamarino@apple.com> on 2022-02-09
Reviewed by Michael Saboff.

Register strings in CSSTokenizer created from preprocessing. This will align with
what is currently done for strings with escapes in CSSTokenizer::consumeName().

  • css/parser/CSSTokenizer.cpp: (WebCore::CSSTokenizer::preprocessString): (WebCore::CSSTokenizer::tryCreate): (WebCore::CSSTokenizer::CSSTokenizer): (WebCore::preprocessString): Deleted.
  • css/parser/CSSTokenizer.h:
  • css/parser/CSSTokenizerInputStream.h:

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

3:49 PM Changeset in webkit [290686] by Alan Coon
  • 14 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289462. rdar://problem/88580935

Don't return an empty value from AbortController.signal.reason and make it harder to return empty values from JSValueInWrappedObject
https://bugs.webkit.org/show_bug.cgi?id=236318
<rdar://88580935>

Reviewed by Mark Lam.

Source/WebCore:

This patch makes it so we might not accidentally return the empty value to
JavaScript code from JSValueInWrappedObject. Previously, JSValueInWrappedObject
had an "operator JSValue()" method. This patch removes that, adds a new
conversion method for converting between JSValueInWrappedObject and JSValue,
and makes JSValueInWrappedObject return undefined inside this method
when it used to return the empty value. This fixes a crash where we'd return
the empty value to JS JIT code, and crash dereferencing a nullptr. It's never
valid for a JS function call (or getter, etc) to return the empty value.

Test: fast/dom/AbortSignal-reason-crash-2.html

  • Modules/webaudio/AudioBuffer.cpp: (WebCore::AudioBuffer::getChannelData):
  • Modules/webaudio/AudioWorkletProcessor.cpp: (WebCore::toJSArray): (WebCore::toJSObject): (WebCore::AudioWorkletProcessor::buildJSArguments):
  • bindings/js/JSCustomEventCustom.cpp: (WebCore::JSCustomEvent::detail const):
  • bindings/js/JSDOMConvertAny.h: (WebCore::JSConverter<IDLAny>::convert):
  • bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data const):
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: (WebCore::JSPaymentMethodChangeEvent::methodDetails const):
  • bindings/js/JSPopStateEventCustom.cpp: (WebCore::JSPopStateEvent::state const):
  • bindings/js/JSValueInWrappedObject.h: (WebCore::JSValueInWrappedObject::getValue const): (WebCore::JSValueInWrappedObject::operator bool const): (WebCore::cachedPropertyValue): (WebCore::JSValueInWrappedObject::operator JSC::JSValue const): Deleted.
  • dom/AbortSignal.cpp: (WebCore::AbortSignal::signalFollow): (WebCore::AbortSignal::throwIfAborted):
  • dom/ErrorEvent.cpp: (WebCore::ErrorEvent::error): (WebCore::ErrorEvent::trySerializeError):
  • dom/PopStateEvent.cpp: (WebCore::PopStateEvent::trySerializeState):
  • page/History.cpp: (WebCore::History::cachedState):

LayoutTests:

  • fast/dom/AbortSignal-reason-crash-2-expected.txt: Added.
  • fast/dom/AbortSignal-reason-crash-2.html: Added.

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

3:48 PM Changeset in webkit [290685] by Alan Coon
  • 3 edits
    2 adds in branches/safari-613-branch

Cherry-pick r289443. rdar://problem/88593617

REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
https://bugs.webkit.org/show_bug.cgi?id=236260

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-08
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
  • web-platform-tests/css/css-contain/contain-paint-049.html: Added.

Source/WebCore:

Paint containment did not allow collecting scrollable overflow, breaking scrolling
of the container contents, this patch fixes that.

Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

  • rendering/RenderBox.cpp: (WebCore::RenderBox::addOverflowFromChild):

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

3:48 PM Changeset in webkit [290684] by Alan Coon
  • 2 edits in branches/safari-613-branch/Source/WebKit

Cherry-pick r289380. rdar://problem/86904276

Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-08
Reviewed by Chris Dumez.

  • UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):

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

3:48 PM Changeset in webkit [290683] by Alan Coon
  • 6 edits in branches/safari-613-branch

Cherry-pick r289377. rdar://problem/88178304

Return 'none' for the computed style of mask when there are no mask images
https://bugs.webkit.org/show_bug.cgi?id=236265
<rdar://88178304>

Patch by Matt Woodrow <Matt Woodrow> on 2022-02-08
Reviewed by Dean Jackson.

Source/WebCore:

Rather than returning all the longhand properties, return 'none' if there are no
mask images. This no longer matches the behaviour of the 'background' property, but
better matches what other UAs do.

Ideally we'd return the smallest possible canonical representation of the non-initial
property values, but this is a much simpler change to fix a compat regression.

Test: fast/masking/parsing-mask.html
Updates expected results to match new behavior.

  • css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::getLayerCount): (WebCore::ComputedStyleExtractor::getFillLayerPropertyShorthandValue): (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): (WebCore::ComputedStyleExtractor::getMaskShorthandValue):
  • css/CSSComputedStyleDeclaration.h:

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask.html:

Updated expected results to expect 'none' for all cases where there isn't an actual mask
image.

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

3:47 PM Changeset in webkit [290682] by Fujii Hironori
  • 2 edits in trunk/Tools

[WinCairo][pywebsocket3] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 640: character maps to <undefined>
https://bugs.webkit.org/show_bug.cgi?id=237339

Reviewed by Jonathan Bedard.

After r290580 started to use pywebsocket3 and Python 3, Windows
Python couldn't start WebSocket server due to UnicodeDecodeError.

  • Scripts/webkitpy/port/win.py:

(WinPort.setup_environ_for_server): Added PYTHONUTF8 environment variable.

3:46 PM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
3:35 PM Changeset in webkit [290681] by commit-queue@webkit.org
  • 13 edits in trunk/Source

Misc compiler warnings, late Feb 2022 edition
https://bugs.webkit.org/show_bug.cgi?id=237275

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-03-01
Reviewed by Adrian Perez de Castro.

Source/JavaScriptCore:

Suppress suspected false-positive -Wstringop-overflow and -Wformat-overflow warnings. Also,
remove an unused variable.

  • API/tests/MultithreadedMultiVMExecutionTest.cpp:

(startMultithreadedMultiVMExecutionTest):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExitDescriptor::prepareOSRExitHandle):

  • yarr/YarrJIT.cpp:

Source/WebCore:

Remove a redundant move. Sprinkle RELEASE_ASSERT_NOT_REACHED() as required to avoid
-Wreturn-type warnings.

  • Modules/push-api/PushDatabase.cpp:

(WebCore::openAndMigrateDatabaseImpl):

  • style/ContainerQueryEvaluator.cpp:

(WebCore::Style::ContainerQueryEvaluator::evaluateCondition const):
(WebCore::Style::ContainerQueryEvaluator::evaluateSizeFeature const):

  • style/ContainerQueryEvaluator.h:

(WebCore::Style::operator!):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::updateQueryContainerState):

Source/WebKit:

Delete an unused function. Remove a redundant move.

  • Shared/AuxiliaryProcess.cpp:

(WebKit::applySandboxProfileForDaemon): Deleted.

  • Shared/WebFoundTextRange.cpp:

(WebKit::WebFoundTextRange::decode):

3:30 PM Changeset in webkit [290680] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Prepare to add more files to WebKit
https://bugs.webkit.org/show_bug.cgi?id=237343

Reviewed by Chris Dumez.

This fixes the build after bug 237234, and it's unrelated so I pulled it into a different patch.

  • Scripts/generate-unified-sources.sh:
  • UIProcess/Cocoa/WebURLSchemeHandlerCocoa.mm:
  • WebKit.xcodeproj/project.pbxproj:
3:16 PM Changeset in webkit [290679] by Said Abou-Hallawa
  • 32 edits
    2 adds in trunk

Source/WebCore:
[macOS][REGRESSION] (r289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

Using the name GraphicsContext::createImageBuffer() for different behaviors
was a mistake in r289518. To clean this up, the createImageBuffer() version
which scales the GraphicsContext of the ImageBuffer will be renamed
createScaledImageBuffer(). and the existing createCompatibleImageBuffer()
will be renamed createAlignedImageBuffer(). So we will have these three
methods in GraphicsContext:

1) createImageBuffer(): The default behavior of this method is to create

an ImageBuffer similar to the underlying ImageBuffer of GraphicsContext.
But it gives ability to change the renderingMode and the renderingMethod.
It can be forced to create a non-accelerated local ImageBuffer for example.

The caller of this method usually uses a framework to draw some custom
drawing and it just needs a scratch buffer to be drawn in the place of
a render object. The caller does not require any transformation to be
applied to the GraphicsContext of the ImageBuffer before starting its
custom drawing. Drawing the form controls using AppKit is an example
of such case.

2) createScaledImageBuffer(): This is similar to createImageBuffer() but

it always creates the ImageBuffer with resolutionScale = 1 so it has
to scale the size by the scaleFactor before calling createImageBuffer().
It also scales the GraphicsContext of the created ImageBuffer with the
scaleFactor and it translates its coordinates origin for the FloatRect
version. It also handles the clamping if needed.

This method is suitable for cases when the overall scaleFatcor
(device ScaleFactor + clamping ScaleFactor) has be known to the caller
in advance. No clamping will be required in this case. SVG filter,
masker, clipper and gradient are the callers to this function.

3) createAlignedImageBuffer(): This is similar to createScaledImageBuffer()

but it does not take a scaling factor argument. It inherits it from
the GraphicsContext.

Usually the purpose of this method is to transfer the drawing from a
layer to a scratch ImageBuffer temporarily then draw the scratch
ImageBuffer in the place of the original drawing. Drawing a PDFDocument
image, for example, requires using this method.

To fix this bug:

Form controls have to use the first version of createImageBuffer() which
still has the same name instead of using the second version which will
be renamed createScaledImageBuffer().

Another cleaning is to pass RenderingMethod as an std::optional argument
the three methods. This means we do not need the value "Default" since
passing std::nullopt will have the same meaning.

Test: fast/hidpi/hidpi-form-controls-drawing-size.html

  • html/CustomPaintCanvas.cpp:

(WebCore::CustomPaintCanvas::replayDisplayList const):

  • html/CustomPaintImage.cpp:

(WebCore::CustomPaintImage::drawPattern):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):

  • platform/cocoa/ThemeCocoa.mm:

(WebCore::drawApplePayButton):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::drawPattern):

  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::drawPattern):

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::createImageBuffer const):
(WebCore::GraphicsContext::createScaledImageBuffer const):
(WebCore::GraphicsContext::createAlignedImageBuffer const):
(WebCore::GraphicsContext::createCompatibleImageBuffer const): Deleted.

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::createScaledImageBuffer):
(WebCore::GraphicsContext::createImageBuffer): Deleted.

  • platform/graphics/ImageBuffer.cpp:

(WebCore::ImageBuffer::clone const):

  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::drawPattern):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
(WebCore::PDFDocumentImage::draw):

  • platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:

(WebCore::DrawGlyphsRecorder::drawOTSVGRun):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::createImageBuffer const):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/mac/ThemeMac.mm:

(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderLayerBacking.cpp:

(WebCore::patternForDescription):

  • rendering/RenderLayerFilters.cpp:

(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):

  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::paintApplePayButton):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintListButtonForInput):
(WebCore::RenderThemeMac::paintProgressBar):

  • rendering/svg/RenderSVGResourceClipper.cpp:

(WebCore::RenderSVGResourceClipper::applyClippingToContext):

  • rendering/svg/RenderSVGResourceFilter.cpp:

(WebCore::RenderSVGResourceFilter::applyResource):

  • rendering/svg/RenderSVGResourceGradient.cpp:

(WebCore::createMaskAndSwapContextForTextGradient):

  • rendering/svg/RenderSVGResourceMasker.cpp:

(WebCore::RenderSVGResourceMasker::applyResource):

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::createTileImage const):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::bufferForeground):

Source/WebKit:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:

(WebKit::RemoteDisplayListRecorderProxy::createImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createAlignedImageBuffer const):
(WebKit::RemoteDisplayListRecorderProxy::createCompatibleImageBuffer const): Deleted.

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

LayoutTests:
[macOS][REGRESSION] (rr289518): Form controls are scaled twice on Retina display
https://bugs.webkit.org/show_bug.cgi?id=237128
rdar://89064642

Reviewed by Darin Adler.

  • fast/hidpi/hidpi-form-controls-drawing-size-expected.html: Added.
  • fast/hidpi/hidpi-form-controls-drawing-size.html: Added.
3:07 PM Changeset in webkit [290678] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Win ] 4X imported/mozilla/svg/blend(layout-tests) are constant Image Only Failures
https://bugs.webkit.org/show_bug.cgi?id=237344

Unreviewed test gardening. Skipping, for Windows instead of adding an expectation.

  • platform/win/TestExpectations:
3:03 PM Changeset in webkit [290677] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Win ] 4X imported/mozilla/svg/blend(layout-tests) are constant Image Only Failures
https://bugs.webkit.org/show_bug.cgi?id=237344

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:27 PM Changeset in webkit [290676] by eric.carlson@apple.com
  • 7 edits
    4 adds in trunk

[Cocoa] HLS stream currentTime sometimes jumps backwards
https://bugs.webkit.org/show_bug.cgi?id=235087
rdar://83831093

Reviewed by Dean Jackson.

Source/WebCore:

Test: http/tests/media/hls/hls-non-zero-start-time.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive-by: pass log identifier
to lambda so the method name will be logged correctly.
(WebCore::HTMLMediaElement::currentMediaTime const): Remove LOG_CACHED_TIME_WARNINGS
build flag, always log time drift warnings when log level is DEBUG.

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Log when periodic
time observer is passed unexpected values.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use
NSKeyValueObservingOptionInitial KVO option for "@duration" property because we
sometimes don't get a duration changed event for HLS streams, so m_cachedDuration
remains invalid.
(WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTimeDidChange const):
Drive-by: fix use-after-move.

Source/WebKit:

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::currentTimeChanged): Always notify player when
time jumps backwards.

LayoutTests:

  • http/tests/media/hls/hls-non-zero-start-time-expected.txt: Added.
  • http/tests/media/hls/hls-non-zero-start-time.html: Added.
  • http/tests/media/resources/hls/bip-bop-live.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.m3u8: Added.
  • http/tests/media/resources/hls/bipbop/start-offset.ts: Added.
2:06 PM Changeset in webkit [290675] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278
<rdar://problem/89585043>

Unreviewed, address review comments.

Log error instead of creating CrashTracer reports.

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::bytesPerRowAlignment):

1:57 PM Changeset in webkit [290674] by Matt Woodrow
  • 4 edits in trunk

Use static position relative to parent for abs-pos items within nested grids.
https://bugs.webkit.org/show_bug.cgi?id=236957

Reviewed by Dean Jackson.

Source/WebCore:

In the case where an absolutely positioned element's parent and containing block
are both grid container, but they are not the same grid container, then the static position
of the abs-pos item should be relative to the parent, not the CB.

Existing subgrid tests marked as passing.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::setLogicalOffsetForChild const):

LayoutTests:

Existing subgrid tests marked as passing.

1:44 PM Changeset in webkit [290673] by Andres Gonzalez
  • 4 edits in trunk

Make accessibility/aria-hidden-false-works-in-subtrees.html async to pass in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=237051
<rdar://problem/89312156>

Reviewed by Chris Fleizach.

Tools:

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::accessibleElementById):
Convert the JSStringRef to NSString on the main thread and capture the
NSString to be used on the AX secondary thread. This may be safer since
JSStringRefs are supposed to be used on the main thread.

LayoutTests:

  • accessibility/aria-hidden-false-works-in-subtrees.html:

Made both the main script and the iframe onload function async to pass
in isolated tree mode.

1:28 PM Changeset in webkit [290672] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[IFC][Integration] Add InlineIterator::Box::visualRect
https://bugs.webkit.org/show_bug.cgi?id=237309

Reviewed by Antti Koivisto.

This is the final, flipped version of the box rect.

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::Box::visualRect const):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::computePaintRect):

1:19 PM Changeset in webkit [290671] by Patrick Angle
  • 5 edits in trunk/Source/WebCore

Web app fails only when dev tools is open
https://bugs.webkit.org/show_bug.cgi?id=235017

Reviewed by Devin Rousso.

Using the ScriptExecutionContext from event.target()->scriptExecutionContext() can result the either having a
different script context from the one used when calling willHandleEvent, or the event target's context could be
nullptr. This can occur when handling the event in EventTarget::innerInvokeEventListeners results in a
context change for the event's target, like a MessagePort that has been disentangled, which sets the script
execution context to nullptr. Because we only need the script execution context to get the correct injected
script, and the correct injected script for the action below will always be the same injected script used in
willHandleEvent, we ignore the current script execution context of the event's target and use the context the
event's target had when it began invoking event listeners.

This change protects us both from the reported crash, as well as leaving an injected script in a bad state
because we did not call setEventValue and clearEventValue on matching injected scripts for a single event.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore::InspectorInstrumentation::didHandleEvent):

  • inspector/agents/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
(WebCore::InspectorDOMDebuggerAgent::didHandleEvent):

  • inspector/agents/InspectorDOMDebuggerAgent.h:
1:02 PM Changeset in webkit [290670] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ Monterey wk2 ] http/tests/media/video-webm-stall.html is a constant text failure
https://bugs.webkit.org/show_bug.cgi?id=236788

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/mac-wk2/TestExpectations:
12:57 PM Changeset in webkit [290669] by sihui_liu@apple.com
  • 3 edits in trunk/Source/WebKit

Move StorageBucket function definitions outside the class definition
https://bugs.webkit.org/show_bug.cgi?id=237300

Reviewed by Chris Dumez.

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::mode const):
(WebKit::OriginStorageManager::StorageBucket::setMode):
(WebKit::OriginStorageManager::StorageBucket::StorageBucket):
(WebKit::OriginStorageManager::StorageBucket::connectionClosed):
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier const):
(WebKit::OriginStorageManager::StorageBucket::typeStoragePath const):
(WebKit::OriginStorageManager::StorageBucket::fileSystemStorageManager):
(WebKit::OriginStorageManager::StorageBucket::localStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingLocalStorageManager):
(WebKit::OriginStorageManager::StorageBucket::sessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingSessionStorageManager):
(WebKit::OriginStorageManager::StorageBucket::idbStorageManager):
(WebKit::OriginStorageManager::StorageBucket::existingIDBStorageManager):
(WebKit::OriginStorageManager::StorageBucket::isActive const):
(WebKit::OriginStorageManager::StorageBucket::isEmpty):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInList):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromMemory):
(WebKit::OriginStorageManager::StorageBucket::fetchDataTypesInListFromDisk):
(WebKit::OriginStorageManager::StorageBucket::deleteData):
(WebKit::OriginStorageManager::StorageBucket::deleteFileSystemStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteLocalStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteSessionStorageData):
(WebKit::OriginStorageManager::StorageBucket::deleteIDBStorageData):
(WebKit::OriginStorageManager::StorageBucket::moveData):
(WebKit::OriginStorageManager::StorageBucket::resolvedLocalStoragePath):
(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):
(WebKit::OriginStorageManager::StorageBucket::toWebsiteDataType): Deleted.
(WebKit::OriginStorageManager::StorageBucket::toStorageIdentifier): Deleted.

12:08 PM Changeset in webkit [290668] by Russell Epstein
  • 1 copy in tags/Safari-614.1.3.7

Tag Safari-614.1.3.7.

12:01 PM Changeset in webkit [290667] by Martin Robinson
  • 19 edits in trunk

When interpolating between transform lists partial prefix matches should not use matrix interpolation
https://bugs.webkit.org/show_bug.cgi?id=235757
<rdar://problem/88477922>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark subtests as passing.
  • web-platform-tests/css/css-transforms/animation/transform-composition-expected.txt: Ditto.
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-004-expected.txt: Ditto.

Source/WebCore:

No new tests. This is covered by existing WPT tests.

When interpolation between keyframes in transform animations, interpolate prefixes of
compatible transform functions directly. For instance if there are three keyframes:

  1. transform: rotateX(...) translateY(...) skew(...)
  2. transform: rotateY(...) translateY(...)
  3. transform: rotateZ(...) translateZ(...) matrix3d(...)

There will be a directly interpolated rotation animation, a directly interpolated
translation animation, and finally a matrix animation for the remaining functions.
This is important for preserving transforms (such as full rotations) that are lost
during matrix decompose and recompose operations.

This change adds a new helper class SharedPrimitivesPrefix which is used to calculate
the prefix of shared primitives that are shared between keyframes.

Currently, the Core Animation backend only supports animation transformation primitives
across the entire animation, so shared primitive prefixes must span the entire animation
if an animation is accelerated. In the case that an animation is rendered in software,
this prefix can simply be between the current next and previous keyframes.

TransformOperations::blend is extended to blend any two TransformationOperations, which
makes it the only blend function necessary for software animations, computed CSS values,
and for the Nicosia backend, simplifying the interpolation code path.

  • animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):

  • animation/CSSPropertyBlendingClient.h:
  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists):
(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

  • animation/KeyframeEffect.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::operationsAt): Deleted.
(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): Deleted.

  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
(WebCore::GraphicsLayerCA::setTransformAnimationKeyframes):

  • platform/graphics/ca/GraphicsLayerCA.h:
  • platform/graphics/nicosia/NicosiaAnimation.cpp:

(Nicosia::applyTransformAnimation):
(Nicosia::Animation::Animation):
(Nicosia::Animation::operator=):
(Nicosia::Animation::applyInternal):

  • platform/graphics/nicosia/NicosiaAnimation.h:
  • platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:

(WebCore::GraphicsLayerTextureMapper::addAnimation):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::addAnimation):

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::SharedPrimitivesPrefix::update):
(WebCore::TransformOperations::blend const):
(WebCore::TransformOperations::createBlendedMatrixOperationFromOperationsSuffix const):
(WebCore::TransformOperations::operationsMatch const): Deleted.
(WebCore::TransformOperations::updateSharedPrimitives const): Deleted.
(WebCore::TransformOperations::blendByMatchingOperations const): Deleted.
(WebCore::TransformOperations::blendByUsingMatrixInterpolation const): Deleted.

  • platform/graphics/transforms/TransformOperations.h:

(WebCore::TransformOperations::apply const):
(WebCore::SharedPrimitivesPrefix::hadIncompatibleTransformFunctions):
(WebCore::SharedPrimitivesPrefix::primitives):

11:53 AM Changeset in webkit [290666] by Truitt Savell
  • 2 edits in trunk/LayoutTests

[ Monterey ] webaudio/decode-audio-data-webm-vorbis.html is constantly failing
https://bugs.webkit.org/show_bug.cgi?id=236328

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-03-01

  • platform/mac-wk2/TestExpectations:
11:42 AM Changeset in webkit [290665] by Robert Jenner
  • 2 edits in trunk/LayoutTests

WindowServer returned not alive with context:,unresponsive work processor(s)
<rdar://86037417>

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:38 AM Changeset in webkit [290664] by ysuzuki@apple.com
  • 15 edits in trunk/PerformanceTests

Fix Speedometer's setTimeout throttling issue
https://bugs.webkit.org/show_bug.cgi?id=237303
rdar://89444976

Reviewed by Geoffrey Garen.

Speedometer is driving each test via setTimeout. Because we are using setTimeout to
measure async time in each subtest of Speedometer, our measurement included 4ms
throttle introduced due to nested setTimeout. This is happening in the test
harness (not test itself), and the intention of this test harness is not measuring
the throttle time. In this patch, we fix this nesting level propagation by inserting
window.requestAnimationFrame for each test run and BenchmarkRunner.prototype.waitForElement
so that we can reset nesting level count of setTimeout, which prevents the rendering
engine to insert 4ms throttle.

Since this affects on the score of async measurement, we bump the version number from 2.0 to 2.1

  • Speedometer/InteractiveRunner.html:
  • Speedometer/index.html:
  • Speedometer/resources/benchmark-runner.js:

(resolveIfReady):
(BenchmarkRunner.prototype.waitForElement):
(BenchmarkRunner.prototype._runTest):

  • Speedometer/resources/todomvc/architecture-examples/angular/README.md:
  • Speedometer/resources/todomvc/architecture-examples/angularjs/readme.md:
  • Speedometer/resources/todomvc/architecture-examples/backbone/readme.md:
  • Speedometer/resources/todomvc/architecture-examples/emberjs/README.md:
  • Speedometer/resources/todomvc/architecture-examples/preact/README.md:
  • Speedometer/resources/todomvc/architecture-examples/react-redux/README.md:
  • Speedometer/resources/todomvc/architecture-examples/react/README.md:
  • Speedometer/resources/todomvc/architecture-examples/vuejs-cli/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/es2015-babel-webpack/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/es2015/README.md:
  • Speedometer/resources/todomvc/vanilla-examples/vanillajs/readme.md:
11:34 AM Changeset in webkit [290663] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Unreviewed, reverting r290619.
https://bugs.webkit.org/show_bug.cgi?id=237337

Introduced build failure

Reverted changeset:

"[iOS] Weak link AVPictureInPictureController"
https://bugs.webkit.org/show_bug.cgi?id=237227
https://commits.webkit.org/r290619

11:29 AM Changeset in webkit [290662] by graouts@webkit.org
  • 5 edits in trunk

[web-animations] ::placeholder should not be a valid pseudo-element for a KeyframeEffect target
https://bugs.webkit.org/show_bug.cgi?id=237334

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:
  • web-platform-tests/web-animations/interfaces/KeyframeEffect/target-expected.txt:

Source/WebCore:

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setPseudoElement):

11:07 AM Changeset in webkit [290661] by Jonathan Bedard
  • 5 edits in trunk/Tools

[git-webkit] Gate information URL on initial setup
https://bugs.webkit.org/show_bug.cgi?id=237325
<rdar://problem/89620175>

Reviewed by Aakash Jain.

  • Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/init.py: Ditto.
  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:

(Setup.main): Offer to open documentation URL if repository has not been setup.

  • Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

(TestSetup.test_github):

Canonical link: https://commits.webkit.org/247932@main

11:06 AM Changeset in webkit [290660] by youenn@apple.com
  • 2 edits in trunk/Source/WTF

Enable WebRTCRemoteVideoFrameEnabled by default on Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=237201

Reviewed by Eric Carlson.

  • Scripts/Preferences/WebPreferencesInternal.yaml:
10:43 AM Changeset in webkit [290659] by commit-queue@webkit.org
  • 17 edits in trunk/Source

If the main resource was loaded over private relay, load all sub resources over private relay
https://bugs.webkit.org/show_bug.cgi?id=237296

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-01
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

  • pal/spi/cf/CFNetworkSPI.h:

Source/WebKit:

I manually verified that this fixes rdar://88965550 when using the CFNetwork change in the related bug.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::createSocketChannel):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/NetworkConnectionToWebProcess.messages.in:
  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::transferToNewWebProcess):
(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::createWebSocketTask):

  • NetworkProcess/NetworkSession.h:
  • NetworkProcess/NetworkSocketChannel.cpp:

(WebKit::NetworkSocketChannel::create):
(WebKit::NetworkSocketChannel::NetworkSocketChannel):

  • NetworkProcess/NetworkSocketChannel.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):

  • NetworkProcess/cocoa/NetworkSessionCocoa.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
(WebKit::NetworkSessionCocoa::createWebSocketTask):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Network/WebSocketChannel.cpp:

(WebKit::WebSocketChannel::connect):

10:34 AM Changeset in webkit [290658] by youenn@apple.com
  • 4 edits in trunk/LayoutTests

fast/mediastream/getUserMedia-to-canvas-1.html and fast/mediastream/getUserMedia-to-canvas-2.html are failing on MacOS when remote video frame flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=237042
<rdar://problem/89298601>

Reviewed by Eric Carlson.

Video element videoWidth/videoHeight are updated when track settings are changed,
and not when video frames being received.

This does not guarantee that videoWidth/videoHeight (main thread) are fully in sync
with the actual video frames (background thread) when there is a change of size.

We might be able to tighten this in MediaPlayerPrivateMediaStreamAVFObjC by only resorting on video frames.
In the meantime, we update the test to set the orientation before creating the source.
This makes sure the video frames have the expected size and rotation.

  • fast/mediastream/getUserMedia-to-canvas-1.html:
  • fast/mediastream/getUserMedia-to-canvas-2.html:
  • fast/mediastream/resources/getUserMedia-to-canvas.js:
10:34 AM Changeset in webkit [290657] by Russell Epstein
  • 9 edits in branches/safari-614.1.3-branch/Source

Versioning.

WebKit-7614.1.3.7

10:22 AM Changeset in webkit [290656] by commit-queue@webkit.org
  • 8 edits in trunk/Source

[AppleWin] Start using Visual Studio 2022
https://bugs.webkit.org/show_bug.cgi?id=234933

Patch by Alex Christensen <achristensen@webkit.org> on 2022-03-01
Reviewed by Maciej Stachowiak.

Source/JavaScriptCore:

Source/WebCore:

  • WebCore.vcxproj/WebCore.proj:

Source/WebKitLegacy:

  • WebKitLegacy.vcxproj/WebKitLegacy.proj:

Source/WTF:

  • WTF.vcxproj/WTF.proj:
10:14 AM Changeset in webkit [290655] by graouts@webkit.org
  • 6 edits in trunk

[web-animations] add support for passing an optional timeline to Element.animate()
https://bugs.webkit.org/show_bug.cgi?id=237312

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/Animatable/animate-expected.txt:

Source/WebCore:

  • animation/KeyframeAnimationOptions.h:
  • animation/KeyframeAnimationOptions.idl:
  • dom/Element.cpp:

(WebCore::Element::animate):

10:12 AM Changeset in webkit [290654] by jer.noble@apple.com
  • 6 edits
    3 adds in trunk/Source/WebKit

[Cocoa] Allow logging to be configured by NSDefaults (without regressing launch time)
https://bugs.webkit.org/show_bug.cgi?id=237183

Reviewed by Darin Adler.

In r220780, code was added to WebProcessPoolCocoa to explicitly pass the results of a NSUserDefaults
to newly created WebContent processes to determine log channel levels. Later, in r232158, NSUserDefaults
were removed from the default logLevelString() implementations in WTF, WebCore, and WebKit to improve
process launch time performance. In r279796, the same technique sued in WebProcessPoolCocoa was added
to GPUProcessProxyCocoa to pass those log level strings to the GPUProcess. And then in r286484, all the
uses of NSUserDefaults were removed from WebProcessPoolCocoa and GPUProcessProxyCocoa were removed,
removing the ability to increase the log channel levels at runtime through NSUserDefualts.

Add back in the ability to define log levels for the UIProcess and all AuxiliaryProcesses without
regressing launch time by only checking the NSUserDefault once, only in the UIProcess, storing the result
in a static variable, and passing the results of that check to all AuxiliaryProcesses at creation time.

  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::auxiliaryProcessParameters):

  • UIProcess/Cocoa/UIProcessLogInitializationCocoa.mm: Added.

(WebKit::UIProcess::wtfLogLevelString):
(WebKit::UIProcess::webCoreLogLevelString):
(WebKit::UIProcess::webKitLogLevelString):

  • UIProcess/UIProcessLogInitialization.cpp: Added.

(WebKit::UIProcess::initializeLoggingIfNecessary):
(WebKit::UIProcess::wtfLogLevelString):
(WebKit::UIProcess::webCoreLogLevelString):
(WebKit::UIProcess::webKitLogLevelString):

  • UIProcess/UIProcessLogInitialization.h: Added.
  • UIProcess/WebProcessPool.cpp:
9:56 AM Changeset in webkit [290653] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

Annotate LibWebRTC with thread safety macros
https://bugs.webkit.org/show_bug.cgi?id=237321

Reviewed by Eric Carlson.

LibWebRTCCodecs works with 3 threads and we add macros to make it clear where each thread is used:

  • the main thread to get its GPU process connection (isMainRunLoop()).
  • the libwebrtc thread where it gets orders to decode/encode frames (!isMainRunLoop())
  • the work queue thread where it is receiving encode/decode results (assertIsCurrent(workQueue())).

Rename m_encodersLock to m_encodersConnectionLock to make it clear this is about locking the encoder connection and not the encoder map.
Both decoder and encoder maps should only be touched on the workQueue thread.

Introduce encoderConnection/setEncoderConnection and decoderConnection/setDecoderConnection routines.
These methods are guarded by corresponding locks.
This requires adding some additional locks when accessing connections in workQueue thread.
Fix a potential issue when creating the encoder: we lock the encoderConnection lock earlier when setting the connection.

Covered by existing tests.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::gpuProcessConnectionMayNoLongerBeNeeded):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::registerDecodeFrameCallback):
(WebKit::LibWebRTCCodecs::failedDecoding):
(WebKit::LibWebRTCCodecs::completedDecoding):
(WebKit::LibWebRTCCodecs::completedDecodingCV):
(WebKit::LibWebRTCCodecs::createEncoder):
(WebKit::LibWebRTCCodecs::releaseEncoder):
(WebKit::LibWebRTCCodecs::initializeEncoder):
(WebKit::LibWebRTCCodecs::copySharedVideoFrame):
(WebKit::LibWebRTCCodecs::encodeFrame):
(WebKit::LibWebRTCCodecs::registerEncodeFrameCallback):
(WebKit::LibWebRTCCodecs::setEncodeRates):
(WebKit::LibWebRTCCodecs::completedEncoding):
(WebKit::LibWebRTCCodecs::gpuProcessConnectionDidClose):
(WebKit::LibWebRTCCodecs::encoderConnection):
(WebKit::LibWebRTCCodecs::setEncoderConnection):
(WebKit::LibWebRTCCodecs::decoderConnection):
(WebKit::LibWebRTCCodecs::setDecoderConnection):
(WebKit::copySharedVideoFrame): Deleted.

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:

(WebKit::LibWebRTCCodecs::workQueue const):

9:40 AM Changeset in webkit [290652] by J Pascoe
  • 2 edits in trunk/Tools

REGRESSION(r290539-r290538): [ iOS ] 3 TestWebKitAPI.WebAuthenticationPanel.* tests are constantly failing/crashing.
https://bugs.webkit.org/show_bug.cgi?id=237285
rdar://problem/89579460

Reviewed by Brent Fulgham.

Remove obsolete API test and ensure another has clean state.

  • TestWebKitAPI/Tests/WebKitCocoa/_WKWebAuthenticationPanel.mm:

(TestWebKitAPI::TEST):

9:17 AM Changeset in webkit [290651] by Jonathan Bedard
  • 1 edit
    200 deletes in trunk/LayoutTests/imported/w3c

[Python 3] Delete old pywebsocket
https://bugs.webkit.org/show_bug.cgi?id=237274
<rdar://problem/89558809>

Rubber-stamped by Aakash Jain.

  • LayoutTests/imported/w3c/web-platform-tests/tools/pywebsocket: Removed.

Canonical link: https://commits.webkit.org/247924@main

9:08 AM Changeset in webkit [290650] by commit-queue@webkit.org
  • 5 edits in trunk

Unreviewed, reverting r290325.
https://bugs.webkit.org/show_bug.cgi?id=237326

Broken patch

Reverted changeset:

"[GStreamer] Switch media player to playbin3"
https://bugs.webkit.org/show_bug.cgi?id=236884
https://commits.webkit.org/r290325

8:19 AM Changeset in webkit [290649] by Alan Bujtas
  • 17 edits in trunk/Source/WebCore

[IFC][Integration] InlineIterator::Box::rect() returns the unflipped visual rect
https://bugs.webkit.org/show_bug.cgi?id=237304

Reviewed by Antti Koivisto.

Rename InlineIterator::Box::rect() to visualRectIgnoringBlockDirection().
This is the unflipped version of the visual rect. It's no longer logical but
when the writing mode sets right-to-left/bottom-to-top block direction, it's not yet visual either.
It'll help to indentify callsites where we actually need the flipped version of this visual rect.

  • layout/formattingContexts/inline/display/InlineDisplayBox.h:

(WebCore::InlineDisplay::Box::unflippedVisualRect const):
(WebCore::InlineDisplay::Box::top const):
(WebCore::InlineDisplay::Box::bottom const):
(WebCore::InlineDisplay::Box::left const):
(WebCore::InlineDisplay::Box::right const):
(WebCore::InlineDisplay::Box::width const):
(WebCore::InlineDisplay::Box::height const):
(WebCore::InlineDisplay::Box::moveVertically):
(WebCore::InlineDisplay::Box::moveHorizontally):
(WebCore::InlineDisplay::Box::setLeft):
(WebCore::InlineDisplay::Box::setRight):
(WebCore::InlineDisplay::Box::setTop):
(WebCore::InlineDisplay::Box::setBottom):
(WebCore::InlineDisplay::Box::setRect):
(WebCore::InlineDisplay::Box::Box):
(WebCore::InlineDisplay::Box::truncate):
(WebCore::InlineDisplay::Box::rect const): Deleted.

  • layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:

(WebCore::Layout::InlineDisplayContentBuilder::adjustVisualGeometryForDisplayBox):

  • layout/integration/InlineIteratorBox.h:

(WebCore::InlineIterator::Box::logicalTop const):
(WebCore::InlineIterator::Box::logicalBottom const):
(WebCore::InlineIterator::Box::logicalLeft const):
(WebCore::InlineIterator::Box::logicalRight const):
(WebCore::InlineIterator::Box::logicalWidth const):
(WebCore::InlineIterator::Box::logicalHeight const):
(WebCore::InlineIterator::Box::unflippedVisualRect const):
(WebCore::InlineIterator::Box::rect const): Deleted.

  • layout/integration/InlineIteratorBoxLegacyPath.h:

(WebCore::InlineIterator::BoxLegacyPath::unflippedVisualRect const):
(WebCore::InlineIterator::BoxLegacyPath::rect const): Deleted.

  • layout/integration/InlineIteratorBoxModernPath.h:

(WebCore::InlineIterator::BoxModernPath::unflippedVisualRect const):
(WebCore::InlineIterator::BoxModernPath::createTextRun const):
(WebCore::InlineIterator::BoxModernPath::rect const): Deleted.

  • layout/integration/LayoutIntegrationBoxTree.cpp:

(WebCore::LayoutIntegration::showInlineContent):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::firstInlineBoxRect const):
(WebCore::LayoutIntegration::LineLayout::collectInlineBoxRects const):
(WebCore::LayoutIntegration::LineLayout::hitTest):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::showInlineTreeAndRuns):

  • rendering/InlineBoxPainter.cpp:

(WebCore::InlineBoxPainter::paintMask):
(WebCore::InlineBoxPainter::paintDecorations):
(WebCore::InlineBoxPainter::paintFillLayer):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
(WebCore::pixelSnapBackgroundImageGeometryForPainting): Deleted.

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::paintOutline):

  • rendering/RenderLineBreak.cpp:

(WebCore::RenderLineBreak::linesBoundingBox const):
(WebCore::RenderLineBreak::absoluteRects const):
(WebCore::RenderLineBreak::absoluteQuads const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::absoluteRects const):
(WebCore::boundariesForTextRun):
(WebCore::localQuadForTextRun):
(WebCore::RenderText::firstRunLocation const):
(WebCore::RenderText::linesBoundingBox const):

  • rendering/RenderTreeAsText.cpp:

(WebCore::write):

  • rendering/TextBoxPainter.cpp:

(WebCore::TextBoxPainter::computePaintRect):

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

[Debug] imported/w3c/web-platform-tests/url/toascii.window.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=236442
<rdar://problem/89085190>

Unreviewed, unskip test as it no longer appears to crash in Debug.

7:42 AM Changeset in webkit [290647] by commit-queue@webkit.org
  • 35 edits
    1 add in trunk/Source

[JSC] Port EXTRA_CTI_THUNKS to all platforms
https://bugs.webkit.org/show_bug.cgi?id=233822

Patch by Geza Lore <Geza Lore> on 2022-03-01
Reviewed by Saam Barati.

Source/JavaScriptCore:

Port and enable all code paths under #ifdef ENABLE(EXTRA_CTI_THUNKS)
on all platforms, and remove the now unused code paths.

To port the extra thunks to all platforms, it was necessary to enable
them to do function calls to C++ slow path operations, which on some
platforms require passing arguments on the stack. To enable this,
CCallHelpers::emitCTIThunkPrologue and
CCallHelpers::emitCTIThunkEpilogue are introduced that allocate some
additional stack space on platforms where this is necessary.

Additionally, the thunks that require subsequent exception checking
now tail call directly to the exception check thunk, rather than
returning to the baseline code and do a separate call to the exception
check thunk. This saves an extra call site in the generated baseline
ops and reduces code size on all platforms (~1.5% reduction on x86_64).

Also factored out the statically allocated register definitions for
baseline ops into BaselineJITRegisters.h, as there are now quite a lot
of them and some are somewhat elaborate. This necessitates moving the
noOverlap and preferredArgumentGPR/preferredArgumentJSR constexpr
functions out from their previous place, so these now live in
GPRInfo.h

Enabling the extra CTI thunks on ARMv7/Thumb-2 saves about 25%
baseline code size, according to --dumpLinkBufferStats.

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::subPtr):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::scratchRegister):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::sub64):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGJITCompiler.h:
  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • jit/CCallHelpers.h:

(JSC::CCallHelpers::emitCTIThunkPrologue):
(JSC::CCallHelpers::emitCTIThunkEpilogue):

  • jit/JIT.cpp:

(JSC::JIT::emitSlowCaseCall):
(JSC::JIT::privateCompileSlowCases):
(JSC::JIT::compileAndLinkWithoutFinalizing):
(JSC::JIT::link):

  • jit/JIT.h:
  • jit/JITArithmetic.cpp:

(JSC::JIT::emitSlow_op_mod):
(JSC::JIT::emit_op_mod):
(JSC::JIT::emit_op_div):

  • jit/JITCall.cpp:

(JSC::JIT::emit_op_iterator_open):
(JSC::JIT::emit_op_iterator_next):
(JSC::JIT::emitSlow_op_iterator_next):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITGetByIdGenerator::generateBaselineDataICFastPath):
(JSC::JITGetByIdWithThisGenerator::generateBaselineDataICFastPath):
(JSC::JITPutByIdGenerator::generateBaselineDataICFastPath):

  • jit/JITInlineCacheGenerator.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_jfalse):
(JSC::JIT::valueIsFalseyGenerator):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::valueIsTruthyGenerator):
(JSC::JIT::emit_op_throw):
(JSC::JIT::op_throw_handlerGenerator):
(JSC::JIT::emit_op_enter):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::emitSlow_op_check_traps):
(JSC::JIT::op_check_traps_handlerGenerator):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::generateGetByValSlowCase):
(JSC::JIT::slow_op_get_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_get_private_name):
(JSC::JIT::emitSlow_op_get_private_name):
(JSC::JIT::slow_op_get_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_set_private_brand):
(JSC::JIT::emitSlow_op_set_private_brand):
(JSC::JIT::emit_op_check_private_brand):
(JSC::JIT::emitSlow_op_check_private_brand):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::slow_op_put_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_put_private_name):
(JSC::JIT::emitSlow_op_put_private_name):
(JSC::JIT::slow_op_put_private_name_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emitSlow_op_del_by_id):
(JSC::JIT::slow_op_del_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitSlow_op_del_by_val):
(JSC::JIT::slow_op_del_by_val_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_try_get_by_id):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emit_op_get_by_id_direct):
(JSC::JIT::emitSlow_op_get_by_id_direct):
(JSC::JIT::emit_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::slow_op_get_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::slow_op_get_by_id_with_this_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::slow_op_put_by_id_callSlowOperationThenCheckExceptionGenerator):
(JSC::JIT::emitSlow_op_in_by_id):
(JSC::JIT::emitSlow_op_in_by_val):
(JSC::JIT::emitHasPrivateSlow):
(JSC::JIT::emitSlow_op_has_private_name):
(JSC::JIT::emitSlow_op_has_private_brand):
(JSC::JIT::emitSlow_op_put_to_scope):
(JSC::JIT::slow_op_put_to_scopeGenerator):
(JSC::JIT::emit_op_get_property_enumerator):
(JSC::JIT::emit_op_enumerator_next):
(JSC::JIT::emit_enumerator_has_propertyImpl):
(JSC::JIT::emit_op_enumerator_get_by_val):
(JSC::JIT::emit_op_enumerator_in_by_val):
(JSC::JIT::emit_op_enumerator_has_own_property):

  • jit/JITThunks.cpp:
  • jit/JITThunks.h:
  • jit/SlowPathCall.cpp:

(JSC::JITSlowPathCall::call):
(JSC::JITSlowPathCall::generateThunk):

  • jit/SlowPathCall.h:

(JSC::JITSlowPathCall::JITSlowPathCall):

  • jit/ThunkGenerators.cpp:

(JSC::handleExceptionGenerator):
(JSC::checkExceptionGenerator):

  • jit/ThunkGenerators.h:

Source/WTF:

  • wtf/PlatformEnable.h:

Remove EXTRA_CTI_THUNKS define (now always on on all platforms)

7:16 AM Changeset in webkit [290646] by Wenson Hsieh
  • 27 edits
    4 adds in trunk

focus({preventScroll: true}) does not prevent scrolling on iOS
https://bugs.webkit.org/show_bug.cgi?id=236584
rdar://88911184

Reviewed by Simon Fraser.

Source/WebCore:

Plumb FocusOptions through Element::dispatchFocusEvent() as well as the chrome client hooks for
elementDidRefocus and elementDidFocus, instead of just a FocusDirection flag.

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

  • dom/Element.cpp:

(WebCore::Element::focus):
(WebCore::Element::dispatchFocusEvent):

  • dom/Element.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::dispatchFocusEvent):

  • html/HTMLSelectElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::dispatchFocusEvent):

  • html/HTMLTextFormControlElement.h:
  • loader/EmptyClients.h:
  • page/ChromeClient.h:

(WebCore::ChromeClient::elementDidFocus):
(WebCore::ChromeClient::elementDidRefocus):

  • page/FocusController.cpp:

(WebCore::dispatchEventsOnWindowAndFocusedElement):
(WebCore::FocusController::setFocusedElement):

Source/WebKit:

Add support for preventScroll on iOS by avoiding UI-side zooming/scrolling to reveal the focused element if it
was focused with preventScroll: true. See below for more details.

Tests: fast/forms/select-focus-prevent-scroll.html

fast/forms/text-field-focus-prevent-scroll.html

  • Shared/FocusedElementInformation.cpp:

(WebKit::FocusedElementInformation::encode const):
(WebKit::FocusedElementInformation::decode):

  • Shared/FocusedElementInformation.h:

Add a boolean flag to FocusedElementInformation to indicate whether or not scrolling to reveal the focused
element should be prevented.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _zoomToRevealFocusedElement]):

Only zoom to reveal the focused element if the focused element information's preventScroll flag is NO.

(-[WKContentView _elementDidBlur]):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::elementDidFocus):
(WebKit::WebChromeClient::elementDidRefocus):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::elementDidRefocus):
(WebKit::WebPage::elementDidFocus):

Use FocusOptions to set the preventScroll flag when propagating FocusedElementInformation.

  • WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/ios:

Adjust the method signature of elementDidFocus. See WebCore ChangeLog for more information.

  • WebCoreSupport/WebChromeClientIOS.h:
  • WebCoreSupport/WebChromeClientIOS.mm:

(WebChromeClientIOS::elementDidFocus):

Source/WebKitLegacy/mac:

Adjust the method signature of elementDidFocus. See WebCore ChangeLog for more information.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::elementDidFocus):

LayoutTests:

Add a couple of new layout tests to verify that passing in { preventScroll: true } for focus options causes
us to avoid scrolling to reveal focused select elements and text fields.

  • fast/forms/select-focus-prevent-scroll-expected.txt: Added.
  • fast/forms/select-focus-prevent-scroll.html: Added.
  • fast/forms/text-field-focus-prevent-scroll-expected.txt: Added.
  • fast/forms/text-field-focus-prevent-scroll.html: Added.
  • resources/ui-helper.js:

Also make it safe to call waitForInputSessionToDismiss() in a platform-agnostic test, by bailing early if
we're not on iOS, using WebKit2.

7:09 AM Changeset in webkit [290645] by Alan Bujtas
  • 6 edits
    2 adds in trunk

REGRESSION (r273129): Text contents in <span> with opacity not repainting/updating when sibling element has "will-change: transform"
https://bugs.webkit.org/show_bug.cgi?id=236876
<rdar://problem/89180092>

Reviewed by Simon Fraser.

Source/WebCore:

This patch implements a slightly naive repaint for inline boxes with self painting layers.

  1. Mark the line when it gains an inline box (RenderInline) with self painting layer (e.g. <span style="position: relative">this has dedicated layer</span>)
  2. Issue repaint at the end of the line layout on such renderers.

Test: fast/repaint/inline-box-with-self-paint-layer.html

  • rendering/LegacyInlineFlowBox.cpp:

(WebCore::LegacyInlineFlowBox::addToLine):

  • rendering/LegacyInlineFlowBox.h:

(WebCore::LegacyInlineFlowBox::LegacyInlineFlowBox):
(WebCore::LegacyInlineFlowBox::hasSelfPaintInlineBox const):

  • rendering/LegacyLineLayout.cpp:

(WebCore::repaintSelfPaintInlineBoxes):
(WebCore::LegacyLineLayout::layoutRunsAndFloats):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::clippedOverflowRect const): expand the ASSERT to enclsing inline boxes too.

LayoutTests:

  • fast/repaint/inline-box-with-self-paint-layer-expected.html: Added.
  • fast/repaint/inline-box-with-self-paint-layer.html: Added.
6:42 AM Changeset in webkit [290644] by graouts@webkit.org
  • 6 edits in trunk

[web-animations] web-animations/interfaces/Animatable/getAnimations-iframe.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237314

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Add a new test to check that both Document.getAnimations() and Element.getAnimations() correctly
update layout on the owner document.

  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-iframe-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-iframe.html:

Source/WebCore:

We need to update the layout of a potential owner document in case some layout-dependent media queries
trigger declarative animations.

  • dom/Document.cpp:

(WebCore::Document::matchingAnimations):

  • dom/Element.cpp:

(WebCore::Element::getAnimations):

6:32 AM Changeset in webkit [290643] by commit-queue@webkit.org
  • 8 edits
    5 adds in trunk

WebGL GPUP OpenGL context is not used even if WebGL via Metal is deselected
https://bugs.webkit.org/show_bug.cgi?id=236505

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-01
Reviewed by Myles C. Maxfield.

Source/WebCore:

Encode, decode also useMetal property.

Tests: webgl/webgl-via-metal-flag-off.html

webgl/webgl-via-metal-flag-on.html

  • platform/graphics/GraphicsContextGLAttributes.h:

(WebCore::GraphicsContextGLAttributes::encode const):
(WebCore::GraphicsContextGLAttributes::decode):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.cpp:
  • Shared/WebCoreArgumentCoders.h:

LayoutTests:

  • webgl/resources/test-shader-implementation-language.js: Added.

(runTest):

  • webgl/webgl-via-metal-flag-off-expected.txt: Added.
  • webgl/webgl-via-metal-flag-off.html: Added.
  • webgl/webgl-via-metal-flag-on-expected.txt: Added.
  • webgl/webgl-via-metal-flag-on.html: Added.
6:23 AM Changeset in webkit [290642] by commit-queue@webkit.org
  • 18 edits
    1 move
    1 delete in trunk/Source

GraphicsContextGL related includes are inconsistent, slowing the build
https://bugs.webkit.org/show_bug.cgi?id=237270

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-03-01
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Remove include "GraphicsContextGL.h" from files not needing that.
Most notably, add ChromeClient.cpp and move the non-trivial
ChromeClient::createGraphicsContextGL() function to .cpp file, so
that ChromeClient.h does not need to include GraphicsContextGL.h.

This makes incremental compiles better, as not all changes to
GraphicsContextGL.h and its dependencies force big rebuilds.

GraphicsContextGL.h and dependents maintainance:

Remove unneeded forward declarations. Types referenced by overridden virtual
functions must already be declared. Remove forward declarartion ExtensionsGL,
the class was removed

Use forward declares instead of includes (MediaPlayer).

Remove RemoteGraphicsContextGLProxyBase.cpp/h, the use was removed.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLActiveInfo.h:
  • html/canvas/WebGLShaderPrecisionFormat.h:
  • inspector/InspectorShaderProgram.cpp:
  • page/ChromeClient.cpp: Renamed from Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp.

(WebCore::ChromeClient::createGraphicsContextGL const):

  • page/ChromeClient.h:
  • platform/HostWindow.h:
  • platform/graphics/GraphicsContextGL.h:
  • platform/graphics/GraphicsContextGLState.h:
  • platform/graphics/RemoteGraphicsContextGLProxyBase.h: Removed.
  • platform/graphics/angle/GraphicsContextGLANGLE.h:
  • platform/graphics/cocoa/IOSurface.mm:
  • platform/graphics/opengl/ExtensionsGLOpenGL.h:
  • platform/xr/openxr/OpenXRSwapchain.h:
  • platform/xr/openxr/PlatformXROpenXR.cpp:
  • platform/xr/openxr/PlatformXROpenXR.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
4:53 AM Changeset in webkit [290641] by Adrian Perez de Castro
  • 2 edits in trunk

[CMake] Build failure with libstdc++ (>= 6) when cross-compiling (fatal error: stdlib.h: No such file or directory)
https://bugs.webkit.org/show_bug.cgi?id=161697

Reviewed by Carlos Garcia Campos.

  • Source/cmake/WebKitCompilerFlags.cmake: Set LANG=C in compiler invocation to ensure its

output is consistent and the checks are independent from the system locale configuration.

3:24 AM Changeset in webkit [290640] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Explicitly disable style sharing for form controls
https://bugs.webkit.org/show_bug.cgi?id=237236

Reviewed by Antti Koivisto.

There was a typo introduced in bug 153768 and bug 138769, which essentially disables
style sharing completely for form controls. Let's make that explicit.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithControl): Removed.
(WebCore::Style::SharingResolver::canShareStyleWithElement const):

2:28 AM Changeset in webkit [290639] by Cameron McCormack
  • 26 edits
    5 adds in trunk

Make input element UA shadow tree creation lazy
https://bugs.webkit.org/show_bug.cgi?id=236747

Reviewed by Aditya Keerthi.

Source/WebCore:

We currently delay InputType creation for parser inserted elements until
just after the attributes have been set, so that we don't wastefully
create an InputType and the UA shadow tree creation if a non-text
type="" was specified on the tag. We don't do anything similar for
script inserted input elements. We could make the InputType creation
lazy, but most of the wasted time is due to the shadow tree creation.

This patch makes InputType shadow tree creation lazy by delaying it
until one of the following happens:

  1. the element is inserted into the document
  2. the type="" or value="" attributes are changed before the element is inserted into the document
  3. any DOM methods that need access to the innerTextElement() are called on the element before the element is inserted into the document

Not all places where we call innerTextElement() on the
HTMLInputElement are safe to lazily create the shadow trees, so we
have two accessors:

  • innerTextElement() returns the inner text element if it's been created already
  • innerTextElementCreatingShadowSubtreeIfNeeded will perform the lazy shadow tree construction if it hasn't already been done

Since the existing
createShadowSubtreeAndUpdateInnerTextElementEditability function has
more responsibility than just creating the subtree and ensuring the
editability is set appropriately, it's renamed to a more manageable
createShadowSubtree.

This change is a 0.5% progression on Speedometer 2.

Test: fast/forms/lazy-shadow-tree-creation.html

  • html/BaseDateAndTimeInputType.h:
  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseDateAndTimeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/ColorInputType.h:
  • html/ColorInputType.cpp:

(WebCore::ColorInputType::createShadowSubtree):
(WebCore::ColorInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/FileInputType.h:
  • html/FileInputType.cpp:

(WebCore::FileInputType::createShadowSubtree):
(WebCore::FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/InputType.cpp:

(WebCore::InputType::createShadowSubtree):
(WebCore::InputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/RangeInputType.h:
  • html/RangeInputType.cpp:

(WebCore::RangeInputType::createShadowSubtree):
(WebCore::RangeInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):

  • html/SearchInputType.h:
  • html/SearchInputType.cpp:

(WebCore::SearchInputType::createShadowSubtree):
(WebCore::SearchInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
Renamed createShadowSubtreeAndUpdateInnerTextElementEditability to
createShadowSubtree and remove the "isInnerTextElementEditable"
argument, since we can ask the element() for its value if needed.
createShadowSubtree is now also responsible for creating the shadow
root.

  • html/TextFieldInputType.h:
  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::createShadowSubtree):
(WebCore::TextFieldInputType::createShadowSubtreeAndUpdateInnerTextElementEditability):
Renamed. Ensure all shadow tree state is up to date now that it can be
created later.

  • html/InputType.h:
  • html/InputType.cpp:

(WebCore::InputType::createShadowSubtree):
(WebCore::InputType::hasCreatedShadowSubtree const):
New functions to create the shadow subtree if it hasn't been done
already, and to query whether it's been done.

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::innerTextElementCreatingShadowSubtreeIfNeeded):

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElementCreatingShadowSubtreeIfNeeded):

  • html/HTMLTextFormControlElement.h:
  • html/InputType.h:
  • html/InputType.cpp:

(WebCore::InputType::innerTextElementCreatingShadowSubtreeIfNeeded):
New functions to first create the shadow subtree before returning
innerTextElement(). HTMLTextAreaElement never lazily creates its
shadow subtree and so just returns innerTextElement().

  • html/HTMLInputElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createShadowSubtreeAndUpdateInnerTextElementEditability):
Deleted. Just call through to m_inputType->createShadowTree()
directly.

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::initializeInputType):
(WebCore::HTMLInputElement::updateType):
Don't immediately create the shadow tree.

(WebCore::HTMLInputElement::didFinishInsertingNode):
Create the shadow subtree now that the element's been inserted. No
need to call dataListMayHaveChanged since
TextFieldInputType::createShadowSubtree will now do this.

  • html/BaseDateAndTimeInputType.cpp:

(WebCore::BaseDateAndTimeInputType::updateInnerTextValue):
Ensure the shadow subtree is created since we need to poke at it.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::forwardEvent):
Don't forward the event if the shadow tree hasn't been created yet.

(WebCore::HTMLTextFormControlElement::setSelectionRange):
Ensure the shadow tree has been created. This is needed if the
selection APIs are called on the input element before it's inserted
into the document.

(WebCore::HTMLTextFormControlElement::visiblePositionForIndex const):
Assert that the shadow tree has been created, since editing
functionality should only be needed if the element's been inserted
into the document.

(WebCore::HTMLTextFormControlElement::setInnerTextValue):
Ensure the shadow tree has been created.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::handleTouchEvent):
Ensure the shadow tree has been created in case the event will change
the value.

(WebCore::RangeInputType::sliderTrackElement const):
Only return the element if it's been created.

(WebCore::RangeInputType::typedSliderThumbElement const):
Assert that the element has been created.

(WebCore::RangeInputType::dataListMayHaveChanged):
Only try to re-layout if the shadow tree has been created.

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isEmptyValue const):
Avoid creating the shadow subtree.

(WebCore::TextFieldInputType::forwardEvent):
Move the element assertion up to be consistent with other functions.

(WebCore::TextFieldInputType::innerTextElement const):
Don't assert, since this now can legitimately return null.

  • html/FileInputType.cpp:

(WebCore::FileInputType::disabledStateChanged):
(WebCore::FileInputType::attributeChanged):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::disabledStateChanged):
(WebCore::RangeInputType::attributeChanged):
(WebCore::RangeInputType::setValue):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::disabledStateChanged):
(WebCore::TextFieldInputType::readOnlyStateChanged):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::updateAutoFillButton):
(WebCore::TextFieldInputType::dataListMayHaveChanged):
Don't update the shadow tree contents if it hasn't been created yet.
createShadowTree is responsible for ensuring it creates the shadow
tree contents reflecting the current state.

LayoutTests:

  • fast/forms/lazy-shadow-tree-creation-expected.html: Added.
  • fast/forms/lazy-shadow-tree-creation.html: Added.
  • fast/forms/lazy-shadow-tree-creation.js: Added.

(supportsType):
(makeAndAppendInput):

  • LayoutTests/fast/forms/lazy-shadow-tree-creation-crash.html:
  • LayoutTests/fast/forms/lazy-shadow-tree-creation-crash-expected.html:

Crashtest.

  • fast/shadow-dom/style-resolver-sharing-expected.txt:

Update to account for the lazy shadow tree being created later.

2:15 AM Changeset in webkit [290638] by commit-queue@webkit.org
  • 9 edits
    4 adds in trunk/LayoutTests

[GLIB] Update test expectations and baselines. Unreviewed test gardening.
https://bugs.webkit.org/show_bug.cgi?id=237310

Patch by Arcady Goldmints-Orlov <Arcady Goldmints-Orlov> on 2022-03-01

  • platform/glib/css3/flexbox/line-wrapping-expected.txt:
  • platform/glib/fast/block/positioning/auto/vertical-lr/007-expected.txt:
  • platform/glib/fast/dom/scroll-reveal-top-overflow-expected.txt: Added.
  • platform/glib/tables/mozilla_expected_failures/dom/appendColGroup1-expected.txt:
  • platform/gtk/TestExpectations:
  • platform/gtk/fast/repaint/vertical-text-repaint-expected.txt: Added.
  • platform/gtk/fast/writing-mode/japanese-lr-selection-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
  • platform/wpe/fast/repaint/vertical-text-repaint-expected.txt: Added.
  • platform/wpe/fast/writing-mode/japanese-lr-selection-expected.txt:
  • platform/wpe/tables/mozilla_expected_failures/dom/appendCol1-expected.txt:
2:11 AM Changeset in webkit [290637] by Angelos Oikonomopoulos
  • 3 edits in trunk/Tools

[JSC] Implement chunking for the GNU parallel runner
https://bugs.webkit.org/show_bug.cgi?id=237028

Reviewed by Adrian Perez de Castro.

The GNU parallel runner can't keep up with the scheduling when using
multiple fast remotes. This results in poor CPU utilization on the
remotes and more waiting time.

As a quick fix, allow the user to specify a --gnu-parallel-chunk-size,
the value of which specifies the number of test jobs to schedule as a
unit (defaults to 1). Specifying a higher value means longer-running
jobs, so that GNU parallel can more efficiently schedule them.

  • Scripts/run-javascriptcore-tests:

(runJSCStressTests):

  • Scripts/run-jsc-stress-tests:
1:36 AM Changeset in webkit [290636] by basuke.suzuki@sony.com
  • 3 edits in trunk

[CMake] Disabling ENABLE_WEBCORE is ignored when cmake configuration runs again.
https://bugs.webkit.org/show_bug.cgi?id=237170

Reviewed by Fujii Hironori.

CMake variables which has chance to set from outside should be cached in CMake configuration cache.
Unless cacheing, the result of building the generated project is not consisitent because the other
configuration may run while building.

To make it complete, I've changed ENABLE_JAVASCRIPTCORE, ENABLE_WEBCORE and ENABLE_WEBKIT to option()
which is stored in cached and reused while building even if the confuguration runs again.

  • Source/cmake/OptionsPlayStation.cmake:
  • Source/cmake/WebKitCommon.cmake:
1:01 AM Changeset in webkit [290635] by Ziran Sun
  • 4 edits in trunk

[Selection] Selection Range should be clamped by the current value length
https://bugs.webkit.org/show_bug.cgi?id=237210

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Update the test expectations as some sub-tests are now passing.

  • web-platform-tests/html/semantics/forms/textfieldselection/selection-start-end-expected.txt:

Source/WebCore:

As per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#set-the-selection-range,
if start or end "is greater than the length of the relevant value of the text control, then set it to
the length of the relevant value of the text control".

This CL makes selection range clamp to the current value length.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):

12:55 AM Changeset in webkit [290634] by Matt Woodrow
  • 4 edits in trunk

Handle perpendicular containing blocks when computing available logical height.
https://bugs.webkit.org/show_bug.cgi?id=236953

Reviewed by Dean Jackson.

Source/WebCore:

Handles the case where the containing block uses a perpendicular writing mode
to the current box, and we need to check the containing block's width in order
to determine height.

Existing subgrid tests marked as passing.
These subgrid reftests were failing because the -expected files were rendering incorrectly
(which don't use subgrid).

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::availableLogicalHeightUsing const):

LayoutTests:

Existing subgrid tests marked as passing.

12:48 AM Changeset in webkit [290633] by Carlos Garcia Campos
  • 10 edits
    4 deletes in trunk

[ATSPI] Remove layout tests checking children added/removed notifications
https://bugs.webkit.org/show_bug.cgi?id=237272

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Do not send children-changed notifications to WTR observers.

  • accessibility/atspi/AccessibilityAtspi.cpp:

(WebCore::AccessibilityAtspi::childrenChanged):
(WebCore::AccessibilityAtspi::notifyChildrenChanged const): Deleted.

  • accessibility/atspi/AccessibilityAtspi.h:

LayoutTests:

Children changed notifications are not expected by any other tests because other ports don't support them. We
already have unit tests to ensure they work as expected so we can just remove the layout tests and ensure we
don't emit those notifications either.

  • accessibility/children-changed-sends-notification-expected.txt: Removed.
  • accessibility/children-changed-sends-notification.html: Removed.
  • accessibility/gtk/menu-list-unfocused-notifications-expected.txt:
  • accessibility/gtk/no-notification-for-unrendered-iframe-children-expected.txt: Removed.
  • accessibility/gtk/no-notification-for-unrendered-iframe-children.html: Removed.
  • platform/glib/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo-wk1/TestExpectations:
12:00 AM Changeset in webkit [290632] by sihui_liu@apple.com
  • 7 edits
    1 add in trunk

Migrate third-party IndexedDB data to GeneralStorageDirectory
https://bugs.webkit.org/show_bug.cgi?id=237283

Reviewed by Chris Dumez.

Source/WebKit:

In current storage layout, third-party IndexedDB data is stored in a subdirectory of top origin directory, e.g.
[IndexedDBDirectory]/[TopOrigin]/[ThirdPartyOrigin]/[Database]. First-party data is stored in the top origin
directory, e.g. [IndexedDBDirectory]/[TopOrigin]/[Database]. Our current migration code directly renames the
origin directory without checking whether it has subdirectory that is a third-party directory. That means,
[IndexedDBDirectory]/[TopOrigin]/ is moved to [GeneralStorageDirectory]/[TopOrigin]/[TopOrigin]/[IndexedDB]/,
and [IndexedDBDirectory]/[TopOrigin]/[ThirdPartyOrigin]/ is moved to
[GeneralStorageDirectory]/[TopOrigin]/[TopOrigin]/[IndexedDB]/[ThirdPartyOrigin] ([ThirdPartyOrigin]/ here is
treated as a database directory). This is wrong: the new third-party directory should actually be
[GeneralStorageDirectory]/[TopOrigin]/[ThirdPartyOrigin]/[IndexedDB]/.

To fix this, we now make sure only first-party data is migrated when first-party IndexedDB database is visited,
by moving only database directories under origin directory.

Test: IndexedDB.MigrateThirdPartyDataToGeneralStorageDirectory

  • NetworkProcess/storage/IDBStorageManager.cpp:

(WebKit::migrateOriginDataImpl):
(WebKit::IDBStorageManager::idbStorageOriginDirectory):
(WebKit::IDBStorageManager::migrateOriginData):
(WebKit::migrateOriginData): Deleted.

  • NetworkProcess/storage/IDBStorageManager.h:
  • NetworkProcess/storage/OriginStorageManager.cpp:

(WebKit::OriginStorageManager::StorageBucket::resolvedIDBStoragePath):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
  • TestWebKitAPI/Tests/WebKitCocoa/indexeddb-persistence-third-party.sqlite3: Added.

Feb 28, 2022:

11:47 PM Changeset in webkit [290631] by Diego Pino Garcia
  • 2 edits in trunk/Source/WebCore

[GTK] Unreviewed, non-unified build fix after 247791@main

  • platform/graphics/gbm/GBMDevice.h:
11:46 PM Changeset in webkit [290630] by Tyler Wilcock
  • 9 edits
    3 adds in trunk

AX: WebKit should ignore empty modals rather than trapping focus inside them
https://bugs.webkit.org/show_bug.cgi?id=237163

Reviewed by Chris Fleizach and Andres Gonzalez.

Source/WebCore:

Given this markup:

<div role="dialog" aria-modal="true">

<div aria-hidden="true">

<button>Close modal (inside modal)</button>

</div>

</div>

There is no accessible content inside this modal, but WebKit traps user focus inside,
making the rest of the page completely inaccessible.

With this patch we ignore modals that don't have accessible content.
We do this by walking the DOM to find any non-AX-ignored objects.

Because determining whether or not an element is ignored is dependent
on modals present on the page, this patch moves the call to ignoredFromModalPresence
out of AccessibilityObject::defaultObjectInclusion, as this function is
downstream of computeAccessibilityIsIgnored, and we need to call
that on objects inside modal candidates. Without this move, we would
recurse infinitely in AXObjectCache::modalElementHasAccessibleContent.

We now check whether an object is ignored due to modal presence in
AccessibilityObject::accessibilityIsIgnored(), so that function should
be used as the final say in determining whether an object is ignored.

Test: accessibility/ignore-modals-without-any-content.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::modalElementHasAccessibleContent):
(WebCore::AXObjectCache::currentModalNode):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::defaultObjectInclusion const):
(WebCore::AccessibilityObject::accessibilityIsIgnored const):

  • accessibility/AccessibilityObject.h:

(WebCore::AccessibilityObject::computeAccessibilityIsIgnored const):

LayoutTests:

  • accessibility/ignore-modals-without-any-content-expected.txt: Added.
  • accessibility/ignore-modals-without-any-content.html: Added.
  • platform/glib/TestExpectations: Skip new test.
  • platform/ios/TestExpectations: Enable new test.
  • platform/ios/accessibility/ignore-modals-without-any-content-expected.txt: Added.
  • platform/win/TestExpectations: Skip new test.
10:12 PM Changeset in webkit [290629] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[IPC] Do more hardening in WebSWServerConnection's client registration / unregistration
https://bugs.webkit.org/show_bug.cgi?id=237290
<rdar://88903506>

Reviewed by Alex Christensen.

Validate client identifiers sent by the WebContent process via IPC to make sure that the
process identifier of the client actually matches the process identifier of the process
we're connected to.

Also validate the SecurityOriginData to make sure it is not empty. We support sending
empty SecurityOriginData objects over IPC. However, they cannot be used as keys in
HashMaps.

If validation fails, we assume the WebContent process is compromised and we terminate it.

  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::registerServiceWorkerClient):
(WebKit::WebSWServerConnection::unregisterServiceWorkerClient):

8:54 PM Changeset in webkit [290628] by Simon Fraser
  • 4 edits
    6 adds in trunk

Compositing/paint invalidation with transforms
https://bugs.webkit.org/show_bug.cgi?id=233421
<rdar://problem/85814854>

Reviewed by Alan Bujtas.

Source/WebCore:

When changing transform from something like translate(0) to `translate3d(0, 0, 0)
scale(0.5, 0.5)`, we trigger compositing, and thus need to repaint the previous rect of the
layer in its old repaint container. However, the existing code would take the new transform
into account when computing that rect, thus dirtying a rect that is too small.

To fix this, we need to use the cached repaint rects on RenderLayer for this repaint.
However, doing so revealed a bug (via
compositing/shared-backing/repaint-into-shared-backing.html) in how we compute repaint
cached repaint rects in the presence of shared backing. During a compositing update, if a
layer's composited state changed, we'd call computeRepaintRectsIncludingDescendants(), which
computes rect relative to the layer's repaint container. But at this time, the state of
backing sharing in BackingSharingState is in flux (we essentially don't know yet if a layer
can use shared backing). So we may compute and cache repaint rects relative to the wrong
container.

To fix this, leverage the existing m_layersPendingRepaint logic, and delay computing the
repaint rects until we've established our final backing sharing configuration.

Tests: compositing/repaint/composite-and-scale-change.html

compositing/shared-backing/repaint-into-shared-backing-become-composited.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setBackingProviderLayer):
(WebCore::RenderLayer::calculateClipRects const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::BackingSharingState::issuePendingRepaints):
(WebCore::RenderLayerCompositor::updateBacking):

LayoutTests:

  • compositing/repaint/composite-and-scale-change-expected.txt: Added.
  • compositing/repaint/composite-and-scale-change.html: Added.

Test that dumps repaint rects.

  • compositing/shared-backing/repaint-into-shared-backing-become-composited-expected.html: Added.
  • compositing/shared-backing/repaint-into-shared-backing-become-composited.html: Added.

Companion to repaint-into-shared-backing.html but toggles compositing in the other
direction.

  • platform/gtk/compositing/repaint/composite-and-scale-change-actual.txt: Added.
  • platform/mac-wk1/compositing/repaint/composite-and-scale-change-expected.txt: Added.
7:24 PM Changeset in webkit [290627] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix use-after-move bug in NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=237294

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-28
Reviewed by Chris Dumez.

Luckily, they were just two booleans, and after you call std::move on a bool you get
technically undefined behavior. Luckily, in practice the bool value is unchanged.
We don't need to rely on that, though. Let's read from the location with defined behavior.

  • NetworkProcess/NetworkResourceLoader.cpp:
7:13 PM Changeset in webkit [290626] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

REGRESSION(r290470): CDMInstanceSession::setLogIdentifier must be guarded with !RELEASE_LOG_DISABLED
https://bugs.webkit.org/show_bug.cgi?id=237302

Unreviewed build fix.

  • GPUProcess/media/RemoteCDMInstanceSessionProxy.cpp:

(WebKit::RemoteCDMInstanceSessionProxy::setLogIdentifier):

7:00 PM Changeset in webkit [290625] by Simon Fraser
  • 10 edits in trunk

No animation when scroll snap scroller is navigated with the keyboard
https://bugs.webkit.org/show_bug.cgi?id=236244

Reviewed by Tim Horton.

Source/WebCore:

Keyboard-driven scrolls in overflow didn't animate, simply because scrollAnimatorEnabled()
wasn't implemented for RenderLayerScrollableArea.

I could not figure out a reliable way to test that we animated the scroll.

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const):

  • rendering/RenderLayerScrollableArea.h:

Tools:

In fixing this bug I ran into the issue predicted in https://bugs.webkit.org/show_bug.cgi?id=234456#c6.
As a workaround, explicitly set NSScrollAnimationEnabled to NO in both processes. This is a partial revert
of r287228 which I tried, and failed to fix via bug 234488.

  • WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:

(WTR::InjectedBundle::platformInitialize):

  • WebKitTestRunner/mac/main.mm:

(setDefaultsToConsistentValuesForTesting):

LayoutTests:

Turn off the scroll animator for these tests that assume that scrolling is instantaneous.

  • css3/scroll-snap/scroll-padding-overflow-paging.html:
  • fast/events/wheelevent-in-scrolling-div.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
6:38 PM Changeset in webkit [290624] by Robert Jenner
  • 2 edits in trunk/LayoutTests

[ iOS ] fast/mediastream/video-rotation-gpu-process-crash.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=237295

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-02-28

  • platform/ios/TestExpectations:
6:34 PM Changeset in webkit [290623] by sihui_liu@apple.com
  • 5 edits in trunk/Source/WebKit

[macOS] TestWebKitAPI.WebKit.MigrateLocalStorageDataToGeneralStorageDirectory is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=237065
<rdar://problem/89324250>

Reviewed by Darin Adler.

Revert r290544 as it does not fully fix the flaky test. The flakiness is caused by network process exiting
before transactions of SQLiteStorageArea are committed. In NetworkProcess::destroySession, we schedule a
background task to commit transactions in the session, and remove session. In NetworkProcess::didClose, for
existing sessions, we schedule tasks to commit transaction and wait until the tasks are finished before exiting
network process. That means for a session, when NetworkProcess::destroySession is called before
NetworkProcess::didClose, process may exit before commit task (scheduled by NetworkProcess::destroySession) is
finished (NetworkProcess::didClose does not wait because session is already removed).

To solve this issue, let NetworkProcess::didClose check existing NetworkStorageManagers, instead of
NetworkSessions. NetworkStorageManager can outlive NetworkSession when it's finishing cleanup task
(including committing transactions) on its background thread; we want to ensure process exits after the cleanup
task is done.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::didClose):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::allNetworkStorageManagers):
(WebKit::NetworkStorageManager::forEach):
(WebKit::NetworkStorageManager::NetworkStorageManager):
(WebKit::NetworkStorageManager::~NetworkStorageManager):

  • NetworkProcess/storage/NetworkStorageManager.h:
  • NetworkProcess/storage/SQLiteStorageArea.cpp:

(WebKit::SQLiteStorageArea::SQLiteStorageArea):
(WebKit::SQLiteStorageArea::startTransactionIfNecessary):
(WebKit::SQLiteStorageArea::commitTransactionIfNecessary):
(WebKit::commitTransactionsAtExit): Deleted.

5:03 PM Changeset in webkit [290622] by Robert Jenner
  • 4 edits in trunk/LayoutTests

REBASELINE [ iOS15 ] fast/text/khmer-lao-font.html is a constant text failure
<rdar://88841324>

Unreviewed test gardening. Rebaseline for iOS15.

  • platform/ios-wk2/TestExpectations:
  • platform/ios-wk2/fast/text/khmer-lao-font-expected.txt:
  • platform/ios/fast/text/khmer-lao-font-expected.txt:
4:59 PM Changeset in webkit [290621] by jer.noble@apple.com
  • 17 edits in trunk/Source

[Cocoa] Adopt -streamDataParser:didProvideContentKeySpecifier:forTrackID: delegate callback
https://bugs.webkit.org/show_bug.cgi?id=236109
<rdar://problem/88785844>

Reviewed by Eric Carlson.

Source/WebCore:

Re-land support after a rollout in r290311, this time with an off-by-default Experimental Feature
flag.

In addition to checking whether the renderer classes support AVContentKeySession, also check whether
the RuntimeSetting has been enabled. This requires passing that setting through to the
MediaSessionManagerCocoa singleton, so it can be accessed from platform/.

If the renderer support check succeeds and the setting is enabled, only then should the delegate for
AVStreamDataParser include support for the new -didProvideContentKeySpecifier callback. Subclass the
WebAVStreamDataParserListener into a new WebAVStreamDataParserWithKeySpecifierListener object, and
instantiate one or the other according to the support checks above.

  • page/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::setSampleBufferContentKeySessionSupportEnabled):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::sampleBufferContentKeySessionSupportEnabled const):

  • platform/audio/cocoa/MediaSessionManagerCocoa.h:
  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(WebCore::MediaSessionManagerCocoa::setSampleBufferContentKeySessionSupportEnabled):
(WebCore::MediaSessionManagerCocoa::sampleBufferContentKeySessionSupportEnabled):

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

(-[WebAVStreamDataParserWithKeySpecifierListener streamDataParser:didProvideContentKeySpecifier:forTrackID:]):
(WebCore::SourceBufferParserAVFObjC::SourceBufferParserAVFObjC):
(-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeySpecifier:forTrackID:]): Deleted.

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

(WebCore::sampleBufferRenderersSupportKeySession):

Source/WebKit:

Pass the new RuntimeEnabledFeature through to the GPU process.

  • GPUProcess/GPUProcess.cpp:

(WebKit::GPUProcess::setSampleBufferContentKeySessionSupportEnabled):

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

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

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

(WebKit::GPUProcessProxy::updatePreferences):

  • UIProcess/GPU/GPUProcessProxy.h:

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
4:14 PM Changeset in webkit [290620] by Wenson Hsieh
  • 10 edits in trunk/Tools

Add API testing infrastructure for "Markup Image" and "Copy Cropped Image"
https://bugs.webkit.org/show_bug.cgi?id=236519
rdar://89154213

Reviewed by Tim Horton.

Add API testing support (as well as a new API test) for the "Markup Image" flow.

  • TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:

(TestWebKitAPI::TEST):
(TestWebKitAPI::invokeImageMarkupAction):

  • TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:

Add an API test that triggers the "Markup Image" action, and verifies the following:

  • The first image is replaced with the canned image result (a 215-px-wide image of the WebKit logo).
  • The selection range is effectively unchanged.
  • TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.h:
  • TestWebKitAPI/cocoa/ImageAnalysisTestingUtilities.mm:

Add a declaration for ImageAnalysisMarkupSwizzler, a helper class that is used in the new API test to make
VisionKit return a canned image and cropped rect when invoking the SPI that corresponds to "Markup Image"; see
WebKitAdditions change for more information.

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView selectedText]):

  • TestWebKitAPI/ios/TestUIMenuBuilder.h:
  • TestWebKitAPI/ios/TestUIMenuBuilder.mm:

(-[TestUIMenuBuilder actionWithTitle:]):

Refactor and rename this to return the found UIAction instead of just a BOOL indicating whether or not it could
be found, and change existing call sites above to use EXPECT_NULL and EXPECT_NOT_NULL.

(-[TestUIMenuBuilder containsActionWithTitle:]): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
3:48 PM Changeset in webkit [290619] by pvollan@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] Weak link AVPictureInPictureController
https://bugs.webkit.org/show_bug.cgi?id=237227
<rdar://76011860>

Reviewed by Brent Fulgham.

Weak linking instead of soft linking should be a small performance improvement.

  • Configurations/WebCore.xcconfig:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(WebCore::supportsPictureInPicture):

3:26 PM Changeset in webkit [290618] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

Remove release assert when UI process is blocking IOSurface IOKit access
https://bugs.webkit.org/show_bug.cgi?id=237278

Reviewed by Darin Adler.

Remove release assert in IOSurface::bytesPerRowAlignment() when UI process is blocking IOSurface IOKit access.
Instead, log this event, and return an appropriate value.

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::bytesPerRowAlignment):

3:24 PM Changeset in webkit [290617] by Brandon
  • 2 edits in trunk

Add Brandon Stewart's name to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=237288

Reviewed by Saam Barati.

Add Brandon Stewart's name to contributors.json

  • metadata/contributors.json:
3:09 PM Changeset in webkit [290616] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, address feedback from Darin regarding r290610.

  • platform/graphics/Color.h:

(WebCore::add):

2:09 PM Changeset in webkit [290615] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

Handle widow relayout differently
https://bugs.webkit.org/show_bug.cgi?id=235519

Patch by Rob Buis <rbuis@igalia.com> on 2022-02-28
Reviewed by Alan Bujtas.

Source/WebCore:

Handle widow relayout differently to prevent function call recursion.

Test: fast/multicol/widow-many-relayouts-crash.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::relayoutToAvoidWidows): Deleted.

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow const):

LayoutTests:

  • fast/multicol/widow-many-relayouts-crash-expected.txt: Added.
  • fast/multicol/widow-many-relayouts-crash.html: Added.
1:48 PM Changeset in webkit [290614] by chris.reid@sony.com
  • 2 edits in trunk/Tools

[Win] vswhere should search for Visual Studio Build tools
https://bugs.webkit.org/show_bug.cgi?id=237229

Reviewed by Ross Kirsling.

  • Scripts/webkitdirs.pm:
1:19 PM Changeset in webkit [290613] by Devin Rousso
  • 13 edits in trunk/Source

Web Inspector: [Flexbox] Add options to show each area's CSS order and/or DOM index in the parent flex container
https://bugs.webkit.org/show_bug.cgi?id=237215

Reviewed by Patrick Angle.

This will help developers better understand how CSS order and the DOM index of each flex
item interact and result in what's eventually rendered.

Source/JavaScriptCore:

  • inspector/protocol/DOM.json:

Add an optional boolean parameter to DOM.showFlexOverlay:

  • showOrderNumbers controls whether labels with the computed CSS order value are shown over each flex item's area.

Source/WebCore:

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::showFlexOverlay):
Pass along the optional boolean parameter showOrderNumbers.

  • inspector/InspectorOverlay.h:

(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::encode const):
(WebCore::InspectorOverlay::Highlight::FlexHighlightOverlay::decode):
Add member bool for showOrderNumbers to Flex::Config.
Add member Vector<InspectorOverlayLabel> to FlexHighlightOverlay for drawing labels.

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::drawFlexOverlay):
(WebCore::InspectorOverlay::buildFlexOverlay):
Use showOrderNumbers to (when enabled) add items to Vector<InspectorOverlayLabel> for
each flex item's computed CSS order and DOM index in the parent flex container.

Source/WebInspectorUI:

  • UserInterface/Base/Setting.js:

Add global WI.Setting for flexOverlayShowOrderNumbers.

  • UserInterface/Models/DOMNode.js:

(WI.DOMNode.prototype.set layoutContextType): Added.
(WI.DOMNode.prototype.showLayoutOverlay): Added.
(WI.DOMNode.prototype.hideLayoutOverlay): Added.
(WI.DOMNode.prototype._handleLayoutOverlaySettingChanged): Renamed from _handleGridLayoutOverlaySettingChanged.
Listen for changes to the above WI.Setting and include the value when invoking DOM.showFlexOverlay.

  • UserInterface/Views/CSSFlexNodeOverlayListSection.js:

(WI.CSSFlexNodeOverlayListSection.prototype.initialLayout): Added.
Add UI for the above WI.Setting.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/CSSGridNodeOverlayListSection.js:

(WI.CSSGridNodeOverlayListSection.prototype.initialLayout):
Drive-by: Adjust a WI.UIString to avoid possible future clashing.

1:00 PM Changeset in webkit [290612] by Devin Rousso
  • 5 edits
    3 adds in trunk

Web Inspector: add IterableWeakSet
https://bugs.webkit.org/show_bug.cgi?id=237141

Reviewed by Patrick Angle.

Source/WebInspectorUI:

This allows clients to have a way to have an iterable collection that doesn't keep the
objects in the collection alive. We cannot just use WeakSet as it's not iterable (the
former) or Array/Set as it keeps the objects alive (the latter).

IterableWeakSet is a combination of:

  • a Set of WeakRef for each object, which gives us iterability with order preserved
  • a WeakMap of each object mapping to the wrapper WeakRef in the Set (see below)
  • a FinalizationRegistry to remove the wrapper WeakRef when the object is destroyed
  • UserInterface/Base/IterableWeakSet.js: Added.

(IterableWeakSet):
(IterableWeakSet.prototype.get size):
(IterableWeakSet.prototype.has):
(IterableWeakSet.prototype.add):
(IterableWeakSet.prototype.delete):
(IterableWeakSet.prototype.take):
(IterableWeakSet.prototype.clear):
(IterableWeakSet.prototype.keys):
(IterableWeakSet.prototype.values):
(IterableWeakSet.prototype.Symbol.iterator):
(IterableWeakSet.prototype.copy):
(IterableWeakSet.prototype.toJSON):
(IterableWeakSet.prototype.get _finalizationRegistry):
We could just have a Set/Array of WeakRef, but that would require iterating the entire
array to find the WeakRef that matches the given object, which is less efficient.

  • UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:

(WI.GridOverlayConfigurationDiagnosticEventRecorder):
Don't keep WI.DOMNode that are layoutOverlayShowing alive in order to record diagnostics.

  • UserInterface/Main.html:
  • UserInterface/Test.html:

LayoutTests:

  • inspector/unit-tests/iterableweakset.html: Added.
  • inspector/unit-tests/iterableweakset-expected.txt: Added.
12:26 PM Changeset in webkit [290611] by Robert Jenner
  • 2 edits
    1 delete in trunk/LayoutTests

REGRESSION(r288070): [ Monterey ] platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment.html is a constant text failure.
https://bugs.webkit.org/show_bug.cgi?id=236857

Unreviewed test gardening.

Patch by Matteo Flores <Matteo Flores> on 2022-02-28

  • platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.txt: Removed.
  • platform/mac/platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.txt: Previous file was in platform/mac/fast... instead of platform/mac/platform/mac/fast...
11:59 AM Changeset in webkit [290610] by Chris Dumez
  • 17 edits in trunk

Adopt the modern Hasher more widely
https://bugs.webkit.org/show_bug.cgi?id=237262

Reviewed by Sam Weinig.

Source/WebCore:

  • dom/MessagePortIdentifier.h:

(WebCore::add):
(WTF::MessagePortIdentifierHash::hash):
(WebCore::MessagePortIdentifier::hash const): Deleted.

  • history/BackForwardItemIdentifier.h:

(WebCore::add):
(WTF::BackForwardItemIdentifierHash::hash):
(WebCore::BackForwardItemIdentifier::hash const): Deleted.

  • loader/ResourceCryptographicDigest.h:

(WebCore::add):
(WTF::DefaultHash<WebCore::ResourceCryptographicDigest>::hash):

  • platform/graphics/Color.h:

(WebCore::add):
(WebCore::Color::hash const): Deleted.

  • platform/graphics/ColorHash.h:

(WTF::ColorHash::hash):

  • platform/graphics/Font.cpp:

(WebCore::add):
(WebCore::CharacterFallbackMapKeyHash::hash):

  • platform/graphics/FontCache.cpp:

(WebCore::add):
(WebCore::FontPlatformDataCacheKeyHash::hash):
(WebCore::FontCascadeCacheKeyHash::hash): Deleted.

  • platform/graphics/FontCache.h:

(WebCore::add):
(WebCore::FontCascadeCacheKeyHash::hash):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::add):
(WebCore::FontFamilySpecificationKeyHash::hash):

  • platform/graphics/cocoa/SystemFontDatabaseCoreText.h:

(WebCore::add):
(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::Hash::hash):
(WebCore::SystemFontDatabaseCoreText::CascadeListParameters::hash const): Deleted.

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::add):
(WebCore::FallbackFontDescriptionKeyHash::hash):

Source/WebKit:

  • NetworkProcess/cache/NetworkCache.h:

(WebKit::NetworkCache::add):
(WTF::GlobalFrameIDHash::hash):
(WebKit::NetworkCache::GlobalFrameID::hash const): Deleted.

  • Platform/IPC/StringReference.cpp:

(IPC::StringReference::Hash::hash):

  • Platform/IPC/StringReference.h:

(IPC::add):

11:57 AM Changeset in webkit [290609] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Fix typo in adattributiond sandbox
https://bugs.webkit.org/show_bug.cgi?id=237279

Patch by Alex Christensen <achristensen@webkit.org> on 2022-02-28
Reviewed by Chris Dumez.

After this change, it matches the value in com.apple.webkit.adattributiond.plist

  • Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb:
11:18 AM Changeset in webkit [290608] by Angelos Oikonomopoulos
  • 2 edits in trunk/Tools

[webkit-patch] Allow user to opt out of browser for viewing the diff
https://bugs.webkit.org/show_bug.cgi?id=220925

Reviewed by Jonathan Bedard.

The user may legitimately have a browser installed yet not want to
use it to view the diff.

  • Scripts/webkitpy/common/system/user.py:

(User.can_open_url):

11:10 AM Changeset in webkit [290607] by Ross Kirsling
  • 2 edits in trunk/Source/WebKit

REGRESSION(r290588): Broke WinCairo and PlayStation debug builds
https://bugs.webkit.org/show_bug.cgi?id=237277

Unreviewed build fix.

  • Scripts/webkit/messages.py:

(conditions_for_header):

10:30 AM Changeset in webkit [290606] by Aditya Keerthi
  • 5 edits
    7 adds in trunk

[macOS] Unable to upload ".pages" files to file inputs accepting ".pages" and ".jpeg" files
https://bugs.webkit.org/show_bug.cgi?id=237219
rdar://89482882

Reviewed by Tim Horton and Said Abou-Hallawa.

Source/WebCore:

In r264286, WebKit began transcoding images of an unsupported format
to a supported format, for file inputs that accepted image types. For
example, selecting a HEIF image in an input that accepts JPEG images
would transcode the selected image to a JPEG image.

In order to determine when attempt transcoding, the logic added in
r264286 obtains the MIME type corresponding to the selected file's
extension, and compares that to the list of accepted MIME types.
If there is a mismatch, transcoding is attempted.

The ".pages" extension does not have a well-defined MIME type in
NSURLFileTypeMappings. This is due to the fact that a the extension
maps to both a file and a package type. Consequently, the retrieved
MIME type for ".pages" files is an empty string. Following r227051,
when the file input also accepts an image type, WebKit attempts to
transcode these files, and any others that do not have a well-defined
MIME type.

While the aforementioned behavior can be considered strange, it is not
an issue in practice, since WebKit will attempt to transcode the
image, fail to do so, and upload the original file. The failure is
detected in CGImageDestinationFinalize, which returns false if an image
was not successfully written. However, a recent regression in the
ImageIO framework is causing CGImageDestinationFinalize to return true,
even if image transcoding fails. This results in WebKit uploading a
zero byte JPEG file, when a user attempts to upload ".pages" files to
file inputs accepting ".pages" and ".jpeg" files.

Ideally, the described issue would be resolved by a fix in ImageIO.
However, a more immediate solution exists in WebKit: only attempt to
transcode files to an accepted image type, if the file selected is
image. ".pages" files are not images, and WebKit should not attempt
to transcode them. See below for further explanation of the solution.

Test: fast/forms/file/entries-api/pages-jpeg-open-panel.html

  • platform/graphics/cg/ImageUtilitiesCG.cpp:

(WebCore::transcodeImage):

Prior to using ImageIO to perform transcoding, WebKit obtains a Uniform
Type Identifier for the selected file using CGImageSourceCreateWithURL
and CGImageSourceGetType. If the file is not an image, a null string is
returned. WebKit can use this information to avoid the transcoding
attempt, and avoid calls to ImageIO methods further down this method.
Specifically, this solution works around the ImageIO bug by avoiding
the call to CGImageDestinationFinalize for non-images. The solution is
also an overall improvement, as WebKit now avoids unnecessary calls to
multiple ImageIO methods, in cases where we know transcoding will fail.

LayoutTests:

Add a layout test that contains a file input that accepts ".pages" and
".jpeg" files, and attempts to upload a ".pages" file.

  • TestExpectations:
  • fast/forms/file/entries-api/pages-jpeg-open-panel-expected.txt: Added.
  • fast/forms/file/entries-api/pages-jpeg-open-panel.html: Added.
  • fast/forms/file/entries-api/pdf-jpeg-open-panel-expected.txt: Added.
  • fast/forms/file/entries-api/pdf-jpeg-open-panel.html: Added.
  • fast/forms/file/entries-api/resources/documents/document.pages: Added.
  • fast/forms/file/entries-api/resources/documents/document.pdf: Added.
  • platform/mac-wk2/TestExpectations:
10:06 AM Changeset in webkit [290605] by Jonathan Bedard
  • 9 edits in trunk/Tools

Unreviewed, reverting r290583.

Breaks webkit-patch

Reverted changeset:

"'run-benchmark' script should log http requests during
benchmark run."
https://bugs.webkit.org/show_bug.cgi?id=237076
https://commits.webkit.org/r290583

10:03 AM Changeset in webkit [290604] by Simon Fraser
  • 7 edits in trunk

Revert r290548

It caused three tests to start failing.

Source/WebCore:

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const): Deleted.

  • rendering/RenderLayerScrollableArea.h:

LayoutTests:

  • css3/scroll-snap/scroll-padding-overflow-paging.html:
  • fast/events/wheelevent-in-scrolling-div.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
10:00 AM Changeset in webkit [290603] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Use DeferTerminationForAWhile in Interpreter::unwind
https://bugs.webkit.org/show_bug.cgi?id=237176

Reviewed by Mark Lam.

If we're unwinding the stack due to a regular exception (not a TerminationException), then
we want to use a DeferTerminationForAWhile scope. This is because we want to avoid a
TerminationException being raised (due to a concurrent termination request) in the middle
of unwinding. The unwinding code only checks if we're handling a TerminationException before
it starts unwinding and is not expecting this status to change in the middle. Without the
DeferTerminationForAWhile scope, control flow may end up in an exception handler, and effectively
"catch" the newly raised TerminationException, which should not be catchable.

On the other hand, if we're unwinding the stack due to a TerminationException, we do not need
nor want the DeferTerminationForAWhile scope. This is because on exit, DeferTerminationForAWhile
will set the VMTraps NeedTermination bit if termination is in progress. The system expects the
NeedTermination bit to be have been cleared by VMTraps::handleTraps() once the TerminationException
has been raised. Some legacy client apps relies on this and expects to be able to re-enter the
VM after it exits due to termination. If the NeedTermination bit is set, upon re-entry, the
VM will behave as if a termination request is pending and terminate almost immediately, thereby
breaking the legacy client apps.

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::notifyDebuggerOfUnwinding):
(JSC::sanitizeRemoteFunctionException):
(JSC::Interpreter::unwind):
(JSC::notifyDebuggerOfUnwinding): Deleted.

9:49 AM Changeset in webkit [290602] by Russell Epstein
  • 1 copy in tags/Safari-613.1.17.1.10

Tag Safari-613.1.17.1.10.

9:49 AM Changeset in webkit [290601] by Russell Epstein
  • 8 edits
    2 deletes in branches/safari-613.1.17.1-branch

Revert r290518. rdar://problem/86582214

9:45 AM Changeset in webkit [290600] by Russell Epstein
  • 9 edits in branches/safari-613.1.17.1-branch/Source

Versioning.

WebKit-7613.1.17.1.10

9:37 AM Changeset in webkit [290599] by commit-queue@webkit.org
  • 6 edits in trunk/Tools

Enable python3 for lighttpd
https://bugs.webkit.org/show_bug.cgi?id=236938

Patch by Pascal Abresch <nep@packageloss.eu> on 2022-02-28
Reviewed by Darin Adler.

This is needed for the Haiku port to use the python3 tests.
This patch also removes the PHP support since all PHP tests have been removed and there are
currently no plans to include new ones in the future.

  • Scripts/webkitpy/layout_tests/servers/http_server.py:

(Lighttpd._prepare_config):

  • Scripts/webkitpy/layout_tests/servers/lighttpd.conf:
9:10 AM Changeset in webkit [290598] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] web-animations/interfaces/Animatable/getAnimations.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237271

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/Animatable/getAnimations-expected.txt:

Source/WebCore:

Our computation for the relevant state did not account for the playback rate. We rewrite
the function to match the spec exactly.

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::computeRelevance):

8:38 AM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
8:32 AM Changeset in webkit [290597] by commit-queue@webkit.org
  • 2 edits in trunk

-Wodr warning spam caused by ENABLE(BINDING_INTEGRITY)
https://bugs.webkit.org/show_bug.cgi?id=229867
<rdar://problem/82975115>

Patch by Michael Catanzaro <Michael Catanzaro> on 2022-02-28
Reviewed by Carlos Garcia Campos.

Build WebKit with -Wno-odr. This warning is not salvagable, and it's impossible to suppress
locally.

  • Source/cmake/WebKitCompilerFlags.cmake:

2022-02-24 Matt Woodrow <Matt Woodrow>

Unreviewed, update my (Matt Woodrow) status to committer.

  • metadata/contributors.json:
7:52 AM WebKitGTK/2.36.x edited by Michael Catanzaro
(diff)
7:36 AM Changeset in webkit [290596] by Jonathan Bedard
  • 3 edits in trunk/Tools

[run-webkit-tests] Use Python 3 (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=226658
<rdar://problem/78882016 >

Reviewed by Ryan Haddad.

  • Tools/CISupport/ews-build/steps.py:

(RunWebKitTests): Change invocation to Python 3.

  • Tools/CISupport/ews-build/steps_unittest.py:

(test_success):
(test_warnings):

Canonical link: https://commits.webkit.org/247872@main

6:50 AM Changeset in webkit [290595] by commit-queue@webkit.org
  • 4 edits
    3 adds in trunk

FTP EPLF does not handle directory
https://bugs.webkit.org/show_bug.cgi?id=45113

Patch by Pascal Abresch <nep@packageloss.eu> on 2022-02-28
Reviewed by Darin Adler.

The code used "!result.type" to check for an invalid type. However,
the first type in the FTPEntryType enum is FTPDirectoryEntry, so this
was actually returning true for directories, turning them into "junk"
entries which would not be listed.

Since the code for EPLF can only result in either files, directories,
or uninitialized/junk entries, the check can be removed, returning
result.type is the correct thing to do in all 3 cases.
Source/WebCore:

Test: http/tests/misc/ftp-eplf-directory.py

  • loader/FTPDirectoryParser.cpp:

(WebCore::parseOneFTPLine):

LayoutTests:

  • http/tests/misc/ftp-eplf-directory-expected.txt: Added.
  • http/tests/misc/ftp-eplf-directory.py: Added.
  • platform/gtk/TestExpectations:
6:01 AM Changeset in webkit [290594] by commit-queue@webkit.org
  • 4 edits
    1 add in trunk/Source/WebKit

REGRESSION(r290588) Missing symbol jsValueForDecodedMessage<107> (IPCStreamTesterProxy_WasCreated)
https://bugs.webkit.org/show_bug.cgi?id=237268

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-28
Reviewed by Antti Koivisto.

Add the class IPCStreamTesterProxy now that *MessageReceiver.cpp
are needed. After commit
"IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to compile"
MessageReceiver.cpp files contain also message-specific functions that
need to be compiled, even though IPCStreamTesterProxy itself is not
used.

  • Shared/IPCStreamTesterProxy.h: Added.
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
2:47 AM Changeset in webkit [290593] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.36

Merge r290586 - [ATSPI] Always expose table cells (layout and CSS) that have rendered text content
https://bugs.webkit.org/show_bug.cgi?id=237204

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):

LayoutTests:

  • accessibility/gtk/nested-block-element-children-expected.txt: Rebaseline.
  • platform/glib/TestExpectations: Remove accessibility/generated-content-with-display-table-crash.html.
  • platform/gtk/TestExpectations: Remove accessibility/gtk/nested-block-element-children.html.
2:47 AM Changeset in webkit [290592] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.36

Merge r290585 - [GTK][a11y] Test accessibility/gtk/xml-roles-exposed.html is failing since ATSPI switch
https://bugs.webkit.org/show_bug.cgi?id=237202

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Handle the special case of form item having unknown aria role to be exposed as landmark.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::effectiveRole const):

LayoutTests:

  • platform/gtk/TestExpectations: Remove accessibility/gtk/xml-roles-exposed.html.
  • platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt: Rebaseline.
2:18 AM Changeset in webkit [290591] by youenn@apple.com
  • 17 edits in trunk/Source/WebKit

RemoteVideoFrameObjectHeap should process its IPC messages in a background thread
https://bugs.webkit.org/show_bug.cgi?id=237198

Reviewed by Darin Adler.

Minor refactoring to have addWorkQueueMessageReceiver take a reference instead of a pointer.
Make RemoteVideoFrameObjectHeap become a WorkQueueMessageReceiver.
This ensures that a main thread hang in GPUProcess will not block big memory releases or WebProcess access to pixel buffers.

No observable change of behavior.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::didClose):
(WebKit::GPUConnectionToWebProcess::videoFrameObjectHeap const):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteVideoFrameObjectHeap.cpp:

(WebKit::remoteVideoFrameObjectHeapQueue):
(WebKit::RemoteVideoFrameObjectHeap::create):
(WebKit::RemoteVideoFrameObjectHeap::RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::~RemoteVideoFrameObjectHeap):
(WebKit::RemoteVideoFrameObjectHeap::close):
(WebKit::RemoteVideoFrameObjectHeap::releaseVideoFrame):
(WebKit::RemoteVideoFrameObjectHeap::getVideoFrameBuffer):
(WebKit::RemoteVideoFrameObjectHeap::pixelBuffer):
(WebKit::RemoteVideoFrameObjectHeap::stopListeningForIPC): Deleted.

  • GPUProcess/media/RemoteVideoFrameObjectHeap.h:
  • NetworkProcess/IndexedDB/WebIDBServer.cpp:

(WebKit::WebIDBServer::addConnection):

  • NetworkProcess/WebStorage/StorageManagerSet.cpp:

(WebKit::StorageManagerSet::addConnection):

  • NetworkProcess/storage/NetworkStorageManager.cpp:

(WebKit::NetworkStorageManager::startReceivingMessageFromConnection):

  • NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp:

(WebKit::RTCDataChannelRemoteManagerProxy::registerConnectionToWebProcess):

  • Platform/IPC/Connection.cpp:

(IPC::Connection::addWorkQueueMessageReceiver):

  • Platform/IPC/Connection.h:
  • UIProcess/mac/SecItemShimProxy.cpp:

(WebKit::SecItemShimProxy::initializeConnection):

  • WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp:

(WebKit::RemoteAudioSourceProviderManager::setConnection):

  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp:

(WebKit::RemoteVideoFrameObjectHeapProxyProcessor::RemoteVideoFrameObjectHeapProxyProcessor):

  • WebProcess/Inspector/WebInspectorInterruptDispatcher.cpp:

(WebKit::WebInspectorInterruptDispatcher::initializeConnection):

  • WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:

(WebKit::RTCDataChannelRemoteManager::setConnection):

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::initializeConnection):

  • WebProcess/WebPage/ViewUpdateDispatcher.cpp:

(WebKit::ViewUpdateDispatcher::initializeConnection):

2:03 AM Changeset in webkit [290590] by youenn@apple.com
  • 11 edits in trunk/Source

Ensure RemoteMediaPlayerProxy sets its resource owner to pixel buffers created by its player
https://bugs.webkit.org/show_bug.cgi?id=237200

Reviewed by Eric Carlson.

Source/WebCore:

Add API to set the resource owner for a player private.
In case player private is running in GPUProcess, use resource owner to mark pixel buffers as owned by the resource owner.
Covered by existing tests.

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::setResourceOwner):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::updateLastPixelBuffer):

Source/WebKit:

Set resource owner to the player private.

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::createMediaPlayer):

  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::RemoteMediaPlayerProxy):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:
1:56 AM Changeset in webkit [290589] by Angelos Oikonomopoulos
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Reuse known register values on ARMv7
https://bugs.webkit.org/show_bug.cgi?id=237207

Reviewed by Žan Doberšek.

Set up a CachedTempRegister for each of addressTempRegister,
dataTempRegister on ARMv7 and use them to generate shorter instruction
sequences when possible.

Saves 1.5-2% of code size on JS2 with no measurable difference in
performance.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::CachedTempRegister::value):

  • assembler/MacroAssemblerARMv7.cpp:

(JSC::MacroAssembler::probe):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
(JSC::MacroAssemblerARMv7::add32):
(JSC::MacroAssemblerARMv7::getEffectiveAddress):
(JSC::MacroAssemblerARMv7::add64):
(JSC::MacroAssemblerARMv7::lshift32):
(JSC::MacroAssemblerARMv7::mul32):
(JSC::MacroAssemblerARMv7::rshift32):
(JSC::MacroAssemblerARMv7::urshift32):
(JSC::MacroAssemblerARMv7::load32):
(JSC::MacroAssemblerARMv7::load16):
(JSC::MacroAssemblerARMv7::load16SignedExtendTo32):
(JSC::MacroAssemblerARMv7::load8):
(JSC::MacroAssemblerARMv7::load8SignedExtendTo32):
(JSC::MacroAssemblerARMv7::loadPair32):
(JSC::MacroAssemblerARMv7::store8):
(JSC::MacroAssemblerARMv7::storePair32):
(JSC::MacroAssemblerARMv7::loadDouble):
(JSC::MacroAssemblerARMv7::loadFloat):
(JSC::MacroAssemblerARMv7::storeDouble):
(JSC::MacroAssemblerARMv7::storeFloat):
(JSC::MacroAssemblerARMv7::branchTruncateDoubleToInt32):
(JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
(JSC::MacroAssemblerARMv7::long_move):
(JSC::MacroAssemblerARMv7::short_move):
(JSC::MacroAssemblerARMv7::move):
(JSC::MacroAssemblerARMv7::compare32AndSetFlags):
(JSC::MacroAssemblerARMv7::branch8):
(JSC::MacroAssemblerARMv7::branchTest8):
(JSC::MacroAssemblerARMv7::branchTest16):
(JSC::MacroAssemblerARMv7::farJump):
(JSC::MacroAssemblerARMv7::branchMul32):
(JSC::MacroAssemblerARMv7::nearCall):
(JSC::MacroAssemblerARMv7::nearTailCall):
(JSC::MacroAssemblerARMv7::call):
(JSC::MacroAssemblerARMv7::compare8):
(JSC::MacroAssemblerARMv7::test8):
(JSC::MacroAssemblerARMv7::jump):
(JSC::MacroAssemblerARMv7::makeBranch):
(JSC::MacroAssemblerARMv7::setupArmAddress):
(JSC::MacroAssemblerARMv7::makeBaseIndexBase):
(JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
(JSC::MacroAssemblerARMv7::cachedDataTempRegister):
(JSC::MacroAssemblerARMv7::cachedAddressTempRegister):
(JSC::MacroAssemblerARMv7::getCachedDataTempRegisterIDAndInvalidate):
(JSC::MacroAssemblerARMv7::getCachedAddressTempRegisterIDAndInvalidate):

  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::emitFastPathImpl):

1:10 AM Changeset in webkit [290588] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebKit

IPC_TESTING_API MessageArgumentDescriptions.cpp is slow to compile
https://bugs.webkit.org/show_bug.cgi?id=237195

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-28
Reviewed by Antti Koivisto.

IPC testing API needs convert message data buffer, IPC::Decoder, to
JSValue. This is a run-time operation.
IPC message decoding is based on templates, a compile time operation.
IPC generator generates MessageArgumentDescriptions.cpp with
a big switch. The switch has a case for each message name. The case would
call templated jsValueForDecodedArguments<Arguments>, where the Arguments
is the type tuple for the message arguments.

The above would mean that MessageArgumentDescriptions would need to
include all the headers for all the messages in WebKit in order
to populate the Arguments tuple for particular message.
This would cause MessageArgumentDescriptions to be slow to compile because
it would need all the headers in Source/WebKit related to message parameter types.

This would show up as slow compiles that would consume much memory (5-6gb) and do a
lot of work.

It would also have to compile the MessageArgumentDescriptions each time
any of the headers were touched.

Change this so that the big switch calls a declared but not defined
template jsValueForDecodedMessage<MessageName> for each MessageName case in the
switch.

Instantiate the template for each message in the *MessageReceiver.cpp file
that each message receiver has. This file already has to include all the
headers used for that particular message receiver. These files are small and compile
fast.

After this change MessageArgumentDescriptions.cpp only includes the message
definition headers, does not use much more than the standard 1gb+ of memory
while compiling and is relatively fast to compile. Also if any of the dependent
headers are touched, only the corresponding small *MessageReceiver.cpp files are compiled.

This change is needed for further improve the JS testing API implementation.
Adding new operations that employ the same strategy, eg. switch and a complex
template instantiation, would possibly just make the matter worse. New operations
that are needed are message sends, which use templates similarly to the message
decode case that is implement here.

This change regenerates the checked-in test content that can be used to review
what kind of changes the real MessageArgumentDescriptions.cpp and MessageReceiver.cpps
get.

  • Platform/IPC/JSIPCBinding.h:
  • Scripts/webkit/messages.py:

(generate_message_handler):
(generate_js_value_conversion_function):
(generate_message_argument_description_implementation):

  • Scripts/webkit/tests/MessageArgumentDescriptions.cpp:

(IPC::jsValueForArguments):
(IPC::jsValueForReplyArguments):

  • Scripts/webkit/tests/TestWithCVPixelBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_SendCVPixelBuffer>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithCVPixelBuffer_ReceiveCVPixelBuffer>):

  • Scripts/webkit/tests/TestWithIfMessageMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithIfMessage_LoadURL>):

  • Scripts/webkit/tests/TestWithImageDataMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_SendImageData>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithImageData_ReceiveImageData>):

  • Scripts/webkit/tests/TestWithLegacyReceiverMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithLegacyReceiver_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithLegacyReceiver_ExperimentalOperation>):

  • Scripts/webkit/tests/TestWithSemaphoreMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_SendSemaphore>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSemaphore_ReceiveSemaphore>):

  • Scripts/webkit/tests/TestWithStreamBufferMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStreamBuffer_SendStreamBuffer>):

  • Scripts/webkit/tests/TestWithStreamMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendString>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendStringSynchronized>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_ReceiveMachSendRight>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithStream_SendAndReceiveMachSendRight>):

  • Scripts/webkit/tests/TestWithSuperclassMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithNoArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithMultipleArguments>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestAsyncMessageWithConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSyncMessage>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithSuperclass_TestSynchronousMessage>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithSuperclass_TestSynchronousMessage>):

  • Scripts/webkit/tests/TestWithoutAttributesMessageReceiver.cpp:

(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadURL>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomething>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TouchEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_AddEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_LoadSomethingElse>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidReceivePolicyDecision>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_Close>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_PreferencesDidChange>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendDoubleAndFloat>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SendInts>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_CreatePlugin>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_RunJavaScriptAlert>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPlugins>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_GetPluginProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessageReply<MessageName::TestWithoutAttributes_TestMultipleAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TestParameterAttributes>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_TemplateTest>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_SetVideoLayerID>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DidCreateWebProcessConnection>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_InterpretKeyEvent>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_DeprecatedOperation>):
(IPC::jsValueForDecodedMessage<MessageName::TestWithoutAttributes_ExperimentalOperation>):

1:01 AM Changeset in webkit [290587] by ntim@apple.com
  • 2 edits in trunk/Source/WTF

Enable inert attribute feature flag
https://bugs.webkit.org/show_bug.cgi?id=235668

Reviewed by Darin Adler.

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
1:00 AM Changeset in webkit [290586] by Carlos Garcia Campos
  • 6 edits in trunk

[ATSPI] Always expose table cells (layout and CSS) that have rendered text content
https://bugs.webkit.org/show_bug.cgi?id=237204

Reviewed by Adrian Perez de Castro.

Source/WebCore:

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const):

LayoutTests:

  • accessibility/gtk/nested-block-element-children-expected.txt: Rebaseline.
  • platform/glib/TestExpectations: Remove accessibility/generated-content-with-display-table-crash.html.
  • platform/gtk/TestExpectations: Remove accessibility/gtk/nested-block-element-children.html.
12:58 AM Changeset in webkit [290585] by Carlos Garcia Campos
  • 5 edits in trunk

[GTK][a11y] Test accessibility/gtk/xml-roles-exposed.html is failing since ATSPI switch
https://bugs.webkit.org/show_bug.cgi?id=237202

Reviewed by Adrian Perez de Castro.

Source/WebCore:

Handle the special case of form item having unknown aria role to be exposed as landmark.

  • accessibility/atspi/AccessibilityObjectAtspi.cpp:

(WebCore::AccessibilityObjectAtspi::effectiveRole const):

LayoutTests:

  • platform/gtk/TestExpectations: Remove accessibility/gtk/xml-roles-exposed.html.
  • platform/gtk/accessibility/gtk/xml-roles-exposed-expected.txt: Rebaseline.
12:29 AM Changeset in webkit [290584] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237259

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001-expected.txt:

Source/WebCore:

We incorrectly threw when processing a null or undefined value when an iterable was provided to setKeyframes().
We now correctly insert an empty keyframe if such a value is provided.

  • animation/KeyframeEffect.cpp:

(WebCore::processIterableKeyframes):

Feb 27, 2022:

11:07 PM Changeset in webkit [290583] by Dewei Zhu
  • 9 edits in trunk/Tools

'run-benchmark' script should log http requests during benchmark run.
https://bugs.webkit.org/show_bug.cgi?id=237076
<rdar://89270825>

Reviewed by Simon Fraser.

Add support to log http requests during benchmark run for diagnostic purpose.

  • Scripts/webkitpy/init.py: Update 'attr' package version to 20.3.0 so match upgraded twisted version
  • Scripts/webkitpy/autoinstalled/twisted.py: Upgrade twisted version to latest python2 & python3 compatibile

version.

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ensure benchmark diagnostic directory is created.

(BenchmarkRunner.init):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Add '--log-path'

arugment to allow specify logging output and it defaults to '/tmp/run-benchmark-http.log'

  • Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py:

(HTTPServerDriver.set_device_id):
(HTTPServerDriver):
(HTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Pass http log path to

twisted http server if specified.
(SimpleHTTPServerDriver.init):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.set_http_log):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py: Fix a tiny bug that default_diagnose_dir() is involked twice in

argument parser help message.
(config_argument_parser):

  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Set http request log path if diagnostic directory

is specified.
(WebServerBenchmarkRunner.init):

Canonical link: https://commits.webkit.org/247861@main

9:09 PM Changeset in webkit [290582] by sihui_liu@apple.com
  • 10 edits in trunk/Source/WebKit

Add a feature flag for using general storage directory
https://bugs.webkit.org/show_bug.cgi?id=237186
rdar://89521373

Reviewed by Chris Dumez.

  • FeatureFlags/WebKit-appletvos.plist:
  • FeatureFlags/WebKit-ios.plist:
  • FeatureFlags/WebKit-macos.plist:
  • FeatureFlags/WebKit-watchos.plist:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::defaultShouldUseCustomStoragePaths):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::defaultShouldUseCustomStoragePaths):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::WebsiteDataStoreConfiguration):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
8:17 PM Changeset in webkit [290581] by Said Abou-Hallawa
  • 6 edits in trunk/Source

[GPU Process] Deleted unneeded constructors from DisplayList::Recorder classes
https://bugs.webkit.org/show_bug.cgi?id=237261

Reviewed by Wenson Hsieh.

Source/WebCore:

This should have been done in r289594.

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::Recorder):

  • platform/graphics/displaylists/DisplayListRecorder.h:

Source/WebKit:

  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
  • WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
8:01 PM Changeset in webkit [290580] by Jonathan Bedard
  • 71 edits
    2 deletes in trunk

webkitpy: WebSocket server doesn't support Python 3
https://bugs.webkit.org/show_bug.cgi?id=230319
<rdar://problem/58814743>

Reviewed by Fujii Hironori.

Tools:

  • Scripts/new-run-webkit-websocketserver: Change shebang.
  • Scripts/webkitpy/layout_tests/servers/websocket_server.py:

(PyWebSocket._prepare_config): Invoke WebSocket server with Python 3.

LayoutTests:

Make all tests Python 3 compatible, even at the cost of Python 2
compatibility, since WebSocket tests are always invoked with Python 3.

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/binary-frames_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/broken-utf8_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/check-binary-messages_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/client-close-2-expected.txt:
  • http/tests/websocket/tests/hybi/client-close-2.html:
  • http/tests/websocket/tests/hybi/client-close-2_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/client-close-expected.txt:
  • http/tests/websocket/tests/hybi/client-close.html:
  • http/tests/websocket/tests/hybi/client-close_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/close-code-and-reason_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/close-on-unload_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/compressed-control-frame_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/cookie_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/deflate-frame-invalid-parameter_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/deflate-frame_wsh.py:

(_get_deflate_frame_extension_processor):
(web_socket_do_extra_handshake):
(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/echo-cookie_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/echo_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/fragmented-binary-frames_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/handshake-fail-by-extensions-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-maxlength_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-mismatch-protocol-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-connection-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-cr_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-no-upgrade-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-fail-by-wrong-accept-header_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/handshake-ok-with-legacy-websocket-response-headers_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-invalid-parameter_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-manual_wsh.py:
  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate-unsolicited-negotiation-response_wsh.py:
  • http/tests/websocket/tests/hybi/imported/blink/permessage-deflate_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/inspector/binary_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/invalid-continuation_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/invalid-encode-length_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/pong_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/protocol-test_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/reserved-bits_wsh.py:

(_get_deflate_frame_extension_processor):
(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/reserved-opcodes_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/send-file-blob_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/too-long-payload_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/unicode_wsh.py:
  • http/tests/websocket/tests/hybi/unmasked-frames_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/workers/resources/binary-frames_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/workers/resources/check-binary-messages_wsh.py:

(web_socket_transfer_data):
(all_distinct_bytes):

  • http/tests/websocket/tests/hybi/workers/resources/no-onmessage-in-sync-op_wsh.py:

(web_socket_transfer_data):

  • http/tests/websocket/tests/hybi/workers/resources/protocol-test_wsh.py:

(web_socket_do_extra_handshake):

  • http/tests/websocket/tests/hybi/zero-length-text_wsh.py:

(web_socket_transfer_data):

  • platform/glib/TestExpectations:
  • platform/ios-wk2/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt:
  • platform/mac-wk2/http/tests/websocket/tests/hybi/client-close-2-expected.txt: Removed.
  • platform/mac-wk2/http/tests/websocket/tests/hybi/client-close-expected.txt: Removed.
  • platform/mac-wk2/http/tests/websocket/tests/hybi/handshake-fail-by-no-cr-expected.txt:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
  • platform/wincairo/TestExpectations:
7:28 PM Changeset in webkit [290579] by commit-queue@webkit.org
  • 9 edits
    2 deletes in trunk

Unreviewed, reverting r290577.
https://bugs.webkit.org/show_bug.cgi?id=237264

Breaks ios-wk2 layout test.

Reverted changeset:

"Compute correct containing block override size for items that
are subgridden in one dimension only."
https://bugs.webkit.org/show_bug.cgi?id=236951
https://commits.webkit.org/r290577

7:24 PM Changeset in webkit [290578] by Wenson Hsieh
  • 8 edits in trunk/Source

Invoking "Markup Image" should preserve the existing selection range
https://bugs.webkit.org/show_bug.cgi?id=237242

Reviewed by Darin Adler.

Source/WebCore:

Move the implementation of replaceNodeFromPasteboard out of the macOS-specific implementation file and into
EditorCocoa instead, so that we can use it on both iOS and macOS to handle the "Markup Image" action. See WebKit
ChangeLog for more details.

  • editing/Editor.h:
  • editing/cocoa/EditorCocoa.mm:

(WebCore::maybeCopyNodeAttributesToFragment):
(WebCore::Editor::replaceNodeFromPasteboard):

Also make a few minor adjustments while we're moving this code:

  • Make this take a reference instead of a pointer (the method always expects a non-null Node pointer anyways).
  • Add a FIXME mentioning that we can just delete setInsertionPasteboard altogether once Mail compose on

macOS uses WebKit2.

  • Unconditionally pass false for whether or not we should enable smart paste when replacing the node. This

prevents us from inserting spaces around the replacement image element when triggering the "Markup Image"
item.

  • Use makeRangeSelectingNode instead of makeRangeSelectingNodeContents when selecting the node to replace.

This allows us to handle the case where the node to replace cannot contain children for editing (in
particular, image elements).

Note that this codepath (replaceNodeFromPasteboard) is currently only exercised by WebKitLegacy service
controls code that was originally intended for use by Mail compose, but never ended up being used.

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::maybeCopyNodeAttributesToFragment): Deleted.
(WebCore::Editor::replaceNodeFromPasteboard): Deleted.

Source/WebKit:

Make a few adjustments to replaceWithPasteboardData, such that it attempts to restore the previous selection
range after replacing the target element. If the previous selection is no longer valid (i.e., it was orphaned as
a result of the editing command used to replace the element), then we fall back to restoring the visible
character range of the previous selection, relative to the editable root (or the body if there is none).

API tests will be added in https://webkit.org/b/236519, once we're able to swizzle out the underlying VisionKit
methods in order to make these tests run reliably.

  • WebProcess/WebPage/Cocoa/WebPageCocoa.mm:

(WebKit::OverridePasteboardForSelectionReplacement::OverridePasteboardForSelectionReplacement):
(WebKit::OverridePasteboardForSelectionReplacement::~OverridePasteboardForSelectionReplacement):

Add a helper RAII object that encapsulates logic for setting and unsetting data on the override pasteboard. Use
this in the two methods below.

(WebKit::WebPage::replaceWithPasteboardData):

Switch to using the refactored Editor::replaceNodeFromPasteboard method instead of calling to the adjacent
replaceSelectionWithPasteboardData method below. Using this method allows us to avoid manually selecting the
target element here, and also avoids smart pasteboard replacement (which may insert spaces before or after the
image); the latter is important in order to correctly restore the previous selection's character range in the
case where the previous selection range was orphaned by the replacement.

(WebKit::WebPage::replaceSelectionWithPasteboardData):

Source/WebKitLegacy/mac:

See WebKit and WebCore ChangeLogs for more detail.

  • Misc/WebSharingServicePickerController.mm:

(-[WebSharingServicePickerController didShareImageData:confirmDataIsValidTIFFData:]):

Adjust this call site to pass in a reference instead of a pointer. Also deploy RefPtr in some adjacent code.

7:03 PM Changeset in webkit [290577] by Matt Woodrow
  • 9 edits
    2 adds in trunk

Compute correct containing block override size for items that are subgridden in one dimension only.
https://bugs.webkit.org/show_bug.cgi?id=236951

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Added new WPT similar to auto-track-sizing-001 which adds new variations
with nested subgrids and varying whether the other axis is subgridded.

  • web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002-expected.html: Added.
  • web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html: Added.

Source/WebCore:

Items that are subgridded in one dimension will be included in the track sizing algorithm of the
outer grid for that dimension. When measuring their size in the subgridded dimension, we need to
set their containing block size in the other (non-subgridded) dimension, which is only available
from the subgrid's track sizing, not the outer track sizes.

This recurses up to set the override size on the subgrid element instead, and forces a layout
there, which should copy down subgrid track sizes and compute the other dimension, making it
available on the inner item we need.

Test: imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::extraMarginForSubgridAncestors):

  • rendering/GridLayoutFunctions.h:
  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::updateOverridingContainingBlockContentSizeForChild const):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::isSubgridOf):

  • rendering/RenderGrid.h:

LayoutTests:

Marked existing WPT as passing.

6:14 PM Changeset in webkit [290576] by Matt Woodrow
  • 4 edits in trunk

Convert grid direction to be relative to subgrid when accounting for extra margin.
https://bugs.webkit.org/show_bug.cgi?id=236954

Reviewed by Dean Jackson.

Source/WebCore:

|direction| is passed as a direction relative to |grid|, so we need to convert it
to be a direction relative to the subgrid item in order to account for margin on
the correct edge.

Marks existing test orthogonal-writing-mode-003.html as passing.

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::marginLogicalSizeForChild):

LayoutTests:

Marks existing test orthogonal-writing-mode-003.html as passing.

5:24 PM Changeset in webkit [290575] by Chris Dumez
  • 100 edits in trunk

Omit template parameter for SetForScope<> variables
https://bugs.webkit.org/show_bug.cgi?id=237258

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitNode):

  • debugger/Debugger.cpp:

(JSC::Debugger::dispatchFunctionToObservers):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::setLocalOrTmp):
(JSC::DFG::ByteCodeParser::setArgument):

  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::dispatch):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseAsyncFunctionSourceElements):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):
(JSC::Parser<LexerType>::parseFunctionBody):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseAsyncFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parseFunctionExpression):
(JSC::Parser<LexerType>::parseAsyncFunctionExpression):
(JSC::Parser<LexerType>::parseArrowFunctionExpression):

Source/WebCore:

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::performDeferredCacheUpdate):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::JSCustomElementRegistry::define):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeJavaScriptURL):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeCompoundSelector):

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementQueue::invokeAll):

  • dom/Document.cpp:

(WebCore::Document::updateRenderTree):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::hitTest):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::forEachActiveDOMObject const):

  • dom/Traversal.cpp:

(WebCore::NodeIteratorBase::acceptNode):

  • editing/Editor.cpp:

(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyFont):
(WebCore::Editor::paste):
(WebCore::Editor::pasteAsPlainText):
(WebCore::Editor::pasteAsQuotation):
(WebCore::Editor::pasteFont):

  • history/BackForwardCache.cpp:

(WebCore::BackForwardCache::pruneToSizeNow):
(WebCore::BackForwardCache::removeAllItemsForPage):

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

  • html/HTMLButtonElement.cpp:

(WebCore::HTMLButtonElement::defaultEventHandler):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::focusAndShowValidationMessage):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::constructEntryList):

  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::scheduleLoad):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::scan):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::SearchFieldResultsButtonElement::resolveCustomStyle):

  • html/track/LoadableTextTrack.cpp:

(WebCore::LoadableTextTrack::scheduleLoad):

  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::load):
(WebCore::FrameLoader::clearProvisionalLoadForPolicyCheck):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):
(WebCore::FrameLoader::loadDifferentDocumentItem):

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::updateBuffer):

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResourcesToSize):

  • page/Chrome.cpp:

(WebCore::Chrome::runModal const):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::handleContextMenuEvent):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::suspendForBackForwardCache):

  • page/DragController.cpp:

(WebCore::DragController::performDragOperation):

  • page/EventSource.cpp:

(WebCore::EventSource::doExplicitLoadCancellation):

  • page/FrameView.cpp:

(WebCore::FrameView::applyRecursivelyWithVisibleRect):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/FrameViewLayoutContext.cpp:

(WebCore::FrameViewLayoutContext::layout):
(WebCore::FrameViewLayoutContext::runAsynchronousTasks):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didReceiveHeaders):

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tryToBeginDragAtPoint):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • page/scrolling/ThreadedScrollingTree.cpp:

(WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread):

  • platform/PreviewConverter.cpp:

(WebCore::PreviewConverter::iterateClients):
(WebCore::PreviewConverter::replayToClient):

  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::clientWillBeginPlayback):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):

  • platform/graphics/mac/WebLayer.mm:

(-[WebSimpleLayer renderInContext:]):

  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):

  • platform/graphics/texmap/TextureMapperLayer.cpp:

(WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
(WebCore::TextureMapperLayer::paintIntoSurface):
(WebCore::TextureMapperLayer::paintWithIntermediateSurface):
(WebCore::TextureMapperLayer::paintRecursive):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

  • platform/ios/LegacyTileLayer.mm:

(-[LegacyTileLayer renderInContext:]):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::paint):

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::pushMappingsToAncestor):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::computeVisibleRectInContainer const):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::updateScrollbarsAfterLayout):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::layout):

  • rendering/svg/LegacyRenderSVGRoot.cpp:

(WebCore::LegacyRenderSVGRoot::layout):

  • rendering/svg/RenderSVGResourceContainer.cpp:

(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::layout):

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

  • style/StyleBuilder.cpp:

(WebCore::Style::Builder::applyCustomProperty):
(WebCore::Style::Builder::applyCascadeProperty):

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateWithMatchElementRuleSets):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::createDocumentResolver):
(WebCore::Style::Scope::createOrFindSharedShadowTreeResolver):
(WebCore::Style::Scope::updateResolver):

  • svg/SVGPathBlender.cpp:

(WebCore::SVGPathBlender::addAnimatedPath):

  • workers/WorkerThread.cpp:

(WebCore::WorkerThread::evaluateScriptIfNecessary):

Source/WebKit:

  • NetworkProcess/storage/QuotaManager.cpp:

(WebKit::QuotaManager::handleRequests):

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(createEncodedObject):
(decodeObject):

  • UIProcess/API/glib/InputMethodFilter.cpp:

(WebKit::InputMethodFilter::filterKeyEvent):

  • UIProcess/API/glib/WebKitWebView.cpp:

(WebKitWebViewClient::frameDisplayed):

  • UIProcess/API/gtk/InputMethodFilterGtk.cpp:

(WebKit::InputMethodFilter::filterKeyEvent):

  • UIProcess/API/ios/WKWebViewIOS.mm:

(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateTextTouchBar):

  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::open):
(WebKit::WebInspectorUIProxy::closeFrontendPageAndWindow):

  • UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.mm:

(WebKit::ScrollingTreeScrollingNodeDelegateIOS::commitStateAfterChildren):

  • UIProcess/_WKWebViewPrintFormatter.mm:

(-[_WKWebViewPrintFormatter _setSnapshotPaperRect:]):

  • UIProcess/gtk/ClipboardGtk3.cpp:

(WebKit::Clipboard::write):

  • UIProcess/gtk/WebDateTimePickerGtk.cpp:

(WebKit::WebDateTimePickerGtk::update):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView becomeFirstResponderForWebView]):
(-[WKContentView resignFirstResponderForWebView]):
(-[WKContentView unsuppressSoftwareKeyboardUsingLastAutocorrectionContextIfNeeded]):
(-[WKContentView _elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:]):
(-[WKContentView _elementDidBlur]):

  • UIProcess/ios/forms/WKDateTimeInputControl.mm:

(-[WKDateTimePicker handleDatePickerPresentationDismissal]):
(-[WKDateTimePicker removeDatePickerPresentation]):

  • WebProcess/Plugins/Plugin.cpp:

(WebKit::Plugin::destroyPlugin):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::purgeBackingStores):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::updateRendering):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::stopLoadingDueToProcessSwap):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::restoreSessionInternal):
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::insertTextAsync):
(WebKit::WebPage::createAppHighlightInSelectedRange):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::requestDragStart):
(WebKit::WebPage::requestAdditionalItemsForDragSession):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::focusTextInputContextAndPlaceCaret):

  • WebProcess/WebPage/wc/DrawingAreaWC.cpp:

(WebKit::DrawingAreaWC::updateRendering):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::prepareToSuspend):

Source/WebKitLegacy/mac:

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

  • WebView/WebViewData.mm:

(WebViewLayerFlushScheduler::layerFlushCallback):

Source/WTF:

  • wtf/RefCounter.h:

(WTF::RefCounter<T>::Count::deref):

Tools:

  • TestWebKitAPI/Tests/WTF/SetForScope.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKInspectorDelegate.mm:

(TEST):

  • TestWebKitAPI/mac/TestFontOptions.mm:

(-[TestFontOptions setShadowWidth:]):
(-[TestFontOptions setShadowHeight:]):
(-[TestFontOptions setShadowBlurRadius:]):
(-[TestFontOptions setHasShadow:]):
(-[TestFontOptions setForegroundColor:]):
(-[TestFontOptions setBackgroundColor:]):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::reattachPageToWebProcess):

5:16 PM Changeset in webkit [290574] by Cameron McCormack
  • 8 edits in trunk/Source/WebCore

Add a mechanism to request a UA shadow tree update before style
https://bugs.webkit.org/show_bug.cgi?id=237224

Reviewed by Antti Koivisto.

SVG <use> elements register themselves with the document when their
shadow tree contents need updating, and this updating is done in
Document::resolveStyle. For lazy HTML <input> element UA shadow trees
(in bug 236747) we need something similar.

  • dom/Document.cpp:

(WebCore::Document::resolveStyle):
(WebCore::Document::addElementWithPendingUserAgentShadowTreeUpdate):
(WebCore::Document::removeElementWithPendingUserAgentShadowTreeUpdate):

  • dom/Document.h:
  • dom/Element.h:

(WebCore::Element::updateUserAgentShadowTree):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::~SVGDocumentExtensions): Deleted.
(WebCore::SVGDocumentExtensions::addUseElementWithPendingShadowTreeUpdate): Deleted.
(WebCore::SVGDocumentExtensions::removeUseElementWithPendingShadowTreeUpdate): Deleted.

  • svg/SVGDocumentExtensions.h:

(WebCore::SVGDocumentExtensions::useElementsWithPendingShadowTreeUpdate const): Deleted.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedIntoAncestor):
(WebCore::SVGUseElement::removedFromAncestor):
(WebCore::SVGUseElement::updateUserAgentShadowTree):
(WebCore::SVGUseElement::invalidateShadowTree):
(WebCore::SVGUseElement::updateShadowTree): Deleted.

  • svg/SVGUseElement.h:
3:52 PM Changeset in webkit [290573] by graouts@webkit.org
  • 4 edits in trunk

[web-animations] web-animations/timing-model/animations/setting-the-timeline-of-an-animation.html is a unique failure
https://bugs.webkit.org/show_bug.cgi?id=237257

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Mark WPT progressions.

  • web-platform-tests/web-animations/timing-model/animations/setting-the-timeline-of-an-animation-expected.txt:

Source/WebCore:

The spec has changed since we initially implemented Animation.playState and we missed one condition for
an animation's play state to be "idle".

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::playState const):

2:19 PM Changeset in webkit [290572] by Matt Woodrow
  • 4 edits in trunk

Handle reverse flow direction when converting iterator coords for a subgrid
https://bugs.webkit.org/show_bug.cgi?id=236955

Reviewed by Dean Jackson.

Source/WebCore:

When recursing into a subgrid via createForSubgrid, we convert the iterator's
position into coordinates relative to the subgrid. This handles the case where
the subgrid has a reverse flow direction (RTL vs LTR) and swaps the position
to be relative to the opposite edge.

Marks existing WPT grid-gap-007.html as passing

  • rendering/Grid.cpp:

(WebCore::GridIterator::createForSubgrid):

LayoutTests:

Marked grid-gap-007.html as now passing, and added bug annotations to
remaining subgrid failures.

2:15 PM Changeset in webkit [290571] by graouts@webkit.org
  • 5 edits in trunk

[svg] flood-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237253

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setFloodOpacity):

1:19 PM Changeset in webkit [290570] by graouts@webkit.org
  • 5 edits in trunk

[svg] stroke-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237254

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setStrokeOpacity):

12:55 PM Changeset in webkit [290569] by graouts@webkit.org
  • 5 edits in trunk

[svg] stop-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237255

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setStopOpacity):

12:31 PM Changeset in webkit [290568] by graouts@webkit.org
  • 5 edits in trunk

[svg] fill-opacity should be clamped to the [0,1] range
https://bugs.webkit.org/show_bug.cgi?id=237252

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

  • web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-001-expected.txt:
  • web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-001-expected.txt:

Source/WebCore:

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::setFillOpacity):

11:54 AM Changeset in webkit [290567] by Matt Woodrow
  • 2 edits in trunk

2022-02-24 Matt Woodrow <Matt Woodrow>

Unreviewed, update my (Matt Woodrow) status to committer.

  • metadata/contributors.json:
11:44 AM Changeset in webkit [290566] by Chris Dumez
  • 28 edits in trunk/Source

Simplify SerializedScriptValue construction
https://bugs.webkit.org/show_bug.cgi?id=237241

Reviewed by Darin Adler.

Source/WebCore:

The 2 main factory functions for SerializedScriptValue now share the same code.
I also dropped some SerializedScriptValue API that was no longer useful.
Finally, I simplified factory functions for MessageEvent.

  • Modules/indexeddb/IDBValue.cpp:

(WebCore::IDBValue::IDBValue):

  • Modules/webaudio/AudioWorkletNode.cpp:

(WebCore::AudioWorkletNode::create):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::toString const):
(WebCore::SerializedScriptValue::toString): Deleted.

  • bindings/js/SerializedScriptValue.h:

(WebCore::SerializedScriptValue::wireBytes const):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::adopt): Deleted.
(WebCore::SerializedScriptValue::data const): Deleted.
(WebCore::SerializedScriptValue::toWireBytes const): Deleted.

  • dom/BroadcastChannel.cpp:

(WebCore::BroadcastChannel::dispatchMessage):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):

  • dom/MessageEvent.h:
  • dom/MessagePort.cpp:

(WebCore::MessagePort::dispatchMessages):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):

  • page/EventSource.cpp:

(WebCore::EventSource::dispatchMessageEvent):

  • page/History.cpp:

(WebCore::History::stateObjectAdded):

  • testing/Internals.cpp:

(WebCore::Internals::serializeObject const):
(WebCore::Internals::deserializeBuffer const):

  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):

  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::postMessage):

  • workers/shared/SharedWorkerGlobalScope.cpp:

(WebCore::SharedWorkerGlobalScope::postConnectEvent):

Source/WebKit:

Update code base to reflect SerializedScriptValue API changes.

  • Shared/API/APISerializedScriptValue.h:

(API::SerializedScriptValue::createFromWireBytes):
(API::SerializedScriptValue::dataReference const):
(API::SerializedScriptValue::adopt): Deleted.

  • Shared/SessionState.cpp:

(WebKit::PageState::encode const):

  • Shared/UserData.cpp:

(WebKit::UserData::decode):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):

  • UIProcess/Inspector/WebInspectorUIExtensionControllerProxy.cpp:

(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptForExtension):
(WebKit::WebInspectorUIExtensionControllerProxy::evaluateScriptInExtensionTab):

  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:

(WebKit::WebUserContentControllerProxy::didPostMessage):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):

  • WebProcess/Inspector/WebInspectorUIExtensionController.cpp:

(WebKit::WebInspectorUIExtensionController::evaluateScriptForExtension):
(WebKit::WebInspectorUIExtensionController::evaluateScriptInExtensionTab):

  • WebProcess/UserContent/WebUserContentController.cpp:
  • WebProcess/WebCoreSupport/SessionStateConversion.cpp:

(WebKit::toFrameState):
(WebKit::applyFrameState):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScript):

9:54 AM Changeset in webkit [290565] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GStreamer] media/video-src-blob-perf.html timing out likely since update to GStreamer 1.20
https://bugs.webkit.org/show_bug.cgi?id=237256

Unreviewed, gardening

Patch by Philippe Normand <pnormand@igalia.com> on 2022-02-27

  • platform/glib/TestExpectations: Flag test as timing out.
8:38 AM Changeset in webkit [290564] by ntim@apple.com
  • 10 edits in trunk

Force -webkit-user-modify used style to readonly for inert nodes
https://bugs.webkit.org/show_bug.cgi?id=237244

Reviewed by Darin Adler.

This disallows programmatic edition of contenteditable inert nodes. Edition via user-input is
already prevented by forcing pointer-events style to none.

We create a seperate effectiveUserModify, similar to effectiveUserSelect/effectivePointerEvents,
to avoid changing the computed style.

This behaviour also matches Blink & Gecko.

LayoutTests/imported/w3c:

  • web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt:

Source/WebCore:

Test: imported/w3c/web-platform-tests/inert/inert-and-contenteditable.tentative.html

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):

  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::doApply):

  • rendering/EventRegion.cpp:

(WebCore::EventRegion::unite):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::styleWillChange):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::effectiveUserModify const):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

8:33 AM Changeset in webkit [290563] by Chris Dumez
  • 9 edits in trunk

Call WKNavigationDelegate.didFailProvisionalNavigation even after a cross-origin navigation with COOP
https://bugs.webkit.org/show_bug.cgi?id=237071
<rdar://problem/89354367>

Reviewed by Darin Adler.

Source/WebKit:

When doing a process swap on navigation (PSON), we start a new provisional load in the new provisional
process and ask the committed process to stop all loads. Since we swap in decidePolicyForNavigationAction,
no provisional load has started in the committed process yet. If the provisional process sends us a
didFailProvisionalLoad though, we know the provisional load has failed and we take this into consideration
and notify the client app.

When doing a process swap on resource response (due to COOP), we were behaving differently and it was
causing some confusion. Since we swap on resource response, the provisional load has started in the
committed process by the time we process-swap (unlike PSON). We were also not asking for the committed
process to stop/cancel this provisional load. As a result, a provisional load would still be going on
in the committed process while another provisional load starts happening in the provisional page / process.
Then, if the provisional process would send us a didFailProvisional, we would not pass it along to the
client app. Instead we would destroy the ProvisionalPageProxy, which would tell the committed process to
stop loading and send its own didFailProvisionalLoad, and the client app would eventually get notified.

Even though the difference in behavior was confusing, it was working in most cases. There was however
an edge case where it didn't work and we would fail to tell the client app that the provisional load
had failed. In particular, we would run into trouble when navigating cross-site to a site that adopted
the COOP header. We would first do a process-swap on navigation, stop the provisional load in the committed
process A, then start a provisional load in process B. We would then get the COOP header and we would
start a new provisional load in process C. Process B would go away since we cannot have 2 provisional
pages / processes at the same time for the same WebPageProxy. Then if the provisional load fails in
process C, we would ignore the didFailProvisionalLoad from process C and destroy the provisional page.
We would tell the committed process A to stop loading, expecting it to send its own didFailProvisionalLoad
but it wouldn't happen since PSON had already stopped all loading in process A earlier when swapping to
process B.

To address the issue, we align COOP process swap with PSON process swap. We now has the committed process
to stop all loads when process swapping on resource response due to COOP. As a result, when the provisional
load fails in the provisional process, we can simply pass it along to the client, no matter if the process
swap occurred due to PSON or COOP.

Covered by new API test.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::~ProvisionalPageProxy):
We no longer need to tell the committed process to stop loading when the provisional page gets destroyed
and this was a process swap on resource response. The reason is that when process-swapping on navigation
response, we now drop the provisional load in the committed process right away, like in the PSON case.

(WebKit::ProvisionalPageProxy::cancel):
When cancelling a provisional load due to PSON or COOP, we need to notify the client that the provisional
load failed. We used to only to it in the PSON case. We now do it for both PSON and COOP since they
behave the same.

(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
Similarly as above, now that PSON and COOP behave the same, we need to pass the didFailProvisionalLoad
from the provisional process to the client app for both PSON and COOP (Not just PSON).

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
When triggering a process swap on resource response (due to COOP), we now stop the provisional load going
on in the committed process to be consistent with what we do in the PSON case. This way there is only a
single provisional load going on and it is happening in the provisional page / process.

Tools:

Add API test coverage (Test was written by Alex Christensen).

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(TEST):

8:26 AM Changeset in webkit [290562] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Loading a USDZ url as the main resource renders as garbage
https://bugs.webkit.org/show_bug.cgi?id=237240
rdar://88767033

Reviewed by Antoine Quint.

We can't render a USD document if the ModelDocument feature is not enabled.

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::canShowMIMEType):

8:17 AM Changeset in webkit [290561] by graouts@webkit.org
  • 4 edits in trunk

[css-animations] implicit keyframes should be inserted after explicit keyframes with the same offset
https://bugs.webkit.org/show_bug.cgi?id=237246

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update WPT test added in bug 236838 to match the spec following discussion with Brian Birtles in
https://github.com/web-platform-tests/wpt/pull/32903.

  • web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative.html:

Source/WebCore:

The CSS Animations spec says the following about implicit keyframes generation:

Let initial keyframe be the keyframe in keyframes with offset 0, timing function default timing
function and composite default composite.

If there is no such keyframe, let initial keyframe be a new empty keyframe with offset 0, timing
function default timing function, composite |default composite, and add it to keyframes after the
last keyframe with offset 0.

Let final keyframe be the keyframe in keyframes with offset 1, timing function default timing
function and composite default composite.

If there is no such keyframe, let final keyframe be a new empty keyframe with offset 1, timing
function default timing function and composite default composite, and add it to keyframes after
the last keyframe with offset 1.

Full details are at https://drafts.csswg.org/css-animations-2/#keyframes.

The KeyframeList::insert() method does the right thing already by adding a new keyframe after all
other keyframes with that same offset, so all we need to do is to use this method rather than
specifying explicit indexes.

  • rendering/style/KeyframeList.cpp:

(WebCore::KeyframeList::fillImplicitKeyframes):

8:03 AM Changeset in webkit [290560] by ntim@apple.com
  • 2 edits in trunk/Source/WebCore

Use hasAttributeWithoutSynchronisation for checking inert attribute in Adjuster::adjust
https://bugs.webkit.org/show_bug.cgi?id=237248

Reviewed by Dean Jackson.

hasAttributeWithoutSynchronisation should be slightly faster than hasAttribute.

  • style/StyleAdjuster.cpp:

(WebCore::Style::Adjuster::adjust const):

6:10 AM Changeset in webkit [290559] by ntim@apple.com
  • 3 edits
    2 adds in trunk

Optimize StyleSharingResolver inert checks
https://bugs.webkit.org/show_bug.cgi?id=237235

Reviewed by Youenn Fablet.

Source/WebCore:

inert is an boolean attribute, the only thing that matters for the StyleAdjuster
inertness adjustment is the presence of the attribute, not its value. E.g.
inert=false is the same as inert=inert or inert=true.

This saves getting and comparing values for those attributes, and also allows
inert=inert and inert=true or inert=false to start sharing style.

  • style/StyleSharingResolver.cpp:

(WebCore::Style::SharingResolver::canShareStyleWithElement const):

LayoutTests:

Add small test that style sharing is not wrongly applied.

  • fast/css/inert-style-sharing-expected.html: Added.
  • fast/css/inert-style-sharing.html: Added.
4:06 AM Changeset in webkit [290558] by youenn@apple.com
  • 7 edits in trunk/Source/WebKit

Exposing RemoteVideoFrameProxy::write is unneeded
https://bugs.webkit.org/show_bug.cgi?id=237212

Reviewed by Eric Carlson.

Exposing RemoteVideoFrameProxy::write is unneeded as RemoteVideoFrameProxy is immutable.
It is best to remove it as calling write() inadvertently would break things.
Renaming read() to newReadReference() to make it clear that we are creating a new read reference
that needs to be sent to GPUProcess to prevent leaks.
No change of behavior.

  • WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:

(WebKit::RemoteGraphicsContextGLProxy::copyTextureFromMedia):

  • WebProcess/GPU/media/RemoteVideoFrameProxy.cpp:

(WebKit::RemoteVideoFrameProxy::~RemoteVideoFrameProxy):
(WebKit::RemoteVideoFrameProxy::newReadReference const):
(WebKit::RemoteVideoFrameProxy::pixelBuffer const):
(WebKit::RemoteVideoFrameProxy::write const): Deleted.
(WebKit::RemoteVideoFrameProxy::read const): Deleted.

  • WebProcess/GPU/media/RemoteVideoFrameProxy.h:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp:

(WebKit::LibWebRTCCodecs::encodeFrame):

  • WebProcess/GPU/webrtc/RemoteVideoFrameObjectHeapProxyProcessor.cpp:

(WebKit::RemoteVideoFrameObjectHeapProxyProcessor::getVideoFrameBuffer):

  • WebProcess/GPU/webrtc/SharedVideoFrame.cpp:

(WebKit::SharedVideoFrameWriter::write):

3:44 AM Changeset in webkit [290557] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

Simplify CVPixelBuffer data copies in SharedVideoFrameInfo
https://bugs.webkit.org/show_bug.cgi?id=237194

Reviewed by Eric Carlson.

Remove use of vImageUnpremultiplyData_BGRA8888 which might not be correct for canvas data.
Make use of CVPixelBufferGetPlaneCount to share more code between monoplanar and biplanar formats.

Covered by existing tests.

  • platform/cocoa/CoreVideoSoftLink.cpp:
  • platform/cocoa/CoreVideoSoftLink.h:
  • platform/cocoa/SharedVideoFrameInfo.mm:

(WebCore::SharedVideoFrameInfo::isReadWriteSupported const):
(WebCore::copyToCVPixelBufferPlane):
(WebCore::SharedVideoFrameInfo::createPixelBufferFromMemory):
(WebCore::SharedVideoFrameInfo::writePixelBuffer):

3:21 AM Changeset in webkit [290556] by ntim@apple.com
  • 17 edits
    2 adds in trunk/LayoutTests

Re-import inert and <dialog> WPT
https://bugs.webkit.org/show_bug.cgi?id=237243

Reviewed by Youenn Fablet.

Upstream commit: https://github.com/web-platform-tests/wpt/commit/9261ca87db106c1f31f1ab4f54b8f4a2617cbc24

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-expected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer-ref.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-expected.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column-ref.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html:
  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/w3c-import.log:
  • web-platform-tests/inert/inert-and-contenteditable.tentative-expected.txt: Added.
  • web-platform-tests/inert/inert-and-contenteditable.tentative.html: Added.
  • web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
  • web-platform-tests/inert/inert-iframe-hittest.tentative.html:
  • web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:
  • web-platform-tests/inert/inert-iframe-tabbing.tentative.html:
  • web-platform-tests/inert/w3c-import.log:

LayoutTests:

  • TestExpectations:
  • platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-hittest.tentative-expected.txt:
  • platform/ios-wk2/imported/w3c/web-platform-tests/inert/inert-iframe-tabbing.tentative-expected.txt:

Feb 26, 2022:

11:27 PM Changeset in webkit [290555] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit

RemoteCaptureSampleManager, UserMediaSampleCaptureManagerProxy create the RemoteVideoFrame in incorrectly
https://bugs.webkit.org/show_bug.cgi?id=237134

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-26
Reviewed by Youenn Fablet.

UserMediaSampleCaptureManagerProxy should not call RemoteVideoFrameObjectHeap::createVideoFrame,
the function should be removed. Instead, UserMediaSampleCaptureManagerProxy should construct a
write reference to insert the media sample -> remote proxy mapping. Then
the result of the insert, a new reference, should be sent as part of the
RemoteVideoFrameProxy::Properties to the WP. This way the sent reference is
constructed as expected. Previously the reference was correct but matched just
by selecting the constants currently used (0).

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.cpp:

(WebKit::RemoteCaptureSampleManager::videoSampleAvailable):
(WebKit::RemoteCaptureSampleManager::videoSampleAvailableCV):

  • WebProcess/cocoa/RemoteCaptureSampleManager.h:
  • WebProcess/cocoa/RemoteCaptureSampleManager.messages.in:
11:06 PM Changeset in webkit [290554] by ntim@apple.com
  • 11 edits
    2 adds in trunk

Remove Node::deprecatedIsInert
https://bugs.webkit.org/show_bug.cgi?id=230845

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

This change unfortunately regresses focusability state when dynamically setting inert, due to a cached
computed style invalidation bug. This is minor in practice, since focusability usually gets queried in
user-initiated ways, when style already has fully been updated.

However, making this change will improve performance by avoiding a full DOM ancestor walk when there
is no inert attribute on the page, since we will only check a style bit after this patch.

  • web-platform-tests/html/semantics/interactive-elements/the-dialog-element/remove-dialog-should-unblock-document-expected.txt:
  • web-platform-tests/inert/inert-canvas-fallback-content.tentative-expected.txt:
  • web-platform-tests/inert/inert-node-is-unfocusable.tentative-expected.txt:

Source/WebCore:

This change unfortunately regresses focusability state when dynamically setting inert, due to a cached
computed style invalidation bug. This is minor in practice, since focusability usually gets queried in
user-initiated ways, when style already has fully been updated.

However, making this change will improve performance by avoiding a full DOM ancestor walk when there
is no inert attribute on the page, since we will only check a style bit after this patch.

  • dom/Element.cpp:

(WebCore::Element::isFocusable const):
(WebCore::Element::isFocusableWithoutResolvingFullStyle const):
(WebCore::Element::isVisibleWithoutResolvingFullStyle const): Deleted.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::deprecatedIsInert const): Deleted.

  • dom/Node.h:
  • html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::isFocusable const):

LayoutTests:

  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-focusing-steps-inert-expected.txt: Added.
  • platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: Added.
4:46 PM Changeset in webkit [290553] by Tyler Wilcock
  • 3 edits in trunk/Source/WebCore

AX: Remove unnecessary AccessibilityRenderObject::init() override
https://bugs.webkit.org/show_bug.cgi?id=237239

Reviewed by Chris Fleizach.

The implementation of AccessibilityRenderObject::init() just calls
AccessibilityNodeObject::init(), so we don't need it as an override.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::init): Deleted.

  • accessibility/AccessibilityRenderObject.h:
3:36 PM Changeset in webkit [290552] by Chris Dumez
  • 12 edits in trunk

Drop Ref<>'s operator==() as it is a bit ambiguous / confusing
https://bugs.webkit.org/show_bug.cgi?id=237231

Reviewed by Darin Adler.

Drop Ref<>'s operator==() as it is a bit ambiguous / confusing. Some people expect it to compare
pointers while other expect it to compare the values we hold references to.
It seems best to omit this operator and be explicit at call sites.

Source/WebCore:

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::startSource):

  • svg/SVGDocumentExtensions.cpp:

(WebCore::SVGDocumentExtensions::removeElementToRebuild):

  • svg/graphics/filters/SVGFilterBuilder.cpp:

(WebCore::SVGFilterBuilder::buildEffectExpression const):

Source/WebKit:

  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:

(WebKit::WebProcessProxy::cacheMediaMIMETypes):

  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::sendStoreHandleToProcess):
(WebKit::VisitedLinkStore::didUpdateSharedStringHashes):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::shouldTerminate):

Source/WTF:

  • wtf/Ref.h:

(WTF::operator==): Deleted.
(WTF::operator!=): Deleted.

  • wtf/Vector.h:

(WTF::Vector::containsIf const):

2:12 PM Changeset in webkit [290551] by basuke.suzuki@sony.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove UNUSED warnings for non-Cocoa platform after r290449
https://bugs.webkit.org/show_bug.cgi?id=237233

Reviewed by Darin Adler.

  • runtime/JSDateMath.cpp:
1:04 PM Changeset in webkit [290550] by Kate Cheney
  • 15 edits in trunk

Update CSP handling of javascript URLs
https://bugs.webkit.org/show_bug.cgi?id=236351
<rdar://problem/88675827>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • web-platform-tests/content-security-policy/navigation/to-javascript-parent-initiated-parent-csp-disallow-expected.txt:
  • web-platform-tests/content-security-policy/navigation/to-javascript-url-script-src-expected.txt:

Source/WebCore:

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeJavaScriptURL):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::createWindow):

  • loader/SubframeLoader.cpp:

(WebCore::FrameLoader::SubframeLoader::requestFrame):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setLocation):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::allowJavaScriptURLs const):

  • page/csp/ContentSecurityPolicy.h:

LayoutTests:

  • TestExpectations:
  • http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-by-default-src-star-expected.txt:
  • http/tests/security/contentSecurityPolicy/javascript-url-blocked-expected.txt:
10:44 AM Changeset in webkit [290549] by Alan Bujtas
  • 3 edits
    2 adds in trunk

[RenderTreeBuilder] Clean up descendant floats when a block container becomes float
https://bugs.webkit.org/show_bug.cgi?id=237238
<rdar://79960422>

Reviewed by Antti Koivisto.

Source/WebCore:

When a block box becomes float, it forms a "lockdown" container for the descendant floats by establishing a BFC.
What it means is that such descendant floats can't intrude to sibling block containers anymore.
This patch ensures that we remove such floats from sibling (and their descendant) renderers.

Test: fast/block/float/float-merge-anon-parent-crash.html

  • rendering/updating/RenderTreeBuilder.cpp:

(WebCore::RenderTreeBuilder::normalizeTreeAfterStyleChange):

LayoutTests:

  • fast/block/float/float-merge-anon-parent-crash-expected.txt: Added.
  • fast/block/float/float-merge-anon-parent-crash.html: Added.
10:43 AM Changeset in webkit [290548] by Simon Fraser
  • 7 edits in trunk

No animation when scroll snap scroller is navigated with the keyboard
https://bugs.webkit.org/show_bug.cgi?id=236244

Reviewed by Tim Horton.

Source/WebCore:

Keyboard-driven scrolls in overflow didn't animate, simply because scrollAnimatorEnabled()
wasn't implemented for RenderLayerScrollableArea.

I could not figure out a reliable way to test that we animated the scroll.

  • rendering/RenderLayerScrollableArea.cpp:

(WebCore::RenderLayerScrollableArea::scrollAnimatorEnabled const):

  • rendering/RenderLayerScrollableArea.h:

LayoutTests:

Turn off the scroll animator for these tests that assume that scrolling is instantaneous.

  • css3/scroll-snap/scroll-padding-overflow-paging.html:
  • fast/events/wheelevent-in-scrolling-div.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-proximity-overflow-rtl-with-keyboard.html:
4:07 AM Changeset in webkit [290547] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebKit

Multiple concurrency violations in LibWebRTCCodecsProxy
https://bugs.webkit.org/show_bug.cgi?id=236767
<rdar://88904160>

Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-02-26
Reviewed by Antti Koivisto.

  • ThreadMessageReceivers should not add IPC listeners in constructors,

as the delivery starts right away and uses the unconstructed virtual pointer.

  • The work queue functions should not use GPUConnectionToWebProcess, as that is

main thread object.

  • Locked m_encoders, m_decoders are sometimes accessed without lock.

Instead:

  • Add the IPC listeners in initialize function.
  • Remove the IPC listeners when GPUConnectionToWebProcess disconnects.
  • Store the thread-safe conection, video frame object heap, process identity

objects as member variables.

  • Do not lock m_encoders, m_decoders. If they are work queue instances,

just access them in the work queue functions. Add thread requirements
to the variables so that the compiler checks the access.

  • Use IPC testing assertions when skipping incorrect messages.
  • Use separate atomic counter (bool) to check if allowsExitUnderMemoryPressure.

No new tests, tested with existing tests and ASAN.

  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::~GPUConnectionToWebProcess):
(WebKit::GPUConnectionToWebProcess::didClose):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:

(WebKit::LibWebRTCCodecsProxy::create):
(WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::stopListeningForIPC):
(WebKit::LibWebRTCCodecsProxy::initialize):
(WebKit::LibWebRTCCodecsProxy::dispatchToThread):
(WebKit::LibWebRTCCodecsProxy::createDecoderCallback):
(WebKit::LibWebRTCCodecsProxy::createH264Decoder):
(WebKit::LibWebRTCCodecsProxy::createH265Decoder):
(WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::createEncoder):
(WebKit::LibWebRTCCodecsProxy::releaseEncoder):
(WebKit::LibWebRTCCodecsProxy::initializeEncoder):
(WebKit::LibWebRTCCodecsProxy::findEncoder):
(WebKit::LibWebRTCCodecsProxy::encodeFrame):
(WebKit::LibWebRTCCodecsProxy::setEncodeRates):
(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameSemaphore):
(WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameMemory):
(WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):

2:04 AM Changeset in webkit [290546] by youenn@apple.com
  • 3 edits in trunk/LayoutTests

REGRESSION(r290358): [ Debug EWS ] ASSERTION FAILED: sample && sample->pixelBuffer()
https://bugs.webkit.org/show_bug.cgi?id=237164
<rdar://problem/89442999>

Unreviewed.

ASSERTS are fixed through https://bugs.webkit.org/show_bug.cgi?id=237027.
Removing crash expectations.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
Note: See TracTimeline for information about the timeline view.