Timeline



Jan 2, 2020:

7:52 PM Changeset in webkit [253990] by Keith Rollin
  • 4 edits in trunk/Source/WebKit

Reformat WebProcess logging
https://bugs.webkit.org/show_bug.cgi?id=205691
<rdar://problem/58283294>

Reviewed by Chris Dumez.

Update the format used by WebProcess in its RELEASE_LOG logging. Use
the format used by WebPageProxy and NetworkResourceLoader, which is
generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

0x6f1df7000 - WebProcess::destroyRenderingResources() took 0.02ms

becomes:

0x6f1df7000 - [sessionID=2] WebProcess::destroyRenderingResources: took 0.02ms

While we're at it, also convert over to the RELEASE_LOG_IF_ALLOWED
style of logging macro. We didn't used to be able to do this since the
decision on whether or not to allow logging is typically based on
SessionID, which didn't used to be an attribute of WebProcess. Now
WebProcesses do (or can) have a SessionID, so use that to support the
hiding of logging in private sessions.

No new tests - no added or changed functionality.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::prepareToSuspend):
(WebKit::WebProcess::markAllLayersVolatile):
(WebKit::WebProcess::freezeAllLayerTrees):
(WebKit::WebProcess::unfreezeAllLayerTrees):
(WebKit::WebProcess::processDidResume):
(WebKit::WebProcess::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebProcess::revokeUserMediaDeviceSandboxExtensions):

  • WebProcess/WebProcess.h:

(WebKit::WebProcess::isAlwaysOnLoggingAllowed):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::updateCPUMonitorState):
(WebKit::WebProcess::destroyRenderingResources):
(WebKit::WebProcess::updateFreezerStatus):

7:31 PM Changeset in webkit [253989] by Chris Dumez
  • 6 edits
    3 moves
    2 deletes in trunk/LayoutTests/imported/w3c

Re-sync web-platform-tests/domparsing from upstream
https://bugs.webkit.org/show_bug.cgi?id=205696

Reviewed by Alex Christensen.

Re-sync web-platform-tests/domparsing from upstream cb0d9cacbbf30a4cae79faa2.

  • web-platform-tests/domparsing/DOMParser-parseFromString-html-expected.txt:
  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
  • web-platform-tests/domparsing/XMLSerializer-serializeToString-expected.txt:
  • web-platform-tests/domparsing/XMLSerializer-serializeToString.html:
  • web-platform-tests/domparsing/idlharness.window-expected.txt: Renamed from LayoutTests/imported/w3c/web-platform-tests/domparsing/interfaces.any-expected.txt.
  • web-platform-tests/domparsing/idlharness.window.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/domparsing/interfaces.any.html.
  • web-platform-tests/domparsing/idlharness.window.js: Renamed from LayoutTests/imported/w3c/web-platform-tests/domparsing/interfaces.any.js.
  • web-platform-tests/domparsing/interfaces.any.worker-expected.txt: Removed.
  • web-platform-tests/domparsing/interfaces.any.worker.html: Removed.
  • web-platform-tests/domparsing/w3c-import.log:
6:52 PM Changeset in webkit [253988] by Chris Dumez
  • 3 edits
    2 adds in trunk

XMLSerializer doesn't correctly encode entities in <style> element
https://bugs.webkit.org/show_bug.cgi?id=205635

Reviewed by Alex Christensen.

Source/WebCore:

As per [1], when doing an XML serialization of text, we should escape '<', '>' and '&', even
if the text is inside a <style> element. The <style> element exception is for HTML serialization [2].

[1] https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
[2] https://html.spec.whatwg.org/#serialising-html-fragments

Test: fast/dom/xmlserializer-ampersand-in-style.html

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::entityMaskForText const):

LayoutTests:

Add layout test coverage.

  • fast/dom/xmlserializer-ampersand-in-style-expected.txt: Added.
  • fast/dom/xmlserializer-ampersand-in-style.html: Added.
6:36 PM Changeset in webkit [253987] by ysuzuki@apple.com
  • 174 edits
    12 copies
    1 add in trunk/Source

Experiment: create lots of different malloc zones for easier accounting of memory use
https://bugs.webkit.org/show_bug.cgi?id=186422

Patch by Yusuke Suzuki <ysuzuki@apple.com> and Simon Fraser <Simon Fraser> on 2020-01-02
Reviewed by Saam Barati.

Source/bmalloc:

  • bmalloc/BPlatform.h:
  • bmalloc/Environment.cpp:

(bmalloc::Environment::computeIsDebugHeapEnabled):

  • bmalloc/IsoHeap.h:

(bmalloc::api::IsoHeap::IsoHeap):

  • bmalloc/IsoHeapInlines.h:

(bmalloc::api::IsoHeap<Type>::IsoHeap):

  • bmalloc/IsoTLSInlines.h:

(bmalloc::IsoTLS::allocateSlow):
(bmalloc::IsoTLS::deallocateSlow):

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/AssemblerBuffer.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • assembler/AssemblerBuffer.h:

(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::operator=):
(JSC::AssemblerData::~AssemblerData):
(JSC::AssemblerData::grow):

  • bytecode/AccessCase.cpp:
  • bytecode/AccessCase.h:
  • bytecode/BytecodeBasicBlock.cpp:
  • bytecode/BytecodeBasicBlock.h:
  • bytecode/CodeBlock.cpp:
  • bytecode/CodeBlock.h:
  • bytecode/InstructionStream.cpp:
  • bytecode/InstructionStream.h:
  • bytecode/PolymorphicAccess.cpp:
  • bytecode/PolymorphicAccess.h:
  • bytecode/UnlinkedMetadataTable.cpp:

(JSC::UnlinkedMetadataTable::finalize):

  • bytecode/UnlinkedMetadataTable.h:
  • bytecode/UnlinkedMetadataTableInlines.h:

(JSC::UnlinkedMetadataTable::UnlinkedMetadataTable):
(JSC::UnlinkedMetadataTable::~UnlinkedMetadataTable):
(JSC::UnlinkedMetadataTable::link):
(JSC::UnlinkedMetadataTable::unlink):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileAndVirtualRegisterBuffer::ValueProfileAndVirtualRegisterBuffer):

  • bytecode/Watchpoint.cpp:
  • bytecode/Watchpoint.h:
  • dfg/DFGBasicBlock.cpp:
  • dfg/DFGBasicBlock.h:
  • dfg/DFGNode.cpp:
  • dfg/DFGNode.h:
  • dfg/DFGSpeculativeJIT.cpp:
  • dfg/DFGSpeculativeJIT.h:
  • heap/BlockDirectory.cpp:
  • heap/BlockDirectory.h:
  • heap/FastMallocAlignedMemoryAllocator.cpp:

(JSC::FastMallocAlignedMemoryAllocator::FastMallocAlignedMemoryAllocator):
(JSC::FastMallocAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::freeAlignedMemory):
(JSC::FastMallocAlignedMemoryAllocator::tryAllocateMemory):
(JSC::FastMallocAlignedMemoryAllocator::freeMemory):
(JSC::FastMallocAlignedMemoryAllocator::tryReallocateMemory):

  • heap/FastMallocAlignedMemoryAllocator.h:
  • heap/GCSegmentedArray.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
  • heap/GCSegmentedArray.h:
  • heap/GCSegmentedArrayInlines.h:

(JSC::GCArraySegment<T>::create):
(JSC::GCArraySegment<T>::destroy):

  • heap/GigacageAlignedMemoryAllocator.cpp:

(JSC::GigacageAlignedMemoryAllocator::GigacageAlignedMemoryAllocator):
(JSC::GigacageAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::freeAlignedMemory):
(JSC::GigacageAlignedMemoryAllocator::tryAllocateMemory):
(JSC::GigacageAlignedMemoryAllocator::freeMemory):
(JSC::GigacageAlignedMemoryAllocator::tryReallocateMemory):

  • heap/GigacageAlignedMemoryAllocator.h:
  • heap/IsoAlignedMemoryAllocator.cpp:

(JSC::IsoAlignedMemoryAllocator::IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::~IsoAlignedMemoryAllocator):
(JSC::IsoAlignedMemoryAllocator::tryAllocateAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::freeAlignedMemory):
(JSC::IsoAlignedMemoryAllocator::tryAllocateMemory):
(JSC::IsoAlignedMemoryAllocator::freeMemory):

  • heap/IsoAlignedMemoryAllocator.h:
  • heap/IsoSubspace.cpp:

(JSC::IsoSubspace::IsoSubspace):

  • heap/MarkedBlock.cpp:
  • heap/MarkedBlock.h:
  • heap/WeakBlock.cpp:

(JSC::WeakBlock::create):
(JSC::WeakBlock::destroy):

  • heap/WeakBlock.h:
  • jit/JITCode.cpp:
  • jit/JITCode.h:
  • jit/RegisterAtOffsetList.cpp:
  • jit/RegisterAtOffsetList.h:
  • parser/Nodes.cpp:
  • parser/Nodes.h:
  • parser/ParserArena.cpp:

(JSC::ParserArena::deallocateObjects):
(JSC::ParserArena::allocateFreeablePool):

  • parser/ParserArena.h:
  • parser/SourceProvider.cpp:
  • parser/SourceProvider.h:
  • parser/SourceProviderCache.cpp:
  • parser/SourceProviderCache.h:
  • parser/SourceProviderCacheItem.h:

(JSC::SourceProviderCacheItem::create):

  • runtime/CachePayload.cpp:

(JSC::CachePayload::makeMallocPayload):

  • runtime/CachePayload.h:
  • runtime/CachedBytecode.h:

(JSC::CachedBytecode::create):

  • runtime/CachedTypes.cpp:

(JSC::Encoder::release):
(JSC::Encoder::Page::Page):
(JSC::CachedVector::encode):
(JSC::CachedVector::decode const):
(JSC::CachedInstructionStream::decode const):

  • runtime/PropertyMapHashTable.h:

(JSC::PropertyTable::rehash):

  • runtime/PropertyTable.cpp:

(JSC::PropertyTable::PropertyTable):
(JSC::PropertyTable::~PropertyTable):

  • runtime/SymbolTable.cpp:
  • runtime/SymbolTable.h:
  • runtime/VM.cpp:

(JSC::VM::~VM):

  • runtime/VM.h:

(JSC::ScratchBuffer::create):
(JSC::VM::exceptionFuzzingBuffer):

  • wasm/WasmInstance.cpp:

(JSC::Wasm::Instance::Instance):

  • wasm/WasmInstance.h:
  • wasm/WasmTable.cpp:

(JSC::Wasm::Table::Table):
(JSC::Wasm::FuncRefTable::FuncRefTable):

  • wasm/WasmTable.h:

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/SerializedScriptValue.cpp:
  • bindings/js/SerializedScriptValue.h:
  • css/CSSFontFace.cpp:
  • css/CSSFontFace.h:
  • css/CSSSelector.cpp:
  • css/CSSSelector.h:
  • css/CSSValue.cpp:
  • css/CSSValue.h:
  • css/StyleProperties.cpp:

(WebCore::ImmutableStyleProperties::create):

  • css/StyleProperties.h:
  • css/StyleRule.cpp:
  • css/StyleRule.h:
  • dom/ElementData.cpp:

(WebCore::ShareableElementData::createWithAttributes):
(WebCore::UniqueElementData::makeShareableCopy const):

  • dom/ElementData.h:
  • dom/NodeRareData.cpp:
  • dom/NodeRareData.h:
  • dom/QualifiedName.cpp:
  • dom/QualifiedName.h:
  • html/parser/HTMLDocumentParser.cpp:
  • html/parser/HTMLDocumentParser.h:
  • loader/DocumentLoader.cpp:
  • loader/DocumentLoader.h:
  • loader/ResourceLoader.cpp:
  • loader/ResourceLoader.h:
  • loader/cache/CachedResource.cpp:
  • loader/cache/CachedResource.h:
  • page/PerformanceEntry.cpp:
  • page/PerformanceEntry.h:
  • platform/graphics/Font.cpp:
  • platform/graphics/Font.h:
  • platform/graphics/FontCascadeFonts.cpp:
  • platform/graphics/FontCascadeFonts.h:
  • platform/graphics/Region.cpp:
  • platform/graphics/Region.h:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:

(WebCore::releaseUint8Vector):

  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::ImageBuffer::ImageBuffer):

  • platform/graphics/nicosia/NicosiaBuffer.cpp:

(Nicosia::Buffer::Buffer):

  • platform/network/ResourceHandle.cpp:
  • platform/network/ResourceHandleInternal.h:
  • platform/network/cf/FormDataStreamCFNet.cpp:

(WebCore::closeCurrentStream):
(WebCore::advanceCurrentStream):

  • rendering/RenderLayer.cpp:
  • rendering/RenderLayer.h:
  • rendering/TableLayout.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
  • rendering/TableLayout.h:
  • rendering/style/RenderStyle.cpp:
  • rendering/style/RenderStyle.h:
  • rendering/style/SVGRenderStyle.cpp:
  • rendering/style/SVGRenderStyle.h:
  • rendering/style/SVGRenderStyleDefs.cpp:
  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/style/StyleBoxData.cpp:
  • rendering/style/StyleBoxData.h:
  • rendering/style/StyleInheritedData.cpp:
  • rendering/style/StyleInheritedData.h:
  • rendering/style/StyleRareInheritedData.cpp:
  • rendering/style/StyleRareInheritedData.h:
  • rendering/style/StyleRareNonInheritedData.cpp:
  • rendering/style/StyleRareNonInheritedData.h:
  • rendering/style/StyleSurroundData.cpp:
  • rendering/style/StyleSurroundData.h:
  • rendering/style/StyleTransformData.cpp:
  • rendering/style/StyleTransformData.h:
  • style/StyleTreeResolver.cpp:
  • style/StyleTreeResolver.h:
  • svg/animation/SMILTimeContainer.cpp:
  • svg/animation/SMILTimeContainer.h:

Source/WebKit:

  • Shared/ShareableBitmap.cpp:

(WebKit::ShareableBitmap::create):
(WebKit::ShareableBitmap::~ShareableBitmap):

  • UIProcess/mac/LegacySessionStateCoding.cpp:

(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::encodeSessionHistoryEntryData):
(WebKit::encodeLegacySessionState):

Source/WTF:

This patch introduces ENABLE(MALLOC_HEAP_BREAKDOWN). If this is enabled, we allocate malloc_zone per malloc kind.
This offers the way to investigate the usage of memory per kind by using vmmap, like the following.

VIRTUAL RESIDENT DIRTY SWAPPED ALLOCATION BYTES DIRTY+SWAP REGION
MALLOC ZONE SIZE SIZE SIZE SIZE COUNT ALLOCATED FRAG SIZE % FRAG COUNT
=========== ======= ========= ========= ========= ========= ========= ========= ====== ======
StringImpl_0x116efd000 188.0M 69.3M 30.9M 0K 139456 18.0M 12.9M 42% 34
DefaultMallocZone_0x10f487000 176.0M 53.9M 14.1M 0K 115956 9955K 4497K 32% 22
Vector_0x116eff000 162.0M 56.3M 55.3M 0K 140715 17.3M 37.9M 69% 36
MetadataTable_0x11843b000 152.0M 17.5M 17.5M 0K 14200 2353K 15.2M 87% 26
WebKit Using System Malloc_0x114cbe000 150.0M 31.6M 21.8M 0K 87422 16.7M 5278K 24% 23
InstructionStream_0x118469000 150.0M 5764K 5764K 0K 14470 4688K 1076K 19% 24
AssemblerData_0x117ee6000 150.0M 1928K 1928K 0K 1 16 1928K 100% 24

To achieve this goal without making very large change, we put a template type in various containers.
For example, Vector will take Malloc parameter (the default one is FastMalloc allocator). If ENABLE(MALLOC_HEAP_BREAKDOWN) is enabled, we change this to
specific VectorMalloc allocator, and vmmap can show memory usage of this allocator. This patch also supports malloc_zone per IsoHeap. So we can see memory
allocation per IsoHeap in vmmap.

To use this feature, we need to flip two compile time flags, ENABLE(MALLOC_HEAP_BREAKDOWN) in WTF and BENABLE_MALLOC_HEAP_BREAKDOWN in bmalloc.
And use vmmap $PID to dump malloc zones. To allocate objects of a class with a specific malloc-zone, use WTF_MAKE_FAST_ALLOCATED_WITH_HEAP_IDENTIFIER(HeapIdentifier) for the class,
and define allocator by DECLARE_ALLOCATOR_WITH_HEAP_IDENTIFIER(HeapIdentifier) in a header and DEFINE_ALLOCATOR_WITH_HEAP_IDENTIFIER(HeapIdentifier) in a cpp file.

This patch also introduce callstack collector for malloc. Vector, HashMap etc. are used to allocate various things, but the above malloc_zone feature only tells thing like "Vector
takes XXX MB memory". But what we want to know in this case is what Vector is consuming memory. We collect StackShot for each malloc call, and combine these information to tell
which callsite is consuming much memory, which tell us that what Vector is consuming memory.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Bag.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
  • wtf/Bag.h:

(WTF::Private::BagNode::BagNode): Deleted.

  • wtf/BitVector.cpp:

(WTF::BitVector::OutOfLineBits::create):
(WTF::BitVector::OutOfLineBits::destroy):

  • wtf/CMakeLists.txt:
  • wtf/ConcurrentBuffer.cpp: Copied from Source/JavaScriptCore/parser/SourceProviderCache.cpp.
  • wtf/ConcurrentBuffer.h:
  • wtf/DebugHeap.cpp: Copied from Source/JavaScriptCore/runtime/CachePayload.cpp.

(WTF::DebugHeap::DebugHeap):
(WTF::DebugHeap::malloc):
(WTF::DebugHeap::calloc):
(WTF::DebugHeap::memalign):
(WTF::DebugHeap::realloc):
(WTF::DebugHeap::free):

  • wtf/DebugHeap.h: Added.
  • wtf/FastBitVector.cpp:

(WTF::FastBitVectorWordOwner::setEqualsSlow):
(WTF::FastBitVectorWordOwner::resizeSlow):

  • wtf/FastBitVector.h:

(WTF::FastBitVectorWordOwner::~FastBitVectorWordOwner):

  • wtf/FastMalloc.cpp:

(WTF::fastMallocDumpMallocStats):
(WTF::AvoidRecordingScope::AvoidRecordingScope):
(WTF::AvoidRecordingScope::~AvoidRecordingScope):
(WTF::MallocCallTracker::MallocSiteData::MallocSiteData):
(WTF::MallocCallTracker::singleton):
(WTF::MallocCallTracker::MallocCallTracker):
(WTF::MallocCallTracker::recordMalloc):
(WTF::MallocCallTracker::recordRealloc):
(WTF::MallocCallTracker::recordFree):
(WTF::MallocCallTracker::dumpStats):
(WTF::fastMalloc):
(WTF::fastRealloc):
(WTF::fastFree):
(WTF::fastAlignedMalloc):
(WTF::tryFastAlignedMalloc):
(WTF::fastAlignedFree):

  • wtf/FastMalloc.h:

(WTF::FastMalloc::zeroedMalloc):
(WTF::FastMalloc::tryZeroedMalloc):

  • wtf/Forward.h:
  • wtf/HashTable.cpp:
  • wtf/HashTable.h:

(WTF::KeyTraits>::allocateTable):
(WTF::KeyTraits>::deallocateTable):
(WTF::KeyTraits>::rehash):

  • wtf/MallocPtr.h:

(WTF::MallocPtr::MallocPtr):
(WTF::MallocPtr::malloc):
(WTF::MallocPtr::zeroedMalloc):
(WTF::MallocPtr::tryMalloc):
(WTF::MallocPtr::tryZeroedMalloc):
(WTF::adoptMallocPtr):

  • wtf/MetaAllocator.cpp:

(WTF::MetaAllocator::allocFreeSpaceNode):
(WTF::MetaAllocator::freeFreeSpaceNode):

  • wtf/MetaAllocatorHandle.h:
  • wtf/Platform.h:
  • wtf/RefCountedArray.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::~RefCountedArray):
(WTF::RefCountedArray::assign):

  • wtf/SegmentedVector.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/SegmentedVector.h:
  • wtf/SmallPtrSet.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/SmallPtrSet.h:

(WTF::SmallPtrSet::~SmallPtrSet):
(WTF::SmallPtrSet::grow):

  • wtf/UniqueArray.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/UniqueArray.h:

(WTF::UniqueArrayFree::operator() const):
(WTF::UniqueArrayFree<T::operator() const):

  • wtf/Vector.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/Vector.h:

(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
(WTF::VectorBufferBase::deallocateBuffer):
(WTF::VectorBufferBase::releaseBuffer):
(WTF::VectorBuffer::releaseBuffer):
(WTF::Vector::swap):
(WTF::Malloc>::Vector):
(WTF::=):
(WTF::Malloc>::contains const):
(WTF::Malloc>::findMatching const):
(WTF::Malloc>::find const):
(WTF::Malloc>::reverseFind const):
(WTF::Malloc>::appendIfNotContains):
(WTF::Malloc>::fill):
(WTF::Malloc>::appendRange):
(WTF::Malloc>::expandCapacity):
(WTF::Malloc>::tryExpandCapacity):
(WTF::Malloc>::resize):
(WTF::Malloc>::resizeToFit):
(WTF::Malloc>::shrink):
(WTF::Malloc>::grow):
(WTF::Malloc>::asanSetInitialBufferSizeTo):
(WTF::Malloc>::asanSetBufferSizeToFullCapacity):
(WTF::Malloc>::asanBufferSizeWillChangeTo):
(WTF::Malloc>::reserveCapacity):
(WTF::Malloc>::tryReserveCapacity):
(WTF::Malloc>::reserveInitialCapacity):
(WTF::Malloc>::shrinkCapacity):
(WTF::Malloc>::append):
(WTF::Malloc>::tryAppend):
(WTF::Malloc>::constructAndAppend):
(WTF::Malloc>::tryConstructAndAppend):
(WTF::Malloc>::appendSlowCase):
(WTF::Malloc>::constructAndAppendSlowCase):
(WTF::Malloc>::tryConstructAndAppendSlowCase):
(WTF::Malloc>::uncheckedAppend):
(WTF::Malloc>::uncheckedConstructAndAppend):
(WTF::Malloc>::appendVector):
(WTF::Malloc>::insert):
(WTF::Malloc>::insertVector):
(WTF::Malloc>::remove):
(WTF::Malloc>::removeFirst):
(WTF::Malloc>::removeFirstMatching):
(WTF::Malloc>::removeAll):
(WTF::Malloc>::removeAllMatching):
(WTF::Malloc>::reverse):
(WTF::Malloc>::map const):
(WTF::Malloc>::releaseBuffer):
(WTF::Malloc>::checkConsistency):
(WTF::swap):
(WTF::operator==):
(WTF::operator!=):
(WTF::Malloc>::isolatedCopy const):
(WTF::removeRepeatedElements):
(WTF::minCapacity>::Vector): Deleted.
(WTF::minCapacity>::contains const): Deleted.
(WTF::minCapacity>::findMatching const): Deleted.
(WTF::minCapacity>::find const): Deleted.
(WTF::minCapacity>::reverseFind const): Deleted.
(WTF::minCapacity>::appendIfNotContains): Deleted.
(WTF::minCapacity>::fill): Deleted.
(WTF::minCapacity>::appendRange): Deleted.
(WTF::minCapacity>::expandCapacity): Deleted.
(WTF::minCapacity>::tryExpandCapacity): Deleted.
(WTF::minCapacity>::resize): Deleted.
(WTF::minCapacity>::resizeToFit): Deleted.
(WTF::minCapacity>::shrink): Deleted.
(WTF::minCapacity>::grow): Deleted.
(WTF::minCapacity>::asanSetInitialBufferSizeTo): Deleted.
(WTF::minCapacity>::asanSetBufferSizeToFullCapacity): Deleted.
(WTF::minCapacity>::asanBufferSizeWillChangeTo): Deleted.
(WTF::minCapacity>::reserveCapacity): Deleted.
(WTF::minCapacity>::tryReserveCapacity): Deleted.
(WTF::minCapacity>::reserveInitialCapacity): Deleted.
(WTF::minCapacity>::shrinkCapacity): Deleted.
(WTF::minCapacity>::append): Deleted.
(WTF::minCapacity>::tryAppend): Deleted.
(WTF::minCapacity>::constructAndAppend): Deleted.
(WTF::minCapacity>::tryConstructAndAppend): Deleted.
(WTF::minCapacity>::appendSlowCase): Deleted.
(WTF::minCapacity>::constructAndAppendSlowCase): Deleted.
(WTF::minCapacity>::tryConstructAndAppendSlowCase): Deleted.
(WTF::minCapacity>::uncheckedAppend): Deleted.
(WTF::minCapacity>::uncheckedConstructAndAppend): Deleted.
(WTF::minCapacity>::appendVector): Deleted.
(WTF::minCapacity>::insert): Deleted.
(WTF::minCapacity>::insertVector): Deleted.
(WTF::minCapacity>::remove): Deleted.
(WTF::minCapacity>::removeFirst): Deleted.
(WTF::minCapacity>::removeFirstMatching): Deleted.
(WTF::minCapacity>::removeAll): Deleted.
(WTF::minCapacity>::removeAllMatching): Deleted.
(WTF::minCapacity>::reverse): Deleted.
(WTF::minCapacity>::map const): Deleted.
(WTF::minCapacity>::releaseBuffer): Deleted.
(WTF::minCapacity>::checkConsistency): Deleted.
(WTF::minCapacity>::isolatedCopy const): Deleted.

  • wtf/text/CString.cpp:

(WTF::CStringBuffer::createUninitialized):

  • wtf/text/CString.h:
  • wtf/text/StringBuffer.cpp: Copied from Source/JavaScriptCore/bytecode/InstructionStream.cpp.
  • wtf/text/StringBuffer.h:

(WTF::StringBuffer::StringBuffer):
(WTF::StringBuffer::~StringBuffer):
(WTF::StringBuffer::resize):
(WTF::StringBuffer::release):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::destroy):
(WTF::StringImpl::createUninitializedInternalNonEmpty):
(WTF::StringImpl::reallocateInternal):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::StringImpl):
(WTF::StringImpl::createSubstringSharingImpl):
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::adopt):

  • wtf/text/cf/StringImplCF.cpp:

(WTF::StringWrapperCFAllocator::allocate):
(WTF::StringWrapperCFAllocator::reallocate):
(WTF::StringWrapperCFAllocator::deallocate):

5:05 PM Changeset in webkit [253986] by aestes@apple.com
  • 11 edits
    2 adds in trunk

[Payment Request] Perform payment method data IDL conversion in the PaymentRequest constructor
https://bugs.webkit.org/show_bug.cgi?id=199225
<rdar://problem/52217847>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Imported test web-platform-tests/payment-request/constructor_convert_method_data.https.html
using Tools/Scripts/import-w3c-tests.

  • web-platform-tests/payment-request/constructor_convert_method_data.https-expected.txt: Added.
  • web-platform-tests/payment-request/constructor_convert_method_data.https.html: Added.
  • web-platform-tests/payment-request/w3c-import.log:

Source/WebCore:

Implemented support for validating payment method data during Payment Request construction.
IDL conversion errors for payment method data will now trigger an exception in the
PaymentRequest constructor rather than being deferred to the show() method.

Payment Request specified this change in <https://github.com/w3c/payment-request/pull/829>.

Test: imported/w3c/web-platform-tests/payment-request/constructor_convert_method_data.https.html

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::convertAndValidate): Moved the logic for converting a JSValue to an
ApplePayRequest IDL type from ApplePayPaymentHandler::convertData to here.
(WebCore::ApplePayPaymentHandler::validateData): Added. Checks that the specified JSValue is
a valid ApplePayRequest, throwing an exception if not.
(WebCore::ApplePayPaymentHandler::convertData): Changed to use convertAndValidate to convert
from a JSValue to an ApplePayRequest.

  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.h:
  • Modules/paymentrequest/PaymentHandler.cpp:

(WebCore::PaymentHandler::validateData): Added. Calls ApplePayPaymentHandler::validateData
if Apple Pay handles the specified identifier.

  • Modules/paymentrequest/PaymentHandler.h:
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::parse): Moved up to be callable by PaymentRequest::create.
(WebCore::PaymentRequest::create): Validated that serializedData can be converted to a valid
ApplePayRequest, throwing an exception if not.

LayoutTests:

  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
  • http/tests/ssl/applepay/PaymentRequest.https.html: Changed some tests to expect exceptions

from the constructor rather than promise rejections after calling show(). Removed a bogus
test for applicationData. Cleaned up numerous tests by moving setup code to the correct
location.

4:15 PM Changeset in webkit [253985] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][Integration] Fix failing text-indent cases when the IFC root is an anonymous box
https://bugs.webkit.org/show_bug.cgi?id=205693
<rdar://problem/58284277>

Reviewed by Antti Koivisto.

During text-indent computation we would normally check if the IFC root is anonymous and if so,
whether it's the first child of its parent element.
e.g. <div><div>text</div>this text is wrapped inside an anonymous renderer</div>
The IFC root of the "this text.." content is an anonymous container and it is not
the first child of its parent renderer.
However in the LFC integration case, we can't go beyond the IFC root and check for parent-child status.

  • layout/LayoutState.h:

(WebCore::Layout::LayoutState::isIntegratedRootBoxFirstChild const):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::constraintsForLine):

  • layout/layouttree/LayoutBox.h:

(WebCore::Layout::Box::isAnonymous const):

  • layout/layouttree/LayoutTreeBuilder.cpp:

(WebCore::Layout::TreeBuilder::buildLayoutTreeForIntegration):
(WebCore::Layout::LayoutTreeContent::setRootIsFirstChild):
(WebCore::Layout::LayoutTreeContent::isRootFirstChild const):
(WebCore::Layout::TreeBuilder::createLayoutBox):

  • layout/layouttree/LayoutTreeBuilder.h:
3:28 PM Changeset in webkit [253984] by Chris Dumez
  • 13 edits
    1 copy
    5 adds in trunk

[iOS] Replace "unexpectedly resumed" observer with RunningBoard suspendible assertions
https://bugs.webkit.org/show_bug.cgi?id=205687
<rdar://problem/57890246>

Reviewed by Tim Horton.

Adopt new RunningBoard process assertion to indicate that WebContent processes depend on their
UIProcess (and therefore, the UIProcess must be running if the WebContent process is). This
replaces our "Unexpectedly resumed" assertion which was causing unexpected terminations in some
cases.

  • Configurations/WebKit.xcconfig:
  • Platform/spi/ios/RunningBoardServicesSPI.h: Added.
  • Scripts/process-entitlements.sh:
  • Shared/DependencyProcessAssertion.cpp: Added.

(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):
(WebKit::DependencyProcessAssertion::~DependencyProcessAssertion):

  • Shared/DependencyProcessAssertion.h: Added.
  • Shared/ios/DependencyProcessAssertionIOS.mm: Added.

(WebKit::DependencyProcessAssertion::DependencyProcessAssertion):
(WebKit::DependencyProcessAssertion::~DependencyProcessAssertion):

  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/Cocoa/WebProcessProxyCocoa.mm:
  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebProcessProxy.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

  • WebProcess/WebProcess.h:
  • WebProcess/cocoa/WebProcessCocoa.mm:
2:35 PM Changeset in webkit [253983] by dino@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION(r253926): Crash at libANGLE-shared.dylib: gl::LogMessage::~LogMessage
https://bugs.webkit.org/show_bug.cgi?id=205690
rdar://58279401

Reviewed by Eric Carlson.

Only enable ANGLE for iOS hardware while we investigate this fatal error.

  • wtf/Platform.h:
1:58 PM Changeset in webkit [253982] by ysuzuki@apple.com
  • 10 edits
    1 add in trunk

REGRESSION (r253867): Six test262 tests broken
https://bugs.webkit.org/show_bug.cgi?id=205583

Reviewed by Mark Lam.

JSTests:

  • stress/bound-function-empty-name.js: Added.

(shouldBe):

Source/JavaScriptCore:

If a function has empty name, a bound function should have "bound " name.
But Intl prototypes' bound functions are exceptions: these JSBoundFunctions have empty name.
In this patch, we pass nullptr for the JSBoundFunction::create's nameMayBeNull parameter of Intl prototypes' bound functions,
to generate empty string name for these bound functions instead of "bound "[1].
This fixes test262 failures.

[1]: https://tc39.es/ecma402/#sec-collator-compare-functions

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeGetterCompare):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototypeGetterFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeGetterFormat):

  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::create):
(JSC::JSBoundFunction::JSBoundFunction):
(JSC::JSBoundFunction::visitChildren):

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

(JSC::JSFunction::reifyLazyBoundNameIfNeeded):

  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::initializeCommonStrings):

  • runtime/SmallStrings.h:

(JSC::SmallStrings::boundPrefixString const):

1:43 PM Changeset in webkit [253981] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Reformat WebProcessCache logging
https://bugs.webkit.org/show_bug.cgi?id=205683
<rdar://problem/58269352>

Reviewed by Alex Christensen.

Update the format used by WebProcessCache in its RELEASE_LOG logging.
Use the format used by WebPageProxy and NetworkResourceLoader, which
is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

0x1145ed208 - WebProcessCache::canCacheProcess(): Not caching process 83671 because it does not have an associated registrable domain

becomes:

0x1145ed208 - [PID=83671] WebProcessCache::canCacheProcess: Not caching process because it does not have an associated registrable domain

No new tests - no added or changed functionality.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::canCacheProcess const):
(WebKit::WebProcessCache::addProcessIfPossible):
(WebKit::WebProcessCache::addProcess):
(WebKit::WebProcessCache::takeProcess):
(WebKit::WebProcessCache::updateCapacity):
(WebKit::WebProcessCache::clear):
(WebKit::WebProcessCache::clearAllProcessesForSession):
(WebKit::WebProcessCache::setApplicationIsActive):
(WebKit::WebProcessCache::removeProcess):

1:24 PM Changeset in webkit [253980] by Keith Rollin
  • 3 edits in trunk/Source/WebKit

Reformat ProcessThrottler logging
https://bugs.webkit.org/show_bug.cgi?id=205679
<rdar://problem/58265958>

Reviewed by Alex Christensen.

Update the format used by ProcessThrottler in its RELEASE_LOG logging.
Use the format used by WebPageProxy and NetworkResourceLoader, which
is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

[PID: 0] 0x1145ce5e8 - ProcessThrottler::invalidateAllActivities() BEGIN

becomes:

0x1145ce5e8 - [PID: 0] ProcessThrottler::invalidateAllActivities: BEGIN

No new tests - no added or changed functionality.

  • UIProcess/ProcessThrottler.cpp:

(WebKit::ProcessThrottler::invalidateAllActivities):
(WebKit::ProcessThrottler::setAssertionState):
(WebKit::ProcessThrottler::updateAssertionIfNeeded):
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::prepareToSuspendTimeoutTimerFired):
(WebKit::ProcessThrottler::processReadyToSuspend):
(WebKit::ProcessThrottler::sendPrepareToSuspendIPC):
(WebKit::ProcessThrottler::uiAssertionWillExpireImminently):

  • UIProcess/ProcessThrottler.h:

(WebKit::ProcessThrottler::Activity::Activity):
(WebKit::ProcessThrottler::Activity::invalidate):

1:21 PM Changeset in webkit [253979] by Keith Rollin
  • 2 edits in trunk/Source/WebKit

Reformat WebResourceLoader logging
https://bugs.webkit.org/show_bug.cgi?id=205680
<rdar://problem/58266105>

Reviewed by Alex Christensen.

Update the format used by WebResourceLoader in its RELEASE_LOG
logging. Use the format used by WebPageProxy and
NetworkResourceLoader, which is generally of the form:

<object-address> - [<values that help thread together operations>] <class>::<method>: <message and other useful values>

So, for example:

0x4a1dbcb58 - WebResourceLoader::didFinishResourceLoad: (webPageID=15, frameID=3, resourceID=1, length=212132)

becomes:

0x4a1dbcb58 - [webPageID=15, frameID=3, resourceID=1] WebResourceLoader::didFinishResourceLoad: (length=212132)

No new tests - no added or changed functionality.

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::serviceWorkerDidNotHandle):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didBlockAuthenticationChallenge):
(WebKit::WebResourceLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
(WebKit::WebResourceLoader::didReceiveResource):

1:14 PM Changeset in webkit [253978] by achristensen@apple.com
  • 17 edits in trunk

Add SPI to disable CORS on requests to URLs matching a pattern
https://bugs.webkit.org/show_bug.cgi?id=205534
<rdar://problem/58011337>

Reviewed by Chris Dumez.

Source/WebCore:

This should allow us to remove the layering violation in LegacySchemeRegistry::isUserExtensionScheme
and fix the bug in the radar. The SPI is exercised by a new API test.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • page/Page.cpp:

(WebCore::m_deviceOrientationUpdateProvider):
(WebCore::Page::shouldDisableCorsForRequestTo const):

  • page/Page.h:
  • page/PageConfiguration.h:
  • platform/LegacySchemeRegistry.cpp:

(WebCore::LegacySchemeRegistry::isUserExtensionScheme):

Source/WebKit:

  • Shared/WebPageCreationParameters.cpp:

(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):

  • Shared/WebPageCreationParameters.h:
  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const):
(API::PageConfiguration::PageConfiguration): Deleted.
(API::PageConfiguration::~PageConfiguration): Deleted.

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::corsDisablingPatterns const):
(API::PageConfiguration::setCORSDisablingPatterns):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _corsDisablingPatterns]):
(-[WKWebViewConfiguration _setCORSDisablingPatterns:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/WebPageProxy.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_overriddenMediaType):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
12:53 PM Changeset in webkit [253977] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[LFC][IFC] Text-indent shrinks the available horizontal space
https://bugs.webkit.org/show_bug.cgi?id=205688
<rdar://problem/58279938>

Reviewed by Antti Koivisto.

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::constraintsForLine):

12:50 PM Changeset in webkit [253976] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening for iPad

  • platform/ipad/TestExpectations:

Skip this layout test on iPad, where the zoom scale is not expected to change after focusing a text field.

11:31 AM Changeset in webkit [253975] by weinig@apple.com
  • 31 edits in trunk

Simplify StringBuilder API/align with makeString by removing appendFixed* functions and using FormatNumber struct instead
https://bugs.webkit.org/show_bug.cgi?id=205671

Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • API/tests/ExecutionTimeLimitTest.cpp:

(testExecutionTimeLimit):

  • runtime/Options.cpp:

(JSC::OptionReader::Option::dump const):
Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...)).

Source/WebCore:

  • css/CSSFontVariationValue.cpp:
  • css/CSSKeyframeRule.cpp:
  • css/CSSTimingFunctionValue.cpp:
  • css/parser/CSSParserToken.cpp:
  • html/HTMLImageElement.cpp:
  • page/scrolling/AxisScrollSnapOffsets.cpp:
  • platform/graphics/Color.cpp:
  • platform/graphics/ExtendedColor.cpp:
  • platform/graphics/ca/win/PlatformCALayerWin.cpp:
  • platform/graphics/freetype/FontCacheFreeType.cpp:
  • svg/SVGNumberList.h:
  • svg/SVGPathStringBuilder.cpp:
  • svg/SVGPointList.h:
  • svg/SVGTransformValue.h:
  • svg/properties/SVGPropertyTraits.h:
  • testing/Internals.cpp:

Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...))
and builder.appendFixedWidthNumber(...) with with builder.append(FormattedNumber::fixedWidth(...))

Source/WebKit:

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::dumpContentsToFile):

  • NetworkProcess/cache/NetworkCacheEntry.cpp:

(WebKit::NetworkCache::Entry::asJSON const):

  • Shared/Gamepad/GamepadData.cpp:

(WebKit::GamepadData::loggingString const):
Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...)).

Source/WTF:

In an ongoing attempt to simplify the StringBuilder interface and unify it's functionality with makeString,
this change removes appendFixedPrecisionNumber() and appendFixedWidthNumber(), replacing their uses
with direct calls to append(), using a FormattedNumber object to direct it to the appropriate StringTypeAdapter.

  • wtf/text/StringBuilder.h:
  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::appendFixedPrecisionNumber): Deleted.
(WTF::StringBuilder::appendFixedWidthNumber): Deleted.
Remove StringBuilder::appendFixedPrecisionNumber() and StringBuilder::appendFixedWidthNumber(). The same functionality
is available and more flexible by passing FormattedNumbers to the variadic append() function.

  • wtf/text/TextStream.cpp:

(WTF::TextStream::operator<<):

  • wtf/MediaTime.cpp:

(WTF::MediaTime::toString const):
Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...))
and builder.appendFixedWidthNumber(...) with with builder.append(FormattedNumber::fixedWidth(...))

Tools:

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

Replace all uses of builder.appendFixedPrecisionNumber(...) with builder.append(FormattedNumber::fixedPrecision(...)).

1:04 AM Changeset in webkit [253974] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit

[GTK] Make ondemand hardware acceleration policy never leave AC mode
https://bugs.webkit.org/show_bug.cgi?id=205558

Reviewed by Sergio Villar Senin.

We still enter AC mode on demand but we never leave it for the same drawing area. This avoids scrolling
performance problems with some websites that start small accelerated animation while scrolling (like WebKit
bugzilla review tool), due to constant enter/leave AC mode.

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_class_init): Update API documentation.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Force AC mode the first time we enter it.

12:08 AM Changeset in webkit [253973] by jh718.park@samsung.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Remove the build warning below since r253939.
warning: no return statement in function returning non-void [-Wreturn-type]

No new tests, no behavioral changes.

Patch by Joonghun Park <jh718.park@samsung.com> on 2020-01-01

  • platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:

(WebCore::GraphicsContext3D::mapBufferRange):

Jan 1, 2020:

3:53 PM Changeset in webkit [253972] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][Integration] Provide the viewport size when faking ICB
https://bugs.webkit.org/show_bug.cgi?id=205676
<rdar://problem/58263799>

Reviewed by Antti Koivisto.

Normally we would get the viewport size by checking the ICB, but in integration mode
the ICB is not sized to the size of the RenderView.

  • layout/LayoutState.cpp:

(WebCore::Layout::LayoutState::setViewportSize):
(WebCore::Layout::LayoutState::viewportSize const):

  • layout/LayoutState.h:
  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::prepareRootGeometryForLayout):

1:22 PM Changeset in webkit [253971] by Antti Koivisto
  • 7 edits in trunk/Source/WebCore

Make SelectorCompiler interface use CompiledSelector type
https://bugs.webkit.org/show_bug.cgi?id=205673

Reviewed by Sam Weinig.

SelectorCompiler interface is currently rather low-level, taking void* code references.
Expand use of CompiledSelector type to simplify clients.

  • cssjit/CompiledSelector.h:

(WebCore::CompiledSelector::wasUsed):

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::compileSelector):

Generate code directory to a CompiledSelector.

  • cssjit/SelectorCompiler.h:

(WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
(WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
(WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):

Take CompiledSelector.

  • dom/SelectorQuery.cpp:

(WebCore::SelectorDataList::SelectorDataList):
(WebCore::SelectorDataList::executeCompiledSimpleSelectorChecker const):
(WebCore::SelectorDataList::executeCompiledSelectorCheckerWithCheckingContext const):
(WebCore::SelectorDataList::executeCompiledSingleMultiSelectorData const):
(WebCore::SelectorDataList::compileSelector):
(WebCore::SelectorDataList::execute const):
(WebCore::isCompiledSelector): Deleted.

  • dom/SelectorQuery.h:

(WebCore::SelectorDataList::SelectorData::SelectorData): Deleted.
(WebCore::SelectorDataList::SelectorData::~SelectorData): Deleted.
(WebCore::SelectorDataList::SelectorData::compiledSelectorUsed const): Deleted.

Replace SelectorData fields with a CompiledSelector member.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::ruleMatches):

1:15 PM Changeset in webkit [253970] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

[LFC][IFC] Add support for ink overflow
https://bugs.webkit.org/show_bug.cgi?id=205674
<rdar://problem/58262376>

Reviewed by Antti Koivisto.

Add ink overflow information to Display::Run and to each Display::LineBox while
the display boxes are being created.
(Eventually we should add both scrollable and ink overflow to Display::Box)

  • layout/displaytree/DisplayInlineRect.h:

(WebCore::Display::InlineRect::expandToContain):
(WebCore::Display::InlineRect::inflate):

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::scrollableOverflow const):
(WebCore::Display::LineBox::inkOverflow const):
(WebCore::Display::LineBox::setScrollableOverflow):
(WebCore::Display::LineBox::setInkOverflow):
(WebCore::Display::LineBox::scrollableOverflowRect const): Deleted.
(WebCore::Display::LineBox::setScrollableOverflowRect): Deleted.

  • layout/displaytree/DisplayRun.h:

(WebCore::Display::Run::inkOverflow const):
(WebCore::Display::Run::Run):

  • layout/inlineformatting/InlineFormattingContext.cpp:

(WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):
(WebCore::LayoutIntegration::LineLayout::paint):
(WebCore::LayoutIntegration::computeVisualOverflow): Deleted.

  • platform/graphics/LayoutSize.h:

(WebCore::ceiledIntSize):

10:29 AM Changeset in webkit [253969] by mark.lam@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Declare some classes as final.
https://bugs.webkit.org/show_bug.cgi?id=205670

Reviewed by Sam Weinig.

There are a few "Status" classes, all of whom have static computeFor() methods.
All of these classes do not have derived classes, and are independent of each
others in terms of inheritance relationships. By explicitly declaring them as
final, we can make it clear that a call to any unqualified computeFor() methods
within one of these classes must be from the self class, and that external calls
to any given computeFor() method qualified with a class name is defined in that
class (and is not inherited from another class).

This detail may already be known to folks who are familiar with these classes.
Declaring them as final helps surface this independence for readers of the code
who is not already in the know.

  • bytecode/CallLinkStatus.h:
  • bytecode/ComplexGetStatus.h:
  • bytecode/GetByStatus.h:
  • bytecode/InByIdStatus.h:
  • bytecode/InstanceOfStatus.h:
  • bytecode/PutByIdStatus.h:
9:58 AM Changeset in webkit [253968] by jeffm@apple.com
  • 19 edits in trunk

Update user-visible copyright strings to include 2020
https://bugs.webkit.org/show_bug.cgi?id=205552

Reviewed by Darin Adler.

.:

  • Source/cmake/tools/scripts/COPYRIGHT-END-YEAR:

Source/JavaScriptCore:

  • Info.plist:

Source/WebCore:

  • Info.plist:

Source/WebKit:

  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-OSX.plist:
  • GPUProcess/EntryPoint/Cocoa/XPCService/GPUService/Info-iOS.plist:
  • Info.plist:
  • NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist:
  • NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist:
  • PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist:
  • WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist:

Source/WebKitLegacy/mac:

  • Info.plist:

WebKitLibraries:

  • win/tools/scripts/COPYRIGHT-END-YEAR:
5:05 AM Changeset in webkit [253967] by youenn@apple.com
  • 3 edits in trunk/Source/WebCore

ServiceWorkerJobData should have a move constructor
https://bugs.webkit.org/show_bug.cgi?id=205555
<rdar://problem/57853373>

Reviewed by Darin Adler.

Previously, ServiceWorkerJobData did not have a move constructor.
Refactor code to enable it.
This improves efficiency and ensures that strings and other ref counted fields are
properly moved and isolated.
Covered by existing tests.

  • workers/service/ServiceWorkerJobData.cpp:

(WebCore::ServiceWorkerJobData::isolatedCopy const):

  • workers/service/ServiceWorkerJobData.h:

(WebCore::ServiceWorkerJobData::decode):

4:55 AM Changeset in webkit [253966] by youenn@apple.com
  • 27 edits
    1 copy
    1 add in trunk

Implement transceiver setCodecPreferences
https://bugs.webkit.org/show_bug.cgi?id=190840
<rdar://problem/45496326>

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCRtpTransceiver-setCodecPreferences-expected.txt:

Source/ThirdParty/libwebrtc:

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Add binding code to pipe setCodecPreferences up to webrtc backend,
Covered by updated and rebased tests.

  • CMakeLists.txt:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • Modules/mediastream/RTCRtpCapabilities.idl:
  • Modules/mediastream/RTCRtpCodecCapability.idl: Added.
  • Modules/mediastream/RTCRtpTransceiver.cpp:

(WebCore::RTCRtpTransceiver::setCodecPreferences):

  • Modules/mediastream/RTCRtpTransceiver.h:
  • Modules/mediastream/RTCRtpTransceiver.idl:
  • Modules/mediastream/RTCRtpTransceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCObservers.h:

(WebCore::toExceptionCode): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:

(WebCore::toRtpCodecCapability):
(WebCore::LibWebRTCRtpTransceiverBackend::setCodecPreferences):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toExceptionCode):
(WebCore::toException):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/RTCRtpCapabilities.h:

(): Deleted.

  • platform/mediastream/RTCRtpCodecCapability.h: Added.
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::toRTCRtpCapabilities):

LayoutTests:

  • webrtc/video-mute-vp8.html:
3:25 AM Changeset in webkit [253965] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Make better use of HTTPHeaderValues constants
https://bugs.webkit.org/show_bug.cgi?id=205672

Patch by Rob Buis <rbuis@igalia.com> on 2020-01-01
Reviewed by Youenn Fablet.

Use HTTPHeaderValues constants instead of allocating
temporary strings.

  • Modules/websockets/ThreadableWebSocketChannel.cpp:

(WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):

  • Modules/websockets/WebSocketHandshake.cpp:

(WebCore::WebSocketHandshake::clientHandshakeRequest const):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::addExtraFieldsToRequest):

  • loader/PingLoader.cpp:

(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::createRequest):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

Dec 31, 2019:

6:27 PM Changeset in webkit [253964] by commit-queue@webkit.org
  • 32 edits
    6 copies
    8 adds in trunk

Add remote media resource loader for the GPU process
https://bugs.webkit.org/show_bug.cgi?id=205379

Patch by Peng Liu <Peng Liu> on 2019-12-31
Reviewed by Youenn Fablet.

Source/WebCore:

There are two definitions of ShouldContinue: WebCore::ScriptExecutionContext::ShouldContinue
and WebCore::ShouldContinue. This patch moves WebCore::ShouldContinue to
WebCore::PolicyChecker::ShouldContinue in order to support transmitting it in XPC messages.

Tests: media/audio-play-with-video-element.html

media/audio-play.html

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):

  • loader/FrameLoader.h:
  • loader/MediaResourceLoader.cpp:

(WebCore::MediaResource::responseReceived):

  • loader/PolicyChecker.h:
  • platform/graphics/PlatformMediaResourceLoader.h:

(WebCore::PlatformMediaResourceClient::responseReceived):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(CachedResourceStreamingClient::responseReceived):

  • platform/network/cocoa/WebCoreNSURLSession.mm:

(WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived):
(-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]):

Source/WebKit:

In the GPU process, the RemoteMediaResourceLoader creates RemoteMediaResource(s),
which will notify the media resource clients (WebCoreNSURLSessionDataTaskClient).
Then the data will be forwarded to AVFoundation.

In the Web process, MeidaResourceLoader creates MediaResource(s), which take care of
downloading media data through the network process. The received data will be forwarded to
RemoteMediaResourceProxy, which will forward the data to the corresponding RemoteMediaResource
through XPC messages.

(WebKit::GPUConnectionToWebProcess::remoteMediaResourceManager):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:
  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.cpp:

(WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy):
(WebKit::RemoteMediaPlayerProxy::requestResource):
(WebKit::RemoteMediaPlayerProxy::removeResource):
(WebKit::RemoteMediaPlayerProxy::mediaPlayerCreateResourceLoader):

  • GPUProcess/media/RemoteMediaPlayerProxy.h:

(WebKit::RemoteMediaPlayerProxy::~RemoteMediaPlayerProxy): Deleted.
(WebKit::RemoteMediaPlayerProxy::mediaPlayerLogIdentifier): Deleted.

  • GPUProcess/media/RemoteMediaResource.cpp: Added.

(WebKit::RemoteMediaResource::create):
(WebKit::RemoteMediaResource::RemoteMediaResource):
(WebKit::RemoteMediaResource::~RemoteMediaResource):
(WebKit::RemoteMediaResource::stop):
(WebKit::RemoteMediaResource::didPassAccessControlCheck const):
(WebKit::RemoteMediaResource::responseReceived):
(WebKit::RemoteMediaResource::redirectReceived):
(WebKit::RemoteMediaResource::shouldCacheResponse):
(WebKit::RemoteMediaResource::dataSent):
(WebKit::RemoteMediaResource::dataReceived):
(WebKit::RemoteMediaResource::accessControlCheckFailed):
(WebKit::RemoteMediaResource::loadFailed):
(WebKit::RemoteMediaResource::loadFinished):

  • GPUProcess/media/RemoteMediaResource.h: Added.

(WebKit::RemoteMediaResource::ready const):
(WebKit::RemoteMediaResource::setReady):

  • GPUProcess/media/RemoteMediaResourceIdentifier.h: Added.
  • GPUProcess/media/RemoteMediaResourceLoader.cpp: Added.

(WebKit::RemoteMediaResourceLoader::RemoteMediaResourceLoader):
(WebKit::RemoteMediaResourceLoader::~RemoteMediaResourceLoader):
(WebKit::RemoteMediaResourceLoader::requestResource):

  • GPUProcess/media/RemoteMediaResourceLoader.h: Added.
  • GPUProcess/media/RemoteMediaResourceManager.cpp: Added.

(WebKit::RemoteMediaResourceManager::RemoteMediaResourceManager):
(WebKit::RemoteMediaResourceManager::~RemoteMediaResourceManager):
(WebKit::RemoteMediaResourceManager::addMediaResource):
(WebKit::RemoteMediaResourceManager::removeMediaResource):
(WebKit::RemoteMediaResourceManager::responseReceived):
(WebKit::RemoteMediaResourceManager::redirectReceived):
(WebKit::RemoteMediaResourceManager::dataSent):
(WebKit::RemoteMediaResourceManager::dataReceived):
(WebKit::RemoteMediaResourceManager::accessControlCheckFailed):
(WebKit::RemoteMediaResourceManager::loadFailed):
(WebKit::RemoteMediaResourceManager::loadFinished):

  • GPUProcess/media/RemoteMediaResourceManager.h: Added.
  • GPUProcess/media/RemoteMediaResourceManager.messages.in: Added.
  • WebProcess/GPU/GPUProcessConnection.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:

(WebKit::MediaPlayerPrivateRemote::MediaPlayerPrivateRemote):
(WebKit::MediaPlayerPrivateRemote::requestResource):
(WebKit::MediaPlayerPrivateRemote::removeResource):

  • WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemoteIdentifier.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:

(WebKit::RemoteMediaPlayerManager::supportsTypeAndCodecs):
(WebKit::RemoteMediaPlayerManager::originsInMediaCache):
(WebKit::RemoteMediaPlayerManager::clearMediaCacheForOrigins):
(WebKit::RemoteMediaPlayerManager::networkStateChanged):
(WebKit::RemoteMediaPlayerManager::readyStateChanged):
(WebKit::RemoteMediaPlayerManager::volumeChanged):
(WebKit::RemoteMediaPlayerManager::muteChanged):
(WebKit::RemoteMediaPlayerManager::timeChanged):
(WebKit::RemoteMediaPlayerManager::durationChanged):
(WebKit::RemoteMediaPlayerManager::rateChanged):
(WebKit::RemoteMediaPlayerManager::playbackStateChanged):
(WebKit::RemoteMediaPlayerManager::engineFailedToLoad):
(WebKit::RemoteMediaPlayerManager::requestResource):
(WebKit::RemoteMediaPlayerManager::removeResource):

  • WebProcess/GPU/media/RemoteMediaPlayerManager.h:

(WebKit::RemoteMediaPlayerManager::didReceiveMessageFromGPUProcess):
(WebKit::RemoteMediaPlayerManager::didReceiveMessageFromWebProcess): Deleted.

  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/media/RemoteMediaResourceProxy.cpp: Added.

(WebKit::RemoteMediaResourceProxy::RemoteMediaResourceProxy):
(WebKit::RemoteMediaResourceProxy::~RemoteMediaResourceProxy):
(WebKit::RemoteMediaResourceProxy::responseReceived):
(WebKit::RemoteMediaResourceProxy::redirectReceived):
(WebKit::RemoteMediaResourceProxy::shouldCacheResponse):
(WebKit::RemoteMediaResourceProxy::dataSent):
(WebKit::RemoteMediaResourceProxy::dataReceived):
(WebKit::RemoteMediaResourceProxy::accessControlCheckFailed):
(WebKit::RemoteMediaResourceProxy::loadFailed):
(WebKit::RemoteMediaResourceProxy::loadFinished):

  • WebProcess/GPU/media/RemoteMediaResourceProxy.h: Added.

LayoutTests:

  • gpu-process/TestExpectations:
  • media/audio-play-expected.txt: Added.
  • media/audio-play-with-video-element-expected.txt: Added.
  • media/audio-play-with-video-element.html: Added.
  • media/audio-play.html: Added.
4:02 PM Changeset in webkit [253963] by Darin Adler
  • 11 edits in trunk/Source

Tidy a bit of StringBuilder usage
https://bugs.webkit.org/show_bug.cgi?id=205509

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode): Remove unneeded check that
duplicates range checking that StringBuilder::appendSubstring does.

Source/WebCore:

  • dom/Range.cpp:

(WebCore::Range::toString const): Remove redundant range checking and let the
StringBuilder::appendSubstring take care of it.

  • editing/MarkupAccumulator.cpp:

(WebCore::appendCharactersReplacingEntitiesInternal): Use appendSubstring.
(WebCore::MarkupAccumulator::appendNamespace): Use single calls to
StringBuilder::append with multiple arguments rather than multiple calls.

Source/WTF:

  • wtf/FileSystem.cpp:

(WTF::FileSystemImpl::decodeFromFilename): Fix misleading variable name "hexDigit"
for result of decoding "%+XXXX"; what's decoded is a character, not a hex digit.

  • wtf/HexNumber.h: Remove unused appendUnsignedAsHexFixedSize function for

destinations other than StringBuilder. Don't need it at this time, could add
it later if we ever decide we do.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::appendSubstring): Improved logic in appendSubstring so it
will handle even absurd values for offset and length correctly, and added a
default length of "infinity" just like in String::substring.

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::convertToLowercaseWithoutLocale): Use isASCII.
(WTF::StringImpl::convertToLowercaseWithoutLocaleStartingAtFailingIndex8Bit): Ditto.

  • wtf/text/WTFString.cpp:

(asciiDebug): Use StringBuilder to build the string; this was the one place that
used appendUnsignedAsHexFixedSize on something else, and there is no need.

2:45 PM Changeset in webkit [253962] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

[LFC][IFC] Add scrollable overflow rect to Display::LineBox
https://bugs.webkit.org/show_bug.cgi?id=205661
<rdar://problem/58256282>

Reviewed by Antti Koivisto.

Compute layout overflow rect while closing the line and adjusting the rust vertically.

  • layout/displaytree/DisplayInlineRect.h:

(WebCore::Display::InlineRect::setBottom):
(WebCore::Display::InlineRect::expandVerticallyToContain):

  • layout/displaytree/DisplayLineBox.h:

(WebCore::Display::LineBox::scrollableOverflowRect const):
(WebCore::Display::LineBox::logicalTopLeft const):
(WebCore::Display::LineBox::setScrollableOverflowRect):

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::alignContentVertically):

  • layout/integration/LayoutIntegrationLineLayout.cpp:

(WebCore::LayoutIntegration::LineLayout::collectOverflow):

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

[LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/pre-wrap-014.html
https://bugs.webkit.org/show_bug.cgi?id=205657
<rdar://problem/58254951>

Reviewed by Antti Koivisto.

Use the adjusted available width when justifying the runs during line close.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::justifyRuns const):
(WebCore::Layout::LineBuilder::alignHorizontally):

  • layout/inlineformatting/InlineLineBuilder.h:
8:51 AM Changeset in webkit [253960] by clopez@igalia.com
  • 2 edits in trunk/Tools

[WPE] OpenJPEG missing in install dependencies script.
https://bugs.webkit.org/show_bug.cgi?id=205647

Unreviewed follow-up fix.

Add also the OpenJPEG-2 package to the WPE install list.

  • wpe/install-dependencies:
8:15 AM Changeset in webkit [253959] by Antti Koivisto
  • 20 edits in trunk/Source/WebCore

StyleRule accessor in RuleData should return a const reference
https://bugs.webkit.org/show_bug.cgi?id=205655

Reviewed by Zalan Bujtas.

It is currently a non-const pointer.

This leads to StyleRule being const in many other places too.

  • css/StyleRule.h:

(WebCore::StyleRuleBase::deref const):
(WebCore::StyleRuleBase::deref): Deleted.

Make deref const, matching RefCounted and allowing RefPtr<const StyleRule>

  • editing/EditingStyle.cpp:

(WebCore::styleFromMatchedRulesForElement):

  • inspector/agents/InspectorCSSAgent.cpp:

(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):

  • inspector/agents/InspectorCSSAgent.h:
  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::matchedRuleList const):
(WebCore::Style::ElementRuleCollector::transferMatchedRules):
(WebCore::Style::ElementRuleCollector::ruleMatches):
(WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):

  • style/ElementRuleCollector.h:
  • style/InspectorCSSOMWrappers.cpp:

(WebCore::Style::InspectorCSSOMWrappers::getWrapperForRuleInSheets):

  • style/InspectorCSSOMWrappers.h:
  • style/RuleData.cpp:

(WebCore::Style::RuleData::RuleData):

  • style/RuleData.h:

(WebCore::Style::RuleData::styleRule const):
(WebCore::Style::RuleData::compiledSelector const):
(WebCore::Style::RuleData::rule const): Deleted.

  • style/RuleFeature.cpp:

(WebCore::Style::RuleFeature::RuleFeature):
(WebCore::Style::RuleFeatureSet::collectFeatures):

  • style/RuleFeature.h:

(WebCore::Style::RuleFeature::RuleFeature): Deleted.

  • style/RuleSet.cpp:

(WebCore::Style::RuleSet::addRule):
(WebCore::Style::RuleSet::addStyleRule):
(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
(WebCore::Style::RuleSet::MediaQueryCollector::addRuleIfNeeded):

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

(WebCore::Style::Resolver::styleRulesForElement):
(WebCore::Style::Resolver::pseudoStyleRulesForElement):

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

(WebCore::Style::makeRuleSet):
(WebCore::Style::ensureInvalidationRuleSets):

8:13 AM WebKitGTK/MaintenanceTips edited by Michael Catanzaro
Change insure -> ensure. Using "insure" to mean "ensure" seems archaic! (diff)
7:55 AM Changeset in webkit [253958] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC](Regression r253909) Fix fast/text/simple-line-with-br.html
https://bugs.webkit.org/show_bug.cgi?id=205653
<rdar://problem/58248900>

Reviewed by Antti Koivisto.

When the inline content is followed by a line break (e.g. text content<br>), the line
break should not initiate a new line unless the line is empty (e.g text content<br><br>).
Let's include the line break in the LineCandidateContent so that we can close the line by
adding the trailing line break (This is a partial revert of r253909).

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineCandidateContent::inlineRuns const):
(WebCore::Layout::LineCandidateContent::trailingLineBreak const):
(WebCore::Layout::LineCandidateContent::setTrailingLineBreak):
(WebCore::Layout::LineCandidateContent::append):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::nextContentForLine):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
(WebCore::Layout::LineCandidateContent::runs const): Deleted.
(WebCore::Layout::LineCandidateContent::isLineBreak const): Deleted.
(WebCore::Layout::LineCandidateContent::setIsLineBreak): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
2:00 AM Changeset in webkit [253957] by youenn@apple.com
  • 34 edits
    2 copies
    9 adds in trunk

Implement RTC VTB decoders in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=205607

Reviewed by Eric Carlson.

Source/ThirdParty/libwebrtc:

Expose remote decoder abilities with C like functions.
This allows WebProcess to implement IPC-based decoders.
Expose VTB H264 decoder as C like functions.
This allows GPU process to instantiate wasily H2664 decoders.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.h:
  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:

(webrtc::videoDecoderCallbacks):
(webrtc::setVideoDecoderCallbacks):
(webrtc::RemoteVideoDecoder::RemoteVideoDecoder):
(webrtc::RemoteVideoDecoder::decodeComplete):
(webrtc::RemoteVideoDecoder::InitDecode):
(webrtc::RemoteVideoDecoder::Decode):
(webrtc::RemoteVideoDecoder::RegisterDecodeCompleteCallback):
(webrtc::RemoteVideoDecoder::Release):
(webrtc::RemoteVideoDecoderFactory::RemoteVideoDecoderFactory):
(webrtc::RemoteVideoDecoderFactory::GetSupportedFormats const):
(webrtc::RemoteVideoDecoderFactory::CreateVideoDecoder):
(webrtc::createWebKitDecoderFactory):
(webrtc::createLocalDecoder):
(webrtc::releaseLocalDecoder):
(webrtc::decodeFrame):

  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.h:
  • Source/webrtc/sdk/objc/components/video_codec/RTCVideoDecoderH264.mm:

(-[RTCVideoDecoderH264 decode:missingFrames:codecSpecificInfo:renderTimeMs:]):
(-[RTCVideoDecoderH264 decodeData:size:timeStamp:]):

Source/WebCore:

Add routine to create a RemoveVideoSample from a pixel buffer.
Update LibWebRTCProvider to enable/disable decoding in GPU Process and add internals API.

Test: webrtc/video-gpuProcess.html

  • platform/graphics/RemoteVideoSample.cpp:

(WebCore::RemoteVideoSample::create):

  • platform/graphics/RemoteVideoSample.h:
  • platform/graphics/cv/ImageTransferSessionVT.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::LibWebRTCProvider::setUseGPUProcess):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:
  • platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h:
  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setUseGPUProcessForWebRTC):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit:

Implement decoder factory callbacks.
Implement WebProcess codecs by sending IPC for creating/releasing/decoding a frame.
WebProcess receives IPC messages from GPU Process whenever a frame is decoded.

  • Configurations/WebKit.xcconfig:
  • DerivedSources-input.xcfilelist:
  • DerivedSources-output.xcfilelist:
  • DerivedSources.make:
  • GPUProcess/GPUConnectionToWebProcess.cpp:

(WebKit::GPUConnectionToWebProcess::libWebRTCCodecsProxy):
(WebKit::GPUConnectionToWebProcess::didReceiveMessage):

  • GPUProcess/GPUConnectionToWebProcess.h:
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.h: Added.

(WebKit::LibWebRTCCodecsProxy::didReceiveMessageFromWebProcess):

  • GPUProcess/webrtc/LibWebRTCCodecsProxy.messages.in: Added.
  • GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: Added.

(WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::~LibWebRTCCodecsProxy):
(WebKit::LibWebRTCCodecsProxy::createDecoder):
(WebKit::LibWebRTCCodecsProxy::releaseDecoder):
(WebKit::LibWebRTCCodecsProxy::decodeFrame):

  • Scripts/webkit/messages.py:
  • Sources.txt:
  • SourcesCocoa.txt:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/GPU/GPUProcessConnection.cpp:

(WebKit::GPUProcessConnection::didReceiveMessage):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: Added.

(WebKit::createVideoDecoder):
(WebKit::releaseVideoDecoder):
(WebKit::decodeVideoFrame):
(WebKit::registerDecodeCompleteCallback):
(WebKit::LibWebRTCCodecs::setVideoDecoderCallbacks):
(WebKit::LibWebRTCCodecs::createDecoder):
(WebKit::LibWebRTCCodecs::releaseDecoder):
(WebKit::LibWebRTCCodecs::decodeFrame):
(WebKit::LibWebRTCCodecs::registerDecodeFrameCallback):
(WebKit::LibWebRTCCodecs::failedDecoding):
(WebKit::LibWebRTCCodecs::completedDecoding):

  • WebProcess/GPU/webrtc/LibWebRTCCodecs.h: Added.
  • WebProcess/GPU/webrtc/LibWebRTCCodecs.messages.in: Added.
  • WebProcess/GPU/webrtc/RTCDecoderIdentifier.h: Added.
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::LibWebRTCProvider::createDecoderFactory):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::libWebRTCCodecs):

  • WebProcess/WebProcess.h:

LayoutTests:

  • webrtc/video-gpuProcess-expected.txt: Added.
  • webrtc/video-gpuProcess.html: Added.

Dec 30, 2019:

9:41 PM Changeset in webkit [253956] by ysuzuki@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix after r253904
https://bugs.webkit.org/show_bug.cgi?id=205553

  • bytecompiler/BytecodeGeneratorBaseInlines.h:

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

3:53 PM Changeset in webkit [253955] by clopez@igalia.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r253896): [GTK][WPE] Broke the build with GCC-7
https://bugs.webkit.org/show_bug.cgi?id=205649

Reviewed by Mark Lam.

Add WTF_INTERNAL macro to explicitly adjust the symbol visibility.

  • llint/LLIntSlowPaths.h:
3:43 PM Changeset in webkit [253954] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] OpenJPEG missing in install dependencies script
https://bugs.webkit.org/show_bug.cgi?id=205647

Reviewed by Adrian Perez de Castro.

  • gtk/install-dependencies: Add OpenJPEG-2 package to the list.
2:16 PM Changeset in webkit [253953] by dino@apple.com
  • 1 edit in trunk/Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp

Build fix for iOS simulator.

  • platform/mediastream/mac/BaseAudioSharedUnit.cpp:
12:52 PM Changeset in webkit [253952] by eric.carlson@apple.com
  • 15 edits
    2 adds in trunk

Create media mime type cache base class to reduce duplicate code
https://bugs.webkit.org/show_bug.cgi?id=205632
<rdar://problem/58233565>

Reviewed by Jer Noble.

No new tests, no functional change.

AVStreamDataParserMIMETypeCache and AVAssetMIMETypeCache have a lot of very similar code,
so create MIMETypeCache as a base class. Also move most of the logic from
MediaPlayerPrivateMediaSourceAVFObjC::supportsType and MediaPlayerPrivateAVFoundationObjC::supportsType
in the caches.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): Call supportsContainerType.

  • platform/graphics/MIMETypeCache.cpp: Added.

(WebCore::MIMETypeCache::supportedTypes):
(WebCore::MIMETypeCache::supportsContainerType):
(WebCore::MIMETypeCache::canDecodeType):
(WebCore::MIMETypeCache::canDecodeTypePrivate):
(WebCore::MIMETypeCache::setSupportedTypes):
(WebCore::MIMETypeCache::addSupportedType):
(WebCore::MIMETypeCache::staticContainerTypeList):

  • platform/graphics/MIMETypeCache.h: Added.

(WebCore::MIMETypeCache::isUnsupportedType):
(WebCore::MIMETypeCache::isAvailable const):
(WebCore::MIMETypeCache::canDecodeTypeInternal):
(WebCore::MIMETypeCache::initializeCache):

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::encode const): Drive-by fix - add missing variable.

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

(WebCore::AVAssetMIMETypeCache::isAvailable const):
(WebCore::AVAssetMIMETypeCache::canDecodeTypeInternal):
(WebCore::AVAssetMIMETypeCache::isUnsupportedType):
(WebCore::AVAssetMIMETypeCache::staticContainerTypeList):
(WebCore::AVAssetMIMETypeCache::initializeCache):
(WebCore::AVAssetMIMETypeCache::setSupportedTypes): Moved to base class.
(WebCore::AVAssetMIMETypeCache::types): Moved to base class as supportedTypes.
(WebCore::AVAssetMIMETypeCache::supportsContentType): Renamed supportsContainerType.
(WebCore::AVAssetMIMETypeCache::canDecodeType): Moved to base class.
(WebCore::AVAssetMIMETypeCache::loadMIMETypes): Deleted.

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

(WebCore::AVStreamDataParserMIMETypeCache::canDecodeTypeInternal):
(WebCore::AVStreamDataParserMIMETypeCache::initializeCache):
(WebCore::AVStreamDataParserMIMETypeCache::types): Moved to base class as supportedTypes.
(WebCore::AVStreamDataParserMIMETypeCache::supportsContentType): Renamed supportsContainerType.
(WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Moved to base class.
(WebCore::AVStreamDataParserMIMETypeCache::loadMIMETypes): Deleted.

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

(WebCore::ImageDecoderAVFObjC::supportsContainerType): Renamed from supportsContentType.
(WebCore::ImageDecoderAVFObjC::canDecodeType):
(WebCore::ImageDecoderAVFObjC::supportsContentType): Deleted.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::getSupportedTypes):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

12:46 PM Changeset in webkit [253951] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][Integration] Do not apply trailing whitespace quirk when content is right aligned.
https://bugs.webkit.org/show_bug.cgi?id=205634
<rdar://problem/58234523>

Reviewed by Antti Koivisto.

Apparently we don't always need this quirk. See SimpleLineLayout::createLineRuns.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::removeTrailingCollapsibleContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::isTextAlignRight const):

12:23 PM Changeset in webkit [253950] by beidson@apple.com
  • 25 edits
    2 adds in trunk

Add WKWebView SPI to evaluate a function with arguments
https://bugs.webkit.org/show_bug.cgi?id=205239

Reviewed by Alex Christensen.

Source/WebCore:

Covered by new API tests.

  • Headers.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/ExceptionDetails.h:
  • bindings/js/RunJavaScriptParameters.h: Added.

(WebCore::RunJavaScriptParameters::RunJavaScriptParameters):
(WebCore::RunJavaScriptParameters::encode const):
(WebCore::RunJavaScriptParameters::decode):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::executeScriptInWorldIgnoringException):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorld):
(WebCore::ScriptController::executeUserAgentScriptInWorldInternal):
(WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld):

  • bindings/js/ScriptController.h:

XPathGrammar changes completely unrelated to the functionality of this patch,
but because of our poor #include hygiene these were necessary to keep linuxes building.

  • xml/XPathGrammar.cpp:
  • xml/XPathGrammar.y:

Source/WebKit:

  • Shared/API/APISerializedScriptValue.h:
  • UIProcess/API/C/WKPage.cpp:

(WKPageRunJavaScriptInMainFrame):

  • UIProcess/API/Cocoa/APISerializedScriptValueCocoa.mm:

(API::sharedContext):
(API::SerializedScriptValue::deserialize):
(API::SerializedScriptValue::wireBytesFromNSObject):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView evaluateJavaScript:completionHandler:]):
(validateArgument):
(-[WKWebView _evaluateJavaScript:asAsyncFunction:withArguments:forceUserGesture:completionHandler:]):
(-[WKWebView _callAsyncFunction:withArguments:completionHandler:]):
(-[WKWebView _evaluateJavaScriptWithoutUserGesture:completionHandler:]):
(-[WKWebView _evaluateJavaScript:forceUserGesture:completionHandler:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/glib/WebKitWebView.cpp:

(webkit_web_view_run_javascript):
(webkit_web_view_run_javascript_in_world):
(resourcesStreamReadCallback):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::runJavaScriptInMainFrameScriptWorld):

  • UIProcess/WebPageProxy.h:
  • UIProcess/socket/RemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::runScript):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScript):
(WebKit::WebPage::runJavaScriptInMainFrameScriptWorld):
(WebKit::WebPage::runJavaScriptInFrame):

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

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/AsyncFunction.mm: Added.

(TestWebKitAPI::TEST):

  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[WKWebView objectByCallingAsyncFunction:withArguments:error:]):

12:16 PM Changeset in webkit [253949] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Style invalidation cleanups
https://bugs.webkit.org/show_bug.cgi?id=205644

Reviewed by Zalan Bujtas.

Move more of the invalidation code from Style::Scope to Style::Invalidator.

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::invalidateStyle):
(WebCore::Style::Invalidator::invalidateAllStyle):
(WebCore::Style::Invalidator::invalidateHostAndSlottedStyleIfNeeded):

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

(WebCore::Style::Scope::analyzeStyleSheetChange):

Return StyleSheetChange struct.

(WebCore::Style::Scope::updateActiveStyleSheets):
(WebCore::Style::Scope::invalidateStyleAfterStyleSheetChange):

Use StyleSheetChange to invalidate the style.

(WebCore::Style::Scope::updateResolver):
(WebCore::Style::Scope::scheduleUpdate):
(WebCore::Style::Scope::evaluateMediaQueries):
(WebCore::Style::invalidateHostAndSlottedStyleIfNeeded): Deleted.

  • style/StyleScope.h:

(WebCore::Style::Scope::document):
(WebCore::Style::Scope::shadowRoot const):
(WebCore::Style::Scope::shadowRoot):

10:25 AM Changeset in webkit [253948] by Alan Bujtas
  • 6 edits in trunk/Source/WebCore

[LFC][IFC] Fix imported/w3c/web-platform-tests/css/css-text/white-space/white-space-wrap-after-nowrap-001.html
https://bugs.webkit.org/show_bug.cgi?id=205633
<rdar://problem/58234239>

Reviewed by Antti Koivisto.

When the LineBreaker comes back with Action::Revert (meaning that the line
needs to be reverted back to an earlier line wrap opportunity), call LineBuilder::revert and
close the line.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::tryWrappingInlineContent const): Return push when the current content can be wrapped.
(WebCore::Layout::ContinousContent::ContinousContent):
(WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const): Fix the last position logic.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::revert):
(WebCore::Layout::LineBuilder::collectHangingContent):

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

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::LineLayoutContext::layoutLine):
(WebCore::Layout::LineLayoutContext::tryAddingFloatItems):
(WebCore::Layout::LineLayoutContext::tryAddingInlineItems):
(WebCore::Layout::LineLayoutContext::addFloatItems): Deleted.
(WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit): Deleted.

  • layout/inlineformatting/LineLayoutContext.h:
9:17 AM Changeset in webkit [253947] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] Report number of total tests run and failed in API test runner like run-api-tests does
https://bugs.webkit.org/show_bug.cgi?id=205608

Reviewed by Carlos Garcia Campos.

Calculate the total number of tests (including subtests) executed
and report it at the end of the step in the same format than run-api-tests does.

  • glib/api_test_runner.py:

(TestRunner._run_test_glib): Pass the list of skipped tests instead of calculating it here to avoid calculating it twice.
(TestRunner._get_tests_from_google_test_suite): Ditto.
(TestRunner._run_google_test_suite): Ditto.
(TestRunner._run_test): Ditto.
(TestRunner.run_tests):
(TestRunner.run_tests.number_of_tests):
(TestRunner.run_tests.report):

9:10 AM Changeset in webkit [253946] by youenn@apple.com
  • 14 edits
    8 adds in trunk

Ignore URL host for schemes that are not using host information
https://bugs.webkit.org/show_bug.cgi?id=205157
Source/WebCore:

rdar://problem/57825963

Reviewed by Darin Adler.

Tests: http/tests/local/file-url-host.html

http/tests/security/about-url-host.html
http/tests/security/data-url-host.html
http/tests/security/javascript-url-host.html

Whenever setting the document URL, remove the host information if its scheme is not supposed to have a host.
This is done for file, data and about schemes.

Add internals APIs to test this.

  • dom/Document.cpp:

(WebCore::Document::setURL):

  • page/DOMWindow.h:
  • page/Location.h:
  • page/Location.idl:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::shouldIgnoreHost):

  • page/SecurityOrigin.h:
  • testing/Internals.cpp:

(WebCore::Internals::windowLocationHost):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WTF:

<rdar://problem/57825963>

Reviewed by Darin Adler.

  • wtf/URL.cpp:

(WTF::URL::removeHostAndPort):

  • wtf/URL.h:

LayoutTests:

Reviewed by Darin Adler.

  • http/tests/local/file-url-host-expected.txt: Added.
  • http/tests/local/file-url-host.html: Added.
  • http/tests/security/about-url-host-expected.txt: Added.
  • http/tests/security/about-url-host.html: Added.
  • http/tests/security/data-url-host-expected.txt: Added.
  • http/tests/security/data-url-host.html: Added.
  • http/tests/security/javascript-url-host-expected.txt: Added.
  • http/tests/security/javascript-url-host.html: Added.
9:01 AM Changeset in webkit [253945] by clopez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] support output of results in json format in API test runner.
https://bugs.webkit.org/show_bug.cgi?id=205579

Reviewed by Carlos Garcia Campos.

Write the results of the tests in json format when the option --json-output
is passed to run-gtk-tests or run-wpe-tests. Use the same format than mac's
run-api-tests.

  • glib/api_test_runner.py:

(TestRunner.run_tests):
(TestRunner.run_tests.generate_test_list_for_json_output):
(TestRunner):
(add_options):

6:45 AM Changeset in webkit [253944] by youenn@apple.com
  • 4 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

Do not build yasm for iOS and iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=205556
<rdar://problem/58159497>

Reviewed by Eric Carlson.

We want to stop compiling yasm for iOS/iOS simulator but we do not have a good way to do so right now.
Instead, compile a dummy main_noop.c for iOS/iOS simulator and build the executable with it.
This executable wil anyway not be used on these platforms.

  • Configurations/yasm.xcconfig:
  • Source/third_party/yasm/main_noop.c: Added.

(main):

  • libwebrtc.xcodeproj/project.pbxproj:

Dec 29, 2019:

9:36 PM Changeset in webkit [253943] by ysuzuki@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Remove WTF::loadLoadFence from JSFunction::rareData()
https://bugs.webkit.org/show_bug.cgi?id=205625

Reviewed by Mark Lam.

WTF::loadLoadFence() is not necessary when loading FunctionRareData from JSFunction since we ensured that stored FunctionRareData
is already baked by emitting WTF::storeStoreFence().

  • runtime/JSFunction.h:

(JSC::JSFunction::rareData const):
(JSC::JSFunction::rareData): Deleted.

  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::hasReifiedLength const):
(JSC::JSFunction::hasReifiedName const):
(JSC::JSFunction::areNameAndLengthOriginal):
(JSC::JSFunction::ensureRareDataAndAllocationProfile):

8:43 PM Changeset in webkit [253942] by ysuzuki@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix after r253938
https://bugs.webkit.org/show_bug.cgi?id=205629

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::LineBuilder::revert):

4:35 PM Changeset in webkit [253941] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Tweak the format and comment in the code to support media in GPU process
https://bugs.webkit.org/show_bug.cgi?id=205631

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

No new tests, no functional change.

Source/WebCore:

  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::platformLayer const):
(WebCore::MediaPlayerPrivateInterface::timedMetadata const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::beginLoadingMetadata):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.cpp:

(WebKit::RemoteMediaPlayerManagerProxy::logChannel const):

  • GPUProcess/media/RemoteMediaPlayerManagerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxy.h:
  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:
  • WebProcess/GPU/GPUProcessConnectionInfo.h:
  • WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
  • WebProcess/GPU/media/MediaPlayerPrivateRemoteIdentifier.h:
  • WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:
  • WebProcess/GPU/media/RemoteMediaPlayerManager.messages.in:
  • WebProcess/GPU/media/RemoteMediaPlayerState.h:
1:55 PM Changeset in webkit [253940] by eric.carlson@apple.com
  • 5 edits in trunk/Source

Cleanup media IPC encoders
https://bugs.webkit.org/show_bug.cgi?id=205630
<rdar://problem/58232173>

Reviewed by Anders Carlsson.

Source/WebCore:

No new tests, no functional change.

  • platform/graphics/MediaPlayer.h:

(WebCore::MediaEngineSupportParameters::decode):

Source/WebKit:

  • GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:

(WebKit::RemoteMediaPlayerProxyConfiguration::decode):

  • WebProcess/GPU/media/RemoteMediaPlayerConfiguration.h:

(WebKit::RemoteMediaPlayerConfiguration::decode):

1:43 PM Changeset in webkit [253939] by dino@apple.com
  • 35 edits
    2 adds
    2 deletes in trunk

[WebGL] Add a pure virtual base class for GraphicsContext3D
https://bugs.webkit.org/show_bug.cgi?id=205604

Reviewed by Sam Weinig.

Source/WebCore:

This is the first step in a series of patches to allow multiple versions
of GraphicsContext3D to exist, each using a different backend rendering
system. I've added a GraphicsContext3DBase class (that will eventually
be named GraphicsContext3D) holding all the WebGL entry points as well
as some common helper functions.

I also took the chance to move some enums into enum classes, which
makes it more obvious where things come from. I also removed some
unused interfaces: WebGLRenderingContextErrorMessageCallback and
WebGLRenderingContextLostMessageCallback.

The existing GraphicsContext3D now inherits from the base class,
but is otherwise nearly identical. The next step will be to make
different instances rather than the mix of #if macros we have now.
The virtual functions are marked "override" for now, but will become
"final" in the instances.

There should be no change in functionality.

  • Headers.cmake:
  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::cacheActiveAttribLocations):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::initializeNewContext):
(WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getContextAttributes):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::texImage2DImpl):
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid):
(WebCore::WebGLRenderingContextLostCallback::WebGLRenderingContextLostCallback): Deleted.
(WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback): Deleted.

  • html/canvas/WebGLRenderingContextBase.h:
  • platform/graphics/FormatConverter.cpp:

(WebCore::uint8_t>):
(WebCore::float>):
(WebCore::uint16_t>):
(WebCore::FormatConverter::convert):

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
(WebCore::GraphicsContext3D::extractImageData):
(WebCore::GraphicsContext3D::extractTextureData):
(WebCore::TexelBytesForFormat):
(WebCore::GraphicsContext3D::packPixels):
(WebCore::GraphicsContext3D::getClearBitsByAttachmentType): Deleted.
(WebCore::GraphicsContext3D::getClearBitsByFormat): Deleted.
(WebCore::GraphicsContext3D::getChannelBitsByFormat): Deleted.

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::ImageExtractor::imageHtmlDomSource):
(WebCore::GraphicsContext3D::platformGraphicsContext3D const): Deleted.
(WebCore::GraphicsContext3D::platformTexture const): Deleted.
(WebCore::GraphicsContext3D::platformLayer const): Deleted.
(WebCore::GraphicsContext3D::hasAlpha): Deleted.
(WebCore::GraphicsContext3D::hasColor): Deleted.
(WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData): Deleted.

  • platform/graphics/GraphicsTypes3D.h:
  • platform/graphics/angle/GraphicsContext3DANGLE.cpp:

(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::getContextAttributes): Deleted.

  • platform/graphics/cg/GraphicsContext3DCG.cpp:

(WebCore::getSourceDataFormat):
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

  • platform/graphics/cocoa/GraphicsContext3DCocoa.mm:

(WebCore::GraphicsContext3D::create):
(WebCore::GraphicsContext3D::createShared):
(WebCore::GraphicsContext3D::GraphicsContext3D):
(WebCore::GraphicsContext3D::~GraphicsContext3D):
(WebCore::GraphicsContext3D::setRenderbufferStorageFromDrawable):
(WebCore::GraphicsContext3D::makeContextCurrent):
(WebCore::GraphicsContext3D::checkGPUStatus):
(WebCore::GraphicsContext3D::presentRenderbuffer):
(WebCore::GraphicsContext3D::texImageIOSurface2D):
(WebCore::GraphicsContext3D::allocateIOSurfaceBackingStore):
(WebCore::GraphicsContext3D::updateCGLContext):
(WebCore::GraphicsContext3D::screenDidChange):
(WebCore::GraphicsContext3D::setContextLostCallback): Deleted.
(WebCore::GraphicsContext3D::setErrorMessageCallback): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]):
(-[WebGLLayer copyImageSnapshotWithColorSpace:]):
(-[WebGLLayer bindFramebufferToNextAvailableSurface]):

  • platform/graphics/cv/TextureCacheCV.mm:

(WebCore::TextureCacheCV::create):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
(WebCore::GraphicsContext3D::readPixels):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::readRenderingResults):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
(WebCore::GraphicsContext3D::getContextAttributes): Deleted.

LayoutTests:

Remove a test that has existing coverage in the WebGL test suite.

  • fast/canvas/webgl/framebuffer-object-attachment-expected.txt: Removed.
  • fast/canvas/webgl/framebuffer-object-attachment.html: Removed.
11:33 AM Changeset in webkit [253938] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[LFC][IFC] Implement LineBuilder::revert
https://bugs.webkit.org/show_bug.cgi?id=205629
<rdar://problem/58231425>

Reviewed by Antti Koivisto.

LineBuilder::revert simply removes trailing runs, shrinks the line and rebuilds the collapsible content.

  • layout/inlineformatting/InlineLineBuilder.cpp:

(WebCore::Layout::HangingContent::width const):
(WebCore::Layout::HangingContent::isConditional const):
(WebCore::Layout::HangingContent::setIsConditional):
(WebCore::Layout::HangingContent::expand):
(WebCore::Layout::HangingContent::reset):
(WebCore::Layout::LineBuilder::initialize):
(WebCore::Layout::LineBuilder::close):
(WebCore::Layout::LineBuilder::revert):
(WebCore::Layout::LineBuilder::alignHorizontally):
(WebCore::Layout::LineBuilder::collectHangingContent):

  • layout/inlineformatting/InlineLineBuilder.h:

(WebCore::Layout::LineBuilder::InlineItemRun::operator== const):
(WebCore::Layout::LineBuilder::InlineItemRun::operator!= const):
(WebCore::Layout::LineBuilder::HangingContent::width const): Deleted. Remove m_hangingContent so that revert does not need to deal with it.
(WebCore::Layout::LineBuilder::HangingContent::isConditional const): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::setIsConditional): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::expand): Deleted.
(WebCore::Layout::LineBuilder::HangingContent::reset): Deleted.

10:28 AM Changeset in webkit [253937] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Add LineBreaker::Result::Revert to indicate an earlier line wrap opportunity
https://bugs.webkit.org/show_bug.cgi?id=205623
<rdar://problem/58228339>

Reviewed by Antti Koivisto.

See webkit.org/b/205613 for more info.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::LineBreaker::Result::Result):
(WebCore::Layout::LineBreaker::tryWrappingInlineContent const):

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

(WebCore::Layout::LineLayoutContext::checkForLineWrapAndCommit):

9:38 AM Changeset in webkit [253936] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Make RuleSet refcounted
https://bugs.webkit.org/show_bug.cgi?id=205628
<rdar://problem/58231798>

Unreviewed folloup.

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::loadFullDefaultStyle):

Use deref instead of delete.

9:18 AM Changeset in webkit [253935] by Antti Koivisto
  • 10 edits in trunk/Source/WebCore

Make RuleSet refcounted
https://bugs.webkit.org/show_bug.cgi?id=205628

Reviewed by Zalan Bujtas.

For safety, and to support shared ownership.

Also convert a bunch of places that use raw RuleSet pointers to use Ref/RefPtr instead.

  • style/ElementRuleCollector.cpp:

(WebCore::Style::ElementRuleCollector::collectMatchingAuthorRules):
(WebCore::Style::ElementRuleCollector::collectSlottedPseudoElementRulesForSlot):
(WebCore::Style::ElementRuleCollector::matchUserRules):

  • style/ElementRuleCollector.h:
  • style/RuleSet.cpp:

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

  • style/RuleSet.h:

(WebCore::Style::RuleSet::create):
(WebCore::Style::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair): Deleted.

  • style/StyleInvalidator.cpp:

(WebCore::Style::Invalidator::Invalidator):
(WebCore::Style::Invalidator::collectRuleInformation):
(WebCore::Style::Invalidator::invalidateIfNeeded):
(WebCore::Style::Invalidator::addToMatchElementRuleSets):

  • style/StyleInvalidator.h:
  • style/StyleScopeRuleSets.cpp:

(WebCore::Style::ScopeRuleSets::ScopeRuleSets):
(WebCore::Style::ScopeRuleSets::updateUserAgentMediaQueryStyleIfNeeded const):
(WebCore::Style::ScopeRuleSets::initializeUserStyle):
(WebCore::Style::makeRuleSet):
(WebCore::Style::ScopeRuleSets::resetAuthorStyle):
(WebCore::Style::ensureInvalidationRuleSets):

  • style/StyleScopeRuleSets.h:

(WebCore::Style::ScopeRuleSets::authorStyle const):

  • style/UserAgentStyle.cpp:

(WebCore::Style::UserAgentStyle::loadFullDefaultStyle):
(WebCore::Style::UserAgentStyle::loadSimpleDefaultStyle):

7:59 AM Changeset in webkit [253934] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

[LFC][IFC] Move soft wrap opportunity code out of LineBreaker
https://bugs.webkit.org/show_bug.cgi?id=205621
<rdar://problem/58227670>

Reviewed by Antti Koivisto.

Let's not mix soft and line wrap opportunity logic.

  • layout/inlineformatting/InlineLineBreaker.cpp:

(WebCore::Layout::ContinousContent::runs const):
(WebCore::Layout::ContinousContent::isEmpty const):
(WebCore::Layout::ContinousContent::size const):
(WebCore::Layout::ContinousContent::width const):
(WebCore::Layout::ContinousContent::nonCollapsibleWidth const):
(WebCore::Layout::ContinousContent::hasTrailingCollapsibleContent const):
(WebCore::Layout::ContinousContent::isTrailingContentFullyCollapsible const):
(WebCore::Layout::LineBreaker::wrapTextContent const):
(WebCore::Layout::ContinousContent::ContinousContent):
(WebCore::Layout::ContinousContent::hasTextContentOnly const):
(WebCore::Layout::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const):
(WebCore::Layout::ContinousContent::firstTextRunIndex const):
(WebCore::Layout::ContinousContent::lastContentRunIndex const):
(WebCore::Layout::ContinousContent::hasNonContentRunsOnly const):
(WebCore::Layout::ContinousContent::lastWrapOpportunityIndex const):
(WebCore::Layout::ContinousContent::TrailingCollapsibleContent::reset):
(WebCore::Layout::endsWithSoftWrapOpportunity): Deleted.
(WebCore::Layout::isAtSoftWrapOpportunity): Deleted.
(WebCore::Layout::LineBreaker::nextWrapOpportunity): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::ContinousContent): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasTextContentOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isVisuallyEmptyWhitespaceContentOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::firstTextRunIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::lastContentRunIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasNonContentRunsOnly const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::lastWrapOpportunityIndex const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::TrailingCollapsibleContent::reset): Deleted.

  • layout/inlineformatting/InlineLineBreaker.h:

(WebCore::Layout::LineBreaker::ContinousContent::runs const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isEmpty const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::size const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::width const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::nonCollapsibleWidth const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::hasTrailingCollapsibleContent const): Deleted.
(WebCore::Layout::LineBreaker::ContinousContent::isTrailingContentFullyCollapsible const): Deleted.

  • layout/inlineformatting/LineLayoutContext.cpp:

(WebCore::Layout::endsWithSoftWrapOpportunity):
(WebCore::Layout::isAtSoftWrapOpportunity):
(WebCore::Layout::nextWrapOpportunity):
(WebCore::Layout::LineLayoutContext::nextContentForLine):

Note: See TracTimeline for information about the timeline view.