Timeline



Dec 4, 2019:

11:17 PM Changeset in webkit [253145] by jh718.park@samsung.com
  • 3 edits in trunk/Source/WebKit

Unreviewed. Remove build warnings below since r253025.
warning: unused variable ‘iter’ [-Wunused-variable]
warning: unused variable ‘isNewEntry’ [-Wunused-variable]

No new tests, no new behavioral changes.

Patch by Joonghun Park <jh718.park@samsung.com> on 2019-12-04

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::addSessionStorageQuotaManager):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::SessionStorageQuotaManager::ensureOriginStorageQuotaManager):

10:26 PM Changeset in webkit [253144] by ysuzuki@apple.com
  • 3 edits
    2 adds in trunk

[JSC] AI should convert IsCellWithType to constant when Structure set is finite
https://bugs.webkit.org/show_bug.cgi?id=204141

Reviewed by Mark Lam.

JSTests:

  • stress/generator-cell-with-type.js: Added.

(shouldBe):
(shouldThrow):
(test):
(i.shouldThrow):

  • stress/is-cell-with-type-should-check-non-cell-cases.js: Added.

(getter):
(foo):

Source/JavaScriptCore:

We should fold IsCellWithType if Structure set is finite since we have a chance to know what JSType is.
The difference from the last patch is that we have if (!(child.m_type & ~SpecCell)) check. Even if
structures meet the requirement, this structures do not guarantee that non cell types never come. We
should ensure it by using proven type.

  • dfg/DFGAbstractInterpreterInlines.h:

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

10:19 PM Changeset in webkit [253143] by ysuzuki@apple.com
  • 11 edits in trunk/Source/JavaScriptCore

[JSC] Put TypedArrays in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204867

Reviewed by Mark Lam.

This patch puts TypedArrays in IsoSubspace.

  • JSArrayBuffer
  • JSDataView
  • JSInt8Array
  • JSInt16Array
  • JSInt32Array
  • JSUint8Array
  • JSUint8ClampedArray
  • JSUint16Array
  • JSUint32Array
  • JSFloat32Array
  • JSFloat64Array
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithSize):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):

  • runtime/JSArrayBuffer.h:
  • runtime/JSArrayBufferView.h:

(JSC::JSArrayBufferView::subspaceFor):

  • runtime/JSDataView.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSTypedArrays.h:
  • runtime/TypedArrayAdaptors.h:
  • runtime/VM.cpp:
  • runtime/VM.h:
9:02 PM Changeset in webkit [253142] by Fujii Hironori
  • 2 edits in trunk/Tools

run-javascriptcore-tests is failing to run testmasm of 64bit AppleWin on Buildbot
https://bugs.webkit.org/show_bug.cgi?id=204869

Reviewed by Per Arne Vollan.

testmasm is compiled only when DEVELOPER_MODE.
Enable DEVELOPER_MODE for all 64bit Windows builds.

  • Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Replaced "isFTW()
isWinCairo()" with isWin64()

in the condition of enabling DEVELOPER_MODE.

8:51 PM Changeset in webkit [253141] by rniwa@webkit.org
  • 9 edits
    4 deletes in trunk/Source/WebCore

Remove DocumentEventQueue and WorkerEventQueue
https://bugs.webkit.org/show_bug.cgi?id=204841

Reviewed by Sam Weinig.

Delete DocumentEventQueue and WorkerEventQueue since we don't use them after r252824.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.h:
  • dom/DocumentEventQueue.cpp: Removed.
  • dom/DocumentEventQueue.h: Removed.
  • page/VisualViewport.cpp:
  • rendering/RenderLayer.cpp:
  • rendering/RenderListBox.cpp:
  • workers/WorkerEventQueue.cpp: Removed.
  • workers/WorkerEventQueue.h: Removed.
  • worklets/WorkletGlobalScope.h:
8:41 PM Changeset in webkit [253140] by Tadeu Zagallo
  • 33 edits
    1 delete in trunk/Source/JavaScriptCore

[WebAssembly] Validate and generate bytecode in one pass
https://bugs.webkit.org/show_bug.cgi?id=204474

Reviewed by Saam Barati.

Currently, we traverse the WebAssembly code twice:

  • a first serial pass that validates all functions
  • a second concurrent pass that compiles all functions.

In this patch, we move the validation into the parser and update the LLIntPlan so that we no longer have
the first pass. Instead, we now validate concurrently at the same time we generate bytecode.

As a result, when we call WebAssembly.validate, we'll still generate bytecode for the module, but it will
be thrown away. If the module is constructed with new WebAssembly.Module, we'll also eagerly generate
bytecode, but in this case the bytecode is kept and shared across all instantiations of this module.

This is a 1.5x speedup when compiling the ZenGarden demo.

  • DerivedSources.make:
  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::ControlData::ControlData):
(JSC::Wasm::AirIRGenerator::ControlData::isIf):
(JSC::Wasm::AirIRGenerator::ControlData::isTopLevel):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::AirIRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::AirIRGenerator::emptyExpression):
(JSC::Wasm::AirIRGenerator::emitCallPatchpoint):
(JSC::Wasm::AirIRGenerator::tmpsForSignature):
(JSC::Wasm::AirIRGenerator::emitPatchpoint):
(JSC::Wasm::AirIRGenerator::AirIRGenerator):
(JSC::Wasm::AirIRGenerator::addRefIsNull):
(JSC::Wasm::AirIRGenerator::addTableGet):
(JSC::Wasm::AirIRGenerator::addTableSet):
(JSC::Wasm::AirIRGenerator::addTableGrow):
(JSC::Wasm::AirIRGenerator::addTableFill):
(JSC::Wasm::AirIRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::AirIRGenerator::addLoop):
(JSC::Wasm::AirIRGenerator::addBlock):
(JSC::Wasm::AirIRGenerator::addIf):
(JSC::Wasm::AirIRGenerator::addReturn):
(JSC::Wasm::AirIRGenerator::addEndToUnreachable):
(JSC::Wasm::AirIRGenerator::addCall):
(JSC::Wasm::AirIRGenerator::addCallIndirect):
(JSC::Wasm::AirIRGenerator::unify):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::AirIRGenerator::dump):
(JSC::Wasm::parseAndCompileAir):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF64>):
(JSC::Wasm::AirIRGenerator::addOp<OpType::I64TruncUF32>):

  • wasm/WasmAirIRGenerator.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::ControlData::ControlData):
(JSC::Wasm::B3IRGenerator::ControlData::isIf):
(JSC::Wasm::B3IRGenerator::ControlData::isTopLevel):
(JSC::Wasm::B3IRGenerator::ControlData::signature const):
(JSC::Wasm::B3IRGenerator::ControlData::hasNonVoidresult const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetArity const):
(JSC::Wasm::B3IRGenerator::ControlData::branchTargetType const):
(JSC::Wasm::B3IRGenerator::emptyExpression):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addRefIsNull):
(JSC::Wasm::B3IRGenerator::addTableGet):
(JSC::Wasm::B3IRGenerator::addTableSet):
(JSC::Wasm::B3IRGenerator::addTableGrow):
(JSC::Wasm::B3IRGenerator::addTableFill):
(JSC::Wasm::B3IRGenerator::emitLoopTierUpCheck):
(JSC::Wasm::B3IRGenerator::addLoop):
(JSC::Wasm::B3IRGenerator::addBlock):
(JSC::Wasm::B3IRGenerator::addIf):
(JSC::Wasm::B3IRGenerator::addReturn):
(JSC::Wasm::B3IRGenerator::endBlock):
(JSC::Wasm::B3IRGenerator::addEndToUnreachable):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::B3IRGenerator::dump):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::work):
(JSC::Wasm::BBQPlan::compileFunction):
(JSC::Wasm::BBQPlan::initializeCallees):
(JSC::Wasm::BBQPlan::didReceiveFunctionData):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmEntryPlan.cpp:

(JSC::Wasm::EntryPlan::EntryPlan):
(JSC::Wasm::EntryPlan::parseAndValidateModule):
(JSC::Wasm::EntryPlan::prepare):
(JSC::Wasm::EntryPlan::compileFunctions):
(JSC::Wasm::EntryPlan::complete):

  • wasm/WasmEntryPlan.h:
  • wasm/WasmFunctionParser.h:

(JSC::Wasm::splitStack):
(JSC::Wasm::FunctionParser::TypedExpression::TypedExpression):
(JSC::Wasm::FunctionParser::TypedExpression::type const):
(JSC::Wasm::FunctionParser::TypedExpression::value const):
(JSC::Wasm::FunctionParser::TypedExpression::operator ExpressionType const):
(JSC::Wasm::FunctionParser::TypedExpression::operator-> const):
(JSC::Wasm::FunctionParser::controlStack):
(JSC::Wasm::FunctionParser::validationFail const):
(JSC::Wasm::FunctionParser<Context>::parse):
(JSC::Wasm::FunctionParser<Context>::binaryCase):
(JSC::Wasm::FunctionParser<Context>::unaryCase):
(JSC::Wasm::FunctionParser<Context>::load):
(JSC::Wasm::FunctionParser<Context>::store):
(JSC::Wasm::FunctionParser<Context>::checkBranchTarget):
(JSC::Wasm::FunctionParser<Context>::unify):
(JSC::Wasm::FunctionParser<Context>::parseExpression):
(JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::ControlType::topLevel):
(JSC::Wasm::LLIntGenerator::ControlType::loop):
(JSC::Wasm::LLIntGenerator::ControlType::isIf):
(JSC::Wasm::LLIntGenerator::ControlType::isTopLevel):
(JSC::Wasm::LLIntGenerator::ControlType::stackSize const):
(JSC::Wasm::LLIntGenerator::ControlType::signature const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetArity const):
(JSC::Wasm::LLIntGenerator::ControlType::branchTargetType const):
(JSC::Wasm::LLIntGenerator::emptyExpression):
(JSC::Wasm::LLIntGenerator::dump):
(JSC::Wasm::LLIntGenerator::getDropKeepCount):
(JSC::Wasm::LLIntGenerator::materializeConstantsAndLocals):
(JSC::Wasm::LLIntGenerator::splitStack):
(JSC::Wasm::parseAndCompileBytecode):
(JSC::Wasm::LLIntGenerator::LLIntGenerator):
(JSC::Wasm::LLIntGenerator::callInformationForCaller):
(JSC::Wasm::LLIntGenerator::addLocal):
(JSC::Wasm::LLIntGenerator::setLocal):
(JSC::Wasm::LLIntGenerator::addLoop):
(JSC::Wasm::LLIntGenerator::addBlock):
(JSC::Wasm::LLIntGenerator::addIf):
(JSC::Wasm::LLIntGenerator::addEndToUnreachable):
(JSC::Wasm::LLIntGenerator::addCall):
(JSC::Wasm::LLIntGenerator::addCallIndirect):

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

(JSC::Wasm::LLIntPlan::LLIntPlan):
(JSC::Wasm::LLIntPlan::compileFunction):
(JSC::Wasm::LLIntPlan::didCompleteCompilation):
(JSC::Wasm::LLIntPlan::work):
(JSC::Wasm::LLIntPlan::didReceiveFunctionData):

  • wasm/WasmLLIntPlan.h:
  • wasm/WasmModule.cpp:

(JSC::Wasm::Module::Module):
(JSC::Wasm::makeValidationResult):
(JSC::Wasm::makeValidationCallback):
(JSC::Wasm::Module::validateSync):
(JSC::Wasm::Module::validateAsync):
(JSC::Wasm::Module::getOrCreateCodeBlock):
(JSC::Wasm::Module::compileSync):
(JSC::Wasm::Module::compileAsync):

  • wasm/WasmModule.h:

(JSC::Wasm::Module::create):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::dontFinalize):

  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::slow_path_wasm_throw_exception):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):

  • wasm/WasmThunks.h:
  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::ControlData::isIf):
(JSC::Wasm::Validate::ControlData::isTopLevel):
(JSC::Wasm::Validate::ControlData::blockType const):
(JSC::Wasm::Validate::ControlData::signature const):
(JSC::Wasm::Validate::ControlData::branchTargetArity const):
(JSC::Wasm::Validate::ControlData::branchTargetType const):
(JSC::Wasm::Validate::emptyExpression):
(JSC::Wasm::Validate::addConstant):
(JSC::Wasm::Validate::Validate):
(JSC::Wasm::Validate::addArguments):
(JSC::Wasm::Validate::addTableGet):
(JSC::Wasm::Validate::addTableSet):
(JSC::Wasm::Validate::addTableSize):
(JSC::Wasm::Validate::addTableGrow):
(JSC::Wasm::Validate::addTableFill):
(JSC::Wasm::Validate::addRefIsNull):
(JSC::Wasm::Validate::addRefFunc):
(JSC::Wasm::Validate::addLocal):
(JSC::Wasm::Validate::getLocal):
(JSC::Wasm::Validate::setLocal):
(JSC::Wasm::Validate::getGlobal):
(JSC::Wasm::Validate::setGlobal):
(JSC::Wasm::Validate::addBlock):
(JSC::Wasm::Validate::addLoop):
(JSC::Wasm::Validate::addSelect):
(JSC::Wasm::Validate::addIf):
(JSC::Wasm::Validate::addElse):
(JSC::Wasm::Validate::addElseToUnreachable):
(JSC::Wasm::Validate::addReturn):
(JSC::Wasm::Validate::addBranch):
(JSC::Wasm::Validate::addSwitch):
(JSC::Wasm::Validate::addGrowMemory):
(JSC::Wasm::Validate::addCurrentMemory):
(JSC::Wasm::Validate::endBlock):
(JSC::Wasm::Validate::addEndToUnreachable):
(JSC::Wasm::Validate::addCall):
(JSC::Wasm::Validate::addCallIndirect):
(JSC::Wasm::Validate::load):
(JSC::Wasm::Validate::store):
(JSC::Wasm::Validate::addOp):
(JSC::Wasm::dumpExpressionStack):
(JSC::Wasm::Validate::dump):
(JSC::Wasm::validateFunction):

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::enqueue):

  • wasm/generateWasmOpsHeader.py:

(cppType):
(cppMacro):
(opcodeMacroizer):
(opcodeWithTypesMacroizer):
(opcodeWithTypesMacroizer.modifier):
(memoryLoadMacroizer):
(memoryLoadMacroizer.modifier):
(memoryStoreMacroizer):
(memoryStoreMacroizer.modifier):

  • wasm/generateWasmValidateInlinesHeader.py: Removed.
  • wasm/js/JSWebAssembly.cpp:

(JSC::instantiate):
(JSC::webAssemblyValidateFunc):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

8:29 PM Changeset in webkit [253139] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Nullptr crash in RenderLayoutState::pageLogicalHeight const via RenderGrid::computeIntrinsicLogicalWidths inside RenderMarquee::updateMarqueePosition
https://bugs.webkit.org/show_bug.cgi?id=204527

Patch by Jack Lee <Jack Lee> on 2019-12-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/table/crash-empty-layoutStateStack.html

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::layout):
(WebCore::RenderTable::markForPaginationRelayoutIfNeeded):

LayoutTests:

  • fast/table/crash-empty-layoutStateStack-expected.txt: Added.
  • fast/table/crash-empty-layoutStateStack.html: Added.
8:13 PM Changeset in webkit [253138] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

IPC messages may get processed out of order in some cases
https://bugs.webkit.org/show_bug.cgi?id=204864

Reviewed by Ryosuke Niwa.

IPC messages may get processed out of order in some cases. Connection::SyncMessageState::dispatchMessages()
puts messages it did not process back at the end of the queue, instead of the beginning. This means that
messages added to the queue while Connection::SyncMessageState::dispatchMessages() was running will
incorrectly run *before* the ones dispatchMessages() did not process.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::SyncMessageState::dispatchMessages):

7:20 PM Changeset in webkit [253137] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Fix missing exception check in ArrayPrototype's fastJoin().
https://bugs.webkit.org/show_bug.cgi?id=204868
<rdar://problem/57516684>

Reviewed by Saam Barati.

JSTests:

  • stress/missing-exception-check-in-array-prototype-fastJoin.js: Added.

Source/JavaScriptCore:

  • runtime/ArrayPrototype.cpp:

(JSC::fastJoin):

5:37 PM Changeset in webkit [253136] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix a broken assertion in GetByStatus::computeForStubInfoWithoutExitSiteFeedback().
https://bugs.webkit.org/show_bug.cgi?id=204866

Reviewed by Saam Barati.

The assertion wrong assumes that access.offset() cannot be invalid unless the
access.type() is a Miss. However, if the AccessCase is a Custom value or accessor,
the offset is always invalid. This patch fixes this assertion.

  • bytecode/AccessCase.h:

(JSC::AccessCase::isCustom const):

  • bytecode/GetByStatus.cpp:

(JSC::GetByStatus::computeForStubInfoWithoutExitSiteFeedback):

5:24 PM Changeset in webkit [253135] by Chris Dumez
  • 22 edits
    2 adds in trunk/Source

PageConfiguration::progressTrackerClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204854

Reviewed by Alex Christensen.

Source/WebCore:

  • loader/EmptyClients.cpp:

(WebCore::pageConfigurationWithEmptyClients):

  • loader/ProgressTracker.cpp:

(WebCore::ProgressTracker::ProgressTracker):
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::~ProgressTracker): Deleted.

  • loader/ProgressTracker.h:

(WebCore::ProgressTracker::client):

  • loader/ProgressTrackerClient.h:

(WebCore::ProgressTrackerClient::progressTrackerDestroyed): Deleted.

  • page/Page.cpp:

(WebCore::Page::Page):

  • page/PageConfiguration.cpp:

(WebCore::PageConfiguration::PageConfiguration):

  • page/PageConfiguration.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:

(WebKit::WebProgressTrackerClient::progressTrackerDestroyed): Deleted.

  • WebProcess/WebCoreSupport/WebProgressTrackerClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

Source/WebKitLegacy:

  • PlatformWin.cmake:

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebProgressTrackerClient.h:
  • WebCoreSupport/WebProgressTrackerClient.mm:

(WebProgressTrackerClient::progressTrackerDestroyed): Deleted.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::progressStarted): Deleted.
(WebFrameLoaderClient::progressEstimateChanged): Deleted.
(WebFrameLoaderClient::progressFinished): Deleted.

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebProgressTrackerClient.cpp: Added.

(WebProgressTrackerClient::progressStarted):
(WebProgressTrackerClient::progressEstimateChanged):
(WebProgressTrackerClient::progressFinished):

  • WebCoreSupport/WebProgressTrackerClient.h: Added.
  • WebView.cpp:

(WebView::initWithFrame):

5:19 PM Changeset in webkit [253134] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Decrease ttl for archives
https://bugs.webkit.org/show_bug.cgi?id=204806
<rdar://problem/57527644>

Unreviewed infrastructure fix.

  • resultsdbpy/resultsdbpy/controller/archive_controller_unittest.py:

(ArchiveControllerUnittest.setup_webserver): Disable time-to-live.

  • resultsdbpy/resultsdbpy/model/mock_model_factory.py:

(MockModelFactory.create): Ensure time-to-live is longer than the oldest commit.

4:48 PM Changeset in webkit [253133] by eric.carlson@apple.com
  • 10 edits in trunk/Source/WebCore

Make MediaPlayer::client() private
https://bugs.webkit.org/show_bug.cgi?id=204856
<rdar://problem/57633186>

Reviewed by Jer Noble.

Make MediaPlayer::client private and create accessors for all of the client methods
that were being accessed directly. Also remove the MediaPlayer* parameters from
the client methods since none of them were used.

No new tests, no behavioral change.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerActiveSourceBuffersChanged):
(WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
(WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
(WebCore::HTMLMediaElement::mediaPlayerMuteChanged):
(WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
(WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged):
(WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
(WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported):
(WebCore::HTMLMediaElement::mediaPlayerRepaint):
(WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
(WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
(WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged):
(WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
(WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable):
(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
(WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):

  • html/HTMLMediaElement.h:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::loadWithNextMediaEngine):
(WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::readyStateChanged):
(WebCore::MediaPlayer::volumeChanged):
(WebCore::MediaPlayer::muteChanged):
(WebCore::MediaPlayer::timeChanged):
(WebCore::MediaPlayer::sizeChanged):
(WebCore::MediaPlayer::repaint):
(WebCore::MediaPlayer::durationChanged):
(WebCore::MediaPlayer::rateChanged):
(WebCore::MediaPlayer::playbackStateChanged):
(WebCore::MediaPlayer::firstVideoFrameAvailable):
(WebCore::MediaPlayer::characteristicChanged):
(WebCore::MediaPlayer::keyNeeded):
(WebCore::MediaPlayer::graphicsDeviceAdapter const):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
(WebCore::MediaPlayerClient::mediaPlayerMuteChanged):
(WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
(WebCore::MediaPlayerClient::mediaPlayerDurationChanged):
(WebCore::MediaPlayerClient::mediaPlayerRateChanged):
(WebCore::MediaPlayerClient::mediaPlayerPlaybackStateChanged):
(WebCore::MediaPlayerClient::mediaPlayerSawUnsupportedTracks):
(WebCore::MediaPlayerClient::mediaPlayerResourceNotSupported):
(WebCore::MediaPlayerClient::mediaPlayerRepaint):
(WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
(WebCore::MediaPlayerClient::mediaPlayerEngineUpdated):
(WebCore::MediaPlayerClient::mediaPlayerFirstVideoFrameAvailable):
(WebCore::MediaPlayerClient::mediaPlayerCharacteristicChanged):
(WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
(WebCore::MediaPlayerClient::mediaPlayerRenderingModeChanged):
(WebCore::MediaPlayerClient::mediaPlayerActiveSourceBuffersChanged):
(WebCore::MediaPlayerClient::mediaPlayerGraphicsDeviceAdapter const):
(WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
(WebCore::MediaPlayerClient::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
(WebCore::MediaPlayer::renderingCanBeAccelerated const):
(WebCore::MediaPlayer::renderingModeChanged const):
(WebCore::MediaPlayer::acceleratedCompositingEnabled):
(WebCore::MediaPlayer::activeSourceBuffersChanged):
(WebCore::MediaPlayer::playerContentBoxRect const):
(WebCore::MediaPlayer::playerContentsScale const):
(WebCore::MediaPlayer::shouldUsePersistentCache const):
(WebCore::MediaPlayer::mediaCacheDirectory const):
(WebCore::MediaPlayer::isVideoPlayer const):
(WebCore::MediaPlayer::mediaEngineUpdated):
(WebCore::MediaPlayer::isLooping const):
(WebCore::MediaPlayer::requestInstallMissingPlugins):
(WebCore::MediaPlayer::client const):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode const):
(WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
(WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::notifyActiveSourceBuffersChanged):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::ensureDecompressionSession):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::acceleratedRenderingStateChanged):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
(WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
(WebCore::MediaPlayerPrivateGStreamer::updateTracks):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::acceleratedRenderingStateChanged):

4:39 PM Changeset in webkit [253132] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Handle duplicate archives
https://bugs.webkit.org/show_bug.cgi?id=204860

Reviewed by Stephanie Lewis.

  • resultsdbpy/resultsdbpy/controller/archive_controller.py:

(ArchiveController): Pass test time to ArchiveContext, de-duplicate any
identical archives.

  • resultsdbpy/resultsdbpy/model/archive_context.py:

(ArchiveContext): Only upack identical archives once, pass digest to caller.

4:35 PM Changeset in webkit [253131] by timothy_horton@apple.com
  • 2 edits
    1 add in trunk/Source/WebKit

Fix the iOS build

  • Resources/SandboxProfiles/ios/com.apple.WebKit.GPU.sb: Added.
  • WebKit.xcodeproj/project.pbxproj:
4:27 PM Changeset in webkit [253130] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Unreviewed fix for failure to create sandbox extension on macOS after r253011. This should be iOS only.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
4:23 PM Changeset in webkit [253129] by Jonathan Bedard
  • 21 edits in trunk/Tools

Python 3: Add support in webkitpy.benchmark_runner
https://bugs.webkit.org/show_bug.cgi?id=204784

Reviewed by Stephanie Lewis.

  • Scripts/test-webkitpy-python3: Add webkitpy.benchmark_runner.
  • Scripts/webkitpy/benchmark_runner/benchmark_results.py:

(BenchmarkResults): Arithmetic aggregator should use integer division.
(BenchmarkResults._format_values): Convert map to list.
(BenchmarkResults._aggregate_results): Ditto.
(BenchmarkResults._aggregate_results_for_test): Use Python 2/3 compatible iteritems.
(BenchmarkResults._subtest_values_by_config_iteration): Ditto.
(BenchmarkResults._lint_subtest_results): Ditto.
(BenchmarkResults._lint_configuration): Ditto.

  • Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py: Use explicit imports.
  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/init.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_cog_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_epiphany_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowsergtk_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowserwpe_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_firefox_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/http_server_driver/init.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/run_benchmark.py: Ditto.
  • Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: Ditto.
4:10 PM Changeset in webkit [253128] by Jonathan Bedard
  • 40 edits in trunk/Tools

Python 3: Add support in webkitpy.tool
https://bugs.webkit.org/show_bug.cgi?id=204838

Reviewed by Stephanie Lewis.

  • Scripts/test-webkitpy-python3: Add webkitpy.tool.
  • Scripts/webkit-patch: Remove version check.
  • Scripts/webkitpy/common/net/bugzilla/bug.py:

(Bug.reviewed_patches): Convert filter to list.
(Bug.commit_queued_patches): Ditto.

  • Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:

(MockBugzillaQueries.fetch_bug_ids_from_commit_queue): Convert map to list.
(MockBugzillaQueries.fetch_attachment_ids_from_review_queue): Ditto.
(MockBugzillaQueries.fetch_bug_ids_from_pending_commit_list): Ditto.
(MockBugzilla.post_comment_to_bug): Sort cc list before printing.

  • Scripts/webkitpy/common/net/statusserver.py:

(StatusServer.set_api_key): Convert filter to list.

  • Scripts/webkitpy/common/net/web.py:

(Web.get_binary): Use Python 2/3 compatible urlopen.
(Web.request): Use Python 2/3 compatible Request.

  • Scripts/webkitpy/common/prettypatch.py:

(PrettyPatch.pretty_diff_file): Encode diff before printing.

  • Scripts/webkitpy/common/system/executive_mock.py:

(MockExecutive.run_and_throw_if_fail): Sort environment before printing.
(MockExecutive.run_command): Convert input to string before printing.

  • Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:

(FailingTestCommitQueue.test_results): Convert map to list.
(MockSimpleTestPlanCommitQueue.test_results): Ditto.

  • Scripts/webkitpy/tool/bot/feeders.py:

(CommitQueueFeeder.feed): Use Python 2/3 compatible sort.
(CommitQueueFeeder._patch_cmp): Deleted.

  • Scripts/webkitpy/tool/bot/flakytestreporter.py:

(FlakyTestReporter._lookup_bug_for_flaky_test): Convert filter to list.

  • Scripts/webkitpy/tool/bot/irc_command.py:

(Whois.execute): Convert map to list.

  • Scripts/webkitpy/tool/bot/retrylogic_unittest.py:

(JSCEarlyWarningSystemTest._create_task): Convert map to list.

  • Scripts/webkitpy/tool/bot/sheriff.py:
  • Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py: Use sorted lists

Instead of sets.

  • Scripts/webkitpy/tool/commands/download.py:

(AbstractPatchSequencingCommand.init): Use Python 2/3 compatible sort.

  • Scripts/webkitpy/tool/commands/download_unittest.py: Sort environment.
  • Scripts/webkitpy/tool/commands/earlywarningsystem.py:

(AbstractEarlyWarningSystem.load_ews_classes): str.translate differs between Python 2
and Python 3.

  • Scripts/webkitpy/tool/commands/newcommitbot.py:

(NewCommitBot._summarize_commit_log): Convert filter to list.

  • Scripts/webkitpy/tool/commands/queues.py:

(AbstractQueue.should_continue_work_queue): Handle case where iterations is a MagicMock.
(AbstractQueue._log_from_script_error_for_upload): Explicitly use BytesIO

  • Scripts/webkitpy/tool/commands/queues_unittest.py: Use explicit import paths.
  • Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Sort lists before comparing them.
  • Scripts/webkitpy/tool/commands/stepsequence.py:

(StepSequence.options): Use Python 2/3 compatible sort.

  • Scripts/webkitpy/tool/commands/suggestnominations.py:

(AbstractCommitLogCommand.init): Use Python 2/3 compatible sort.
(SuggestNominations._print_nominations): Ditto.
(SuggestNominations._print_counts): Ditto.
(SuggestNominations._print_nominations.nomination_cmp): Deleted.
(SuggestNominations._print_counts.counter_cmp): Deleted.

  • Scripts/webkitpy/tool/mocktool_unittest.py: Use explicit import paths.
  • Scripts/webkitpy/tool/multicommandtool.py:

(HelpCommand._help_epilog): Convert filter to list, use Python 2/3 compatible sort.
(MultiCommandTool._find_all_commands): Use Python 2/3 compatible sort.

  • Scripts/webkitpy/tool/servers/gardeningserver.py:

(GardeningHTTPServer): Use Python 2/3 compatible HTTPServers.

  • Scripts/webkitpy/tool/servers/rebaselineserver.py:

(get_test_baselines.AllPlatformsPort.baseline_search_path): Use list instead of utterable keys.
(RebaselineHTTPServer): Use Python 2/3 compatible HTTPServers.
(RebaselineHTTPServer.init): Ditto.

  • Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py:

(GetActualResultFilesTest.test): Use assertEqual instead of assertItemsEqual.

  • Scripts/webkitpy/tool/servers/reflectionhandler.py:

(ReflectionHandler): Use Python 2/3 compatible HTTPServers.

  • Scripts/webkitpy/tool/steps/applywatchlist.py:

(ApplyWatchList.run): Sort cc_emails before printing.

  • Scripts/webkitpy/tool/steps/applywatchlist_unittest.py: Print sorted list instead

of set.

  • Scripts/webkitpy/tool/steps/confirmdiff.py:

(ConfirmDiff._show_pretty_diff): Use Python 2/3 compatible pathname2url.

  • Scripts/webkitpy/tool/steps/haslanded.py:

(HasLanded.convert_to_svn): Use Python 2/3 compatible StringIO.
(HasLanded.strip_change_log): Ditto.

  • Scripts/webkitpy/tool/steps/preparechangelog.py:

(PrepareChangeLog._resolve_existing_entry): Convert zip object to list.

  • Scripts/webkitpy/tool/steps/promptforbugortitle.py: Use Python 2/3 compatible urlparse.
  • Scripts/webkitpy/tool/steps/steps_unittest.py: Sort environment.
  • Scripts/webkitpy/w3c/test_exporter.py: Use Python 2/3 compatible HTTPError.
  • Scripts/webkitpy/w3c/wpt_github.py:

(WPTGitHub.remove_label): Use Python 2/3 compatible urllib.quote.
(WPTGitHub.is_pr_merged): Use Python 2/3 compatible HTTPError.
(WPTGitHub.merge_pr): Ditto.
(JSONResponse.init):

4:07 PM Changeset in webkit [253127] by pvollan@apple.com
  • 6 edits in trunk/Source/WebKit

[iOS] The UI process should issue mach sandbox extension to "com.apple.AGXCompilerService"
https://bugs.webkit.org/show_bug.cgi?id=203915

Reviewed by Brent Fulgham.

Only a few iPad models need access to "com.apple.AGXCompilerService” in the WebContent process.
The UI process should issue this mach extension for these iPad models.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::deviceHasAGXCompilerService):
(WebKit::WebProcessPool::platformInitializeWebProcess):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

3:34 PM Changeset in webkit [253126] by Alan Coon
  • 5 edits in branches/safari-608-branch/Tools

Cherry-pick r252050. rdar://problem/56900657

REGRESSION(r252031): layout tests fail to run in non apple ports after r252031
https://bugs.webkit.org/show_bug.cgi?id=203844

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2019-11-05
Reviewed by Žan Doberšek.

Since r252032 Port.check_image_diff() assumes that ImageDiff binary is built in the build path, which is not
true for all ports. This patch adds Port._path_to_default_image_diff() to be used instead of the build_path()
and overriden by ports not building the ImageDiff in the build path.

  • Scripts/webkitpy/port/base.py: (Port.check_image_diff): (Port._path_to_default_image_diff): (Port._path_to_image_diff):
  • Scripts/webkitpy/port/gtk.py: (GtkPort._path_to_default_image_diff):
  • Scripts/webkitpy/port/win.py: (WinPort._path_to_default_image_diff):
  • Scripts/webkitpy/port/wpe.py: (WPEPort._path_to_default_image_diff):

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

3:24 PM Changeset in webkit [253125] by Alan Coon
  • 3 edits
    1 delete in tags/Safari-609.1.11

Cherry-pick r253124. rdar://problem/57596734

Unreviewed, rolling out r252416, vimeo does not work
https://bugs.webkit.org/show_bug.cgi?id=204141

JSTests:

  • stress/generator-cell-with-type.js: Removed.

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

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

3:01 PM Changeset in webkit [253124] by ysuzuki@apple.com
  • 3 edits
    1 delete in trunk

Unreviewed, rolling out r252416, vimeo does not work
https://bugs.webkit.org/show_bug.cgi?id=204141

JSTests:

  • stress/generator-cell-with-type.js: Removed.

Source/JavaScriptCore:

  • dfg/DFGAbstractInterpreterInlines.h:

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

2:24 PM Changeset in webkit [253123] by commit-queue@webkit.org
  • 12 edits in trunk

Non-callable "handleEvent" property is silently ignored
https://bugs.webkit.org/show_bug.cgi?id=200066

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-12-04
Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt:
  • web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt:
  • web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt:
  • web-platform-tests/dom/events/EventListener-handleEvent-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/event-handler-handleEvent-ignored-expected.txt:
  • web-platform-tests/websockets/interfaces/WebSocket/events/013-expected.txt:
  • web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.worker-expected.txt:

Source/WebCore:

This patch prevents "handleEvent" property from being looked up on event handlers
and also reports TypeError exception if "handleEvent" value is not callable.
Web IDL spec: https://heycam.github.io/webidl/#call-a-user-objects-operation (step 10.4)

Tests: fast/dom/exception-getting-event-handler.html

imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html
imported/w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-handleEvent-ignored.html
imported/w3c/web-platform-tests/websockets/interfaces/WebSocket/events/013.html
imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/onmessage.worker.html

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):

LayoutTests:

  • fast/dom/exception-getting-event-handler-expected.txt:
2:19 PM Changeset in webkit [253122] by Alan Coon
  • 8 edits in trunk/Source

Versioning.

1:50 PM Changeset in webkit [253121] by ysuzuki@apple.com
  • 16 edits
    1 add in trunk

[JSC] JSWebAssemblyGlobal creation should have exception check
https://bugs.webkit.org/show_bug.cgi?id=204857
<rdar://problem/57618579>

Reviewed by Mark Lam.

JSTests:

  • wasm/regress/wasm-global-creation-can-throw-an-exception.js: Added.

Source/JavaScriptCore:

Each WebAssembly cells have a path throwing an exception if WebAssembly is disabled. We lack exception checking after calling JSWebAssemblyGlobal::create
in WebAssemblyModuleRecord linking phase. While exception is never thrown in this place since this happens only when WebAssembly is enabled, we should put
scope.assertNoException() to satisfy exception verifier requirement. We also rename factory function of Wasm cells from "create" to "tryCreate" since it
can fail potentially.

  • wasm/js/JSWebAssembly.cpp:

(JSC::instantiate):

  • wasm/js/JSWebAssemblyGlobal.cpp:

(JSC::JSWebAssemblyGlobal::tryCreate):
(JSC::JSWebAssemblyGlobal::create): Deleted.

  • wasm/js/JSWebAssemblyGlobal.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::tryCreate):
(JSC::JSWebAssemblyInstance::create): Deleted.

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::tryCreate):
(JSC::JSWebAssemblyMemory::create): Deleted.

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::tryCreate):
(JSC::JSWebAssemblyTable::create): Deleted.

  • wasm/js/JSWebAssemblyTable.h:
  • wasm/js/WebAssemblyGlobalConstructor.cpp:

(JSC::constructJSWebAssemblyGlobal):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

1:50 PM Changeset in webkit [253120] by Wenson Hsieh
  • 6 edits in trunk/LayoutTests

Adopt UIHelper in a few more layout tests in fast/events
https://bugs.webkit.org/show_bug.cgi?id=204855

Reviewed by Darin Adler.

Fixes and cleans up some more layout tests; see below for details.

  • fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html:

Use async-await here, as well as UIHelper.dragFromPointToPoint.

  • fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt:
  • fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html:

This test sometimes times out when run in rapid succession, due to touches being dispatched while the test is
finishing. Fix this (and also simplify the test) by using UIHelper instead to synthesize taps, and only finish
the layout test after the expected number of clicks have been observed and all tap gestures have been sent.

  • fast/events/touch/ios/passive-by-default-overridden-on-document-and-window-expected.txt:
  • fast/events/touch/ios/passive-by-default-overridden-on-document-and-window.html:

This test currently fails due to finishing too early, before the touchend event is observed; fix this by waiting
for touchend events before finishing the test.

12:28 PM Changeset in webkit [253119] by ysuzuki@apple.com
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/wasm/jsapi/interface.any.worker.html is a flakey failure, WebAssembly.Global is not implemented
https://bugs.webkit.org/show_bug.cgi?id=200258

Reviewed by Saam Barati.

We implemented WebAssembly.Global now. So let's unmark it.

  • platform/mac/TestExpectations:
12:06 PM Changeset in webkit [253118] by Kate Cheney
  • 17 edits
    8 adds in trunk

Expose basic ITP data from the database for future API/SPI use
https://bugs.webkit.org/show_bug.cgi?id=203432
<rdar://problem/56085040>

Reviewed John Wilander.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html

http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html
http/tests/storageAccess/user-interface-data-with-storage-access-database.html
http/tests/storageAccess/user-interface-data-with-storage-access.html

Updated the toString() to report only if mostRecentUserInteractionTime
was in the last 24 hours as opposed to reporting an actual time since
mostRecentUserInteractionTime changes with each test run.

  • loader/ResourceLoadStatistics.cpp:

(WebCore::hasHadRecentUserInteraction):
(WebCore::ResourceLoadStatistics::toString const):

Source/WebKit:

Tests: http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html

http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html
http/tests/storageAccess/user-interface-data-with-storage-access-database.html
http/tests/storageAccess/user-interface-data-with-storage-access.html

Adds the ability to collect sorted ITP data for displaying in a
user interface.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore):
(WebKit::ResourceLoadStatisticsDatabaseStore::prepareStatements):
Added new queries to the database store to check for storage access in
the database and aggregate topFrames with the same
subframe/subresource so easily create the struct for collecting data
for the UI.

(WebKit::ResourceLoadStatisticsDatabaseStore::relationshipExists const):
Fixed an incorrect function name in the error message.

(WebKit::ResourceLoadStatisticsDatabaseStore::joinSubStatisticsForSorting):
Renamed unclear SQL variable names and added a bind parameter to
specify whether resource is prevalent or not, which allows
this function to be used to collect sorted ITP data
for the UI.

(WebKit::ResourceLoadStatisticsDatabaseStore::getFirstPartyDataForDomain const):
(WebKit::ResourceLoadStatisticsDatabaseStore::gatherDataForUserInterface const):

(WebKit::buildQueryStartAndEnd):
(WebKit::getMedianOfPrevalentResourcesWithUserInteraction):
(WebKit::ResourceLoadStatisticsDatabaseStore::getTopPrevelentResourceDaysSinceUI const):
(WebKit::getMedianOfPrevalentResourceWithoutUserInteraction):
(WebKit::getNumberOfPrevalentResourcesInTopResources):
Changed sql query variable names to make them more clear and added a
new bind parameter to allow for more general use of substatistic
sorting query.

(WebKit::ResourceLoadStatisticsDatabaseStore::hasStorageAccess const):
(WebKit::ResourceLoadStatisticsDatabaseStore::dumpResourceLoadStatistics const):
Combined UI data with dumpResourceLoadStatistics() data to keep the testing aspect
of this patch simpler.

(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const):
Since mostRecentUserInteractionTime changes with each test run, I
updated the dumping to report only if it was in the last 24 hours as
opposed to reporting an actual time.

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

(WebKit::ensureFirstPartyStatistic):
(WebKit::getFirstPartyDataForDomain):
(WebKit::hasBeenThirdParty):
(WebKit::ResourceLoadStatisticsMemoryStore::gatherDataForUserInterface const):
(WebKit::ResourceLoadStatisticsMemoryStore::dumpResourceLoadStatistics):

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

(WebKit::WebResourceLoadStatisticsStore::gatherDataForUserInterface):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.h:

(WebKit::FirstPartyData::toString const):
(WebKit::FirstPartyData::operator== const):
(WebKit::ThirdPartyData::toString const):
(WebKit::ThirdPartyData::operator< const):
The toString methods allow the structs to be printed for testing
purposes. The equals methods allow the return vectors to use
appendIfNotContains.

LayoutTests:

Added new tests to check if basic ITP data is properly
collected and sorted for both the database store and the memory store.
Also edited any tests which use dumpResourceLoadStatistics() to also
expect the new aggregated data to be displayed.

  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-database-expected.txt:
  • http/tests/resourceLoadStatistics/count-third-party-script-import-in-worker-expected.txt:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads-database-expected.txt:
  • http/tests/resourceLoadStatistics/count-third-party-script-loads-expected.txt:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-database-expected.txt:
  • http/tests/resourceLoadStatistics/dont-count-third-party-image-as-third-party-script-expected.txt:
  • http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-database.html: Added.
  • http/tests/resourceLoadStatistics/user-interface-data-no-storage-access-expected.txt: Added.
  • http/tests/resourceLoadStatistics/user-interface-data-no-storage-access.html: Added.
  • http/tests/storageAccess/user-interface-data-with-storage-access-database-expected.txt: Added.
  • http/tests/storageAccess/user-interface-data-with-storage-access-database.html: Added.
  • http/tests/storageAccess/user-interface-data-with-storage-access-expected.txt: Added.
  • http/tests/storageAccess/user-interface-data-with-storage-access.html: Added.
11:02 AM Changeset in webkit [253117] by Jonathan Bedard
  • 2 edits in trunk/Tools

Unreviewed, rolling out r253069.

requests not handling certificate chain correctly in Catalina

Reverted changeset:

"results.webkit.org: Sort out certificates on Catalina"
https://bugs.webkit.org/show_bug.cgi?id=202837
https://trac.webkit.org/changeset/253069

10:49 AM Changeset in webkit [253116] by ysuzuki@apple.com
  • 8 edits in trunk/Source/JavaScriptCore

[JSC] Put more cells into IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204845

Reviewed by Saam Barati.

This patch puts following cells in IsoSubspace.

  • ClonedArguments
  • JSMap
  • JSSet
  • RegExpObject
  • runtime/ClonedArguments.h:
  • runtime/JSMap.h:
  • runtime/JSSet.h:
  • runtime/RegExpObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WeakMapImpl.h:

(JSC::WeakMapImpl::subspaceFor):

10:46 AM Changeset in webkit [253115] by ysuzuki@apple.com
  • 49 edits
    12 adds in trunk/JSTests

[JSC] Update Wasm spec-tests
https://bugs.webkit.org/show_bug.cgi?id=204844

Reviewed by Keith Miller.

To get broader coverage, we update Wasm spec-tests to the latest one[1].

[1]: 3e5fdc6b51ca2cde537bb8ecb1ba25c1ee366833

  • wasm.yaml:
  • wasm/spec-tests/address.wast.js:
  • wasm/spec-tests/align.wast.js:
  • wasm/spec-tests/binary-leb128.wast.js: Added.
  • wasm/spec-tests/binary.wast.js:
  • wasm/spec-tests/block.wast.js:
  • wasm/spec-tests/br.wast.js:
  • wasm/spec-tests/br_if.wast.js:
  • wasm/spec-tests/br_table.wast.js:
  • wasm/spec-tests/call_indirect.wast.js:
  • wasm/spec-tests/const.wast.js:
  • wasm/spec-tests/conversions.wast.js:
  • wasm/spec-tests/custom.wast.js: Added.
  • wasm/spec-tests/data.wast.js: Added.
  • wasm/spec-tests/elem.wast.js: Added.
  • wasm/spec-tests/endianness.wast.js:
  • wasm/spec-tests/f32.wast.js:
  • wasm/spec-tests/f32_bitwise.wast.js:
  • wasm/spec-tests/f32_cmp.wast.js:
  • wasm/spec-tests/f64.wast.js:
  • wasm/spec-tests/f64_bitwise.wast.js:
  • wasm/spec-tests/f64_cmp.wast.js:
  • wasm/spec-tests/fac.wast.js:
  • wasm/spec-tests/float_exprs.wast.js:
  • wasm/spec-tests/float_literals.wast.js:
  • wasm/spec-tests/float_memory.wast.js:
  • wasm/spec-tests/func.wast.js:
  • wasm/spec-tests/func_ptrs.wast.js:
  • wasm/spec-tests/i32.wast.js:
  • wasm/spec-tests/i64.wast.js:
  • wasm/spec-tests/imports.wast.js:
  • wasm/spec-tests/int_exprs.wast.js:
  • wasm/spec-tests/int_literals.wast.js:
  • wasm/spec-tests/labels.wast.js:
  • wasm/spec-tests/left-to-right.wast.js:
  • wasm/spec-tests/load.wast.js: Added.
  • wasm/spec-tests/local_get.wast.js: Added.
  • wasm/spec-tests/local_set.wast.js: Added.
  • wasm/spec-tests/local_tee.wast.js: Added.
  • wasm/spec-tests/loop.wast.js:
  • wasm/spec-tests/memory_grow.wast.js: Added.
  • wasm/spec-tests/memory_size.wast.js: Added.
  • wasm/spec-tests/memory_trap.wast.js:
  • wasm/spec-tests/names.wast.js:
  • wasm/spec-tests/nop.wast.js:
  • wasm/spec-tests/return.wast.js:
  • wasm/spec-tests/select.wast.js:
  • wasm/spec-tests/stack.wast.js:
  • wasm/spec-tests/start.wast.js:
  • wasm/spec-tests/store.wast.js: Added.
  • wasm/spec-tests/switch.wast.js:
  • wasm/spec-tests/traps.wast.js:
  • wasm/spec-tests/type.wast.js:
  • wasm/spec-tests/unreachable.wast.js:
  • wasm/spec-tests/unreached-invalid.wast.js:
  • wasm/spec-tests/unwind.wast.js:
  • wasm/spec-tests/utf8-custom-section-id.wast.js:
  • wasm/spec-tests/utf8-import-field.wast.js:
  • wasm/spec-tests/utf8-import-module.wast.js:
  • wasm/spec-tests/utf8-invalid-encoding.wast.js: Added.
10:45 AM Changeset in webkit [253114] by timothy_horton@apple.com
  • 2 edits in branches/safari-608-branch/Tools

Fix the TestWebKitAPI 608-branch build

  • TestWebKitAPI/Configurations/Base.xcconfig:

We didn't merge this line from trunk, but merged other things that depend on it being there.

10:39 AM Changeset in webkit [253113] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove m_sharingMode field from JSArrayBufferPrototype and make it plain object
https://bugs.webkit.org/show_bug.cgi?id=204832

Reviewed by Saam Barati.

m_sharingMode field is not necessary. Just remove it and make JSArrayBufferPrototype a plain object.

  • runtime/JSArrayBufferPrototype.cpp:

(JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
(JSC::JSArrayBufferPrototype::finishCreation):
(JSC::JSArrayBufferPrototype::create):

  • runtime/JSArrayBufferPrototype.h:
10:36 AM Changeset in webkit [253112] by commit-queue@webkit.org
  • 9 edits in trunk

Add exclusion rule for text manipulation SPI to exclude based on element class
https://bugs.webkit.org/show_bug.cgi?id=204754
<rdar://problem/57398802>

Patch by Louie Livon-Bemel <Louie Livon-Bemel> on 2019-12-04
Reviewed by Ryosuke Niwa.

Source/WebCore:

Tests: TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClass

TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForClassAndAttribute

  • editing/TextManipulationController.cpp:

(WebCore::TextManipulationController::ExclusionRule::match const):

When matching a ClassRule, check that the element has at least one class, and that the classList contains
the rule's class name. Checking it this way rather than checking if the ClassList contains the rule allows
us to avoid mutating the element in this function.

  • editing/TextManipulationController.h:

Add a new rule type for a ClassRule.

(WebCore::TextManipulationController::ExclusionRule::ClassRule::encode const):
(WebCore::TextManipulationController::ExclusionRule::ClassRule::decode):

Source/WebKit:

Give clients another option for adding an exclusion for text manipulation; allow them to exclude based on an
element having a certain class.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _startTextManipulationsWithConfiguration:completion:]):

If the rule doesn't have an attribute but does have a class name, treat it as a ClassRule exclusion.

  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.h:

Add an initializer for excluding based on a class name. Also add a getter for the className.

  • UIProcess/API/Cocoa/_WKTextManipulationExclusionRule.mm:

(-[_WKTextManipulationExclusionRule initExclusion:forClass:]):
(-[_WKTextManipulationExclusionRule className]):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

  • When matching a class, it should work even with other class names on the element.
  • All children elements should get the same exclusion rule, unless overridden by another rule.
10:19 AM Changeset in webkit [253111] by Alan Coon
  • 7 edits in tags/Safari-609.1.11/Source

Revert r252755. rdar://problem/57607890

10:17 AM Changeset in webkit [253110] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/WebKit

Cherry-pick r252811. rdar://problem/57609336

[iOS] Copy assertions before iterating over them in _notifyAssertionsOfImminentSuspension
https://bugs.webkit.org/show_bug.cgi?id=204524
<rdar://problem/57265830>

Reviewed by Alexey Proskuryakov.

Copy assertions before iterating over them in _notifyAssertionsOfImminentSuspension and use WeakPtr
to make sure the assertions are still alive before calling uiAssertionWillExpireImminently() on
them. It is common for process assertions to get released when uiAssertionWillExpireImminently()
gets called, which would remove them from the _assertionsNeedingBackgroundTask vector we were
iterating on.

  • UIProcess/ios/ProcessAssertionIOS.mm: (-[WKProcessAssertionBackgroundTaskManager _notifyAssertionsOfImminentSuspension]):

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

10:16 AM Changeset in webkit [253109] by Alan Coon
  • 2 edits in branches/safari-608-branch/Source/JavaScriptCore

Cherry-pick r252674. rdar://problem/57609333

[JSC] MetadataTable::sizeInBytes should not touch m_rawBuffer in UnlinkedMetadataTable unless MetadataTable is linked to that UnlinkedMetadataTable
https://bugs.webkit.org/show_bug.cgi?id=204390

Reviewed by Mark Lam.

We have a race issue here. When calling MetadataTable::sizeInBytes, we call UnlinkedMetadataTable::sizeInBytes since we change the result based on
whether this MetadataTable is linked to this UnlinkedMetadataTable or not. The problem is that we are calling UnlinkedMetadataTable::totalSize
unconditionally in UnlinkedMetadataTable::sizeInBytes, and this is touching m_rawBuffer unconditionally. This is not correct since it is possible
that this m_rawBuffer is realloced while we are calling MetadataTable::sizeInBytes in GC thread.

  1. The GC thread is calling MetadataTable::sizeInBytes for MetadataTable "A".
  2. The main thread is destroying MetadataTable "B".
  3. MetadataTable "B" is linked to UnlinkedMetadataTable "C".
  4. MetadataTable "A" is pointing to UnlinkedMetadataTable "C".
  5. "A" is touching UnlinkedMetadataTable::m_rawBuffer in "C", called from MetadataTable::sizeInBytes.
  6. (2) destroys MetadataTable "B", and realloc UnlinkedMetadataTable::m_rawBuffer in "C".
  7. (5) can touch already freed buffer.

This patch fixes UnlinkedMetadataTable::sizeInBytes: not touching m_rawBuffer unless it is owned by the caller's MetadataTable. We need to call
UnlinkedMetadataTable::sizeInBytes anyway since we need to adjust the result based on whether the caller MetadataTable is linked to this UnlinkedMetadataTable.

  • bytecode/UnlinkedMetadataTableInlines.h: (JSC::UnlinkedMetadataTable::sizeInBytes):

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

10:04 AM Changeset in webkit [253108] by dino@apple.com
  • 6 edits in trunk/Source

Enable WebGL's ASTC extension all the time
https://bugs.webkit.org/show_bug.cgi?id=202836
<rdar://problem/57627592>

Patch by Kenneth Russell <kbr@chromium.org> on 2019-12-04
Reviewed by Dean Jackson.

Remove the run-time flag - no longer necessary.

Source/WebCore:

  • html/canvas/WebGLCompressedTextureASTC.cpp:

(WebCore::WebGLCompressedTextureASTC::supported):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::extensionIsEnabled):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const): Deleted.

Source/WebKit:

  • Shared/WebPreferences.yaml:
10:00 AM Changeset in webkit [253107] by Antti Koivisto
  • 5 edits
    2 adds in trunk

[LFC][Integration] Paint with TextPainter
https://bugs.webkit.org/show_bug.cgi?id=204852

Reviewed by Zalan Bujtas.

Source/WebCore:

Display::Painter is very rudimentary and turning it into a full painting implementation
requires lot of refactoring. Instead, for now use separate painting code in the integration
layer that invokes the existing render tree based painting helpers.

This also enables writing reftests for intergrated LFC layout.

Test: fast/layoutformattingcontext/flow-integration-basic-paint.html

  • layout/displaytree/DisplayInlineContent.h:

(WebCore::Display:: const):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::computeOverflow):
(WebCore::LayoutIntegration::LineLayout::paint):

Adopted from SimpleLineLayout::paintFlow with support for per-run style added.

(WebCore::LayoutIntegration::LineLayout::debugTextShadow):

  • layout/integration/LayoutIntegrationLineLayout.h:

LayoutTests:

  • fast/layoutformattingcontext/flow-integration-basic-paint-expected.html: Added.
  • fast/layoutformattingcontext/flow-integration-basic-paint.html: Added.
9:46 AM Changeset in webkit [253106] by ysuzuki@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

[JSC] Place Wasm cells in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204829

Reviewed by Saam Barati.

This patch places Wasm cells in IsoSubspace. We remove JSDestructibleObject inheritance in wasm cells since we
can call destructor through HeapCellType's specialization. We do not need to rely on m_classInfo->methodTable->destroy.
This patch does not include JSToWasmICCallee since now I'm exploring the way to remove it completely.

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::destroy):

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/JSWebAssemblyTable.h:
  • wasm/js/WebAssemblyGlobalConstructor.h:
9:12 AM Changeset in webkit [253105] by Simon Fraser
  • 11 edits in trunk

Implement the CSS clamp() function
https://bugs.webkit.org/show_bug.cgi?id=203310
<rdar://problem/56551088>

Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-values/clamp-length-computed-expected.txt:
  • web-platform-tests/css/css-values/clamp-length-serialize-expected.txt:

Source/WebCore:

Implement the CSS clamp() function, of the form clamp(min, value, max):
https://drafts.csswg.org/css-values-4/#funcdef-clamp

This is a natural extension of min() and max(), the main difference being
that it takes exactly three arguments.

Tests: fast/css/calc-parsing.html

web-platform-tests/css/css-values/clamp-length-computed-expected.txt:
web-platform-tests/css/css-values/clamp-length-serialize-expected.txt:

  • css/CSSCalculationValue.cpp:

(WebCore::functionFromOperator):
(WebCore::determineCategory):
(WebCore::resolvedTypeForMinOrMaxOrClamp):
(WebCore::CSSCalcOperationNode::createMinOrMaxOrClamp):
(WebCore::functionPrefixForOperator):
(WebCore::CSSCalcOperationNode::evaluateOperator):
(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
(WebCore::createCSS):
(WebCore::CSSCalcValue::isCalcFunction):
(WebCore::resolvedTypeForMinOrMax): Deleted.
(WebCore::CSSCalcOperationNode::createMinOrMax): Deleted.

  • css/CSSValueKeywords.in:
  • platform/CalculationValue.cpp:

(WebCore::CalcExpressionOperation::evaluate const):
(WebCore::operator<<):

  • platform/CalculationValue.h:

LayoutTests:

Some basic clamp() parsing tests (valid and invalid inputs).

  • fast/css/calc-parsing-expected.txt:
  • fast/css/calc-parsing.html:
7:43 AM Changeset in webkit [253104] by youenn@apple.com
  • 234 edits
    13 copies
    2 moves
    105 adds
    21 deletes in trunk/LayoutTests

Update WPT tools directory
https://bugs.webkit.org/show_bug.cgi?id=204728

LayoutTests/imported/w3c:

Reviewed by Simon Fraser.

  • web-platform-tests/service-workers/cache-storage/serviceworker/cache-add.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/window/cache-add.https-expected.txt:
  • web-platform-tests/service-workers/cache-storage/worker/cache-add.https-expected.txt:
  • web-platform-tests/tools: Refreshed

LayoutTests:

Reviewed by Simon Fraser.

6:16 AM Changeset in webkit [253103] by youenn@apple.com
  • 17 edits in trunk

WebProcessPool::terminateServiceWorkerProcess should be renamed terminateServiceWorkers
https://bugs.webkit.org/show_bug.cgi?id=204792

Reviewed by Chris Dumez.

Source/WebKit:

Make use of disableServiceWorkers in terminateServiceWorkers as we might need to handle the case of a service worker in a process containing a page.
Renaming API accordingly.
Covered by existing tests.

  • UIProcess/API/C/WKContext.cpp:

(WKContextTerminateServiceWorkers):

  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _terminateServiceWorkers]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::establishWorkerContextConnectionToNetworkProcess):
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::updateServiceWorkerUserAgent):
(WebKit::WebProcessPool::terminateNetworkProcess):
(WebKit::WebProcessPool::terminateServiceWorkers):
(WebKit::WebProcessPool::updateProcessAssertions):
(WebKit::WebProcessPool::isServiceWorkerPageID const):

  • UIProcess/WebProcessPool.h:

Tools:

Renaming testRunner API from terminateServiceWorkerProcess to terminateServiceWorkers.

  • TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::terminateServiceWorkers):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::terminateServiceWorkers):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/workers/service/resources/postmessage-after-sw-process-crash.js:
5:47 AM Changeset in webkit [253102] by youenn@apple.com
  • 37 edits
    2 adds in trunk

Move soft update handling to network process
https://bugs.webkit.org/show_bug.cgi?id=204678

Reviewed by Chris Dumez.

Source/WebCore:

  • workers/WorkerScriptLoader.cpp:

(WebCore::WorkerScriptLoader::validateResponse):
(WebCore::WorkerScriptLoader::didReceiveResponse):

  • workers/WorkerScriptLoader.h:
  • workers/service/ServiceWorkerJobData.cpp:

(WebCore::ServiceWorkerJobData::isEquivalent const):

  • workers/service/ServiceWorkerJobData.h:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):

  • workers/service/ServiceWorkerRegistration.h:
  • workers/service/context/SWContextManager.cpp:
  • workers/service/context/SWContextManager.h:
  • workers/service/context/ServiceWorkerFetch.cpp:

(WebCore::ServiceWorkerFetch::dispatchFetchEvent):

  • workers/service/context/ServiceWorkerThread.cpp:
  • workers/service/context/ServiceWorkerThread.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::didResolveRegistrationPromise):
(WebCore::SWServer::SWServer):
(WebCore::SWServer::scheduleJob):
(WebCore::SWServer::resolveRegistrationJob):
(WebCore::originURL):
(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::scriptFetchFinished):
(WebCore::SWServer::didResolveRegistrationPromise):
(WebCore::SWServer::softUpdate):

  • workers/service/server/SWServer.h:

(WebCore::SWServer::getRegistration):

  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::runUpdateJob):

  • workers/service/server/SWServerJobQueue.h:

(WebCore::SWServerJobQueue::enqueueJob):

  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::SWServerRegistration):
(WebCore::SWServerRegistration::setUpdateViaCache):
(WebCore::SWServerRegistration::softUpdate):
(WebCore::SWServerRegistration::scheduleSoftUpdate):

  • workers/service/server/SWServerRegistration.h:

(WebCore::SWServerRegistration::scopeURLWithoutFragment const):
(WebCore::SWServerRegistration::scriptURL const):

  • workers/service/server/SWServerToContextConnection.h:

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::swServerForSession):

  • NetworkProcess/NetworkSession.h:

(WebKit::NetworkSession::addSoftUpdateLoader):
(WebKit::NetworkSession::removeSoftUpdateLoader):

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.cpp:

(WebKit::ServiceWorkerFetchTask::ServiceWorkerFetchTask):
(WebKit::ServiceWorkerFetchTask::didReceiveRedirectResponse):
(WebKit::ServiceWorkerFetchTask::didReceiveResponse):
(WebKit::ServiceWorkerFetchTask::didFail):
(WebKit::ServiceWorkerFetchTask::didNotHandle):
(WebKit::ServiceWorkerFetchTask::continueFetchTaskWith):
(WebKit::ServiceWorkerFetchTask::timeoutTimerFired):
(WebKit::ServiceWorkerFetchTask::softUpdateIfNeeded):

  • NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h:
  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.cpp: Added.

(WebKit::ServiceWorkerSoftUpdateLoader::start):
(WebKit::ServiceWorkerSoftUpdateLoader::ServiceWorkerSoftUpdateLoader):
(WebKit::ServiceWorkerSoftUpdateLoader::~ServiceWorkerSoftUpdateLoader):
(WebKit::ServiceWorkerSoftUpdateLoader::fail):
(WebKit::ServiceWorkerSoftUpdateLoader::loadWithCacheEntry):
(WebKit::ServiceWorkerSoftUpdateLoader::loadFromNetwork):
(WebKit::ServiceWorkerSoftUpdateLoader::willSendRedirectedRequest):
(WebKit::ServiceWorkerSoftUpdateLoader::didReceiveResponse):
(WebKit::ServiceWorkerSoftUpdateLoader::didReceiveBuffer):
(WebKit::ServiceWorkerSoftUpdateLoader::didFinishLoading):
(WebKit::ServiceWorkerSoftUpdateLoader::didFailLoading):
(WebKit::ServiceWorkerSoftUpdateLoader::didComplete):

  • NetworkProcess/ServiceWorker/ServiceWorkerSoftUpdateLoader.h: Added.
  • NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::createFetchTask):

  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
  • NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/WebSWContextManagerConnection.cpp:
  • WebProcess/Storage/WebSWContextManagerConnection.h:
  • WebProcess/Storage/WebSWContextManagerConnection.messages.in:
5:12 AM Changeset in webkit [253101] by Patrick Griffis
  • 3 edits in trunk/Tools

[GTK][WPE] Add libuuid to install-dependencies
https://bugs.webkit.org/show_bug.cgi?id=204705

Reviewed by Adrian Perez de Castro.

  • gtk/install-dependencies:
  • wpe/install-dependencies:
4:06 AM Changeset in webkit [253100] by youenn@apple.com
  • 15 edits
    13 adds in trunk

Add support for WebIDL setlike
https://bugs.webkit.org/show_bug.cgi?id=159140

Reviewed by Chris Dumez.

Source/WebCore:

Add preliminary support for https://heycam.github.io/webidl/#idl-setlike in the binding generator and IDL parser.
A setlike JS wrapper owns a JSSet as a private slot that mirrors values owned by the wrapped object.
forEach support is still missing.

A DOM class implementing setlike must currently implement the following methods:

  • initializeSetLike
  • addFromSetLike
  • removeFromSetLike

Added an internals class implementing setlike to test it.
Also covered by binding tests.

Test: js/dom/setlike.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMSetLike.cpp: Added.

(WebCore::getBackingSet):
(WebCore::clearBackingSet):
(WebCore::addToBackingSet):
(WebCore::forwardAttributeGetterToBackingSet):
(WebCore::forwardFunctionCallToBackingSet):

  • bindings/js/JSDOMSetLike.h: Added.

(WebCore::DOMSetAdapter::DOMSetAdapter):
(WebCore::DOMSetAdapter::add):
(WebCore::DOMSetAdapter::clear):
(WebCore::DOMSetAdapter::globalObject const):
(WebCore::getAndInitializeBackingSet):
(WebCore::forwardSizeToSetLike):
(WebCore::forwardEntriesToSetLike):
(WebCore::forwardKeysToSetLike):
(WebCore::forwardValuesToSetLike):
(WebCore::forwardHasToSetLike):
(WebCore::forwardClearToSetLike):
(WebCore::forwardAddToSetLike):
(WebCore::forwardDeleteToSetLike):

  • bindings/js/WebCoreBuiltinNames.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GetFullyQualifiedImplementationCallName):
(AddAdditionalArgumentsForImplementationCall):
(IsAcceleratedDOMAttribute):
(PrototypeOperationCount):
(GeneratePropertiesHashTable):
(InterfaceNeedsIterator):
(GenerateImplementation):
(GenerateAttributeGetterBodyDefinition):
(GenerateOperationBodyDefinition):
(GetRuntimeEnabledStaticProperties):

  • bindings/scripts/IDLParser.pm:

(cloneOperation):
(applyTypedefs):
(parseOperationOrReadWriteAttributeOrMaplike):
(parseReadOnlyMember):
(parseOperation):
(parseSetLikeRest):
(parseSetLikeProperties):
(applyMemberList):

  • bindings/scripts/test/JS/JSReadOnlySetLike.cpp: Added.

(WebCore::JSReadOnlySetLikePrototype::create):
(WebCore::JSReadOnlySetLikePrototype::createStructure):
(WebCore::JSReadOnlySetLikePrototype::JSReadOnlySetLikePrototype):
(WebCore::JSReadOnlySetLikeConstructor::prototypeForStructure):
(WebCore::JSReadOnlySetLikeConstructor::initializeProperties):
(WebCore::JSReadOnlySetLikePrototype::finishCreation):
(WebCore::JSReadOnlySetLike::JSReadOnlySetLike):
(WebCore::JSReadOnlySetLike::finishCreation):
(WebCore::JSReadOnlySetLike::createPrototype):
(WebCore::JSReadOnlySetLike::prototype):
(WebCore::JSReadOnlySetLike::getConstructor):
(WebCore::JSReadOnlySetLike::destroy):
(WebCore::IDLAttribute<JSReadOnlySetLike>::cast):
(WebCore::IDLOperation<JSReadOnlySetLike>::cast):
(WebCore::jsReadOnlySetLikeConstructor):
(WebCore::setJSReadOnlySetLikeConstructor):
(WebCore::jsReadOnlySetLikeSizeGetter):
(WebCore::jsReadOnlySetLikeSize):
(WebCore::jsReadOnlySetLikePrototypeFunctionHasBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionHas):
(WebCore::jsReadOnlySetLikePrototypeFunctionEntriesBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionEntries):
(WebCore::jsReadOnlySetLikePrototypeFunctionKeysBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionKeys):
(WebCore::jsReadOnlySetLikePrototypeFunctionValuesBody):
(WebCore::jsReadOnlySetLikePrototypeFunctionValues):
(WebCore::JSReadOnlySetLike::analyzeHeap):
(WebCore::JSReadOnlySetLikeOwner::isReachableFromOpaqueRoots):
(WebCore::JSReadOnlySetLikeOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSReadOnlySetLike::toWrapped):

  • bindings/scripts/test/JS/JSReadOnlySetLike.h: Added.

(WebCore::JSReadOnlySetLike::create):
(WebCore::JSReadOnlySetLike::createStructure):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSSetLike.cpp: Added.

(WebCore::JSSetLikePrototype::create):
(WebCore::JSSetLikePrototype::createStructure):
(WebCore::JSSetLikePrototype::JSSetLikePrototype):
(WebCore::JSSetLikeConstructor::prototypeForStructure):
(WebCore::JSSetLikeConstructor::initializeProperties):
(WebCore::JSSetLikePrototype::finishCreation):
(WebCore::JSSetLike::JSSetLike):
(WebCore::JSSetLike::finishCreation):
(WebCore::JSSetLike::createPrototype):
(WebCore::JSSetLike::prototype):
(WebCore::JSSetLike::getConstructor):
(WebCore::JSSetLike::destroy):
(WebCore::IDLAttribute<JSSetLike>::cast):
(WebCore::IDLOperation<JSSetLike>::cast):
(WebCore::jsSetLikeConstructor):
(WebCore::setJSSetLikeConstructor):
(WebCore::jsSetLikeSizeGetter):
(WebCore::jsSetLikeSize):
(WebCore::jsSetLikePrototypeFunctionHasBody):
(WebCore::jsSetLikePrototypeFunctionHas):
(WebCore::jsSetLikePrototypeFunctionEntriesBody):
(WebCore::jsSetLikePrototypeFunctionEntries):
(WebCore::jsSetLikePrototypeFunctionKeysBody):
(WebCore::jsSetLikePrototypeFunctionKeys):
(WebCore::jsSetLikePrototypeFunctionValuesBody):
(WebCore::jsSetLikePrototypeFunctionValues):
(WebCore::jsSetLikePrototypeFunctionAddBody):
(WebCore::jsSetLikePrototypeFunctionAdd):
(WebCore::jsSetLikePrototypeFunctionClearBody):
(WebCore::jsSetLikePrototypeFunctionClear):
(WebCore::jsSetLikePrototypeFunctionDeleteBody):
(WebCore::jsSetLikePrototypeFunctionDelete):
(WebCore::JSSetLike::analyzeHeap):
(WebCore::JSSetLikeOwner::isReachableFromOpaqueRoots):
(WebCore::JSSetLikeOwner::finalize):
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
(WebCore::JSSetLike::toWrapped):

  • bindings/scripts/test/JS/JSSetLike.h: Added.

(WebCore::JSSetLike::create):
(WebCore::JSSetLike::createStructure):
(WebCore::wrapperOwner):
(WebCore::wrapperKey):
(WebCore::toJS):
(WebCore::toJSNewlyCreated):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::jsTestGlobalObjectTestReadOnlySetLikeConstructorGetter):
(WebCore::jsTestGlobalObjectTestReadOnlySetLikeConstructor):
(WebCore::setJSTestGlobalObjectTestReadOnlySetLikeConstructorSetter):
(WebCore::setJSTestGlobalObjectTestReadOnlySetLikeConstructor):
(WebCore::jsTestGlobalObjectTestSetLikeConstructorGetter):
(WebCore::jsTestGlobalObjectTestSetLikeConstructor):
(WebCore::setJSTestGlobalObjectTestSetLikeConstructorSetter):
(WebCore::setJSTestGlobalObjectTestSetLikeConstructor):

  • bindings/scripts/test/TestReadOnlySetLike.idl: Added.
  • bindings/scripts/test/TestSetLike.idl: Added.
  • testing/Internals.cpp:

(WebCore::Internals::createInternalsSetLike):

  • testing/Internals.h:
  • testing/Internals.idl:
  • testing/InternalsSetLike.cpp: Added.

(WebCore::InternalsSetLike::InternalsSetLike):
(WebCore::InternalsSetLike::initializeSetLike):

  • testing/InternalsSetLike.h: Added.

(WebCore::InternalsSetLike::create):
(WebCore::InternalsSetLike::clearFromSetLike):
(WebCore::InternalsSetLike::removeFromSetLike):
(WebCore::InternalsSetLike::items const):
(WebCore::InternalsSetLike::addToSetLike):

  • testing/InternalsSetLike.idl: Added.

LayoutTests:

  • js/dom/setlike-expected.txt: Added.
  • js/dom/setlike.html: Added.
3:53 AM Changeset in webkit [253099] by commit-queue@webkit.org
  • 10 edits
    1 add in trunk

Implement OffscreenCanvas.transferToImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=202572

Patch by Zan Dobersek <zdobersek@igalia.com> and Chris Lord <Chris Lord> on 2019-12-04
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/offscreen-canvas/filter/offscreencanvas.filter.w-expected.txt:
  • web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.resize-expected.txt:
  • web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap-expected.txt:
  • web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt:

Source/WebCore:

No new tests. Covered by existing tests.

  • html/CanvasBase.cpp:

(WebCore::CanvasBase::setImageBuffer const):

  • html/CanvasBase.h:
  • html/OffscreenCanvas.cpp:

(WebCore::OffscreenCanvas::size const):
(WebCore::OffscreenCanvas::setSize):
(WebCore::requiresAcceleratedCompositingForWebGL):
(WebCore::shouldEnableWebGL):
(WebCore::OffscreenCanvas::isWebGLType):
(WebCore::OffscreenCanvas::createContextWebGL):
(WebCore::OffscreenCanvas::getContext):

  • html/OffscreenCanvas.h:
  • html/OffscreenCanvas.idl:
1:58 AM Changeset in webkit [253098] by timothy_horton@apple.com
  • 41 edits
    7 copies
    24 adds in trunk

Introduce a GPU process
https://bugs.webkit.org/show_bug.cgi?id=204343

Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE(GPU_PROCESS).

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE(GPU_PROCESS).

  • en.lproj/Localizable.strings:

Add a string for the user-visible name of the GPU process.

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

Add a GPU process. This process is destined to be used as a proxy between
WebKit and the underlying graphics mechanisms; in the case of the Cocoa
ports, it will specifically gate access to IOKit and a few media-related
daemons.

In this patch, the process is a UI-process singleton; the WebKit client
application gets a single GPU process for all rendering, regardless of
the number of Web Content processes, process pools, or web views.

For now, it is just a shell of a process; functionality will be added
in future patches!

  • Configurations/FeatureDefines.xcconfig:

Add ENABLE(GPU_PROCESS).

  • Configurations/GPUService.xcconfig: Added.
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist: Added.
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist: Added.
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm: Added.
  • Shared/AuxiliaryProcess.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h:
  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
  • Platform/ExtraPrivateSymbolsForTAPI.h:
  • Shared/mac/AuxiliaryProcessMac.mm:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • Configurations/WebKit.xcconfig:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • UIProcess/AuxiliaryProcessProxy.cpp:

(WebKit::AuxiliaryProcessProxy::getLaunchOptions):

  • UIProcess/Launcher/ProcessLauncher.h:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::shouldLeakBoost):
Add a new target for the XPC service, and do the paperwork to launch it.

  • GPUProcess/GPUConnectionToWebProcess.cpp: Added.
  • GPUProcess/GPUConnectionToWebProcess.h: Added.
  • GPUProcess/GPUConnectionToWebProcess.messages.in: Added.

On the GPU process side, the incoming connection from the Web Content process.

  • GPUProcess/GPUProcess.cpp: Added.
  • GPUProcess/GPUProcess.h: Added.
  • GPUProcess/GPUProcess.messages.in: Added.
  • GPUProcess/GPUProcessCreationParameters.cpp: Added.
  • GPUProcess/GPUProcessCreationParameters.h: Added.
  • GPUProcess/cocoa/GPUProcessCocoa.mm: Added.
  • GPUProcess/ios/GPUProcessIOS.mm: Added.
  • GPUProcess/mac/GPUProcessMac.mm: Added.

Add the shell of the GPU process. Mostly stolen from the Networking process.

  • UIProcess/GPU/GPUProcessProxy.cpp: Added.

(WebKit::GPUProcessProxy::singleton):
(WebKit::GPUProcessProxy::GPUProcessProxy):
(WebKit::GPUProcessProxy::~GPUProcessProxy):
(WebKit::GPUProcessProxy::getLaunchOptions):
(WebKit::GPUProcessProxy::connectionWillOpen):
(WebKit::GPUProcessProxy::processWillShutDown):
(WebKit::GPUProcessProxy::getGPUProcessConnection):
(WebKit::GPUProcessProxy::openGPUProcessConnection):
(WebKit::GPUProcessProxy::gpuProcessCrashed):
(WebKit::GPUProcessProxy::didReceiveMessage):
(WebKit::GPUProcessProxy::didReceiveSyncMessage):
(WebKit::GPUProcessProxy::didClose):
(WebKit::GPUProcessProxy::didReceiveInvalidMessage):
(WebKit::GPUProcessProxy::didFinishLaunching):
(WebKit::GPUProcessProxy::updateProcessAssertion):

  • UIProcess/GPU/GPUProcessProxy.h: Added.
  • UIProcess/GPU/GPUProcessProxy.messages.in: Added.

On the UI process side, the GPUProcessProxy is the singleton that
owns the GPU process for the process.

  • GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: Added.

This sandbox profile is copied from the Web Content process.
We will cut it down in the future, but this is a sensible starting point,
since the code that is moving to the GPU process is code that currently
lives in the Web Content process.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::updateProcessAssertion):
Fix a logging typo I stumbled upon.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::getGPUProcessConnection):

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::getGPUProcessConnection):

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:

Add a message from Web->UI to retrieve the GPU process connection.
In the future, we should send this along with the Web Content process
initialization message, but this mechanism doesn't exist yet.

  • WebProcess/GPU/GPUProcessConnection.cpp: Added.

(WebKit::GPUProcessConnection::GPUProcessConnection):
(WebKit::GPUProcessConnection::~GPUProcessConnection):
(WebKit::GPUProcessConnection::didReceiveMessage):
(WebKit::GPUProcessConnection::didReceiveSyncMessage):
(WebKit::GPUProcessConnection::didClose):
(WebKit::GPUProcessConnection::didReceiveInvalidMessage):

  • WebProcess/GPU/GPUProcessConnection.h: Added.

(WebKit::GPUProcessConnection::create):
(WebKit::GPUProcessConnection::connection):

  • WebProcess/GPU/GPUProcessConnection.messages.in: Added.
  • WebProcess/GPU/GPUProcessConnectionInfo.h: Added.

(WebKit::GPUProcessConnectionInfo::identifier):
(WebKit::GPUProcessConnectionInfo::releaseIdentifier):
(WebKit::GPUProcessConnectionInfo::encode const):
(WebKit::GPUProcessConnectionInfo::decode):
In the Web Content process, GPUProcessConnection is the process-wide
connection to the GPU process. All pages in a given Web Content process
use the same connection to talk to the singleton GPU process.

  • WebProcess/WebProcess.cpp:

(WebKit::getGPUProcessConnection):
(WebKit::WebProcess::ensureGPUProcessConnection):
(WebKit::WebProcess::gpuProcessConnectionClosed):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::existingGPUProcessConnection):
In the Web Content process, make it possible for clients to retrieve
the GPU process connection.

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
12:24 AM Changeset in webkit [253097] by yurys@chromium.org
  • 22 edits
    7 adds in trunk

Web Inspector: allow inspector to pause provisional page load and restore its state
https://bugs.webkit.org/show_bug.cgi?id=204170

Reviewed by Devin Rousso.

Source/JavaScriptCore:

Added an option to Target domain to pause all new targets on start waiting for
explicit 'resume' command from the inspector front-end. This allows to configure
inspector backend (including user agent overrides, breakpoints and instrumentation)
before navigation starts.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • inspector/InspectorTarget.cpp: Added.

(Inspector::InspectorTarget::pause):
(Inspector::InspectorTarget::resume):
(Inspector::InspectorTarget::setResumeCallback):

  • inspector/InspectorTarget.h:
  • inspector/agents/InspectorTargetAgent.cpp:

(Inspector::InspectorTargetAgent::willDestroyFrontendAndBackend):
(Inspector::InspectorTargetAgent::setPauseOnStart):
(Inspector::InspectorTargetAgent::resume):
(Inspector::buildTargetInfoObject):
(Inspector::InspectorTargetAgent::targetCreated):
(Inspector::InspectorTargetAgent::targetDestroyed):

  • inspector/agents/InspectorTargetAgent.h:
  • inspector/protocol/Target.json:

Source/WebInspectorUI:

All new targets are now automatically paused on start. For such provisional targets target
manager will run regular initilization code (enable agents etc.) and then resume loading of
the target. Responses and events from the target are defferred until the target is committed
and becomes current main target. When the target manager receives event that the provisional
target has been committed all accumulated protocol messages are replayed and going forward all
new missages will be dispatched as usual.

  • UserInterface/Controllers/TargetManager.js:

(WI.TargetManager):
(WI.TargetManager.prototype.targetCreated):
(WI.TargetManager.prototype.didCommitProvisionalTarget):
(WI.TargetManager.prototype.targetDestroyed):
(WI.TargetManager.prototype.dispatchMessageFromTarget):
(WI.TargetManager.prototype._createTarget):
(WI.TargetManager.prototype._checkAndHandlePageTargetTransition):
(WI.TargetManager.prototype._checkAndHandlePageTargetTermination):

  • UserInterface/Protocol/Connection.js:

(InspectorBackend.Connection):
(InspectorBackend.Connection.prototype.addProvisionalMessage):
(InspectorBackend.Connection.prototype.dispatchProvisionalMessages):

  • UserInterface/Protocol/MultiplexingBackendTarget.js:

(WI.MultiplexingBackendTarget.prototype.initialize):

  • UserInterface/Protocol/PageTarget.js:

(WI.PageTarget):

  • UserInterface/Protocol/Target.js:

(WI.Target.prototype.initialize):
(WI.Target.prototype.get isProvisional):
(WI.Target.prototype.get isPaused):
(WI.Target.prototype.didCommitProvisionalTarget):

  • UserInterface/Protocol/WorkerTarget.js:

Source/WebKit:

Provisional page loading can be deffered if inspector front-end is connected. This
allows to configure inspector backend in the provisional page before load request
is sent. If inspector front-end is not connected provisional loading will conitinue
exactly as before.

Tests: http/tests/inspector/target/pause-on-inline-debugger-statement.html

http/tests/inspector/target/provisional-load-cancels-previous-load.html

  • UIProcess/InspectorTargetProxy.cpp:

(WebKit::InspectorTargetProxy::disconnect):

  • UIProcess/WebPageInspectorController.cpp:

(WebKit::WebPageInspectorController::shouldPauseLoading const):
(WebKit::WebPageInspectorController::setContinueLoadingCallback):

  • UIProcess/WebPageInspectorController.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::continueNavigationInNewProcess):

LayoutTests:

Test that provisional loading which starts before previos provisional loading
commits will be correctly handled by the insepctor.

Test that script execution will break on debugger statement in inline scripts in
case of cross origin navigation and PSON.

  • http/tests/inspector/target/pause-on-inline-debugger-statement-expected.txt: Added.
  • http/tests/inspector/target/pause-on-inline-debugger-statement.html: Added.
  • http/tests/inspector/target/provisional-load-cancels-previous-load-expected.txt: Added.
  • http/tests/inspector/target/provisional-load-cancels-previous-load.html: Added.
  • http/tests/inspector/target/resources/inline-debugger-statement.html: Added.
  • http/tests/inspector/target/target-events-for-provisional-page-expected.txt:
  • http/tests/inspector/target/target-events-for-provisional-page.html:
12:07 AM Changeset in webkit [253096] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Nullptr crash in Node::setTextContent via Document::setTitle if title element is removed before setTextContent call.
https://bugs.webkit.org/show_bug.cgi?id=204332

Added periods at the end of each comment added in r252667 as Simon pointed out.

  • dom/Document.cpp:

(WebCore::Document::setTitle):

12:02 AM Changeset in webkit [253095] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the build

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawRect::decode):
(WebCore::DisplayList::DrawPath::decode):
(WebCore::DisplayList::FillRect::decode):
(WebCore::DisplayList::FillRectWithColor::decode):
(WebCore::DisplayList::FillCompositedRect::decode):
(WebCore::DisplayList::FillPath::decode):
(WebCore::DisplayList::ClearRect::decode):
Some deleted stuff leaked into the patch.

Dec 3, 2019:

10:30 PM Changeset in webkit [253094] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove unused DragController::client()
https://bugs.webkit.org/show_bug.cgi?id=204837

Reviewed by Wenson Hsieh.

It has never been used since its inception in r19039. Moreover it exposes DragController's
internals, which diminishes its encapsulation capabilities.

  • page/DragController.h:

(WebCore::DragController::client const): Deleted.

9:48 PM Changeset in webkit [253093] by Megan Gardner
  • 28 edits
    10 adds in trunk

Add disabled highlight API skeleton
https://bugs.webkit.org/show_bug.cgi?id=204809

Reviewed by Ryosuke Niwa.

Source/WebCore:

Beginning implementation of https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/master/highlight/explainer.md
Spec not written yet, starting from the explainer for now.

Test: highlight/highlight-interfaces.html

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/highlight/HighlightMap.cpp: Added.

(WebCore::HighlightMap::addHighlightGroup):
(WebCore::HighlightMap::addFromMapLike):
(WebCore::HighlightMap::remove):
(WebCore::HighlightMap::namedItem const):
(WebCore::HighlightMap::setNamedItem):
(WebCore::HighlightMap::deleteNamedProperty):
(WebCore::HighlightMap::set):

  • Modules/highlight/HighlightMap.h: Added.

(WebCore::HighlightMap::create):
(WebCore::HighlightMap::synchronizeBackingMap):
(WebCore::HighlightMap::backingMap):
(WebCore::HighlightMap::clear):

  • Modules/highlight/HighlightMap.idl: Added.
  • Modules/highlight/HighlightRangeGroup.cpp: Added.

(WebCore::HighlightRangeGroup::HighlightRangeGroup):
(WebCore::HighlightRangeGroup::create):
(WebCore::HighlightRangeGroup::addRange):
(WebCore::HighlightRangeGroup::removeRange):
(WebCore::HighlightRangeGroup::Iterator::Iterator):
(WebCore::HighlightRangeGroup::Iterator::next):

  • Modules/highlight/HighlightRangeGroup.h: Added.

(WebCore::HighlightRangeGroup::createIterator):

  • Modules/highlight/HighlightRangeGroup.idl: Added.
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • css/DOMCSSNamespace.cpp:

(WebCore::DOMCSSNamespace::highlights):

  • css/DOMCSSNamespace.h:
  • css/DOMCSSNamespace.idl:
  • dom/Document.cpp:

(WebCore::Document::highlightMap):

  • dom/Document.h:
  • dom/Range.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setHighlightAPIEnabled):
(WebCore::RuntimeEnabledFeatures::highlightAPIEnabled const):

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetHighlightAPIEnabled):
(WKPreferencesGetHighlightAPIEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences highlightAPIEnabled]):
(-[WebPreferences setHighlightAPIEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

  • highlight/highlight-interfaces-expected.txt: Added.
  • highlight/highlight-interfaces.html: Added.
9:30 PM Changeset in webkit [253092] by Simon Fraser
  • 3 edits
    4 adds in trunk/LayoutTests/imported/w3c

Update css/css-values WPT
https://bugs.webkit.org/show_bug.cgi?id=204835

Reviewed by Zalan Bujtas.

Update css/css-values to WPT 3f1485cc2793f55236076dfffc3c3fa69315e101.

  • web-platform-tests/css/css-values/animations/calc-interpolation-expected.txt: Added.
  • web-platform-tests/css/css-values/animations/calc-interpolation.html: Added.
  • web-platform-tests/css/css-values/animations/w3c-import.log: Added.
  • web-platform-tests/css/css-values/minmax-length-percent-serialize.html:
9:22 PM Changeset in webkit [253091] by rniwa@webkit.org
  • 16 edits
    2 adds in trunk

Perform microtask checkpoint after each task as spec'ed
https://bugs.webkit.org/show_bug.cgi?id=204546
<rdar://problem/57449333>

Reviewed by Chris Dumez.

Source/WebCore:

This patch makes EventLoop perform a microtask checkpoint after each task as spec'ed:
https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model
and removes the timer in MicrotaskQueue.

Because we always perform a microtask checkpoint after executing JavaScript in
JSExecState::didLeaveScriptContext, there isn't a good way of testing this code change
from the existing API and the infrastructure. This patch, therefore, also introduces
internals.queueMicrotaskInTask, which schedules a new task within which a new microtask
to invoke the callback is scheduled.

This patch also stops including Microtasks.h from most places as only event loop
implementations need to access MicrotaskQueue object now after r252820.

Test: http/tests/eventloop/perform-microtask-checkpoint-at-end-of-task.html

  • animation/DocumentTimeline.cpp:
  • animation/WebAnimation.cpp:
  • bindings/js/JSExecState.cpp:
  • dom/CustomElementReactionQueue.cpp:
  • dom/Document.cpp:
  • dom/EventLoop.cpp:

(WebCore::EventLoop::queueMicrotask):
(WebCore::EventLoop::run):

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::MicrotaskQueue):
(WebCore::MicrotaskQueue::append):
(WebCore::MicrotaskQueue::timerFired): Deleted.

  • dom/Microtasks.h:
  • dom/MutationObserver.cpp:
  • testing/Internals.cpp:

(WebCore::taskSourceFromString): Extracted from Internals::queueTask.
(WebCore::Internals::queueTask):
(WebCore::Internals::queueMicrotaskInTask): Added.

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/WorkerGlobalScope.cpp:
  • workers/service/SWClientConnection.cpp:

LayoutTests:

Added a regresion test using newly added internals methods.

  • http/tests/eventloop/perform-microtask-checkpoint-at-end-of-task-expected.txt: Added.
  • http/tests/eventloop/perform-microtask-checkpoint-at-end-of-task.html: Added.
8:28 PM Changeset in webkit [253090] by rniwa@webkit.org
  • 17 edits in trunk

Replace customJavaScriptUserAgentAsSiteSpecificQuirks with customUserAgentAsSiteSpecificQuirks
https://bugs.webkit.org/show_bug.cgi?id=204824

Reviewed by Brent Fulgham.

Source/WebCore:

This patch renames customJavaScriptUserAgentAsSiteSpecificQuirks to customUserAgentAsSiteSpecificQuirks,
and make it apply to network requests as well as JavaScript API.

Tests: WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirksDisabled

WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirks

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::setCustomUserAgentAsSiteSpecificQuirks): Renamed from setCustomJavaScriptUserAgentAsSiteSpecificQuirks.
(WebCore::DocumentLoader::customUserAgentAsSiteSpecificQuirks const): Renamed from customJavaScriptUserAgentAsSiteSpecificQuirks.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::userAgent const):
(WebCore::FrameLoader::userAgentForJavaScript const): Deleted.

  • loader/FrameLoader.h:
  • page/Navigator.cpp:

(WebCore::Navigator::userAgent const):

  • page/Quirks.cpp:

(WebCore::Quirks::shouldOpenAsAboutBlank const):

Source/WebKit:

This patch replaces _WKWebsitePolicies's customJavaScriptUserAgentAsSiteSpecificQuirks with
customUserAgentAsSiteSpecificQuirks and makes it apply to network requests as well as JS API.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKWebpagePreferences.mm:

(-[WKWebpagePreferences _setCustomUserAgentAsSiteSpecificQuirks:]): Renamed from _setCustomJavaScriptUserAgentAsSiteSpecificQuirks.
(-[WKWebpagePreferences _customUserAgentAsSiteSpecificQuirks]): Renamed from _customJavaScriptUserAgentAsSiteSpecificQuirks.

  • UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setCustomUserAgentAsSiteSpecificQuirks:]): Renamed from setCustomJavaScriptUserAgentAsSiteSpecificQuirks.
(-[_WKWebsitePolicies customUserAgentAsSiteSpecificQuirks]): Renamed from customJavaScriptUserAgentAsSiteSpecificQuirks.

Tools:

Replaced WebKit.WebsitePoliciesCustomJavaScriptUserAgent and WebKit.WebsitePoliciesCustomUserAgents
with WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirksDisabled, which tests that the UA string
specified by customUserAgentAsSiteSpecificQuirks is not used when site specific quirks is disabled,
and WebKit.WebsitePoliciesCustomUserAgentAsSiteSpecificQuirks, which tests that new property sets
UA string for both network requests and JS API.

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(-[CustomJavaScriptUserAgentDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):

8:11 PM Changeset in webkit [253089] by Simon Fraser
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening.

Update legacy-animation-engine/fast/css/calc-with-angle-time-frequency.html to match fast/css/calc-with-angle-time-frequency.html
for new calc() behavior.

  • legacy-animation-engine/fast/css/calc-with-angle-time-frequency-expected.txt:
  • legacy-animation-engine/fast/css/calc-with-angle-time-frequency.html:
7:44 PM Changeset in webkit [253088] by Andres Gonzalez
  • 9 edits in trunk

Focus tracking support in the accessibility isolatedtree.
https://bugs.webkit.org/show_bug.cgi?id=204535

Reviewed by Chris Fleizach.

Source/WebCore:

The AXIsolatedTree focused object is now set during the tree generation.
It is updated on handleFocusedUIElementChanged.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::focusedImageMapUIElement):
(WebCore::AXObjectCache::focusedObject):
(WebCore::AXObjectCache::isolatedTreeFocusedObject):
(WebCore::AXObjectCache::setIsolatedTreeFocusedObject):
(WebCore::AXObjectCache::focusedUIElementForPage):
(WebCore::AXObjectCache::isolatedTreeRootObject):
(WebCore::AXObjectCache::handleFocusedUIElementChanged):
(WebCore::AXObjectCache::createIsolatedTreeHierarchy):
(WebCore::AXObjectCache::generateIsolatedTree):

  • accessibility/AXObjectCache.h:
  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::focusedUIElement const):

Source/WebKit:

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKAccessibilityFocusedObject):

Tools:

FocusElement can run on the secondary AXThread.

  • WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:

(WTR::AccessibilityController::focusedElement):

7:31 PM Changeset in webkit [253087] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: prefer non-blackboxed scripts when showing a source code location link
https://bugs.webkit.org/show_bug.cgi?id=204811

Reviewed by Timothy Hatcher.

  • UserInterface/Models/StackTrace.js:

(WI.StackTrace.prototype.get firstNonNativeNonAnonymousNotBlackboxedCallFrame): Added.
(WI.StackTrace.prototype.get firstNonNativeCallFrame): Deleted.
(WI.StackTrace.prototype.get firstNonNativeNonAnonymousCallFrame): Deleted.
Include logic to skip call frames that are blackboxed, unless there are no non-blackboxed
call frames, in which case fall back to the first non-native non-anonymous call frame.
Drive-by: remove unused function.

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.render):
(WI.ConsoleMessageView.prototype.clearSessionState): Added.
(WI.ConsoleMessageView.prototype._appendLocationLink):
(WI.ConsoleMessageView.prototype._handleDebuggerBlackboxChanged): Added.
(WI.ConsoleMessageView.prototype.clearSavedVariableState): Deleted.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype._sessionStarted):
(WI.LogContentView.prototype._logCleared):
Listen for changes to the debugger blackbox to re-render the location link.

  • UserInterface/Views/StackTraceView.js:

(WI.StackTraceView):

  • UserInterface/Views/CallFrameView.js:

(WI.CallFrameView):

  • UserInterface/Views/CallFrameView.css:

(.call-frame.blackboxed > .title, .call-frame.blackboxed:not(:hover, :focus) > .subtitle): Added.
Add a constructor option to control whether blackboxed frames are indicated visually.

7:30 PM Changeset in webkit [253086] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Use the event loop instead of DocumentEventQueue and WorkerEventQueue
https://bugs.webkit.org/show_bug.cgi?id=204447

  • page/PointerCaptureController.cpp:

(WebCore::PointerCaptureController::elementWasRemoved): Fixed a typo.

7:26 PM Changeset in webkit [253085] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'navigationItem.parentNavigationBar')
https://bugs.webkit.org/show_bug.cgi?id=204830

Reviewed by Timothy Hatcher.

  • UserInterface/Controllers/CSSManager.js:

(WI.CSSManager.prototype._mainResourceDidChange):
When the main resource changes, make sure to clear the _forcedAppearance member variable.
This way, when the main WI.DOMTreeContentView reloads, it isn't left in an unknown state.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView):
(WI.DOMTreeContentView.prototype._defaultAppearanceDidChange):
(WI.DOMTreeContentView.prototype._toggleAppearance):
Always create the Force Appearance navigation item, rather than destroying and recreating it
each time the page navigates. Instead, just update the tooltip (which was all that really
changed) whenever the default appearance changes. Depending on the timing of events during a
page navigation, _forceAppearanceButtonNavigationItem could be null.

  • UserInterface/Views/ActivateButtonNavigationItem.js:

(WI.ActivateButtonNavigationItem.prototype.set defaultToolTip): Added.
(WI.ActivateButtonNavigationItem.prototype.set activatedToolTip): Added.
Allow the various tooltips to be updated after creation.

7:06 PM Changeset in webkit [253084] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Timelines: stopping time marker is permanently removed when the current recording is cleared
https://bugs.webkit.org/show_bug.cgi?id=204827

Reviewed by Timothy Hatcher.

  • UserInterface/Views/TimelineOverview.js:

(WI.TimelineOverview.prototype._recordingReset):
Re-add the marker (and ensure that it's hidden) when the active recording is reset.

7:04 PM Changeset in webkit [253083] by sbarati@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Remove "patch" struct from StructureStubInfo because it adds unnecessary padding
https://bugs.webkit.org/show_bug.cgi?id=204392

Reviewed by Tadeu Zagallo.

By doing this, we reduce the size of StructureStubInfo from 120 bytes to 112
bytes.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/InlineAccess.cpp:

(JSC::linkCodeInline):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::getScratchRegister):
(JSC::InlineAccess::generateSelfPropertyReplace):
(JSC::InlineAccess::generateArrayLength):
(JSC::InlineAccess::generateStringLength):
(JSC::InlineAccess::generateSelfInAccess):
(JSC::InlineAccess::rewireStubAsJump):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/StructureStubInfo.h:

(JSC::StructureStubInfo::inlineSize const):
(JSC::StructureStubInfo::patchableJump):
(JSC::StructureStubInfo::valueRegs const):
(JSC::StructureStubInfo::propertyRegs const):
(JSC::StructureStubInfo::baseRegs const):
(JSC::StructureStubInfo::baseGPR const): Deleted.
(JSC::StructureStubInfo::slowPathCallLocation): Deleted.
(JSC::StructureStubInfo::doneLocation): Deleted.
(JSC::StructureStubInfo::slowPathStartLocation): Deleted.

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::callerReturnPC):

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITInlineCacheGenerator::JITInlineCacheGenerator):
(JSC::JITInlineCacheGenerator::finalize):
(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITPutByIdGenerator::JITPutByIdGenerator):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):
(JSC::JITGetByValGenerator::JITGetByValGenerator):

  • jit/Repatch.cpp:

(JSC::tryCacheGetBy):
(JSC::repatchGetBy):
(JSC::repatchArrayGetByVal):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryCacheInByID):
(JSC::repatchInByID):
(JSC::repatchInstanceOf):
(JSC::resetGetBy):
(JSC::resetPutByID):
(JSC::resetPatchableJump):
(JSC::resetInByID):

6:41 PM Changeset in webkit [253082] by wilander@apple.com
  • 39 edits
    4 copies
    4 adds in trunk

Resource Load Statistics (experimental): Delete non-cookie website data after 7 days of no user interaction
https://bugs.webkit.org/show_bug.cgi?id=204779
<rdar://problem/57578989>

Reviewed by Alex Christensen.

Source/WebCore:

Trackers are continuing to move cross-site tracking IDs into first-party storage.
This change ages out script-writable non-cookie website data in alignment with the
7-day cap on client-side cookies.

Tests: http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction-database.html

http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html
http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction-database.html
http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html

  • page/Settings.yaml:

New experimental feature, off by default.

  • platform/network/NetworkStorageSession.h:

Added a boolean enum WebCore::FirstPartyWebsiteDataRemovalMode.

Source/WebKit:

Trackers are continuing to move cross-site tracking IDs into first-party storage.
This change ages out script-writable non-cookie website data in alignment with the
7-day cap on client-side cookies.

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

(WebKit::ResourceLoadStatisticsDatabaseStore::shouldRemoveAllButCookiesFor const):

Now makes use of the set WebCore::FirstPartyWebsiteDataRemovalMode.

  • NetworkProcess/Classifier/ResourceLoadStatisticsMemoryStore.cpp:

(WebKit::ResourceLoadStatisticsMemoryStore::shouldRemoveAllButCookiesFor const):

Now makes use of the set WebCore::FirstPartyWebsiteDataRemovalMode.

  • NetworkProcess/Classifier/ResourceLoadStatisticsStore.h:

(WebKit::ResourceLoadStatisticsStore::setFirstPartyWebsiteDataRemovalMode):
(WebKit::ResourceLoadStatisticsStore::firstPartyWebsiteDataRemovalMode const):

  • NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setFirstPartyWebsiteDataRemovalMode):

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

(WebKit::NetworkProcess::setFirstPartyWebsiteDataRemovalModeForTesting):

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

(WebKit::NetworkSession::setResourceLoadStatisticsEnabled):
(WebKit::NetworkSession::recreateResourceLoadStatisticStore):
(WebKit::NetworkSession::forwardResourceLoadStatisticsSettings):

New convenience function to avoid code duplication in
NetworkSession::setResourceLoadStatisticsEnabled() and
NetworkSession::forwardResourceLoadStatisticsSettings().

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

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

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • Scripts/webkit/messages.py:

Makes sure the WebCore::FirstPartyWebsiteDataRemovalMode is found in WebCore/NetworkStorageSession.h.

  • Shared/WebPreferences.yaml:

New experimental feature, off by default.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreSetResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::setFirstPartyWebsiteDataRemovalModeForTesting):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyWebsiteDataRemovalModeForTesting):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

These changes are test infrastructure so that TestRunner can
control the new setting.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsFirstPartyWebsiteDataRemovalMode):
(WTR::TestRunner::statisticsCallDidSetFirstPartyWebsiteDataRemovalModeCallback):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setStatisticsFirstPartyWebsiteDataRemovalMode):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetFirstPartyWebsiteDataRemovalMode):

  • WebKitTestRunner/TestInvocation.h:

LayoutTests:

  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration-database.html:
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-navigated-to-with-link-decoration.html:

Fixed some minor stuff in these two test cases to make any failures more clear.

  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction-expected.txt: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-with-user-interaction.html: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction-database-expected.txt: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction-database.html: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction-expected.txt: Added.
  • http/tests/resourceLoadStatistics/website-data-removal-for-site-without-user-interaction.html: Added.
6:36 PM Changeset in webkit [253081] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

The animation of returning to inline from PiP targets wrong destination rectangle
https://bugs.webkit.org/show_bug.cgi?id=204819

Patch by Peng Liu <Peng Liu> on 2019-12-03
Reviewed by Jer Noble.

We have to force AVPlayerViewController's view (which is hidden when it is returning to inline in another tab) to run layout
after we set its target size and position to make sure all layers inside the view have the correct information.
Otherwise, the return to inline animation will be incorrect.

  • platform/ios/VideoFullscreenInterfaceAVKit.mm:

(VideoFullscreenInterfaceAVKit::preparedToReturnToInline):

6:33 PM Changeset in webkit [253080] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed, fix build failure
https://bugs.webkit.org/show_bug.cgi?id=186552

  • wasm/WasmAirIRGenerator.cpp:

(JSC::Wasm::AirIRGenerator::getGlobal):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::setGlobal):

6:22 PM Changeset in webkit [253079] by Simon Fraser
  • 73 edits
    4 adds in trunk

calc() serialization doesn't match the spec
https://bugs.webkit.org/show_bug.cgi?id=203442
LayoutTests/imported/w3c:

<rdar://problem/56639402>

Reviewed by Dean Jackson.

New results. Current WPT don't reflect the new serialization rules yet, so we expect
some failing results here.

  • web-platform-tests/css/css-align/gaps/column-gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-align/gaps/gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-align/gaps/grid-column-gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-align/gaps/grid-gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-align/gaps/grid-row-gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-align/gaps/row-gap-parsing-001-expected.txt:
  • web-platform-tests/css/css-box/parsing/padding-valid-expected.txt:
  • web-platform-tests/css/css-shapes/animation/shape-outside-interpolation-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-margin-003-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-010-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-circle-011-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-010-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-ellipse-011-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-inset-008-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-inset-009-expected.txt:
  • web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-polygon-006-expected.txt:
  • web-platform-tests/css/css-values/calc-background-position-002-expected.txt:
  • web-platform-tests/css/css-values/calc-background-position-003-expected.txt:
  • web-platform-tests/css/css-values/calc-nesting-002-expected.txt:
  • web-platform-tests/css/css-values/calc-serialization-002-expected.txt:
  • web-platform-tests/css/css-values/calc-serialization-expected.txt:
  • web-platform-tests/css/css-values/minmax-angle-computed-expected.txt:
  • web-platform-tests/css/css-values/minmax-angle-serialize-expected.txt:
  • web-platform-tests/css/css-values/minmax-length-percent-serialize-expected.txt:
  • web-platform-tests/css/css-values/minmax-length-serialize-expected.txt:
  • web-platform-tests/css/css-values/minmax-percentage-serialize-expected.txt:
  • web-platform-tests/css/css-values/minmax-time-computed-expected.txt:
  • web-platform-tests/css/css-values/minmax-time-serialize-expected.txt:

Source/WebCore:

<rdar://problem/56639402>

Reviewed by Dean Jackson.

These changes implement the calc() simplification and serialization rules described in
https://drafts.csswg.org/css-values-4/#calc-internal. They also make it easy to add the
new math functions in future.

The major changes are:

  1. Create Negate and Invert nodes to handle subtraction and division, so that Product and Sum are the only math operators that are tracked, which makes it possible to sort child nodes for simplification.
  1. After parsing, do a bottom-up simplification parse following <https://drafts.csswg.org/css-values-4/#calc-simplification>, which sorts child nodes according to <https://drafts.csswg.org/css-values-4/#sort-a-calculations-children>, combines child nodes where possible, and hoists child nodes up to their parents were possible. Simplification always preserves a calc-like function at the root.

This simplification also does unit canonicalization (e.g. all absolute lengths get px units).
To make unit conversion more explicit, pass a CSSUnitType into doubleValue() methods so that
it's clear what units the resulting value is in.

  1. Serialize according to <https://drafts.csswg.org/css-values-4/#calc-serialize> which fixes bugs with nested parentheses.

This patch does not completely implement the type checking and conversion rules described in <https://drafts.csswg.org/css-values-4/#calc-type-checking>
and <https://drafts.css-houdini.org/css-typed-om-1/#numeric-typing>.

Tests: fast/css/calc-parsing-limits.html

fast/css/calc-parsing.html

  • css/CSSCalculationValue.cpp:

(WebCore::calculationCategoryForCombination):
(WebCore::canonicalUnitTypeForCalculationCategory):
(WebCore::functionFromOperator):
(WebCore::CSSCalcPrimitiveValueNode::isNumericValue const):
(WebCore::CSSCalcPrimitiveValueNode::isNegative const):
(WebCore::CSSCalcPrimitiveValueNode::negate):
(WebCore::CSSCalcPrimitiveValueNode::invert):
(WebCore::CSSCalcPrimitiveValueNode::add):
(WebCore::CSSCalcPrimitiveValueNode::multiply):
(WebCore::CSSCalcPrimitiveValueNode::convertToUnitType):
(WebCore::CSSCalcPrimitiveValueNode::canonicalizeUnit):
(WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
(WebCore::CSSCalcNegateNode::createCalcExpression const):
(WebCore::CSSCalcNegateNode::dump const):
(WebCore::CSSCalcInvertNode::createCalcExpression const):
(WebCore::CSSCalcInvertNode::dump const):
(WebCore::categoryForInvert):
(WebCore::determineCategory):
(WebCore::CSSCalcOperationNode::create):
(WebCore::CSSCalcOperationNode::createSum):
(WebCore::CSSCalcOperationNode::createProduct):
(WebCore::CSSCalcOperationNode::hoistChildrenWithOperator):
(WebCore::sortingCategoryForType):
(WebCore::sortingCategory):
(WebCore::primitiveTypeForCombination):
(WebCore::conversionToAddValuesWithTypes):
(WebCore::CSSCalcOperationNode::canCombineAllChildren const):
(WebCore::CSSCalcOperationNode::combineChildren):
(WebCore::CSSCalcOperationNode::simplify):
(WebCore::CSSCalcOperationNode::simplifyRecursive):
(WebCore::CSSCalcOperationNode::simplifyNode):
(WebCore::CSSCalcOperationNode::primitiveType const):
(WebCore::CSSCalcOperationNode::doubleValue const):
(WebCore::CSSCalcOperationNode::computeLengthPx const):
(WebCore::CSSCalcOperationNode::buildCSSText):
(WebCore::functionPrefixForOperator):
(WebCore::CSSCalcOperationNode::buildCSSTextRecursive):
(WebCore::CSSCalcOperationNode::evaluateOperator):
(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::checkDepthAndIndex):
(WebCore::CSSCalcExpressionNodeParser::parseCalcFunction):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcValue):
(WebCore::CSSCalcExpressionNodeParser::parseCalcProduct):
(WebCore::CSSCalcExpressionNodeParser::parseCalcSum):
(WebCore::createCSS):
(WebCore::CSSCalcValue::customCSSText const):
(WebCore::CSSCalcValue::doubleValue const):
(WebCore::CSSCalcValue::create):
(WebCore::CSSCalcOperationNode::createSimplified): Deleted.
(WebCore::CSSCalcOperationNode::buildCssText): Deleted.
(WebCore::CSSCalcOperationNode::customCSSText const): Deleted.
(WebCore::CSSCalcExpressionNodeParser::parseValueTerm): Deleted.
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression): Deleted.
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression): Deleted.
(WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression): Deleted.
(WebCore::CSSCalcExpressionNodeParser::parseValueExpression): Deleted.

  • css/CSSCalculationValue.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::unitTypeString):

  • css/CSSPrimitiveValue.h:
  • platform/CalculationValue.cpp:

(WebCore::CalcExpressionNegation::evaluate const):
(WebCore::CalcExpressionNegation::operator== const):
(WebCore::CalcExpressionNegation::dump const):
(WebCore::operator==):
(WebCore::CalcExpressionInversion::evaluate const):
(WebCore::CalcExpressionInversion::dump const):
(WebCore::CalcExpressionInversion::operator== const):
(WebCore::CalcExpressionOperation::evaluate const):
(WebCore::operator<<):

  • platform/CalculationValue.h:

LayoutTests:

Reviewed by Dean Jackson.

New results, mainly because of new simplification rules.

  • css3/calc/cssom-expected.txt:
  • css3/calc/simplification-expected.txt:
  • css3/flexbox/flex-property-parsing-expected.txt:
  • css3/flexbox/flex-property-parsing.html:
  • css3/scroll-snap/scroll-snap-property-computed-style-expected.txt:
  • css3/scroll-snap/scroll-snap-property-computed-style.js:
  • css3/scroll-snap/scroll-snap-property-parsing-expected.txt:
  • css3/scroll-snap/scroll-snap-property-parsing.js:
  • css3/shapes/shape-outside/values/support/parsing-utils.js:
  • fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/grid-columns-rows-get-set-multiple-expected.txt:
  • fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
  • fast/css-grid-layout/non-grid-columns-rows-get-set-multiple-expected.txt:
  • fast/css-grid-layout/resources/grid-columns-rows-get-set-multiple.js:
  • fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
  • fast/css-grid-layout/resources/non-grid-columns-rows-get-set-multiple.js:
  • fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
  • fast/css/calc-parsing-expected.txt: Added.
  • fast/css/calc-parsing-limits-expected.txt: Added.
  • fast/css/calc-parsing-limits.html: Added.
  • fast/css/calc-parsing.html: Added.
  • fast/css/calc-with-angle-time-frequency-expected.txt:
  • fast/css/calc-with-angle-time-frequency.html:
  • fast/css/column-width-calculated-value-expected.txt:
  • fast/css/column-width-calculated-value.html:
  • fast/css/turn-angle-double-expected.txt:
  • fast/css/turn-angle-double.html:
  • fast/shapes/parsing/parsing-shape-outside-expected.txt:
  • fast/shapes/parsing/parsing-test-utils.js:
6:10 PM Changeset in webkit [253078] by Alan Coon
  • 3 edits in tags/Safari-609.1.11/Source/WebCore

Cherry-pick r253062. rdar://problem/57576474

Experimental support for HDR media query
https://bugs.webkit.org/show_bug.cgi?id=204422
<rdar://problem/56799662>

Reviewed by Eric Carlson.

Follow-up to r252762 for platforms that don't have MediaToolbox.framework.

  • platform/ios/PlatformScreenIOS.mm: (WebCore::screenSupportsHighDynamicRange):
  • platform/mac/PlatformScreenMac.mm: (WebCore::collectScreenProperties): (WebCore::screenSupportsHighDynamicRange):

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

6:10 PM Changeset in webkit [253077] by Alan Coon
  • 2 edits in tags/Safari-609.1.11/Source/WebCore

Cherry-pick r252881. rdar://problem/57487005

Document::needsStyleRecalc() shouldn't return true for fragment scrolling (m_gotoAnchorNeededAfterStylesheetsLoad)
https://bugs.webkit.org/show_bug.cgi?id=204593

Reviewed by Antti Koivisto.

After r252761, we no longer triggers a fragment scrolling as a part of style resolution.
Consequently, there is no need for Document::needsStyleRecalc() to return true
even when m_gotoAnchorNeededAfterStylesheetsLoad is set and there are no more pending stylesheets.

No new tests since there shouldn't really be any observable behavior difference.

  • dom/Document.cpp: (WebCore::Document::needsStyleRecalc const):

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

6:04 PM Changeset in webkit [253076] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

[iOS] Unable to interact with the view after a back swipe until lifting the finger off the screen
https://bugs.webkit.org/show_bug.cgi?id=204821

Reviewed by Tim Horton.

If you swipe back on iOS and then put your finger on the screen before the view gesture snapshot is taken down,
your gestures will not be recognized, even after the snapshot is taken down, until after you lift your finger
off the screen and back on. This makes MobileSafari look more unresponsive than it needs to be.

To address the issue, disable user interactions for the snapshot view, so that interactions go through to the
actual view underneath.

  • UIProcess/ios/ViewGestureControllerIOS.mm:

(WebKit::ViewGestureController::beginSwipeGesture):

5:42 PM Changeset in webkit [253075] by ysuzuki@apple.com
  • 19 edits
    2 deletes in trunk/Source/JavaScriptCore

[JSC] Remove WebAssemblyToJSCallee
https://bugs.webkit.org/show_bug.cgi?id=204808

Reviewed by Tadeu Zagallo.

This patch drops WebAssemblyToJSCallee. It was originally required to put small cell to retrieve VM from callee.
But now this limitation is removed. We can just put JSWebAssemblyModule in callee place instead.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • interpreter/CallFrame.cpp:

(JSC::CallFrame::isAnyWasmCallee):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):

  • jit/Repatch.cpp:

(JSC::webAssemblyOwner):
(JSC::linkFor):
(JSC::linkPolymorphicCall):

  • runtime/JSCast.h:
  • runtime/JSCell.cpp:
  • runtime/JSCellInlines.h:

(JSC::isWebAssemblyModule):
(JSC::isWebAssemblyToJSCallee): Deleted.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::webAssemblyWrapperFunctionStructure const):
(JSC::JSGlobalObject::webAssemblyToJSCalleeStructure const): Deleted.

  • runtime/JSType.cpp:

(WTF::printInternal):

  • runtime/JSType.h:
  • wasm/WasmOperations.cpp:

(JSC::Wasm::operationWasmToJSException):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::createStructure):
(JSC::JSWebAssemblyModule::finishCreation):
(JSC::JSWebAssemblyModule::visitChildren):
(JSC::JSWebAssemblyModule::callee const): Deleted.

  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::handleBadI64Use):
(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyToJSCallee.cpp: Removed.
  • wasm/js/WebAssemblyToJSCallee.h: Removed.
5:36 PM Changeset in webkit [253074] by ysuzuki@apple.com
  • 73 edits
    5 copies
    1 move
    17 adds in trunk

Adopt the new WebAssembly.Global system
https://bugs.webkit.org/show_bug.cgi?id=186552

Reviewed by Keith Miller.

JSTests:

  1. Update spec-harness to accept newer tests. And we update several tests that does not work with the old harness.
  2. Add WebAssembly.Global tests.
  • wasm/js-api/global-error.js:

(assert.throws.new.WebAssembly.Module.bin):
(new.WebAssembly.Module):
(assert.throws):

  • wasm/js-api/global-external-init-from-import.js:
  • wasm/js-api/globals-export.js:
  • wasm/modules/js-wasm-global-namespace.js:

(assert.throws):

  • wasm/modules/js-wasm-global.js:

(assert.throws):

  • wasm/modules/wasm-import-wasm-export-i64-error.js:
  • wasm/references/anyref_globals.js:
  • wasm/references/func_ref.js:

(assert.eq.instance.exports.fix):

  • wasm/spec-harness.js:

(getGlobal):
(let.console.log):

  • wasm/spec-harness/sync_index.js: Renamed from JSTests/wasm/spec-harness/index.js.

(reinitializeRegistry.let.handler.get return):
(module):

  • wasm/spec-tests/call.wast.js:
  • wasm/spec-tests/exports.wast.js:
  • wasm/spec-tests/globals.wast.js:
  • wasm/spec-tests/if.wast.js:
  • wasm/spec-tests/imports.wast.js:
  • wasm/spec-tests/linking.wast.js:
  • wasm/spec-tests/memory.wast.js:
  • wasm/stress/immutable-globals.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.i.assert.eq.instance.exports.getI32):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.i.assert.eq):

  • wasm/stress/mutable-globals-cross.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.instance1):
(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.instance2):

  • wasm/stress/mutable-globals.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.i.instance.exports.setI32AsI64):

LayoutTests/imported/w3c:

  • web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/constructor/instantiate-bad-imports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/constructor.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/toString.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/toString.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/value-set.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/value-set.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/global/valueOf.any-expected.txt:
  • web-platform-tests/wasm/jsapi/global/valueOf.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any-expected.txt:
  • web-platform-tests/wasm/jsapi/instance/constructor.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/interface.any-expected.txt:
  • web-platform-tests/wasm/jsapi/interface.any.worker-expected.txt:
  • web-platform-tests/wasm/jsapi/module/exports.any-expected.txt:
  • web-platform-tests/wasm/jsapi/module/exports.any.worker-expected.txt:

Source/JavaScriptCore:

This patch adds WebAssembly.Global implementation. It is already included in the Wasm spec (this means, it is not in
staging right now: it was stage-4, and included in the spec). WebAssembly.Global is a wrapper object around
"global" binding. This object can hold "immutable" and "mutable" global binding, and we can access Wasm globals through
this object. Furthermore, we can share mutable global binding through this object across WebAssembly modules.

To implement it efficiently, this patch introduces BindingMode to Wasm globals. If the mode is EmbeddedInInstance,
we continue using the current existing mechanism. If the mode is Portable, we store a pointer to actual value in
Wasm globals array in Wasm::Instance, so that we can access it through one additional dereference.
And we mark all immutable globals as EmbeddedInInstance. If the binding is immutable, internally we do not need to
have one binding. We can just continue using the current mechanism since users cannot observe whether immutable bindings'
storage is shared or not. If the global is mutable, and it is exported outside of the module, we use Portable mode.
So, all the previously used wasm global bindings are EmbeddedInInstance. Only newly added "mutable" "exported" bindings
are Portable and requires one additional dereference.

To access portable bindings efficiently, we add new Wasm bytecodes, get_global_portable_binding, set_global_portable_binding,
and set_global_ref_portable_binding.

This patch improves WPT wasm coverage significantly.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/BytecodeList.rb:
  • heap/HeapCell.cpp:

(JSC::keepAlive):
(JSC::HeapCell::use const): Deleted.

  • heap/HeapCell.h:

(JSC::keepAlive):
(JSC::HeapCell::use const):

  • llint/WebAssembly.asm:
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

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

(JSC::Wasm::AirIRGenerator::getGlobal):
(JSC::Wasm::AirIRGenerator::setGlobal):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):

  • wasm/WasmFormat.h:
  • wasm/WasmGlobal.cpp: Added.

(JSC::Wasm::Global::get const):
(JSC::Wasm::Global::set):
(JSC::Wasm::Global::visitAggregate):

  • wasm/WasmGlobal.h: Added.
  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::linkGlobal):

  • wasm/WasmInstance.h:

(JSC::Wasm::Instance::loadI32Global const):
(JSC::Wasm::Instance::loadI64Global const):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::globalsToBinding):
(JSC::Wasm::Instance::getGlobalBinding):

  • wasm/WasmLLIntGenerator.cpp:

(JSC::Wasm::LLIntGenerator::getGlobal):
(JSC::Wasm::LLIntGenerator::setGlobal):

  • wasm/WasmModuleInformation.h:
  • wasm/WasmOperations.cpp:

(JSC::Wasm::operationWasmWriteBarrierSlowPath):

  • wasm/WasmOperations.h:
  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseImport):
(JSC::Wasm::SectionParser::parseGlobal):
(JSC::Wasm::SectionParser::parseExport):
(JSC::Wasm::SectionParser::parseInitExpr):
(JSC::Wasm::SectionParser::parseGlobalType):

  • wasm/WasmSectionParser.h:
  • wasm/WasmSlowPaths.cpp:

(JSC::LLInt::WASM_SLOW_PATH_DECL):

  • wasm/WasmSlowPaths.h:
  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::setGlobal):

  • wasm/js/JSWebAssembly.cpp:
  • wasm/js/JSWebAssemblyGlobal.cpp: Added.

(JSC::JSWebAssemblyGlobal::create):
(JSC::JSWebAssemblyGlobal::createStructure):
(JSC::JSWebAssemblyGlobal::JSWebAssemblyGlobal):
(JSC::JSWebAssemblyGlobal::finishCreation):
(JSC::JSWebAssemblyGlobal::destroy):
(JSC::JSWebAssemblyGlobal::visitChildren):

  • wasm/js/JSWebAssemblyGlobal.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h.
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:
  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::destroy):

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/JSWebAssemblyTable.h:
  • wasm/js/WebAssemblyGlobalConstructor.cpp: Added.

(JSC::constructJSWebAssemblyGlobal):
(JSC::callJSWebAssemblyGlobal):
(JSC::WebAssemblyGlobalConstructor::create):
(JSC::WebAssemblyGlobalConstructor::createStructure):
(JSC::WebAssemblyGlobalConstructor::finishCreation):
(JSC::WebAssemblyGlobalConstructor::WebAssemblyGlobalConstructor):

  • wasm/js/WebAssemblyGlobalConstructor.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h.
  • wasm/js/WebAssemblyGlobalPrototype.cpp: Added.

(JSC::getGlobal):
(JSC::webAssemblyGlobalProtoFuncValueOf):
(JSC::webAssemblyGlobalProtoGetterFuncValue):
(JSC::webAssemblyGlobalProtoSetterFuncValue):
(JSC::WebAssemblyGlobalPrototype::create):
(JSC::WebAssemblyGlobalPrototype::createStructure):
(JSC::WebAssemblyGlobalPrototype::finishCreation):
(JSC::WebAssemblyGlobalPrototype::WebAssemblyGlobalPrototype):

  • wasm/js/WebAssemblyGlobalPrototype.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h.
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

5:33 PM Changeset in webkit [253073] by Jonathan Bedard
  • 2 edits in trunk/Tools

Python 3: Add support in webkitpy.bindings
https://bugs.webkit.org/show_bug.cgi?id=204783

Reviewed by Stephanie Lewis.

Allow Tools/Scripts/run-bindings-tests to support Python 3.

  • Scripts/webkitpy/bindings/main.py:

(BindingsTests.generate_supplemental_dependency): Encode unicode strings before
writing to file as bytes.

5:27 PM Changeset in webkit [253072] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Enable security assertions on all ASAN builds
https://bugs.webkit.org/show_bug.cgi?id=204802

Patch by Sunny He <sunny_he@apple.com> on 2019-12-03
Reviewed by Ryosuke Niwa.

  • wtf/FeatureDefines.h:
4:34 PM Changeset in webkit [253071] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Use a 3 second timeout for the view gesture snapshot on macOS
https://bugs.webkit.org/show_bug.cgi?id=204818

Reviewed by Tim Horton.

Use a 3 second timeout for the view gesture snapshot on macOS, for consistency with iOS.
It used to be 5 seconds on macOS.

  • UIProcess/ViewGestureController.cpp:
4:16 PM Changeset in webkit [253070] by Truitt Savell
  • 2 edits in trunk/LayoutTests

6 fast/text/emoji-gender are expected to fail on Catalina 10.15.1 and newer
https://bugs.webkit.org/show_bug.cgi?id=204820

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:59 PM Changeset in webkit [253069] by Jonathan Bedard
  • 2 edits in trunk/Tools

results.webkit.org: Sort out certificates on Catalina
https://bugs.webkit.org/show_bug.cgi?id=202837

Unreviewed infrastructure repair.

Reverting the active parts of r250997 now that the certificates are sorted out.

  • Scripts/webkitpy/results/upload.py:

(Upload.upload):
(Upload.upload_archive):

3:41 PM Changeset in webkit [253068] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Assertion when encountering U_OTHER_NEUTRAL in createBidiRunsForLine at end of run
https://bugs.webkit.org/show_bug.cgi?id=204485

Patch by Doug Kelly <Doug Kelly> on 2019-12-03
Reviewed by Ryosuke Niwa.

Source/WebCore:

Comment out the assert for the default case when setting direction at
the end of a bidirectional run. The current algorithm may not fully
support UAX #9, but this assert also isn't helpful in development.

Test: fast/text/international/unicode-bidi-other-neutrals.html

  • platform/text/BidiResolver.h:

(WebCore::DerivedClass>::createBidiRunsForLine):

LayoutTests:

Add a simple test case which illustrates a neutral at the end of a
Unicode bidirectional run.

  • fast/text/international/unicode-bidi-other-neutrals-expected.html: Added.
  • fast/text/international/unicode-bidi-other-neutrals.html: Added.
3:34 PM Changeset in webkit [253067] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk/LayoutTests/imported/w3c

Re-sync web-platform-tests/html/webappapis/scripting/events from upstream
https://bugs.webkit.org/show_bug.cgi?id=204814

Patch by Alexey Shvayka <Alexey Shvayka> on 2019-12-03
Reviewed by Ryosuke Niwa.

Re-sync web-platform-tests/html/webappapis/scripting/events from upstream 033bf248c8fa.
Basically, this patch syncs https://github.com/web-platform-tests/wpt/pull/20421 and also
unskips "event-handler-processing-algorithm-error" directory as it is already synced.

  • resources/import-expectations.json:
  • web-platform-tests/html/webappapis/scripting/events/*: Updated.
3:25 PM Changeset in webkit [253066] by Jonathan Bedard
  • 3 edits in trunk/Tools

results.webkit.org: Decrease ttl for archives
https://bugs.webkit.org/show_bug.cgi?id=204806
<rdar://problem/57527644>

Reviewed by Aakash Jain.

Make the ttl on the archive tables shorter, drop the existing table and create new ones
with a shorter ttl.

  • resultsdbpy/resultsdbpy/model/archive_context.py:

(ArchiveContext.ArchiveMetaDataByCommit): Define new ArchiveMetaDataByCommit table.
(ArchiveContext.ArchiveChunks): Ditto.

  • resultsdbpy/resultsdbpy/model/model.py:

(Model.init): Add archive ttl, 8 weeks by default.

3:17 PM Changeset in webkit [253065] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

REGRESSION (r252778): ASSERT(!m_networkLoad); in ~SpeculativeLoad()
https://bugs.webkit.org/show_bug.cgi?id=204813
<rdar://problem/57581082>

Reviewed by Antti Koivisto.

After r252778, SpeculativeLoadManager::revalidateSubresource() may delay the revalidation until we receive
the response for the main resource. We can hit the assertion in the SpeculativeLoad destructor if a speculative
revalidation for the SAME resource gets scheduled while we're waiting for the main resource response. When we
eventually receive the main resource response, we would call revalidateSubresource() again, which would create
a SpeculativeLoad and try to add it to m_pendingPreloads. Because m_pendingPreloads would already contain a
preload for this same resource, the SpeculativeLoad would not get added to the map and it would get destroyed
right away, before completing (thus hitting the assert). This unnecessary creation of the SpeculativeLoad is
inefficient and it is thus best to avoid it.

To address the issue, when we receive the response, we now make sure that m_pendingPreloads does not already
contain a preload for this resource before calling revalidateSubresource() again, similarly to what was
already done at the beginning of SpeculativeLoadManager::preloadEntry().

No new tests, unknown how to reproduce.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::revalidateSubresource):

3:03 PM Changeset in webkit [253064] by jer.noble@apple.com
  • 8 edits in trunk/Source/WebCore

Adopt AVContentKeyReportGroup
https://bugs.webkit.org/show_bug.cgi?id=204765

Reviewed by Eric Carlson.

Source/WebCore:

Adopt a new class, AVContentKeyReportGroup, which allows muliple MediaKeySessions to share
an AVContentKeySession, while allowing independent expiration and persistent key usage
tokens. However, this has to be runtime detected, so that existing usage of
AVContentKeySession continues to work on platform versions without report group support.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.h:
  • platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:

(-[WebCoreFPSContentKeySessionDelegate initWithParent:]):
(-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentProtectionSessionIdentifierDidChangeForKeyGroup:]):
(-[WebCoreFPSContentKeySessionDelegate contentKeySession:contentProtectionSessionIdentifierDidChangeForReportGroup:]):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::CDMInstanceFairPlayStreamingAVFObjC):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::ensureSession):
(WebCore::groupForRequest):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequest):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRequests):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvideRenewingRequest):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::didProvidePersistableRequest):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::didFailToProvideRequest):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::requestDidSucceed):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::shouldRetryRequestForReason):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionIdentifierChanged):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForGroup const):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::CDMInstanceSessionFairPlayStreamingAVFObjC):
(WebCore::initTypeForRequest):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::groupSessionIdentifierChanged):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSessionOrGroup):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::ensureSession): Deleted.

Source/WebCore/PAL:

  • pal/cocoa/AVFoundationSoftLink.h:
  • pal/cocoa/AVFoundationSoftLink.mm:
  • pal/spi/mac/AVFoundationSPI.h:
2:56 PM Changeset in webkit [253063] by eric.carlson@apple.com
  • 10 edits in trunk/Source

Add a runtime setting for media in the GPU process
https://bugs.webkit.org/show_bug.cgi?id=204801
<rdar://problem/57596199>

Reviewed by Jer Noble.

Source/WebCore:

  • page/Settings.yaml:

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences outOfProcessMediaEnabled]):
(-[WebPreferences setOutOfProcessMediaEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

2:35 PM Changeset in webkit [253062] by jer.noble@apple.com
  • 3 edits in trunk/Source/WebCore

Experimental support for HDR media query
https://bugs.webkit.org/show_bug.cgi?id=204422
<rdar://problem/56799662>

Reviewed by Eric Carlson.

Follow-up to r252762 for platforms that don't have MediaToolbox.framework.

  • platform/ios/PlatformScreenIOS.mm:

(WebCore::screenSupportsHighDynamicRange):

  • platform/mac/PlatformScreenMac.mm:

(WebCore::collectScreenProperties):
(WebCore::screenSupportsHighDynamicRange):

2:07 PM Changeset in webkit [253061] by chris.reid@sony.com
  • 6 edits
    2 adds in trunk

Regular expression hangs in Safari only
https://bugs.webkit.org/show_bug.cgi?id=202882
<rdar://problem/56236654>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/regress-202882.js: Added.

Source/WTF:

BumpPointerPool::ensureCapacityCrossPool can cause an infinite loop
if multiple large pools are deallocated and a new capacity does not
fit in the deallocated pools. BumpPointerPool should try using
more pools if the next one isn't large enough.

  • wtf/BumpPointerAllocator.h:

(WTF::BumpPointerPool::ensureCapacityCrossPool):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/BumpPointerAllocator.cpp: Added.
12:34 PM Changeset in webkit [253060] by Jonathan Bedard
  • 2 edits in trunk/Tools

https://bugs.webkit.org/show_bug.cgi?id=204804
<rdar://problem/57595666>

Reviewed by Tim Horton.

  • Scripts/webkitpy/port/mac.py:

(MacCatalystPort):
(MacCatalystPort._build_driver_flags): Add SDKVARIANT=iosmac to build flags.

12:12 PM Changeset in webkit [253059] by pvollan@apple.com
  • 3 edits in trunk/Source/WebKit

Unreviewed assertion fix for older macOS versions after r253011.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
12:06 PM Changeset in webkit [253058] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Start adding encoding support for DisplayList and some DisplayListItems
https://bugs.webkit.org/show_bug.cgi?id=204740

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContextStateChange::changesFromState const):

  • platform/graphics/GraphicsContext.h:

Remove GraphicsContextState::NoChange, which is not needed with OptionSet
and in fact causes assertions to fire.

11:33 AM Changeset in webkit [253057] by Alan Coon
  • 3 edits in tags/Safari-609.1.11/Source/WebCore

Cherry-pick r252956. rdar://problem/57438874

MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
https://bugs.webkit.org/show_bug.cgi?id=204600
<rdar://problem/57438874>

Reviewed by Eric Carlson.

MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
and confuse the pipe.
Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.

Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.

  • platform/mediastream/mac/MockAudioSharedUnit.h:
  • platform/mediastream/mac/MockAudioSharedUnit.mm: (WebCore::MockAudioSharedUnit::reconfigureAudioUnit): (WebCore::MockAudioSharedUnit::startInternal):

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

11:28 AM Changeset in webkit [253056] by commit-queue@webkit.org
  • 20 edits in trunk

[Web Animations] Add a runtime flag for Web Animations composite operations
https://bugs.webkit.org/show_bug.cgi?id=204718

Patch by Antoine Quint <Antoine Quint> on 2019-12-03
Reviewed by Dean Jackson.

Source/WebCore:

While we support parsing and output of composite modes via KeyframeEffect::getKeyframes(), we don't support them for blending properties.
We now have a runtime flag for that feature so that we can continue working on it but not necessarily expose the feature by default.

  • animation/KeyframeEffect.cpp:

(WebCore::processKeyframeLikeObject):
(WebCore::processIterableKeyframes):
(WebCore::processPropertyIndexedKeyframes):
(WebCore::KeyframeEffect::getKeyframes):

  • animation/KeyframeEffect.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setWebAnimationsCompositeOperationsEnabled):
(WebCore::RuntimeEnabledFeatures::webAnimationsCompositeOperationsEnabled const):

Source/WebKit:

  • Shared/WebPreferences.yaml:

Source/WebKitLegacy/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences webAnimationsCompositeOperationsEnabled]):
(-[WebPreferences setWebAnimationsCompositeOperationsEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKitLegacy/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::initializeDefaultSettings):
(WebPreferences::setWebAnimationsCompositeOperationsEnabled):
(WebPreferences::webAnimationsCompositeOperationsEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):

11:08 AM Changeset in webkit [253055] by youenn@apple.com
  • 3 edits in trunk/Source/WebKit

UserMediaCaptureManager should have independent capture factories
https://bugs.webkit.org/show_bug.cgi?id=204786

Reviewed by Eric Carlson.

Refactor the code to make UserMediaCaptureManager have 3 different factories.
This allows having 3 potential active sources which are used on iOS.
We cannot test right now on iOS as audio capture in UIProcess is not yet ready.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::Source):
(WebKit::UserMediaCaptureManager::Source::~Source):
(WebKit::UserMediaCaptureManager::UserMediaCaptureManager):
(WebKit::UserMediaCaptureManager::~UserMediaCaptureManager):
(WebKit::UserMediaCaptureManager::initialize):
(WebKit::UserMediaCaptureManager::createCaptureSource):
(WebKit::UserMediaCaptureManager::AudioFactory::setAudioCapturePageState):
(WebKit::UserMediaCaptureManager::VideoFactory::setVideoCapturePageState):
(WebKit::UserMediaCaptureManager::setAudioCapturePageState): Deleted.
(WebKit::UserMediaCaptureManager::setVideoCapturePageState): Deleted.

  • WebProcess/cocoa/UserMediaCaptureManager.h:

(WebKit::UserMediaCaptureManager::AudioFactory::AudioFactory):
(WebKit::UserMediaCaptureManager::VideoFactory::VideoFactory):
(WebKit::UserMediaCaptureManager::DisplayFactory::DisplayFactory):

10:39 AM Changeset in webkit [253054] by Wenson Hsieh
  • 3 edits in trunk/LayoutTests

fast/events/touch/ios/passive-by-default-on-document-and-window.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=204797
<rdar://problem/57591431>

Reviewed by Tim Horton.

Fix the layout test by waiting for touchend events before finishing the test, such that passive touchend events
that were queued up via EventDispatcher::touchEvent have a chance to be dispatched to the page. Also, make the
test a bit more modern by replacing the UI script in the test with a call to a UIHelper method.

  • fast/events/touch/ios/passive-by-default-on-document-and-window-expected.txt:
  • fast/events/touch/ios/passive-by-default-on-document-and-window.html:
10:24 AM Changeset in webkit [253053] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove build warning below since r252987.
warning: unused variable ‘currentTrack’ [-Wunused-variable]

No new tests, no behavioral changes.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):

10:22 AM Changeset in webkit [253052] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Move trailing trimmable content logic to InlineItemRun
https://bugs.webkit.org/show_bug.cgi?id=204798
<rdar://problem/57593248>

Reviewed by Antti Koivisto.

Trailing letter spacing/fully trimmable whitespace logic should be internal to InlineItemRun.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::runContentHeight const):
(WebCore::Layout::LineBuilder::InlineItemRun::isTrimmableWhitespace const):
(WebCore::Layout::LineBuilder::InlineItemRun::hasTrailingLetterSpacing const):
(WebCore::Layout::LineBuilder::InlineItemRun::trailingLetterSpacing const):
(WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):
(WebCore::Layout::shouldPreserveTrailingContent): Deleted.

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::Run::style const):
(WebCore::Layout::LineBuilder::InlineItemRun::style const):

10:17 AM Changeset in webkit [253051] by Chris Dumez
  • 9 edits in trunk/Source

PageConfiguration::pluginClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204780

Reviewed by Anders Carlsson.

Source/WebCore:

  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::~Page):

  • page/Page.h:

(WebCore::Page::plugInClient const):

  • page/PageConfiguration.h:
  • page/PlugInClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebPlugInClient.cpp:
  • WebProcess/WebCoreSupport/WebPlugInClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

10:13 AM Changeset in webkit [253050] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Fix MacCatalyst build.

  • platform/graphics/GraphicsContext3D.h:
9:56 AM Changeset in webkit [253049] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Do not retry the EWS build due to flaky failures in layout-test
https://bugs.webkit.org/show_bug.cgi?id=204769

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeLayoutTestsResults.start): Do not retry the build due to flaky tests failures.

  • BuildSlaveSupport/ews-build/steps_unittest.py:

(test_flaky_and_inconsistent_failures_without_clean_tree_failures): expected outcome changed from RETRY to SUCCESS.
(test_flaky_and_inconsistent_failures_with_clean_tree_failures): Ditto.
(test_flaky_and_consistent_failures_with_clean_tree_failures): Ditto.
(test_mildly_flaky_patch_with_some_tree_redness_and_flakiness): Ditto.

9:34 AM Changeset in webkit [253048] by Chris Dumez
  • 13 edits in trunk/Source

PageConfiguration::alternativeTextClient should use a smart pointer
https://bugs.webkit.org/show_bug.cgi?id=204777

Reviewed by Anders Carlsson.

Source/WebCore:

  • page/AlternativeTextClient.h:
  • page/Page.cpp:

(WebCore::Page::Page):
(WebCore::Page::~Page):

  • page/Page.h:

(WebCore::Page::alternativeTextClient const):

  • page/PageConfiguration.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
  • WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:

(WebKit::WebAlternativeTextClient::pageDestroyed): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebAlternativeTextClient.h:
  • WebCoreSupport/WebAlternativeTextClient.mm:

(WebAlternativeTextClient::pageDestroyed): Deleted.

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

9:12 AM Changeset in webkit [253047] by Kate Cheney
  • 2 edits in trunk/Source/WebKit

Activate the SQLite database as an on-by-default feature
https://bugs.webkit.org/show_bug.cgi?id=204774
<rdar://problem/56117706>

Reviewed by Brent Fulgham.

The flag to use the ITP Database backend should be set to true by default.

  • Shared/WebPreferences.yaml:
8:50 AM Changeset in webkit [253046] by timothy_horton@apple.com
  • 11 edits in trunk/Source/WebCore

Start adding encoding support for DisplayList and some DisplayListItems
https://bugs.webkit.org/show_bug.cgi?id=204740

Reviewed by Simon Fraser.

To be used in a later patch.

Start encoding and decoding DisplayList, and its child items. We
currently support only a subset of the item subclasses.

  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContextStateChange::changesFromState const):
(WebCore::GraphicsContextStateChange::accumulate):
(WebCore::GraphicsContextStateChange::apply const):

  • platform/graphics/GraphicsContext.h:

Adopt OptionSet for GraphicsContextState::StateChangeFlags.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/graphics/Pattern.h:
  • platform/graphics/displaylists/DisplayList.h:

(WebCore::DisplayList::DisplayList::encode const):
(WebCore::DisplayList::DisplayList::decode):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::Item::Item):
(WebCore::DisplayList::DrawingItem::DrawingItem):
(WebCore::DisplayList::Save::Save):
(WebCore::DisplayList::Restore::Restore):
(WebCore::DisplayList::Translate::Translate):
(WebCore::DisplayList::Rotate::Rotate):
(WebCore::DisplayList::Scale::Scale):
(WebCore::DisplayList::SetState::SetState):
(WebCore::DisplayList::DrawRect::DrawRect):
(WebCore::DisplayList::DrawPath::DrawPath):
(WebCore::DisplayList::FillRect::FillRect):
(WebCore::DisplayList::FillRectWithColor::FillRectWithColor):
(WebCore::DisplayList::FillCompositedRect::FillCompositedRect):
(WebCore::DisplayList::FillPath::FillPath):
(WebCore::DisplayList::ClearRect::ClearRect):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::Item::isStateItemType):
(WebCore::DisplayList::Save::encode const):
(WebCore::DisplayList::Save::decode):
(WebCore::DisplayList::Restore::encode const):
(WebCore::DisplayList::Restore::decode):
(WebCore::DisplayList::Translate::encode const):
(WebCore::DisplayList::Translate::decode):
(WebCore::DisplayList::Rotate::encode const):
(WebCore::DisplayList::Rotate::decode):
(WebCore::DisplayList::Scale::encode const):
(WebCore::DisplayList::Scale::decode):
(WebCore::DisplayList::ConcatenateCTM::encode const):
(WebCore::DisplayList::ConcatenateCTM::decode):
(WebCore::DisplayList::SetState::create):
(WebCore::DisplayList::SetState::encode const):
(WebCore::DisplayList::SetState::decode):
(WebCore::DisplayList::DrawRect::encode const):
(WebCore::DisplayList::DrawRect::decode):
(WebCore::DisplayList::DrawPath::encode const):
(WebCore::DisplayList::DrawPath::decode):
(WebCore::DisplayList::FillRect::encode const):
(WebCore::DisplayList::FillRect::decode):
(WebCore::DisplayList::FillRectWithColor::encode const):
(WebCore::DisplayList::FillRectWithColor::decode):
(WebCore::DisplayList::FillCompositedRect::encode const):
(WebCore::DisplayList::FillCompositedRect::decode):
(WebCore::DisplayList::FillPath::encode const):
(WebCore::DisplayList::FillPath::decode):
(WebCore::DisplayList::ClearRect::encode const):
(WebCore::DisplayList::ClearRect::decode):
(WebCore::DisplayList::Item::encode const):
(WebCore::DisplayList::Item::decode):
(WebCore::DisplayList::Item::Item): Deleted.
(WebCore::DisplayList::DrawingItem::DrawingItem): Deleted.
(WebCore::DisplayList::Save::Save): Deleted.
(WebCore::DisplayList::Restore::Restore): Deleted.
(WebCore::DisplayList::Translate::Translate): Deleted.
(WebCore::DisplayList::Rotate::Rotate): Deleted.
(WebCore::DisplayList::Scale::Scale): Deleted.
(WebCore::DisplayList::SetState::SetState): Deleted.
(WebCore::DisplayList::DrawRect::DrawRect): Deleted.
(WebCore::DisplayList::DrawPath::DrawPath): Deleted.
(WebCore::DisplayList::FillRect::FillRect): Deleted.
(WebCore::DisplayList::FillRectWithColor::FillRectWithColor): Deleted.
(WebCore::DisplayList::FillCompositedRect::FillCompositedRect): Deleted.
(WebCore::DisplayList::FillPath::FillPath): Deleted.
(WebCore::DisplayList::ClearRect::ClearRect): Deleted.

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/displaylists/DisplayListReplayer.h:

(WebCore::DisplayList::Replayer::replay):

8:28 AM Changeset in webkit [253045] by youenn@apple.com
  • 18 edits in trunk

Add support for camera rotation when capturing in UIProcess
https://bugs.webkit.org/show_bug.cgi?id=204750

Reviewed by Eric Carlson.

Source/WebKit:

Make UserMediaCaptureManagerProxy have an OrientationNotifier.
It is updated by each web page of the web process being notified of a device orientation change.
Whenever a rotation happens, UIProcess sources are now notified to correctly compute the frame rotations.

Covered by existing tests.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetMockCameraOrientation):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

(WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints):
(WebKit::UserMediaCaptureManagerProxy::setOrientation):

  • UIProcess/Cocoa/UserMediaCaptureManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setOrientationForMediaCapture):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessProxy.h:

(WebKit::WebProcessProxy::userMediaCaptureManagerProxy):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::setDeviceOrientation):

Tools:

Add test runner API to set the device rotation specifically for mock camera devices.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setMockCameraOrientation):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setMockCameraOrientation):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • webrtc/video-rotation.html:

Capture in UIProcess on Cocoa port and make use of test runner API to simulate device rotation.

7:46 AM Changeset in webkit [253044] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Layout Test fast/layoutformattingcontext/flow-integration-basic.html is failing
https://bugs.webkit.org/show_bug.cgi?id=204795

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:42 AM Changeset in webkit [253043] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

The test webanimations/accelerated-animation-removal-upon-transition-completion.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=204794

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:41 AM Changeset in webkit [253042] by Antti Koivisto
  • 6 edits
    2 moves in trunk/Source/WebCore

[LFC][Integration] Rename RenderBlockFlowLineLayout and move it to LayoutIntegration namespace
https://bugs.webkit.org/show_bug.cgi?id=204791

Reviewed by Sam Weinig.

Layout::RenderBlockFlowLineLayout -> LayoutIntegration::LineLayout

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/integration/LayoutIntegrationLineLayout.cpp: Renamed from Source/WebCore/layout/integration/RenderBlockFlowLineLayout.cpp.

(WebCore::LayoutIntegration::LineLayout::LineLayout):
(WebCore::LayoutIntegration::LineLayout::canUseFor):
(WebCore::LayoutIntegration::LineLayout::layout):
(WebCore::LayoutIntegration::LineLayout::prepareRootGeometryForLayout):
(WebCore::LayoutIntegration::LineLayout::displayInlineContent const):
(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::LineLayout::textBoxesFor const):
(WebCore::LayoutIntegration::LineLayout::elementBoxFor const):
(WebCore::LayoutIntegration::LineLayout::rootLayoutBox const):

  • layout/integration/RenderBlockFlowLineLayout.h: Removed.
  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::invalidateLineLayoutPath):
(WebCore::RenderBlockFlow::layoutLFCLines):

  • rendering/RenderBlockFlow.h:

(WebCore::RenderBlockFlow::hasLayoutFormattingContextLineLayout const):
(WebCore::RenderBlockFlow::layoutFormattingContextLineLayout const):
(WebCore::RenderBlockFlow::layoutFormattingContextLineLayout):
(WebCore::RenderBlockFlow::hasLFCLineLayout const): Deleted.
(WebCore::RenderBlockFlow::lfcLineLayout const): Deleted.
(WebCore::RenderBlockFlow::lfcLineLayout): Deleted.

  • rendering/line/LineLayoutTraversal.cpp:

(WebCore::LineLayoutTraversal::firstTextBoxFor):
(WebCore::LineLayoutTraversal::elementBoxFor):

7:20 AM Changeset in webkit [253041] by Antti Koivisto
  • 8 edits in trunk

[LFC][Integration] Shorten feature flag name
https://bugs.webkit.org/show_bug.cgi?id=204788

Reviewed by Sam Weinig.

Source/WebCore:

LayoutFormattingContextRenderTreeIntegrationEnabled -> LayoutFormattingContextIntegrationEnabled

  • layout/integration/RenderBlockFlowLineLayout.cpp:

(WebCore::Layout::RenderBlockFlowLineLayout::canUseFor):

  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextIntegrationEnabled):
(WebCore::RuntimeEnabledFeatures::layoutFormattingContextIntegrationEnabled const):
(WebCore::RuntimeEnabledFeatures::setLayoutFormattingContextRenderTreeIntegrationEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::layoutFormattingContextRenderTreeIntegrationEnabled const): Deleted.

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

LayoutTests:

  • fast/layoutformattingcontext/flow-integration-basic.html:
7:01 AM Changeset in webkit [253040] by youenn@apple.com
  • 2 edits in trunk/Source/WebCore

MediaRecorderPrivateWriter should not be destroyed until finishing its writing task completion handler is called
https://bugs.webkit.org/show_bug.cgi?id=204789
<rdar://problem/57561143>

Reviewed by Eric Carlson.

When stopping the recorder, we might stop recording the private writer without calling fetchData.
In that case, we do not wait for the writing completion handler.
Fix this by using the semaphore at the end of stopRecording.
Covered by existing test.

  • platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:

(WebCore::MediaRecorderPrivateWriter::stopRecording):
(WebCore::MediaRecorderPrivateWriter::fetchData):

6:52 AM Changeset in webkit [253039] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] TextUtil::width should not overflow when word/letter-spacing is larger than LayoutUnit::max
https://bugs.webkit.org/show_bug.cgi?id=204782
<rdar://problem/57580285>

Reviewed by Antti Koivisto.

LayoutUnit width = font.width(run) and width -= (font.spaceWidth() + font.wordSpacing()) could produce a negative width value.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):

  • layout/inlineformatting/text/TextUtil.cpp:

(WebCore::Layout::TextUtil::width):
(WebCore::Layout::TextUtil::fixedPitchWidth):

6:49 AM Changeset in webkit [253038] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Try to fit content on the current line when the line has trimmable trailing content
https://bugs.webkit.org/show_bug.cgi?id=204781
<rdar://problem/57580138>

Reviewed by Antti Koivisto.

Let's expand the available space when the line has trailing trimmable whitespace and we try to fit some empty inline containers.
"text content <span style="padding: 1px"></span>" <- the <span></span> runs should fit after trimming the trailing whitespace.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::Content::hasNonContentRunsOnly const):

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

(WebCore::Layout::LineLayoutContext::processUncommittedContent):

6:45 AM Changeset in webkit [253037] by youenn@apple.com
  • 6 edits in trunk

Expose WKWebView API to stop ongoing capture
https://bugs.webkit.org/show_bug.cgi?id=204787

Reviewed by Eric Carlson.

Source/WebKit:

Covered by API test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _stopMediaCapture]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKit/GetUserMedia.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit/getUserMedia.html:
5:37 AM Changeset in webkit [253036] by calvaris@igalia.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build warning.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

durationMediaTime should be marked as override.

4:32 AM Changeset in webkit [253035] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[WPE] Some WebGL 1.0.3 conformance tests are marked as failing but have been consistently passing
https://bugs.webkit.org/show_bug.cgi?id=204790

Patch by Chris Lord <Chris Lord> on 2019-12-03
Reviewed by Alejandro G. Castro.

  • platform/wpe/TestExpectations:
3:25 AM Changeset in webkit [253034] by Fujii Hironori
  • 4 edits in trunk

Unreviewed, rolling out r253020.

It breaks WinCairo bots.

Reverted changeset:

"[MSVC] Add /experimental:newLambdaProcessor switch for better
C++ conformance"
https://bugs.webkit.org/show_bug.cgi?id=204443
https://trac.webkit.org/changeset/253020

3:11 AM Changeset in webkit [253033] by youenn@apple.com
  • 19 edits in trunk

[Cocoa] Run camera capture in UIProcess by default in layout tests
https://bugs.webkit.org/show_bug.cgi?id=204512

Reviewed by Eric Carlson.

Source/WebCore:

Remove no longer useful internals API once we are moving capture to UIProcess.

  • platform/mediastream/RealtimeMediaSourceFactory.h:
  • testing/Internals.cpp:

(WebCore::Internals::Internals):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willCreateMediaStream):
Do not send sandbox extensions in case capture happens in UIProcess.

  • WebProcess/cocoa/UserMediaCaptureManager.cpp:

(WebKit::UserMediaCaptureManager::Source::~Source):
(WebKit::UserMediaCaptureManager::createCaptureSource):
Register/unregister sources as active/unactive sources to the factory.

Tools:

By defaut, enable capture in UIProcess on Cocoa side.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

LayoutTests:

Update tests to remove use of the removed internals API and disable
camera capture in UIProcess for two tests that exihibit shortcomings of our current UIProcess camera capture support.

  • fast/mediastream/constraint-intrinsic-size.html:
  • fast/mediastream/media-stream-page-muted.html:
  • fast/mediastream/mediastreamtrack-video-clone.html:
  • fast/mediastream/mock-media-source-expected.txt:
  • fast/mediastream/mock-media-source.html:
  • fast/mediastream/overconstrainederror-constraint.html:
  • webrtc/video-rotation.html:
2:51 AM Changeset in webkit [253032] by Antti Koivisto
  • 13 edits
    2 moves
    7 adds in trunk

[LFC][Integration] Setup root box properties
https://bugs.webkit.org/show_bug.cgi?id=204743

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/layoutformattingcontext/flow-integration-basic.html

Line layout needs to know about flow borders and padding so that boxes are offset correctly.

  • CMakeLists.txt:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/LayoutContext.cpp:

(WebCore::Layout::LayoutContext::layout):
(WebCore::Layout::LayoutContext::layoutWithPreparedRootGeometry):

Split setup and layout into separate functions.

  • layout/LayoutContext.h:
  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::displayBoxForLayoutRoot):

  • layout/LayoutState.h:
  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::paintInlineContent):
(WebCore::Display::Painter::paint):
(WebCore::Display::Painter::paintInlineFlow):

Avoid accessing tree root box properties when painting (since margins are not set up).

  • layout/integration/RenderBlockFlowLineLayout.cpp: Renamed from Source/WebCore/layout/RenderBlockFlowLineLayout.cpp.

Moved to integration subdirectory.

(WebCore::Layout::RenderBlockFlowLineLayout::layout):

Drop the content size paramater, the caller is responsible of setting up the root display box.

(WebCore::Layout::RenderBlockFlowLineLayout::prepareRootDisplayBoxForLayout):

Setup padding and borders.

(WebCore::Layout::RenderBlockFlowLineLayout::displayInlineContent const):
(WebCore::Layout::RenderBlockFlowLineLayout::rootLayoutBox const):

  • layout/integration/RenderBlockFlowLineLayout.h: Renamed from Source/WebCore/layout/RenderBlockFlowLineLayout.h.

(WebCore::Layout::RenderBlockFlowLineLayout::contentLogicalHeight const):

Use a member to pass content height.

  • layout/layouttree/LayoutTreeBuilder.h:

(WebCore::Layout::LayoutTreeContent::layoutBoxForRenderer const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::layoutLFCLines):

LayoutTests:

  • fast/layoutformattingcontext/flow-integration-basic.html: Added.
  • platform/mac/fast/layoutformattingcontext/flow-integration-basic-expected.txt: Added.
2:30 AM Changeset in webkit [253031] by commit-queue@webkit.org
  • 13 edits in trunk

Implement createImageBitmap(OffscreenCanvas)
https://bugs.webkit.org/show_bug.cgi?id=183440

Patch by Zan Dobersek <zdobersek@igalia.com> on 2019-12-03
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-serializable-expected.txt:
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-transfer-expected.txt:
  • web-platform-tests/offscreen-canvas/convert-to-blob/offscreencanvas.convert.to.blob.w-expected.txt:
  • web-platform-tests/offscreen-canvas/the-offscreen-canvas/offscreencanvas.transfer.to.imagebitmap.w-expected.txt:

Source/WebCore:

No new tests. Covered by existing tests.

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):

  • html/ImageBitmap.h:
  • page/WindowOrWorkerGlobalScope.idl:

LayoutTests:

  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt:
2:03 AM Changeset in webkit [253030] by Carlos Garcia Campos
  • 16 edits in trunk

WebDriver: handle elements of type file in send keys command
https://bugs.webkit.org/show_bug.cgi?id=188514

Reviewed by Brian Burg.

Source/WebCore:

Export symbols now used by WebKit::WebAutomationSessionProxy.

  • html/HTMLInputElement.h:

Source/WebDriver:

Handle the case of inpout element being a file upload in send keys command.

  • Capabilities.h: Add strictFileInteractability.
  • Session.cpp:

(WebDriver::Session::elementIsFileUpload): Helper to check if the given element is a file upload and whether
it's multiple or not.
(WebDriver::Session::parseElementIsFileUploadResult): Parse the result of elementIsFileUpload().
(WebDriver::Session::elementClick): If the element is a file upload, fail with invalid argument error.
(WebDriver::Session::setInputFileUploadFiles): Send setFilesForInputFileUpload message to the browser with the
selected files.
(WebDriver::Session::elementSendKeys): If the element is a file upload, call setInputFileUploadFiles()
instead. Also handle the strictFileInteractability capability to decide whether to focus and check
interactability on the input element or not.

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::WebDriverService::parseCapabilities const): Handle strictFileInteractability.
(WebDriver::WebDriverService::validatedCapabilities const): Ditto.
(WebDriver::WebDriverService::matchCapabilities const): Ditto.
(WebDriver::WebDriverService::createSession): Ditto.

Source/WebKit:

Add setFilesForInputFileUpload method to Automation. It's like setFilesToSelectForFileUpload, but it works
differently, so I'm keeping both to not break safaridriver. The new one simply sends the file list to the web
process to be set on the input element, instead of saving the file list, wait for the driver to trigger the open
panel, intercept and complete the open panel request and send a dismiss open panel event to the driver.

  • UIProcess/Automation/Automation.json: Add setFilesForInputFileUpload.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::setFilesForInputFileUpload): Send SetFilesForInputFileUpload message to the web process.

  • UIProcess/Automation/WebAutomationSession.h:
  • WebProcess/Automation/WebAutomationSessionProxy.cpp:

(WebKit::WebAutomationSessionProxy::setFilesForInputFileUpload): Create a FileList with the received paths and
call HTMLInputElement::setFiles() on the given element.

  • WebProcess/Automation/WebAutomationSessionProxy.h:
  • WebProcess/Automation/WebAutomationSessionProxy.messages.in: Add SetFilesForInputFileUpload message.

WebDriverTests:

Remove expectations for tests that are now passing.

1:32 AM Changeset in webkit [253029] by Carlos Garcia Campos
  • 7 edits in trunk

WebDriver: most of the clear tests are failing
https://bugs.webkit.org/show_bug.cgi?id=180404

Reviewed by Brian Burg.

Source/WebDriver:

Implement the element clear command following the spec.
https://w3c.github.io/webdriver/#element-clear

  • Session.cpp:

(WebDriver::Session::elementIsEditable): Helper function to check if the element is editable.
(WebDriver::Session::elementClear): Check if the element is editable and interactable before executing the clear atom.

  • Session.h:

Source/WebKit:

Update the FormElementClear atom to follow the spec.

  • UIProcess/Automation/atoms/FormElementClear.js:

(isEditable):
(isResettableElementEmpty):

WebDriverTests:

Remove expectations for tests that are now passing.

1:30 AM Changeset in webkit [253028] by Carlos Garcia Campos
  • 20 edits in trunk/Source

[PSON] Tooltips from previous page shown on new page
https://bugs.webkit.org/show_bug.cgi?id=204735

Reviewed by Chris Dumez.

Source/WebCore:

Remove Chrome::setToolTip() that is always called after Chrome::mouseDidMoveOverElement() and add the
tooltip text and direction as parameters of Chrome::mouseDidMoveOverElement().

  • loader/EmptyClients.h:
  • page/Chrome.cpp:

(WebCore::Chrome::mouseDidMoveOverElement):
(WebCore::Chrome::getToolTip):

  • page/Chrome.h:
  • page/ChromeClient.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::mouseMoved):

Source/WebKit:

The problem is that WebPage (in the web process) is caching the tooltip text to avoid sending IPC messages when
the tooltip didn't change. When a new web process is used for the same web view, the tooltip text doesn't really
change (it's always null) until a new one is set. The setToolTip message is always sent right after the
MouseDidMoveOverElement, and they both depend on the same hit test result, so we can include the tooltip text as
part of the WebHitTestResultData struct passed to MouseDidMoveOverElement and remove the SetToolTip
message. Since the UI process is already caching the tooltip, we can simply notify the page client when it changes.

  • Shared/WebHitTestResultData.cpp:

(WebKit::WebHitTestResultData::WebHitTestResultData): Initialize toolTipText.
(WebKit::WebHitTestResultData::encode const): Encode toolTipText.
(WebKit::WebHitTestResultData::decode): Decode toolTipText.

  • Shared/WebHitTestResultData.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::mouseDidMoveOverElement): Call setToolTip() after notifying the UI client about the mouse move.
(WebKit::WebPageProxy::setToolTip): Return early if tooltip didn't change.
(WebKit::WebPageProxy::resetState): Use setToolTip() to ensure the page client is notified about the change.

  • UIProcess/WebPageProxy.messages.in: Remove SetToolTip message.
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::mouseDidMoveOverElement): Pass tooltip text to WebHitTestResultData constructor.

  • WebProcess/WebCoreSupport/WebChromeClient.h:

Source/WebKitLegacy/mac:

Update to the new ChromeClient API.

  • WebCoreSupport/WebChromeClient.h:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::mouseDidMoveOverElement):
(WebChromeClient::setToolTip):

Source/WebKitLegacy/win:

Update to the new ChromeClient API.

  • WebCoreSupport/WebChromeClient.cpp:

(WebChromeClient::mouseDidMoveOverElement):

  • WebCoreSupport/WebChromeClient.h:
1:28 AM Changeset in webkit [253027] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Focus the location bar on CTRL+l in GTK MiniBrowser

  • MiniBrowser/gtk/BrowserWindow.c:

(focusLocationBar):
(browser_window_init):

Dec 2, 2019:

11:55 PM Changeset in webkit [253026] by sbarati@apple.com
  • 4 edits
    1 add in trunk

PropertySlot should not have Customs have a PropertyOffset of zero
https://bugs.webkit.org/show_bug.cgi?id=204566
<rdar://problem/57466781>

Reviewed by Keith Miller.

JSTests:

  • stress/cacheable-custom-accessor-should-not-have-property-offset.js: Added.

Source/JavaScriptCore:

We used to say that PropertyOffset of a cacheable custom was always zero. We
did this because we were using "invalidOffset" to indicate things aren't
cacheable. This patch refactors PropertySlot to not look at PropertyOffset
for cacheability, but instead just uses the cacheability bit. With that
change, we now say that customs always have the invalid PropertyOffset. This
fixes a bug where we used to watch for property changes at the offset inside
an AccessCase. We were doing this for the zero property offset for all
customs. This could trigger a crash inside startWatchingPropertyForReplacements
because the prototype Structure was a dictionary. We allow dictionaries to
be property holders of customs as long as the property is a custom and has
DontDelete property attribute, since DontDelete proves the custom will never
change.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::PropertySlot):
(JSC::PropertySlot::isCacheable const):
(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setCustomGetterSetter):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):
(JSC::PropertySlot::setUndefined):

10:53 PM Changeset in webkit [253025] by sihui_liu@apple.com
  • 36 edits
    2 deletes in trunk

Cross-thread version StorageQuotaManager
https://bugs.webkit.org/show_bug.cgi?id=203971
<rdar://problem/57290349>

Reviewed by Chris Dumez.

Source/WebCore:

Implement a lock-based StorageQuotaManager so that quota check can be done on different threads.
If space request is made on a background thread, it needs to hold a lock until it is finished, so no request
from different threads can be performed at the same time.
If space request is made on the main thread, we will dispatch it to a background thread and schedule a calllback
to the main thread when result is available, so the main thread will not be blocked.

Covered by existing quota related tests.

  • Headers.cmake:
  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::create):
(WebCore::IDBServer::IDBServer::IDBServer):
(WebCore::IDBServer::IDBServer::didPerformCloseAndDeleteDatabases):
(WebCore::IDBServer::IDBServer::requestSpace):
(WebCore::IDBServer::IDBServer::diskUsage):
(WebCore::IDBServer::IDBServer::QuotaUser::QuotaUser): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::~QuotaUser): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::resetSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::computeSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::increaseSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::decreaseSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::whenInitialized): Deleted.
(WebCore::IDBServer::IDBServer::QuotaUser::initializeSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::ensureQuotaUser): Deleted.
(WebCore::IDBServer::IDBServer::startComputingSpaceUsedForOrigin): Deleted.
(WebCore::IDBServer::IDBServer::computeSpaceUsedForOrigin): Deleted.
(WebCore::IDBServer::IDBServer::finishComputingSpaceUsedForOrigin): Deleted.
(WebCore::IDBServer::IDBServer::resetSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::increaseSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::decreaseSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::increasePotentialSpaceUsed): Deleted.
(WebCore::IDBServer::IDBServer::decreasePotentialSpaceUsed): Deleted.

  • Modules/indexeddb/server/IDBServer.h:

(WebCore::IDBServer::IDBServer::initializeQuotaUser): Deleted.
(): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performCreateObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::performRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformCreateIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performRenameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformRenameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::openCursor):
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::requestSpace): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::startSpaceIncreaseTask): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::finishSpaceIncreaseTask): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStoreAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStoreAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStoreAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStoreAfetQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::createIndexAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndexAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::renameIndexAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::putOrAddAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::getRecordAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecordsAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::getCountAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecordAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::openCursorAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursorAfterQuotaCheck): Deleted.
(WebCore::IDBServer::UniqueIDBDatabase::commitTransactionAfterQuotaCheck): Deleted.

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseConnection::abortTransactionWithoutCallback):

  • Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:

(WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
(WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):

  • Modules/indexeddb/shared/InProcessIDBServer.cpp:

(WebCore::InProcessIDBServer::quotaManager):
(WebCore::storageQuotaManagerSpaceRequester):
(WebCore::InProcessIDBServer::InProcessIDBServer):
(WebCore::storageQuotaManagerGetter): Deleted.

  • Modules/indexeddb/shared/InProcessIDBServer.h:
  • WebCore.xcodeproj/project.pbxproj:
  • storage/StorageQuotaManager.cpp:

(WebCore::StorageQuotaManager::create):
(WebCore::StorageQuotaManager::StorageQuotaManager):
(WebCore::StorageQuotaManager::requestSpaceOnMainThread):
(WebCore::StorageQuotaManager::requestSpaceOnBackgroundThread):
(WebCore::StorageQuotaManager::tryGrantRequest):
(WebCore::StorageQuotaManager::updateQuotaBasedOnUsage):
(WebCore::StorageQuotaManager::resetQuotaUpdatedBasedOnUsageForTesting):
(WebCore::StorageQuotaManager::resetQuotaForTesting):
(WebCore::StorageQuotaManager::~StorageQuotaManager): Deleted.
(WebCore::StorageQuotaManager::spaceUsage const): Deleted.
(WebCore::StorageQuotaManager::updateQuotaBasedOnSpaceUsage): Deleted.
(WebCore::StorageQuotaManager::initializeUsersIfNeeded): Deleted.
(WebCore::StorageQuotaManager::askUserToInitialize): Deleted.
(WebCore::StorageQuotaManager::addUser): Deleted.
(WebCore::StorageQuotaManager::shouldAskForMoreSpace const): Deleted.
(WebCore::StorageQuotaManager::removeUser): Deleted.
(WebCore::StorageQuotaManager::requestSpace): Deleted.
(WebCore::StorageQuotaManager::askForMoreSpace): Deleted.
(WebCore::StorageQuotaManager::processPendingRequests): Deleted.

  • storage/StorageQuotaManager.h:

(WebCore::StorageQuotaManager::defaultThirdPartyQuotaFromPerOriginQuota):
(WebCore::StorageQuotaManager::StorageQuotaManager): Deleted.
(WebCore::StorageQuotaManager::resetQuota): Deleted.
(WebCore::StorageQuotaManager::state const): Deleted.

  • storage/StorageQuotaUser.h: Removed.

Source/WebKit:

  • NetworkProcess/NetworkProcess.cpp: Introduce class SessionStorageQuotaManager to manage all

StorageQuotaManagers of the same session.
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::addWebsiteDataStore):
(WebKit::NetworkProcess::addSessionStorageQuotaManager):
(WebKit::NetworkProcess::removeSessionStorageQuotaManager):
(WebKit::NetworkProcess::destroySession):
(WebKit::NetworkProcess::deleteWebsiteData):
(WebKit::NetworkProcess::deleteWebsiteDataForOrigins):
(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::setSessionStorageQuotaManagerIDBRootPath):
(WebKit::NetworkProcess::updateQuotaBasedOnSpaceUsageForTesting):
(WebKit::NetworkProcess::resetQuota):
(WebKit::NetworkProcess::storageQuotaManager):
(WebKit::NetworkProcess::initializeStorageQuota): Deleted.
(WebKit::NetworkProcess::clearStorageQuota): Deleted.
(): Deleted.
(WebKit::NetworkProcess::initializeQuotaUsers): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::SessionStorageQuotaManager::SessionStorageQuotaManager):
(WebKit::NetworkProcess::SessionStorageQuotaManager::defaultQuota const):
(WebKit::NetworkProcess::SessionStorageQuotaManager::ensureOriginStorageQuotaManager):
(WebKit::NetworkProcess::SessionStorageQuotaManager::existingStorageQuotaManagers):
(WebKit::NetworkProcess::SessionStorageQuotaManager::cacheRootPath const):
(WebKit::NetworkProcess::SessionStorageQuotaManager::setIDBRootPath):
(WebKit::NetworkProcess::SessionStorageQuotaManager::idbRootPath const):
(WebKit::NetworkProcess::StorageQuotaManagers::defaultQuota const): Deleted.
(WebKit::NetworkProcess::StorageQuotaManagers::setDefaultQuotas): Deleted.
(WebKit::NetworkProcess::StorageQuotaManagers::managersPerOrigin): Deleted.

  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::getDirectorySize):
(WebKit::CacheStorage::Engine::diskUsage): static function to get the disk usage of CacheStorage given
CacheStorage root directory.
(WebKit::CacheStorage::Engine::requestSpace):
(WebKit::CacheStorage::Engine::readCachesFromDisk):
(WebKit::CacheStorage::Engine::writeSizeFile):
(WebKit::CacheStorage::Engine::readSizeFile):
(WebKit::CacheStorage::Engine::initializeQuotaUser): Deleted.

  • NetworkProcess/cache/CacheStorageEngine.h:
  • NetworkProcess/cache/CacheStorageEngineCache.cpp:

(WebKit::CacheStorage::Cache::put):
(WebKit::CacheStorage::Cache::remove):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::create):
(WebKit::CacheStorage::Caches::Caches):
(WebKit::CacheStorage::Caches::~Caches):
(WebKit::CacheStorage::Caches::updateSizeFile):
(WebKit::CacheStorage::Caches::initializeSize):
(WebKit::CacheStorage::Caches::clear):
(WebKit::CacheStorage::Caches::requestSpace):
(WebKit::CacheStorage::Caches::writeRecord):
(WebKit::CacheStorage::Caches::removeRecord):
(WebKit::CacheStorage::Caches::whenInitialized): Deleted.
(WebKit::CacheStorage::Caches::resetSpaceUsed): Deleted.

  • NetworkProcess/cache/CacheStorageEngineCaches.h:
  • Shared/WebsiteDataStoreParameters.cpp:

(WebKit::WebsiteDataStoreParameters::encode const):
(WebKit::WebsiteDataStoreParameters::decode):

  • Shared/WebsiteDataStoreParameters.h: Add a cacheStorageDirectory parameter so we know the direcotry of

CacheStorage when we start using WebsiteDataStore.

  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreResetQuota):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h: Add a C API for reseting quota in TestRunner.
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::resetQuota):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::parameters):
(WebKit::WebsiteDataStore::resetQuota):

  • UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/StorageQuotaManager.cpp: Removed as we have a different StorageQuotaManager

implementation now.

  • WebKitTestRunner/TestController.cpp: reset StorageQuotaManager's quota between tests.

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::resetQuota):

  • WebKitTestRunner/TestController.h:
9:07 PM Changeset in webkit [253024] by sbarati@apple.com
  • 2 edits in trunk/Tools

run-jsc should exit with the same signal or exit status that the jsc shell does
https://bugs.webkit.org/show_bug.cgi?id=204778

Reviewed by Keith Miller.

  • Scripts/run-jsc:
6:25 PM Changeset in webkit [253023] by Alan Coon
  • 13 edits
    2 adds in tags/Safari-609.1.11

Cherry-pick r252935. rdar://problem/45311541

Element jumps to wrong position after perspective change on ancestor
https://bugs.webkit.org/show_bug.cgi?id=202505
<rdar://problem/55930710>

Reviewed by Antti Koivisto.
Source/WebCore:

This modifies the fix in r252879 to be better-performing and to avoid a new call site for updateLayerPositions*.

Style can change in a way that creates or destroys RenderLayers, but does not result in a layout; this can happen
with changes of properties like opacity or perspective. When this happens, something needs to trigger a call to
RenderLayer::updateLayerPositions() on the root of the changed subtree. This is best done after the style update,
to avoid multiple updateLayerPositions traversals.

Implement this by storing on RenderView the rootmost changed layer, and having FrameView::styleDidChange()
call updateLayerPositionsAfterStyleChange() if we're after a style change with no pending layout.

Test: compositing/geometry/layer-position-after-removing-perspective.html

  • page/FrameView.cpp: (WebCore::FrameView::styleDidChange):
  • page/FrameView.h:
  • platform/ScrollView.h:
  • rendering/RenderElement.cpp: (WebCore::RenderElement::didAttachChild):
  • rendering/RenderLayer.cpp: (WebCore::RenderLayer::insertOnlyThisLayer): (WebCore::RenderLayer::removeOnlyThisLayer): (WebCore::findCommonAncestor): (WebCore::RenderLayer::commonAncestorWithLayer const):
  • rendering/RenderLayer.h:
  • rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::createLayer): (WebCore::RenderLayerModelObject::styleDidChange):
  • rendering/RenderView.cpp: (WebCore::RenderView::layerChildrenChangedDuringStyleChange): (WebCore::RenderView::takeStyleChangeLayerTreeMutationRoot):
  • rendering/RenderView.h:

LayoutTests:

  • compositing/geometry/layer-position-after-removing-perspective-expected.html: Added.
  • compositing/geometry/layer-position-after-removing-perspective.html: Added.
  • css3/blending/repaint/blend-mode-isolate-stacking-context-expected.txt: Rebaselined.

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

6:25 PM Changeset in webkit [253022] by Alan Coon
  • 3 edits
    2 adds in tags/Safari-609.1.11

Cherry-pick r252879. rdar://problem/45311541

[Web Animations] Layout of children of element with forwards-filling opacity animation may be incorrect after removal
https://bugs.webkit.org/show_bug.cgi?id=204602
<rdar://problem/45311541>

Reviewed by Antti Koivisto.

Source/WebCore:

Test: webanimations/child-layer-position-after-removal-of-animation-triggering-stacking-context-with-fill-forwards.html

In the case where we animate a property that affects whether an element establishes a stacking context, for instance opacity, the animation code,
specifically KeyframeEffect::apply(), forces a stacking context by setting setUsedZIndex(0) on the animated RenderStyle in case the element otherwise
has an "auto" z-index. This is required by the Web Animations specification (https://w3c.github.io/web-animations/#side-effects-section).

This means that a fill-forwards animation will still force the element to establish a stacking context after the animation is no longer "active". When
we remove such an animation, it may go from having a z-index to not having one, unless it had an explicit z-index provided through style. When this change
happens, RenderStyle::diff() will merely return "RepaintLayer" and thus will not foce a layout. However, updating the positions of child layers may be
necessary as the animation being removed may mean that there may not be a RenderLayer associated with that element's renderer anymore, and if that RenderLayer
had a position, then the position of child layers will no longer be correct.

Now, in the case where we destroy a layer in RenderLayerModelObject::styleDidChange(), we check whether the layer had a position before it is removed, and
update the position of child layers if it did.

  • rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::styleDidChange):

LayoutTests:

Add a new ref test that checks that removing a forwards-filling animation that triggers a stacking context (for instance, animating opacity)
after it has completed from an element affecting layout yields the correct layout.

  • webanimations/child-layer-position-after-removal-of-animation-triggering-stacking-context-with-fill-forwards-expected.html: Added.
  • webanimations/child-layer-position-after-removal-of-animation-triggering-stacking-context-with-fill-forwards.html: Added.

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

6:20 PM Changeset in webkit [253021] by Alan Coon
  • 1 copy in tags/Safari-609.1.11

Tag Safari-609.1.11.

6:06 PM Changeset in webkit [253020] by Fujii Hironori
  • 4 edits in trunk

[MSVC] Add /experimental:newLambdaProcessor switch for better C++ conformance
https://bugs.webkit.org/show_bug.cgi?id=204443

Reviewed by Alex Christensen.

.:

MSVC has a bug of lambda capture of 'this'. It has caused
compilation errors repeatedly.

  • Source/cmake/OptionsMSVC.cmake: Added /experimental:newLambdaProcessor switch.

Source/WebCore:

  • dom/DocumentStorageAccess.cpp:

(WebCore::DocumentStorageAccess::requestStorageAccess): Reverted MSVC workaround of r252726.

5:47 PM Changeset in webkit [253019] by ysuzuki@apple.com
  • 59 edits in trunk/Source/JavaScriptCore

[JSC] Put some destructible objects to IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204771

Reviewed by Mark Lam.

This patch puts DateInstance, ErrorInstance, and Intl objects in IsoSubspace.
By using specific IsoHeapCellType, we can use JSNonFinalObject as base-classes of
them instead of using JSDestructibleObject. We also introduce STATIC_ASSERT_ISO_SUBSPACE_SHARABLE
to ensure that derived class of some IsoSubspace'ed one is intentional and safe.

  • runtime/ArrayConstructor.h:
  • runtime/AsyncFunctionConstructor.h:
  • runtime/AsyncGeneratorFunctionConstructor.h:
  • runtime/BigIntConstructor.h:
  • runtime/BooleanConstructor.h:
  • runtime/DateConstructor.h:
  • runtime/DateInstance.cpp:

(JSC::DateInstance::destroy): Deleted.

  • runtime/DateInstance.h:
  • runtime/ErrorConstructor.h:
  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::destroy): Deleted.

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::destroy):
(JSC::ErrorInstance::subspaceFor):

  • runtime/FunctionConstructor.h:
  • runtime/FunctionPrototype.h:
  • runtime/GeneratorFunctionConstructor.h:
  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::IntlCollator):
(JSC::IntlCollator::destroy): Deleted.

  • runtime/IntlCollator.h:
  • runtime/IntlCollatorConstructor.h:
  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::IntlDateTimeFormat):
(JSC::IntlDateTimeFormat::destroy): Deleted.

  • runtime/IntlDateTimeFormat.h:
  • runtime/IntlDateTimeFormatConstructor.h:
  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::IntlNumberFormat):
(JSC::IntlNumberFormat::destroy): Deleted.

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.h:
  • runtime/IntlPluralRules.cpp:

(JSC::IntlPluralRules::IntlPluralRules):
(JSC::IntlPluralRules::destroy): Deleted.

  • runtime/IntlPluralRules.h:
  • runtime/IntlPluralRulesConstructor.h:
  • runtime/JSArrayBufferConstructor.h:
  • runtime/JSCell.h:
  • runtime/JSObject.h:
  • runtime/JSTypedArrayConstructors.h:
  • runtime/JSTypedArrayViewConstructor.h:
  • runtime/MapConstructor.h:
  • runtime/NativeErrorConstructor.h:
  • runtime/NullGetterFunction.h:
  • runtime/NullSetterFunction.h:
  • runtime/NumberConstructor.h:
  • runtime/ObjectConstructor.h:
  • runtime/ProxyConstructor.h:
  • runtime/RegExpConstructor.h:
  • runtime/SetConstructor.h:
  • runtime/StringConstructor.h:
  • runtime/SymbolConstructor.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WeakMapConstructor.h:
  • runtime/WeakObjectRefConstructor.h:
  • runtime/WeakSetConstructor.h:
  • tools/JSDollarVM.cpp:
  • wasm/js/JSWebAssemblyCompileError.h:
  • wasm/js/JSWebAssemblyLinkError.h:
  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/WebAssemblyCompileErrorConstructor.h:
  • wasm/js/WebAssemblyInstanceConstructor.h:
  • wasm/js/WebAssemblyLinkErrorConstructor.h:
  • wasm/js/WebAssemblyMemoryConstructor.h:
  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyRuntimeErrorConstructor.h:
  • wasm/js/WebAssemblyTableConstructor.h:
5:46 PM Changeset in webkit [253018] by Nikita Vasilyev
  • 11 edits in trunk

Web Inspector: Provide UI to convert between sRGB and p3 color spaces
https://bugs.webkit.org/show_bug.cgi?id=203534
<rdar://problem/56688523>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

Add context menus:

  • "Convert to sRGB" and "Clamp to sRGB" for p3 colors, such as color(display-p3 0 1 0).
  • "Convert to Display-P3" for sRGB colors, such as rgb(0, 255, 0).

Shift-clicking the color swatch of sRGB colors now goes through the color function syntax as well.
Shift-clicking the color swatch of Display-P3 colors converts the color to sRGB when it can be lossless.
When the convertion cannot be lossless, Web Inspector beeps.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Utilities.js:
  • UserInterface/Models/Color.js:

(WI.Color):
Introduce _normalizedRGB property, which stores rgb values from 0 to 1.
Previously, _rgba stored values from 0 to 1 for color function format, and from 0 to 255 otherwise.
That required format checks before every rgb value access and resulted in silent errors when
the values were in the wrong format.

Store alpha as a separate property to simplify format conversion. Previously, alpha was duplicated between _rgba and _hsla.

(WI.Color.displayP3toSRGB):
(WI.Color.srgbToDisplayP3): Added.
(WI.Color.prototype.nextFormat):
(WI.Color.prototype.get rgb):
(WI.Color.prototype.get hsl):
(WI.Color.prototype.get normalizedRGB):
(WI.Color.prototype.get rgba):
(WI.Color.prototype.get hsla):
(WI.Color.prototype.get normalizedRGBA):
(WI.Color.prototype.get gamut):
(WI.Color.prototype.set gamut):
(WI.Color.prototype.copy):
(WI.Color.prototype.isKeyword):
(WI.Color.prototype.isOutsideSRGB): Added.
(WI.Color.prototype.canBeSerializedAsShortHEX):
(WI.Color.prototype._toKeywordString):
(WI.Color.prototype._toShortHEXString):
(WI.Color.prototype._toHEXString):
(WI.Color.prototype._toShortHEXAlphaString):
(WI.Color.prototype._toHEXAlphaString):
(WI.Color.prototype._toRGBString):
(WI.Color.prototype._toRGBAString):
(WI.Color.prototype._toFunctionString):
Limit the values to 4 decimals.

(WI.Color.prototype._toHSLString):
(WI.Color.prototype._toHSLAString):
(WI.Color.prototype._hslToRGB):

  • UserInterface/Views/ColorPicker.js:

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

  • UserInterface/Views/ColorSquare.css:

(.color-square > .svg-root):
(.color-square > .svg-root > .srgb-edge):
(.color-square > .srgb-label):
(.color-square > .srgb-label:hover):
(.color-square > .srgb-label:hover + .svg-root > .srgb-edge):
(@media (-webkit-device-pixel-ratio: 1)):
(.color-square > .srgb-edge):

  • UserInterface/Views/ColorSquare.js:

(WI.ColorSquare.prototype.set tintedColor):
(WI.ColorSquare.prototype._drawSRGBOutline):
(WI.ColorSquare):

  • UserInterface/Views/InlineSwatch.js:

(WI.InlineSwatch):
(WI.InlineSwatch.prototype._updateSwatch):
(WI.InlineSwatch.prototype._allowShiftClickColor): Added.
(WI.InlineSwatch.prototype._handleContextMenuEvent):

LayoutTests:

  • inspector/model/color-expected.txt:
  • inspector/model/color.html:
4:38 PM Changeset in webkit [253017] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk

Crash when animating an enum attribute for multiple instances of an SVG element
https://bugs.webkit.org/show_bug.cgi?id=204766

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-12-02
Reviewed by Simon Fraser.

Source/WebCore:

Test: svg/animations/animated-enum-lengthAdjust-instances.svg

All instances of SVG animated properties have to share a single animVal
such that once its value is progressed, all the instances will see the
change. This was not happening for SVGAnimatedDecoratedProperty. To do
that we need to:

-- Make SVGDecoratedProperty be RefCounted.
-- Change the type of SVGAnimatedDecoratedProperty::m_baseVal to

Ref<SVGDecoratedProperty<DecorationType>>.

-- Change the type of SVGAnimatedDecoratedProperty::m_animVal to

RefPtr<SVGDecoratedProperty<DecorationType>>. The master property
creates it and all the instances hold references to the same pointer.

-- Override the virtual methods instanceStartAnimation() and

instanceStopAnimation() of SVGAnimatedDecoratedProperty.

  • svg/properties/SVGAnimatedDecoratedProperty.h:

(WebCore::SVGAnimatedDecoratedProperty::create):
(WebCore::SVGAnimatedDecoratedProperty::SVGAnimatedDecoratedProperty):
(WebCore::SVGAnimatedDecoratedProperty::animVal const):
(WebCore::SVGAnimatedDecoratedProperty::currentValue const):

  • svg/properties/SVGDecoratedEnumeration.h:

(WebCore::SVGDecoratedEnumeration::create):

  • svg/properties/SVGDecoratedProperty.h:

LayoutTests:

  • svg/animations/animated-enum-lengthAdjust-instances-expected.txt: Added.
  • svg/animations/animated-enum-lengthAdjust-instances.svg: Added.
4:33 PM Changeset in webkit [253016] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Fix the macCatalyst build.

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayer::drawLayerContents):

4:20 PM Changeset in webkit [253015] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Only check each use...FuzzerAgent() option in VM constructor if any of the options are enabled.
https://bugs.webkit.org/show_bug.cgi?id=204763

Reviewed by Keith Miller.

We know that we'll never use fuzzer agents in deployment. Hence, we shouldn't
spend time checking for them in the normal use case. This probably doesn't matter
much for Web processes, but for clients of JSC that repeatedly spawn and kill VMs,
it might matter more. We might want to eventually widen this idiom to include
other debugging / development options, but for now, I'm only covering the fuzzer
agent options.

  • runtime/Options.cpp:

(JSC::computeIfUsingFuzzerAgent):
(JSC::Options::initialize):

  • runtime/Options.h:

(JSC::Options::isUsingFuzzerAgent):

  • runtime/OptionsList.h:

(JSC::OptionRange::operator bool const):

  • runtime/VM.cpp:

(JSC::VM::VM):

3:21 PM Changeset in webkit [253014] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

Revert - [EWS] Do not retry layout-tests build if the flaky test failures are also present in clean tree run
https://bugs.webkit.org/show_bug.cgi?id=204704

Reverting this, a more generic fix for handling flakiness would be made in Bug 204769.

3:03 PM Changeset in webkit [253013] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC] Fix ASSERT while running fast/block/block-parent-with-zero-width-child.html
https://bugs.webkit.org/show_bug.cgi?id=204768

Reviewed by Antti Koivisto.

  1. FormattingState::displayInlineContent() returns nullptr in case of empty inline content.
  2. Typo in InlineItemRun::moveHorizontally
  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):

3:02 PM Changeset in webkit [253012] by Ross Kirsling
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Unreviewed WinCairo build fix following r252989.

  • include/CMakeLists.txt:
3:00 PM Changeset in webkit [253011] by pvollan@apple.com
  • 7 edits in trunk/Source/WebKit

[iOS] Create sandbox extension for "com.apple.tccd"
https://bugs.webkit.org/show_bug.cgi?id=204367
<rdar://problem/57330176>

Reviewed by Eric Carlson.

When camera or microphone access has been granted by the user, have the UI process create a sandbox extension
for "com.apple.tccd", and send it to the WebContent process. Also make sure the extension is created only once
for each WebContent process. Add telemetry to the tccd rule in the sandbox.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::userMediaAccessWasGranted):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
2:45 PM Changeset in webkit [253010] by Tadeu Zagallo
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Remove BytecodeCacheVersion.h
https://bugs.webkit.org/show_bug.cgi?id=204760

Reviewed by Mark Lam.

Having that as a phony make target causes a lot of unnecessary rebuilds. That was a workaround
the fact that we only need a new cache version when we rebuild CachedTypes.cpp, but there was
no straightforward way to get the current timestamp as an integer at that point. Instead, we now
just use a constexpr function that hashes TIMESTAMP.

  • CMakeLists.txt:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • runtime/CachedTypes.cpp:

(JSC::jscBytecodeCacheVersion):
(JSC::GenericCacheEntry::isUpToDate const):

2:30 PM Changeset in webkit [253009] by commit-queue@webkit.org
  • 7 edits in trunk

Add helper methods for description and equality to text manipulation SPI
https://bugs.webkit.org/show_bug.cgi?id=204758
<rdar://problem/57438200>

Patch by Louie Livon-Bemel <Louie Livon-Bemel> on 2019-12-02
Reviewed by Wenson Hsieh.

Source/WebKit:

I originally added some category methods to _WKTextManipulationItem and _WKTextManipulationToken within Safari
to make working with these classes easier. However it makes more sense to just move these methods into
the main class. One method is for checking if two instances are equal (including identifiers) and optionally
checking if the content itself is equal. The other methods are for debug descriptions for lldb, and a
method to get a description that preserves privacy; when logging the instance, the content of the webpage
should be redacted.

Tests: Tests are added as API tests.

  • UIProcess/API/Cocoa/_WKTextManipulationItem.h:
    • Assume everything is non-null unless otherwise specified.
    • Allow the identifier to be nil, but not the array of tokens.
    • Add a method to check the equality to another item, optionally including a check for the content of each token being equal.
    • Add a -debugDescription method that includes the content of tokens for use in lldb. This NSObject declaration is marked optional, so redeclare it here.
    • No need to add a -description declaration since it exists on NSObject already.
  • UIProcess/API/Cocoa/_WKTextManipulationItem.mm:

(-[_WKTextManipulationItem isEqual:]):

The standard NSObject equality check should call our method with equal content.

(-[_WKTextManipulationItem isEqualToTextManipulationItem:includingContentEquality:]):

  • If the other item is nil, the identifiers aren't equal or the number of tokens are mismatched, these items aren't equal.
  • Just to be safe, only iterate the smaller of the token arrays so we don't crash.
  • Check if each token is equal, passing along the includingContentEquality parameter.

(-[_WKTextManipulationItem description]):

The general description should not include the webpage content.

(-[_WKTextManipulationItem debugDescription]):

Include the webpage content, since this is for lldb.

(-[_WKTextManipulationItem _descriptionPreservingPrivacy:]):

Include the standard description format, and each token on its own line. If we're including the content
then use token.debugDescription.

  • UIProcess/API/Cocoa/_WKTextManipulationToken.h:
    • Also assume everything is non-null.
    • Identifier and Content can be nil.
    • Declare a -debugDescription method.
    • Declare a method to check equality, with or without the content.
  • UIProcess/API/Cocoa/_WKTextManipulationToken.mm:

(isEqualOrBothNil):

Helper that checks equality but considers two nil values to be equal as well.

(-[_WKTextManipulationToken isEqual:]):

The standard NSObject equality check should call our method with equal content.

(-[_WKTextManipulationToken isEqualToTextManipulationToken:includingContentEquality:]):

Check that the exclusions are equal, the identifiers are equal (considering two nils to be equal), and the
content if necessary.

(-[_WKTextManipulationToken description]):
(-[_WKTextManipulationToken debugDescription]):
(-[_WKTextManipulationToken _descriptionPreservingPrivacy:]):

If we're preserving privacy, log the content length rather than the content string itself.

Tools:

Add tests for the new methods. Most are equality tests for various situations, and are moved over from the
Safari unit tests I had for the category methods that had the same purpose.

  • TestWebKitAPI/Tests/WebKitCocoa/TextManipulation.mm:

(TestWebKitAPI::TEST):

  • Add test to make sure the content isn't included in the regular -description, but the identifier is. And That -debugDescription does include the contents.
  • Add many tests equality for various situations, testing both with and without content equality.

(TestWebKitAPI::createTextManipulationToken):

Add a helper for creating a token in one line.

2:16 PM Changeset in webkit [253008] by mark.lam@apple.com
  • 4 edits in trunk

mozilla-tests.yaml/js1_5/Array/regress-101964.js is frequently failing on JSC EWS bots.
https://bugs.webkit.org/show_bug.cgi?id=200789
<rdar://problem/54361916>

Reviewed by Keith Miller.

JSTests:

The prevailing theory is that this test is being pre-empted and not getting the
CPU time it needs to complete. As a result, the wall clock time period for
running the test exceeds the expected time. This patch tests this theory by
changing the time measurement to use CPU time instead.

  • mozilla/js1_5/Array/regress-101964.js:

Source/JavaScriptCore:

  • tools/JSDollarVM.cpp:

(JSC::functionCurrentCPUTime):
(JSC::JSDollarVM::finishCreation):

1:51 PM Changeset in webkit [253007] by ysuzuki@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

[JSC] Put JSGenerator, JSAsyncGenerator, and JSPromise in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=204764

Reviewed by Mark Lam.

Put more things in IsoSubspace. They are defined by using JSInternalObjectImpl mechanism.

  • JSGenerator
  • JSAsyncGenerator
  • JSPromise
  • runtime/JSAsyncGenerator.h:
  • runtime/JSGenerator.h:
  • runtime/JSPromise.h:

(JSC::JSPromise::subspaceFor):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
12:32 PM Changeset in webkit [253006] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Document::setWindowAttributeEventListener should check m_domWindow::frame()
https://bugs.webkit.org/show_bug.cgi?id=204759
<rdar://problem/50098787>

Reviewed by Mark Lam.

JSLazyEventListener::create assumes that m_domWindow::frame() exists.
But this check was removed at r196888 accidentally.
This patch adds this check back to fix the crash.

  • dom/Document.cpp:

(WebCore::Document::setWindowAttributeEventListener):

12:21 PM Changeset in webkit [253005] by Wenson Hsieh
  • 5 edits
    2 adds in trunk/Source/WebKit

[iOS] Introduce a gesture recognizer that can be used to defer recognition of other gestures
https://bugs.webkit.org/show_bug.cgi?id=204748
<rdar://problem/38670692>

Reviewed by Tim Horton.

Introduces WKDeferringGestureRecognizer, which is similar to UIKit's _UIRelationshipGestureRecognizer. In a
future patch, this will be added to WKContentView to prevent platform gestures (pinching, panning, single/double
taps, etc.) from recognizing when dispatching a preventable touch event to the page.

Additionally renames a member variable on WKContentView, in preparation for making touch gesture recognition
asynchronous. No new tests, since there is no change in behavior yet.

  • SourcesCocoa.txt:

Add the new file.

  • UIProcess/ios/WKContentViewInteraction.h:

Add a couple of (currently unused) deferring gesture recognizers. These will be added to WKContentView in a
future patch. There are two deferring gestures here (one for "immediately resettable" gestures and another for
gestures for which the reset is "deferred" -- i.e., multi-tap gestures); this prevents a single deferring
gesture from connecting the entire gesture subgraph under WKWebView through failure dependencies. This would
result in various usability issues, such as being unable to perform a pan gesture to scroll WKScrollView if a
tap was recognized within the last 300 ms, since all gestures would need to wait until every double and triple-
tap gesture under WKWebView has failed.

  • UIProcess/ios/WKContentViewInteraction.mm:

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

Rename _canSendTouchEventsAsynchronously to _touchEventsCanPreventNativeGestures in preparation for adding a
codepath for fully asynchronous touch event dispatch; we also flip the conditional in any places where
_canSendTouchEventsAsynchronously was previously set or read.

(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView scrollViewWillStartPanOrPinchGesture]):
(-[WKContentView gestureRecognizer:shouldIgnoreWebTouchWithEvent:]):
(-[WKContentView gestureRecognizer:isInterruptingMomentumScrollingWithEvent:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferGesturesWithEvent:]):
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Implement WKDeferringGestureRecognizerDelegate.

(-[WKContentView shouldIgnoreWebTouch]): Deleted.

Drive-by fix: remove this unnecessary method implementation, and the related FIXME.

  • UIProcess/ios/WKDeferringGestureRecognizer.h: Added.
  • UIProcess/ios/WKDeferringGestureRecognizer.mm: Added.

(-[WKDeferringGestureRecognizer initWithDeferringGestureDelegate:]):
(-[WKDeferringGestureRecognizer deferringGestureDelegate]):
(-[WKDeferringGestureRecognizer touchesBegan:withEvent:]):

Unless the touch is interrupts momentum scrolling, WKDeferringGestureRecognizer should transition to Possible
state when starting a touch. Later, -setDefaultPrevented: is invoked, which will either transition the deferring
gesture recognizer to Failed state (thereby allowing native gestures to begin), or Ended state (preventing other
native gestures).

(-[WKDeferringGestureRecognizer touchesCancelled:withEvent:]):
(-[WKDeferringGestureRecognizer setDefaultPrevented:]):
(-[WKDeferringGestureRecognizer canBePreventedByGestureRecognizer:]):

Return NO here to prevent certain platform gestures (e.g. scroll view panning) from causing the deferring
gesture to Failed state, when these gestures attempt to transition from Possible to Began state.

(-[WKDeferringGestureRecognizer shouldDeferGestureRecognizer:]):

  • WebKit.xcodeproj/project.pbxproj:
12:16 PM Changeset in webkit [253004] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Adjust trailing runs horizontally while trimming content
https://bugs.webkit.org/show_bug.cgi?id=204749
<rdar://problem/57559163>

Reviewed by Antti Koivisto.

When trailing content is getting trimmed, we also need to adjust subsequent trailing runs e.g. <span> </span> <- the [container end]'s run should be adjusted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendTextContent): there's nothing to trim when the spacing is zero or negative.

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::moveHorizontally):

12:10 PM Changeset in webkit [253003] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] LineBuilder::InlineItemRun objects don't have vertical geometry
https://bugs.webkit.org/show_bug.cgi?id=204752
<rdar://problem/57560643>

Reviewed by Antti Koivisto.

Height and vertical position are computed when the InlineItemRun objects are merged and transformed into LineBuilder::Run objects.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::ContinousContent::append):
(WebCore::Layout::LineBuilder::ContinousContent::close):
(WebCore::Layout::LineBuilder::Run::Run):
(WebCore::Layout::LineBuilder::appendNonBreakableSpace):
(WebCore::Layout::LineBuilder::appendInlineContainerStart):
(WebCore::Layout::LineBuilder::appendInlineContainerEnd):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::appendNonReplacedInlineBox):
(WebCore::Layout::LineBuilder::appendLineBreak):
(WebCore::Layout::LineBuilder::isVisuallyNonEmpty const):
(WebCore::Layout::LineBuilder::InlineItemRun::InlineItemRun):
(WebCore::Layout::LineBuilder::InlineItemRun::setCollapsesToZeroAdvanceWidth):
(WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::logicalLeft const):
(WebCore::Layout::LineBuilder::InlineItemRun::logicalWidth const):
(WebCore::Layout::LineBuilder::InlineItemRun::logicalRect const): Deleted.

12:03 PM Changeset in webkit [253002] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Remove the confusing Value struct used for calc results
https://bugs.webkit.org/show_bug.cgi?id=204751

Reviewed by Tim Horton.

Replace the Value* argument with a RefPtr<CSSCalcExpressionNode>&. Value just made things more
confusing.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
(WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
(WebCore::CSSCalcExpressionNodeParser::parseValueExpression):

11:52 AM Changeset in webkit [253001] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] TrimmableContent only needs to keep track of the first trimmable run index
https://bugs.webkit.org/show_bug.cgi?id=204747
<rdar://problem/57557732>

Reviewed by Antti Koivisto.

Every run after the first trimmable run should either also be trimmable (more whitespace) or skippable (</span>).

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::TrimmableContent::append):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::TrimmableContent::firstRunIndex):
(WebCore::Layout::LineBuilder::TrimmableContent::isEmpty const):
(WebCore::Layout::LineBuilder::TrimmableContent::clear):
(WebCore::Layout::LineBuilder::TrimmableContent::runIndexes): Deleted.

11:22 AM Changeset in webkit [253000] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Console: the saved result value is still shown after page reload
https://bugs.webkit.org/show_bug.cgi?id=204532

Reviewed by Brian Burg.

Add additional plumbing to remove any .console-saved-variable elements whenever a new
session is created, as well as reset the base of the property path to this.

  • UserInterface/Views/LogContentView.js:

(WI.LogContentView.prototype._sessionStarted):
(WI.LogContentView.prototype._logCleared):

  • UserInterface/Views/ConsoleMessageView.js:

(WI.ConsoleMessageView.prototype.clearSavedVariableState): Added.
(WI.ConsoleMessageView.prototype.removeEventListeners): Deleted.

  • UserInterface/Views/ObjectTreeView.js:

(WI.ObjectTreeView.prototype.resetPropertyPath): Added.

11:22 AM Changeset in webkit [252999] by Alan Coon
  • 7 edits in branches/safari-608-branch/Source

Versioning.

10:56 AM Changeset in webkit [252998] by commit-queue@webkit.org
  • 9 edits in trunk

Incorrect association of the URL object with the value port
https://bugs.webkit.org/show_bug.cgi?id=204414

Patch by Alex Christensen <achristensen@webkit.org> on 2019-12-02
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

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

Source/WebCore:

Setting a port should clear the port if it's not a numerical value.
We now match the behavior of Chrome, Firefox, and the URL specification.
Covered by a newly passing WPT!

  • html/URLUtils.h:

(WebCore::URLUtils<T>::setPort):

LayoutTests:

  • fast/dom/DOMURL/set-href-attribute-port-expected.txt:
  • fast/dom/DOMURL/set-href-attribute-port.html:
  • fast/dom/HTMLAnchorElement/set-href-attribute-port-expected.txt:
  • fast/dom/HTMLAnchorElement/set-href-attribute-port.html:
10:49 AM Changeset in webkit [252997] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.0.3/Source

Versioning.

10:48 AM Changeset in webkit [252996] by Alan Coon
  • 7 edits in tags/Safari-609.1.10.3/Source

Versioning.

10:47 AM Changeset in webkit [252995] by Alan Coon
  • 1 copy in tags/Safari-609.1.10.0.3

New tag.

10:37 AM Changeset in webkit [252994] by dino@apple.com
  • 2 edits in trunk/Source/ThirdParty/ANGLE

Clean up ANGLE header post-process script
https://bugs.webkit.org/show_bug.cgi?id=204711

Reviewed by Tim Horton.

Since sed on macOS requires the in-place argument to have a zero-length string
to avoid making backups, this script was attempting to pass . However, this was
being evaluated, creating a bunch of files with \'\' suffixes. Fix this by using
an array when expanding the arguments.

Also fix a typo where the character "3" was being printed.

Lastly, only print out the basename of the header file being converted.

  • adjust-angle-include-paths.sh:
10:36 AM Changeset in webkit [252993] by Alan Coon
  • 1 copy in tags/Safari-609.1.10.3

New tag.

10:36 AM Changeset in webkit [252992] by dino@apple.com
  • 18 edits
    2 adds in trunk/Source

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

Reviewed by Tim Horton.

Source/ThirdParty/ANGLE:

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

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

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

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

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

product a dylib product.

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

sure they will be visible in the exported library.

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

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

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

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

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

Source/WebCore:

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

  • Configurations/WebCore.xcconfig:
  • Configurations/WebCoreTestSupport.xcconfig:
  • platform/graphics/ANGLEWebKitBridge.cpp: Early returns if the library was not loaded.

(WebCore::ANGLEWebKitBridge::ANGLEWebKitBridge):
(WebCore::ANGLEWebKitBridge::cleanupCompilers):
(WebCore::ANGLEWebKitBridge::compileShaderSource):
(WebCore::ANGLEWebKitBridge::angleAvailable): Static method to detect
if the library was loaded.

  • platform/graphics/ANGLEWebKitBridge.h:
  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm: Early return if ANGLE was not

loaded.
(WebCore::GraphicsContext3D::GraphicsContext3D):

10:32 AM Changeset in webkit [252991] by dbates@webkit.org
  • 2 edits in trunk/Tools

REGRESSION (r195080): prepare-ChangeLog does not emit function list for file paths that contain a space
https://bugs.webkit.org/show_bug.cgi?id=204236

Reviewed by Brian Burg.

Revert the filename escape logic added in <http://trac.webkit.org/changeset/195080> as it broke
function list generation in file paths that contain space characters. Function list generation
broke because the escaping was performed after line range dictionaries were built up keyed off
the unescaped file path. Subsequent code would try to query these dictionaries to build up the
changed function list using the escaped file path and never a match. The escaping logic was not
necessary to fix the originally reported bug. All that was needed was to use the three-argument
open() call that took a mode. So, remove the escape logic.

  • Scripts/prepare-ChangeLog:

(actuallyGenerateFunctionLists):

10:26 AM Changeset in webkit [252990] by Truitt Savell
  • 3 edits in trunk/LayoutTests

Update expectations for two tests after https://trac.webkit.org/changeset/252363/webkit
https://bugs.webkit.org/show_bug.cgi?id=204756
https://bugs.webkit.org/show_bug.cgi?id=204757

Unreviewed test gardening.

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
10:25 AM Changeset in webkit [252989] by achristensen@apple.com
  • 402 edits
    136 adds
    7 deletes in trunk/Source/ThirdParty/ANGLE

Update ANGLE
https://bugs.webkit.org/show_bug.cgi?id=204595

Patch by James Darpinian <James Darpinian> on 2019-12-02
Reviewed by Alex Christensen.

  • ANGLE.plist: Updated commit hash.
  • ANGLE.xcodeproj/project.pbxproj: Changes mirroring gn changes upstream.
  • Compiler.cmake: Changes mirroring gn changes upstream.
  • GLESv2.cmake: Changes mirroring gn changes upstream.
  • CMakeLists.txt: Changes mirroring gn changes upstream.
  • Many other files added/removed/changed from upstream.
9:42 AM Changeset in webkit [252988] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy

[AppleWin] WebKitQuartzCoreAdditions.dll isn't compiled since r248444
https://bugs.webkit.org/show_bug.cgi?id=204695

Reviewed by Alex Christensen.

  • CMakeLists.txt: Replaced APPLE with USE_CA in the condition of

building WebKitQuartzCoreAdditions.

9:26 AM Changeset in webkit [252987] by youenn@apple.com
  • 9 edits in trunk/Source/WebCore

Simplify RealtimeOutgoingAudioSource and RealtimeOutgoingVideooSource observeSource/unobserveSource pattern
https://bugs.webkit.org/show_bug.cgi?id=204570

Reviewed by Eric Carlson.

Previously, the outgoing source was observing/unobserving its track if sinks were added/removed.
We made LibWebRTCRTCRtpSenderBackend stopping the observing in its destructor.
This makes things complex and we are not always unobserving fast enough for all outgoing sources.

To make it simpler, the outgoing source is no longer handling the observing/unobserving of its track.
Instead, its LibWebRTCRtpSenderBackend is handling it directly.
Observing starts when LibWebRTCRtpSenderBackend gets the track and unobserving happens either on LibWebRTCRtpSenderBackend destruction
or when the LibWebRTCRtpSenderBackend is no longer interested in the track.
This is slight less optimal as we might observe the track even if the source has no sink but this should not happen often in practice.

Removed some unneeded methods.

Covered by existing tests no longer failing a debug ASSERTION.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::LibWebRTCRtpSenderBackend):
(WebCore::LibWebRTCRtpSenderBackend::~LibWebRTCRtpSenderBackend):
(WebCore::LibWebRTCRtpSenderBackend::startSource):
(WebCore::LibWebRTCRtpSenderBackend::stopSource):
(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):
(WebCore::LibWebRTCRtpSenderBackend::audioSource):
(WebCore::LibWebRTCRtpSenderBackend::videoSource):
(WebCore::LibWebRTCRtpSenderBackend::hasSource const):
(WebCore::LibWebRTCRtpSenderBackend::setSource):
(WebCore::LibWebRTCRtpSenderBackend::takeSource):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • platform/mediastream/RealtimeOutgoingAudioSource.cpp:

(WebCore::RealtimeOutgoingAudioSource::~RealtimeOutgoingAudioSource):
(WebCore::RealtimeOutgoingAudioSource::observeSource):
(WebCore::RealtimeOutgoingAudioSource::setSource):
(WebCore::RealtimeOutgoingAudioSource::AddSink):
(WebCore::RealtimeOutgoingAudioSource::RemoveSink):

  • platform/mediastream/RealtimeOutgoingAudioSource.h:

(WebCore::RealtimeOutgoingAudioSource::start):

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:

(WebCore::RealtimeOutgoingVideoSource::~RealtimeOutgoingVideoSource):
(WebCore::RealtimeOutgoingVideoSource::observeSource):
(WebCore::RealtimeOutgoingVideoSource::setSource):
(WebCore::RealtimeOutgoingVideoSource::AddOrUpdateSink):
(WebCore::RealtimeOutgoingVideoSource::RemoveSink):

  • platform/mediastream/RealtimeOutgoingVideoSource.h:

(WebCore::RealtimeOutgoingVideoSource::start):

  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:

(WebCore::RealtimeOutgoingAudioSourceCocoa::~RealtimeOutgoingAudioSourceCocoa): Deleted.

9:25 AM Changeset in webkit [252986] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

SWServer::scriptFetchFinished does not need a Connection as parameter
https://bugs.webkit.org/show_bug.cgi?id=204641

Reviewed by Chris Dumez.

No change of behavior, removing an unused parameter.

  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::finishFetchingScriptInServer):
(WebCore::SWServer::startScriptFetch):
(WebCore::SWServer::didResolveRegistrationPromise):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerJobQueue.cpp:

(WebCore::SWServerJobQueue::scriptFetchFinished):

  • workers/service/server/SWServerJobQueue.h:
9:10 AM Changeset in webkit [252985] by youenn@apple.com
  • 4 edits
    4 adds in trunk

Service Worker should correctly set its document first party for cookies URL
https://bugs.webkit.org/show_bug.cgi?id=204742

Reviewed by Chris Dumez.

Source/WebCore:

Test: http/wpt/service-workers/third-party-cookie.html

  • workers/service/context/ServiceWorkerThreadProxy.cpp:

(WebCore::createPageForServiceWorker):
Set document first party cookie for URL to the top origin.

LayoutTests:

  • http/wpt/service-workers/resources/set-cookie.py: Added.
  • http/wpt/service-workers/resources/third-party-cookie-iframe.html: Added.
  • http/wpt/service-workers/resources/third-party-worker.js:
  • http/wpt/service-workers/third-party-cookie-expected.txt: Added.
  • http/wpt/service-workers/third-party-cookie.html: Added.
8:54 AM Changeset in webkit [252984] by yoshiaki.jitsukawa@sony.com
  • 2 edits in trunk/Source/WebKit

ResponsivenessTimer mistakenly restarts immediately
https://bugs.webkit.org/show_bug.cgi?id=204659

Reviewed by Chris Dumez.

  • UIProcess/ResponsivenessTimer.cpp:

(WebKit::ResponsivenessTimer::timerFired):
Give startOneShot() a positive number timeout.

8:32 AM Changeset in webkit [252983] by Simon Fraser
  • 28 edits in trunk

Don't do range checking for calc() at parse time
https://bugs.webkit.org/show_bug.cgi?id=204737

Reviewed by Antti Koivisto.
LayoutTests/imported/w3c:

  • web-platform-tests/css/css-text-decor/parsing/text-shadow-computed-expected.txt:
  • web-platform-tests/css/css-values/calc-numbers-expected.txt:
  • web-platform-tests/css/css-values/getComputedStyle-border-radius-001-expected.txt:
  • web-platform-tests/css/css-values/getComputedStyle-border-radius-003-expected.txt:
  • web-platform-tests/css/css-values/minmax-number-serialize-expected.txt:

Source/WebCore:

As specified in https://drafts.csswg.org/css-values-4/#calc-range, we should not do range checking for calc
at parse time; the specified value can be a calc which results in a negative values; values are clamped
at used value time (i.e. when building RenderStyle).

So CSSCalculationValue doesn't need to have isInt(), isPositive(), isNegative(), and CSSCalcExpressionNode
doesn't have to keep track of whether its value is an integer.

Also do some cleanup of CSSPrimitiveValue, using categories to answer more isFoo type questions, and adding
isZero(), isPositive() and isNegative() that return Optional<bool> for cases where parse-time range checking
occurs.

Tested by existing tests.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcOperationNode::createSimplified):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::createBlendHalf):
(WebCore::createCSS):
(WebCore::CSSCalcValue::isCalcFunction):
(WebCore::isIntegerResult): Deleted.

  • css/CSSCalculationValue.h:

(WebCore::CSSCalcExpressionNode::equals const):
(WebCore::CSSCalcExpressionNode::category const):
(WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
(WebCore::CSSCalcExpressionNode::isInteger const): Deleted.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::zoomAdjustedPixelValueForLength):
(WebCore::percentageOrZoomAdjustedValue):
(WebCore::autoOrZoomAdjustedValue):

  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor): I missed the Q unit here when I added it.
(WebCore::CSSPrimitiveValue::isZero const):
(WebCore::CSSPrimitiveValue::isPositive const):
(WebCore::CSSPrimitiveValue::isNegative const):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory): Deleted.

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isAngle const): Deleted.

  • css/CSSUnits.cpp:

(WebCore::unitCategory):
(WebCore::canonicalUnitTypeForCategory):
(WebCore::canonicalUnitType):

  • css/CSSUnits.h:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeColumnWidth):
(WebCore::consumePerspective):
(WebCore::consumeWebkitAspectRatio):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::CalcParser):
(WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
(WebCore::CSSPropertyParserHelpers::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeSingleShadow): This parsing is a little tricky. The blur radius value is optional,
but we need to distinguish between failing to parse it, and its value being negative, so an explicit check for calc is the easiest way
to handlel that.
(WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw): Deleted. It was unused.
(WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw): Deleted.

  • css/parser/CSSPropertyParserHelpers.h:

LayoutTests:

Update tests that assumed calc range-checked at parse time.

  • fast/css/column-width-calculated-value-expected.txt:
  • fast/css/column-width-calculated-value.html:
  • fast/css/flex-shrink-calculated-value-expected.txt:
  • fast/css/flex-shrink-calculated-value.html:
  • fast/css/negative-calc-values-expected.txt:
  • fast/css/negative-calc-values.html:
  • fast/css/text-shadow-calc-value-expected.txt:
  • fast/css/text-shadow-calc-value.html:
  • fast/shapes/parsing/parsing-shape-image-threshold-expected.txt:
  • fast/shapes/parsing/parsing-shape-image-threshold.html:
7:36 AM Changeset in webkit [252982] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK] Fix some warnings
https://bugs.webkit.org/show_bug.cgi?id=204739

Patch by Rob Buis <rbuis@igalia.com> on 2019-12-02
Reviewed by Frédéric Wang.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::connectionToServerLost):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):

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

Remove MediaStreamTrack event queue
https://bugs.webkit.org/show_bug.cgi?id=204603

Reviewed by Eric Carlson.

Small refactoring to remove the track event queue and use ActiveDOMObject::queueTaskToDispatchEvent instead.
Updated some #include as some include fixes were needed.
No change of behavior.

  • Modules/mediastream/MediaStreamTrack.cpp:

(WebCore::MediaStreamTrack::trackMutedChanged):

  • Modules/mediastream/MediaStreamTrack.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/mediastream/MediaStreamPrivate.h:
1:40 AM Changeset in webkit [252980] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit

[GTK][PSON] Crash in NetworkProcessProxy::openNetworkProcessConnection
https://bugs.webkit.org/show_bug.cgi?id=204703

Reviewed by Michael Catanzaro.

Stop sending a message to all web process to prefetch DNS for a hostname. All web processes then send a messaage
to their network process to prefetch the DNS. Instead, send a message directly to the network process.

  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkit_web_context_prefetch_dns):

  • WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
1:28 AM Changeset in webkit [252979] by Antti Koivisto
  • 18 edits
    1 copy
    1 add in trunk/Source/WebCore

[LFC][Render tree] Support LFC in LineLayoutTraversal
https://bugs.webkit.org/show_bug.cgi?id=204727

Reviewed by Zalan Bujtas.

Add support for traversing LFC inline layout to TextBoxIterator and ElementBoxIterator.
This makes render tree dumps and TextIterator work with LFC layout.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const):

  • layout/RenderBlockFlowLineLayout.cpp:

(WebCore::Layout::RenderBlockFlowLineLayout::layout):
(WebCore::Layout::RenderBlockFlowLineLayout::inlineResults const):
(WebCore::Layout::RenderBlockFlowLineLayout::textBoxesFor const):
(WebCore::Layout::RenderBlockFlowLineLayout::elementBoxFor const):

  • layout/RenderBlockFlowLineLayout.h:
  • layout/Verification.cpp:

(WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
(WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

  • layout/blockformatting/BlockMarginCollapse.cpp:

(WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough const):

  • layout/displaytree/DisplayPainter.cpp:

(WebCore::Display::paintInlineContent):

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::layoutBox const):

Replace style with layout box weak pointer. This allows finding runs for a given box.

(WebCore::Display::Run::style const):

Get style from the layout box.

(WebCore::Display::Run::Run):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
(WebCore::Layout::InlineFormattingContext::invalidateFormattingState):

  • layout/inlineformatting/InlineFormattingContextQuirks.cpp:

(WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):

  • layout/inlineformatting/InlineFormattingState.h:

(WebCore::Layout::InlineFormattingState::results const):
(WebCore::Layout::InlineFormattingState::clearResults):
(WebCore::Layout::InlineFormattingState::ensureResults):
(WebCore::Layout::InlineFormattingState::displayRuns const): Deleted.
(WebCore::Layout::InlineFormattingState::displayRuns): Deleted.
(WebCore::Layout::InlineFormattingState::lineBoxes const): Deleted.
(WebCore::Layout::InlineFormattingState::lineBoxes): Deleted.
(WebCore::Layout::InlineFormattingState::addLineBox): Deleted.
(WebCore::Layout::InlineFormattingState::lineBoxForRun const): Deleted.
(WebCore::Layout::InlineFormattingState::addDisplayRun): Deleted.
(WebCore::Layout::InlineFormattingState::resetDisplayRuns): Deleted.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):
(WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):

  • layout/displaytree/DisplayInlineContent.h: Copied from Source/WebCore/layout/RenderBlockFlowLineLayout.h.

(WebCore::Display::InlineContent::lineBoxForRun const):

Factor into a struct. Make it refcounted for safe access from line layout iterators.

(WebCore::Layout::outputInlineRuns):

  • rendering/line/LineLayoutTraversal.cpp:

(WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutTraversal::flowForText):
(WebCore::LineLayoutTraversal::firstTextBoxFor):
(WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
(WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
(WebCore::LineLayoutTraversal::elementBoxFor):

  • rendering/line/LineLayoutTraversal.h:
  • rendering/line/LineLayoutTraversalDisplayRunPath.h: Added.

(WebCore::LineLayoutTraversal::linePosition):
(WebCore::LineLayoutTraversal::DisplayRunPath::DisplayRunPath):

New path for traversing display runs.

(WebCore::LineLayoutTraversal::DisplayRunPath::rect const):
(WebCore::LineLayoutTraversal::DisplayRunPath::logicalRect const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isLeftToRightDirection const):
(WebCore::LineLayoutTraversal::DisplayRunPath::dirOverride const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
(WebCore::LineLayoutTraversal::DisplayRunPath::hasHyphen const):
(WebCore::LineLayoutTraversal::DisplayRunPath::text const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localStartOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::localEndOffset const):
(WebCore::LineLayoutTraversal::DisplayRunPath::length const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isLastOnLine const):
(WebCore::LineLayoutTraversal::DisplayRunPath::isLast const):
(WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):
(WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInTextOrder):
(WebCore::LineLayoutTraversal::DisplayRunPath::operator== const):
(WebCore::LineLayoutTraversal::DisplayRunPath::atEnd const):
(WebCore::LineLayoutTraversal::DisplayRunPath::displayRuns const):
(WebCore::LineLayoutTraversal::DisplayRunPath::firstRun const):
(WebCore::LineLayoutTraversal::DisplayRunPath::run const):

Dec 1, 2019:

10:44 PM Changeset in webkit [252978] by commit-queue@webkit.org
  • 7 edits
    5 copies
    3 adds in trunk/Source/JavaScriptCore

Add FuzzerAgent that reads predictions from a file
https://bugs.webkit.org/show_bug.cgi?id=203898

Patch by Tuomas Karkkainen <tuomas.webkit@apple.com> on 2019-12-01
Reviewed by Mark Lam.

This patch adds a FuzzerAgent that reads predictions from a file. The predictions in the file are
correlated with the prediction sites using the name of the JavaScript source file, the opcode, and
start and end offsets in the source. There is also a separate FuzzerAgent that can be used to create
the prediction files.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • runtime/FileBasedFuzzerAgent.cpp: Added.
  • runtime/FileBasedFuzzerAgent.h: Copied from Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp.
  • runtime/FileBasedFuzzerAgentBase.cpp: Added.
  • runtime/FileBasedFuzzerAgentBase.h: Copied from Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp.
  • runtime/FuzzerPredictions.cpp: Added.
  • runtime/FuzzerPredictions.h: Copied from Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp.
  • runtime/Options.cpp:
  • runtime/OptionsList.h:
  • runtime/PredictionFileCreatingFuzzerAgent.cpp: Copied from Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp.
  • runtime/PredictionFileCreatingFuzzerAgent.h: Copied from Source/JavaScriptCore/runtime/RandomizingFuzzerAgent.cpp.
  • runtime/RandomizingFuzzerAgent.cpp:
  • runtime/VM.cpp:
7:32 PM Changeset in webkit [252977] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Disable LocalCurrentGraphicsContext when doing DisplayList recording
https://bugs.webkit.org/show_bug.cgi?id=204721

Reviewed by Simon Fraser.

  • platform/mac/LocalCurrentGraphicsContext.mm:

(WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
Since we don't have a platform context, we can't set the global
graphics context. This means that anything depending on this downstream
will break and need to be implemented a different way in
the DisplayList case.

7:19 PM Changeset in webkit [252976] by Fujii Hironori
  • 9 edits in trunk/Source

[Win] Retrieve all following WM_CHAR events at the beginning of processing WM_KEYDOWN event
https://bugs.webkit.org/show_bug.cgi?id=204694

Reviewed by Ross Kirsling.

Source/WebKit:

In Windows ports, WM_KEYDOWN dispatches keydown event, and
WM_CHAR dispatches keypress event. If a keydown event is canceled
by calling preventDefault, the following corresponding keypress
events shouldn't be dispatched.

WebKit1 implemented it by removing WM_CHAR events if the keydown
event is consumed. However, WebKit2 can't do so because WebKit2
processes key events asynchronously. Thus, retrieve all following
WM_CHAR events, and dispatch them after processing the keydown
and if it is not consumed.

In addition to that, retrieving following WM_CHAR events is needed
to fix Bug 204672 because the events are needed for 'key' property
of keydown KeyboardEvent for dead key combination.

Gecko and Chromium also implements 'key' property in the same approach.

Test: Covered by existing fast/events/inputText-never-fired-on-keydown-cancel.html and fast/events/keydown-keypress-preventDefault.html

  • Shared/NativeWebKeyboardEvent.h: Added m_pendingCharEvents as Vector<MSG>.

(WebKit::NativeWebKeyboardEvent::pendingCharEvents const):

  • Shared/win/NativeWebKeyboardEventWin.cpp:

(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveEvent):

  • UIProcess/WebPageProxy.h:
  • UIProcess/win/WebPageProxyWin.cpp:

(WebKit::WebPageProxy::dispatchPendingCharEvents):

  • UIProcess/win/WebView.cpp:

(WebKit::WebView::onKeyEvent):

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::keyDown): Added a variable pendingCharEvents of
Vector<MSG> to preserve following WM_CHAR events. Dispatch them if
the WM_KEYDOWN isn't consumed.

6:57 PM Changeset in webkit [252975] by Caio Lima
  • 6 edits in trunk

[JSC][MIPS] CallFrame is being clobbered on InternalFunction execution
https://bugs.webkit.org/show_bug.cgi?id=203739

Reviewed by Saam Barati.

JSTests:

  • stress/has-instance-exception-check.js:
  • stress/regress-176485.js:

Source/JavaScriptCore:

MIPS calling conventions requires that we have stack space reserved
for 4 (16-bytes) arguments ($a0-$a3). The caller doesn't use
this space, but callee can still use it in case where they need to save
arguments or even reuse to another allocation. Since we were not
allocationg it during makeHostFunctionCall, the caller frame slot
was being clobberred by callGenericTypedArrayView execution,
resulting in a corrupted call frame stack. This patch is adjusting
this convention into ThunkGenerator and on makeHostFunctionCall.

  • jit/ThunkGenerators.cpp:

(JSC::nativeForGenerator):

  • llint/LowLevelInterpreter32_64.asm:
6:54 PM Changeset in webkit [252974] by Caio Lima
  • 8 edits in trunk/Source/JavaScriptCore

Implement GetByVal inline caching for 32-bit JITs
https://bugs.webkit.org/show_bug.cgi?id=204082

Reviewed by Saam Barati.

We are adding 32-bit support for GetByVal cases added on r252684.
This requires changes on some of the IC code generated to properly
support JSVALUE32_64. The major difference from JSVALUE64 is the
usage of tagGPR to inspect value types and store results.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::emitDOMJITGetter):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • bytecode/StructureStubInfo.h:

Since a generator can't have thisGPR and propertyGPR at se same time,
we created a new union to share thisTagGPR and propertyTagGPR,
matching the approach we have for JITInlineCacheGenerator::patch.u.

(JSC::StructureStubInfo::propertyRegs const):
(JSC::StructureStubInfo::baseRegs const):

To simplify scratch register allocation, we added baseRegs() and
propertyRegs() to StructureStubInfo, so we can easily retrive
payload and tag GPRs for those operands, keeping them locked.

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • jit/JITInlineCacheGenerator.cpp:

(JSC::JITByIdGenerator::JITByIdGenerator):
(JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator):
(JSC::JITInstanceOfGenerator::JITInstanceOfGenerator):
(JSC::JITGetByValGenerator::JITGetByValGenerator):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emitSlow_op_get_by_val):

6:18 PM Changeset in webkit [252973] by Fujii Hironori
  • 2 edits in trunk/Source/WebKitLegacy/win

[CMake] Ninja can't build WebKitQuartzCoreAdditions of AppleWin port
https://bugs.webkit.org/show_bug.cgi?id=204696

Reviewed by Don Olmstead.

It seems unnecessary to explicitly add Windows SDK to link_directories.

  • WebKitQuartzCoreAdditions/CMakeLists.txt: Removed link_directories for Windows SDK.
3:14 PM Changeset in webkit [252972] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Trim trailing letter spacing.
https://bugs.webkit.org/show_bug.cgi?id=204731
<rdar://problem/57545763>

Reviewed by Antti Koivisto.

Refactor trailing trimmable content to support partial, non-whitespace trimmable content e.g. letter spacing.
https://drafts.csswg.org/css-text-3/#letter-spacing-property -> UAs therefore must not append letter spacing to the right or trailing edge of a line.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::breakingContextForInlineContent):
(WebCore::Layout::LineBreaker::Content::append):
(WebCore::Layout::LineBreaker::Content::reset):
(WebCore::Layout::LineBreaker::Content::TrailingTrimmableContent::reset):
(WebCore::Layout::LineBreaker::Content::hasNonWhitespaceOrInlineBox const): Deleted.
(WebCore::Layout::LineBreaker::Content::trailingTrimmableWidth const): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::Content::isEmpty const):
(WebCore::Layout::LineBreaker::Content::nonTrimmableWidth const):
(WebCore::Layout::LineBreaker::Content::hasTrailingTrimmableContent const):
(WebCore::Layout::LineBreaker::Content::isTrailingContentFullyTrimmable const):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
(WebCore::Layout::LineBuilder::appendTextContent):
(WebCore::Layout::LineBuilder::TrimmableContent::append):
(WebCore::Layout::LineBuilder::InlineItemRun::removeTrailingLetterSpacing):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::isTrailingContentFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::isTrailingContentFullyTrimmable const):
(WebCore::Layout::LineBuilder::TrimmableContent::clear):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::processUncommittedContent):

1:58 PM Changeset in webkit [252971] by Simon Fraser
  • 2 edits in trunk/Source/WebCore

Rename CSSCalcPrimitiveValue to CSSCalcPrimitiveValueNode, and CSSCalcOperation to CSSCalcOperationNode
https://bugs.webkit.org/show_bug.cgi?id=204730

Reviewed by Dean Jackson.

Pure rename. These are both subclasses of CSSCalcExpressionNode, so are better with Node in the name.

  • css/CSSCalculationValue.cpp:

(WebCore::CSSCalcPrimitiveValueNode::createCalcExpression const):
(WebCore::CSSCalcPrimitiveValueNode::doubleValue const):
(WebCore::CSSCalcPrimitiveValueNode::computeLengthPx const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcPrimitiveValueNode::equals const):
(WebCore::CSSCalcPrimitiveValueNode::dump const):
(WebCore::CSSCalcOperationNode::create):
(WebCore::CSSCalcOperationNode::createMinOrMax):
(WebCore::CSSCalcOperationNode::createSimplified):
(WebCore::CSSCalcOperationNode::primitiveType const):
(WebCore::CSSCalcOperationNode::createCalcExpression const):
(WebCore::CSSCalcOperationNode::doubleValue const):
(WebCore::CSSCalcOperationNode::computeLengthPx const):
(WebCore::CSSCalcOperationNode::collectDirectComputationalDependencies const):
(WebCore::CSSCalcOperationNode::collectDirectRootComputationalDependencies const):
(WebCore::CSSCalcOperationNode::buildCssText):
(WebCore::CSSCalcOperationNode::customCSSText const):
(WebCore::CSSCalcOperationNode::dump const):
(WebCore::CSSCalcOperationNode::equals const):
(WebCore::CSSCalcOperationNode::evaluateOperator):
(WebCore::CSSCalcExpressionNodeParser::parseValue):
(WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
(WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
(WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
(WebCore::createBlendHalf):
(WebCore::createCSS):
(WebCore::CSSCalcPrimitiveValue::createCalcExpression const): Deleted.
(WebCore::CSSCalcPrimitiveValue::doubleValue const): Deleted.
(WebCore::CSSCalcPrimitiveValue::computeLengthPx const): Deleted.
(WebCore::CSSCalcPrimitiveValue::collectDirectComputationalDependencies const): Deleted.
(WebCore::CSSCalcPrimitiveValue::collectDirectRootComputationalDependencies const): Deleted.
(WebCore::CSSCalcPrimitiveValue::equals const): Deleted.
(WebCore::CSSCalcPrimitiveValue::dump const): Deleted.
(WebCore::CSSCalcOperation::create): Deleted.
(WebCore::CSSCalcOperation::createMinOrMax): Deleted.
(WebCore::CSSCalcOperation::createSimplified): Deleted.
(WebCore::CSSCalcOperation::primitiveType const): Deleted.
(WebCore::CSSCalcOperation::createCalcExpression const): Deleted.
(WebCore::CSSCalcOperation::doubleValue const): Deleted.
(WebCore::CSSCalcOperation::computeLengthPx const): Deleted.
(WebCore::CSSCalcOperation::collectDirectComputationalDependencies const): Deleted.
(WebCore::CSSCalcOperation::collectDirectRootComputationalDependencies const): Deleted.
(WebCore::CSSCalcOperation::buildCssText): Deleted.
(WebCore::CSSCalcOperation::customCSSText const): Deleted.
(WebCore::CSSCalcOperation::dump const): Deleted.
(WebCore::CSSCalcOperation::equals const): Deleted.
(WebCore::CSSCalcOperation::evaluateOperator): Deleted.

1:58 PM Changeset in webkit [252970] by Simon Fraser
  • 6 edits in trunk/Source/WebCore

Add a Calc log channel, and support type traits for calc-related classes
https://bugs.webkit.org/show_bug.cgi?id=204729

Reviewed by Dean Jackson.

Add type traits support for CalculationValue and CSSCalculationValue classes.

Add a Calc logging channel and dump post-parsing values, and in some error cases.s

  • css/CSSCalculationValue.cpp:

(WebCore::operator<<):
(WebCore::prettyPrintNode):
(WebCore::prettyPrintNodes):
(WebCore::CSSCalcPrimitiveValue::dump const):
(WebCore::CSSCalcOperation::create):
(WebCore::CSSCalcOperation::createMinOrMax):
(WebCore::CSSCalcOperation::dump const):
(WebCore::CSSCalcExpressionNodeParser::parseCalc):
(WebCore::createCSS):
(WebCore::CSSCalcValue::dump const):
(WebCore::CSSCalcValue::create):

  • css/CSSCalculationValue.h:
  • platform/CalculationValue.cpp:

(WebCore::CalcExpressionNumber::operator== const):
(WebCore::CalcExpressionOperation::operator== const):
(WebCore::CalcExpressionLength::operator== const):
(WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
(WebCore::CalcExpressionBlendLength::operator== const):

  • platform/CalculationValue.h:

(WebCore::toCalcExpressionNumber): Deleted.
(WebCore::toCalcExpressionLength): Deleted.
(WebCore::toCalcExpressionOperation): Deleted.
(WebCore::toCalcExpressionBlendLength): Deleted.

  • platform/Logging.h:
9:51 AM Changeset in webkit [252969] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests/imported/w3c

[Web Animations] Rebaseline some WPT expectations
https://bugs.webkit.org/show_bug.cgi?id=204724

Unreviewed test gardening.

  • web-platform-tests/css/css-animations/event-order.tentative-expected.txt:
  • web-platform-tests/web-animations/interfaces/Animation/style-change-events-expected.txt:
7:49 AM Changeset in webkit [252968] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Regression (r252893): loader/stateobjects/pushstate-size.html is crashing on mac debug
https://bugs.webkit.org/show_bug.cgi?id=204725

Unreviewed followup to r252893.

  • rendering/RenderElement.h:

Increase bitfield size to fit the enum.

7:27 AM Changeset in webkit [252967] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Add support for word-spacing property
https://bugs.webkit.org/show_bug.cgi?id=204723
<rdar://problem/57541871>

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::TrimmableContent::append):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::inlineItemWidth):

1:22 AM Changeset in webkit [252966] by graouts@webkit.org
  • 9 edits
    1 add in trunk

[Web Animations] Implement Animation.commitStyles()
https://bugs.webkit.org/show_bug.cgi?id=202193
<rdar://problem/55697790>

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

WPT test for Animation.commitStyles() now has 11 more PASS results.

  • web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:

Source/WebCore:

We implement the Animation.commitStyles() method following the spec to the letter. We fail a few tests still because we don't support animation
composite operations and because of rounding errors when blending opacity styles.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • animation/KeyframeEffectStack.cpp:

(WebCore::KeyframeEffectStack::ensureEffectsAreSorted): Remove the animation sorting logic since it's now made available in WebAnimationUtilities.h.

  • animation/KeyframeEffectStack.h:

(WebCore::KeyframeEffectStack::cssAnimationNames const): New function needed to call compareAnimationsByCompositeOrder() in WebAnimation::commitStyles().

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::commitStyles): Implement the spec steps as specified in https://drafts.csswg.org/web-animations-1/#commit-computed-styles. We use
a CSSStyleDeclaration to copy the content of the existing inline "style" attribute, add the animated values and then serialize it into the "style" attribute.
Even though it would have been more convenient to use StyledElement::setInlineStyleProperty(), we do this to ensure mutation observers get notified of such
a change.

  • animation/WebAnimationUtilities.cpp: Added.

(WebCore::compareAnimationsByCompositeOrder): Copied the animation sorting logic previously implemented in KeyframeEffectStack::ensureEffectsAreSorted().

  • animation/WebAnimationUtilities.h:

Nov 30, 2019:

10:10 PM Changeset in webkit [252965] by timothy_horton@apple.com
  • 53 edits in trunk/Source

Make CompositeOperator and BlendMode encodable
https://bugs.webkit.org/show_bug.cgi?id=204722

Reviewed by Eric Carlson.

Source/WebCore:

Make CompositeOperator an enum class, and fix the fallout.
Add EnumTraits for CompositeOperator and BlendMode, so that they can be encoded.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CompositeOperator const):

  • dom/Document.cpp:

(WebCore::Document::compositeOperatorForBackgroundColor const):

  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::HTMLImageElement):
(WebCore::HTMLImageElement::parseAttribute):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawTextInternal):

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::State::State):
(WebCore::CanvasRenderingContext2DBase::setGlobalCompositeOperation):
(WebCore::CanvasRenderingContext2DBase::isFullCanvasCompositeMode):
(WebCore::CanvasRenderingContext2DBase::fillInternal):
(WebCore::CanvasRenderingContext2DBase::strokeInternal):
(WebCore::CanvasRenderingContext2DBase::clearRect):
(WebCore::CanvasRenderingContext2DBase::fillRect):
(WebCore::CanvasRenderingContext2DBase::strokeRect):
(WebCore::CanvasRenderingContext2DBase::drawImage):
(WebCore::CanvasRenderingContext2DBase::drawImageFromRect):
(WebCore::CanvasRenderingContext2DBase::fullCanvasCompositedDrawImage):

  • inspector/InspectorOverlay.cpp:

(WebCore::drawOutlinedQuadWithClip):

  • platform/graphics/CrossfadeGeneratedImage.cpp:

(WebCore::CrossfadeGeneratedImage::drawCrossfade):

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/GraphicsTypes.cpp:

(WebCore::parseCompositeAndBlendOperator):
(WebCore::compositeOperatorName):

  • platform/graphics/GraphicsTypes.h:
  • platform/graphics/Image.cpp:

(WebCore::Image::fillWithSolidColor):

  • platform/graphics/ImagePaintingOptions.h:
  • platform/graphics/ShadowBlur.cpp:

(WebCore::ShadowBlur::blurAndColorShadowBuffer):

  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawNativeImage):

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::toCairoCompositeOperator):

  • platform/graphics/cg/GraphicsContext3DCG.cpp:

(WebCore::GraphicsContext3D::paintToCanvas):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::selectCGBlendMode):

  • platform/graphics/filters/FEBlend.cpp:

(WebCore::FEBlend::platformApplySoftware):
(WebCore::FEBlend::externalRepresentation const):

  • platform/graphics/filters/FEComposite.cpp:

(WebCore::FEComposite::platformApplySoftware):

  • platform/graphics/filters/FEDropShadow.cpp:

(WebCore::FEDropShadow::platformApplySoftware):

  • platform/graphics/filters/SourceAlpha.cpp:

(WebCore::SourceAlpha::platformApplySoftware):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::paint):

  • platform/graphics/nicosia/NicosiaPaintingEngineBasic.cpp:

(Nicosia::PaintingEngineBasic::paint):

  • platform/graphics/nicosia/NicosiaPaintingEngineThreaded.cpp:

(Nicosia::paintLayer):

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

(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/win/Direct2DOperations.cpp:

(WebCore::Direct2D::State::setCompositeOperation):

  • platform/graphics/win/Direct2DOperations.h:
  • platform/graphics/win/ImageCGWin.cpp:

(WebCore::BitmapImage::getHBITMAPOfSize):

  • platform/graphics/win/ImageCairoWin.cpp:

(WebCore::BitmapImage::getHBITMAPOfSize):

  • rendering/InlineFlowBox.cpp:

(WebCore::InlineFlowBox::paintMask):

  • rendering/InlineFlowBox.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintMaskImages):

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderBoxModelObject.h:
  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::paintReplaced):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

  • rendering/RenderLayerBacking.cpp:

(WebCore::supportsDirectlyCompositedBoxDecorations):

  • rendering/RenderTreeAsText.cpp:
  • rendering/RenderView.cpp:

(WebCore::RenderView::paintBoxDecorations):

  • rendering/style/FillLayer.cpp:

(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::hasOpaqueImage const):

  • rendering/style/FillLayer.h:

(WebCore::FillLayer::initialFillComposite):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::nativeImage):
(WebCore::SVGImage::draw):

Source/WebKit:

  • UIProcess/cairo/BackingStoreCairo.cpp:

(WebKit::BackingStore::incorporateUpdate):

  • WebProcess/Plugins/PluginProxy.cpp:

(WebKit::PluginProxy::paint):
(WebKit::PluginProxy::update):

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::drawRect):

Source/WebKitLegacy/win:

  • FullscreenVideoController.cpp:

(FullscreenVideoController::draw):

  • WebView.cpp:

(WebView::paintWithDirect2D):
(WebView::paintIntoBackingStore):

8:20 PM Changeset in webkit [252964] by Ross Kirsling
  • 4 edits in trunk

test262-runner should dump YAML with correct encoding
https://bugs.webkit.org/show_bug.cgi?id=204493

Reviewed by Saam Barati.

JSTests:

  • test262/expectations.yaml:

Fix double-encoding of test failure output.

Tools:

Even though we spit out correctly-encoded output to the terminal, Perl's YAML module insists upon *re*-encoding
to UTF-8 when dumping to file. This works out in the end because an analogous double-decode occurs when loading
from file. Still, it's really annoying that expectations.yaml has garbled (i.e. double-encoded) text.

We shouldn't modify libraries directly, but we can copy-paste DumpFile/LoadFile into Runner.pm and tweak!

  • Scripts/test262/Runner.pm:

(DumpFile):
(LoadFile):
Add custom versions of DumpFile/LoadFile which do not execute binmode $OUT, ':utf8';.

5:09 PM Changeset in webkit [252963] by Alan Bujtas
  • 2 edits in trunk/Tools

[LFC] Expand tests coverage (2648 new tests -> 3980).

  • LayoutReloaded/misc/LFC-passing-tests.txt:
5:06 PM Changeset in webkit [252962] by timothy_horton@apple.com
  • 15 edits in trunk/Source

Reimplement some PlatformCALayer methods using GraphicsContext instead of CGContextRef
https://bugs.webkit.org/show_bug.cgi?id=204698

Reviewed by Sam Weinig.

Source/WebCore:

In order to make PlatformCALayer-level DisplayList recording possible,
reimplement a few methods in terms of WebCore::GraphicsContext instead
of CGContextRef directly. Namely, collectRectsToPaint, drawLayerContents,
and drawRepaintIndicator.

In the drawLayerContents case, there are operations (like setting the
AppKit global graphics context) that cannot be done without a platform
context. In those cases, we skip that operation if we don't have a
platform context.

Anything depending on this downstream will break and need to be
implemented a different way in the DisplayList case.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/ca/PlatformCALayer.cpp:

(WebCore::PlatformCALayer::drawRepaintIndicator):

  • platform/graphics/ca/PlatformCALayer.h:
  • platform/graphics/ca/TileGrid.cpp:

(WebCore::TileGrid::platformCALayerPaintContents):

  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(WebCore::PlatformCALayer::collectRectsToPaint):
(WebCore::PlatformCALayer::drawLayerContents):
(WebCore::PlatformCALayerCocoa::enumerateRectsBeingDrawn):

  • platform/graphics/ca/win/PlatformCALayerWin.cpp:

(PlatformCALayer::collectRectsToPaint):

  • platform/graphics/mac/WebLayer.mm:

(-[WebLayer drawInContext:]):

Source/WebKit:

  • Shared/RemoteLayerTree/RemoteLayerBackingStore.h:
  • Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:

(WebKit::RemoteLayerBackingStore::drawInContext):
(WebKit::RemoteLayerBackingStore::enumerateRectsBeingDrawn):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp:

(WebKit::PlatformCALayerRemote::enumerateRectsBeingDrawn):

  • WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
11:08 AM Changeset in webkit [252961] by youenn@apple.com
  • 5 edits in trunk/Source/WebCore

Simplify CoreAudioCaptureSource suspension logic
https://bugs.webkit.org/show_bug.cgi?id=201720

Reviewed by Eric Carlson.

Instead of going through the source to suspend/resume the audio unit,
we directly go to the shared unit, which nows notifies the clients that they are muted or unmuted.

To simplify things, we no longer schedule tasks to resume/suspend/reconfigure.
All of these orders are started from the main thread synchronously.

No observable change of behavior.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:

(WebCore::BaseAudioSharedUnit::startProducingData):
(WebCore::BaseAudioSharedUnit::reconfigure):
(WebCore::BaseAudioSharedUnit::resume):
(WebCore::BaseAudioSharedUnit::suspend):

  • platform/mediastream/mac/BaseAudioSharedUnit.h:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::beginInterruption):
(WebCore::CoreAudioCaptureSourceFactory::endInterruption):
(WebCore::CoreAudioCaptureSourceFactory::scheduleReconfiguration):
(WebCore::CoreAudioCaptureSource::initializeToStartProducingData):
(WebCore::CoreAudioCaptureSource::startProducingData):
(WebCore::CoreAudioCaptureSource::stopProducingData):
(WebCore::CoreAudioCaptureSource::settingsDidChange):
(WebCore::CoreAudioCaptureSource::scheduleReconfiguration): Deleted.
(WebCore::CoreAudioCaptureSource::beginInterruption): Deleted.
(WebCore::CoreAudioCaptureSource::endInterruption): Deleted.

  • platform/mediastream/mac/CoreAudioCaptureSource.h:
11:07 AM Changeset in webkit [252960] by youenn@apple.com
  • 3 edits
    2 adds in trunk

Update RealtimeOutgoingAudioSourceCocoa::m_writeCount when sampleRate changes
https://bugs.webkit.org/show_bug.cgi?id=204606

Reviewed by Eric Carlson.

Source/WebCore:

Update m_writeCount to make sure our high/low buffer computation is done right.

Test: webrtc/audio-samplerate-change.html

  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:

(WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable):

LayoutTests:

  • webrtc/audio-samplerate-change-expected.txt: Added.
  • webrtc/audio-samplerate-change.html: Added.
8:30 AM Changeset in webkit [252959] by Antti Koivisto
  • 6 edits
    2 adds in trunk/Source/WebCore

Move path implementation functions in LineLayoutTraversal to *Path classes
https://bugs.webkit.org/show_bug.cgi?id=204714

Reviewed by Sam Weinig.

Simplify LineLayoutTraversal and make it easier to extend.

  • Turn SimplePath and ComplexPath structs into classes
  • Move them to separate files
  • Make path implementation functions class members, called via generic lambdas
  • Instead of inheriting Box/TextBox to iterators, make it a member variable.
  • Move the path variant to Box, avoiding use of templates.
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderTreeAsText.cpp:

(WebCore::writeTextBox):

  • rendering/line/LineLayoutTraversal.cpp:

(WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInVisualOrder):
(WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInTextOrder):
(WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
(WebCore::LineLayoutTraversal::TextBoxIterator::atEnd const):
(WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
(WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
(WebCore::LineLayoutTraversal::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const): Deleted.

  • rendering/line/LineLayoutTraversal.h:

(WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
(WebCore::LineLayoutTraversal::TextBoxIterator::operator* const):
(WebCore::LineLayoutTraversal::TextBoxIterator::operator-> const):
(WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
(WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
(WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):
(WebCore::LineLayoutTraversal::Box::Box):
(WebCore::LineLayoutTraversal::Box::rect const):
(WebCore::LineLayoutTraversal::Box::logicalRect const):
(WebCore::LineLayoutTraversal::Box::isLeftToRightDirection const):
(WebCore::LineLayoutTraversal::Box::dirOverride const):
(WebCore::LineLayoutTraversal::Box::isLineBreak const):
(WebCore::LineLayoutTraversal::TextBox::hasHyphen const):
(WebCore::LineLayoutTraversal::TextBox::TextBox):
(WebCore::LineLayoutTraversal::TextBox::text const):
(WebCore::LineLayoutTraversal::TextBox::localStartOffset const):
(WebCore::LineLayoutTraversal::TextBox::localEndOffset const):
(WebCore::LineLayoutTraversal::TextBox::length const):
(WebCore::LineLayoutTraversal::TextBox::isLastOnLine const):
(WebCore::LineLayoutTraversal::TextBox::isLast const):
(): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::rect const): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const): Deleted.
(WebCore::LineLayoutTraversal::Box<Iterator>::iterator const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::text const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::length const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const): Deleted.
(WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const): Deleted.

  • rendering/line/LineLayoutTraversalComplexPath.h: Added.

(WebCore::LineLayoutTraversal::ComplexPath::ComplexPath):
(WebCore::LineLayoutTraversal::ComplexPath::rect const):
(WebCore::LineLayoutTraversal::ComplexPath::logicalRect const):
(WebCore::LineLayoutTraversal::ComplexPath::isLeftToRightDirection const):
(WebCore::LineLayoutTraversal::ComplexPath::dirOverride const):
(WebCore::LineLayoutTraversal::ComplexPath::isLineBreak const):
(WebCore::LineLayoutTraversal::ComplexPath::hasHyphen const):
(WebCore::LineLayoutTraversal::ComplexPath::text const):
(WebCore::LineLayoutTraversal::ComplexPath::localStartOffset const):
(WebCore::LineLayoutTraversal::ComplexPath::localEndOffset const):
(WebCore::LineLayoutTraversal::ComplexPath::length const):
(WebCore::LineLayoutTraversal::ComplexPath::isLastOnLine const):
(WebCore::LineLayoutTraversal::ComplexPath::isLast const):
(WebCore::LineLayoutTraversal::ComplexPath::traverseNextTextBoxInVisualOrder):
(WebCore::LineLayoutTraversal::ComplexPath::traverseNextTextBoxInTextOrder):
(WebCore::LineLayoutTraversal::ComplexPath::operator== const):
(WebCore::LineLayoutTraversal::ComplexPath::atEnd const):
(WebCore::LineLayoutTraversal::ComplexPath::inlineTextBox const):
(WebCore::LineLayoutTraversal::ComplexPath::nextInlineTextBoxInTextOrder const):

  • rendering/line/LineLayoutTraversalSimplePath.h: Added.

(WebCore::LineLayoutTraversal::SimplePath::SimplePath):
(WebCore::LineLayoutTraversal::SimplePath::rect const):
(WebCore::LineLayoutTraversal::SimplePath::logicalRect const):
(WebCore::LineLayoutTraversal::SimplePath::isLeftToRightDirection const):
(WebCore::LineLayoutTraversal::SimplePath::dirOverride const):
(WebCore::LineLayoutTraversal::SimplePath::isLineBreak const):
(WebCore::LineLayoutTraversal::SimplePath::hasHyphen const):
(WebCore::LineLayoutTraversal::SimplePath::text const):
(WebCore::LineLayoutTraversal::SimplePath::localStartOffset const):
(WebCore::LineLayoutTraversal::SimplePath::localEndOffset const):
(WebCore::LineLayoutTraversal::SimplePath::length const):
(WebCore::LineLayoutTraversal::SimplePath::isLastOnLine const):
(WebCore::LineLayoutTraversal::SimplePath::isLast const):
(WebCore::LineLayoutTraversal::SimplePath::traverseNextTextBoxInVisualOrder):
(WebCore::LineLayoutTraversal::SimplePath::traverseNextTextBoxInTextOrder):
(WebCore::LineLayoutTraversal::SimplePath::operator== const):
(WebCore::LineLayoutTraversal::SimplePath::atEnd const):

7:16 AM Changeset in webkit [252958] by Alan Bujtas
  • 8 edits in trunk

[LFC][IFC] Add support for hyphenate-limit-lines
https://bugs.webkit.org/show_bug.cgi?id=204712
<rdar://problem/57536727>

Reviewed by Antti Koivisto.

Source/WebCore:

Now IFC (hyphenation)feature matches SLL.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::wordBreakingBehavior const):
(WebCore::Layout::LineBreaker::tryBreakingTextRun const):

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::setHyphenationDisabled):

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::LineLayoutContext::LineLayoutContext):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::close):
(WebCore::Layout::LineLayoutContext::processUncommittedContent):

  • layout/inlineformatting/LineLayoutContext.h:

Tools:

  • LayoutReloaded/misc/LFC-passing-tests.txt:
5:15 AM Changeset in webkit [252957] by graouts@webkit.org
  • 6 edits
    4 adds in trunk

[Web Animations] Forward-filling animations should not schedule updates while filling
https://bugs.webkit.org/show_bug.cgi?id=204697
<rdar://problem/57534005>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: webanimations/no-scheduling-while-filling-accelerated.html

webanimations/no-scheduling-while-filling-non-accelerated.html

For two different reasons, we would continuously schedule updates for animations in their "after" phase, ie. when they would have "fill: forwards"
and be finished.

In the case of non-accelerated animations, that was because we would also schedule an immedate update in DocumentTimeline::scheduleNextTick() provided
we had relevant animations that weren't accelerated. But since animations in their "after" phase are still considered relevant, which means that they
would override the base style with an animated value, this caused the unnecessary scheduled updates.

To address this, we run WebAnimation::timeToNextTick() in DocumentTimeline::scheduleNextTick() for all relevant animations and we teach that function
to schedule an immediate update only during the "active" phase, and to schedule a timed update only in the "before" phase computing the delay until
the animation enters the "active" phase.

While performing this work, we found a couple of other issues that weren't apparent until we had this more efficient scheduling in place.

First, we would not allow any additional calls to DocumentTimeline::scheduleAnimationResolution() to actually schedule an update while we were in the
process of updating animations. While this wasn't a problem before because the mere presence of relevant animations would cause an upadte, we now had
to allow any animation changing timing properties as promises would resolve and events would be dispatched during the animation update to cause further
animation updates to be scheduled. So we moved the "m_animationResolutionScheduled" flag reset earlier in DocumentTimeline::updateAnimationsAndSendEvents()
before we actually run the animation update procedure.

Following that change, we also had to make sure that timing changes made through the evaluation of the pending play and pause tasks would _not_ cause
animations to be scheduled, which meant that an animation that became non-pending (ie. its first tick occured) would always schedule one immediate
animation update. So now we have an extra "silent" flag to WebAnimation::timingDidChange() which is only set to true when called from either
WebAnimation::runPendingPlayTask() or WebAnimation::runPendingPauseTask().

Finally, one existing test showed that calling KeyframeEffect::setKeyframes() while running animations didn't cause an animation update to be scheduled
since a call to WebAnimation::effectTimingDidChange() was lacking. This is now addressed.

As for accelerated animations, the extraneous animation scheduling occured because we would get in a state where we would record an "accelerated action"
to stop the accelerated animation but the accelerated animation had already completed and the renderer for the target element was no longer composited.
This meant that KeyframeEffect::applyPendingAcceleratedActions() would not perform any work and the pending accelerated action would remain in the
DocumentTimeline queue and cause an update to be scheduled to try again, endlessly.

To address that, we first check in KeyframeEffect::addPendingAcceleratedAction() if the recorded action differs from the last recorded action, avoiding
unnecessary work, and in KeyframeEffect::applyPendingAcceleratedActions(), if our last recorded action was "Stop" and the renderer was not composited,
we discard all pending accelerated actions.

  • animation/DocumentTimeline.cpp:

(WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::scheduleNextTick):

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::setKeyframes):
(WebCore::KeyframeEffect::addPendingAcceleratedAction):
(WebCore::KeyframeEffect::applyPendingAcceleratedActions):

  • animation/WebAnimation.cpp:

(WebCore::WebAnimation::timingDidChange):
(WebCore::WebAnimation::runPendingPlayTask):
(WebCore::WebAnimation::runPendingPauseTask):
(WebCore::WebAnimation::timeToNextTick const):

  • animation/WebAnimation.h:

LayoutTests:

Adding tests checking that we don't schedule animation updates while filling for accelerated and non-accelerated animations alike.

  • webanimations/no-scheduling-while-filling-accelerated-expected.txt: Added.
  • webanimations/no-scheduling-while-filling-accelerated.html: Added.
  • webanimations/no-scheduling-while-filling-non-accelerated-expected.txt: Added.
  • webanimations/no-scheduling-while-filling-non-accelerated.html: Added.
4:32 AM Changeset in webkit [252956] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

MockAudioSharedUnit should reset its last render time on start/stop/reconfigure
https://bugs.webkit.org/show_bug.cgi?id=204600
<rdar://problem/57438874>

Reviewed by Eric Carlson.

MockAudioSharedUnit was not resetting its last render time on stop/start/reconfigure.
If stopping for a long time and then restarting, the unit would flood the audio pipe with lots of data
and confuse the pipe.
Remove some member variables inherited from MockRealtimeAudioSource which are no longer needed.

Covered by imported/w3c/web-platform-tests/webrtc/RTCRtpReceiver-getSynchronizationSources.https.html being no longer flaky.

  • platform/mediastream/mac/MockAudioSharedUnit.h:
  • platform/mediastream/mac/MockAudioSharedUnit.mm:

(WebCore::MockAudioSharedUnit::reconfigureAudioUnit):
(WebCore::MockAudioSharedUnit::startInternal):

2:40 AM Changeset in webkit [252955] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, follow-up to r252938, now fixing the MSE/EME build

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

supportsKeySystem needs to be public because it's referenced from
the MSE MediaPlayerPrivate sub-class.

2:33 AM Changeset in webkit [252954] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

Unreviewed, GTK LTS build fix after r252950.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

supportsKeySystem can't be ifdeffed.

12:15 AM Changeset in webkit [252953] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[EWS] Do not retry layout-tests build if the flaky test failures are also present in clean tree run
https://bugs.webkit.org/show_bug.cgi?id=204704

Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeLayoutTestsResults.start):

  • BuildSlaveSupport/ews-build/steps_unittest.py:

(TestAnalyzeLayoutTestsResults.test_flaky_and_inconsistent_failures_with_clean_tree_failures): Changed expected outcome to SUCCESS.
(TestAnalyzeLayoutTestsResults.test_flaky_and_consistent_failures_with_clean_tree_failures): Ditto.

Note: See TracTimeline for information about the timeline view.