WebKit-https.git
3 months agoFrameLoader::open can execute scritps via style recalc in Frame::setDocument
rniwa@webkit.org [Tue, 13 Aug 2019 05:18:11 +0000 (05:18 +0000)]
FrameLoader::open can execute scritps via style recalc in Frame::setDocument
https://bugs.webkit.org/show_bug.cgi?id=200377

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed the bug that FrameLoader::open can execute arbitrary author scripts via post style update callbacks
by adding PostResolutionCallbackDisabler, WidgetHierarchyUpdatesSuspensionScope, and NavigationDisabler
to CachedFrameBase::restore and FrameLoader::open.

This ensures all frames are restored from the page cache before any of them would start running scripts.

Test: fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html

* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::open):
* page/FrameViewLayoutContext.cpp:
(WebCore::FrameViewLayoutContext::layout): Fixed the debug assertion. The layout of a document may be
updated while we're preparing to put a page into the page cache.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers): Ditto.

LayoutTests:

Added a regression test.

* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update-expected.txt: Added.
* fast/frames/restoring-page-cache-should-not-run-scripts-via-style-update.html: Added.
* platform/win/TestExpectations: Skip the newly added test.

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

3 months agoREGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer...
drousso@apple.com [Tue, 13 Aug 2019 03:56:37 +0000 (03:56 +0000)]
REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
https://bugs.webkit.org/show_bug.cgi?id=200564

Reviewed by Joseph Pecoraro.

`WI.resolvedLayoutDirection` was called before `WI.runBootstrapOperations`, which is what
instantiates `WI.showDebugUISetting`. Without it, `WI.resolvedLayoutDirection` will ignore
the value of `WI.settings.debugLayoutDirection` and instead use the system.

Moving the instantiation of `WI.showDebugUISetting` outside `WI.runBootstrapOperations`
allows the setting to be created when the Bootstrap.js script is loaded, rather than after
the `DOMContentLoaded` event is fired. This means that it's guaranteed to exist before any
interface/view code runs.

* UserInterface/Debug/Bootstrap.js:
(WI.runBootstrapOperations):

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

3 months agoWeb Inspector: remove WI.DeprecatedRemoteObjectProperty
drousso@apple.com [Tue, 13 Aug 2019 03:54:38 +0000 (03:54 +0000)]
Web Inspector: remove WI.DeprecatedRemoteObjectProperty
https://bugs.webkit.org/show_bug.cgi?id=200549

Reviewed by Joseph Pecoraro.

* UserInterface/Protocol/RemoteObject.js:
(WI.RemoteObject.prototype.deprecatedGetOwnProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetAllProperties): Deleted.
(WI.RemoteObject.prototype.deprecatedGetDisplayableProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetProperties): Deleted.
(WI.RemoteObject.prototype._deprecatedGetPropertiesResolver): Deleted.
(WI.DeprecatedRemoteObjectProperty): Deleted.
(WI.DeprecatedRemoteObjectProperty.prototype.fromPrimitiveValue): Deleted.

* UserInterface/Models/CallFrame.js:
(WI.CallFrame.prototype.collectScopeChainVariableNames):

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):

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

3 months agoWeb Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when...
drousso@apple.com [Tue, 13 Aug 2019 03:52:38 +0000 (03:52 +0000)]
Web Inspector: REGRESSION(r248201): DOMDebugger: unable to add event breakpoint when All Events breakpoint is enabled
https://bugs.webkit.org/show_bug.cgi?id=200561

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):

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

3 months agoWeb Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolvi...
drousso@apple.com [Tue, 13 Aug 2019 03:50:40 +0000 (03:50 +0000)]
Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolving DOM breakpoints for newly added nodes
https://bugs.webkit.org/show_bug.cgi?id=200639

Reviewed by Joseph Pecoraro.

Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
enable all breakpoints.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._nodeInserted):

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

3 months ago[WTF] Thread::removeFromThreadGroup leaks weak pointers.
commit-queue@webkit.org [Tue, 13 Aug 2019 03:01:11 +0000 (03:01 +0000)]
[WTF] Thread::removeFromThreadGroup leaks weak pointers.
https://bugs.webkit.org/show_bug.cgi?id=199857

Patch by Takashi Komori <Takashi.Komori@sony.com> on 2019-08-12
Reviewed by Yusuke Suzuki.

Source/WTF:

Fix leaking of ThreadGroup's weak pointers.

Tests: WTF.ThreadGroupRemove API tests

* wtf/Threading.cpp:
(WTF::Thread::didExit):
(WTF::Thread::addToThreadGroup):
(WTF::Thread::removeFromThreadGroup):
(WTF::Thread::numberOfThreadGroups):
* wtf/Threading.h:

Tools:

* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
(TestWebKitAPI::countThreadGroups):
(TestWebKitAPI::TEST):

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

3 months agoFix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy()
cdumez@apple.com [Tue, 13 Aug 2019 01:23:20 +0000 (01:23 +0000)]
Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy()
https://bugs.webkit.org/show_bug.cgi?id=200646

Reviewed by Alex Christensen.

Fix bad RELEASE_LOG_ERROR under ProvisionalPageProxy::ProvisionalPageProxy(). Should be a
simple RELEASE_LOG() as this is not an error.

* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::ProvisionalPageProxy):

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

3 months agoAX: Homebrew is not allowed to run any script under sudo.
commit-queue@webkit.org [Tue, 13 Aug 2019 00:52:49 +0000 (00:52 +0000)]
AX: Homebrew is not allowed to run any script under sudo.
https://bugs.webkit.org/show_bug.cgi?id=173801

Patch by Alexey Shvayka <shvaikalesh@gmail.com> on 2019-08-12
Reviewed by Carlos Alberto Lopez Perez.

Latest versions of Homebrew throw an error when run as root.
Dependencies are successfully installed w/o `sudo` on macOS, so skip it.

* gtk/install-dependencies:

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

3 months ago[REGRESSION] run-webkit-tests: No PID defined when searching for simulator crashlogs
jbedard@apple.com [Mon, 12 Aug 2019 23:43:55 +0000 (23:43 +0000)]
[REGRESSION] run-webkit-tests: No PID defined when searching for simulator crashlogs
https://bugs.webkit.org/show_bug.cgi?id=200644

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess._start): Define system PID after launching app.

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

3 months agoReplace multiparameter overloads of append() in StringBuilder as a first step toward...
weinig@apple.com [Mon, 12 Aug 2019 23:09:06 +0000 (23:09 +0000)]
Replace multiparameter overloads of append() in StringBuilder as a first step toward standardizinging on the flexibleAppend() implementation
https://bugs.webkit.org/show_bug.cgi?id=200614

Reviewed by Darin Adler.

Renames StringBuilder::append(const LChar*, unsigned), StringBuilder::append(const UChar*, unsigned) and
StringBuilder::append(const char*, unsigned) to StringBuilder::appendCharacters(...).

Renames StringBuilder::append(const String& string, unsigned offset, unsigned length) to
StringBuilder::appendSubstring(...).

Source/JavaScriptCore:

* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* runtime/ConfigFile.cpp:
(JSC::ConfigFile::parse):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
* tools/FunctionOverrides.cpp:
(JSC::parseClause):
Update for renames.

Source/WebCore:

* dom/Range.cpp:
(WebCore::Range::toString const):
* editing/Editing.cpp:
(WebCore::stringWithRebalancedWhitespace):
* editing/MarkupAccumulator.cpp:
(WebCore::appendCharactersReplacingEntitiesInternal):
* editing/TextIterator.cpp:
(WebCore::TextIteratorCopyableText::appendToStringBuilder const):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
* html/parser/HTMLTokenizer.cpp:
(WebCore::HTMLTokenizer::bufferedCharacters const):
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
* platform/text/SegmentedString.cpp:
(WebCore::SegmentedString::Substring::appendTo const):
* platform/text/TextCodecICU.cpp:
(WebCore::TextCodecICU::decode):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::writeToStringBuilder):
Update for renames.

Source/WebKit:

* Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::setAndSerializeSandboxParameters):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::didReceiveInvalidMessage):
Update for renames.

Source/WTF:

* wtf/HexNumber.h:
(WTF::appendUnsignedAsHexFixedSize):
Add overload that explicitly takes a StringBuilder to work around rename from append to appendCharacters.

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendCharacters):
(WTF::StringBuilder::append):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::appendCharacters):
(WTF::StringBuilder::append):
(WTF::StringBuilder::appendSubstring):
(WTF::StringBuilder::appendLiteral):
(WTF::IntegerToStringConversionTrait<StringBuilder>::flush):
Update for renames.

Tools:

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
(TestWebKitAPI::TEST):
Update for renames.

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

3 months agoContextual menu Hide and Show Link Previews should not have a symbol
dino@apple.com [Mon, 12 Aug 2019 22:23:03 +0000 (22:23 +0000)]
Contextual menu Hide and Show Link Previews should not have a symbol
https://bugs.webkit.org/show_bug.cgi?id=200645
<rdar://problem/54129647>

Reviewed by Wenson Hsieh.

Don't use an image on the UIMenuItem.

* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction imageForElementActionType:]): Return nil for Show/Hide Link Previews.

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

3 months agoUnreviewed, add missing WTF::initializeMainThread() call to fix some crashes on the...
cdumez@apple.com [Mon, 12 Aug 2019 21:43:00 +0000 (21:43 +0000)]
Unreviewed, add missing WTF::initializeMainThread() call to fix some crashes on the bots after r248533.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):

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

3 months agoFix Crash in Mail Search
megan_gardner@apple.com [Mon, 12 Aug 2019 21:40:56 +0000 (21:40 +0000)]
Fix Crash in Mail Search
https://bugs.webkit.org/show_bug.cgi?id=200589
Source/WebKit:

<rdar://problem/53666720>

Reviewed by Tim Horton.

If we search in Mail backwards first, for AppKit reasons
we get a -1 for the index of the found item.
Do not try and insert data in this case.

* UIProcess/mac/WKTextFinderClient.mm:

Tools:

Reviewed by Tim Horton.

If you search backwards first in mail, we would crash,
this tests that codepath.

* TestWebKitAPI/Tests/WebKitCocoa/FindInPage.mm:
(TEST):

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

3 months ago[WPE][GTK] Fix building without unified sources
aperez@igalia.com [Mon, 12 Aug 2019 21:37:16 +0000 (21:37 +0000)]
[WPE][GTK] Fix building without unified sources
https://bugs.webkit.org/show_bug.cgi?id=200641

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

* b3/B3PatchpointSpecial.cpp: Add missing inclusion of the B3ProcedureInlines.h header.
* heap/SlotVisitor.cpp: Add missing inclusion of the BlockDirectoryInlines.h header.

Source/WebCore:

* CMakeLists.txt: Add WebCore as the list of libraries to link into WebCoreTestSupport, to
avoid underlinking, which makes it possible to link with LDFLAGS="-Wl,--no-undefined".
* editing/WebCorePasteboardFileReader.h: Add missing inclusion of the pal/SessionID.h
header.

Source/WebKit:

* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Add missing inclusions for headers
WebCore/GtkUtilities.h (for convertWidgetPointToScreenPoint), WebCore/IntPoint.h, and
WebPageProxy.h (the two latter to avoid usage of undefined types).
(WebKit::WebDataListSuggestionsDropdownGtk::show): Add namespace prefix to use
WebCore::IntPoint.

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

3 months ago[WTF][JSC] Make JSC and WTF aggressively-fast-malloced
ysuzuki@apple.com [Mon, 12 Aug 2019 20:57:15 +0000 (20:57 +0000)]
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced
https://bugs.webkit.org/show_bug.cgi?id=200611

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes.
After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper
function and throw a compile error if `T` is not FastMalloc annotated[1].

Putting WebKit classes in FastMalloc has many benefits.

1. Simply, it is fast.
2. vmmap can tell the amount of memory used for WebKit.
3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory
   from the memory corruption crash.

[1]: https://bugs.webkit.org/show_bug.cgi?id=200620

* API/ObjCCallbackFunction.mm:
* assembler/AbstractMacroAssembler.h:
* b3/B3PhiChildren.h:
* b3/air/AirAllocateRegistersAndStackAndGenerateCode.h:
* b3/air/AirDisassembler.h:
* bytecode/AccessCaseSnippetParams.h:
* bytecode/CallVariant.h:
* bytecode/DeferredSourceDump.h:
* bytecode/ExecutionCounter.h:
* bytecode/GetByIdStatus.h:
* bytecode/GetByIdVariant.h:
* bytecode/InByIdStatus.h:
* bytecode/InByIdVariant.h:
* bytecode/InstanceOfStatus.h:
* bytecode/InstanceOfVariant.h:
* bytecode/PutByIdStatus.h:
* bytecode/PutByIdVariant.h:
* bytecode/ValueProfile.h:
* dfg/DFGAbstractInterpreter.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::newVariableAccessData):
* dfg/DFGFlowIndexing.h:
* dfg/DFGFlowMap.h:
* dfg/DFGLiveCatchVariablePreservationPhase.cpp:
(JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData):
* dfg/DFGMaximalFlushInsertionPhase.cpp:
(JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData):
* dfg/DFGOSRExit.h:
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGVariableAccessData.h:
* disassembler/ARM64/A64DOpcode.h:
* inspector/remote/socket/RemoteInspectorMessageParser.h:
* inspector/remote/socket/RemoteInspectorSocket.h:
* inspector/remote/socket/RemoteInspectorSocketEndpoint.h:
* jit/PCToCodeOriginMap.h:
* runtime/BasicBlockLocation.h:
* runtime/DoublePredictionFuzzerAgent.h:
* runtime/JSRunLoopTimer.h:
* runtime/PromiseDeferredTimer.h:
(JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>.
Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>).
* runtime/RandomizingFuzzerAgent.h:
* runtime/SymbolTable.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* tools/JSDollarVM.cpp:
* tools/SigillCrashAnalyzer.cpp:
* wasm/WasmFormat.h:
* wasm/WasmMemory.cpp:
* wasm/WasmSignature.h:
* yarr/YarrJIT.h:

Source/WebCore:

Changed the accessor since we changed std::unique_ptr to Ref for this field.

No behavior change.

* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::addTimerSetNotification):
(WebCore::WorkerScriptController::removeTimerSetNotification):

Source/WTF:

WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`.
Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED
more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited.

* wtf/Assertions.cpp:
* wtf/Atomics.h:
* wtf/AutodrainedPool.h:
* wtf/Bag.h:
(WTF::Bag::Bag): Deleted.
(WTF::Bag::~Bag): Deleted.
(WTF::Bag::clear): Deleted.
(WTF::Bag::add): Deleted.
(WTF::Bag::iterator::iterator): Deleted.
(WTF::Bag::iterator::operator! const): Deleted.
(WTF::Bag::iterator::operator* const): Deleted.
(WTF::Bag::iterator::operator++): Deleted.
(WTF::Bag::iterator::operator== const): Deleted.
(WTF::Bag::iterator::operator!= const): Deleted.
(WTF::Bag::begin): Deleted.
(WTF::Bag::begin const): Deleted.
(WTF::Bag::end const): Deleted.
(WTF::Bag::isEmpty const): Deleted.
(WTF::Bag::unwrappedHead const): Deleted.
* wtf/BitVector.h:
(WTF::BitVector::BitVector): Deleted.
(WTF::BitVector::~BitVector): Deleted.
(WTF::BitVector::operator=): Deleted.
(WTF::BitVector::size const): Deleted.
(WTF::BitVector::ensureSize): Deleted.
(WTF::BitVector::quickGet const): Deleted.
(WTF::BitVector::quickSet): Deleted.
(WTF::BitVector::quickClear): Deleted.
(WTF::BitVector::get const): Deleted.
(WTF::BitVector::contains const): Deleted.
(WTF::BitVector::set): Deleted.
(WTF::BitVector::add): Deleted.
(WTF::BitVector::ensureSizeAndSet): Deleted.
(WTF::BitVector::clear): Deleted.
(WTF::BitVector::remove): Deleted.
(WTF::BitVector::merge): Deleted.
(WTF::BitVector::filter): Deleted.
(WTF::BitVector::exclude): Deleted.
(WTF::BitVector::bitCount const): Deleted.
(WTF::BitVector::isEmpty const): Deleted.
(WTF::BitVector::findBit const): Deleted.
(WTF::BitVector::isEmptyValue const): Deleted.
(WTF::BitVector::isDeletedValue const): Deleted.
(WTF::BitVector::isEmptyOrDeletedValue const): Deleted.
(WTF::BitVector::operator== const): Deleted.
(WTF::BitVector::hash const): Deleted.
(WTF::BitVector::iterator::iterator): Deleted.
(WTF::BitVector::iterator::operator* const): Deleted.
(WTF::BitVector::iterator::operator++): Deleted.
(WTF::BitVector::iterator::isAtEnd const): Deleted.
(WTF::BitVector::iterator::operator== const): Deleted.
(WTF::BitVector::iterator::operator!= const): Deleted.
(WTF::BitVector::begin const): Deleted.
(WTF::BitVector::end const): Deleted.
(WTF::BitVector::bitsInPointer): Deleted.
(WTF::BitVector::maxInlineBits): Deleted.
(WTF::BitVector::byteCount): Deleted.
(WTF::BitVector::makeInlineBits): Deleted.
(WTF::BitVector::cleanseInlineBits): Deleted.
(WTF::BitVector::bitCount): Deleted.
(WTF::BitVector::findBitFast const): Deleted.
(WTF::BitVector::findBitSimple const): Deleted.
(WTF::BitVector::OutOfLineBits::numBits const): Deleted.
(WTF::BitVector::OutOfLineBits::numWords const): Deleted.
(WTF::BitVector::OutOfLineBits::bits): Deleted.
(WTF::BitVector::OutOfLineBits::bits const): Deleted.
(WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted.
(WTF::BitVector::isInline const): Deleted.
(WTF::BitVector::outOfLineBits const): Deleted.
(WTF::BitVector::outOfLineBits): Deleted.
(WTF::BitVector::bits): Deleted.
(WTF::BitVector::bits const): Deleted.
* wtf/Bitmap.h:
(WTF::Bitmap::size): Deleted.
(WTF::Bitmap::iterator::iterator): Deleted.
(WTF::Bitmap::iterator::operator* const): Deleted.
(WTF::Bitmap::iterator::operator++): Deleted.
(WTF::Bitmap::iterator::operator== const): Deleted.
(WTF::Bitmap::iterator::operator!= const): Deleted.
(WTF::Bitmap::begin const): Deleted.
(WTF::Bitmap::end const): Deleted.
* wtf/Box.h:
* wtf/BumpPointerAllocator.h:
* wtf/CPUTime.h:
* wtf/CheckedBoolean.h:
* wtf/CommaPrinter.h:
(WTF::CommaPrinter::CommaPrinter): Deleted.
(WTF::CommaPrinter::dump const): Deleted.
(WTF::CommaPrinter::didPrint const): Deleted.
* wtf/CompactPointerTuple.h:
(WTF::CompactPointerTuple::encodeType): Deleted.
(WTF::CompactPointerTuple::decodeType): Deleted.
(WTF::CompactPointerTuple::CompactPointerTuple): Deleted.
(WTF::CompactPointerTuple::pointer const): Deleted.
(WTF::CompactPointerTuple::setPointer): Deleted.
(WTF::CompactPointerTuple::type const): Deleted.
(WTF::CompactPointerTuple::setType): Deleted.
* wtf/CompilationThread.h:
(WTF::CompilationScope::CompilationScope): Deleted.
(WTF::CompilationScope::~CompilationScope): Deleted.
(WTF::CompilationScope::leaveEarly): Deleted.
* wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):
(WTF::Detail::CallableWrapper<CompletionHandler<Out):
(WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted.
(WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted.
(WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted.
* wtf/ConcurrentBuffer.h:
(WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted.
(WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted.
(WTF::ConcurrentBuffer::growExact): Deleted.
(WTF::ConcurrentBuffer::grow): Deleted.
(WTF::ConcurrentBuffer::array const): Deleted.
(WTF::ConcurrentBuffer::operator[]): Deleted.
(WTF::ConcurrentBuffer::operator[] const): Deleted.
(WTF::ConcurrentBuffer::createArray): Deleted.
* wtf/ConcurrentPtrHashSet.h:
(WTF::ConcurrentPtrHashSet::contains): Deleted.
(WTF::ConcurrentPtrHashSet::add): Deleted.
(WTF::ConcurrentPtrHashSet::size const): Deleted.
(WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted.
(WTF::ConcurrentPtrHashSet::hash): Deleted.
(WTF::ConcurrentPtrHashSet::cast): Deleted.
(WTF::ConcurrentPtrHashSet::containsImpl const): Deleted.
(WTF::ConcurrentPtrHashSet::addImpl): Deleted.
* wtf/ConcurrentVector.h:
(WTF::ConcurrentVector::~ConcurrentVector): Deleted.
(WTF::ConcurrentVector::size const): Deleted.
(WTF::ConcurrentVector::isEmpty const): Deleted.
(WTF::ConcurrentVector::at): Deleted.
(WTF::ConcurrentVector::at const): Deleted.
(WTF::ConcurrentVector::operator[]): Deleted.
(WTF::ConcurrentVector::operator[] const): Deleted.
(WTF::ConcurrentVector::first): Deleted.
(WTF::ConcurrentVector::first const): Deleted.
(WTF::ConcurrentVector::last): Deleted.
(WTF::ConcurrentVector::last const): Deleted.
(WTF::ConcurrentVector::takeLast): Deleted.
(WTF::ConcurrentVector::append): Deleted.
(WTF::ConcurrentVector::alloc): Deleted.
(WTF::ConcurrentVector::removeLast): Deleted.
(WTF::ConcurrentVector::grow): Deleted.
(WTF::ConcurrentVector::begin): Deleted.
(WTF::ConcurrentVector::end): Deleted.
(WTF::ConcurrentVector::segmentExistsFor): Deleted.
(WTF::ConcurrentVector::segmentFor): Deleted.
(WTF::ConcurrentVector::subscriptFor): Deleted.
(WTF::ConcurrentVector::ensureSegmentsFor): Deleted.
(WTF::ConcurrentVector::ensureSegment): Deleted.
(WTF::ConcurrentVector::allocateSegment): Deleted.
* wtf/Condition.h:
(WTF::Condition::waitUntil): Deleted.
(WTF::Condition::waitFor): Deleted.
(WTF::Condition::wait): Deleted.
(WTF::Condition::notifyOne): Deleted.
(WTF::Condition::notifyAll): Deleted.
* wtf/CountingLock.h:
(WTF::CountingLock::LockHooks::lockHook): Deleted.
(WTF::CountingLock::LockHooks::unlockHook): Deleted.
(WTF::CountingLock::LockHooks::parkHook): Deleted.
(WTF::CountingLock::LockHooks::handoffHook): Deleted.
(WTF::CountingLock::tryLock): Deleted.
(WTF::CountingLock::lock): Deleted.
(WTF::CountingLock::unlock): Deleted.
(WTF::CountingLock::isHeld const): Deleted.
(WTF::CountingLock::isLocked const): Deleted.
(WTF::CountingLock::Count::operator bool const): Deleted.
(WTF::CountingLock::Count::operator== const): Deleted.
(WTF::CountingLock::Count::operator!= const): Deleted.
(WTF::CountingLock::tryOptimisticRead): Deleted.
(WTF::CountingLock::validate): Deleted.
(WTF::CountingLock::doOptimizedRead): Deleted.
(WTF::CountingLock::tryOptimisticFencelessRead): Deleted.
(WTF::CountingLock::fencelessValidate): Deleted.
(WTF::CountingLock::doOptimizedFencelessRead): Deleted.
(WTF::CountingLock::getCount): Deleted.
* wtf/CrossThreadQueue.h:
* wtf/CrossThreadTask.h:
* wtf/CryptographicallyRandomNumber.cpp:
* wtf/DataMutex.h:
* wtf/DateMath.h:
* wtf/Deque.h:
(WTF::Deque::size const): Deleted.
(WTF::Deque::isEmpty const): Deleted.
(WTF::Deque::begin): Deleted.
(WTF::Deque::end): Deleted.
(WTF::Deque::begin const): Deleted.
(WTF::Deque::end const): Deleted.
(WTF::Deque::rbegin): Deleted.
(WTF::Deque::rend): Deleted.
(WTF::Deque::rbegin const): Deleted.
(WTF::Deque::rend const): Deleted.
(WTF::Deque::first): Deleted.
(WTF::Deque::first const): Deleted.
(WTF::Deque::last): Deleted.
(WTF::Deque::last const): Deleted.
(WTF::Deque::append): Deleted.
* wtf/Dominators.h:
* wtf/DoublyLinkedList.h:
* wtf/Expected.h:
* wtf/FastBitVector.h:
* wtf/FileMetadata.h:
* wtf/FileSystem.h:
* wtf/GraphNodeWorklist.h:
* wtf/GregorianDateTime.h:
(WTF::GregorianDateTime::GregorianDateTime): Deleted.
(WTF::GregorianDateTime::year const): Deleted.
(WTF::GregorianDateTime::month const): Deleted.
(WTF::GregorianDateTime::yearDay const): Deleted.
(WTF::GregorianDateTime::monthDay const): Deleted.
(WTF::GregorianDateTime::weekDay const): Deleted.
(WTF::GregorianDateTime::hour const): Deleted.
(WTF::GregorianDateTime::minute const): Deleted.
(WTF::GregorianDateTime::second const): Deleted.
(WTF::GregorianDateTime::utcOffset const): Deleted.
(WTF::GregorianDateTime::isDST const): Deleted.
(WTF::GregorianDateTime::setYear): Deleted.
(WTF::GregorianDateTime::setMonth): Deleted.
(WTF::GregorianDateTime::setYearDay): Deleted.
(WTF::GregorianDateTime::setMonthDay): Deleted.
(WTF::GregorianDateTime::setWeekDay): Deleted.
(WTF::GregorianDateTime::setHour): Deleted.
(WTF::GregorianDateTime::setMinute): Deleted.
(WTF::GregorianDateTime::setSecond): Deleted.
(WTF::GregorianDateTime::setUtcOffset): Deleted.
(WTF::GregorianDateTime::setIsDST): Deleted.
(WTF::GregorianDateTime::operator tm const): Deleted.
(WTF::GregorianDateTime::copyFrom): Deleted.
* wtf/HashTable.h:
* wtf/Hasher.h:
* wtf/HexNumber.h:
* wtf/Indenter.h:
* wtf/IndexMap.h:
* wtf/IndexSet.h:
* wtf/IndexSparseSet.h:
* wtf/IndexedContainerIterator.h:
* wtf/Insertion.h:
* wtf/IteratorAdaptors.h:
* wtf/IteratorRange.h:
* wtf/KeyValuePair.h:
* wtf/ListHashSet.h:
(WTF::ListHashSet::begin): Deleted.
(WTF::ListHashSet::end): Deleted.
(WTF::ListHashSet::begin const): Deleted.
(WTF::ListHashSet::end const): Deleted.
(WTF::ListHashSet::random): Deleted.
(WTF::ListHashSet::random const): Deleted.
(WTF::ListHashSet::rbegin): Deleted.
(WTF::ListHashSet::rend): Deleted.
(WTF::ListHashSet::rbegin const): Deleted.
(WTF::ListHashSet::rend const): Deleted.
* wtf/Liveness.h:
* wtf/LocklessBag.h:
(WTF::LocklessBag::LocklessBag): Deleted.
(WTF::LocklessBag::add): Deleted.
(WTF::LocklessBag::iterate): Deleted.
(WTF::LocklessBag::consumeAll): Deleted.
(WTF::LocklessBag::consumeAllWithNode): Deleted.
(WTF::LocklessBag::~LocklessBag): Deleted.
* wtf/LoggingHashID.h:
* wtf/MD5.h:
* wtf/MachSendRight.h:
* wtf/MainThreadData.h:
* wtf/Markable.h:
* wtf/MediaTime.h:
* wtf/MemoryPressureHandler.h:
* wtf/MessageQueue.h:
(WTF::MessageQueue::MessageQueue): Deleted.
* wtf/MetaAllocator.h:
* wtf/MonotonicTime.h:
(WTF::MonotonicTime::MonotonicTime): Deleted.
(WTF::MonotonicTime::fromRawSeconds): Deleted.
(WTF::MonotonicTime::infinity): Deleted.
(WTF::MonotonicTime::nan): Deleted.
(WTF::MonotonicTime::secondsSinceEpoch const): Deleted.
(WTF::MonotonicTime::approximateMonotonicTime const): Deleted.
(WTF::MonotonicTime::operator bool const): Deleted.
(WTF::MonotonicTime::operator+ const): Deleted.
(WTF::MonotonicTime::operator- const): Deleted.
(WTF::MonotonicTime::operator% const): Deleted.
(WTF::MonotonicTime::operator+=): Deleted.
(WTF::MonotonicTime::operator-=): Deleted.
(WTF::MonotonicTime::operator== const): Deleted.
(WTF::MonotonicTime::operator!= const): Deleted.
(WTF::MonotonicTime::operator< const): Deleted.
(WTF::MonotonicTime::operator> const): Deleted.
(WTF::MonotonicTime::operator<= const): Deleted.
(WTF::MonotonicTime::operator>= const): Deleted.
(WTF::MonotonicTime::isolatedCopy const): Deleted.
(WTF::MonotonicTime::encode const): Deleted.
(WTF::MonotonicTime::decode): Deleted.
* wtf/NaturalLoops.h:
* wtf/NoLock.h:
* wtf/OSAllocator.h:
* wtf/OptionSet.h:
* wtf/Optional.h:
* wtf/OrderMaker.h:
* wtf/Packed.h:
(WTF::alignof):
* wtf/PackedIntVector.h:
(WTF::PackedIntVector::PackedIntVector): Deleted.
(WTF::PackedIntVector::operator=): Deleted.
(WTF::PackedIntVector::size const): Deleted.
(WTF::PackedIntVector::ensureSize): Deleted.
(WTF::PackedIntVector::resize): Deleted.
(WTF::PackedIntVector::clearAll): Deleted.
(WTF::PackedIntVector::get const): Deleted.
(WTF::PackedIntVector::set): Deleted.
(WTF::PackedIntVector::mask): Deleted.
* wtf/PageBlock.h:
* wtf/ParallelJobsOpenMP.h:
* wtf/ParkingLot.h:
* wtf/PriorityQueue.h:
(WTF::PriorityQueue::size const): Deleted.
(WTF::PriorityQueue::isEmpty const): Deleted.
(WTF::PriorityQueue::enqueue): Deleted.
(WTF::PriorityQueue::peek const): Deleted.
(WTF::PriorityQueue::dequeue): Deleted.
(WTF::PriorityQueue::decreaseKey): Deleted.
(WTF::PriorityQueue::increaseKey): Deleted.
(WTF::PriorityQueue::begin const): Deleted.
(WTF::PriorityQueue::end const): Deleted.
(WTF::PriorityQueue::isValidHeap const): Deleted.
(WTF::PriorityQueue::parentOf): Deleted.
(WTF::PriorityQueue::leftChildOf): Deleted.
(WTF::PriorityQueue::rightChildOf): Deleted.
(WTF::PriorityQueue::siftUp): Deleted.
(WTF::PriorityQueue::siftDown): Deleted.
* wtf/RandomDevice.h:
* wtf/Range.h:
* wtf/RangeSet.h:
(WTF::RangeSet::RangeSet): Deleted.
(WTF::RangeSet::~RangeSet): Deleted.
(WTF::RangeSet::add): Deleted.
(WTF::RangeSet::contains const): Deleted.
(WTF::RangeSet::overlaps const): Deleted.
(WTF::RangeSet::clear): Deleted.
(WTF::RangeSet::dump const): Deleted.
(WTF::RangeSet::dumpRaw const): Deleted.
(WTF::RangeSet::begin const): Deleted.
(WTF::RangeSet::end const): Deleted.
(WTF::RangeSet::addAll): Deleted.
(WTF::RangeSet::compact): Deleted.
(WTF::RangeSet::overlapsNonEmpty): Deleted.
(WTF::RangeSet::subsumesNonEmpty): Deleted.
(WTF::RangeSet::findRange const): Deleted.
* wtf/RecursableLambda.h:
* wtf/RedBlackTree.h:
(WTF::RedBlackTree::Node::successor const): Deleted.
(WTF::RedBlackTree::Node::predecessor const): Deleted.
(WTF::RedBlackTree::Node::successor): Deleted.
(WTF::RedBlackTree::Node::predecessor): Deleted.
(WTF::RedBlackTree::Node::reset): Deleted.
(WTF::RedBlackTree::Node::parent const): Deleted.
(WTF::RedBlackTree::Node::setParent): Deleted.
(WTF::RedBlackTree::Node::left const): Deleted.
(WTF::RedBlackTree::Node::setLeft): Deleted.
(WTF::RedBlackTree::Node::right const): Deleted.
(WTF::RedBlackTree::Node::setRight): Deleted.
(WTF::RedBlackTree::Node::color const): Deleted.
(WTF::RedBlackTree::Node::setColor): Deleted.
(WTF::RedBlackTree::RedBlackTree): Deleted.
(WTF::RedBlackTree::insert): Deleted.
(WTF::RedBlackTree::remove): Deleted.
(WTF::RedBlackTree::findExact const): Deleted.
(WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted.
(WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted.
(WTF::RedBlackTree::first const): Deleted.
(WTF::RedBlackTree::last const): Deleted.
(WTF::RedBlackTree::size): Deleted.
(WTF::RedBlackTree::isEmpty): Deleted.
(WTF::RedBlackTree::treeMinimum): Deleted.
(WTF::RedBlackTree::treeMaximum): Deleted.
(WTF::RedBlackTree::treeInsert): Deleted.
(WTF::RedBlackTree::leftRotate): Deleted.
(WTF::RedBlackTree::rightRotate): Deleted.
(WTF::RedBlackTree::removeFixup): Deleted.
* wtf/ResourceUsage.h:
* wtf/RunLoop.cpp:
* wtf/RunLoopTimer.h:
* wtf/SHA1.h:
* wtf/Seconds.h:
(WTF::Seconds::Seconds): Deleted.
(WTF::Seconds::value const): Deleted.
(WTF::Seconds::minutes const): Deleted.
(WTF::Seconds::seconds const): Deleted.
(WTF::Seconds::milliseconds const): Deleted.
(WTF::Seconds::microseconds const): Deleted.
(WTF::Seconds::nanoseconds const): Deleted.
(WTF::Seconds::minutesAs const): Deleted.
(WTF::Seconds::secondsAs const): Deleted.
(WTF::Seconds::millisecondsAs const): Deleted.
(WTF::Seconds::microsecondsAs const): Deleted.
(WTF::Seconds::nanosecondsAs const): Deleted.
(WTF::Seconds::fromMinutes): Deleted.
(WTF::Seconds::fromHours): Deleted.
(WTF::Seconds::fromMilliseconds): Deleted.
(WTF::Seconds::fromMicroseconds): Deleted.
(WTF::Seconds::fromNanoseconds): Deleted.
(WTF::Seconds::infinity): Deleted.
(WTF::Seconds::nan): Deleted.
(WTF::Seconds::operator bool const): Deleted.
(WTF::Seconds::operator+ const): Deleted.
(WTF::Seconds::operator- const): Deleted.
(WTF::Seconds::operator* const): Deleted.
(WTF::Seconds::operator/ const): Deleted.
(WTF::Seconds::operator% const): Deleted.
(WTF::Seconds::operator+=): Deleted.
(WTF::Seconds::operator-=): Deleted.
(WTF::Seconds::operator*=): Deleted.
(WTF::Seconds::operator/=): Deleted.
(WTF::Seconds::operator%=): Deleted.
(WTF::Seconds::operator== const): Deleted.
(WTF::Seconds::operator!= const): Deleted.
(WTF::Seconds::operator< const): Deleted.
(WTF::Seconds::operator> const): Deleted.
(WTF::Seconds::operator<= const): Deleted.
(WTF::Seconds::operator>= const): Deleted.
(WTF::Seconds::isolatedCopy const): Deleted.
(WTF::Seconds::encode const): Deleted.
(WTF::Seconds::decode): Deleted.
* wtf/SegmentedVector.h:
(WTF::SegmentedVector::~SegmentedVector): Deleted.
(WTF::SegmentedVector::size const): Deleted.
(WTF::SegmentedVector::isEmpty const): Deleted.
(WTF::SegmentedVector::at): Deleted.
(WTF::SegmentedVector::at const): Deleted.
(WTF::SegmentedVector::operator[]): Deleted.
(WTF::SegmentedVector::operator[] const): Deleted.
(WTF::SegmentedVector::first): Deleted.
(WTF::SegmentedVector::first const): Deleted.
(WTF::SegmentedVector::last): Deleted.
(WTF::SegmentedVector::last const): Deleted.
(WTF::SegmentedVector::takeLast): Deleted.
(WTF::SegmentedVector::append): Deleted.
(WTF::SegmentedVector::alloc): Deleted.
(WTF::SegmentedVector::removeLast): Deleted.
(WTF::SegmentedVector::grow): Deleted.
(WTF::SegmentedVector::clear): Deleted.
(WTF::SegmentedVector::begin): Deleted.
(WTF::SegmentedVector::end): Deleted.
(WTF::SegmentedVector::shrinkToFit): Deleted.
(WTF::SegmentedVector::deleteAllSegments): Deleted.
(WTF::SegmentedVector::segmentExistsFor): Deleted.
(WTF::SegmentedVector::segmentFor): Deleted.
(WTF::SegmentedVector::subscriptFor): Deleted.
(WTF::SegmentedVector::ensureSegmentsFor): Deleted.
(WTF::SegmentedVector::ensureSegment): Deleted.
(WTF::SegmentedVector::allocateSegment): Deleted.
* wtf/SetForScope.h:
* wtf/SingleRootGraph.h:
* wtf/SinglyLinkedList.h:
* wtf/SmallPtrSet.h:
* wtf/SpanningTree.h:
* wtf/Spectrum.h:
* wtf/StackBounds.h:
* wtf/StackShot.h:
* wtf/StackShotProfiler.h:
* wtf/StackStats.h:
* wtf/StackTrace.h:
* wtf/StreamBuffer.h:
* wtf/SynchronizedFixedQueue.h:
(WTF::SynchronizedFixedQueue::create): Deleted.
(WTF::SynchronizedFixedQueue::open): Deleted.
(WTF::SynchronizedFixedQueue::close): Deleted.
(WTF::SynchronizedFixedQueue::isOpen): Deleted.
(WTF::SynchronizedFixedQueue::enqueue): Deleted.
(WTF::SynchronizedFixedQueue::dequeue): Deleted.
(WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted.
* wtf/SystemTracing.h:
* wtf/ThreadGroup.h:
(WTF::ThreadGroup::create): Deleted.
(WTF::ThreadGroup::threads const): Deleted.
(WTF::ThreadGroup::getLock): Deleted.
(WTF::ThreadGroup::weakFromThis): Deleted.
* wtf/ThreadSpecific.h:
* wtf/ThreadingPrimitives.h:
(WTF::Mutex::impl): Deleted.
* wtf/TimeWithDynamicClockType.h:
(WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted.
(WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted.
(WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted.
(WTF::TimeWithDynamicClockType::clockType const): Deleted.
(WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted.
(WTF::TimeWithDynamicClockType::operator bool const): Deleted.
(WTF::TimeWithDynamicClockType::operator+ const): Deleted.
(WTF::TimeWithDynamicClockType::operator- const): Deleted.
(WTF::TimeWithDynamicClockType::operator+=): Deleted.
(WTF::TimeWithDynamicClockType::operator-=): Deleted.
(WTF::TimeWithDynamicClockType::operator== const): Deleted.
(WTF::TimeWithDynamicClockType::operator!= const): Deleted.
* wtf/TimingScope.h:
* wtf/TinyLRUCache.h:
* wtf/TinyPtrSet.h:
* wtf/URLParser.cpp:
* wtf/URLParser.h:
* wtf/Unexpected.h:
* wtf/Variant.h:
* wtf/WTFSemaphore.h:
(WTF::Semaphore::Semaphore): Deleted.
(WTF::Semaphore::signal): Deleted.
(WTF::Semaphore::waitUntil): Deleted.
(WTF::Semaphore::waitFor): Deleted.
(WTF::Semaphore::wait): Deleted.
* wtf/WallTime.h:
(WTF::WallTime::WallTime): Deleted.
(WTF::WallTime::fromRawSeconds): Deleted.
(WTF::WallTime::infinity): Deleted.
(WTF::WallTime::nan): Deleted.
(WTF::WallTime::secondsSinceEpoch const): Deleted.
(WTF::WallTime::approximateWallTime const): Deleted.
(WTF::WallTime::operator bool const): Deleted.
(WTF::WallTime::operator+ const): Deleted.
(WTF::WallTime::operator- const): Deleted.
(WTF::WallTime::operator+=): Deleted.
(WTF::WallTime::operator-=): Deleted.
(WTF::WallTime::operator== const): Deleted.
(WTF::WallTime::operator!= const): Deleted.
(WTF::WallTime::operator< const): Deleted.
(WTF::WallTime::operator> const): Deleted.
(WTF::WallTime::operator<= const): Deleted.
(WTF::WallTime::operator>= const): Deleted.
(WTF::WallTime::isolatedCopy const): Deleted.
* wtf/WeakHashSet.h:
(WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted.
(WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted.
(WTF::WeakHashSet::WeakHashSet): Deleted.
(WTF::WeakHashSet::begin const): Deleted.
(WTF::WeakHashSet::end const): Deleted.
(WTF::WeakHashSet::add): Deleted.
(WTF::WeakHashSet::remove): Deleted.
(WTF::WeakHashSet::contains const): Deleted.
(WTF::WeakHashSet::capacity const): Deleted.
(WTF::WeakHashSet::computesEmpty const): Deleted.
(WTF::WeakHashSet::hasNullReferences const): Deleted.
(WTF::WeakHashSet::computeSize const): Deleted.
(WTF::WeakHashSet::checkConsistency const): Deleted.
* wtf/WeakRandom.h:
(WTF::WeakRandom::WeakRandom): Deleted.
(WTF::WeakRandom::setSeed): Deleted.
(WTF::WeakRandom::seed const): Deleted.
(WTF::WeakRandom::get): Deleted.
(WTF::WeakRandom::getUint32): Deleted.
(WTF::WeakRandom::lowOffset): Deleted.
(WTF::WeakRandom::highOffset): Deleted.
(WTF::WeakRandom::nextState): Deleted.
(WTF::WeakRandom::generate): Deleted.
(WTF::WeakRandom::advance): Deleted.
* wtf/WordLock.h:
(WTF::WordLock::lock): Deleted.
(WTF::WordLock::unlock): Deleted.
(WTF::WordLock::isHeld const): Deleted.
(WTF::WordLock::isLocked const): Deleted.
(WTF::WordLock::isFullyReset const): Deleted.
* wtf/generic/MainThreadGeneric.cpp:
* wtf/glib/GMutexLocker.h:
* wtf/linux/CurrentProcessMemoryStatus.h:
* wtf/posix/ThreadingPOSIX.cpp:
(WTF::Semaphore::Semaphore): Deleted.
(WTF::Semaphore::~Semaphore): Deleted.
(WTF::Semaphore::wait): Deleted.
(WTF::Semaphore::post): Deleted.
* wtf/text/ASCIILiteral.h:
(WTF::ASCIILiteral::operator const char* const): Deleted.
(WTF::ASCIILiteral::fromLiteralUnsafe): Deleted.
(WTF::ASCIILiteral::null): Deleted.
(WTF::ASCIILiteral::characters const): Deleted.
(WTF::ASCIILiteral::ASCIILiteral): Deleted.
* wtf/text/AtomString.h:
(WTF::AtomString::operator=): Deleted.
(WTF::AtomString::isHashTableDeletedValue const): Deleted.
(WTF::AtomString::existingHash const): Deleted.
(WTF::AtomString::operator const String& const): Deleted.
(WTF::AtomString::string const): Deleted.
(WTF::AtomString::impl const): Deleted.
(WTF::AtomString::is8Bit const): Deleted.
(WTF::AtomString::characters8 const): Deleted.
(WTF::AtomString::characters16 const): Deleted.
(WTF::AtomString::length const): Deleted.
(WTF::AtomString::operator[] const): Deleted.
(WTF::AtomString::contains const): Deleted.
(WTF::AtomString::containsIgnoringASCIICase const): Deleted.
(WTF::AtomString::find const): Deleted.
(WTF::AtomString::findIgnoringASCIICase const): Deleted.
(WTF::AtomString::startsWith const): Deleted.
(WTF::AtomString::startsWithIgnoringASCIICase const): Deleted.
(WTF::AtomString::endsWith const): Deleted.
(WTF::AtomString::endsWithIgnoringASCIICase const): Deleted.
(WTF::AtomString::toInt const): Deleted.
(WTF::AtomString::toDouble const): Deleted.
(WTF::AtomString::toFloat const): Deleted.
(WTF::AtomString::percentage const): Deleted.
(WTF::AtomString::isNull const): Deleted.
(WTF::AtomString::isEmpty const): Deleted.
(WTF::AtomString::operator NSString * const): Deleted.
* wtf/text/AtomStringImpl.h:
(WTF::AtomStringImpl::lookUp): Deleted.
(WTF::AtomStringImpl::add): Deleted.
(WTF::AtomStringImpl::addWithStringTableProvider): Deleted.
* wtf/text/CString.h:
(WTF::CStringBuffer::data): Deleted.
(WTF::CStringBuffer::length const): Deleted.
(WTF::CStringBuffer::CStringBuffer): Deleted.
(WTF::CStringBuffer::mutableData): Deleted.
(WTF::CString::CString): Deleted.
(WTF::CString::data const): Deleted.
(WTF::CString::length const): Deleted.
(WTF::CString::isNull const): Deleted.
(WTF::CString::buffer const): Deleted.
(WTF::CString::isHashTableDeletedValue const): Deleted.
* wtf/text/ExternalStringImpl.h:
(WTF::ExternalStringImpl::freeExternalBuffer): Deleted.
* wtf/text/LineBreakIteratorPoolICU.h:
* wtf/text/NullTextBreakIterator.h:
* wtf/text/OrdinalNumber.h:
* wtf/text/StringBuffer.h:
* wtf/text/StringBuilder.h:
* wtf/text/StringConcatenateNumbers.h:
* wtf/text/StringHasher.h:
* wtf/text/StringImpl.h:
* wtf/text/StringView.cpp:
* wtf/text/StringView.h:
(WTF::StringView::left const): Deleted.
(WTF::StringView::right const): Deleted.
(WTF::StringView::underlyingStringIsValid const): Deleted.
(WTF::StringView::setUnderlyingString): Deleted.
* wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted.
(WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted.
(WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted.
(WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted.
(WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted.
(WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted.
* wtf/text/SymbolRegistry.h:
* wtf/text/TextBreakIterator.h:
* wtf/text/TextPosition.h:
* wtf/text/TextStream.h:
* wtf/text/WTFString.h:
(WTF::String::swap): Deleted.
(WTF::String::adopt): Deleted.
(WTF::String::isNull const): Deleted.
(WTF::String::isEmpty const): Deleted.
(WTF::String::impl const): Deleted.
(WTF::String::releaseImpl): Deleted.
(WTF::String::length const): Deleted.
(WTF::String::characters8 const): Deleted.
(WTF::String::characters16 const): Deleted.
(WTF::String::is8Bit const): Deleted.
(WTF::String::sizeInBytes const): Deleted.
(WTF::String::operator[] const): Deleted.
(WTF::String::find const): Deleted.
(WTF::String::findIgnoringASCIICase const): Deleted.
(WTF::String::reverseFind const): Deleted.
(WTF::String::contains const): Deleted.
(WTF::String::containsIgnoringASCIICase const): Deleted.
(WTF::String::startsWith const): Deleted.
(WTF::String::startsWithIgnoringASCIICase const): Deleted.
(WTF::String::hasInfixStartingAt const): Deleted.
(WTF::String::endsWith const): Deleted.
(WTF::String::endsWithIgnoringASCIICase const): Deleted.
(WTF::String::hasInfixEndingAt const): Deleted.
(WTF::String::append): Deleted.
(WTF::String::left const): Deleted.
(WTF::String::right const): Deleted.
(WTF::String::createUninitialized): Deleted.
(WTF::String::fromUTF8WithLatin1Fallback): Deleted.
(WTF::String::isAllASCII const): Deleted.
(WTF::String::isAllLatin1 const): Deleted.
(WTF::String::isSpecialCharacter const): Deleted.
(WTF::String::isHashTableDeletedValue const): Deleted.
(WTF::String::hash const): Deleted.
(WTF::String::existingHash const): Deleted.
* wtf/text/cf/TextBreakIteratorCF.h:
* wtf/text/icu/TextBreakIteratorICU.h:
* wtf/text/icu/UTextProviderLatin1.h:
* wtf/threads/BinarySemaphore.h:
(WTF::BinarySemaphore::waitFor): Deleted.
(WTF::BinarySemaphore::wait): Deleted.
* wtf/unicode/Collator.h:
* wtf/win/GDIObject.h:
* wtf/win/PathWalker.h:
* wtf/win/Win32Handle.h:

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

3 months agoUnreviewed, fix post landing review comments for r248533 from Darin.
cdumez@apple.com [Mon, 12 Aug 2019 20:15:26 +0000 (20:15 +0000)]
Unreviewed, fix post landing review comments for r248533 from Darin.

* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::applyRefDerefThreadingCheck const):
(WTF::RefCountedBase::derefBase const):
(WTF::RefCountedBase::areThreadingCheckedEnabled const): Deleted.

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

3 months agoClear m_sessionStorageNamespaces on the background thread
sihui_liu@apple.com [Mon, 12 Aug 2019 19:46:40 +0000 (19:46 +0000)]
Clear m_sessionStorageNamespaces on the background thread
https://bugs.webkit.org/show_bug.cgi?id=200631
<rdar://problem/54149638>

Reviewed by Chris Dumez.

Network process receives messages about web page state from web process and destroys sessionStorageNamespace if
needed. It also receives messages about session state from UI process and destroys StorageManager, which owns
SessionStorageNamespaces, if needed. Because of the race in receiving the messages from different processes,
network process may decide to destroy StorageManager before destroying all SessionStorageNamespaces, and
SessionStorageNamespaces are destroyed with StorageManager on the main thread.

* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::waitUntilTasksFinished):

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

3 months agoRemove an assertion in ~StorageArea()
sihui_liu@apple.com [Mon, 12 Aug 2019 19:33:53 +0000 (19:33 +0000)]
Remove an assertion in ~StorageArea()
https://bugs.webkit.org/show_bug.cgi?id=200630
<rdar://problem/54097722>

Reviewed by Chris Dumez.

In r247370, we clear the LocalStorageNamespace before the destructor of LocalStorageNamespace is invoked, to
make sure StorageArea gets destroyed on the background thread.
StorageArea can get destroyed before LocalStorageNamespace, so the assertion in ~StorageArea() is not true any
more.

* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::~StorageArea):

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

3 months ago[iPadOS] Web pages sometimes load at half width in Safari
wenson_hsieh@apple.com [Mon, 12 Aug 2019 19:31:21 +0000 (19:31 +0000)]
[iPadOS] Web pages sometimes load at half width in Safari
https://bugs.webkit.org/show_bug.cgi?id=200624
<rdar://problem/52694257>

Reviewed by Simon Fraser.

Source/WebKit:

Whenever WKWebView's size changes, it normally notifies the web content process by calling into WebPageProxy::
setViewportConfigurationViewLayoutSize, which remembers this view layout size using a member variable,
m_viewportConfigurationViewLayoutSize. Later, m_viewportConfigurationViewLayoutSize is consulted as a part of
constructing the creation parameters used to set up a new page.

However, during animated resize, WKWebView avoids these calls to setViewportConfigurationViewLayoutSize via the
dynamic viewport update mode check in -[WKWebView _frameOrBoundsChanged]. Instead, the new view layout size is
pushed to the web process by calling WebPageProxy::dynamicViewportSizeUpdate.

Since dynamicViewportSizeUpdate doesn't update m_viewportConfigurationViewLayoutSize, the next
WebPageCreationParameters that are created with this WebPageProxy (e.g. after a process swap, or after
reloading, if the process was terminated) will use the size of the WKWebView prior to the most recent animated
resize.

To fix the bug, we simply make sure that m_viewportConfigurationViewLayoutSize is updated in the dynamic
viewport size update (i.e. animated resize) case as well.

Test: WebKit.CreateWebPageAfterAnimatedResize

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):

Tools:

Add an API test to verify that after performing an animated resize and killing the web process, the subsequent
web page is created using the post-animated-resize web view dimensions, rather than the original layout
dimensions.

* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:

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

3 months agoCrash under NetworkResourceLoader::start()
cdumez@apple.com [Mon, 12 Aug 2019 19:22:24 +0000 (19:22 +0000)]
Crash under NetworkResourceLoader::start()
https://bugs.webkit.org/show_bug.cgi?id=200628

Reviewed by Youenn Fablet.

Make sure the NetworkResourceLoader is still alive when the lambda passed to NetworkLoadChecker::check()
gets executed.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
* NetworkProcess/NetworkResourceLoader.h:

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

3 months agoWeb Inspector: Elements: Styles: add space between media query and style icon
drousso@apple.com [Mon, 12 Aug 2019 19:17:56 +0000 (19:17 +0000)]
Web Inspector: Elements: Styles: add space between media query and style icon
https://bugs.webkit.org/show_bug.cgi?id=200623

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
(.spreadsheet-css-declaration .header:not(:first-child), .spreadsheet-css-declaration .header:not(.editing-selector) .selector, .spreadsheet-css-declaration.has-icon .header.editing-selector .selector): Added.
(.spreadsheet-css-declaration .header.editing-selector .selector): Deleted.
Ensure the selector field doesn't shift vertically when entering/exiting editing mode.

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

3 months agoMake Blob::m_size an Optional
youenn@apple.com [Mon, 12 Aug 2019 19:13:17 +0000 (19:13 +0000)]
Make Blob::m_size an Optional
https://bugs.webkit.org/show_bug.cgi?id=200617

Reviewed by Alex Christensen.

Use an Optional instead of -1 to know that m_size is initialized or not.
No change of behavior.

Refactoring to make all Blob members private.
Remove one static Blob create method.

Covered by existing tests.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
(WebCore::Blob::size const):
* fileapi/Blob.h:
(WebCore::Blob::setInternalURL):
* fileapi/File.cpp:
(WebCore::File::create):
(WebCore::File::File):
(WebCore::File::computeNameAndContentType):
* fileapi/File.h:
* html/FileListCreator.cpp:
(WebCore::FileListCreator::createFileList):

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

3 months agoWeb Inspector: Address some ESLint warnings
joepeck@webkit.org [Mon, 12 Aug 2019 18:49:06 +0000 (18:49 +0000)]
Web Inspector: Address some ESLint warnings
https://bugs.webkit.org/show_bug.cgi?id=200598

Reviewed by Devin Rousso.

* UserInterface/Base/Utilities.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Models/DOMNodeStyles.js:
* UserInterface/Models/LayoutTimelineRecord.js:
* UserInterface/Models/ServerTimingEntry.js:
* UserInterface/Models/TimelineRecording.js:
* UserInterface/Protocol/RemoteObject.js:
* UserInterface/Test/FrontendTestHarness.js:
* UserInterface/Test/Test.js:
* UserInterface/Views/CPUTimelineView.js:
* UserInterface/Views/CPUUsageCombinedView.js:
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/DOMTreeElement.js:
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/NetworkTableContentView.js:
* UserInterface/Views/ResourceTimingBreakdownView.js:
* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
* UserInterface/Views/TreeOutline.js:

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

3 months agoWeb Inspector: Better organize manager / observer API groups
joepeck@webkit.org [Mon, 12 Aug 2019 18:45:13 +0000 (18:45 +0000)]
Web Inspector: Better organize manager / observer API groups
https://bugs.webkit.org/show_bug.cgi?id=200594

Reviewed by Devin Rousso.

* UserInterface/Controllers/DebuggerManager.js:
(WI.DebuggerManager.prototype.globalObjectCleared):
(WI.DebuggerManager.prototype.reset): Deleted.
Renamed.

* UserInterface/Protocol/DebuggerObserver.js:
(WI.DebuggerObserver.prototype.globalObjectCleared):

* UserInterface/Controllers/CSSManager.js:
* UserInterface/Controllers/CanvasManager.js:
* UserInterface/Controllers/ConsoleManager.js:
* UserInterface/Controllers/DOMManager.js:
* UserInterface/Controllers/DOMStorageManager.js:
* UserInterface/Controllers/LayerTreeManager.js:
* UserInterface/Controllers/NetworkManager.js:
* UserInterface/Controllers/TargetManager.js:
* UserInterface/Controllers/TimelineManager.js:
* UserInterface/Controllers/WorkerManager.js:

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

3 months agoTapping buttons in Data Detectors lookup previews doesn't work (Follow-up fix)
jbedard@apple.com [Mon, 12 Aug 2019 18:42:20 +0000 (18:42 +0000)]
Tapping buttons in Data Detectors lookup previews doesn't work (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=200579
<rdar://problem/54056519>

Reviewed by Megan Gardner.

* Platform/spi/ios/UIKitSPI.h: Add _UIContextMenuStyle SPI.

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

3 months agoAdd threading assertions to RefCounted
cdumez@apple.com [Mon, 12 Aug 2019 18:10:26 +0000 (18:10 +0000)]
Add threading assertions to RefCounted
https://bugs.webkit.org/show_bug.cgi?id=200507

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
Disable threading assertions for DFG::Plan::m_inlineCallFrames while the JSC team
investigates.

Source/WebKit:

Enable new RefCounted threading assertions for WebKit2
(UIProcess + auxiliary processes).

* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::runInitializationCode):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView initialize]):
Enable new RefCounted threading assertions for WebKitLegacy.

Source/WTF:

Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
RefCounted objects from several threads. If you hit these new assertions, it likely means you either
need to:
1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
or
2. Make sure your objects always gets ref'd / deref'd from the same thread.

These assertions already found several thread safety bugs in our code base, which I fixed via
dependency bugs.

These assertions are currently enabled in WebKit (UIProcess, child processes and
WebKitLegacy), they do not apply other JavascriptCore API clients.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.cpp: Added.
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::disableThreadingChecks):
(WTF::RefCountedBase::enableThreadingChecksGlobally):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::areThreadingCheckedEnabled const):
(WTF::RefCountedBase::derefBase const):
* wtf/SizeLimits.cpp:

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

3 months agoGPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not...
cdumez@apple.com [Mon, 12 Aug 2019 17:27:51 +0000 (17:27 +0000)]
GPUBuffer seems to be ref'd / deref'd from multiple thread concurrently but is not ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200629

Reviewed by Geoffrey Garen.

Make sure GPUBuffer only gets ref'd / deref'd on the main thread, since it is not
ThreadSafeRefCounted.

* platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
(WebCore::GPUBuffer::commandBufferCommitted):
(WebCore::GPUBuffer::commandBufferCompleted):

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

3 months agoAdd a test to ensure that we dispatch keydown and keyup events when multiple keys...
dbates@webkit.org [Mon, 12 Aug 2019 17:13:55 +0000 (17:13 +0000)]
Add a test to ensure that we dispatch keydown and keyup events when multiple keys are pressed at the same time
https://bugs.webkit.org/show_bug.cgi?id=200548

Reviewed by Darin Adler.

Tools:

Expose infrastructure to simulate a literal raw key down and a literal key up event.

* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.h:
(WTR::UIScriptController::rawKeyDown):
(WTR::UIScriptController::rawKeyUp):
* WebKitTestRunner/ios/UIScriptControllerIOS.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptControllerIOS::rawKeyDown):
(WTR::UIScriptControllerIOS::rawKeyUp):

LayoutTests:

Add a test. Skip the test for now until we have the fixes for <rdar://problem/53613454> and <rdar://problem/54001139>.

* fast/events/ios/multiple-key-press-and-release-ordering-expected.txt: Added.
* fast/events/ios/multiple-key-press-and-release-ordering.html: Added.
* platform/ios/TestExpectations:

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

3 months ago[GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
commit-queue@webkit.org [Mon, 12 Aug 2019 16:56:01 +0000 (16:56 +0000)]
[GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
https://bugs.webkit.org/show_bug.cgi?id=200584

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-08-12
Reviewed by Philippe Normand.

Source/WebCore:

Listening to parsers warnings and error messages (synchronously so that we react
right away) and requesting keyframes from the peer.

Also simplify the decoder code by trying to make decoding happen
in one single pass, also hiding away GStreamer threading and allowing
us to react as soon as the decoder/parser fails.

* platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
(WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
(WebCore::GStreamerVideoDecoder::pullSample):
(WebCore::H264Decoder::H264Decoder):
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:

Tools:

Added a h264parse patch to post WARNING on the bus when a broken frame is detected.
Ignore style libwebrtc optionnal 'style issue'

* Scripts/webkitpy/style/checker.py:
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-bad-0001-h264parse-Post-a-WARNING-when-data-is-broken.patch: Added.

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

3 months agoUnreviewed, rolling out r248525.
cdumez@apple.com [Mon, 12 Aug 2019 16:06:02 +0000 (16:06 +0000)]
Unreviewed, rolling out r248525.

Revert new threading assertions while I work on fixing the
issues they exposed

Reverted changeset:

"Add threading assertions to RefCounted"
https://bugs.webkit.org/show_bug.cgi?id=200507
https://trac.webkit.org/changeset/248525

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

3 months agoOnly construct ComplexLineLayout when needed
antti@apple.com [Mon, 12 Aug 2019 15:31:34 +0000 (15:31 +0000)]
Only construct ComplexLineLayout when needed
https://bugs.webkit.org/show_bug.cgi?id=200625

Reviewed by Zalan Bujtas.

* rendering/ComplexLineLayout.cpp:
(WebCore::ComplexLineLayout::createInlineBoxForRenderer):
(WebCore::ComplexLineLayout::createLineBoxes):
(WebCore::ComplexLineLayout::constructLine):
(WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):

Make static so this can be invoked without constructing complex line layout (from startAlignedOffsetForLine).

(WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
(WebCore::ComplexLineLayout::checkLinesForTextOverflow):
(WebCore::ComplexLineLayout::startAlignedOffsetForLine): Deleted.

This is also used in block layout to set static positions of positioned objects.
Move to RenderBlockFlow where its only caller is.

* rendering/ComplexLineLayout.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
(WebCore::RenderBlockFlow::deleteLines):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::hasLines const):
(WebCore::RenderBlockFlow::layoutSimpleLines):
(WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::firstRootBox const):
(WebCore::RenderBlockFlow::lastRootBox const):
(WebCore::RenderBlockFlow::complexLineLayout):
(WebCore::RenderBlockFlow::lineBoxes): Deleted.
(WebCore::RenderBlockFlow::lineBoxes const): Deleted.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::removeLineBoxFromRenderObject):
(WebCore::RootInlineBox::extractLineBoxFromRenderObject):
(WebCore::RootInlineBox::attachLineBoxToRenderObject):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::generateLineBoxTree):

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

3 months agoRemove IDBValue::m_sessionID
youenn@apple.com [Mon, 12 Aug 2019 11:39:39 +0000 (11:39 +0000)]
Remove IDBValue::m_sessionID
https://bugs.webkit.org/show_bug.cgi?id=199320

Reviewed by Alex Christensen.

Remove sessionID from IDBValue.
This does not seem to be really used in any way.
No change of behavior.

* Modules/indexeddb/IDBValue.cpp:
(WebCore::IDBValue::IDBValue):
* Modules/indexeddb/IDBValue.h:
(WebCore::IDBValue::blobURLs const):
(WebCore::IDBValue::encode const):
(WebCore::IDBValue::decode):
(WebCore::IDBValue::sessionID const): Deleted.
* Modules/indexeddb/shared/IDBRequestData.cpp:
(WebCore::IDBRequestData::isolatedCopy):
* Modules/indexeddb/shared/IDBRequestData.h:
(WebCore::IDBRequestData::databaseIdentifier const):
(WebCore::IDBRequestData::decode):
* bindings/js/IDBBindingUtilities.cpp:
(WebCore::deserializeIDBValueToJSValue):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::serialize):
(WebCore::CloneSerializer::CloneSerializer):
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneDeserializer::deserialize):
(WebCore::CloneDeserializer::CloneDeserializer):
(WebCore::SerializedScriptValue::SerializedScriptValue):
(WebCore::SerializedScriptValue::create):
(WebCore::SerializedScriptValue::deserialize):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
* bindings/js/SerializedScriptValue.h:
(WebCore::SerializedScriptValue::sessionID const): Deleted.

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

3 months agoRemove IDB-specific quota
youenn@apple.com [Mon, 12 Aug 2019 10:07:29 +0000 (10:07 +0000)]
Remove IDB-specific quota
https://bugs.webkit.org/show_bug.cgi?id=196545

Reviewed by Alex Christensen.

Source/WebCore:

No change of behavior as IDB specific quota is no longer used.
Instead a global quota is used. This quota currently handles IDB and Cache API.

* Modules/indexeddb/server/IDBBackingStore.h:
* Modules/indexeddb/server/IDBServer.cpp:
(WebCore::IDBServer::IDBServer::createBackingStore):
(WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
* Modules/indexeddb/server/IDBServer.h:
(WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
* Modules/indexeddb/server/MemoryIDBBackingStore.h:
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
(WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
* Modules/indexeddb/server/SQLiteIDBBackingStore.h:
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.h:

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::createIDBServer):
(WebKit::NetworkProcess::addIndexedDatabaseSession):
(WebKit::NetworkProcess::setIDBPerOriginQuota): Deleted.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetIDBPerOriginQuota): Deleted.
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setIDBPerOriginQuota): Deleted.
* UIProcess/WebProcessPool.h:

Source/WebKitLegacy:

* Storage/WebDatabaseProvider.cpp:
(WebDatabaseProvider::idbConnectionToServerForSession):
(WebDatabaseProvider::deleteAllDatabases):
(WebDatabaseProvider::setIDBPerOriginQuota): Deleted.
* Storage/WebDatabaseProvider.h:

Source/WebKitLegacy/mac:

* Storage/WebDatabaseManager.mm:
(-[WebDatabaseManager setIDBPerOriginQuota:]): Deleted.
* Storage/WebDatabaseManagerPrivate.h:

Source/WebKitLegacy/win:

* Interfaces/IWebDatabaseManager.idl:
* WebDatabaseManager.cpp:
(WebDatabaseManager::setIDBPerOriginQuota): Deleted.
* WebDatabaseManager.h:

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
(setIDBPerOriginQuotaCallback): Deleted.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setIDBPerOriginQuota): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

3 months agoAdd threading assertions to RefCounted
cdumez@apple.com [Mon, 12 Aug 2019 02:00:30 +0000 (02:00 +0000)]
Add threading assertions to RefCounted
https://bugs.webkit.org/show_bug.cgi?id=200507

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
Disable threading assertions for DFG::Plan::m_inlineCallFrames while the JSC team
investigates.

Source/WebKit:

Enable new RefCounted threading assertions for WebKit2
(UIProcess + auxiliary processes).

* Shared/AuxiliaryProcess.cpp:
(WebKit::AuxiliaryProcess::initialize):
* Shared/Cocoa/WebKit2InitializeCocoa.mm:
(WebKit::runInitializationCode):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(+[WebView initialize]):
Enable new RefCounted threading assertions for WebKitLegacy.

Source/WTF:

Add threading assertions to RefCounted to try and catch unsafe concurrent ref'ing / derefing of
RefCounted objects from several threads. If you hit these new assertions, it likely means you either
need to:
1. Have your class subclass ThreadSafeRefCounted instead of RefCounted
or
2. Make sure your objects always gets ref'd / deref'd from the same thread.

These assertions already found several thread safety bugs in our code base, which I fixed via
dependency bugs.

These assertions are currently enabled in WebKit (UIProcess, child processes and
WebKitLegacy), they do not apply other JavascriptCore API clients.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/RefCounted.cpp: Added.
* wtf/RefCounted.h:
(WTF::RefCountedBase::ref const):
(WTF::RefCountedBase::disableThreadingChecks):
(WTF::RefCountedBase::enableThreadingChecksGlobally):
(WTF::RefCountedBase::RefCountedBase):
(WTF::RefCountedBase::areThreadingCheckedEnabled const):
(WTF::RefCountedBase::derefBase const):
* wtf/SizeLimits.cpp:

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

3 months agoWebPage and ViewportConfiguration have differing notions of viewLayoutSize
wenson_hsieh@apple.com [Sun, 11 Aug 2019 19:11:58 +0000 (19:11 +0000)]
WebPage and ViewportConfiguration have differing notions of viewLayoutSize
https://bugs.webkit.org/show_bug.cgi?id=200619

Reviewed by Tim Horton.

The notion of a "view layout size" exists on WebPage and WebPageProxy for the purpose of specifying an intrinsic
content size for the entire web view on macOS. However, it also exists in ViewportConfiguration (as
viewLayoutSize) and WebPageProxy (under the name m_viewportConfigurationViewLayoutSize) for the purposes of
specifying the minimum layout size of the page's viewport.

This is especially confusing in WebPageProxy, which has both m_viewportConfigurationViewLayoutSize and
m_viewLayoutSize. To remedy this, rename "*viewLayoutSize" for the purposes of specifying an intrinsic web view
size to "*minimumSizeForAutoLayout" instead, which is consistent with the corresponding SPI property name on
WKView.

No change in behavior.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _minimumLayoutWidth]):
(-[WKWebView _setMinimumLayoutWidth:]):
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::setMinimumSizeForAutoLayout):
(WebKit::WebViewImpl::minimumSizeForAutoLayout const):
(WebKit::WebViewImpl::setIntrinsicContentSize):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
(WebKit::DrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::minimumSizeForAutoLayout const):
(WebKit::WebPageProxy::viewLayoutSize const): Deleted.
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumSizeForAutoLayoutDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::viewLayoutSizeDidChange): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_textAutoSizingAdjustmentTimer):
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setMinimumSizeForAutoLayout):
(WebKit::WebPage::updateIntrinsicContentSizeIfNeeded):
(WebKit::WebPage::setViewLayoutSize): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::minimumSizeForAutoLayout const):
(WebKit::WebPage::viewLayoutSize const): Deleted.
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):

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

3 months ago[MSE][GStreamer] Don't use vorbisparse
aboya@igalia.com [Sun, 11 Aug 2019 16:21:25 +0000 (16:21 +0000)]
[MSE][GStreamer] Don't use vorbisparse
https://bugs.webkit.org/show_bug.cgi?id=200622

Reviewed by Philippe Normand.

Source/WebCore:

This patch has been splitted from the original WebKitMediaSrc rework
patch (https://bugs.webkit.org/show_bug.cgi?id=199719).

Unlike other parsers, vorbisparse has latency (in the sense that when
it gets a chain call with a series of complete frames, it may not emit
the parsed frames until another chain in the future), which makes it
inappropriate for AppendPipeline, as there is no good way I know to
flush it.

But actually vorbisparse is not known to be necessary and it was only
introduced for consistency with other formats. Parsers are used in
AppendPipeline to reconstruct information that is lost due to poor
muxes. There have been no reported cases of this being a problem with
Vorbis in WebM, so I'm just removing the parser.

Fixes imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::createOptionalParserForFormat):

LayoutTests:

* platform/gtk/TestExpectations:

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

3 months agoFactor complex line layout path out from RenderBlockFlow
antti@apple.com [Sun, 11 Aug 2019 11:02:01 +0000 (11:02 +0000)]
Factor complex line layout path out from RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=200612

Reviewed by Zalan Bujtas.

This patch factors the line layout code that is currently part of the RenderBlockFlow and lives in RenderBlockLineLayout.cpp
into a new ComplexLineLayout class. ComplexLineLayout is a member of RenderBlockFlow.

In the future we can stop constructing ComplexLineLayout at all when using other line layout paths.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/ComplexLineLayout.cpp: Copied from Source/WebCore/rendering/RenderBlockLineLayout.cpp.
(WebCore::ComplexLineLayout::ComplexLineLayout):
(WebCore::ComplexLineLayout::appendRunsForObject):
(WebCore::ComplexLineLayout::createRootInlineBox):
(WebCore::ComplexLineLayout::createAndAppendRootInlineBox):
(WebCore::ComplexLineLayout::createInlineBoxForRenderer):
(WebCore::ComplexLineLayout::createLineBoxes):
(WebCore::ComplexLineLayout::constructLine):
(WebCore::ComplexLineLayout::textAlignmentForLine const):
(WebCore::ComplexLineLayout::setMarginsForRubyRun):
(WebCore::ComplexLineLayout::updateRubyForJustifiedText):
(WebCore::ComplexLineLayout::computeExpansionForJustifiedText):
(WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
(WebCore::ComplexLineLayout::computeInlineDirectionPositionsForLine):
(WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
(WebCore::ComplexLineLayout::removeInlineBox const):
(WebCore::ComplexLineLayout::computeBlockDirectionPositionsForLine):
(WebCore::ComplexLineLayout::handleTrailingSpaces):
(WebCore::ComplexLineLayout::appendFloatingObjectToLastLine):
(WebCore::ComplexLineLayout::createLineBoxesFromBidiRuns):
(WebCore::ComplexLineLayout::layoutRunsAndFloats):
(WebCore::ComplexLineLayout::restartLayoutRunsAndFloatsInRange):
(WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
(WebCore::ComplexLineLayout::reattachCleanLineFloats):
(WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
(WebCore::ComplexLineLayout::layoutLineBoxes):
(WebCore::ComplexLineLayout::checkFloatInCleanLine):
(WebCore::ComplexLineLayout::determineStartPosition):
(WebCore::ComplexLineLayout::determineEndPosition):
(WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
(WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
(WebCore::ComplexLineLayout::matchedEndLine):
(WebCore::ComplexLineLayout::addOverflowFromInlineChildren):
(WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
(WebCore::ComplexLineLayout::checkLinesForTextOverflow):
(WebCore::ComplexLineLayout::positionNewFloatOnLine):
(WebCore::ComplexLineLayout::startAlignedOffsetForLine):
(WebCore::ComplexLineLayout::updateFragmentForLine const):
(WebCore::ComplexLineLayout::style const):
(WebCore::ComplexLineLayout::layoutContext const):
(WebCore::RenderBlockFlow::appendRunsForObject): Deleted.
(WebCore::RenderBlockFlow::createRootInlineBox): Deleted.
(WebCore::RenderBlockFlow::createAndAppendRootInlineBox): Deleted.
(WebCore::createInlineBoxForRenderer): Deleted.
(WebCore::RenderBlockFlow::createLineBoxes): Deleted.
(WebCore::RenderBlockFlow::constructLine): Deleted.
(WebCore::RenderBlockFlow::textAlignmentForLine const): Deleted.
(WebCore::RenderBlockFlow::setMarginsForRubyRun): Deleted.
(WebCore::RenderBlockFlow::updateRubyForJustifiedText): Deleted.
(WebCore::RenderBlockFlow::computeExpansionForJustifiedText): Deleted.
(WebCore::RenderBlockFlow::updateLogicalWidthForAlignment): Deleted.
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine): Deleted.
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Deleted.
(WebCore::RenderBlockFlow::removeInlineBox const): Deleted.
(WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): Deleted.
(WebCore::RenderBlockFlow::handleTrailingSpaces): Deleted.
(WebCore::RenderBlockFlow::appendFloatingObjectToLastLine): Deleted.
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Deleted.
(WebCore::RenderBlockFlow::layoutRunsAndFloats): Deleted.
(WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange): Deleted.
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Deleted.
(WebCore::RenderBlockFlow::reattachCleanLineFloats): Deleted.
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded): Deleted.
(WebCore::RenderBlockFlow::layoutLineBoxes): Deleted.
(WebCore::RenderBlockFlow::checkFloatInCleanLine): Deleted.
(WebCore::RenderBlockFlow::determineStartPosition): Deleted.
(WebCore::RenderBlockFlow::determineEndPosition): Deleted.
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine): Deleted.
(WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const): Deleted.
(WebCore::RenderBlockFlow::matchedEndLine): Deleted.
(WebCore::RenderBlock::generatesLineBoxesForInlineChild): Deleted.
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren): Deleted.
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes): Deleted.
(WebCore::RenderBlockFlow::checkLinesForTextOverflow): Deleted.
(WebCore::RenderBlockFlow::positionNewFloatOnLine): Deleted.
(WebCore::RenderBlockFlow::startAlignedOffsetForLine): Deleted.
(WebCore::RenderBlockFlow::updateFragmentForLine const): Deleted.
* rendering/ComplexLineLayout.h: Added.
(WebCore::ComplexLineLayout::lineBoxes):
(WebCore::ComplexLineLayout::lineBoxes const):
(WebCore::ComplexLineLayout::firstRootBox const):
(WebCore::ComplexLineLayout::lastRootBox const):
* rendering/InlineIterator.h:
(WebCore::IsolateTracker::addFakeRunIfNecessary):
(WebCore::InlineBidiResolver::appendRunInternal):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::layoutInlineChildren):
(WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
(WebCore::RenderBlockFlow::deleteLines):
(WebCore::RenderBlockFlow::hitTestInlineChildren):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::paintInlineChildren):
(WebCore::RenderBlockFlow::layoutSimpleLines):
(WebCore::RenderBlockFlow::ensureLineBoxes):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::lineBoxes):
(WebCore::RenderBlockFlow::lineBoxes const):
(WebCore::RenderBlockFlow::firstRootBox const):
(WebCore::RenderBlockFlow::lastRootBox const):
(WebCore::RenderBlockFlow::floatingObjects):
(WebCore::RenderBlockFlow::complexLineLayout):
(WebCore::RenderBlockFlow::overrideTextAlignmentForLine const):
(WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds const):
* rendering/RenderBlockLineLayout.cpp: Removed.
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::overrideTextAlignmentForLine const):
(WebCore::RenderRubyBase::textAlignmentForLine const): Deleted.
* rendering/RenderRubyBase.h:
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::overrideTextAlignmentForLine const):
(WebCore::RenderRubyText::textAlignmentForLine const): Deleted.
* rendering/RenderRubyText.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::generateLineBoxTree):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::skipLeadingWhitespace):
* rendering/line/LineBreaker.h:
(WebCore::LineBreaker::positionNewFloatOnLine):
* rendering/line/LineInlineHeaders.h:
(WebCore::setStaticPositions):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::createRootInlineBox): Deleted.
* rendering/svg/RenderSVGText.h:
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::generatesLineBoxesForInlineChild):
(WebCore::getParentOfFirstLineBox):

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

3 months agoWebKitTestRunner's InjectedBundle has too aggressive stripping, resulting in non...
ap@apple.com [Sun, 11 Aug 2019 04:48:55 +0000 (04:48 +0000)]
WebKitTestRunner's InjectedBundle has too aggressive stripping, resulting in non-symbolicated crash logs
https://bugs.webkit.org/show_bug.cgi?id=200621

Reviewed by Dan Bernstein.

* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:

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

3 months agoREGRESSION (r245974): Missing content on habitburger.com, amazon.com
simon.fraser@apple.com [Sun, 11 Aug 2019 04:03:56 +0000 (04:03 +0000)]
REGRESSION (r245974): Missing content on habitburger.com, amazon.com
https://bugs.webkit.org/show_bug.cgi?id=200618
rdar://problem/53920224

Reviewed by Zalan Bujtas.

Source/WebCore:

In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
rect with the bounds of the layer, which is wrong because this coverage rect is passed down
to descendant layers, and they may project outside the bounds of this tiled layer.

This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.

The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
already ensures that we never make tiles outside the bounds of a TileController.

Test: compositing/backing/layer-outside-tiled-parent.html

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::adjustTileCoverageRect):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::ensureTilesForRect):

LayoutTests:

* compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
* compositing/backing/layer-outside-tiled-parent.html: Added.
* platform/ios-wk2/compositing/backing/layer-outside-tiled-parent-expected.txt: Added.
* tiled-drawing/tile-coverage-iframe-to-zero-coverage-expected.txt:
* tiled-drawing/tiled-backing-in-window-expected.txt:

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

3 months agoAccessibility client cannot navigate to internal links targets on iOS.
commit-queue@webkit.org [Sun, 11 Aug 2019 03:46:10 +0000 (03:46 +0000)]
Accessibility client cannot navigate to internal links targets on iOS.
https://bugs.webkit.org/show_bug.cgi?id=200559
<rdar://problem/45242534>

Patch by Andres Gonzalez <andresg_22@apple.com> on 2019-08-10
Reviewed by Zalan Bujtas.

Source/WebCore:

The cause of the problem on iOS is that AccessibilityObject::firstAccessibleObjectFromNode
used in AccessibilityRenderObject::linkedUIElements may return an object
that is ignored by accessibility clients on iOS, and thus the client
would not track the target of an internal link. This change ensures that
accessibilityLinkedElement will return a valid accessibility element to
the client, if it is exists.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
(WebCore::firstAccessibleObjectFromNode):
* accessibility/AccessibilityObject.h:
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):

LayoutTests:

Extneded this test to not only check that internal links expose their
target, but also that the target is an accessible element. Added a
second test case where the target is contained in a grouping element.
* accessibility/ios-simulator/internal-link-expected.txt:
* accessibility/ios-simulator/internal-link.html:

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

3 months agoBlob should store its session ID
youenn@apple.com [Sat, 10 Aug 2019 22:50:19 +0000 (22:50 +0000)]
Blob should store its session ID
https://bugs.webkit.org/show_bug.cgi?id=200572

Reviewed by Darin Adler.

Blob at creation time now initializes its session ID.
This will allow in the future to call blob registry routines with it.
Update all call sites to provide the session ID.

No observable change.

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getFile):
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::blobFromData):
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::takeAsBlob):
* Modules/fetch/FetchBodyConsumer.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::blob):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::createRecordingDataBlob):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::didReceiveRawData):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::sessionID const):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readTerminal):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
(WebCore::DataTransfer::createForInputEvent):
(WebCore::DataTransfer::createForDrag):
(WebCore::DataTransfer::createForDragStartEvent):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForUpdatingDropTarget):
* dom/DataTransfer.h:
* dom/Document.cpp:
(WebCore::Document::originIdentifierForPasteboard const):
* dom/Document.h:
* editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::inputEventDataTransfer const):
* editing/WebCorePasteboardFileReader.cpp:
(WebCore::WebCorePasteboardFileReader::readFilename):
(WebCore::WebCorePasteboardFileReader::readBuffer):
* editing/WebCorePasteboardFileReader.h:
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragmentForImageAttachment):
(WebCore::replaceRichContentWithAttachments):
(WebCore::createFragmentAndAddResources):
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readImage):
(WebCore::attachmentForFilePath):
(WebCore::attachmentForData):
* editing/markup.cpp:
(WebCore::restoreAttachmentElementsInFragment):
* fileapi/Blob.cpp:
(WebCore::Blob::Blob):
* fileapi/Blob.h:
(WebCore::Blob::create):
(WebCore::Blob::deserialize):
(WebCore::Blob::slice const):
* fileapi/Blob.idl:
* fileapi/File.cpp:
(WebCore::File::createWithRelativePath):
(WebCore::File::File):
* fileapi/File.h:
* fileapi/File.idl:
* html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData const):
(WebCore::FileInputType::filesChosen):
* html/FileListCreator.cpp:
(WebCore::appendDirectoryFiles):
(WebCore::FileListCreator::FileListCreator):
(WebCore::FileListCreator::createFileList):
* html/FileListCreator.h:
(WebCore::FileListCreator::create):
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toBlob):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
* testing/Internals.cpp:
(WebCore::Internals::createFile):
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createResponseBlob):

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

3 months agoDisable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile...
achristensen@apple.com [Sat, 10 Aug 2019 22:45:43 +0000 (22:45 +0000)]
Disable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile browsing mode
https://bugs.webkit.org/show_bug.cgi?id=200609
<rdar://problem/54015403>

Reviewed by Maciej Stachowiak.

Source/WebCore:

When watching a youtube video on iOS with "Autoplay" switched to off,
upon finishing the video all clicks anywhere on the page are effectively ignored.
Disabling ContentChangeObserver's TouchEvent adjustment fixes this bug.  I verified this manually.
This switch was introduced in r242621, and it disables part of a new feature, so there is low risk of fallout.

* loader/DocumentLoader.h:
(WebCore::DocumentLoader::setAllowContentChangeObserverQuirk):
(WebCore::DocumentLoader::allowContentChangeObserverQuirk const):
* page/Quirks.cpp:
(WebCore::Quirks::shouldDisableContentChangeObserverTouchEventAdjustment const):
* page/Quirks.h:
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::touchEventDidStart):

Source/WebKit:

* Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* Shared/WebsitePoliciesData.h:
* UIProcess/API/APIWebsitePolicies.cpp:
(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):
* UIProcess/API/APIWebsitePolicies.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):

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

3 months ago[iOS] Add a quirk for gmail.com messages on iPhone iOS13
commit-queue@webkit.org [Sat, 10 Aug 2019 22:25:48 +0000 (22:25 +0000)]
[iOS] Add a quirk for gmail.com messages on iPhone iOS13
https://bugs.webkit.org/show_bug.cgi?id=200605

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-10
Reviewed by Maciej Stachowiak.

Source/WebCore:

Add a quirk which sets the user agent for gmail.com messages on iPhone
OS 13 to be iPhone OS 12. This is a workaround for a gmail.com bug till
it is fixed.

* page/Quirks.cpp:
(WebCore::Quirks::shouldAvoidUsingIOS13ForGmail const):
* page/Quirks.h:
* platform/UserAgent.h:
* platform/ios/UserAgentIOS.mm:
(WebCore::osNameForUserAgent):
(WebCore::standardUserAgentWithApplicationName):
* platform/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName):

Source/WebKit:

Use WebPage::platformUserAgent() to add the gmail.com quirk.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::effectiveContentModeAfterAdjustingPolicies):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformUserAgent const):

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

3 months ago[GStreamer][WebRTC] Remove unused GstAdapter
commit-queue@webkit.org [Sat, 10 Aug 2019 11:18:17 +0000 (11:18 +0000)]
[GStreamer][WebRTC] Remove unused GstAdapter
https://bugs.webkit.org/show_bug.cgi?id=200585

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-08-10
Reviewed by Philippe Normand.

Minor "refactoring"

* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
(WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):

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

3 months agoCan’t sort videos on a YouTube channel page on iPad
antti@apple.com [Sat, 10 Aug 2019 10:38:00 +0000 (10:38 +0000)]
Can’t sort videos on a YouTube channel page on iPad
https://bugs.webkit.org/show_bug.cgi?id=200573
<rdar://problem/53415195>

Reviewed by Darin Adler.

Add a quirk to make touch events non-cancelable (preventDefault() does nothing).

* page/Quirks.cpp:
(WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
* page/Quirks.h:

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

3 months agoRemove some more unused 32-bit code
timothy_horton@apple.com [Sat, 10 Aug 2019 08:04:37 +0000 (08:04 +0000)]
Remove some more unused 32-bit code
https://bugs.webkit.org/show_bug.cgi?id=200607

Reviewed by Alexey Proskuryakov.

Source/WebKit:

* Modules/OSX.modulemap:

Source/WebKitLegacy:

* PlatformMac.cmake:
* WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig:
* Misc/WebSharingServicePickerController.mm:
(-[WebSharingServicePickerController initWithItems:includeEditorServices:client:style:]):
(-[WebSharingServicePickerController initWithSharingServicePicker:client:]):
(-[WebSharingServicePickerController sharingService:didShareItems:]):
* Plugins/WebNetscapePluginEventHandler.mm:
* Plugins/WebNetscapePluginEventHandlerCarbon.h: Removed.
* Plugins/WebNetscapePluginEventHandlerCarbon.mm: Removed.
* Plugins/WebNetscapePluginEventHandlerCocoa.h:
(WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
* Plugins/WebNetscapePluginEventHandlerCocoa.mm:
(WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
(WebNetscapePluginEventHandlerCocoa::keyDown):
(WebNetscapePluginEventHandlerCocoa::focusChanged):
(WebNetscapePluginEventHandlerCocoa::installKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::TSMEventHandler): Deleted.
(WebNetscapePluginEventHandlerCocoa::handleTSMEvent): Deleted.
* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::contextMenuForEvent):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
(-[WebHTMLView pressureChangeWithEvent:]):
* WebView/WebView.mm:
(LayerFlushController::flushLayers):

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

3 months agoWeb Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messa...
drousso@apple.com [Sat, 10 Aug 2019 07:02:28 +0000 (07:02 +0000)]
Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
https://bugs.webkit.org/show_bug.cgi?id=200587

Reviewed by Joseph Pecoraro.

WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).

Now that we are sending messages immediately, we should always queue.

Source/WebCore:

Covered by existing tests (which were failing after r248454, and now won't fail).

* inspector/InspectorFrontendClientLocal.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
(WebCore::InspectorFrontendClientLocal::setAttachedWindow):
(WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
(WebCore::InspectorFrontendClientLocal::showConsole):
(WebCore::InspectorFrontendClientLocal::showResources):
(WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
(WebCore::InspectorFrontendClientLocal::dispatch): Added.
(WebCore::InspectorFrontendClientLocal::dispatchMessage): Added.
(WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Added.
(WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
Provide additional ways for subclasses to call other `InspectorFrontendAPI` methods using
the "on load" queue.

* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::sendMessageToFrontend):
(WebCore::InspectorStubFrontend::frontendLoaded): Deleted.
Leverage the base `InspectorFrontendClientLocal`'s functions for queueing messages.

* inspector/InspectorClient.h:
* inspector/InspectorClient.cpp: Removed.
(WebCore::InspectorClient::doDispatchMessageOnFrontendPage): Deleted.

* inspector/agents/InspectorTimelineAgent.cpp:
Add missing include.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:

Source/WebInspectorUI:

* UserInterface/Test/TestStub.js:
(InspectorFrontendAPI.dispatch): Added.

* UserInterface/Models/Frame.js:
(WI.Frame.prototype.markDOMContentReadyEvent):
(WI.Frame.prototype.markLoadEvent):

* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
(WI.TimelineManager.prototype.pageLoadEventFired):

Source/WebKitLegacy/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:
(WebInspectorClient::sendMessageToFrontend):
Leverage the base `InspectorFrontendClientLocal`'s functions for queueing messages.

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

3 months agoKeyboardInputTests.CaretSelectionRectAfterRestoringFirstResponder API tests time...
wenson_hsieh@apple.com [Sat, 10 Aug 2019 04:00:23 +0000 (04:00 +0000)]
KeyboardInputTests.CaretSelectionRectAfterRestoringFirstResponder API tests time out on iPad
https://bugs.webkit.org/show_bug.cgi?id=200604
<rdar://problem/51273130>

Reviewed by Megan Gardner.

Tweak some API tests so that they work on iPad simulator. These tests checked that the final caret rect was
{{16, 13}, {2, 15}}; however, this is only correct behavior on iPhone, where we will scale the page so that the
focused element's font size is legible. Note that when the page is scaled, we scale the height but not the
width of the caret, which is why the width of the caret (in content coordinates) decreases while the height
remains the same.

We don't have the same behavior on iPad, so the expected caret rect is {{16, 13}, {3, 15}}, which is equal to
the caret rect at initial scale 1.

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:

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

3 months agoWeb Inspector: Node details sidebar sections have unclear delineation in Dark Mode
pecoraro@apple.com [Sat, 10 Aug 2019 03:19:52 +0000 (03:19 +0000)]
Web Inspector: Node details sidebar sections have unclear delineation in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=200603
<rdar://problem/54146925>

Reviewed by Devin Rousso.

* UserInterface/Views/DetailsSection.css:
(@media (prefers-color-scheme: dark)):
(.details-section .details-section,):
Give a details section header a different color than a normal sidebar header.

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

3 months agoUniversal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
ysuzuki@apple.com [Sat, 10 Aug 2019 01:20:22 +0000 (01:20 +0000)]
Universal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
https://bugs.webkit.org/show_bug.cgi?id=199864

Reviewed by Saam Barati.

Source/JavaScriptCore:

Our JSObject::put implementation is not correct in term of the spec. Our [[Put]] implementation is something like this.

    JSObject::put(object):
        if (can-do-fast-path(object))
            return fast-path(object);
        // slow-path
        do {
            object-put-check-and-setter-calls(object); // (1)
            object = object->prototype;
        } while (is-object(object));
        return do-put(object);

Since JSObject::put is registered in the methodTable, the derived classes can override it. Some of classes are adding
extra checks to this put.

    Derived::put(object):
        if (do-extra-check(object))
            fail
        return JSObject::put(object)

The problem is that Derived::put is only called when the |this| object is the Derived class. When traversing [[Prototype]] in
JSObject::put, at (1), we do not perform the extra checks added in Derived::put even if `object` is Derived one. This means that
we skip the check.

Currently, JSObject::put and WebCore checking mechanism are broken. JSObject::put should call getOwnPropertySlot at (1) to
perform the additional checks. This behavior is matching against the spec. However, currently, our JSObject::getOwnPropertySlot
does not propagate setter information. This is required to cache cacheable [[Put]] at (1) for CustomValue, CustomAccessor, and
Accessors. We also need to reconsider how to integrate static property setters to this mechanism. So, basically, this involves
large refactoring to renew our JSObject::put and JSObject::getOwnPropertySlot.

To work-around for now, we add a new TypeInfo flag, HasPutPropertySecurityCheck . And adding this flag to DOM objects
that implements the addition checks. We also add doPutPropertySecurityCheck method hook to perform the check in JSObject.
When we found this flag at (1), we perform doPutPropertySecurityCheck to properly perform the checks.

Since our JSObject::put code is old and it does not match against the spec now, we should refactor it largely. This is tracked separately in [1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=200562

* runtime/ClassInfo.h:
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
* runtime/JSCell.cpp:
(JSC::JSCell::doPutPropertySecurityCheck):
* runtime/JSCell.h:
* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::getOwnPropertyDescriptor):
* runtime/JSObject.h:
(JSC::JSObject::doPutPropertySecurityCheck):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::hasPutPropertySecurityCheck const):

Source/WebCore:

Test: http/tests/security/cross-frame-access-object-put-optimization.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::doPutPropertySecurityCheck):
* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::doPutPropertySecurityCheck):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:

LayoutTests:

* http/tests/security/cross-frame-access-object-put-optimization-expected.txt: Added.
* http/tests/security/cross-frame-access-object-put-optimization.html: Added.
* http/tests/security/resources/cross-frame-iframe-for-object-put-optimization-test.html: Added.

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

3 months agoWhen I did the devirtualization of the AST in r248488, I needed to
sbarati@apple.com [Sat, 10 Aug 2019 01:02:20 +0000 (01:02 +0000)]
When I did the devirtualization of the AST in r248488, I needed to
update the various type checks under the Type class hierarchy
operate on Type itself, since we now downcast straight from Type
instead of UnnamedType, ResolvableType, and NamedType.

* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
* Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
* Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
* Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:

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

3 months agoPossible non-thread safe usage of RefCounted in ~VideoFullscreenControllerContext()
cdumez@apple.com [Sat, 10 Aug 2019 00:56:31 +0000 (00:56 +0000)]
Possible non-thread safe usage of RefCounted in ~VideoFullscreenControllerContext()
https://bugs.webkit.org/show_bug.cgi?id=200599

Reviewed by Geoffrey Garen.

WebVideoFullscreenControllerAVKit's m_playbackModel & m_fullscreenModel data members are
WebThread objects so we need to make sure we grab the WebThread lock before dereferencing
them in the WebVideoFullscreenControllerAVKit destructor, when destroyed on the UIThread.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::~VideoFullscreenControllerContext):

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

3 months agoDon't allow cross-origin iframes to autofocus
ajuma@chromium.org [Sat, 10 Aug 2019 00:27:46 +0000 (00:27 +0000)]
Don't allow cross-origin iframes to autofocus
https://bugs.webkit.org/show_bug.cgi?id=200515
<rdar://problem/54092988>

Reviewed by Ryosuke Niwa.

Source/WebCore:

According to Step 6 in the WhatWG Spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofocusing-a-form-control:-the-autofocus-attribute),
the 'autofocus' attribute shouldn't work for cross-origin iframes.

This change is based on the Blink change (patch by <mustaq@chromium.org>):
<https://chromium-review.googlesource.com/c/chromium/src/+/1593026>

Also disallow cross-origin iframes from focusing programmatically without ever having
had any user interaction.

* dom/Element.cpp: Check if an invalid frame is trying to grab the focus.
(WebCore::Element::focus):
* html/HTMLFormControlElement.cpp: Check if the focus is moving to an invalid frame.
(WebCore::shouldAutofocus):
* page/DOMWindow.cpp: Check if an invalid frame is trying to grab the focus.
(WebCore::DOMWindow::focus):

Tools:

Make WebKit.FocusedFrameAfterCrash use same-origin iframes instead
of cross-origin iframes, since it depends on focusing one of the
frames.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/many-same-origin-iframes.html: Added.

LayoutTests:

Add test coverage, and simulate user interaction in existing tests
that require focusing a cross-origin frame.

* http/tests/security/clipboard/resources/copy-html.html:
* http/tests/security/clipboard/resources/copy-mso-list.html:
* http/tests/security/clipboard/resources/copy-url.html:
* http/wpt/html/interaction/focus/no-cross-origin-element-focus-expected.txt: Added.
* http/wpt/html/interaction/focus/no-cross-origin-element-focus.html: Added.
* http/wpt/html/interaction/focus/no-cross-origin-window-focus-expected.txt: Added.
* http/wpt/html/interaction/focus/no-cross-origin-window-focus.html: Added.
* http/wpt/html/interaction/focus/resources/child-focus-element.html: Added.
* http/wpt/html/interaction/focus/resources/child-focus-window.html: Added.
* http/wpt/html/semantics/forms/autofocus/no-cross-origin-autofocus.sub-expected.txt: Added.
* http/wpt/html/semantics/forms/autofocus/no-cross-origin-autofocus.sub.html: Added.
* http/wpt/html/semantics/forms/autofocus/resources/child-autofocus.html: Added.
* http/wpt/webauthn/resources/last-layer-frame.https.html:

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

3 months agoWeb Inspector: REGRESSION(r248480): Sources: the Pause Reason section takes the entir...
drousso@apple.com [Fri, 9 Aug 2019 23:55:55 +0000 (23:55 +0000)]
Web Inspector: REGRESSION(r248480): Sources: the Pause Reason section takes the entire vertical space when there are few breakpoints/resources
https://bugs.webkit.org/show_bug.cgi?id=200597

Reviewed by Joseph Pecoraro.

* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > .pause-reason-container): Deleted.
Don't `flex-grow` or `flex-shrink` the Pause Reason section so it always displays its full
content. The rest of the sections can grow/shrink as needed.

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

3 months agoFix WebKitLegacy's post-process-header-rule script to support paths with spaces in...
krollin@apple.com [Fri, 9 Aug 2019 23:52:14 +0000 (23:52 +0000)]
Fix WebKitLegacy's post-process-header-rule script to support paths with spaces in them
https://bugs.webkit.org/show_bug.cgi?id=200595
<rdar://problem/54045608>

Reviewed by Darin Adler.

A number of scripts were added to WebKit, JavaScriptCore, and
WebKitLegacy to support XCBuild's new facility for copying and
modifying files in one atomic step. The first two are OK, but
WebKitLegacy's script (post-process-header-rule) references a file via
a variable named "header", and does so without quoting the variable's
value. When the header's path contains spaces -- as can happen when
building Safari Technology Preview -- the script breaks. Fix this by
adding quoting.

* scripts/postprocess-header-rule:

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

3 months ago[WHLSL] Devirtualize the AST
sbarati@apple.com [Fri, 9 Aug 2019 23:30:29 +0000 (23:30 +0000)]
[WHLSL] Devirtualize the AST
https://bugs.webkit.org/show_bug.cgi?id=200522

Reviewed by Robin Morisset.

Source/WebCore:

This patch devirtualizes the AST for Type, Expression, and Statement.
We now have an enum which represents all the concrete types in the
three hierarchies. Doing dynamic dispatch is implemented as a switch
on that type enum.

The interesting part of this patch is how to handle destruction. We do
this by defining a custom deleter for all nodes in the AST. This ensures
that when they're used inside UniqueRef, unique_ptr, Ref, and RefPtr,
we do dynamic dispatch when we delete the object. This allows each base
class to define a "destroy" method which does dynamic dispatch on type
and calls the appropriate delete. We also mark all non-concrete nodes
in all type hierarchies with a protected destructor, which ensures it's
never called except from within the concrete child classes. We allow
all concrete classes to have public destructors, as it's valid for
their destructors to be called explicitly since there is no need for
dynamic dispatch in such scenarios. All concrete classes are also marked
as final.

This is a 3ms speedup on compute_boids, which is about a 10% improvement
in the WHLSL compiler.

* Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
* Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
* Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
(WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression): Deleted.
(WebCore::WHLSL::AST::AssignmentExpression::left): Deleted.
(WebCore::WHLSL::AST::AssignmentExpression::right): Deleted.
(WebCore::WHLSL::AST::AssignmentExpression::takeRight): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
(WebCore::WHLSL::AST::Block::Block): Deleted.
(WebCore::WHLSL::AST::Block::statements): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
(WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral): Deleted.
(WebCore::WHLSL::AST::BooleanLiteral::value const): Deleted.
(WebCore::WHLSL::AST::BooleanLiteral::clone const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
(WebCore::WHLSL::AST::Break::Break): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
(WebCore::WHLSL::AST::CallExpression::CallExpression): Deleted.
(WebCore::WHLSL::AST::CallExpression::arguments): Deleted.
(WebCore::WHLSL::AST::CallExpression::name): Deleted.
(WebCore::WHLSL::AST::CallExpression::setCastData): Deleted.
(WebCore::WHLSL::AST::CallExpression::isCast): Deleted.
(WebCore::WHLSL::AST::CallExpression::castReturnType): Deleted.
(WebCore::WHLSL::AST::CallExpression::function): Deleted.
(WebCore::WHLSL::AST::CallExpression::setFunction): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
(WebCore::WHLSL::AST::CommaExpression::CommaExpression): Deleted.
(WebCore::WHLSL::AST::CommaExpression::list): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
(WebCore::WHLSL::AST::ConstantExpression::ConstantExpression): Deleted.
(WebCore::WHLSL::AST::ConstantExpression::integerLiteral): Deleted.
(WebCore::WHLSL::AST::ConstantExpression::visit): Deleted.
(WebCore::WHLSL::AST::ConstantExpression::visit const): Deleted.
(WebCore::WHLSL::AST::ConstantExpression::clone const): Deleted.
(WebCore::WHLSL::AST::ConstantExpression::matches const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
(WebCore::WHLSL::AST::Continue::Continue): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h: Added.
* Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
(WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression): Deleted.
(WebCore::WHLSL::AST::DereferenceExpression::pointer): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
(WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop): Deleted.
(WebCore::WHLSL::AST::DoWhileLoop::body): Deleted.
(WebCore::WHLSL::AST::DoWhileLoop::conditional): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
(WebCore::WHLSL::AST::DotExpression::DotExpression): Deleted.
(WebCore::WHLSL::AST::DotExpression::fieldName): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
(WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement): Deleted.
(WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
(WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition): Deleted.
(WebCore::WHLSL::AST::EnumerationDefinition::type): Deleted.
(WebCore::WHLSL::AST::EnumerationDefinition::add): Deleted.
(WebCore::WHLSL::AST::EnumerationDefinition::memberByName): Deleted.
(WebCore::WHLSL::AST::EnumerationDefinition::enumerationMembers): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
(WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::left const): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::right const): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const): Deleted.
(WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp: Added.
(WebCore::WHLSL::AST::Expression::destroy):
(WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const):
(WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const):
(WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const):
* Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
(WebCore::WHLSL::AST::Expression::Expression):
(WebCore::WHLSL::AST::Expression::kind const):
(WebCore::WHLSL::AST::Expression::isAssignmentExpression const):
(WebCore::WHLSL::AST::Expression::isBooleanLiteral const):
(WebCore::WHLSL::AST::Expression::isCallExpression const):
(WebCore::WHLSL::AST::Expression::isCommaExpression const):
(WebCore::WHLSL::AST::Expression::isDereferenceExpression const):
(WebCore::WHLSL::AST::Expression::isDotExpression const):
(WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
(WebCore::WHLSL::AST::Expression::isFloatLiteral const):
(WebCore::WHLSL::AST::Expression::isIndexExpression const):
(WebCore::WHLSL::AST::Expression::isIntegerLiteral const):
(WebCore::WHLSL::AST::Expression::isLogicalExpression const):
(WebCore::WHLSL::AST::Expression::isLogicalNotExpression const):
(WebCore::WHLSL::AST::Expression::isMakeArrayReferenceExpression const):
(WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
(WebCore::WHLSL::AST::Expression::isNullLiteral const):
(WebCore::WHLSL::AST::Expression::isPropertyAccessExpression const):
(WebCore::WHLSL::AST::Expression::isReadModifyWriteExpression const):
(WebCore::WHLSL::AST::Expression::isTernaryExpression const):
(WebCore::WHLSL::AST::Expression::isUnsignedIntegerLiteral const):
(WebCore::WHLSL::AST::Expression::isVariableReference const):
(WebCore::WHLSL::AST::Expression::isEnumerationMemberLiteral const):
(WebCore::WHLSL::AST::Expression::codeLocation const):
(WebCore::WHLSL::AST::Expression::updateCodeLocation):
* Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
(WebCore::WHLSL::AST::Fallthrough::Fallthrough): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
(WebCore::WHLSL::AST::FloatLiteral::FloatLiteral): Deleted.
(WebCore::WHLSL::AST::FloatLiteral::type): Deleted.
(WebCore::WHLSL::AST::FloatLiteral::value const): Deleted.
(WebCore::WHLSL::AST::FloatLiteral::clone const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
(WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
* Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
(WebCore::WHLSL::AST::FloatLiteralType::value const): Deleted.
(WebCore::WHLSL::AST::FloatLiteralType::preferredType): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
(WebCore::WHLSL::AST::ForLoop::ForLoop): Deleted.
(WebCore::WHLSL::AST::ForLoop::~ForLoop): Deleted.
(WebCore::WHLSL::AST::ForLoop::initialization): Deleted.
(WebCore::WHLSL::AST::ForLoop::condition): Deleted.
(WebCore::WHLSL::AST::ForLoop::increment): Deleted.
(WebCore::WHLSL::AST::ForLoop::body): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
(WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference): Deleted.
(WebCore::WHLSL::AST::GlobalVariableReference::structField): Deleted.
(WebCore::WHLSL::AST::GlobalVariableReference::base): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
(WebCore::WHLSL::AST::IfStatement::IfStatement): Deleted.
(WebCore::WHLSL::AST::IfStatement::conditional): Deleted.
(WebCore::WHLSL::AST::IfStatement::body): Deleted.
(WebCore::WHLSL::AST::IfStatement::elseBody): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
(WebCore::WHLSL::AST::IndexExpression::IndexExpression): Deleted.
(WebCore::WHLSL::AST::IndexExpression::indexExpression): Deleted.
(WebCore::WHLSL::AST::IndexExpression::takeIndex): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
(WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral): Deleted.
(WebCore::WHLSL::AST::IntegerLiteral::type): Deleted.
(WebCore::WHLSL::AST::IntegerLiteral::value const): Deleted.
(WebCore::WHLSL::AST::IntegerLiteral::clone const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
(WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
* Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
(WebCore::WHLSL::AST::IntegerLiteralType::value const): Deleted.
(WebCore::WHLSL::AST::IntegerLiteralType::preferredType): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
(WebCore::WHLSL::AST::LogicalExpression::LogicalExpression): Deleted.
(WebCore::WHLSL::AST::LogicalExpression::type const): Deleted.
(WebCore::WHLSL::AST::LogicalExpression::left): Deleted.
(WebCore::WHLSL::AST::LogicalExpression::right): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
(WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression): Deleted.
(WebCore::WHLSL::AST::LogicalNotExpression::operand): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
(WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression): Deleted.
(WebCore::WHLSL::AST::MakeArrayReferenceExpression::leftValue): Deleted.
(WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
(WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression): Deleted.
(WebCore::WHLSL::AST::MakePointerExpression::leftValue): Deleted.
(WebCore::WHLSL::AST::MakePointerExpression::mightEscape const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
(WebCore::WHLSL::AST::NamedType::NamedType):
(WebCore::WHLSL::AST::NamedType::unifyNodeImpl):
(): Deleted.
(WebCore::WHLSL::AST::NamedType::isTypeDefinition const): Deleted.
(WebCore::WHLSL::AST::NamedType::isStructureDefinition const): Deleted.
(WebCore::WHLSL::AST::NamedType::isEnumerationDefinition const): Deleted.
(WebCore::WHLSL::AST::NamedType::isNativeTypeDeclaration const): Deleted.
(WebCore::WHLSL::AST::NamedType::unifyNode const): Deleted.
(WebCore::WHLSL::AST::NamedType::unifyNode): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
(WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::typeArguments): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isInt const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isNumber const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isFloating const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isVector const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isMatrix const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isOpaqueType const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isTexture const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::isSigned const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<bool const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<int64_t const): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::iterateAllValues): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsInt): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsNumber): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsFloating): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsAtomic): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsVector): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsMatrix): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsOpaqueType): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTexture): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIsSigned): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentInteger): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentUnsignedInteger): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentFloat): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setSuccessor): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromInteger): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromUnsignedInteger): Deleted.
(WebCore::WHLSL::AST::NativeTypeDeclaration::setIterateAllValues): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
(WebCore::WHLSL::AST::NullLiteral::NullLiteral): Deleted.
(WebCore::WHLSL::AST::NullLiteral::type): Deleted.
(WebCore::WHLSL::AST::NullLiteral::clone const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
* Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
(WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
* Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
(WebCore::WHLSL::AST::ReadModifyWriteExpression::create): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::setNewValueExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::setResultExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::oldVariableReference): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::newVariableReference): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::leftValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::oldValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::newValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::takeLeftValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::takeOldValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValue): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression): Deleted.
(WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
(WebCore::WHLSL::AST::ReferenceType::ReferenceType):
* Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
(WebCore::WHLSL::AST::ResolvableType::ResolvableType):
(): Deleted.
(WebCore::WHLSL::AST::ResolvableType::isFloatLiteralType const): Deleted.
(WebCore::WHLSL::AST::ResolvableType::isIntegerLiteralType const): Deleted.
(WebCore::WHLSL::AST::ResolvableType::isNullLiteralType const): Deleted.
(WebCore::WHLSL::AST::ResolvableType::isUnsignedIntegerLiteralType const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
(WebCore::WHLSL::AST::Return::Return): Deleted.
(WebCore::WHLSL::AST::Return::value): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp: Added.
(WebCore::WHLSL::AST::Statement::destroy):
* Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
(WebCore::WHLSL::AST::Statement::Statement):
(WebCore::WHLSL::AST::Statement::kind const):
(WebCore::WHLSL::AST::Statement::isBlock const):
(WebCore::WHLSL::AST::Statement::isBreak const):
(WebCore::WHLSL::AST::Statement::isContinue const):
(WebCore::WHLSL::AST::Statement::isDoWhileLoop const):
(WebCore::WHLSL::AST::Statement::isEffectfulExpressionStatement const):
(WebCore::WHLSL::AST::Statement::isFallthrough const):
(WebCore::WHLSL::AST::Statement::isForLoop const):
(WebCore::WHLSL::AST::Statement::isIfStatement const):
(WebCore::WHLSL::AST::Statement::isReturn const):
(WebCore::WHLSL::AST::Statement::isStatementList const):
(WebCore::WHLSL::AST::Statement::isSwitchCase const):
(WebCore::WHLSL::AST::Statement::isSwitchStatement const):
(WebCore::WHLSL::AST::Statement::isVariableDeclarationsStatement const):
(WebCore::WHLSL::AST::Statement::isWhileLoop const):
(WebCore::WHLSL::AST::Statement::codeLocation const):
(WebCore::WHLSL::AST::Statement::updateCodeLocation):
* Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
(WebCore::WHLSL::AST::StatementList::StatementList): Deleted.
(WebCore::WHLSL::AST::StatementList::statements): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
(WebCore::WHLSL::AST::StructureDefinition::StructureDefinition): Deleted.
(WebCore::WHLSL::AST::StructureDefinition::structureElements): Deleted.
(WebCore::WHLSL::AST::StructureDefinition::find): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
(WebCore::WHLSL::AST::StructureElement::StructureElement): Deleted.
(WebCore::WHLSL::AST::StructureElement::codeLocation const): Deleted.
(WebCore::WHLSL::AST::StructureElement::type): Deleted.
(WebCore::WHLSL::AST::StructureElement::name): Deleted.
(WebCore::WHLSL::AST::StructureElement::semantic): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
(WebCore::WHLSL::AST::SwitchCase::SwitchCase): Deleted.
(WebCore::WHLSL::AST::SwitchCase::value): Deleted.
(WebCore::WHLSL::AST::SwitchCase::block): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
(WebCore::WHLSL::AST::SwitchStatement::SwitchStatement): Deleted.
(WebCore::WHLSL::AST::SwitchStatement::value): Deleted.
(WebCore::WHLSL::AST::SwitchStatement::switchCases): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
(WebCore::WHLSL::AST::TernaryExpression::TernaryExpression): Deleted.
(WebCore::WHLSL::AST::TernaryExpression::predicate): Deleted.
(WebCore::WHLSL::AST::TernaryExpression::bodyExpression): Deleted.
(WebCore::WHLSL::AST::TernaryExpression::elseExpression): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLType.cpp: Added.
(WebCore::WHLSL::AST::Type::destroy):
(WebCore::WHLSL::AST::Type::unifyNode):
(WebCore::WHLSL::AST::ResolvableType::canResolve const):
(WebCore::WHLSL::AST::ResolvableType::conversionCost const):
(WebCore::WHLSL::AST::UnnamedType::toString const):
* Modules/webgpu/WHLSL/AST/WHLSLType.h:
(WebCore::WHLSL::AST::Type::Type):
(WebCore::WHLSL::AST::Type::kind const):
(WebCore::WHLSL::AST::Type::isUnnamedType const):
(WebCore::WHLSL::AST::Type::isNamedType const):
(WebCore::WHLSL::AST::Type::isResolvableType const):
(WebCore::WHLSL::AST::Type::isTypeReference const):
(WebCore::WHLSL::AST::Type::isPointerType const):
(WebCore::WHLSL::AST::Type::isArrayReferenceType const):
(WebCore::WHLSL::AST::Type::isArrayType const):
(WebCore::WHLSL::AST::Type::isReferenceType const):
(WebCore::WHLSL::AST::Type::isTypeDefinition const):
(WebCore::WHLSL::AST::Type::isStructureDefinition const):
(WebCore::WHLSL::AST::Type::isEnumerationDefinition const):
(WebCore::WHLSL::AST::Type::isNativeTypeDeclaration const):
(WebCore::WHLSL::AST::Type::isFloatLiteralType const):
(WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
(WebCore::WHLSL::AST::Type::isNullLiteralType const):
(WebCore::WHLSL::AST::Type::isUnsignedIntegerLiteralType const):
(WebCore::WHLSL::AST::Type::unifyNode const):
* Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
(WebCore::WHLSL::AST::TypeDefinition::TypeDefinition): Deleted.
(WebCore::WHLSL::AST::TypeDefinition::type): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
(WebCore::WHLSL::AST::UnnamedType::hash const):
(WebCore::WHLSL::AST::UnnamedType::operator== const):
* Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
(WebCore::WHLSL::AST::UnnamedType::UnnamedType):
(WebCore::WHLSL::AST::UnnamedType::unifyNodeImpl):
(): Deleted.
(WebCore::WHLSL::AST::UnnamedType::kind const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::isTypeReference const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::isPointerType const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::isArrayReferenceType const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::isArrayType const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::isReferenceType const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::unifyNode const): Deleted.
(WebCore::WHLSL::AST::UnnamedType::unifyNode): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
(WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral): Deleted.
(WebCore::WHLSL::AST::UnsignedIntegerLiteral::type): Deleted.
(WebCore::WHLSL::AST::UnsignedIntegerLiteral::value const): Deleted.
(WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
* Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const): Deleted.
(WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
(WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement): Deleted.
(WebCore::WHLSL::AST::VariableDeclarationsStatement::variableDeclarations): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
(WebCore::WHLSL::AST::VariableReference::VariableReference): Deleted.
(WebCore::WHLSL::AST::VariableReference::wrap): Deleted.
(WebCore::WHLSL::AST::VariableReference::name): Deleted.
(WebCore::WHLSL::AST::VariableReference::variable): Deleted.
(WebCore::WHLSL::AST::VariableReference::setVariable): Deleted.
* Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
(WebCore::WHLSL::AST::WhileLoop::WhileLoop): Deleted.
(WebCore::WHLSL::AST::WhileLoop::conditional): Deleted.
(WebCore::WHLSL::AST::WhileLoop::body): Deleted.
* Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
(WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
(WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
(WebCore::WHLSL::Metal::TypeNamer::createNameNode):
(WebCore::WHLSL::Metal::parent):
(WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
* Modules/webgpu/WHLSL/WHLSLParser.cpp:
(WebCore::WHLSL::Parser::parseSuffixOperator):
(WebCore::WHLSL::Parser::completeAssignment):
(WebCore::WHLSL::Parser::parsePossiblePrefix):
* Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
* Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
(WebCore::WHLSL::Visitor::visit):
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* workers/WorkerScriptLoader.h:

Source/WTF:

Make RefCounted use std::default_delete instead of explicitly calling delete.
This allows uses of RefCounted to define their own custom deleter.

* wtf/RefCounted.h:
(WTF::RefCounted::deref const):
* wtf/UniqueRef.h:
(WTF::UniqueRef::UniqueRef):

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

3 months ago[iOS 13] Google Docs/Slides/Sheets: paste often doesn't work and sometimes produces...
wenson_hsieh@apple.com [Fri, 9 Aug 2019 23:06:19 +0000 (23:06 +0000)]
[iOS 13] Google Docs/Slides/Sheets: paste often doesn't work and sometimes produces an error
https://bugs.webkit.org/show_bug.cgi?id=200591
<rdar://problem/54102238>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebKit:

Adopts UIKit SPI to avoid incrementing the general pasteboard's change count whenever an editable element is
focused. This is due to how, in iOS 13, UIKit temporarily writes an image to the pasteboard when showing the
keyboard, to determine whether or not to show the Memojis in the input view.

This causes UIPasteboard's changeCount to increment twice due to adding and then removing the image, which means
that the changeCount sanity checks in the web process will race against the pasteboard gaining and then losing
this temporary image.

Instead, the new -supportsImagePaste SPI may be used to short-circuit this step, and avoid updating the
changeCount when UIKeyboardImpl's delegate changes.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView supportsImagePaste]):

Tools:

Add a new API test to exercise -supportsImagePaste.

* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/UIKitSPI.h:

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

3 months agoRemove unused Connection::sendWithReply
commit-queue@webkit.org [Fri, 9 Aug 2019 22:58:47 +0000 (22:58 +0000)]
Remove unused Connection::sendWithReply
https://bugs.webkit.org/show_bug.cgi?id=200590

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

This was attempted in r245151, but rolled out in r245164 because my SecItemShim code didn't work well on non-main threads.
Chris found a better solution for SecItemShim in r248014, making this unused code.  Let's remove it.

* Platform/IPC/Connection.cpp:
(IPC::Connection::invalidate):
(IPC::Connection::processIncomingSyncReply):
(IPC::Connection::connectionDidClose):
(IPC::Connection::sendMessageWithReply): Deleted.
* Platform/IPC/Connection.h:
(IPC::Connection::send):
(IPC::Connection::sendWithReply): Deleted.

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

3 months agoREGRESSION (Safari 6): Web Inspector: JSON may not be pretty printed if served as...
drousso@apple.com [Fri, 9 Aug 2019 22:12:12 +0000 (22:12 +0000)]
REGRESSION (Safari 6): Web Inspector: JSON may not be pretty printed if served as text/html
https://bugs.webkit.org/show_bug.cgi?id=122898
<rdar://problem/15241419>

Reviewed by Joseph Pecoraro.

Check the request/response data to see if it's JSON parsable. If so, allow the user to elect
to view the request/response as a JSON preview instead of raw (or pretty printed) text.

Prefer the JSON view wherever possible.

* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView):
(WI.ResourceClusterContentView.prototype.get requestContentView):
(WI.ResourceClusterContentView.prototype.get customRequestContentView): Added.
(WI.ResourceClusterContentView.prototype.get customResponseContentView):
(WI.ResourceClusterContentView.prototype.get selectionPathComponents):
(WI.ResourceClusterContentView.prototype.showRequest):
(WI.ResourceClusterContentView.prototype._canShowCustomRequestContentView): Added.
(WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
(WI.ResourceClusterContentView.prototype._contentViewForResourceType):
(WI.ResourceClusterContentView.prototype._pathComponentForContentView):
(WI.ResourceClusterContentView.prototype._identifierForContentView):
(WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
(WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomRequestContentView): Added.
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
(WI.ResourceClusterContentView.prototype.saveToCookie): Deleted.
(WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource): Deleted.
Since the current view is already saved in a `WI.Setting`, there's no need to save that
state to a cookie, as it'll be restored elsewhere.

* UserInterface/Base/Main.js:
(WI.showResourceRequest):

* UserInterface/Main.html:
* UserInterface/Views/JSONContentView.js: Added.
(WI.JSONContentView):
(WI.JSONContentView.prototype.initialLayout):
(WI.JSONContentView.prototype.attached):
(WI.JSONContentView.prototype.closed):
* UserInterface/Views/JSONContentView.css: Added.
(.content-view.json):
* Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.js: Deleted.
* Source/WebInspectorUI/UserInterface/Views/JSONResourceContentView.css: Deleted.
Create a more generic content view that shows a preview for the given JSON parsable string.

* UserInterface/Base/Utilities.js:
(String.prototype.isJSON): Added.
* UserInterface/Views/WebSocketDataGridNode.js:
(WI.WebSocketDataGridNode.prototype.appendContextMenuItems):
Utility function for checking if a string is JSON parsable.

* Localizations/en.lproj/localizedStrings.js:

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

3 months ago[iOS WK2] Remove context menu hints on navigation
simon.fraser@apple.com [Fri, 9 Aug 2019 22:01:39 +0000 (22:01 +0000)]
[iOS WK2] Remove context menu hints on navigation
https://bugs.webkit.org/show_bug.cgi?id=200588
rdar://problem/54061796

Reviewed by Tim Horton.

Make sure the context menu hint doesn't linger across navigations by hosting it in its
own container view (shared with drag previews), and hiding that view on navigation (unparenting
may have bad consequences). We remove the view when the animation ends.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView containerViewForTargetedPreviews]):
(-[WKContentView _hideContextMenu]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):

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

3 months agoWeb Inspector: Sources: increase the vertical space allocated to the call stack when...
drousso@apple.com [Fri, 9 Aug 2019 21:59:29 +0000 (21:59 +0000)]
Web Inspector: Sources: increase the vertical space allocated to the call stack when paused
https://bugs.webkit.org/show_bug.cgi?id=200236

Reviewed by Joseph Pecoraro.

Rather than uniformly constrict the height of the Call Stack and Breakpoints sections, they
should "flex" based on their importance, which can likely be derived from the current state.
This way, it's possible to see information from each section at the same time, but still
have enough space in each section to be able to do something useful.

When paused, the most useful data is the call stack, so give the Call Stack section the most
vertical space (the Pause Reason is also important, but it usually needs very little space).

When not paused, it's likely that the user cares more about the resources with breakpoints
than those without, so favor the Breakpoints section.

Each section will only expand to fit it's maximum content height.

If the inspector window becomes too short, remove the "flex" entirely and have all the
content be part of a single scroll area instead.

* UserInterface/Views/SourcesNavigationSidebarPanel.js:
(WI.SourcesNavigationSidebarPanel):
(WI.SourcesNavigationSidebarPanel.prototype.createContentTreeOutline):
(WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerPaused):
(WI.SourcesNavigationSidebarPanel.prototype._handleDebuggerResumed):
(WI.SourcesNavigationSidebarPanel.prototype._handleCallStackElementAddedOrRemoved): Deleted.
* UserInterface/Views/SourcesNavigationSidebarPanel.css:
(.sidebar > .panel.navigation.sources > .content > :matches(.pause-reason-container, .call-stack-container, .breakpoints-container)): Added.
(.sidebar > .panel.navigation.sources > .content .details-section): Added.
(.sidebar > .panel.navigation.sources > .content .details-section.collapsed > .header > .options, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content, .sidebar > .panel.navigation.sources > .content .details-section:not(.collapsed) > .content > .group): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container .create-breakpoint): Added.
(.sidebar > .panel.navigation.sources > .content > .navigation-bar): Added.
(@media (min-height: 650px)): Added.
(.sidebar > .panel.navigation.sources > .content > .pause-reason-container): Added.
(.sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources)): Added.
(.sidebar > .panel.navigation.sources > .content > .call-stack-container): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container): Added.
(.sidebar > .panel.navigation.sources > .content > .resources): Added.
(.sidebar > .panel.navigation.sources > .content > .breakpoints-container .tree-outline .item.event-target-window .icon): Added.
(.sidebar > .panel.navigation.sources > .content > .details-section): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.paused-reason, .breakpoints).collapsed > .header > .options,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.collapsed > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints > .header > .options .create-breakpoint): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.pause-reason, .call-stack, .breakpoints) > .content,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints) > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.call-stack): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .create-breakpoint): Deleted.
(@media (min-height: 600px)): Deleted.
(.sidebar > .panel.navigation.sources > .content > .pause-reason): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section:matches(.call-stack, .breakpoints):not(.collapsed) > .content,): Deleted.
(.sidebar > .panel.navigation.sources > .content > .details-section.breakpoints .tree-outline .item.event-target-window .icon): Deleted.
Wrap the Pause Reason, Call Stack, and Breakpoints `WI.DetailsSection`s in a container
element so that the styling of the sticky header doesn't get affected by the clamping of the
container's height.

* UserInterface/Views/DetailsSection.css:
(.details-section):
(.details-section > .header):
Create CSS variables for styles that will be overridden by the Sources navigation sidebar.

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

3 months ago[GTK] fast/mediastream/RTCPeerConnection-add-removeTrack.html is crashing
commit-queue@webkit.org [Fri, 9 Aug 2019 21:57:26 +0000 (21:57 +0000)]
[GTK] fast/mediastream/RTCPeerConnection-add-removeTrack.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=199018

This is fixed by the patch provided in https://bugs.webkit.org/show_bug.cgi?id=194326

Unreviewed gardening patch

Patch by Thibault Saunier <tsaunier@igalia.com> on 2019-08-09

* platform/gtk/TestExpectations:

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

3 months agoFollow-up commit to r248474 as webkit-patch did not commit the svn property changes.
aakash_jain@apple.com [Fri, 9 Aug 2019 21:18:59 +0000 (21:18 +0000)]
Follow-up commit to r248474 as webkit-patch did not commit the svn property changes.
[ews-build] Set svn:ignore to various EWS Buildbot files
https://bugs.webkit.org/show_bug.cgi?id=200581

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build: Added property svn:ignore.

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

3 months ago[ews-build] Set svn:ignore to various EWS Buildbot files
aakash_jain@apple.com [Fri, 9 Aug 2019 21:15:15 +0000 (21:15 +0000)]
[ews-build] Set svn:ignore to various EWS Buildbot files
https://bugs.webkit.org/show_bug.cgi?id=200581

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build: Added property svn:ignore.

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

3 months agoPass a ScriptExecutionContext as input to register/unregister URLRegistry routines
youenn@apple.com [Fri, 9 Aug 2019 20:55:06 +0000 (20:55 +0000)]
Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
https://bugs.webkit.org/show_bug.cgi?id=200571

Reviewed by Darin Adler.

Passing a ScriptExecutionContext to register/unregister routines will allow
to have session ID based handling for blobs, in particular to use session partitioned blob registries.
No change of behavior.

* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::registerURL):
(WebCore::MediaSourceRegistry::unregisterURL):
* Modules/mediasource/MediaSourceRegistry.h:
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registerURL):
(WebCore::BlobURLRegistry::unregisterURL):
* html/DOMURL.cpp:
(WebCore::DOMURL::createPublicURL):
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::registerURL):
(WebCore::PublicURLManager::revoke):
(WebCore::PublicURLManager::stop):
* html/PublicURLManager.h:
* html/URLRegistry.h:

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

3 months ago[Win] Remove compiler workaround for VS2013
pvollan@apple.com [Fri, 9 Aug 2019 20:33:36 +0000 (20:33 +0000)]
[Win] Remove compiler workaround for VS2013
https://bugs.webkit.org/show_bug.cgi?id=200582

Reviewed by Don Olmstead.

A VS2013 compiler workaround can be removed now.

* WebKitQuartzCoreAdditions/API/WebKitQuartzCoreAdditions.cpp:
(DllMain):

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

3 months agoDisable CSSOM View Scrolling API for IMDb iOS app
commit-queue@webkit.org [Fri, 9 Aug 2019 20:20:49 +0000 (20:20 +0000)]
Disable CSSOM View Scrolling API for IMDb iOS app
https://bugs.webkit.org/show_bug.cgi?id=200586
<rdar://problem/53645833>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-09
Reviewed by Simon Fraser.

Source/WebCore:

They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
Disable this new feature until they update their app to use the iOS13 SDK.

* platform/RuntimeApplicationChecks.h:
* platform/cocoa/RuntimeApplicationChecksCocoa.mm:
(WebCore::IOSApplication::isIMDb):

Source/WebKit:

Change the CSSOMViewScrollingAPIEnabled default value to be off for the IMDb app's WKWebViews.
I manually verified this is effective in those WKWebViews but no other WKWebViews and that it fixes the radar.

* Shared/WebPreferences.yaml:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultCSSOMViewScrollingAPIEnabled):
* Shared/WebPreferencesDefaultValues.h:

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

3 months ago[ews] Add buildbot.tac to repository
aakash_jain@apple.com [Fri, 9 Aug 2019 19:51:39 +0000 (19:51 +0000)]
[ews] Add buildbot.tac to repository
https://bugs.webkit.org/show_bug.cgi?id=200580

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/buildbot.tac: Added.

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

3 months agoTapping buttons in Data Detectors lookup previews doesn't work
timothy_horton@apple.com [Fri, 9 Aug 2019 19:50:44 +0000 (19:50 +0000)]
Tapping buttons in Data Detectors lookup previews doesn't work
https://bugs.webkit.org/show_bug.cgi?id=200579
<rdar://problem/54056519>

Reviewed by Megan Gardner.

Source/WebCore/PAL:

* pal/spi/ios/DataDetectorsUISPI.h:

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _contextMenuInteraction:styleForMenuWithConfiguration:]):
If a Data Detectors context menu wants the action menu style, provide it.

(-[WKContentView contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:]):
If a Data Detectors context menu provides a view controller to present
on context menu commit, present it. We present on top of the same view
controller that is currently presenting the context menu, but modally
instead of inside the context menu.

If a Data Detectors context menu instead provides a URL to launch on
context menu commit, call openURL.

In both cases, change the commit style to pop, since we're committing
instead of dismissing.

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

3 months agoCorrecting Expectation Typo from r248388.
russell_e@apple.com [Fri, 9 Aug 2019 17:46:12 +0000 (17:46 +0000)]
Correcting Expectation Typo from r248388.
rdar://54049321

Unreviewed Test Gardening.

* platform/ios-12/TestExpectations:
* platform/ios/TestExpectations:

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

3 months agoRemove MediaStreamRegistry
youenn@apple.com [Fri, 9 Aug 2019 16:58:47 +0000 (16:58 +0000)]
Remove MediaStreamRegistry
https://bugs.webkit.org/show_bug.cgi?id=200570

Reviewed by Eric Carlson.

MediaStream cannot be registered as an URL by JavaScript.
Remove MediaStreamRegistry and the 'src' loading specific handling in HTMLMediaElement.
Implement ending of capture track by directly handling MediaStreamTrack which is more accurate.
No change of behavior.

* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::MediaStream):
(WebCore::MediaStream::~MediaStream):
(WebCore::MediaStream::stop):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStreamRegistry.cpp: Removed.
* Modules/mediastream/MediaStreamRegistry.h: Removed.
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
(WebCore::MediaStreamTrack::~MediaStreamTrack):
(WebCore::MediaStreamTrack::endCapture):
* Modules/mediastream/MediaStreamTrack.h:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::Document::stopMediaCapture):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):

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

3 months ago[GTK] Add missing spellchecking packages to dependencies script
csaavedra@igalia.com [Fri, 9 Aug 2019 14:54:33 +0000 (14:54 +0000)]
[GTK] Add missing spellchecking packages to dependencies script
https://bugs.webkit.org/show_bug.cgi?id=200574

Reviewed by Philippe Normand.

These are needed for the spellchecking test in WebContext API tests.

* gtk/install-dependencies:

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

3 months ago[GL][GStreamer] activate wrapped shared context
commit-queue@webkit.org [Fri, 9 Aug 2019 09:36:45 +0000 (09:36 +0000)]
[GL][GStreamer] activate wrapped shared context
https://bugs.webkit.org/show_bug.cgi?id=196966

Patch by Víctor Manuel Jáquez Leal <vjaquez@igalia.com> on 2019-08-09
Reviewed by Žan Doberšek.

This patch consists in four parts:

1\ When the media player is instantiated, and it is intended to
render textures, it will create a wrapped object of the
application's GL context, and in order to populate the wrapped
object with the GL vtable, the context has to be current. Thus,
this patch makes current the shared WebKit application context,
and populate the wrapped GstGLContext by activating it and filling
in it. Afterwards, the wrapped context is deactivated.

2\ This patch makes GL texture use the RGBA color space, thus the
color transformation is done in GStreamer, and no further color
transformation is required in WebKit.

3\ Since it is not necessary to modify behavior if the decoder is
imxvpudecoder, its identification and label were removed.

4\ As only RGBA is used, the old color conversions when rendering
using Cairo (fallback) were changed to convert the RGBA, as in
GStreamer's format, to ARGB32, as in Cairo format -which depends
on endianness.

No new tests because there is no behavior change.

* platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
(WebCore::ImageGStreamer::ImageGStreamer): Only convert GStreamer
RGBA to Cairo RGB32.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Removes
the IMX VPU identification.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
Intializes the wrapped GL Context.
(WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
Removes frame's color conversion.
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
Instead of parsing a string, the GstCaps are created manually, and
it is set to appsink, rather than a filtered linking.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
Removes ImxVPU enumeration value.
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
Adds NoConvert option to texture copier, setting an identity
matrix.
(WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
* platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Adds
NoConvert enumeration value.

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

3 months agoREGRESSION (iOS 13): united.com web forms do not respond to taps
rniwa@webkit.org [Fri, 9 Aug 2019 07:17:44 +0000 (07:17 +0000)]
REGRESSION (iOS 13): united.com web forms do not respond to taps
https://bugs.webkit.org/show_bug.cgi?id=200531

Reviewed by Antti Koivisto and Wenson Hsieh.

The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.

Ignore this constant content change in ContentChangeObserver as a site specific quirk.

In the future, we should make ContentChangeObserver observe the final location of each element
being observed so that we can ignore content that like this which is placed outside the viewport,
and/or far away from where the user tapped.

* page/Quirks.cpp:
(WebCore::Quirks::shouldIgnoreContentChange const): Added.
* page/Quirks.h:
* page/ios/ContentChangeObserver.cpp:
(WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):

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

3 months ago[Win] Fix internal build
pvollan@apple.com [Fri, 9 Aug 2019 05:51:44 +0000 (05:51 +0000)]
[Win] Fix internal build
https://bugs.webkit.org/show_bug.cgi?id=200519

Reviewed by Alex Christensen.

Source/JavaScriptCore:

The script 'generate-js-builtins.py' cannot be found when building WebCore. Copy the JavaScriptCore Scripts
folder after building JSC.

* JavaScriptCore.vcxproj/JavaScriptCore.proj:

Source/WebKitLegacy/win:

Switch to the String::wideCharacers method, since its return type is compatible with the Win32 api.

* WebDownloadCFNet.cpp:
(WebDownload::didFinish):

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

3 months agoREGRESSION (52279987): Most of the WKUIDelegate contextMenu delegate methods are...
dino@apple.com [Fri, 9 Aug 2019 02:11:18 +0000 (02:11 +0000)]
REGRESSION (52279987): Most of the WKUIDelegate contextMenu delegate methods are not being called
https://bugs.webkit.org/show_bug.cgi?id=200557
<rdar://problem/53717962>

Reviewed by Wenson Hsieh.

UIKit changed the name of delegates recently. We ignored the warning because
it was still calling the old methods. However, it will only do so for applications
authored by Apple, breaking 3rd parties.

The change here is just adopting the new methods in place of the old ones.
It does not change the API that WebKit vends (they still use the older names).

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView contextMenuInteraction:willDisplayMenuForConfiguration:animator:]):
(-[WKContentView contextMenuInteraction:willPerformPreviewActionForMenuWithConfiguration:animator:]):
(-[WKContentView contextMenuInteraction:willEndForConfiguration:animator:]):
(-[WKContentView contextMenuInteractionWillPresent:]): Deleted.
(-[WKContentView contextMenuInteraction:willCommitWithAnimator:]): Deleted.
(-[WKContentView contextMenuInteractionDidEnd:]): Deleted.

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

3 months ago[iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
simon.fraser@apple.com [Fri, 9 Aug 2019 01:57:49 +0000 (01:57 +0000)]
[iOS WK2] Hide previews when an inner overflow or frame scrollview scrolls
https://bugs.webkit.org/show_bug.cgi?id=200552
rdar://problem/54086338

Reviewed by Wenson Hsieh.

Give UITargetedPreview the UIScrollView that the target element is inside of,
so it can clean up if the user starts to scroll that view.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createTargetedPreviewIfPossible]):

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

3 months agoWeb Inspector: Page: don't allow the domain to be disabled
drousso@apple.com [Fri, 9 Aug 2019 01:10:41 +0000 (01:10 +0000)]
Web Inspector: Page: don't allow the domain to be disabled
https://bugs.webkit.org/show_bug.cgi?id=200109

Reviewed by Brian Burg.

Source/JavaScriptCore:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* inspector/protocol/Page.json:
Remove `enable`/`disable`.

Source/WebCore:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* inspector/agents/InspectorPageAgent.h:
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::timestamp):
(WebCore::InspectorPageAgent::enable): Deleted.
(WebCore::InspectorPageAgent::disable): Deleted.

* inspector/agents/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
(WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
* inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createStyleSheet):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector):
(WebCore::InspectorDOMAgent::highlightFrame):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setFrameIdentifier):
* inspector/agents/page/PageNetworkAgent.cpp:
(WebCore::PageNetworkAgent::loaderIdentifier):
(WebCore::PageNetworkAgent::frameIdentifier):
(WebCore::PageNetworkAgent::scriptExecutionContext):
* inspector/agents/page/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::didCreateMainWorldContext):
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):

* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::InspectorStubFrontend):
(WebCore::InspectorStubFrontend::frontendLoaded): Added.
(WebCore::InspectorStubFrontend::closeWindow):
(WebCore::InspectorStubFrontend::sendMessageToFrontend):
(WebCore::InspectorStubFrontend::frontendPage): Deleted.
Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
messages being sent to the frontend are batched.

Source/WebInspectorUI:

The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
sense to support the ability to "disable" (as well as "enable") the agent.

When the first frontend connects, we should treat the `PageAgent` as active and available.

* UserInterface/Controllers/NetworkManager.js:
(WI.NetworkManager.prototype.initializeTarget):

* Test/Test.js:
(WI.loaded):
(WI.initializeBackendTarget):
(WI.contentLoaded):
(WI.targetsAvailable): Added.
(WI.whenTargetsAvailable): Added.
* Test/TestStub.js:
Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
messages being sent to the frontend are batched.

LayoutTests:

* http/tests/inspector/page/loading-iframe-document-node.html:
* inspector/page/archive.html:
* inspector/page/frameScheduledNavigation.html:
* inspector/page/frameScheduledNavigation-async-delegates.html:
* inspector/page/frameStartedLoading.html:
* inspector/page/media-query-list-listener-exception.html:
* inspector/timeline/line-column.html:

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

3 months agoUnreviewed. Get rid of extraneous whitespace in ChangeLog.
jonlee@apple.com [Fri, 9 Aug 2019 01:05:06 +0000 (01:05 +0000)]
Unreviewed. Get rid of extraneous whitespace in ChangeLog.

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

3 months agoAdd threading assertions to WebStorage code
cdumez@apple.com [Fri, 9 Aug 2019 00:08:07 +0000 (00:08 +0000)]
Add threading assertions to WebStorage code
https://bugs.webkit.org/show_bug.cgi?id=200550

Reviewed by Geoffrey Garen.

Add threading assertions to WebStorage code for extra safety.

* NetworkProcess/WebStorage/LocalStorageNamespace.cpp:
(WebKit::LocalStorageNamespace::LocalStorageNamespace):
(WebKit::LocalStorageNamespace::~LocalStorageNamespace):
(WebKit::LocalStorageNamespace::getOrCreateStorageArea):
(WebKit::LocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::LocalStorageNamespace::clearAllStorageAreas):
(WebKit::LocalStorageNamespace::ephemeralOrigins const):
(WebKit::LocalStorageNamespace::cloneTo):
* NetworkProcess/WebStorage/SessionStorageNamespace.cpp:
(WebKit::SessionStorageNamespace::SessionStorageNamespace):
(WebKit::SessionStorageNamespace::~SessionStorageNamespace):
(WebKit::SessionStorageNamespace::addAllowedConnection):
(WebKit::SessionStorageNamespace::removeAllowedConnection):
(WebKit::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::SessionStorageNamespace::cloneTo):
(WebKit::SessionStorageNamespace::origins const):
(WebKit::SessionStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::SessionStorageNamespace::clearAllStorageAreas):
* NetworkProcess/WebStorage/StorageArea.cpp:
(WebKit::StorageArea::StorageArea):
(WebKit::StorageArea::~StorageArea):
(WebKit::StorageArea::addListener):
(WebKit::StorageArea::removeListener):
(WebKit::StorageArea::hasListener const):
(WebKit::StorageArea::clone const):
(WebKit::StorageArea::setItem):
(WebKit::StorageArea::setItems):
(WebKit::StorageArea::removeItem):
(WebKit::StorageArea::clear):
(WebKit::StorageArea::items const):
(WebKit::StorageArea::openDatabaseAndImportItemsIfNeeded const):
(WebKit::StorageArea::dispatchEvents const):
* NetworkProcess/WebStorage/StorageManager.cpp:
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::destroySessionStorageNamespace):
(WebKit::StorageManager::addAllowedSessionStorageNamespaceConnection):
(WebKit::StorageManager::removeAllowedSessionStorageNamespaceConnection):
(WebKit::StorageManager::cloneSessionStorageNamespace):
(WebKit::StorageManager::processDidCloseConnection):
(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigin):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):
(WebKit::StorageManager::waitUntilTasksFinished):
(WebKit::StorageManager::suspend):
(WebKit::StorageManager::resume):
(WebKit::StorageManager::findStorageArea const):
(WebKit::StorageManager::getOrCreateLocalStorageNamespace):
(WebKit::StorageManager::getOrCreateTransientLocalStorageNamespace):
* NetworkProcess/WebStorage/TransientLocalStorageNamespace.cpp:
(WebKit::TransientLocalStorageNamespace::TransientLocalStorageNamespace):
(WebKit::TransientLocalStorageNamespace::~TransientLocalStorageNamespace):
(WebKit::TransientLocalStorageNamespace::getOrCreateStorageArea):
(WebKit::TransientLocalStorageNamespace::origins const):
(WebKit::TransientLocalStorageNamespace::clearStorageAreasMatchingOrigin):
(WebKit::TransientLocalStorageNamespace::clearAllStorageAreas):

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

3 months agowebkitpy: Disable shared clipboard between Simulators
jbedard@apple.com [Thu, 8 Aug 2019 23:31:12 +0000 (23:31 +0000)]
webkitpy: Disable shared clipboard between Simulators
https://bugs.webkit.org/show_bug.cgi?id=200546

Reviewed by Aakash Jain.

* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.initialize_devices): Disable PasteboardAutomaticSync in Simulator.app
managed by run-webkit-tests.

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

3 months agoShort-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel...
commit-queue@webkit.org [Thu, 8 Aug 2019 23:25:08 +0000 (23:25 +0000)]
Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
https://bugs.webkit.org/show_bug.cgi?id=200499

Source/WebCore:

Patch by Chris Lord <clord@igalia.com> on 2019-08-08
Reviewed by Darin Adler.

This patch adds a shortcut when a framebuffer isn't bound on WebGL
canvases when retrieving ALPHA_BITS.

No new tests, covered by existing tests.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):
Return 0 for ALPHA_BITS if canvas has no alpha component.
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGLRenderingContext::getParameter):
Return 0 for ALPHA_BITS if canvas has no alpha component.

LayoutTests:

Patch by Chris Lord <chrislord.net@gmail.com> on 2019-08-08
Reviewed by Darin Adler.

* platform/ios-simulator/webgl/2.0.0/conformance/context/context-attributes-alpha-depth-stencil-antialias-expected.txt:
1 more passing test.

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

3 months agoAdd to InteractionInformationAtPosition information about whether the element is...
simon.fraser@apple.com [Thu, 8 Aug 2019 23:01:25 +0000 (23:01 +0000)]
Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region
https://bugs.webkit.org/show_bug.cgi?id=200374
rdar://problem/54095519

Reviewed by Tim Horton.
Source/WebCore:

Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling
node that affects the targeted element's position. We use this to find a UIScrollView in the UI process.

The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(),
which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in
the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in
the enclosing frame.

There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking
for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want
its enclosing scroller.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const):
* page/scrolling/AsyncScrollingCoordinator.h:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::scrollableContainerNodeID const):
* page/scrolling/ScrollingCoordinator.h:
* rendering/RenderLayer.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID):
* rendering/RenderLayerCompositor.h:

Source/WebKit:

Add InteractionInformationAtPosition.containerScrollingNodeID and initialize it in elementPositionInformation()
by asking the scrolling coordinator.

Also add a way to get from a ScrollingNodeID to a UIScrollView to RemoteScrollingCoordinatorProxy,
which gets the scrolling node and asks the delegate for the UIView.

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode const):
(WebKit::InteractionInformationAtPosition::decode):
* UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollViewForScrollingNodeID const):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/RemoteLayerTree/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollView const):
* UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::elementPositionInformation):

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

3 months agoFix thread safety issue in AudioSampleDataSource() constructor
cdumez@apple.com [Thu, 8 Aug 2019 22:57:10 +0000 (22:57 +0000)]
Fix thread safety issue in AudioSampleDataSource() constructor
https://bugs.webkit.org/show_bug.cgi?id=200547

Reviewed by Alex Christensen.

Make Logger ThreadSafeRefCounted as it is ref'd / deref'd from various
threads (including the main thread and the WebKitWebRTCAudioModule thread).

* wtf/Logger.h:

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

3 months agoScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several...
cdumez@apple.com [Thu, 8 Aug 2019 22:10:36 +0000 (22:10 +0000)]
ScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several threads
https://bugs.webkit.org/show_bug.cgi?id=200545

Reviewed by Antti Koivisto.

The ScrollingStateTree and its ScrollingStateNodes are being passed to the scrolling thread.
ScrollingStateNode is not ThreadSafeRefCounted, which is potentially unsafe. Make it
ThreadSafeRefCounted for safety in this patch given that using RefCounted here is either
wrong or fragile.

* page/scrolling/ScrollingStateNode.h:

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

3 months ago[FTW] Get WebKit, WebKit2, and MiniBrowser building and executing
bfulgham@apple.com [Thu, 8 Aug 2019 22:03:58 +0000 (22:03 +0000)]
[FTW] Get WebKit, WebKit2, and MiniBrowser building and executing
https://bugs.webkit.org/show_bug.cgi?id=200539
.:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* Source/cmake/OptionsFTW.cmake:

Source/ThirdParty/ANGLE:

Reviewed by Dean Jackson.

* PlatformFTW.cmake: Added.

Source/WebCore:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* platform/graphics/win/BackingStoreBackendDirect2D.h:
(WebCore::BackingStoreBackendDirect2D::renderTarget const):
(WebCore::BackingStoreBackendDirect2D::surface const):
(): Deleted.
* platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
(WebCore::BackingStoreBackendDirect2DImpl::~BackingStoreBackendDirect2DImpl):
(WebCore::BackingStoreBackendDirect2DImpl::scroll):
(WebCore::createDirect2DImageSurfaceWithFastMalloc): Deleted.
* platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::DIBPixelData):
* platform/graphics/win/DIBPixelData.h:
* platform/graphics/win/Direct2DOperations.cpp:
(WebCore::Direct2D::fillRectWithRoundedHole):
(WebCore::Direct2D::fillRectWithGradient):
(WebCore::Direct2D::drawGlyphs):
(WebCore::Direct2D::PlatformContextStateSaver::PlatformContextStateSaver): Deleted.
(WebCore::Direct2D::PlatformContextStateSaver::~PlatformContextStateSaver): Deleted.
(WebCore::Direct2D::PlatformContextStateSaver::save): Deleted.
(WebCore::Direct2D::PlatformContextStateSaver::restore): Deleted.
(WebCore::Direct2D::PlatformContextStateSaver::didSave const): Deleted.
* platform/graphics/win/Direct2DOperations.h:
* platform/graphics/win/Direct2DUtilities.cpp:
(WebCore::Direct2D::bitmapSize):
(WebCore::Direct2D::bitmapResolution):
(WebCore::Direct2D::createWicBitmap):
(WebCore::Direct2D::createBitmap):
(WebCore::Direct2D::createGDIRenderTarget):
(WebCore::Direct2D::copyRectFromOneSurfaceToAnother):
* platform/graphics/win/Direct2DUtilities.h:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::GraphicsContext):
(WebCore::GraphicsContext::platformContext const):
(WebCore::GraphicsContextPlatformPrivate::setAlpha):
(WebCore::GraphicsContext::savePlatformState):
(WebCore::GraphicsContext::restorePlatformState):
(WebCore::GraphicsContext::releaseWindowsContext):
(WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
(WebCore::GraphicsContextPlatformPrivate::beginDraw):
(WebCore::GraphicsContextPlatformPrivate::endDraw):
(WebCore::GraphicsContext::beginDraw):
(WebCore::GraphicsContext::endDraw):
(WebCore::GraphicsContext::setCTM):
(WebCore::GraphicsContext::isAcceleratedContext const):
* platform/graphics/win/GraphicsContextImplDirect2D.cpp:
(WebCore::GraphicsContextImplDirect2D::fillRect):
(WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole):
(WebCore::GraphicsContextImplDirect2D::drawGlyphs):
* platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
(WebCore::GraphicsContextPlatformPrivate::platformContext):
* platform/graphics/win/PathDirect2D.cpp:
(WebCore::Path::transform):
* platform/graphics/win/PlatformContextDirect2D.cpp:
(WebCore::PlatformContextDirect2D::beginDraw):
(WebCore::PlatformContextDirect2D::endDraw):
* platform/graphics/win/PlatformContextDirect2D.h:
(WebCore::PlatformContextStateSaver::PlatformContextStateSaver):
(WebCore::PlatformContextStateSaver::~PlatformContextStateSaver):
(WebCore::PlatformContextStateSaver::save):
(WebCore::PlatformContextStateSaver::restore):
(WebCore::PlatformContextStateSaver::didSave const):

Source/WebKit:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* PlatformFTW.cmake: Added.
* Shared/ShareableBitmap.h:
* Shared/win/ShareableBitmapDirect2D.cpp: Added.
* UIProcess/BackingStore.cpp:
* UIProcess/BackingStore.h:
(WebKit::BackingStore::renderTarget):
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
* UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
* UIProcess/win/BackingStoreDirect2D.cpp: Added.
* UIProcess/win/WebInspectorProxyWin.cpp:
(WebKit::WebInspectorProxy::inspectorPageURL):
(WebKit::WebInspectorProxy::inspectorTestPageURL):
(WebKit::WebInspectorProxy::inspectorBaseURL):
* UIProcess/win/WebView.cpp:
(WebKit::WebView::paint):
* UIProcess/win/WebView.h:
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::display):
* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
* WebProcess/WebPage/win/WebInspectorUIWin.cpp:
(WebKit::WebInspectorUI::localizedStringsURL):
(WebKit::RemoteWebInspectorUI::localizedStringsURL):
* WebProcess/win/WebProcessMainWin.cpp:
(WebKit::WebProcessMainWin):

Source/WebKitLegacy:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* CMakeLists.txt:
* PlatformFTW.cmake: Added.

Source/WebKitLegacy/win:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* AccessibleBase.cpp:
(AccessibleBase::get_locale):
* CFDictionaryPropertyBag.cpp:
(ConvertCFTypeToVariant):
(CFDictionaryPropertyBag::Read):
(CFDictionaryPropertyBag::Write):
* CFDictionaryPropertyBag.h:
* COMPropertyBag.h:
(HashType>::Read):
(HashType>::GetPropertyInfo):
* MarshallingHelpers.cpp:
* MarshallingHelpers.h:
* WebApplicationCache.cpp:
* WebArchive.cpp:
* WebArchive.h:
* WebCache.cpp:
* WebCoreSupport/WebFrameLoaderClient.cpp:
* WebDatabaseManager.cpp:
* WebHistory.cpp:
* WebHistoryItem.cpp:
* WebKitCOMAPI.cpp:
* WebKitCOMAPI.h:
* WebKitDLL.cpp:
* WebLocalizableStrings.cpp:
* WebLocalizableStrings.h:
* WebMutableURLRequest.cpp:
* WebPreferences.cpp:
* WebPreferences.h:
* WebView.cpp:
* WebView.h:

Tools:

<rdar://problem/54082550>

Reviewed by Dean Jackson.

* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
* PlatformFTW.cmake: Added.

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

3 months agoOpenSource MemoryFootprint API for JSC command line tool
msaboff@apple.com [Thu, 8 Aug 2019 20:48:37 +0000 (20:48 +0000)]
OpenSource MemoryFootprint API for JSC command line tool
https://bugs.webkit.org/show_bug.cgi?id=200541

Reviewed by Saam Barati.

Source/JavaScriptCore:

Use wtf/spi/darwin/ProcessMemoryFootprint.h instead of WebKitAdditions/MemoryFootprint.h
for process memory stats.

* jsc.cpp:
(MemoryFootprint::MemoryFootprint):

Source/WTF:

OpenSource version of WebKitAdditions/MemoryFootprint.h.

* WTF.xcodeproj/project.pbxproj:
* wtf/spi/darwin/ProcessMemoryFootprint.h: Added.
(ProcessMemoryFootprint::now):
(ProcessMemoryFootprint::resetPeak):

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

3 months ago[Mac] Use the PID of the WebContent process when issuing local file read sandbox...
pvollan@apple.com [Thu, 8 Aug 2019 20:32:41 +0000 (20:32 +0000)]
[Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
https://bugs.webkit.org/show_bug.cgi?id=200543
Source/WebKit:

Reviewed by Brent Fulgham.

Adopt SPI to issue a process-specific sandbox extension for local file read, passing it the process
identifier of the WebContent process.

* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::sandboxExtensionForType):
(WebKit::SandboxExtension::createHandleForReadByPid):
* Shared/SandboxExtension.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

Source/WTF:

<rdar://problem/49394015>

Reviewed by Brent Fulgham.

Add new SPI.

* wtf/Platform.h:
* wtf/spi/darwin/SandboxSPI.h:

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

3 months agoUnreviewed, address post-landing review comments for r248431.
cdumez@apple.com [Thu, 8 Aug 2019 19:58:29 +0000 (19:58 +0000)]
Unreviewed, address post-landing review comments for r248431.

* Modules/indexeddb/IDBRequest.h:

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

3 months ago[iOS] Position image information should respect the image orientation
commit-queue@webkit.org [Thu, 8 Aug 2019 19:13:11 +0000 (19:13 +0000)]
[iOS] Position image information should respect the image orientation
https://bugs.webkit.org/show_bug.cgi?id=200487

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-08-08
Reviewed by Simon Fraser.

Source/WebCore:

Re-factor CachedImage::imageSizeForRenderer() into another overriding
function which does not scale the imageSize. Therefore the new function
returns FloatSize while the original function returns LayoutSize.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer const):
* loader/cache/CachedImage.h:
* rendering/RenderElement.h:

Source/WebKit:

imagePositionInformation() should respect the image orientation when
drawing an Image to a ShareableBitmap context.

boundsPositionInformation() already takes care of the image orientation
because it gets RenderImage::enclosingBoundingBox().

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::imagePositionInformation):

Tools:

Add an API test to verify the position image information is drawn rotated
because of respecting its image orientation.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/exif-orientation-8-llo.jpg: Added.
* TestWebKitAPI/Tests/WebKitCocoa/img-with-rotated-image.html: Added.

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

3 months ago[GTK] Fix WebContext languages test
csaavedra@igalia.com [Thu, 8 Aug 2019 19:07:50 +0000 (19:07 +0000)]
[GTK] Fix WebContext languages test
https://bugs.webkit.org/show_bug.cgi?id=200538

Reviewed by Alex Christensen.

This test broke after the format of Accepted-Languages
was changed in r238236, update.

* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextLanguages):

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

3 months agoSet WKWebView opaque based on drawsBackground in PageConfiguration.
timothy@apple.com [Thu, 8 Aug 2019 19:04:36 +0000 (19:04 +0000)]
Set WKWebView opaque based on drawsBackground in PageConfiguration.
https://bugs.webkit.org/show_bug.cgi?id=200528

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Set self.opaque = NO when !self.opaque || !pageConfiguration->drawsBackground().
It is almost impossible to have !self.opaque be NO at this point, since we are still inside initWithFrame:. A subclass could
override opaque and return NO, but checking pageConfiguration's drawsBackground is a good alternative.
* WebProcess/WebPage/WebPage.h: Remove unused m_drawsBackground member.

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

3 months ago[GTK] Fix /webkit/WebKitWebsiteData/databases failure
csaavedra@igalia.com [Thu, 8 Aug 2019 19:04:35 +0000 (19:04 +0000)]
[GTK] Fix /webkit/WebKitWebsiteData/databases failure
https://bugs.webkit.org/show_bug.cgi?id=200536

Reviewed by Carlos Alberto Lopez Perez.

* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebsiteDataDatabases): Databases take a moment to be written,
wait before fetching the data as it's done in other tests.

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

3 months agoWeb Inspector: rename `queryObjects` to `queryInstances` for clarity
drousso@apple.com [Thu, 8 Aug 2019 18:59:04 +0000 (18:59 +0000)]
Web Inspector: rename `queryObjects` to `queryInstances` for clarity
https://bugs.webkit.org/show_bug.cgi?id=200520

Reviewed by Brian Burg.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(queryInstances): Added.
(queryObjects):
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::queryInstances): Added.
(Inspector::JSInjectedScriptHost::queryObjects): Deleted.
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryInstances): Added.
(Inspector::jsInjectedScriptHostPrototypeFunctionQueryObjects): Deleted.

Source/WebCore:

Test: inspector/console/queryInstances.html

* inspector/CommandLineAPIModuleSource.js:
(CommandLineAPIImpl.prototype.queryInstances): Added.
(CommandLineAPIImpl.prototype.queryObjects):

Source/WebInspectorUI:

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

LayoutTests:

* inspector/console/queryInstances.html: Renamed from LayoutTests/inspector/console/queryObjects.html.
* inspector/console/queryInstances-expected.txt: Renamed from LayoutTests/inspector/console/queryObjects-expected.txt.

* http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt:

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

3 months ago[iOS 13] Taps that interrupt momentum scrolling are recognized as clicks
wenson_hsieh@apple.com [Thu, 8 Aug 2019 18:54:06 +0000 (18:54 +0000)]
[iOS 13] Taps that interrupt momentum scrolling are recognized as clicks
https://bugs.webkit.org/show_bug.cgi?id=200516
<rdar://problem/53889373>

Reviewed by Tim Horton.

Source/WebKit:

After <https://trac.webkit.org/r247656>, the -tracksImmediatelyWhileDecelerating property of WKScrollView and
WKChildScrollView is set to NO. This means that if a user interacts with the page while the scroll view is
decelerating (e.g. after momentum scrolling), the pan gesture recognizer will not be immediately recognized.
This gives other gesture recognizers, such as the synthetic click (single tap) gesture a chance to instead
recognize first. In this particular bug, this causes taps on the web view that are intended to only stop
momentum scrolling to instead activate clickable elements beneath the touch, such as links and buttons.

To mitigate this, we add some logic to prevent the click gesture recognizer from firing in the case where the
tap also causes the scroll view to decelerate. This heuristic is similar to the one introduced in r219310, which
has the same purpose of hiding gestures that stop momentum scrolling from the page, and also consults
-[UIScrollView _isInterruptingDeceleration].

Tests:  fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html
        fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html
        fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow.html

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizerShouldBegin:]):

Return NO in the case of the single tap gesture if the UIScrollView most recently touched by the single tap
gesture (or one of its enclosing scroll views, up to the main WKScrollView) is being interrupted while
decelerating.

* UIProcess/ios/WKSyntheticTapGestureRecognizer.h:
* UIProcess/ios/WKSyntheticTapGestureRecognizer.mm:
(-[WKSyntheticTapGestureRecognizer reset]):
(-[WKSyntheticTapGestureRecognizer touchesBegan:withEvent:]):

Teach WKSyntheticTapGestureRecognizer to keep track of the last WKScrollView that was touched, for later use in
-gestureRecognizerShouldBegin:. To do this, we keep a weak reference to the first UIScrollView we find in the
set of touches.

(-[WKSyntheticTapGestureRecognizer lastTouchedScrollView]):

LayoutTests:

Add new layout tests. See below for details.

* fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame-expected.txt: Added.
* fast/scrolling/ios/click-events-during-momentum-scroll-in-main-frame.html: Added.

Add a test to verify that interrupting scrolling in the main frame using a tap doesn't fire a click event.

* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt: Added.
* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html: Added.

Add a test to verify that after triggering momentum scrolling in a fast subscrollable region, tapping outside of
the scroller will still fire a click event.

* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-expected.txt: Added.
* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow.html: Added.

Add a test to verify that interrupting scrolling in a fast subscrollable region using a tap doesn't fire a
click event.

* resources/ui-helper.js:
(window.UIHelper.dragFromPointToPoint):
(window.UIHelper):

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

3 months agoFix thread safety bug in AudioSourceProviderAVFObjC::prepare()
cdumez@apple.com [Thu, 8 Aug 2019 18:42:16 +0000 (18:42 +0000)]
Fix thread safety bug in AudioSourceProviderAVFObjC::prepare()
https://bugs.webkit.org/show_bug.cgi?id=200542

Reviewed by Jer Noble.

Fix thread safety bug in AudioSourceProviderAVFObjC::prepare(). It calls callOnMainThread()
from a background thread and captures makeRef(*this) in the lambda, even though |this| is a
AudioSourceProviderAVFObjC, which subclasses RefCounted, not ThreadSafeRefCounted.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:

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

3 months agoMake IDBRequest ThreadSafeRefCounted
cdumez@apple.com [Thu, 8 Aug 2019 18:41:23 +0000 (18:41 +0000)]
Make IDBRequest ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=200540

Reviewed by Alex Christensen.

Make IDBRequest ThreadSafeRefCounted, as it looks like it is being ref'd / deref'd
from several threads, in IDBConnectionProxy::notifyOpenDBRequestBlocked() for
example.

* Modules/indexeddb/IDBRequest.h:

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

3 months agoUse "safari" glyph for "Show Link Previews" contextual menu
dino@apple.com [Thu, 8 Aug 2019 18:40:38 +0000 (18:40 +0000)]
Use "safari" glyph for "Show Link Previews" contextual menu
https://bugs.webkit.org/show_bug.cgi?id=200544
<rdar://problem/54087842>

Reviewed by Tim Horton.

Use the system image for the compass.

* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction imageForElementActionType:]):

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

3 months ago[JSC] Add "jump if (not) undefined or null" bytecode ops
ross.kirsling@sony.com [Thu, 8 Aug 2019 18:23:18 +0000 (18:23 +0000)]
[JSC] Add "jump if (not) undefined or null" bytecode ops
https://bugs.webkit.org/show_bug.cgi?id=200480

Reviewed by Saam Barati.

JSTests:

* stress/destructuring-assignment-require-object-coercible.js:
* stress/nullish-coalescing.js:

Source/JavaScriptCore:

This patch introduces fused jumps for op_is_undefined_or_null, which ignores "masquerade as undefined" behavior.

This lets us fix a edge-case bug in RequireObjectCoercible (where `({ length } = document.all)` was a TypeError)
and moreover provides a very useful optimization for the new ?. and ?? operators, which have semantics centered
around op_jundefined_or_null and op_jnundefined_or_null, respectively.

* bytecode/BytecodeList.rb:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/Opcode.h:
(JSC::isBranch):
* bytecode/PreciseJumpTargetsInlines.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::Label::setLocation):
(JSC::BytecodeGenerator::emitJumpIfTrue):
(JSC::BytecodeGenerator::emitJumpIfFalse):
(JSC::BytecodeGenerator::emitRequireObjectCoercible):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_jundefined_or_null): Added.
(JSC::JIT::emit_op_jnundefined_or_null): Added.
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_jundefined_or_null): Added.
(JSC::JIT::emit_op_jnundefined_or_null): Added.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

3 months agoresults.webkit.org: Use canvas for timeline
jbedard@apple.com [Thu, 8 Aug 2019 17:53:51 +0000 (17:53 +0000)]
results.webkit.org: Use canvas for timeline
https://bugs.webkit.org/show_bug.cgi?id=200172

Rubber-stamped by Aakash Jain.

* resultsdbpy/resultsdbpy/view/static/js/commit.js:
(Commit.constructor): Make uuid a member variable instead of a member function for efficiency.
(Commit.compare): Ditto.
(_CommitBank.commitByUuid): Ditto.
(_CommitBank._loadSiblings): Ditto.
(_CommitBank._load): Ditto.
* resultsdbpy/resultsdbpy/view/static/js/timeline.js:
(tickForCommit): Deleted.
(minimumUuidForResults): Given a dictionary of result lists, determine the minimum UUID
which encompasses all results. Crucially, this function must exclude an UUIDs which may
refer to results excluded because of the limit argument.
(renderTimeline): Deleted.
(commitsForResults): Given a dictionary of result lists, return a list of commits associated
with those results.
(scaleForCommits): Given a list of commits, generate a scale to be consumed by the canvas Timeline.
(repositoriesForCommits): Given a list of commits, return a sorted list of associated repository ids.
(xAxisFromScale): Create a canvas-based x-axis based on the provided scale and a repository id.
(inPlaceCombine): Combine result objects together.
(statsForSingleResult): Turn a single result into a stat object.
(combineResults): Given lists of results, combine these lists while keeping the original lists unchanged.
(Dot): Deleted.
(TimelineFromEndpoint): Renamed from Timeline.
(TimelineFromEndpoint.constructor): Canvas Timeline manages expansion and collapsing of nested timelines.
(TimelineFromEndpoint.teardown): Detach callbacks from CommitBank.
(TimelineFromEndpoint.update): Update with any new commit information, force a re-draw of the current
cache contents.
(TimelineFromEndpoint.reload): Remove management of nested timelines.
(TimelineFromEndpoint.render): Use canvas Timeline instead of html timeline to visualize results.
* resultsdbpy/resultsdbpy/view/templates/search.html: Use TimelineFromEndpoint class.
* resultsdbpy/resultsdbpy/view/templates/suite_results.html: Ditto.

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