Timeline



Oct 19, 2017:

11:17 PM Changeset in webkit [223743] by Ms2ger@igalia.com
  • 2 edits in trunk/Source/WebCore

Remove proprietary constants from WebGL2RenderingContext.
https://bugs.webkit.org/show_bug.cgi?id=178511

Reviewed by Ryosuke Niwa.

As far as I can tell, these constants are not in the specification,
and no other browser supports them.

No new tests: just code removal.

  • html/canvas/WebGL2RenderingContext.idl:
9:52 PM Changeset in webkit [223742] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move style update related logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178558
<rdar://problem/35088218>

Reviewed by Simon Fraser.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::ensureStyleIsUpToDateForLayout):
(WebCore::FrameView::layout):

  • page/FrameView.h:
8:08 PM Changeset in webkit [223741] by sbarati@apple.com
  • 2 edits in trunk/Source/bmalloc

Runtime disable gigacage on iOS because it broke WasmBench
https://bugs.webkit.org/show_bug.cgi?id=178556

Reviewed by Keith Miller.

  • bmalloc/Gigacage.cpp:

(Gigacage::shouldBeEnabled):

7:41 PM Changeset in webkit [223740] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Introduce completionHandler-based SPI for _WKDownloadDelegate.decideDestinationWithSuggestedFilename
https://bugs.webkit.org/show_bug.cgi?id=178560

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/_WKDownloadDelegate.h:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didStart):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):
(WebKit::DownloadClient::willSendRequest):

7:39 PM Changeset in webkit [223739] by Chris Dumez
  • 10 edits
    1 add in trunk/Source/WebKit

ServiceWorkerContextManager should be an IPC::MessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=178552

Reviewed by Youenn Fablet.

ServiceWorkerContextManager should be an IPC::MessageReceiver, to avoid putting too many
ServiceWorker related methods on WebProcess class.

  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startServiceWorkerContext):
(WebKit::WebSWServerConnection::startFetch):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/ServiceWorkerContextManager.cpp:

(WebKit::ServiceWorkerContextManager::startFetchInServiceWorker):
(WebKit::ServiceWorkerContextManager::startFetch): Deleted.

  • WebProcess/Storage/ServiceWorkerContextManager.h:
  • WebProcess/Storage/ServiceWorkerContextManager.messages.in: Added.
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::didReceiveMessage):
(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext): Deleted.
(WebKit::WebProcess::startFetchInServiceWorker): Deleted.

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
7:23 PM Changeset in webkit [223738] by jfbastien@apple.com
  • 99 edits
    9 copies
    2 moves
    4 adds in trunk

WebAssembly: no VM / JS version of everything but Instance
https://bugs.webkit.org/show_bug.cgi?id=177473

Reviewed by Filip Pizlo, Saam Barati.

JSTests:

  • Exceeding max on memory growth now returns a range error as per

spec. This is a (very minor) breaking change: it used to throw OOM
error. Update the corresponding test.

  • wasm/js-api/memory-grow.js:

(assertEq):

  • wasm/js-api/table.js:

(assert.throws):

Source/JavaScriptCore:

This change entails cleaning up and splitting a bunch of code which we had
intertwined between C++ classes which represent JS objects, and pure C++
implementation objects. This specific change goes most of the way towards
allowing JSC's WebAssembly to work without VM / JS, up to but excluding
JSWebAssemblyInstance (there's Wasm::Instance, but it's not *the* thing
yet). Because of this we still have a few FIXME identifying places that need to
change. A follow-up change will go the rest of the way.

I went about this change in the simplest way possible: grep the
JavaScriptCore/wasm directory for "JS[C_]" as well as "VM" and exclude the /js/
sub-directory (which contains the JS implementation of WebAssembly).

None of this change removes the need for a JIT entitlement to be able to use
WebAssembly. We don't have an interpreter, the process therefore still needs to
be allowed to JIT to use these pure-C++ APIs.

Interesting things to note:

  • Remove VM from Plan and associated places. It can just live as a capture in the callback lambda if it's needed.
  • Wasm::Memory shouldn't require a VM. It was only used to ask the GC to collect. We now instead pass two lambdas at construction time for this purpose: one to notify of memory pressure, and the other to ask for syncrhonous memory reclamation. This allows whoever creates the memory to dictate how to react to both these cases, and for a JS embedding that's to call the GC (async or sync, respectively).
  • Move grow logic from JSWebAssemblyMemory to Wasm::Memory::grow. Use Expected there, with an enum class for failure types.
  • Exceeding max on memory growth now returns a range error as per spec. This is a (very minor) breaking change: it used to throw OOM error. Update the corresponding test.
  • When generating the grow_memory opcode, no need to get the VM. Instead, reach directly for Wasm::Memory and grow it.
  • JSWebAssemblyMemory::grow can now always throw on failure, because it's only ever called from JS (not from grow_memory as before).
  • Wasm::Memory now takes a callback for successful growth. This allows JS wrappers to register themselves when growth succeeds without Wasm::Memory knowning anything about JS. It'll also allow creating a list of callbacks for when we add thread support (we'll want to notify many wrappers, all under a lock).
  • Wasm::Memory is now back to being the source of truth about address / size, used directly by generated code instead of JSWebAssemblyMemory.
  • Move wasmToJS from the general WasmBinding header to its own header under wasm/js. It's only used by wasm/js/JSWebAssemblyCodeBlock.cpp, and uses VM, and therefore isn't general WebAssembly.
  • Make Wasm::Context an actual type (just a struct holding a JSWebAssemlyInstance for now) instead of an alias for that. Notably this doesn't add anything to the Context and doesn't change what actually gets passed around in JIT code (fast TLS or registers) because these changes potentially impact performance. The entire purpose of this change is to allow passing Wasm::Context around without having to know about VM. Since VM contains a Wasm::Context the JS embedding is effectively the same, but with this setup a non-JS embedding is much better off.
  • Move JSWebAssembly into the JS folder.
  • OMGPlan: use Wasm::CodeBlock directly instead of JSWebAssemblyCodeBlock.
  • wasm->JS stubs are now on the instance's tail as raw pointers, instead of being on JSWebAssemblyCodeBlock, and are now called wasm->Embedder stubs. The owned reference is still on JSWebAssemblyCodeBlock, and is still called wasm->JS stub. This move means that the embedder must, after creating a Wasm::CodeBlock, somehow create the stubs to call back into the embedder. This removes an indirection in the generated code because the B3 IR generator now reaches into the instance instead of JSWebAssemblyCodeBlock.
  • Move more CodeBlock things. Compilation completion is now marked by its own atomic<bool> flag instead of a nullptr plan: that required using a lock, and was causing a deadlock in stack-trace.js because before my changes JSWebAssemblyCodeBlock did its own completion checking separately from Wasm::CodeBlock, without getting the lock. Now that everything points to Wasm::CodeBlock and there's no cached completion marker, the lock was being acquired in a sanity-check assertion.
  • Embedder -> Wasm wrappers are now generated through a function that's passed in at compilation time, instead of being hard-coded as a JS -> Wasm wrapper.
  • WasmMemory doens't need to know about fault handling thunks. Only the IR generator should know, and should make sure that the exception throwing thunk is generated if any memory is present (note: with signal handling not all of them generate an exception check).
  • Make exception throwing pluggable: instead of having a hard-coded JS-specific lambda we now have a regular C++ function being called from JIT code when a WebAssembly exception is thrown. This allows any embedder to get called as they wish. For now a process can only have a single of these functions (i.e. only one embedder per process) because the trap handler is a singleton. That can be fixed in in #177475.
  • Create WasmEmbedder.h where all embedder plugging will live.
  • Split up JSWebAssemblyTable into Wasm::Table which is refcounted. JSWebAssemblyTable now only contains the JS functions in the table, and Wasm::Table is what's used by the JIT code to lookup where to call and do the instance check (for context switch). Note that this creates an extra allocation for all the instances in Wasm::Table, and in exchange removes an indirection in JIT code because the instance used to be obtained off of the JS function. Also note that it's the embedder than keeps the instances alive, not Wasm::Table (which holds a dumb pointer to the instance), because doing otherwise would cause reference cycles.
    • Add WasmInstance. It doesn't do much for now, owns globals.
    • JSWebAssembly instance now doesn't just contain the imported functions as JSObjects, it also has the corresponding import's instance and wasm entrypoint. This triples the space allocated per instance's imported function, but there shouldn't be that many imports. This has two upsides: it creates smaller and faster code, and makes is easier to disassociate embedder-specific things from embedder-neutral things. The small / faster win is in two places: B3 IR generator only needs offsetOfImportFunction for the call opcode (when the called index is an import) to know whether the import is wasm->wasm or wasm->embedder (this isn't known at compile-time because it's dependent on the import object), this is now done by seeing if that import function has an associated target instance (only wasm->wasm does); the other place is wasmBinding which uses offsetOfImportFunction to figure out the wasm->wasm target instance, and then gets WebAssemblyFunction::offsetOfWasmEntrypointLoadLocation to do a tail call. The disassociation comes because the target instance can be Wasm::Instance once we change what the Context is, and WasmEntrypointLoadLocation is already embedder-independent. As a next step I can move this tail allocation from JSWebAssemblyInstance to Wasm::Instance, and leave importFunction in as an opaque pointer which is embedder-specific, and in JS will remain WriteBarrier<JSObject>.
    • Rename VMEntryFrame to EntryFrame, and in many places pass a pointer to it around instead of VM. This is a first step in allowing entry frames which aren't stored on VM, but which are instead stored in an embedder-specific location. That change won't really affect JS except through code churn, but will allow WebAssembly to use some machinery in a generic manner without having a VM.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessGenerationState::emitExplicitExceptionHandler):

  • debugger/Debugger.cpp:

(JSC::Debugger::stepOutOfFunction):
(JSC::Debugger::returnEvent):
(JSC::Debugger::unwindEvent):
(JSC::Debugger::didExecuteProgram):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileExceptionHandlers):

  • dfg/DFGOSREntry.cpp:

(JSC::DFG::prepareOSREntry):

  • dfg/DFGOSRExit.cpp:

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

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::wasmAwareLexicalGlobalObject):
(JSC::CallFrame::callerFrame):
(JSC::CallFrame::unsafeCallerFrame):

  • interpreter/CallFrame.h:

(JSC::ExecState::callerFrame const):
(JSC::ExecState::callerFrameOrEntryFrame const):
(JSC::ExecState::unsafeCallerFrameOrEntryFrame const):

  • interpreter/FrameTracers.h:

(JSC::NativeCallFrameTracer::NativeCallFrameTracer):
(JSC::NativeCallFrameTracerWithRestore::NativeCallFrameTracerWithRestore):
(JSC::NativeCallFrameTracerWithRestore::~NativeCallFrameTracerWithRestore):

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::operator() const):
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):
(JSC::Interpreter::unwind):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::StackVisitor):
(JSC::StackVisitor::gotoNextFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::Frame::dump const):

  • interpreter/StackVisitor.h:

(JSC::StackVisitor::Frame::callerIsEntryFrame const):

  • interpreter/VMEntryRecord.h:

(JSC::VMEntryRecord::prevTopEntryFrame):
(JSC::VMEntryRecord::unsafePrevTopEntryFrame):
(JSC::EntryFrame::vmEntryRecordOffset):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::loadWasmContextInstance):
(JSC::AssemblyHelpers::storeWasmContextInstance):
(JSC::AssemblyHelpers::loadWasmContextInstanceNeedsMacroScratchRegister):
(JSC::AssemblyHelpers::storeWasmContextInstanceNeedsMacroScratchRegister):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBufferImpl):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::copyCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer):

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::privateCompileExceptionHandlers):

  • jit/JITExceptions.cpp:

(JSC::genericUnwind):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emitSlow_op_loop_hint):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_catch):

  • jit/JITOperations.cpp:
  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::nativeForGenerator):

  • jsc.cpp:

(functionDumpCallFrame):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntThunks.cpp:

(JSC::vmEntryRecord):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/SamplingProfiler.cpp:

(JSC::FrameWalker::FrameWalker):
(JSC::FrameWalker::advanceToParentFrame):
(JSC::SamplingProfiler::processUnverifiedStackTraces):

  • runtime/ThrowScope.cpp:

(JSC::ThrowScope::~ThrowScope):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:

(JSC::VM::topEntryFrameOffset):

  • runtime/VMTraps.cpp:

(JSC::isSaneFrame):
(JSC::VMTraps::tryInstallTrapBreakpoints):
(JSC::VMTraps::invalidateCodeBlocksOnStack):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::restoreWasmContextInstance):
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::addGrowMemory):
(JSC::Wasm::B3IRGenerator::addCurrentMemory):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompile):

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

(JSC::Wasm::BBQPlan::BBQPlan):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToWasm):

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

(JSC::Wasm::CodeBlock::create):
(JSC::Wasm::CodeBlock::CodeBlock):
(JSC::Wasm::CodeBlock::compileAsync):
(JSC::Wasm::CodeBlock::setCompilationFinished):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::offsetOfImportStubs):
(JSC::Wasm::CodeBlock::allocationSize):
(JSC::Wasm::CodeBlock::importWasmToEmbedderStub):
(JSC::Wasm::CodeBlock::offsetOfImportWasmToEmbedderStub):
(JSC::Wasm::CodeBlock::wasmToJSCallStubForImport):
(JSC::Wasm::CodeBlock::compilationFinished):
(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::Wasm::CodeBlock::wasmEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmContext.cpp:

(JSC::Wasm::Context::useFastTLS):
(JSC::Wasm::Context::load const):
(JSC::Wasm::Context::store):

  • wasm/WasmContext.h:
  • wasm/WasmEmbedder.h: Copied from Source/JavaScriptCore/wasm/WasmContext.h.
  • wasm/WasmFaultSignalHandler.cpp:
  • wasm/WasmFaultSignalHandler.h:
  • wasm/WasmFormat.h:
  • wasm/WasmInstance.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.

(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::~Instance):
(JSC::Wasm::Instance::extraMemoryAllocated const):

  • wasm/WasmInstance.h: Added.

(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::finalizeCreation):
(JSC::Wasm::Instance::module):
(JSC::Wasm::Instance::codeBlock):
(JSC::Wasm::Instance::memory):
(JSC::Wasm::Instance::table):
(JSC::Wasm::Instance::loadI32Global const):
(JSC::Wasm::Instance::loadI64Global const):
(JSC::Wasm::Instance::loadF32Global const):
(JSC::Wasm::Instance::loadF64Global const):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::offsetOfCachedStackLimit):
(JSC::Wasm::Instance::cachedStackLimit const):
(JSC::Wasm::Instance::setCachedStackLimit):

  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::Memory):
(JSC::Wasm::Memory::create):
(JSC::Wasm::Memory::~Memory):
(JSC::Wasm::Memory::grow):

  • wasm/WasmMemory.h:

(JSC::Wasm::Memory::offsetOfMemory):
(JSC::Wasm::Memory::offsetOfSize):

  • wasm/WasmMemoryInformation.cpp:

(JSC::Wasm::PinnedRegisterInfo::get):
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo):

  • wasm/WasmMemoryInformation.h:

(JSC::Wasm::PinnedRegisterInfo::toSave const):

  • wasm/WasmMemoryMode.cpp: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.

(JSC::Wasm::makeString):

  • wasm/WasmMemoryMode.h: Copied from Source/JavaScriptCore/wasm/WasmFaultSignalHandler.h.
  • wasm/WasmModule.cpp:

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

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

(JSC::Wasm::ModuleParser::parseTableHelper):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::OMGPlan):
(JSC::Wasm::OMGPlan::runForIndex):

  • wasm/WasmOMGPlan.h:
  • wasm/WasmPageCount.h:

(JSC::Wasm::PageCount::isValid const):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::Plan):
(JSC::Wasm::Plan::runCompletionTasks):
(JSC::Wasm::Plan::addCompletionTask):
(JSC::Wasm::Plan::tryRemoveContextAndCancelIfLast):

  • wasm/WasmPlan.h:

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

  • wasm/WasmSignature.cpp:
  • wasm/WasmSignature.h:
  • wasm/WasmTable.cpp: Added.

(JSC::Wasm::Table::create):
(JSC::Wasm::Table::~Table):
(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::grow):
(JSC::Wasm::Table::clearFunction):
(JSC::Wasm::Table::setFunction):

  • wasm/WasmTable.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.h.

(JSC::Wasm::Table::maximum const):
(JSC::Wasm::Table::size const):
(JSC::Wasm::Table::offsetOfSize):
(JSC::Wasm::Table::offsetOfFunctions):
(JSC::Wasm::Table::offsetOfInstances):
(JSC::Wasm::Table::isValidSize):

  • wasm/WasmThunks.cpp:

(JSC::Wasm::throwExceptionFromWasmThunkGenerator):
(JSC::Wasm::triggerOMGTierUpThunkGenerator):
(JSC::Wasm::Thunks::setThrowWasmException):
(JSC::Wasm::Thunks::throwWasmException):

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

(JSC::Wasm::Worklist::stopAllPlansForContext):

  • wasm/WasmWorklist.h:
  • wasm/js/JSToWasm.cpp: Added.

(JSC::Wasm::createJSToWasmWrapper):

  • wasm/js/JSToWasm.h: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
  • wasm/js/JSWebAssembly.cpp: Renamed from Source/JavaScriptCore/wasm/JSWebAssembly.cpp.
  • wasm/js/JSWebAssembly.h: Renamed from Source/JavaScriptCore/wasm/JSWebAssembly.h.
  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::create):
(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):

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

(JSC::JSWebAssemblyInstance::JSWebAssemblyInstance):
(JSC::JSWebAssemblyInstance::finishCreation):
(JSC::JSWebAssemblyInstance::visitChildren):
(JSC::JSWebAssemblyInstance::finalizeCreation):
(JSC::JSWebAssemblyInstance::create):

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::instance):
(JSC::JSWebAssemblyInstance::context const):
(JSC::JSWebAssemblyInstance::table):
(JSC::JSWebAssemblyInstance::webAssemblyToJSCallee):
(JSC::JSWebAssemblyInstance::setMemory):
(JSC::JSWebAssemblyInstance::offsetOfTail):
(JSC::JSWebAssemblyInstance::importFunctionInfo):
(JSC::JSWebAssemblyInstance::offsetOfTargetInstance):
(JSC::JSWebAssemblyInstance::offsetOfWasmEntrypoint):
(JSC::JSWebAssemblyInstance::offsetOfImportFunction):
(JSC::JSWebAssemblyInstance::importFunction):
(JSC::JSWebAssemblyInstance::internalMemory):
(JSC::JSWebAssemblyInstance::wasmCodeBlock const):
(JSC::JSWebAssemblyInstance::offsetOfWasmTable):
(JSC::JSWebAssemblyInstance::offsetOfCallee):
(JSC::JSWebAssemblyInstance::offsetOfGlobals):
(JSC::JSWebAssemblyInstance::offsetOfWasmCodeBlock):
(JSC::JSWebAssemblyInstance::offsetOfWasmMemory):
(JSC::JSWebAssemblyInstance::cachedStackLimit const):
(JSC::JSWebAssemblyInstance::setCachedStackLimit):
(JSC::JSWebAssemblyInstance::wasmMemory):
(JSC::JSWebAssemblyInstance::wasmModule):
(JSC::JSWebAssemblyInstance::allocationSize):
(JSC::JSWebAssemblyInstance::module const):

  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::adopt):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::grow):
(JSC::JSWebAssemblyMemory::growSuccessCallback):

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

(JSC::JSWebAssemblyModule::moduleInformation const):
(JSC::JSWebAssemblyModule::exportSymbolTable const):
(JSC::JSWebAssemblyModule::signatureIndexFromFunctionIndexSpace const):
(JSC::JSWebAssemblyModule::callee const):
(JSC::JSWebAssemblyModule::codeBlock):
(JSC::JSWebAssemblyModule::module):

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

(JSC::JSWebAssemblyTable::create):
(JSC::JSWebAssemblyTable::JSWebAssemblyTable):
(JSC::JSWebAssemblyTable::visitChildren):
(JSC::JSWebAssemblyTable::grow):
(JSC::JSWebAssemblyTable::getFunction):
(JSC::JSWebAssemblyTable::clearFunction):
(JSC::JSWebAssemblyTable::setFunction):

  • wasm/js/JSWebAssemblyTable.h:

(JSC::JSWebAssemblyTable::isValidSize):
(JSC::JSWebAssemblyTable::maximum const):
(JSC::JSWebAssemblyTable::size const):
(JSC::JSWebAssemblyTable::table):

  • wasm/js/WasmToJS.cpp: Copied from Source/JavaScriptCore/wasm/WasmBinding.cpp.

(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
(JSC::Wasm::wasmToJSException):

  • wasm/js/WasmToJS.h: Copied from Source/JavaScriptCore/wasm/WasmBinding.h.
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:

(JSC::webAssemblyMemoryProtoFuncGrow):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):
(JSC::WebAssemblyModuleConstructor::createModule):

  • wasm/js/WebAssemblyModuleConstructor.h:
  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/js/WebAssemblyPrototype.cpp:

(JSC::webAssemblyCompileFunc):
(JSC::instantiate):
(JSC::compileAndInstantiate):
(JSC::webAssemblyValidateFunc):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/js/WebAssemblyWrapperFunction.cpp:

(JSC::WebAssemblyWrapperFunction::create):

Source/WebCore:

  • ForwardingHeaders/wasm/WasmModule.h: Added. This used to be

included in JSWebAssemblyModule.h.

  • bindings/js/SerializedScriptValue.cpp: Update postMessage code

according to C++ API changes.

7:17 PM Changeset in webkit [223737] by achristensen@apple.com
  • 9 edits in trunk/Source/WebKit

Modernize authentication challenge handling in WebKit
https://bugs.webkit.org/show_bug.cgi?id=178555

Reviewed by Tim Horton.

  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::didReceiveAuthenticationChallengeInFrame):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):

  • UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
  • UIProcess/Cocoa/NavigationState.h:
  • UIProcess/Cocoa/NavigationState.mm:

(WebKit::NavigationState::NavigationClient::canAuthenticateAgainstProtectionSpace):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy):

7:12 PM Changeset in webkit [223736] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed localized strings update.

  • Localizations/en.lproj/localizedStrings.js:

Add missing string after r223735.

7:11 PM Changeset in webkit [223735] by Joseph Pecoraro
  • 7 edits
    6 adds in trunk/Source/WebInspectorUI

Web Inspector: Network Tab: Metrics Detail View
https://bugs.webkit.org/show_bug.cgi?id=178323
<rdar://problem/34071929>

Reviewed by Devin Rousso.

Provide a Metrics detail view for resources in the Network tab.
This detail view shows:

  • Transfer Size information (Header + Body bytes)
  • Resource Size information (Compression, MIME)
  • Timing information (ResourceTiming, Waterfall breakdown)

The display of timing information isn't quite final. But this
is a good starting point for all the information.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New resources and strings.

  • UserInterface/Base/MIMETypeUtilities.js:

(WI.shouldTreatMIMETypeAsText):
Helper for detecting text resources.

  • UserInterface/Images/Receiving.svg: Added.
  • UserInterface/Images/Sending.svg: Added.
  • UserInterface/Images/gtk/Receiving.svg: Added.
  • UserInterface/Images/gtk/Sending.svg: Added.

Same images for main and linux ports with different licenses.

  • UserInterface/Views/NetworkResourceDetailView.js:

(WI.NetworkResourceDetailView):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToHeaders):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToRequestBody):
(WI.NetworkResourceDetailView.prototype.metricsContentViewGoToResponseBody):
(WI.NetworkResourceDetailView.prototype.initialLayout):
(WI.NetworkResourceDetailView.prototype._showPreferredContentView):
(WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
Replace "Timing" and "Details" stubs with a single "Metrics" section.
Handle delegate cases from the Metrics content view.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.displayNameForResource):
(WI.NetworkTableContentView.prototype._displayType): Deleted.
(WI.NetworkTableContentView.prototype._entryForResource):
Promote this to a static helper in case anyone else wants it.

(WI.NetworkTableContentView.prototype.closed):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
Reorder code a bit to reduce work since hiding the detail view currently
forces a layout.

  • UserInterface/Views/ResourceHeadersContentView.js:

(WI.ResourceHeadersContentView):
(WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
(WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
(WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Deleted.
Simplify by making the delegate required.

  • UserInterface/Views/ResourceMetricsContentView.css: Added.

(.resource-metrics):
(.resource-metrics > .content):
(.resource-metrics > .content .label):
General metrics styles.

(.resource-metrics > .content > section):
(.resource-metrics > .content > section .subtitle):
(.resource-metrics > .content > section:not(:last-of-type)):
(.resource-metrics > .content > section.split):
(.resource-metrics > .content > section.split > .subsection):
(.resource-metrics > .content > section.split > .subsection > table):
(.resource-metrics > .content > section.split > .divider):
(.resource-metrics > .content > section.network > .subsection > .container):
(.resource-metrics > .content > section.network .bytes-group):
(.resource-metrics > .content > section.network .bytes):
(body[dir=ltr] .resource-metrics > .content > section.network table > tr > td.label):
(body[dir=rtl] .resource-metrics > .content > section.network table > tr > td.label):
(.resource-metrics > .content > section.network .suffix):
(.resource-metrics > .content > section.network img):
(.resource-metrics > .content > section.network .go-to-arrow):
(.resource-metrics > .content > section.network .warning):
Styles for Sizes sections.

(.resource-metrics > .content > section.timing):
(.resource-metrics > .content > section.timing .subtitle):
(.resource-metrics > .content > section.timing > ul):
(.resource-metrics > .content > section.timing > ul > li):
(.resource-metrics > .content > section.timing > .waterfall):
(.resource-metrics > .content > section.timing > .waterfall .block):
(.resource-metrics > .content > section.timing > ul > li > .row-label):
(body[dir=ltr] .resource-metrics > .content > section.timing > ul > li > .row-label):
(body[dir=rtl] .resource-metrics > .content > section.timing > ul > li > .row-label):
(.resource-metrics > .content > section.timing > ul > li > .time-label):
(.resource-metrics > .content > section.timing > ul > li.total .block):
(.resource-metrics > .content > section.timing > ul > li.total .time-label):
(.resource-metrics > .content > section.timing .indeterminate-progress-spinner):
(.resource-metrics > .content > section.timing .empty):
Styles for Timing section.

  • UserInterface/Views/ResourceMetricsContentView.js: Added.

(WI.ResourceMetricsContentView):
(WI.ResourceMetricsContentView.prototype.initialLayout.createSizeComponents):
(WI.ResourceMetricsContentView.prototype.initialLayout):
(WI.ResourceMetricsContentView.prototype.layout):
(WI.ResourceMetricsContentView.prototype.closed):
(WI.ResourceMetricsContentView.prototype._sizeComponents):
(WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections.appendGoToArrow):
(WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections):
(WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createBlock):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createTimeLabel):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection.createRow):
(WI.ResourceMetricsContentView.prototype._refreshTimingSection):
(WI.ResourceMetricsContentView.prototype._resourceSizeDidChange):
(WI.ResourceMetricsContentView.prototype._resourceTransferSizeDidChange):
(WI.ResourceMetricsContentView.prototype._resourceMetricsDidChange):
(WI.ResourceMetricsContentView.prototype._resourceTimestampsDidChange):
Metrics content. This just creates all of the elements, and saves a
few to get populated with data later on.

7:11 PM Changeset in webkit [223734] by Joseph Pecoraro
  • 10 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: Network Tab - Improve graphical representation of network waterfall
https://bugs.webkit.org/show_bug.cgi?id=147897
<rdar://problem/27482198>

Reviewed by Brian Burg.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Main.html:

New strings and resources.

  • UserInterface/Views/Variables.css:

(:root):
Global styles.

  • UserInterface/Views/NetworkTableContentView.css:

(.network-table .header .cell.waterfall):
(.network-table .timeline-ruler):
(.network-table .timeline-ruler > .header):
Styles for having a TimelineRuler in the Waterfall's table header.

(.network-table :not(.header) .cell.waterfall):
(.network-table :not(.header) .cell.waterfall .waterfall-container):
(.waterfall .block):
(.waterfall .block.request,):
(.waterfall .block.mouse):
(.waterfall .block.queue):
(.waterfall .block.dns):
(.waterfall .block.connect):
(.waterfall .block.secure):
(.waterfall .block.request):
(.waterfall .block.response):
Waterfall styles inside the Network Table.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype.reset):
(WI.NetworkTableContentView.prototype.tablePopulateCell):
(WI.NetworkTableContentView.prototype.initialLayout):
(WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
(WI.NetworkTableContentView.prototype._updateEntryForResource):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
(WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
(WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
(WI.NetworkTableContentView.prototype._tableWaterfallColumnDidChangeWidth):
Update the TimelineRuler and Waterfall column when the column's
size changes or the time bounds change. The time bounds right now
are the earliest and latest time of resources. Later we hope to
bound this by a timeline selection.

(WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
(WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
(WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
(WI.NetworkTableContentView.prototype._populateWaterfallGraph):
(WI.NetworkTableContentView.prototype._hidePopover):
Create and manage a popover for the waterfall column.

  • UserInterface/Views/Popover.js:

(WI.Popover):
(WI.Popover.prototype.get element):
(WI.Popover.prototype.get visible):
(WI.Popover.prototype.get backgroundStyle):
(WI.Popover.prototype.set backgroundStyle):
(WI.Popover.prototype._drawBackground):
Provide an option to have a white background popover.

  • UserInterface/Views/ResourceTimingBreakdownView.css: Added.

(.resource-timing-breakdown):
(.resource-timing-breakdown .waterfall):
(.resource-timing-breakdown .waterfall .block):
(.resource-timing-breakdown .waterfall .block.request):
(body[dir=ltr] .resource-timing-breakdown .waterfall .block.queue,):
(body[dir=ltr] .resource-timing-breakdown .waterfall .block.response):
(body[dir=rtl] .resource-timing-breakdown .waterfall .block.queue,):
(body[dir=rtl] .resource-timing-breakdown .waterfall .block.response):
(.resource-timing-breakdown .numbers):
(body[dir=ltr] .resource-timing-breakdown .numbers):
(body[dir=rtl] .resource-timing-breakdown .numbers):
Waterfall styles and sizes in the popover's breakdown view.

(.resource-timing-breakdown .numbers > p):
(.resource-timing-breakdown .numbers > p > .swatch):
(.resource-timing-breakdown .numbers .swatch.queue):
(.resource-timing-breakdown .numbers .swatch.dns):
(.resource-timing-breakdown .numbers .swatch.connect):
(.resource-timing-breakdown .numbers .swatch.secure):
(.resource-timing-breakdown .numbers .swatch.request):
(.resource-timing-breakdown .numbers .swatch.response):
(.resource-timing-breakdown .numbers > p > .label):
(.resource-timing-breakdown .numbers > p.total):
Number and label styles in the popover's breakdown view.

  • UserInterface/Views/ResourceTimingBreakdownView.js: Added.

(WI.ResourceTimingBreakdownView):
(WI.ResourceTimingBreakdownView.prototype.initialLayout):
(WI.ResourceTimingBreakdownView.prototype.initialLayout.appendBlock):
(WI.ResourceTimingBreakdownView.prototype.initialLayout.appendRow):
Show a section for a waterfall visualization and a section for the numbers.

  • UserInterface/Views/Table.js:

(WI.Table.prototype.reloadVisibleColumnCells):
(WI.Table.prototype.cellForRowAndColumn):
(WI.Table.prototype.addColumn):
(WI.Table.prototype.showColumn):
(WI.Table.prototype.hideColumn):
(WI.Table.prototype.resizerDragging):
(WI.Table.prototype.resizerDragEnded):
(WI.Table.prototype._resizeColumnsAndFiller):
(WI.Table.prototype._applyColumnWidths):
(WI.Table.prototype._positionHeaderViews):

  • UserInterface/Views/TableColumn.js:

(WI.TableColumn.prototype.get headerView):
Provide a way to include a WI.View with a TableColumn Header. This
matches what we do with DataGrid, and ends up being pretty concise.

  • UserInterface/Views/TimelineRuler.css:

(.timeline-ruler > .header):
Make the height a variable so that other code can work off of it.

6:47 PM Changeset in webkit [223733] by Michael Catanzaro
  • 2 edits in trunk/PerformanceTests

-Wsign-compare triggered by MallocBench
https://bugs.webkit.org/show_bug.cgi?id=178544

Reviewed by Ryosuke Niwa.

  • MallocBench/MallocBench/Interpreter.cpp:

(Interpreter::Interpreter):

6:34 PM Changeset in webkit [223732] by Chris Dumez
  • 8 edits in trunk/Source/WebCore

SerializedScriptValue passed to postMessage() cannot be null
https://bugs.webkit.org/show_bug.cgi?id=178550

Reviewed by Youenn Fablet.

SerializedScriptValue passed to postMessage() cannot be null. Therefore, we
should use Ref<> type, not RefPtr<>.

  • dom/MessagePortChannel.h:
  • dom/default/PlatformMessagePortChannel.cpp:

(WebCore::MessagePortChannel::postMessageToRemote):

  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):

  • workers/WorkerMessagingProxy.h:
  • workers/WorkerObjectProxy.h:
  • workers/service/context/ServiceWorkerThread.cpp:
5:47 PM Changeset in webkit [223731] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Stringifier::appendStringifiedValue() is missing an exception check.
https://bugs.webkit.org/show_bug.cgi?id=178386
<rdar://problem/35027610>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-178386.js: Added.

Source/JavaScriptCore:

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue):

5:09 PM Changeset in webkit [223730] by achristensen@apple.com
  • 18 edits in trunk/Source/WebKit

Modernize API::DownloadClient
https://bugs.webkit.org/show_bug.cgi?id=178547

Reviewed by Andy Estes.

Use more C++ references instead of pointers because they're never null.

Remove canAuthenticateAgainstProtectionSpace because there are no implementations
except the default implementation which always returns true and we don't intend to
add this to the SPI because that's just a legacy call anyways from when NSURLConnection
hadn't fully evolved, and we're moving away from NSURLConnection, especially in our API design.

Separate the NetworkSession-only and pre-NetworkSession-only callbacks. All the synchronous
IPC messages are only used in the pre-NetworkSession code, so once we remove it we can remove them!

Make API::DownloadClient calls that NetworkSession uses use a completion handler so we will be able to
design an asynchronous API.

  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace): Deleted.

  • NetworkProcess/Downloads/DownloadManager.h:
  • NetworkProcess/Downloads/PendingDownload.cpp:

(WebKit::PendingDownload::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::PendingDownload::continueCanAuthenticateAgainstProtectionSpace): Deleted.

  • NetworkProcess/Downloads/PendingDownload.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpaceDownload): Deleted.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • UIProcess/API/APIDownloadClient.h:

(API::DownloadClient::didStart):
(API::DownloadClient::didReceiveAuthenticationChallenge):
(API::DownloadClient::didReceiveResponse):
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
(API::DownloadClient::didFinish):
(API::DownloadClient::didFail):
(API::DownloadClient::didCancel):
(API::DownloadClient::processDidCrash):
(API::DownloadClient::willSendRequest):
(API::DownloadClient::canAuthenticateAgainstProtectionSpace): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetDownloadClient):

  • UIProcess/API/glib/WebKitDownloadClient.cpp:
  • UIProcess/Cocoa/DownloadClient.h:
  • UIProcess/Cocoa/DownloadClient.mm:

(WebKit::DownloadClient::didStart):
(WebKit::DownloadClient::didReceiveResponse):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename):
(WebKit::DownloadClient::didFinish):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):
(WebKit::DownloadClient::willSendRequest):

  • UIProcess/Downloads/DownloadProxy.cpp:

(WebKit::DownloadProxy::processDidClose):
(WebKit::DownloadProxy::didStart):
(WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
(WebKit::DownloadProxy::willSendRequest):
(WebKit::DownloadProxy::didReceiveResponse):
(WebKit::DownloadProxy::didReceiveData):
(WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilenameAsync):
(WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
(WebKit::DownloadProxy::didCreateDestination):
(WebKit::DownloadProxy::didFinish):
(WebKit::DownloadProxy::didFail):
(WebKit::DownloadProxy::didCancel):
(WebKit::DownloadProxy::canAuthenticateAgainstProtectionSpace): Deleted.

  • UIProcess/Downloads/DownloadProxy.h:
  • UIProcess/Downloads/DownloadProxy.messages.in:
4:49 PM Changeset in webkit [223729] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r223691): DFGByteCodeParser.cpp:1483:83: warning: comparison is always false due to limited range of data type [-Wtype-limits]
https://bugs.webkit.org/show_bug.cgi?id=178543

Reviewed by Filip Pizlo.

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):

4:48 PM Changeset in webkit [223728] by dbates@webkit.org
  • 865 edits in trunk/Source/WebCore

Use "= default" to denote default constructor or destructor
https://bugs.webkit.org/show_bug.cgi?id=178528

Rubber-stamped by Andy Estes.

Source/WebCore:

  • Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
  • Modules/applepay/ApplePayError.cpp:
  • Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
  • Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
  • Modules/applepay/ApplePaySession.cpp:
  • Modules/applepay/ApplePaySessionPaymentRequest.cpp:
  • Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
  • Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
  • Modules/applepay/ApplePayValidateMerchantEvent.cpp:
  • Modules/applepay/Payment.h:
  • Modules/applepay/PaymentCoordinatorClient.h:
  • Modules/credentials/BasicCredential.cpp:
  • Modules/credentials/FederatedCredential.cpp:
  • Modules/credentials/NavigatorCredentials.cpp:
  • Modules/credentials/PasswordCredential.cpp:
  • Modules/encryptedmedia/CDMClient.h:
  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:
  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
  • Modules/entriesapi/DOMFileSystem.cpp:
  • Modules/entriesapi/FileSystemDirectoryReader.cpp:
  • Modules/entriesapi/FileSystemEntry.cpp:
  • Modules/fetch/FetchLoaderClient.h:
  • Modules/gamepad/Gamepad.cpp:
  • Modules/gamepad/GamepadEvent.h:
  • Modules/gamepad/deprecated/Gamepad.cpp:

[ truncated ]

Source/WebCore/PAL:

  • pal/Logger.h:

(PAL::Logger::Observer::~Observer): Deleted.

  • pal/crypto/gcrypt/CryptoDigestGCrypt.cpp:
  • pal/system/SleepDisabler.cpp:
  • pal/system/SystemSleepListener.h:
4:34 PM Changeset in webkit [223727] by sbarati@apple.com
  • 5 edits
    1 move in trunk/Source/JavaScriptCore

re-inline ObjectAllocationProfile::initializeProfile
https://bugs.webkit.org/show_bug.cgi?id=178532

Rubber stamped by Michael Saboff.

I un-inlined this function when implementing poly proto.
This patch re-inlines it. In my testing, it looks like it
might be a 0.5% speedometer progression to inline it.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • bytecode/CodeBlock.cpp:
  • bytecode/ObjectAllocationProfile.cpp: Removed.
  • bytecode/ObjectAllocationProfileInlines.h: Copied from Source/JavaScriptCore/bytecode/ObjectAllocationProfile.cpp.

(JSC::ObjectAllocationProfile::initializeProfile):
(JSC::ObjectAllocationProfile::possibleDefaultPropertyCount):

  • runtime/FunctionRareData.cpp:
4:34 PM Changeset in webkit [223726] by n_wang@apple.com
  • 12 edits in trunk

AX: Provide a way for Accessibility to cache the selection while retrieving rects for speak selection
https://bugs.webkit.org/show_bug.cgi?id=176247
<rdar://problem/34217143>

Reviewed by Ryosuke Niwa.

Source/WebKit:

When getting the rects for highlighting the spoken text within a selection range on iOS, we can get a
list of totally wrong rects if the user changed the selection to some other text. This is because the
calculation is based on the current selection range. Therefore, we need to provide a way for accessibility
codepath to store the selection during a speaking session.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _accessibilityStoreSelection]):
(-[WKWebView _accessibilityClearSelection]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _accessibilityStoreSelection]):
(-[WKContentView _accessibilityClearSelection]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::storeSelectionForAccessibility):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::WebPage::storeSelectionForAccessibility):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):

Tools:

  • TestWebKitAPI/Tests/ios/AccessibilityTestsIOS.mm:

(TestWebKitAPI::TEST):

4:31 PM Changeset in webkit [223725] by weinig@apple.com
  • 17 edits in trunk/Source/WebCore

[Bindings] Standardize on DOMPromise as the way to store passed in promises
https://bugs.webkit.org/show_bug.cgi?id=178533

Reviewed by Youenn Fablet.

This standardizes on RefPtr<DOMPromise> as the canonical way to store a promise
that has been passed in from JS. This does not change promises that start off in
WebCore and are passed to JS; they remain using DOMPromiseDeferred and DOMPromiseProxy.

  • Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.h:
  • dom/PromiseRejectionEvent.cpp:
  • dom/PromiseRejectionEvent.h:
  • dom/RejectedPromiseTracker.cpp:

Use a RefPtr<DOMPromise> rather than a JSPromise* to hold onto the promise.

  • bindings/IDLTypes.h:

Use IDLWrapper to get better defaults, since DOMPromise is refcounted.

  • bindings/js/JSDOMConvertPromise.h:

(WebCore::Converter<IDLPromise<T>>::convert):

Switch default conversion to return a RefPtr<DOMPromise> rather than a JSPromise*

(WebCore::JSConverter<IDLPromise<T>>::convert):

Add support for converting from a DOMPromise to a JSValue.

  • bindings/js/JSDOMPromise.cpp:
  • bindings/js/JSDOMPromise.h:

(WebCore::DOMPromise::create): Deleted.

Remove now unused constructor.

  • workers/service/ExtendableEvent.cpp:

(WebCore::ExtendableEvent::waitUntil):

  • workers/service/ExtendableEvent.h:
  • workers/service/ExtendableEvent.idl:
  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::promiseIsSettled):

  • workers/service/FetchEvent.h:
  • workers/service/FetchEvent.idl:

Address FIXMEs and remove need for passing an ExecState to ExtendableEvent
and FetchEvent by using the new default conversion to DOMPromise.

4:26 PM Changeset in webkit [223724] by msaboff@apple.com
  • 4 edits in trunk

Test262: RegExp/property-escapes/generated/Emoji_Component.js fails with current RegExp Unicode Properties implementation
https://bugs.webkit.org/show_bug.cgi?id=178521

Reviewed by JF Bastien.

JSTests:

  • test262.yaml: Enabled test262/test/built-ins/RegExp/property-escapes/generated/Emoji_Component.js as it

now passes with the current version (5.0) of the Emoji spec.

Source/JavaScriptCore:

  • ucd/emoji-data.txt: Replaced with the Unicode Emoji 5.0 version of the file as that is the most recent

standard version. The prior version was the draft 6.0 version.

4:11 PM Changeset in webkit [223723] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

4:11 PM Changeset in webkit [223722] by jmarcell@apple.com
  • 29 edits
    6 adds in branches/safari-604-branch

Cherry-pick r223565. rdar://problem/35041490

4:11 PM Changeset in webkit [223721] by jmarcell@apple.com
  • 22 edits
    32 adds in branches/safari-604-branch

Cherry-pick r223253. rdar://problem/35077489

4:02 PM Changeset in webkit [223720] by commit-queue@webkit.org
  • 46 edits
    1 copy
    1 add in trunk

[Settings] Move global settings into their own file
https://bugs.webkit.org/show_bug.cgi?id=178512

Patch by Sam Weinig <sam@webkit.org> on 2017-10-19
Reviewed by Darin Adler.

Source/WebCore:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.
It's called DeprecatedGlobalSettings to indicate that this is an anti-pattern we would
like to discourage, as WebCore can operate in a process with multiple clients, each of
which should be able to set their own preferences.

  • WebCore.xcodeproj/project.pbxproj:
  • CMakeLists.txt:

Add new files.

  • page/DeprecatedGlobalSettings.cpp: Copied from Source/WebCore/page/SettingsBase.cpp.
  • page/DeprecatedGlobalSettings.h: Copied from Source/WebCore/page/SettingsBase.h.
  • page/SettingsBase.cpp:
  • page/SettingsBase.h:

Move all global settings out of SettingsBase and into the new DeprecatedGlobalSettings.

  • Modules/mediastream/UserMediaRequest.cpp:
  • bindings/js/CommonVM.cpp:
  • css/CSSStyleDeclaration.cpp:
  • dom/DataTransfer.cpp:
  • dom/DataTransferItemList.cpp:
  • editing/Editor.cpp:
  • loader/ResourceLoadObserver.cpp:
  • page/FrameView.cpp:
  • page/PerformanceMonitor.cpp:
  • platform/ScrollbarTheme.cpp:

(WebCore::ScrollbarTheme::theme):

  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
  • platform/graphics/MediaPlayer.cpp:
  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/mac/NSScrollerImpDetails.mm:
  • platform/mock/ScrollbarThemeMock.cpp:
  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:
  • platform/network/ios/NetworkStateNotifierIOS.mm:
  • platform/network/soup/SocketStreamHandleImplSoup.cpp:
  • platform/win/MainThreadSharedTimerWin.cpp:
  • rendering/RenderLayer.cpp:
  • rendering/RenderListBox.cpp:
  • testing/InternalSettings.cpp:
  • testing/Internals.cpp:

Update users of global settings to reference the new class name.

Source/WebKit:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::setAllowsAnySSLCertificateForWebSocket):

  • Shared/WebPreferencesDefinitions.h:
  • Shared/WebPreferencesStore.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_cpuLimit):
(WebKit::WebPage::updatePreferences):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::setResourceLoadStatisticsEnabled):

  • WebProcess/cocoa/VideoFullscreenManager.mm:

(WebKit::VideoFullscreenManager::supportsVideoFullscreen const):

Source/WebKitLegacy/mac:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::supportsVideoFullscreen):

  • WebView/WebDynamicScrollBarsView.mm:

(+[WebDynamicScrollBarsView _horizontalScrollerClass]):
(+[WebDynamicScrollBarsView _verticalScrollerClass]):

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):
(+[WebView _doNotStartObservingNetworkReachability]):

Source/WebKitLegacy/win:

Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.

  • WebView.cpp:

(WebView::initWithFrame):

Tools:

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:

(TestWebKitAPI::TEST):

3:47 PM Changeset in webkit [223719] by aestes@apple.com
  • 5 edits in trunk

[iOS] Conditionally rename DatabaseProcess to StorageProcess when building for iOS devices
https://bugs.webkit.org/show_bug.cgi?id=178181
<rdar://problem/33660282>

Reviewed by Dan Bernstein.

Source/WebKit:

  • Configurations/BaseTarget.xcconfig:
  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):

  • WebKit.xcodeproj/project.pbxproj:

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::databaseProcessName):

3:44 PM Changeset in webkit [223718] by Chris Dumez
  • 34 edits
    2 copies
    1 move
    6 adds
    1 delete in trunk

Add preliminary support for ServiceWorker Handle Fetch
https://bugs.webkit.org/show_bug.cgi?id=178475
<rdar://problem/35066424>

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-19
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/workers/service/basic-fetch.https.html

Adding parameters to allow WebKit to do loading through Service Worker or through regular networking.
A script context is now storing its selected service worker identifier. This should be fully implemented later on.
This selected service worker identifier is passed to loading code as a ResourceLoaderOptions field.
Service workers mode is also added as a ResourceLoaderOptions field so that the service worker can be bypassed.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::selectedServiceWorkerIdentifier const):
(WebCore::ScriptExecutionContext::setSelectedServiceWorkerIdentifier):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FetchOptions.h:

(WebCore::isPotentialNavigationOrSubresourceRequest):
(WebCore::isNonSubresourceRequest):

  • loader/ResourceLoaderOptions.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

  • loader/WorkerThreadableLoader.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

  • workers/service/context/SWContextManager.cpp: Removed.
  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:

Relanding now that underlying issue is fixed in https://bugs.webkit.org/show_bug.cgi?id=178527.

Preliminary support of Handle Fetch algorithm and integration with fetch spec.
Adding ServiceWorkerClientFetch as the class responsible to do the load through ServiceWorker.
It is similar to WebResourceLoader that do the load through NetworkProcess.
In case ServiceWorkerClientFetch is not able to load through ServiceWorker,
it will fallback to WebResourceLoader through a fallback callback.

Loading through Service Worker is done currently if:

  • There is a service worker registered for that origin
  • Request is a subresource
  • service workers mode is all

There will be cases where the service worker will not do the loading, for instance when fetch event handler is not set.
Future work should try to reduce the cases where the IPC dance is done unnecessarily.

ServiceWorkerClientFetch is responsible to adapt the ServiceWorker response to ResourceLoader.
In particular, it is calling ResourceLoader error callback if response is of type error.
It should call ResourceLoader redirection callback if response is a redirection response.
This will be done as a follow-up.

Implementing the IPC communication dedicated to fetch between WebProcess and ServiceWorker through StorageProcess.
In the future, WebProcess should create a direct IPC communication to the ServiceWorker process.

Moved SWContextManager from WebCore to WebKit and renamed it to ServiceWorkerContextManager.
This class is moved to WebKit as it will have to handle IPC and having a separation will add some unnecessary boilerplate.

  • CMakeLists.txt:
  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::didReceiveFetchResponse):
(WebKit::WebSWServerConnection::didReceiveFetchData):
(WebKit::WebSWServerConnection::didFinishFetch):
(WebKit::WebSWServerConnection::didFailFetch):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::didFailFetch):
(WebKit::StorageProcess::didReceiveFetchResponse):
(WebKit::StorageProcess::didReceiveFetchData):
(WebKit::StorageProcess::didFinishFetch):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Added.

(WebKit::ServiceWorkerClientFetch::ServiceWorkerClientFetch):
(WebKit::ServiceWorkerClientFetch::didReceiveResponse):
(WebKit::ServiceWorkerClientFetch::didReceiveData):
(WebKit::ServiceWorkerClientFetch::didFinish):
(WebKit::ServiceWorkerClientFetch::didFail):
(WebKit::ServiceWorkerClientFetch::cancel):

  • WebProcess/Storage/ServiceWorkerClientFetch.h: Copied from Source/WebKit/WebProcess/Storage/WebSWClientConnection.h.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Copied from Source/WebKit/StorageProcess/ServiceWorker/WebSWServerConnection.messages.in.
  • WebProcess/Storage/ServiceWorkerContextManager.cpp: Added.

(WebKit::ServiceWorkerContextManager::startServiceWorkerContext):
(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h: Renamed from Source/WebCore/workers/service/context/SWContextManager.h.

(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):

  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::startFetch):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:

(WebKit::shouldHandleFetch):
(WebKit::WebServiceWorkerProvider::handleFetch):
(WebKit::WebServiceWorkerProvider::cancelFetch):
(WebKit::WebServiceWorkerProvider::fetchFinished):
(WebKit::WebServiceWorkerProvider::didReceiveServiceWorkerClientFetchMessage):

  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):
(WebKit::WebProcess::startFetchInServiceWorker):

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

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt: Added.
  • http/tests/workers/service/basic-fetch.https.html: Added.
  • http/tests/workers/service/resources/basic-fetch-worker.js: Added.
  • http/tests/workers/service/resources/basic-fetch.js: Added.
3:31 PM Changeset in webkit [223717] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move post layout task scheduling logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178538
<rdar://problem/35080743>

Reviewed by Simon Fraser.

Move and reorganize post layout task scheduling code.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::runOrSchedulePostLayoutTasks):

  • page/FrameView.h:
3:29 PM Changeset in webkit [223716] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.4

Tag Safari-604.4.4.

3:23 PM Changeset in webkit [223715] by sbarati@apple.com
  • 14 edits in trunk/Source/JavaScriptCore

We should hard code the poly proto offset
https://bugs.webkit.org/show_bug.cgi?id=178531

Reviewed by Filip Pizlo.

This patch embraces that the poly proto offset is always zero. It's already
the case that we would always get the inline offset zero for poly proto just
by construction. This just hardcodes this assumption throughout the codebase.
This appears to be a 1% speedometer progression in my testing.

The downside of this patch is that it may require changing how we do
things when we implement poly proto when inheriting from builtin
types. I think we can face this problem when we decide to implement
that.

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::generateWithGuard):

  • dfg/DFGOperations.cpp:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/JSObject.cpp:

(JSC::JSObject::setPrototypeDirect):

  • runtime/JSObject.h:

(JSC::JSObject::locationForOffset const):
(JSC::JSObject::locationForOffset):
(JSC::JSObject::getDirect const):

  • runtime/PropertyOffset.h:
  • runtime/Structure.cpp:

(JSC::Structure::create):
(JSC::Structure::dump const):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::storedPrototype const):
(JSC::Structure::storedPrototypeObject const):

2:58 PM Changeset in webkit [223714] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

Attempt to fix Legacy WebKit test failure following r223704
(https://bugs.webkit.org/show_bug.cgi?id=178403)

Call testRunner.setCanOpenWindows() to tell DumpRenderTree to allow the test to open a new window.

  • http/tests/security/referrer-policy-subframe-window-open.html:
2:31 PM Changeset in webkit [223713] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Service Worker process should not be selected to open WebView on it
https://bugs.webkit.org/show_bug.cgi?id=178527

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-19
Reviewed by Chris Dumez.

Selection of process to open a page will no longer use an existing web process if it is the service worker process.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createNewWebProcessRespectingProcessCountLimit):

2:23 PM Changeset in webkit [223712] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move scrollbars setup logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178394
<rdar://problem/35031066>

Reviewed by Antti Koivisto.

Decouple scrollbars setup and the unrelated first-layout logic.
FIXME: find out why m_firstLayout depends on the subtree flag (I'd assume we issue full layout the very first time).

Covered by existing test cases.

  • page/FrameView.cpp:

(WebCore::FrameView::adjustScrollbarsForLayout):
(WebCore::FrameView::layout):

  • page/FrameView.h:
2:15 PM Changeset in webkit [223711] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Avoid duplicate multisample resolve before WebGL compositing
https://bugs.webkit.org/show_bug.cgi?id=178537
<rdar://problem/35080724>

Fix iOS build.

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):

1:51 PM Changeset in webkit [223710] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit

Display link bringup can block the main thread for ~150ms during WKWebView init
https://bugs.webkit.org/show_bug.cgi?id=178524

Reviewed by Dean Jackson.

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::displayLinkHandler):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
Lazily initialize the display link at first use.

1:45 PM Changeset in webkit [223709] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Turn various poly proto RELEASE_ASSERTs into ASSERTs because they're on the hot path in speedometer
https://bugs.webkit.org/show_bug.cgi?id=178529

Reviewed by Mark Lam.

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::storedPrototypeObject const):
(JSC::Structure::storedPrototypeStructure const):
(JSC::Structure::storedPrototype const):
(JSC::Structure::prototypeForLookup const):
(JSC::Structure::prototypeChain const):

1:43 PM Changeset in webkit [223708] by timothy_horton@apple.com
  • 19 edits in trunk

Expand r209943 to suppress paste during provisional navigation as well
https://bugs.webkit.org/show_bug.cgi?id=178429
<rdar://problem/33952830>

Reviewed by Dean Jackson.

Source/WebCore:

No new tests; adjusted an existing test to cover this case.

  • editing/Editor.cpp:

(WebCore::Editor::canPaste const):
Disable pasting during provisional navigation, like r209943 did for
various other forms of text input.

(WebCore::Editor::shouldInsertText const):

  • dom/EventDispatcher.cpp:

(WebCore::shouldSuppressEventDispatchInDOM):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldSuppressTextInputFromEditing const):
(WebCore::FrameLoader::shouldSuppressKeyboardInput const): Deleted.

  • loader/FrameLoader.h:
  • page/Settings.in:

Rename the setting to be about editing-related text input, not "keyboard" input.

  • editing/EditorCommand.cpp:

(WebCore::allowExecutionWhenDisabled):
(WebCore::doNotAllowExecutionWhenDisabled):
(WebCore::allowExecutionWhenDisabledCopyCut):
(WebCore::allowExecutionWhenDisabledPaste):
(WebCore::createCommandMap):
(WebCore::Editor::Command::allowExecutionWhenDisabled const):
Completely disable execution of paste events when in no-text-input-from-editing mode.
Otherwise, even though canPaste was false and we wouldn't do a default paste action,
we would still dispatch the paste event to the DOM.

Source/WebKit:

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation):
(WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation):

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _shouldSuppressKeyboardInputDuringProvisionalNavigation]):
(-[WKPreferences _setShouldSuppressKeyboardInputDuringProvisionalNavigation:]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Adjust to the changed preference name, except at the SPI level.

LayoutTests:

  • http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt:
  • http/tests/navigation/keyboard-events-during-provisional-navigation.html:
  • http/tests/navigation/keyboard-events-during-provisional-subframe-navigation-expected.txt:
  • http/tests/navigation/keyboard-events-during-provisional-subframe-navigation.html:
  • http/tests/navigation/resources/keyboard-events-after-navigation.html:
  • http/tests/navigation/resources/keyboard-events-test.js:

(runBeforeTest):
(runTest):
Copy a "d" to the clipboard before running the test, and paste it while running.
I put the copy before running the test so that if someone comes along and
blacklists copy during provisional load as well, the test for this behavior
still actually tests the paste portion.
Also ensure that paste events are not triggered during provisional navigation.

1:32 PM Changeset in webkit [223707] by dino@apple.com
  • 4 edits in trunk/Source/WebCore

Avoid duplicate multisample resolve before WebGL compositing
https://bugs.webkit.org/show_bug.cgi?id=178537
<rdar://problem/35080724>

Reviewed by Jer Noble.

Both endPaint and prepareTexture were doing the MSAA resolve
into the renderbuffer, and being called on macOS before compositing.
Without that step, endPaint became unnecessary on iOS so I renamed
it presentRenderbuffer.

Covered by existing tests.

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

(WebCore::GraphicsContext3D::presentRenderbuffer):
(WebCore::GraphicsContext3D::endPaint): Deleted.

  • platform/graphics/cocoa/WebGLLayer.mm:

(-[WebGLLayer display]):

1:30 PM Changeset in webkit [223706] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.4.3.1/Source

Versioning.

1:19 PM Changeset in webkit [223705] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.4.3.1

New tag.

1:17 PM Changeset in webkit [223704] by dbates@webkit.org
  • 1 edit
    1 add in trunk/LayoutTests

Referrer policy should be inherited from creator
https://bugs.webkit.org/show_bug.cgi?id=178403
<rdar://problem/31546136>

Add missing file that I inadvertently forgot to commit in r223697. The tests depend on this file.

  • http/tests/security/resources/nested-referrer-policy-postmessage.html: Added.
1:16 PM Changeset in webkit [223703] by sbarati@apple.com
  • 5 edits in trunk

Turn poly proto back on by default and remove the option
https://bugs.webkit.org/show_bug.cgi?id=178525

Reviewed by Mark Lam.

Source/JavaScriptCore:

I added this option because I thought it'd speed speedometer up because the
original poly proto patch slowed speedometer down. It turns out that
allocating poly proto objects is not what slows speedometer down. It's
other code I added in the runtime that needs to be poly proto aware. I'll
be addressing these in follow up patches.

  • runtime/Options.h:
  • runtime/StructureInlines.h:

(JSC::Structure::shouldConvertToPolyProto):

Tools:

  • Scripts/run-jsc-stress-tests:
1:15 PM Changeset in webkit [223702] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Add API to clean CacheStorage data
https://bugs.webkit.org/show_bug.cgi?id=178034

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-19

  • UIProcess/API/Cocoa/WKWebsiteDataRecord.h: Using WK_IOS_TBA instead of WK_MAC_TBA for iOS.
1:02 PM Changeset in webkit [223701] by aestes@apple.com
  • 4 edits in trunk

[Payment Request] Only process shipping options if shipping is requested, and throw an exception on duplicate shipping option IDs
https://bugs.webkit.org/show_bug.cgi?id=178535

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-constructor.https-expected.txt:

Source/WebCore:

Progresses four tests in web-platform-tests/payment-request/payment-request-constructor.https.html.

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::create):

12:57 PM Changeset in webkit [223700] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=178472

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:55 AM Changeset in webkit [223699] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Share logic in InlineTextBox to compute selection rect
https://bugs.webkit.org/show_bug.cgi?id=178232
<rdar://problem/34963452>

Reviewed by Zalan Bujtas.

Currently each paint routine in InlineTextBox duplicates similar code to compute the selection
rect it will paint. This change consolidates all the duplication into localSelectionRectWithClampedPositions()
and writes all of the paint operations, except for paintCompositionUnderline(), in terms of it.
We will write paintCompositionUnderline() in terms of localSelectionRectWithClampedPositions()
in a subsequent patch.

We also write localSelectionRect() in terms of localSelectionRectWithClampedPositions(). Ideally
we would have one way to compute the selection rect. However, localSelectionRect() and paintDocumentMarker()
currently expect the enclosing integral rectangle of the selection rectangle. The function
paintDocumentMarker() needs the enclosing integral rectangle to avoid truncating the dot pattern
drawn under marked words (e.g. a spelling error) on Cocoa platforms. With regards to localSelectionRect()
we should look to have it return the actual selection rectangle. See <https://bugs.webkit.org/show_bug.cgi?id=138913>
for more details.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const): Move logic in common with paintSelection() into
localSelectionRectWithClampedPositions() and modified code to use it.
(WebCore::InlineTextBox::localSelectionRectWithClampedPositions const): Added.
(WebCore::InlineTextBox::paint): Store the local paint offset as a LayoutPoint as it is the canonical
data type for representing an offset when painting. Pass the local paint offset instead of the analagous boxOrigin value.
(WebCore::InlineTextBox::paintSelection): Write in terms of localSelectionRectWithClampedPositions().
(WebCore::InlineTextBox::paintTextSubrangeBackground): Ditto.
(WebCore::InlineTextBox::paintCompositionBackground): Ditto.
(WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
(WebCore::InlineTextBox::paintDocumentMarker): Ditto.
(WebCore::InlineTextBox::paintDocumentMarkers): Pass paint offset instead of the analogous boxOrigin value.

  • rendering/InlineTextBox.h:
11:54 AM Changeset in webkit [223698] by commit-queue@webkit.org
  • 1 edit
    1 delete in trunk/Source/WebInspectorUI

Web Inspector: Remove superfluous file External/.eslintrc
https://bugs.webkit.org/show_bug.cgi?id=178474

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-19
Reviewed by Joseph Pecoraro.

  • UserInterface/External/.eslintrc: Removed.
11:46 AM Changeset in webkit [223697] by dbates@webkit.org
  • 6 edits
    8 adds in trunk

Referrer policy should be inherited from creator
https://bugs.webkit.org/show_bug.cgi?id=178403
<rdar://problem/31546136>

Reviewed by Andy Estes.

Source/WebCore:

As per section Browsing contexts of the the HTML standard, <https://html.spec.whatwg.org/multipage/browsers.html>
(17 October 2017), the referrer policy of a document should initially be inherited from its
creator.

Tests: http/tests/security/referrer-policy-nested-subframe.html

http/tests/security/referrer-policy-nested-window-open.html
http/tests/security/referrer-policy-subframe-window-open.html
http/tests/security/referrer-policy-window-open-subframe.html

  • dom/Document.cpp:

(WebCore::Document::initSecurityContext): Ask the loader for the effective referrer policy.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::effectiveReferrerPolicy const): Added. Returns the referrer policy
of the creator document. The creator document is document of the parent frame or the document
of the opener for a subframe or child window, respectively. If we do not have a creator frame
then we return the default referrer policy, non-referrer-when-downgrade, by <https://www.w3.org/TR/2017/CR-referrer-policy-20170126/#referrer-policy-empty-string>.

  • loader/FrameLoader.h:

LayoutTests:

Add tests to ensure that the referrer policy of a document is initially inherited from its creator.

  • http/tests/security/referrer-policy-nested-subframe-expected.txt: Added.
  • http/tests/security/referrer-policy-nested-subframe.html: Added.
  • http/tests/security/referrer-policy-nested-window-open-expected.txt: Added.
  • http/tests/security/referrer-policy-nested-window-open.html: Added.
  • http/tests/security/referrer-policy-subframe-window-open-expected.txt: Added.
  • http/tests/security/referrer-policy-subframe-window-open.html: Added.
  • http/tests/security/referrer-policy-window-open-subframe-expected.txt: Added.
  • http/tests/security/referrer-policy-window-open-subframe.html: Added.
  • http/tests/security/resources/referrer-policy-postmessage.php:
11:39 AM Changeset in webkit [223696] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Do not reenter FrameView::performPostLayoutTasks
https://bugs.webkit.org/show_bug.cgi?id=178518
<rdar://problem/35075409>

Reviewed by Antti Koivisto.

This patch tightens existing reentrancy policy on performPostLayoutTasks.

Covered by existing test cases.

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
(WebCore::FrameView::performPostLayoutTasks):

  • page/FrameView.h:
11:37 AM Changeset in webkit [223695] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed build fix after r223692.

  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
11:33 AM Changeset in webkit [223694] by Adrian Perez de Castro
  • 16 edits in trunk/Source/WebInspectorUI

[GTK] Inspector UI does not use system font despite -webkit-system-font being supported
https://bugs.webkit.org/show_bug.cgi?id=178388

Reviewed by Joseph Pecoraro.

Change ocurrences of the "-apple-system" generic font name to
"-webkit-system-font", which is also implemented by the GTK+ port.

  • UserInterface/Views/CodeMirrorOverrides.css:

(.CodeMirror .CodeMirror-linenumber):
(.CodeMirror .CodeMirror-placeholder):

  • UserInterface/Views/ConsoleMessageView.css:

(.console-user-command.special-user-log > .console-message-text):
(.console-message .console-message-extra-parameters-container > li::before):
(.console-message .console-message-location):

  • UserInterface/Views/DataGrid.css:

(.data-grid td):

  • UserInterface/Views/DefaultDashboardView.css:

(.toolbar .dashboard.default > .item):

  • UserInterface/Views/HeapSnapshotInstancesContentView.css:

(.heap-snapshot-instance-popover-content > .title):

  • UserInterface/Views/HierarchicalPathComponent.css:

(.hierarchical-path-component):

  • UserInterface/Views/LogContentView.css:

(.console-messages):

  • UserInterface/Views/Main.css:

(body):

  • UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:

(.object-tree-array-index .index-name):

  • UserInterface/Views/ObjectTreePropertyTreeElement.css:

(.object-tree-property .property-name,):

  • UserInterface/Views/ObjectTreeView.css:

(.tree-outline.object li .empty-message):

  • UserInterface/Views/RecordingActionTreeElement.css:

(.item.action:not(.initial-state)::before):

  • UserInterface/Views/SourceCodeTextEditor.css:

(.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
(.popover .debugger-popover-content > .title):

  • UserInterface/Views/TypeTreeView.css:

(.type-tree):

  • UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
11:18 AM Changeset in webkit [223693] by keith_miller@apple.com
  • 2 edits in trunk/Source/WTF

REGRESSION (r223476): WebCore exports symbols with names belonging to other frameworks
https://bugs.webkit.org/show_bug.cgi?id=178424

Reviewed by David Kilzer.

This patch moves the wrapper function sharing the name of the externed function
to the source file and marks it as always inline. Marking it as inline prevents
the framework from exporting it.

  • wtf/cocoa/SoftLinking.h:
10:58 AM Changeset in webkit [223692] by Chris Dumez
  • 34 edits
    1 copy
    1 move
    8 deletes in trunk

Unreviewed, revert r223650 as it caused crashes on the bots.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.h:
  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FetchOptions.h:
  • loader/ResourceLoaderOptions.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

  • loader/WorkerThreadableLoader.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

  • workers/service/context/SWContextManager.cpp: Copied from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.

(WebCore::SWContextManager::singleton):
(WebCore::SWContextManager::SWContextManager):
(WebCore::SWContextManager::startServiceWorkerContext):

  • workers/service/context/SWContextManager.h: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
  • workers/service/context/ServiceWorkerThread.h:

Source/WebKit:

  • CMakeLists.txt:
  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:
  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • StorageProcess/StorageProcess.cpp:
  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::remove):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.h: Removed.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Removed.
  • WebProcess/Storage/ServiceWorkerContextManager.cpp: Removed.
  • WebProcess/Storage/WebSWClientConnection.cpp:
  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:
  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):

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

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt: Removed.
  • http/tests/workers/service/basic-fetch.https.html: Removed.
  • http/tests/workers/service/resources/basic-fetch-worker.js: Removed.
  • http/tests/workers/service/resources/basic-fetch.js: Removed.
9:27 AM Changeset in webkit [223691] by rmorisset@apple.com
  • 8 edits
    1 add in trunk

Turn recursive tail calls into loops
https://bugs.webkit.org/show_bug.cgi?id=176601

Reviewed by Saam Barati.

JSTests:

Add some simple test that computes factorial in several ways, and other trivial computations.
They all tests the case where foo calls bar (in an inlineable way) that then does a tail call.
Depending on the nature of both calls, it is possible or not to turn the tail call into a loop.
I have no clear way of checking that the call was indeed transformed, but I can check that the code computes the right result
(which it doesn't if that tail call is transformed into a loop in the unsound cases).

  • stress/inline-call-to-recursive-tail-call.js: Added.

(factorial.aux):
(factorial):
(factorial2.aux):
(factorial2.id):
(factorial2):
(factorial3.aux):
(factorial3):
(aux):
(factorial4):
(test):

Source/JavaScriptCore:

We want to turn recursive tail calls into loops early in the pipeline, so that the loops can then be optimized.
One difficulty is that we need to split the entry block of the function we are jumping to in order to have somewhere to jump to.
Worse: it is not necessarily the first block of the codeBlock, because of inlining! So we must do the splitting in the DFGByteCodeParser, at the same time as inlining.
We do this part through modifying the computation of the jump targets.
Importantly, we only do this splitting for functions that have tail calls.
It is the only case where the optimisation is sound, and doing the splitting unconditionnaly destroys performance on Octane/raytrace.

We must then do the actual transformation also in DFGByteCodeParser, to avoid code motion moving code out of the body of what will become a loop.
The transformation is entirely contained in handleRecursiveTailCall, which is hooked to the inlining machinery.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::hasTailCalls const):

  • bytecode/PreciseJumpTargets.cpp:

(JSC::getJumpTargetsForBytecodeOffset):
(JSC::computePreciseJumpTargetsInternal):

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::hasTailCalls const):
(JSC::UnlinkedCodeBlock::setHasTailCalls):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEnter):
(JSC::BytecodeGenerator::emitCallInTailPosition):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::allocateTargetableBlock):
(JSC::DFG::ByteCodeParser::makeBlockTargetable):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleRecursiveTailCall):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):

9:10 AM Changeset in webkit [223690] by Chris Dumez
  • 6 edits in trunk/Source/WebKit

http/tests/workers/service/basic-register.html is a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=178494
<rdar://problem/35065315>

Reviewed by Youenn Fablet.

In WebSWServerConnection::resolveJobInClient(), when a service worker is
registered, we:

  1. Add the origin to the WebSWOriginStore
  2. Send the IPC to the WebProcess to notify it that the registration succeeded.

The assumption was that step 1 would be synchronous and would therefore send
the shared memory handle to the WebProcess (if the SharedMemory was invalidated)
*before* step 2.

The issue is that step 1 was scheduling a zero-timer to schedule the addition.
As a result, there was a race and the WebContent process could check the
the WebSWOriginTable *after* being notified that a service worker was registered
but *before* it received the SharedMemory handle for the WebSWOriginTable. This
could lead to false negatives and was causing the layout test to be flaky.

To address the issue, step 1 is now synchronous.

  • Shared/SharedStringHashStore.cpp:

(WebKit::SharedStringHashStore::SharedStringHashStore):
(WebKit::SharedStringHashStore::scheduleAddition):
(WebKit::SharedStringHashStore::scheduleRemoval):
(WebKit::SharedStringHashStore::contains):
(WebKit::SharedStringHashStore::flushPendingChanges):
(WebKit::SharedStringHashStore::processPendingOperations):

  • Shared/SharedStringHashStore.h:
  • StorageProcess/ServiceWorker/WebSWOriginStore.cpp:

(WebKit::WebSWOriginStore::add):
(WebKit::WebSWOriginStore::addAll):
(WebKit::WebSWOriginStore::remove):

  • StorageProcess/ServiceWorker/WebSWOriginStore.h:
  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeVisitedLinkHash):

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

[FrameView::layout cleanup] Replace m_nestedLayoutCount with isLayoutNested()
https://bugs.webkit.org/show_bug.cgi?id=178503
<rdar://problem/35066561>

Reviewed by Antti Koivisto.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::reset):
(WebCore::FrameView::layout):
(WebCore::FrameView::updateLayerPositionsAfterScrolling):
(WebCore::FrameView::updateCompositingLayersAfterScrolling):
(WebCore::FrameView::updateEmbeddedObjects):
(WebCore::FrameView::flushPostLayoutTasksQueue):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):

  • page/FrameView.h:
6:11 AM Changeset in webkit [223688] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Overlapping text on all CSS fonts specs
https://bugs.webkit.org/show_bug.cgi?id=177585
<rdar://problem/34704078>

Reviewed by Daniel Bates.

Source/WebCore:

We were resetting StyleResolver::overrideDocumentElementStyle too early when resolving slot elements.
This resulted in 'rem' units being miscomputed.

Reduction by Zalan.

Test: fast/html/details-line-height-overlap.html

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Scope::~Scope):

Only reset overrideDocumentElementStyle when destroying the scope.

(WebCore::Style::TreeResolver::pushScope):
(WebCore::Style::TreeResolver::pushEnclosingScope):
(WebCore::Style::TreeResolver::popScope):

A scope can show up multiple times in scope stack.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/html/details-line-height-overlap-expected.html: Added.
  • fast/html/details-line-height-overlap.html: Added.
  • platform/ios/fast/shadow-dom/copy-shadow-tree-expected.txt:
3:34 AM Changeset in webkit [223687] by rniwa@webkit.org
  • 16 edits in trunk/Source/WebCore

Consolidate calls to insertedInto and expand the coverage of NoEventDispatchAssertion
https://bugs.webkit.org/show_bug.cgi?id=178504

Reviewed by Antti Koivisto.

Consolidated calls to notifyChildNodeInserted, childrenChanged, didFinishInsertingNode, and
dispatchChildInsertionEvents for inserting a node by executeNodeInsertionWithScriptAssertion,
a new templatefunction which takes a closure to do the node insertion to make exactly when
the script becomes runnable clear.

Added an exception to SVGTRefElement::updateReferencedText since this code mutates user agent
shadow root during insertedInto, and turned ChildChangeSource into an enum class.

  • dom/CharacterData.cpp:

(WebCore::CharacterData::parserAppendData):
(WebCore::CharacterData::setDataAndUpdate):

  • dom/ContainerNode.cpp:

(WebCore::executeNodeInsertionWithScriptAssertion): Extracted.
(WebCore::ContainerNode::takeAllChildrenFrom): Deployed executeNodeInsertionWithScriptAssertion.
(WebCore::ContainerNode::insertBefore): Ditto.
(WebCore::ContainerNode::changeForChildInsertion): Deleted.
(WebCore::ContainerNode::notifyChildInserted): Deleted.
(WebCore::ContainerNode::parserInsertBefore): Deployed executeNodeInsertionWithScriptAssertion.
(WebCore::ContainerNode::replaceChild): Ditto.
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::replaceAllChildren): Ditto.
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Ditto.
(WebCore::ContainerNode::parserAppendChild): Ditto.
(WebCore::ContainerNode::childrenChanged):
(WebCore::ContainerNode::updateTreeAfterInsertion): Deleted.

  • dom/ContainerNode.h:
  • dom/Element.cpp:

(WebCore::Element::childrenChanged):

  • html/HTMLOutputElement.cpp:

(WebCore::HTMLOutputElement::childrenChanged):

  • svg/SVGClipPathElement.cpp:

(WebCore::SVGClipPathElement::childrenChanged):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::childrenChanged):

  • svg/SVGFELightElement.cpp:

(WebCore::SVGFELightElement::childrenChanged):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::childrenChanged):

  • svg/SVGFilterPrimitiveStandardAttributes.cpp:

(WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::childrenChanged):

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::childrenChanged):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::childrenChanged):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::childrenChanged):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::updateReferencedText): Allow DOM mutations inside the user agent shadow tree here.

3:07 AM Changeset in webkit [223686] by dino@apple.com
  • 2 edits
    9 adds in trunk/LayoutTests/imported/w3c

Import W3C Web Platform Tests for createImageBitmap
https://bugs.webkit.org/show_bug.cgi?id=178509
<rdar://problem/35070583>

Reviewed by Antoine Quint.

  • resources/import-expectations.json:
  • web-platform-tests/2dcontext/imagebitmap/common.js: Added.

(testCanvasDisplayingPattern):
(testDrawImageBitmap):
(initializeImageData):

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow-expected.txt: Added.
  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-sizeOverflow.html: Added.
  • web-platform-tests/2dcontext/imagebitmap/w3c-import.log: Added.
3:05 AM Changeset in webkit [223685] by rniwa@webkit.org
  • 69 edits in trunk/Source/WebCore

Add an argument indicating the type of removal to Node::removedFrom
https://bugs.webkit.org/show_bug.cgi?id=178505

Reviewed by Antti Koivisto.

Like r223628, added RemovalType as the first argument to Node::removedFrom, which contains two booleans indicating
whether the node just become disconnected from a document, and whether node's tree scope had changed or not.

These boolean flags simplifies the logic in removedFrom implementations, and are required to have a better
guarantee about the correctness of node flags during calls to removedFrom. Right now, Node::isConnected() and
Node::isInShadowTree() are both outdated until Node::removedFrom is called.

Also renamed the second argument of removedFrom to parentOfRemovedTree to make the semantics clear.

Note that in some implementations of removedFrom, we check whether isConnected() was true to decide whether
the node had already been disconnected from a document prior to calls to this particular call of removedFrom.
This extra check is no longer necessary since no node will be removed from a document without first being inserted
completely somewhere after r223458.

No new tests since there should be no behavioral changes.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument): Replaced RELEASE_ASSERT with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION.
(WebCore::notifyNodeRemovedFromDocument): Replaced the check that the node had not been re-connected by scripts
by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
Also moved the code to call setCSSTarget to Element::removedFrom. This random call to setCSSTarget predates r114351,
as well as r40475. It was originally introduced by r29311 into Node::removedFromDocument() ten years ago.
(WebCore::notifyNodeRemovedFromTree): Moved NoEventDispatchAssertion to notifyChildNodeRemoved.
(WebCore::notifyChildNodeRemoved): Added NoEventDispatchAssertion.

  • dom/ContainerNodeAlgorithms.h:
  • dom/Element.cpp:

(WebCore::Element::removedFrom): Replaced the complicated code to detect when this element is removed from a document
and its tree scope had changed by removalType.disconnectedFromDocument and removalType.treeScopeChanged.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::removedFrom):

  • dom/Node.h: Replaced a long block of comments above insertedInto by two lines of concise comments now that

the semantics of insertedInto and didFinishInsertingNode are more clear, and enforced by assertions.
(WebCore::Node::RemovalType::RemovalType): Addedl

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::removedFrom):

  • dom/ProcessingInstruction.h:
  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::removedFrom): The extra !isConnected() check is no longer needed. See the description above.

  • dom/ShadowRoot.h:
  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::removedFrom):

  • html/FormAssociatedElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::removedFrom):

  • html/HTMLBaseElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::removedFrom):

  • html/HTMLFormControlElement.h:
  • html/HTMLFormControlElementWithState.cpp:

(WebCore::HTMLFormControlElementWithState::removedFrom):

  • html/HTMLFormControlElementWithState.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::removedFrom):

  • html/HTMLFormElement.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::removedFrom):

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::removedFrom):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::removedFrom):

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::removedFrom): The extra !isConnected() check is no longer needed. See above.

  • html/HTMLLinkElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::removedFrom):

  • html/HTMLMapElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removedFrom):

  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::removedFrom):

  • html/HTMLObjectElement.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::removedFrom): Simplifies the logic to detect when this slot element is being
removed from a shadow tree using removalType.treeScopeChanged.

  • html/HTMLSlotElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedInto): Added a FIXME for an obvious bug.
(WebCore::HTMLSourceElement::removedFrom): Ditto.

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::removedFrom):

  • html/HTMLStyleElement.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::removedFrom):

  • html/HTMLTitleElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::removedFrom): Ditto.

  • html/HTMLTrackElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::removedFrom): Replaced isConnected() check before calling Node::removedFrom by the check of
removalType.disconnectedFromDocument.

  • svg/SVGElement.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::removedFrom):

  • svg/SVGFEImageElement.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::removedFrom):

  • svg/SVGFontFaceElement.h:
  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::removedFrom):

  • svg/SVGMPathElement.h:
  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::removedFrom):

  • svg/SVGPathElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::removedFrom):

  • svg/SVGSVGElement.h:
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::removedFrom): The extra !isConnected() check is no longer needed. See above.

  • svg/SVGStyleElement.h:
  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::removedFrom):

  • svg/SVGTRefElement.h:
  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::removedFrom):

  • svg/SVGTextPathElement.h:
  • svg/SVGTitleElement.cpp:

(WebCore::SVGTitleElement::removedFrom):

  • svg/SVGTitleElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::removedFrom):

  • svg/SVGUseElement.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::removedFrom):

  • svg/animation/SVGSMILElement.h:
2:11 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
2:09 AM WebKitGTK/Gardening/Calendar edited by Ms2ger@igalia.com
(diff)
1:37 AM Changeset in webkit [223684] by jmarcell@apple.com
  • 13 edits in branches/safari-604-branch

Cherry-pick r223451. rdar://problem/34985194

1:27 AM Changeset in webkit [223683] by Ms2ger@igalia.com
  • 4 edits in trunk/Source/WebCore

Update the signatures of compressedTexSubImage3D.
https://bugs.webkit.org/show_bug.cgi?id=178507

Reviewed by Ryosuke Niwa.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::compressedTexSubImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
1:20 AM Changeset in webkit [223682] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Cherry-pick r223436. rdar://problem/35061711

12:41 AM Changeset in webkit [223681] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[curl] Segfault in WebCore::CurlRequest::setupPOST
https://bugs.webkit.org/show_bug.cgi?id=178434

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-19
Reviewed by Ryosuke Niwa.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::resolveBlobReferences):
(WebCore::CurlRequest::setupPOST):

Oct 18, 2017:

11:35 PM Changeset in webkit [223680] by jmarcell@apple.com
  • 4 edits
    1 add in branches/safari-604-branch

Cherry-pick r221921. rdar://problem/35041482

11:07 PM Changeset in webkit [223679] by jmarcell@apple.com
  • 21 edits
    1 add in branches/safari-604-branch

Cherry-pick r221607. rdar://problem/35041474

10:44 PM Changeset in webkit [223678] by rniwa@webkit.org
  • 27 edits
    9 adds in trunk

Don't expose raw HTML in pasteboard to the web content
https://bugs.webkit.org/show_bug.cgi?id=178422
Source/WebCore:

<rdar://problem/34567052>

Reviewed by Wenson Hsieh.

This patch enables HTML sanitization added in r223440 when WebKit pastes & concludes edit drag as opposed to
just when dataTransfer.get is used. This is important to avoid leaking privacy sensitive information such as
local file paths and pasting potentially harmful content such as scripts in event handler serialized by
WebKit prior to r223462. In addition, we start using blob URLs in the pasted content instead of retaining
the original URL and overriding the document loader like r222839 for RTFD and r222119 for image files.

To do this, a new superclass FrameWebContentReader of PasteboardWebContentReader and WebContentMarkupReader
is introduced, and helper functions are extracted out of WebContentMarkupReader in WebContentReaderCocoa.mm
to be also used in WebContentReader.

Tests: http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html

http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-in-same-origin.html
http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html
PasteWebArchive.SanitizesHTML

  • editing/WebContentReader.cpp:

(WebCore::FrameWebContentReader::shouldSanitize const): Moved from WebContentMarkupReader.

  • editing/WebContentReader.h:

(WebCore::FrameWebContentReader): Added to share code between WebContentReader and WebContentMarkupReader.
(WebCore::FrameWebContentReader::FrameWebContentReader): Added.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::writeSelectionToPasteboard): Store the content's origin in the pasteboard so that we can
avoid sanitizing the content when pasting into the same document. This is important since converting all URLs
into blob URLs would break editors on the Web which tracks images, etc... in the content using URLs.
(WebCore::Editor::writeSelection): Ditto.

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::MarkupAndArchive): Replaced FragmentAndArchive. Now returns the markup string in the archive
instead of the parsed fragment.
(WebCore::extractMarkupAndArchive): Renamed from createFragmentFromWebArchive. Now returns the markup string.
(WebCore::sanitizeMarkupWithArchive): Extracted out of WebContentMarkupReader::readWebArchive to share code
between WebContentReader and WebContentMarkupReader, and added the code to handle subframes recursively.
As inefficient as this code is, we can't delay the conversion of subframes' marksup until later time since
the main frame's markup would contain blob URLs to refer to those subframes.
(WebCore::WebContentReader::readWebArchive): Use sanitizeMarkupWithArchive when shouldSanitize() is true.
Don't add the subresources to the document loader when the content will be loaded into the same origin since
subresouces are mostly likely available in the document anyway.
(WebCore::WebContentMarkupReader::readWebArchive):

  • platform/Pasteboard.h:

(WebCore::PasteboardWebContent): Added contentOrigin.

  • platform/PasteboardWriterData.h:

(WebCore::PasteboardWriterData): Ditto.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::read): Read the origin before branching out to readRespectingUTIFidelities.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Record the content origin into the pasteboard.

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::write): Ditto.

  • platform/mac/PasteboardWriter.mm:

(WebCore::createPasteboardWriter): Ditto.

Source/WebKit:

Reviewed by Wenson Hsieh.

Encode & decode the origin string of the copied content written into the system pasteboard.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):

Tools:

Reviewed by Wenson Hsieh.

Added a test case for sanitizing web archive in the system pasteboard to strip privacy sensitive information
such as local file paths and potentially harmful scripts like event handlers serialized by WebKit prior to r223462.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:

(PasteWebArchive.SanitizesHTML):

LayoutTests:

Reviewed by Wenson Hsieh.

Added tests to copy & paste web contents within the same origin as well as cross origin.

  • TestExpectations:
  • editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt: Now contains DOCTYPE.
  • editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Ditto.
  • editing/pasteboard/onpaste-text-html-expected.txt: Rebaselined as now inline styles are stripped.
  • editing/pasteboard/onpaste-text-html.html: Strip away the inline style data since they differ on each platform.
  • http/tests/misc/copy-resolves-urls-expected.txt:
  • http/tests/misc/copy-resolves-urls.html: Now uses blob URL for the pasted image as expected.
  • http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin-expected.txt: Added.
  • http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html: Added.
  • http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-in-same-origin-expected.txt: Added.
  • http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-in-same-origin.html: Added.
  • http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin-expected.txt: Added.
  • http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html: Added.
  • http/tests/security/clipboard/resources/content-to-copy.html: Added.
  • http/tests/security/clipboard/resources/subdirectory/paste-html.html: Added.
  • platform/ios/TestExpectations: Unskip tests that have started passing.
  • platform/mac-wk1/TestExpectations: Unskip the drag & drop test which only works in Mac WK1.
  • platform/win/TestExpectations: Skip the newly added tests since we don't support custom pasteboard

data on Windows port.

10:15 PM Changeset in webkit [223677] by jmarcell@apple.com
  • 3 edits
    4 adds in branches/safari-604-branch

Cherry-pick r223589. rdar://problem/34771462

10:15 PM Changeset in webkit [223676] by jmarcell@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm

Cherry-pick r223583. rdar://problem/34958773

10:14 PM Changeset in webkit [223675] by jmarcell@apple.com
  • 12 edits in branches/safari-604-branch

Cherry-pick r223580. rdar://problem/34958773

10:14 PM Changeset in webkit [223674] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223424. rdar://problem/34745623

10:14 PM Changeset in webkit [223673] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223423. rdar://problem/34745623

10:14 PM Changeset in webkit [223672] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223420. rdar://problem/34745623

10:14 PM Changeset in webkit [223671] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223419. rdar://problem/34745623

10:14 PM Changeset in webkit [223670] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r223409. rdar://problem/34792148

10:14 PM Changeset in webkit [223669] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223228. rdar://problem/35061705

10:14 PM Changeset in webkit [223668] by jmarcell@apple.com
  • 5 edits
    2 adds in branches/safari-604-branch

Cherry-pick r223210. rdar://problem/34820936

10:14 PM Changeset in webkit [223667] by jmarcell@apple.com
  • 14 edits in branches/safari-604-branch

Cherry-pick r222471. rdar://problem/35061708

10:02 PM Changeset in webkit [223666] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Another attempt to fix the windows build.

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::resourceUsageOverlayVisibleChanged):

  • page/SettingsBase.h:
9:42 PM Changeset in webkit [223665] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Attempt to fix the windows build.

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::resourceUsageOverlayVisibleChanged):

  • page/SettingsBase.h:
9:30 PM Changeset in webkit [223664] by jmarcell@apple.com
  • 5 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r221971. rdar://problem/34958928

9:30 PM Changeset in webkit [223663] by jmarcell@apple.com
  • 1 edit in branches/safari-604-branch/Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp

Apply patch. rdar://problem/34958928

9:30 PM Changeset in webkit [223662] by jmarcell@apple.com
  • 7 edits
    1 add in branches/safari-604-branch/Source

Cherry-pick r223315. rdar://problem/34985202

9:29 PM Changeset in webkit [223661] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223298. rdar://problem/34958928

9:29 PM Changeset in webkit [223660] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223297. rdar://problem/34958928

9:29 PM Changeset in webkit [223659] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223295. rdar://problem/34958928

9:29 PM Changeset in webkit [223658] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223294. rdar://problem/34958928

9:29 PM Changeset in webkit [223657] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223289. rdar://problem/34958928

9:29 PM Changeset in webkit [223656] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223287. rdar://problem/34958928

9:29 PM Changeset in webkit [223655] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223285. rdar://problem/34958928

9:29 PM Changeset in webkit [223654] by jmarcell@apple.com
  • 11 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r223280. rdar://problem/34958928

9:08 PM Changeset in webkit [223653] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

[Settings] Convert more settings to be generated
https://bugs.webkit.org/show_bug.cgi?id=177766

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Dean Jackson.

  • Replaces setNeedsStyleRecalcInAllFrames option in Settings.in with a more generic, onChange, which allows you to specify a function in SettingsBase that will be called when the setting changes. setNeedsStyleRecalcInAllFrames is then reimplemented in terms of onChange.
  • Moves most (all but two) of the remaining non-static settings from SettingsBase to Settings.in
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:

(printSetterBody):

  • Scripts/GenerateSettings/Settings.py:

(Setting.init):
(Setting.str):
(Setting.typeIsValueType):
(Setting.setterFunctionName):
(Setting.setterChangeFunctionName):
(Setting.hasComplexSetter):
(parseInput):

Add support for the onChange option.

  • page/Settings.in:

Migrate most of the remaining non-static settings to Settings.in.
Adopt onChange option.

  • page/SettingsBase.cpp:
  • page/SettingsBase.h:

Add helper functions for use by the onChange option.

8:29 PM Changeset in webkit [223652] by Chris Dumez
  • 20 edits in trunk

Implement ServiceWorkerRegistration.scope / updateViaCache
https://bugs.webkit.org/show_bug.cgi?id=178497

Reviewed by Youenn Fablet.

Source/WebCore:

Implement ServiceWorkerRegistration.scope / updateViaCache.

No new tests, updated existing test.

  • WebCore.xcodeproj/project.pbxproj:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

  • workers/service/ServiceWorkerContainer.h:
  • workers/service/ServiceWorkerJob.cpp:

(WebCore::ServiceWorkerJob::resolvedWithRegistration):

  • workers/service/ServiceWorkerJob.h:
  • workers/service/ServiceWorkerJobClient.h:
  • workers/service/ServiceWorkerRegistration.cpp:

(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::scope const):
(WebCore::ServiceWorkerRegistration::updateViaCache const):
(WebCore::ServiceWorkerRegistration::update):
(WebCore::ServiceWorkerRegistration::unregister):
(WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
(WebCore::ServiceWorkerRegistration::activeDOMObjectName const):
(WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const):

  • workers/service/ServiceWorkerRegistration.h:
  • workers/service/ServiceWorkerRegistration.idl:
  • workers/service/ServiceWorkerRegistrationData.cpp:

(WebCore::ServiceWorkerRegistrationData::isolatedCopy const):

  • workers/service/ServiceWorkerRegistrationData.h:

(WebCore::ServiceWorkerRegistrationData::encode const):
(WebCore::ServiceWorkerRegistrationData::decode):

  • workers/service/server/SWClientConnection.cpp:

(WebCore::SWClientConnection::jobResolvedInServer):

  • workers/service/server/SWClientConnection.h:
  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::scriptContextStarted):
(WebCore::SWServerRegistration::data const):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

LayoutTests:

Extend layout test coverage.

  • http/tests/workers/service/basic-register-expected.txt:
  • http/tests/workers/service/resources/basic-register.js:

(then):

7:26 PM Changeset in webkit [223651] by jmarcell@apple.com
  • 11 edits
    1 add in branches/safari-604-branch

Cherry-pick r223614. rdar://problem/34920288

7:26 PM Changeset in webkit [223650] by commit-queue@webkit.org
  • 34 edits
    2 copies
    1 move
    6 adds
    1 delete in trunk

Add preliminary support for ServiceWorker Handle Fetch
https://bugs.webkit.org/show_bug.cgi?id=178475

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-18
Reviewed by Chris Dumez.

Source/WebCore:

Test: http/tests/workers/service/basic-fetch.https.html

Adding parameters to allow WebKit to do loading through Service Worker or through regular networking.
A script context is now storing its selected service worker identifier. This should be fully implemented later on.
This selected service worker identifier is passed to loading code as a ResourceLoaderOptions field.
Service workers mode is also added as a ResourceLoaderOptions field so that the service worker can be bypassed.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::selectedServiceWorkerIdentifier const):
(WebCore::ScriptExecutionContext::setSelectedServiceWorkerIdentifier):

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::DocumentThreadableLoader):

  • loader/FetchOptions.h:

(WebCore::isPotentialNavigationOrSubresourceRequest):
(WebCore::isNonSubresourceRequest):

  • loader/ResourceLoaderOptions.h:
  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):

  • loader/WorkerThreadableLoader.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
  • workers/WorkerThread.h:
  • workers/service/ServiceWorkerContainer.cpp:

(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):

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

Source/WebKit:

Preliminary support of Handle Fetch algorithm and integration with fetch spec.
Adding ServiceWorkerClientFetch as the class responsible to do the load through ServiceWorker.
It is similar to WebResourceLoader that do the load through NetworkProcess.
In case ServiceWorkerClientFetch is not able to load through ServiceWorker,
it will fallback to WebResourceLoader through a fallback callback.

Loading through Service Worker is done currently if:

  • There is a service worker registered for that origin
  • Request is a subresource
  • service workers mode is all

There will be cases where the service worker will not do the loading, for instance when fetch event handler is not set.
Future work should try to reduce the cases where the IPC dance is done unnecessarily.

ServiceWorkerClientFetch is responsible to adapt the ServiceWorker response to ResourceLoader.
In particular, it is calling ResourceLoader error callback if response is of type error.
It should call ResourceLoader redirection callback if response is a redirection response.
This will be done as a follow-up.

Implementing the IPC communication dedicated to fetch between WebProcess and ServiceWorker through StorageProcess.
In the future, WebProcess should create a direct IPC communication to the ServiceWorker process.

Moved SWContextManager from WebCore to WebKit and renamed it to ServiceWorkerContextManager.
This class is moved to WebKit as it will have to handle IPC and having a separation will add some unnecessary boilerplate.

  • DerivedSources.make:
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::startFetch):
(WebKit::WebSWServerConnection::didReceiveFetchResponse):
(WebKit::WebSWServerConnection::didReceiveFetchData):
(WebKit::WebSWServerConnection::didFinishFetch):
(WebKit::WebSWServerConnection::failedFetch):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:
  • StorageProcess/ServiceWorker/WebSWServerConnection.messages.in:
  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::failedFetch):
(WebKit::StorageProcess::didReceiveFetchResponse):
(WebKit::StorageProcess::didReceiveFetchData):
(WebKit::StorageProcess::didFinishFetch):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):

  • WebProcess/Network/WebLoaderStrategy.h:
  • WebProcess/Storage/ServiceWorkerClientFetch.cpp: Added.

(WebKit::ServiceWorkerClientFetch::didReceiveResponse):
(WebKit::ServiceWorkerClientFetch::didReceiveData):
(WebKit::ServiceWorkerClientFetch::didFinishFetch):
(WebKit::ServiceWorkerClientFetch::didFail):

  • WebProcess/Storage/ServiceWorkerClientFetch.h: Added.
  • WebProcess/Storage/ServiceWorkerClientFetch.messages.in: Added.
  • WebProcess/Storage/ServiceWorkerContextManager.cpp: Renamed from Source/WebCore/workers/service/context/SWContextManager.cpp.

(WebKit::ServiceWorkerContextManager::startServiceWorkerContext):
(WebKit::ServiceWorkerContextManager::startFetch):

  • WebProcess/Storage/ServiceWorkerContextManager.h: Renamed from Source/WebCore/workers/service/context/SWContextManager.h.

(WebKit::ServiceWorkerContextManager::ServiceWorkerContextManager):

  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::startFetch):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:

(WebKit::shouldHandleFetch):
(WebKit::WebServiceWorkerProvider::handleFetch):
(WebKit::WebServiceWorkerProvider::didReceiveServiceWorkerClientFetchMessage):

  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::didReceiveMessage):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWorkerContextConnection):
(WebKit::WebProcess::startServiceWorkerContext):
(WebKit::WebProcess::startFetchInServiceWorker):

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

LayoutTests:

  • http/tests/workers/service/basic-fetch.https-expected.txt: Added.
  • http/tests/workers/service/basic-fetch.https.html: Added.
  • http/tests/workers/service/resources/basic-fetch-worker.js: Added.
  • http/tests/workers/service/resources/basic-fetch.js: Added.
7:22 PM Changeset in webkit [223649] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Group related pre-layout code to improve readability
https://bugs.webkit.org/show_bug.cgi?id=178496
<rdar://problem/35065718>

Reviewed by Simon Fraser.

Early returns/asserts/member variable resets etc.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

7:14 PM Changeset in webkit [223648] by commit-queue@webkit.org
  • 9 edits in trunk

TestController should clear all fetch caches when resetting its state
https://bugs.webkit.org/show_bug.cgi?id=178486

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-18
Reviewed by Chris Dumez.

Tools:

Adding clearDOMCaches test runner method.
Using that method when resetting state.

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

(WTR::TestRunner::clearDOMCaches):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/cache-storage/cache-clearing-all.https.html:
6:39 PM Changeset in webkit [223647] by cpugh@apple.com
  • 6 edits in trunk

[iOS] Use new class name from UIKit when checking UITextSuggestion type
https://bugs.webkit.org/show_bug.cgi?id=178416
Source/WebKit:

<rdar://problem/35010840>

Reviewed by Tim Horton.

Here we start using UITextAutofillSuggestion instead of the old name that was being used for
AutoFill text suggestions.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView insertTextSuggestion:]): Use UITextAutofillSuggestion when checking the class
and when casting instead of UIKeyboardLoginCredentialsSuggestion.

Tools:

Reviewed by Tim Horton.

This updates our test using/mocking out UITextAutofillSuggestion instead of UIKeyboardLoginCredentialsSuggestion.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:

(-[UITextAutofillSuggestion initWithUsername:password:]): Copied from UIKit's implementation. This will serve as
a mock of this method for builds not containingit.
(+[UITextAutofillSuggestion autofillSuggestionWithUsername:password:]): Ditto.
(TestWebKitAPI::TEST): Use +[UITextAutofillSuggestion autofillSuggestionWithUsername:password:] inline instead of
helper function for creating a new suggestion.
(newUIKeyboardLoginCredentialsSuggestion): Deleted.

  • TestWebKitAPI/ios/UIKitSPI.h:
6:22 PM Changeset in webkit [223646] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Layers sidebar footer should not have white background with full-width quick console
https://bugs.webkit.org/show_bug.cgi?id=178493

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-18
Reviewed by Matt Baker.

  • UserInterface/Views/LayerDetailsSidebarPanel.css:

Update CSS for new sidebar.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.css:

Update CSS for legacy sidebar.

6:12 PM Changeset in webkit [223645] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

RegExpObject::defineOwnProperty() does not need to compare values if no descriptor value is specified.
https://bugs.webkit.org/show_bug.cgi?id=177600
<rdar://problem/34710985>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-177600.js: Added.

Source/JavaScriptCore:

According to http://www.ecma-international.org/ecma-262/8.0/#sec-validateandapplypropertydescriptor,
section 9.1.6.3-7.a.ii, we should only check if the value is the same if the
descriptor value is present.

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::defineOwnProperty):

6:01 PM Changeset in webkit [223644] by jiewen_tan@apple.com
  • 135 edits in trunk/Source

Replace some stack raw pointers with RefPtrs within WebCore/html
https://bugs.webkit.org/show_bug.cgi?id=178201
<rdar://problem/34841692>

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is an effort to reduce raw pointer usage in DOM code. In this patch, raw pointers
that are ref countable are blindly selected to be replaced with RefPtrs with one exception
which is auto*.

Also, this patch occasionally modifies the return type of some methods, and therefore callers
of those methods are modified accordingly.

  • Modules/encryptedmedia/legacy/LegacyCDM.cpp:

(WebCore::LegacyCDM::mediaPlayer const):

  • Modules/encryptedmedia/legacy/LegacyCDM.h:
  • Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:

(WebCore::CDMPrivateMediaPlayer::createSession):

  • Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:

(WebCore::WebKitMediaKeys::cdmMediaPlayer const):

  • Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::externalDeviceDisplayName const):
(WebCore::MediaControlsHost::externalDeviceType const):

  • dom/Element.cpp:

(WebCore::Element::focusDelegate):
(WebCore::Element::userAgentShadowRoot const):
(WebCore::Element::ensureUserAgentShadowRoot):

  • dom/Element.h:
  • dom/EventContext.cpp:

(WebCore::TouchEventContext::checkReachability const):

  • dom/EventPath.cpp:

(WebCore::shouldEventCrossShadowBoundary):
(WebCore::EventPath::setRelatedTarget):
(WebCore::EventPath::retargetTouch):
(WebCore:: const):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::toNode):
(WebCore::EventTarget::addEventListener):

  • dom/EventTarget.h:
  • dom/MouseEvent.cpp:

(WebCore::MouseEvent::toElement const):
(WebCore::MouseEvent::fromElement const):

  • dom/MouseEvent.h:
  • dom/MouseRelatedEvent.cpp:

(WebCore::MouseRelatedEvent::computeRelativePosition):

  • dom/Node.cpp:

(WebCore::Node::toNode):

  • dom/Node.h:
  • dom/ScopedEventQueue.cpp:
  • editing/Editor.cpp:

(WebCore::Editor::selectionForCommand):

  • editing/EditorCommand.cpp:

(WebCore::targetFrame):

  • editing/TextIterator.cpp:

(WebCore::TextIterator::handleReplacedElement):

  • html/BaseChooserOnlyDateAndTimeInputType.cpp:

(WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::updateColorSwatch):
(WebCore::ColorInputType::shadowColorSwatch const):

  • html/FileInputType.cpp:

(WebCore::FileInputType::disabledAttributeChanged):
(WebCore::FileInputType::multipleAttributeChanged):

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::findAssociatedForm):
(WebCore::FormAssociatedElement::formOwnerRemovedFromTree):
(WebCore::FormAssociatedElement::resetFormOwner):
(WebCore::FormAssociatedElement::formAttributeChanged):

  • html/FormController.cpp:

(WebCore::recordFormStructure):
(WebCore::FormKeyGenerator::formKey):
(WebCore::FormController::restoreControlStateIn):

  • html/HTMLAnchorElement.cpp:

(WebCore::appendServerMapMousePosition):
(WebCore::HTMLAnchorElement::handleClick):

  • html/HTMLAppletElement.cpp:

(WebCore::HTMLAppletElement::updateWidget):

  • html/HTMLAreaElement.cpp:

(WebCore::HTMLAreaElement::imageElement const):
(WebCore::HTMLAreaElement::isFocusable const):
(WebCore::HTMLAreaElement::setFocus):
(WebCore::HTMLAreaElement::updateFocusAppearance):

  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::setScrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
(WebCore::HTMLBodyElement::setScrollTop):
(WebCore::HTMLBodyElement::scrollHeight):
(WebCore::HTMLBodyElement::scrollWidth):

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::createElementRenderer):
(WebCore:: const):

  • html/HTMLDocument.cpp:

(WebCore::HTMLDocument::width):
(WebCore::HTMLDocument::height):

  • html/HTMLElement.cpp:

(WebCore::HTMLElement::rendererIsNeeded):
(WebCore::setHasDirAutoFlagRecursively):
(WebCore::HTMLElement::directionality const):
(WebCore::HTMLElement::dirAttributeChanged):
(WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):

  • html/HTMLEmbedElement.cpp:

(WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
(WebCore::HTMLEmbedElement::rendererIsNeeded):

  • html/HTMLFieldSetElement.cpp:

(WebCore::updateFromControlElementsAncestorDisabledStateUnder):
(WebCore::HTMLFieldSetElement::disabledStateChanged):
(WebCore::HTMLFieldSetElement::childrenChanged):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor const):
(WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
(WebCore::HTMLFormControlElement::didChangeForm):
(WebCore::HTMLFormControlElement::shouldAutocorrect const):
(WebCore::HTMLFormControlElement::autocapitalizeType const):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::handleLocalEvents):
(WebCore::submitElementFromEvent):
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
(WebCore::HTMLFormElement::reset):
(WebCore::HTMLFormElement::shouldAutocorrect const):
(WebCore::HTMLFormElement::parseAttribute):
(WebCore::HTMLFormElement::resetDefaultButton):
(WebCore::HTMLFormElement::elementFromPastNamesMap const):
(WebCore::HTMLFormElement::namedElements):

  • html/HTMLFormElement.h:
  • html/HTMLFrameElement.cpp:

(WebCore::HTMLFrameElement::didAttachRenderers):

  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::isURLAllowed const):
(WebCore::HTMLFrameElementBase::openURL):
(WebCore::HTMLFrameElementBase::didAttachRenderers):

  • html/HTMLFrameOwnerElement.cpp:

(WebCore::HTMLFrameOwnerElement::setContentFrame):
(WebCore::HTMLFrameOwnerElement::clearContentFrame):
(WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
(WebCore::SubframeLoadingDisabler::canLoadFrame):

  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::findContaining):
(WebCore::HTMLFrameSetElement::willAttachRenderers):
(WebCore::HTMLFrameSetElement::insertedInto):
(WebCore::HTMLFrameSetElement::removedFrom):

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
(WebCore::HTMLImageElement::pictureElement const):
(WebCore::HTMLImageElement::destroyImageControls):
(WebCore::HTMLImageElement::hasImageControls const):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::innerTextElement const):
(WebCore::HTMLInputElement::endEditing):
(WebCore::HTMLInputElement::dataList const):
(WebCore::HTMLInputElement::resetListAttributeTargetObserver): Deleted.
(WebCore::HTMLInputElement::listAttributeTargetChanged): Deleted.
(WebCore::HTMLInputElement::isSteppable const): Deleted.
(WebCore::HTMLInputElement::dateType const): Deleted.
(WebCore::HTMLInputElement::isTextButton const): Deleted.
(WebCore::HTMLInputElement::isRadioButton const): Deleted.
(WebCore::HTMLInputElement::isSearchField const): Deleted.
(WebCore::HTMLInputElement::isInputTypeHidden const): Deleted.
(WebCore::HTMLInputElement::isPasswordField const): Deleted.
(WebCore::HTMLInputElement::isCheckbox const): Deleted.
(WebCore::HTMLInputElement::isRangeControl const): Deleted.
(WebCore::HTMLInputElement::isColorControl const): Deleted.
(WebCore::HTMLInputElement::isText const): Deleted.
(WebCore::HTMLInputElement::isEmailField const): Deleted.
(WebCore::HTMLInputElement::isFileUpload const): Deleted.
(WebCore::HTMLInputElement::isImageButton const): Deleted.
(WebCore::HTMLInputElement::isNumberField const): Deleted.
(WebCore::HTMLInputElement::isSubmitButton const): Deleted.
(WebCore::HTMLInputElement::isTelephoneField const): Deleted.
(WebCore::HTMLInputElement::isURLField const): Deleted.
(WebCore::HTMLInputElement::isDateField const): Deleted.
(WebCore::HTMLInputElement::isDateTimeField const): Deleted.
(WebCore::HTMLInputElement::isDateTimeLocalField const): Deleted.
(WebCore::HTMLInputElement::isMonthField const): Deleted.
(WebCore::HTMLInputElement::isTimeField const): Deleted.
(WebCore::HTMLInputElement::isWeekField const): Deleted.
(WebCore::HTMLInputElement::isEnumeratable const): Deleted.
(WebCore::HTMLInputElement::supportLabels const): Deleted.
(WebCore::HTMLInputElement::shouldAppearChecked const): Deleted.
(WebCore::HTMLInputElement::supportsPlaceholder const): Deleted.
(WebCore::HTMLInputElement::updatePlaceholderText): Deleted.
(WebCore::HTMLInputElement::isEmptyValue const): Deleted.
(WebCore::HTMLInputElement::maxLengthAttributeChanged): Deleted.
(WebCore::HTMLInputElement::minLengthAttributeChanged): Deleted.
(WebCore::HTMLInputElement::updateValueIfNeeded): Deleted.
(WebCore::HTMLInputElement::defaultToolTip const): Deleted.
(WebCore::HTMLInputElement::matchesIndeterminatePseudoClass const): Deleted.
(WebCore::HTMLInputElement::shouldAppearIndeterminate const): Deleted.
(WebCore::HTMLInputElement::mediaCaptureType const): Deleted.
(WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Deleted.
(WebCore:: const): Deleted.
(WebCore::HTMLInputElement::checkedRadioButtonForGroup const): Deleted.
(WebCore::HTMLInputElement::radioButtonGroups const): Deleted.
(WebCore::HTMLInputElement::addToRadioButtonGroup): Deleted.
(WebCore::HTMLInputElement::removeFromRadioButtonGroup): Deleted.
(WebCore::HTMLInputElement::height const): Deleted.
(WebCore::HTMLInputElement::width const): Deleted.
(WebCore::HTMLInputElement::setHeight): Deleted.
(WebCore::HTMLInputElement::setWidth): Deleted.
(WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver): Deleted.
(WebCore::ListAttributeTargetObserver::idTargetChanged): Deleted.
(WebCore::HTMLInputElement::setRangeText): Deleted.
(WebCore::HTMLInputElement::shouldTruncateText const): Deleted.
(WebCore::HTMLInputElement::selectionStartForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionStartForBindings): Deleted.
(WebCore::HTMLInputElement::selectionEndForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionEndForBindings): Deleted.
(WebCore::HTMLInputElement::selectionDirectionForBindings const): Deleted.
(WebCore::HTMLInputElement::setSelectionDirectionForBindings): Deleted.
(WebCore::HTMLInputElement::setSelectionRangeForBindings): Deleted.
(WebCore::HTMLInputElement::createInnerTextStyle const): Deleted.
(WebCore::HTMLInputElement::setupDateTimeChooserParameters): Deleted.
(WebCore::HTMLInputElement::capsLockStateMayHaveChanged): Deleted.

  • html/HTMLInputElement.h:
  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::shadowSelect const):

  • html/HTMLLabelElement.cpp:

(WebCore::HTMLLabelElement::defaultEventHandler):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::handleClick):

  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::mapMouseEvent):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::updateActiveTextTrackCues):
(WebCore::HTMLMediaElement::isSafeToLoadURL):
(WebCore::HTMLMediaElement::controls const):
(WebCore::HTMLMediaElement::layoutSizeChanged):
(WebCore::HTMLMediaElement::enterFullscreen):
(WebCore::HTMLMediaElement::mediaControls const):
(WebCore::HTMLMediaElement::hasMediaControls const):
(WebCore::HTMLMediaElement::mediaPlayerReferrer const):
(WebCore::HTMLMediaElement::mediaPlayerUserAgent const):
(WebCore::HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge):
(WebCore::HTMLMediaElement::sourceApplicationIdentifier const):
(WebCore::HTMLMediaElement::getVideoPlaybackQuality):
(WebCore::HTMLMediaElement::session const):

  • html/HTMLMediaElement.h:

(WebCore::HTMLMediaElement::player const):

  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::hasFallbackContent const):

  • html/HTMLOptGroupElement.cpp:

(WebCore::HTMLOptGroupElement::ownerSelectElement const):
(WebCore::HTMLOptGroupElement::accessKeyAction):

  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::setText):
(WebCore::HTMLOptionElement::accessKeyAction):
(WebCore::HTMLOptionElement::index const):
(WebCore::HTMLOptionElement::parseAttribute):
(WebCore::HTMLOptionElement::selected):
(WebCore::HTMLOptionElement::setSelected):
(WebCore::HTMLOptionElement::setSelectedState):
(WebCore::HTMLOptionElement::childrenChanged):
(WebCore::HTMLOptionElement::ownerDataListElement const):
(WebCore::HTMLOptionElement::ownerSelectElement const):
(WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel const):
(WebCore::HTMLOptionElement::insertedInto):
(WebCore::HTMLOptionElement::collectOptionInnerText const):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::willDetachRenderers):
(WebCore::HTMLPlugInElement::isKeyboardFocusable const):
(WebCore::HTMLPlugInElement::isUserObservable const):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay const):
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):

  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add):
(WebCore::HTMLSelectElement::recalcListItems const):
(WebCore::HTMLSelectElement::selectOption):
(WebCore::HTMLSelectElement::reset):
(WebCore::HTMLSelectElement::listBoxDefaultEventHandler):

  • html/HTMLSlotElement.cpp:

(WebCore::flattenAssignedNodes):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::removedFrom):

  • html/HTMLSummaryElement.cpp:

(WebCore::HTMLSummaryElement::isActiveSummary const):
(WebCore::isClickableControl):
(WebCore::HTMLSummaryElement::defaultEventHandler):

  • html/HTMLTableCellElement.cpp:

(WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle const):

  • html/HTMLTableColElement.cpp:

(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle const):

  • html/HTMLTableElement.cpp:

(WebCore::HTMLTableElement::tHead const):
(WebCore::HTMLTableElement::setTHead):
(WebCore::HTMLTableElement::tFoot const):
(WebCore::HTMLTableElement::createTBody):
(WebCore::HTMLTableElement::lastBody const):
(WebCore::HTMLTableElement::deleteRow):

  • html/HTMLTablePartElement.cpp:

(WebCore::HTMLTablePartElement::findParentTable const):

  • html/HTMLTableRowsCollection.cpp:

(WebCore::HTMLTableRowsCollection::rowAfter):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::subtreeHasChanged):
(WebCore::HTMLTextAreaElement::innerTextElement const):

  • html/HTMLTextAreaElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::indexForVisiblePosition const):
(WebCore::HTMLTextFormControlElement::visiblePositionForIndex const):
(WebCore::HTMLTextFormControlElement::computeSelectionStart const):
(WebCore::HTMLTextFormControlElement::computeSelectionEnd const):
(WebCore::HTMLTextFormControlElement::computeSelectionDirection const):
(WebCore::HTMLTextFormControlElement::selection const):
(WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue const):
(WebCore::positionForIndex):
(WebCore::HTMLTextFormControlElement::indexForPosition const):
(WebCore::HTMLTextFormControlElement::hidePlaceholder):
(WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
(WebCore::enclosingTextFormControl):
(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):

  • html/HTMLTextFormControlElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::canLoadURL):
(WebCore::HTMLTrackElement::setReadyState):
(WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute const):
(WebCore::HTMLTrackElement::textTrackKindChanged):
(WebCore::HTMLTrackElement::textTrackModeChanged):
(WebCore::HTMLTrackElement::textTrackAddCues):
(WebCore::HTMLTrackElement::textTrackRemoveCues):
(WebCore::HTMLTrackElement::textTrackAddCue):
(WebCore::HTMLTrackElement::textTrackRemoveCue):
(WebCore::HTMLTrackElement::mediaElement const):

  • html/HTMLTrackElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::setDisplayMode):
(WebCore::HTMLVideoElement::paintCurrentFrameInContext):

  • html/ImageDocument.cpp:

(WebCore::ImageDocument::createDocumentStructure):
(WebCore::ImageDocument::scale):
(WebCore::ImageDocument::imageFitsInWindow):

  • html/InputType.cpp:

(WebCore::InputType::destroyShadowSubtree):

  • html/InputType.h:

(WebCore::InputType::innerTextElement const):

  • html/MediaDocument.cpp:

(WebCore::MediaDocumentParser::createDocumentStructure):
(WebCore::MediaDocument::defaultEventHandler):

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
(WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
(WebCore::isMainContentForPurposesOfAutoplay):

  • html/NumberInputType.cpp:

(WebCore::NumberInputType::decorationWidth const):

  • html/PluginDocument.cpp:

(WebCore::PluginDocumentParser::appendBytes):

  • html/RadioInputType.cpp:

(WebCore::RadioInputType::handleKeydownEvent):
(WebCore::RadioInputType::isKeyboardFocusable const):
(WebCore::RadioInputType::didDispatchClick):

  • html/RadioNodeList.cpp:

(WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter const):

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::handleTouchEvent):
(WebCore::RangeInputType::sliderTrackElement const):
(WebCore::RangeInputType::listAttributeTargetChanged):
(WebCore::RangeInputType::updateTickMarkValues):

  • html/SearchInputType.cpp:

(WebCore::SearchInputType::createShadowSubtree):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::isEmptyValue const):
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::handleFocusEvent):
(WebCore::TextFieldInputType::innerTextElement const):
(WebCore::TextFieldInputType::updatePlaceholderText):
(WebCore::TextFieldInputType::didSetValueByUserEdit):
(WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const):

  • html/TextFieldInputType.h:
  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::size):
(WebCore::CanvasRenderingContext2D::drawImage):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::attach):
(WebCore::WebGLFramebuffer::getAttachmentObject const):
(WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
(WebCore::WebGLFramebuffer::getColorBufferWidth const):
(WebCore::WebGLFramebuffer::getColorBufferHeight const):
(WebCore::WebGLFramebuffer::getColorBufferFormat const):
(WebCore::WebGLFramebuffer::checkStatus const):
(WebCore::WebGLFramebuffer::hasStencilBuffer const):
(WebCore::WebGLFramebuffer::initializeAttachments):

  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::compressedTexImage2D):
(WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::generateMipmap):
(WebCore::WebGLRenderingContextBase::getAttachedShaders):
(WebCore::WebGLRenderingContextBase::getTexParameter):
(WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::texSubImage2D):
(WebCore::WebGLRenderingContextBase::texSubImage2DBase):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):
(WebCore::WebGLRenderingContextBase::texImage2D):
(WebCore::WebGLRenderingContextBase::texParameter):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
(WebCore::WebGLRenderingContextBase::validateTextureBinding):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):

  • html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassColorAttachmentDescriptor::clearColor const):
(WebCore::WebGPURenderPassColorAttachmentDescriptor::setClearColor):

  • html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:

(WebCore::WebGPURenderPassDepthAttachmentDescriptor::clearDepth const):
(WebCore::WebGPURenderPassDepthAttachmentDescriptor::setClearDepth):

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::executeInsertAlreadyParsedChildTask):
(WebCore::HTMLConstructionSite::insertTextNode):

  • html/parser/HTMLFormattingElementList.cpp:

(WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):

  • html/parser/HTMLParserOptions.cpp:

(WebCore::HTMLParserOptions::HTMLParserOptions):

  • html/parser/HTMLParserScheduler.cpp:

(WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
(WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):

  • html/parser/XSSAuditor.cpp:

(WebCore::XSSAuditor::init):

  • html/shadow/MediaControlElementTypes.cpp:

(WebCore::parentMediaElement):

  • html/shadow/MediaControlElementTypes.h:

(WebCore::parentMediaElement):

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlPanelElement::startDrag):
(WebCore::MediaControlPanelElement::endDrag):
(WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
(WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
(WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
(WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
(WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):
(WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
(WebCore::MediaControlTextTrackContainerElement::updateSizes):
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):

  • html/shadow/MediaControls.cpp:

(WebCore::MediaControls::containsRelatedTarget):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::SliderThumbElement::isDisabledFormControl const):
(WebCore::SliderThumbElement::matchesReadWritePseudoClass const):
(WebCore::SliderThumbElement::focusDelegate):
(WebCore::SliderThumbElement::setPositionFromPoint):
(WebCore::SliderThumbElement::startDragging):
(WebCore::SliderThumbElement::stopDragging):
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):
(WebCore::SliderThumbElement::willDetachRenderers):
(WebCore::findTouchWithIdentifier):
(WebCore::SliderThumbElement::handleTouchStart):
(WebCore::SliderThumbElement::handleTouchMove):
(WebCore::SliderThumbElement::handleTouchEndAndCancel):
(WebCore::SliderThumbElement::handleTouchEvent):
(WebCore::SliderThumbElement::hostInput const):

  • html/shadow/SliderThumbElement.h:
  • html/shadow/SpinButtonElement.cpp:

(WebCore::SpinButtonElement::defaultEventHandler):
(WebCore::SpinButtonElement::releaseCapture):

  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerTextElement::defaultEventHandler):
(WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):

  • html/shadow/mac/ImageControlsButtonElementMac.cpp:

(WebCore::ImageControlsButtonElementMac::defaultEventHandler):

  • html/track/LoadableTextTrack.cpp:

(WebCore::LoadableTextTrack::trackElementIndex):

  • html/track/TextTrack.cpp:

(WebCore::TextTrack::setMode):
(WebCore::TextTrack::hasCue):

  • html/track/TextTrackCueGeneric.cpp:

(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):

  • html/track/VTTCue.cpp:

(WebCore::VTTCue::copyWebVTTNodeToDOMTree):
(WebCore::VTTCue::determineTextDirection):
(WebCore::VTTCue::markFutureAndPastNodes):
(WebCore::VTTCue::removeDisplayTree):
(WebCore::VTTCue::cueContentsMatch const):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::didAddEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

  • page/ContextMenuController.cpp:

(WebCore::ContextMenuController::maybeCreateContextMenu):

  • rendering/RenderSnapshottedPlugIn.cpp:

(WebCore::RenderSnapshottedPlugIn::handleEvent):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::innerTextElement const):
(WebCore::RenderTextControl::styleDidChange):
(WebCore::RenderTextControl::textBlockLogicalWidth const):
(WebCore::RenderTextControl::computeLogicalHeight const):
(WebCore::RenderTextControl::hitInnerTextElement):
(WebCore::RenderTextControl::canScroll const):
(WebCore::RenderTextControl::innerLineHeight const):

  • rendering/RenderTextControl.h:
  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::nodeAtPoint):
(WebCore::RenderTextControlSingleLine::styleDidChange):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::isFocused const):

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):

  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::paintSliderThumb):

  • rendering/RenderVideo.cpp:

(WebCore::RenderVideo::willBeDestroyed):
(WebCore::RenderVideo::calculateIntrinsicSize):
(WebCore::RenderVideo::paintReplaced):
(WebCore::RenderVideo::updatePlayer):
(WebCore::RenderVideo::supportsAcceleratedRendering const):
(WebCore::RenderVideo::acceleratedRenderingStateChanged):
(WebCore::RenderVideo::requiresImmediateCompositing const):
(WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect const):

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::clearShadowTree):
(WebCore::SVGUseElement::targetClone const):

Source/WebKit:

Change the type of node as toNode() is changed to return RefPtr.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMPrivate.cpp:

(WebKit::wrap):

  • WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:

(WebKit::WebEditorClient::handleKeyboardEvent):

  • WebProcess/WebCoreSupport/wpe/WebEditorClientWPE.cpp:

(WebKit::WebEditorClient::handleKeyboardEvent):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::handleEditingKeyboardEvent):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::frameForEvent):

Source/WebKitLegacy/mac:

  • DOM/DOM.mm:

(kit):
Change the type of node as toNode() is changed to return RefPtr.

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::handleEditingKeyboardEvent):
Change the type of node as toNode() is changed to return RefPtr.

5:46 PM Changeset in webkit [223643] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

update-webkit-auxiliary-libs can't download WebKitAuxiliaryLibrary.zip due to 403 Forbidden
https://bugs.webkit.org/show_bug.cgi?id=178381

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-18
Reviewed by Alexey Proskuryakov.

The web server developer.apple.com seems to reject HTTP requests
without Accept header field.

  • Scripts/update-webkit-dependency: Add 'Accept' header field to requests.
4:59 PM Changeset in webkit [223642] by dino@apple.com
  • 3 edits in branches/safari-604-branch

Cherry-pick r223640. rdar://problem/35063901

4:52 PM Changeset in webkit [223641] by dino@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r223567. rdar://problem/35041476

4:41 PM Changeset in webkit [223640] by dino@apple.com
  • 4 edits in trunk

Some older hardware can't actually use renderbuffers at the size they advertise
https://bugs.webkit.org/show_bug.cgi?id=178417
<rdar://problem/35042291>

Reviewed by Tim Horton.

Source/WebCore:

The change in r223567 caused some older hardware to fail, because even though
they claimed to support a maximum renderbuffer and viewport of 16K, they were
unable to actually handle one. Rather than trying to identify such hardware,
clamp all buffers to a maximum of 8192. This is bigger than the previous value
of 4096, and large enough to have a full-screen buffer on a Retina 5K iMac.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::getIntegerv):

LayoutTests:

Unskip webgl/1.0.2/conformance/canvas/drawingbuffer-static-canvas-test.html.

4:14 PM Changeset in webkit [223639] by dbates@webkit.org
  • 3 edits
    2 adds in trunk/LayoutTests

Add test to ensure that text-overflow: ellipsis text is scrollable
https://bugs.webkit.org/show_bug.cgi?id=178395

Reviewed by Zalan Bujtas.

  • fast/text/scroll-text-overflow-ellipsis-expected.html: Added.
  • fast/text/scroll-text-overflow-ellipsis.html: Added.
  • platform/ios-wk1/TestExpectations: For now, skip the test in legacy WebKit on iOS

as eventSender.keyDown() does not seem to be dispatching a keyboard event to the
focused field. See <https://bugs.webkit.org/show_bug.cgi?id=178490>.

  • resources/ui-helper.js:

(window.UIHelper.keyDown.return.new.Promise):
(window.UIHelper.keyDown):

4:09 PM Changeset in webkit [223638] by jmarcell@apple.com
  • 16 edits
    2 deletes in tags/Safari-605.1.11.1

Cherry-pick r223618. rdar://problem/35056300

4:09 PM Changeset in webkit [223637] by jmarcell@apple.com
  • 27 edits in tags/Safari-605.1.11.1/Source/WTF/wtf

Cherry-pick r223617. rdar://problem/35047351

4:08 PM Changeset in webkit [223636] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.11.1/Source

Versioning.

4:04 PM Changeset in webkit [223635] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.11.1

New tag.

3:31 PM Changeset in webkit [223634] by Chris Dumez
  • 20 edits
    10 copies
    1 move in trunk/Source

[Service Worker] Add stubs for Client / WindowClient / Clients
https://bugs.webkit.org/show_bug.cgi?id=178469

Reviewed by Youenn Fablet.

Source/WebCore:

Add stubs for Client / WindowClient / Clients:

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/Document.cpp:

(WebCore::Document::visibilityState const):

  • dom/Document.h:
  • dom/Document.idl:
  • dom/VisibilityState.h: Renamed from Source/WebCore/page/PageVisibilityState.h.
  • dom/VisibilityState.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • page/Page.cpp:

(WebCore::Page::visibilityState const):

  • page/Page.h:
  • workers/service/ServiceWorkerClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

(WebCore::ServiceWorkerClient::ServiceWorkerClient):
(WebCore::ServiceWorkerClient::activeDOMObjectName const):
(WebCore::ServiceWorkerClient::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClient::url const):
(WebCore::ServiceWorkerClient::frameType const):
(WebCore::ServiceWorkerClient::id const):
(WebCore::ServiceWorkerClient::postMessage):

  • workers/service/ServiceWorkerClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • workers/service/ServiceWorkerClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • workers/service/ServiceWorkerClients.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.

(WebCore::ServiceWorkerClients::ServiceWorkerClients):
(WebCore::ServiceWorkerClients::activeDOMObjectName const):
(WebCore::ServiceWorkerClients::canSuspendForDocumentSuspension const):
(WebCore::ServiceWorkerClients::get):
(WebCore::ServiceWorkerClients::matchAll):
(WebCore::ServiceWorkerClients::openWindow):
(WebCore::ServiceWorkerClients::claim):

  • workers/service/ServiceWorkerClients.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.

(WebCore::ServiceWorkerClients::create):

  • workers/service/ServiceWorkerClients.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • workers/service/ServiceWorkerGlobalScope.cpp:

(WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):

  • workers/service/ServiceWorkerGlobalScope.h:

(WebCore::ServiceWorkerGlobalScope::clients):

  • workers/service/ServiceWorkerGlobalScope.idl:
  • workers/service/ServiceWorkerWindowClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

(WebCore::ServiceWorkerWindowClient::ServiceWorkerWindowClient):
(WebCore::ServiceWorkerWindowClient::visibilityState const):
(WebCore::ServiceWorkerWindowClient::isFocused const):
(WebCore::ServiceWorkerWindowClient::focus):
(WebCore::ServiceWorkerWindowClient::navigate):

  • workers/service/ServiceWorkerWindowClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
  • workers/service/ServiceWorkerWindowClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.

Source/WebKit:

Rename PageVisibilityState to VisibilityState.

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toVisibilityState):

  • WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

Rename PageVisiblityState to VisibilityState.

  • WebView/WebView.mm:

(kit):

3:27 PM Changeset in webkit [223633] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value on reentrancy
https://bugs.webkit.org/show_bug.cgi?id=178479
<rdar://problem/35056950>

Reviewed by Simon Fraser.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

3:01 PM Changeset in webkit [223632] by dino@apple.com
  • 4 edits
    1 add in trunk/LayoutTests

Make failing WebGL tests produce debug output
https://bugs.webkit.org/show_bug.cgi?id=178421

Reviewed by Jon Lee.

If a WebGL conformance test fails, we just get the word "FAIL". Instead,
have it log the actual output of the test, so we can see what happens
on bots.

Drive-by fix where I noticed a test file was missing, that causes
two tests to timeout. They may still timeout, but now because they
take a long time to run rather than they have a JS error.

  • platform/mac/TestExpectations:
  • webgl/1.0.2/resources/webgl_test_files/conformance/resources/iterable-test.js: Added.
  • webgl/1.0.2/resources/webkit-webgl-test-harness.js:

(window.webglTestHarness.notifyFinished):

  • webgl/resources/webkit-webgl-test-harness.js:

(window.webglTestHarness.notifyFinished):

2:54 PM Changeset in webkit [223631] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Remove InPreLayoutStyleUpdate.
https://bugs.webkit.org/show_bug.cgi?id=178483
<rdar://problem/35058800>

Reviewed by Simon Fraser.

Its client, updateCompositingLayersAfterStyleChange only needs to know if there's a upcoming
layer update (part of FrameView::layout()).

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::updateCompositingLayersAfterStyleChange):
(WebCore::FrameView::layout):

  • page/FrameView.h:
2:52 PM Changeset in webkit [223630] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

webkitpy tests should have --json-output option
https://bugs.webkit.org/show_bug.cgi?id=178481

Reviewed by Alexey Proskuryakov.

  • Scripts/webkitpy/test/main.py:

(Tester._parse_args): Added json-output argument.
(Tester._run_tests): Write output to json file.

2:37 PM Changeset in webkit [223629] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface
https://bugs.webkit.org/show_bug.cgi?id=178482

Reviewed by Sam Weinig.

Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface,
not the ServiceWorker interface.

  • bindings/scripts/preprocess-idls.pl:
2:34 PM Changeset in webkit [223628] by rniwa@webkit.org
  • 92 edits in trunk/Source/WebCore

Add an argument indicating the type of insertion to Node::insertedInto
https://bugs.webkit.org/show_bug.cgi?id=178431

Reviewed by Antti Koivisto.

Added InsertionType as the first argument to Node::insertedInto, which contains two booleans indicating
whether the node just become newly connected to a document, and whether node's tree scope had changed or not.

These boolean flags simplifie the logic in insertedInto implementations, and are required to have a better
guarantee about the correctness of node flags during calls to insertedInto. Right now, isConnected() and
isInShadowTree() are both outdated until Node::insertedInto is called.

Also renamed the second argument from insertionPoint to parentOfInsertedTree to make the semantics clear,
and renamed finishedInsertingSubtree to didFinishInsertingNode, and renamed InsertionNotificationRequest
to InsertedIntoResult using enum class.

Note that in some implementations of insertedInto, we check whether isConnected() was false to decide whether
the node is newly connected to a document. This extra check is no longer necessary since no node will be inserted
into a document without first being completely removed after r223458.

No new tests since there should be no behavioral changes.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::notifyChildInserted):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument): Replaced the check that the node had not been disconnected by scripts
by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
(WebCore::notifyNodeInsertedIntoTree): Removed NoEventDispatchAssertion since notifyChildNodeInserted has it
already since r223458.
(WebCore::notifyChildNodeInserted): Made this function return NodeVector (copy elision).

  • dom/ContainerNodeAlgorithms.h:
  • dom/Element.cpp:

(WebCore::Element::insertedInto): Use insertionType.connectedToDocument to detect when this element had become
connected to some document. Similarly, use insertionType.treeScopeChanged to detect when this element had been
inserted into a new tree scope. Removed the comment which became obsolete due to this cleanup.
(WebCore::Element::addShadowRoot): Simplified the code here since we never attach a ShadowRoot with children.

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::insertedInto):

  • dom/Node.h:

(WebCore::Node::InsertedIntoResult): Renamed from InsertionNotificationRequest, and turned into an enum class.
(WebCore::Node::InsertionType): Added. We pass this object by value to insertedInto as a performance optimization
as passing two booleans by value is faster than passing a pointer and then de-referencing it in a virtual callee.
(WebCore::Node::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • dom/ProcessingInstruction.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::shouldCallFinishedInsertingSubtree): Deleted.
(WebCore::ScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • dom/ScriptElement.h:

(WebCore::ScriptElement::insertedInto const): Added. Extracted from shouldCallFinishedInsertingSubtree.

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::insertedInto): The extra isConnected() check is no longer needed. See the description above.

  • dom/ShadowRoot.h:
  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::insertedInto):

  • html/FormAssociatedElement.h:
  • html/HTMLBaseElement.cpp:

(WebCore::HTMLBaseElement::insertedInto):

  • html/HTMLBaseElement.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLBodyElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::insertedInto):
(WebCore::HTMLFormControlElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLFormControlElement.h:
  • html/HTMLFormControlElementWithState.cpp:

(WebCore::HTMLFormControlElementWithState::insertedInto):

  • html/HTMLFormControlElementWithState.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::insertedInto):

  • html/HTMLFormElement.h:
  • html/HTMLFrameElementBase.cpp:

(WebCore::HTMLFrameElementBase::insertedInto):
(WebCore::HTMLFrameElementBase::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLFrameElementBase.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::insertedInto):

  • html/HTMLFrameSetElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::insertedInto):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::insertedInto):
(WebCore::HTMLInputElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLInputElement.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::insertedInto): The extra isConnected() check is no longer needed. See above.
(WebCore::HTMLLinkElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLLinkElement.h:
  • html/HTMLMapElement.cpp:

(WebCore::HTMLMapElement::insertedInto):

  • html/HTMLMapElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::insertedInto):
(WebCore::HTMLMediaElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLMediaElement.h:
  • html/HTMLMetaElement.cpp:

(WebCore::HTMLMetaElement::insertedInto):

  • html/HTMLMetaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::insertedInto):
(WebCore::HTMLObjectElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLObjectElement.h:
  • html/HTMLOptionElement.cpp:

(WebCore::HTMLOptionElement::insertedInto):

  • html/HTMLOptionElement.h:
  • html/HTMLScriptElement.cpp:

(WebCore::HTMLScriptElement::insertedInto):
(WebCore::HTMLScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • html/HTMLScriptElement.h:
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::insertedInto):

  • html/HTMLSelectElement.h:
  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::insertedInto): Replaced a cumbersome condition by a boolean check on insertionType's
treeScopeChanged and removed the accompanying comment which is no longer needed.

  • html/HTMLSlotElement.h:
  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::insertedInto):

  • html/HTMLSourceElement.h:
  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above.

  • html/HTMLStyleElement.h:
  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::insertedInto):

  • html/HTMLTextFormControlElement.h:
  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::insertedInto):

  • html/HTMLTitleElement.h:
  • html/HTMLTrackElement.cpp:

(WebCore::HTMLTrackElement::insertedInto): Added a FIXME since this code is clearly wrong.

  • html/HTMLTrackElement.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::insertedInto):

  • svg/SVGElement.h:
  • svg/SVGFEImageElement.cpp:

(WebCore::SVGFEImageElement::insertedInto):
(WebCore::SVGFEImageElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/SVGFEImageElement.h:
  • svg/SVGFontFaceElement.cpp:

(WebCore::SVGFontFaceElement::insertedInto):

  • svg/SVGFontFaceElement.h:
  • svg/SVGFontFaceUriElement.cpp:

(WebCore::SVGFontFaceUriElement::insertedInto):

  • svg/SVGFontFaceUriElement.h:
  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::insertedInto):

  • svg/SVGImageElement.h:
  • svg/SVGMPathElement.cpp:

(WebCore::SVGMPathElement::insertedInto):
(WebCore::SVGMPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/SVGMPathElement.h:
  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::insertedInto):

  • svg/SVGPathElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::insertedInto):

  • svg/SVGSVGElement.h:
  • svg/SVGScriptElement.cpp:

(WebCore::SVGScriptElement::insertedInto):
(WebCore::SVGScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/SVGScriptElement.h:
  • svg/SVGStyleElement.cpp:

(WebCore::SVGStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above description.

  • svg/SVGStyleElement.h:
  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefElement::insertedInto):
(WebCore::SVGTRefElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/SVGTRefElement.h:
  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::insertedInto):
(WebCore::SVGTextPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/SVGTextPathElement.h:
  • svg/SVGTitleElement.cpp:

(WebCore::SVGTitleElement::insertedInto):

  • svg/SVGTitleElement.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::insertedInto):

  • svg/SVGUseElement.h:
  • svg/animation/SVGSMILElement.cpp:

(WebCore::SVGSMILElement::insertedInto):
(WebCore::SVGSMILElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.

  • svg/animation/SVGSMILElement.h:
1:29 PM Changeset in webkit [223627] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 42

Added a tag for Safari Technology Preview release 42.

1:26 PM Changeset in webkit [223626] by eric.carlson@apple.com
  • 5 edits in trunk

Key events should not update Document.lastHandledUserGestureTimestamp unless key event is handled
https://bugs.webkit.org/show_bug.cgi?id=178473
<rdar://problem/34869935>

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests, updated media/restricted-audio-playback-with-document-gesture.html for this change.

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent): Restore the current Document's "lastHandledUserGestureTimestamp"
if the key event was not handled.

LayoutTests:

  • media/restricted-audio-playback-with-document-gesture.html: Pass true to runWithKeyDown so

it consumes the keydown event.

  • media/video-test.js:

(runWithKeyDown): Take optional parameter which causes event handler to call preventDefault.

1:20 PM Changeset in webkit [223625] by Wenson Hsieh
  • 7 edits
    1 add in trunk

Unreviewed, rolling out r223291.

Source/WebCore:

After further investigation, this removed codepath is
something Mail may want to re-adopt. Additionally, the
original breaking change was rolled out in r223408, so
this test once again passes on ToT.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

Source/WebKitLegacy/mac:

See WebCore ChangeLog for more detail.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

Tools:

See WebCore ChangeLog for more detail.

Reverted changeset:

"Remove Editor::simplifyMarkup"
https://bugs.webkit.org/show_bug.cgi?id=178271
https://trac.webkit.org/changeset/223291

1:18 PM Changeset in webkit [223624] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Settings] Move remaining simple settings to Settings.in
https://bugs.webkit.org/show_bug.cgi?id=177730
<rdar://problem/34763346>

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Daniel Bates.

  • Scripts/GenerateSettings/Settings.py:

(Setting.init):
(Setting.str):
(Setting.getterFunctionName):
(parseInput):

Add support for parsing the 'getter' option.

  • page/Settings.in:

Migrate simple settings from SettingsBase to here.

  • page/SettingsBase.cpp:

(WebCore::SettingsBase::SettingsBase):
(WebCore::SettingsBase::setJavaEnabled): Deleted.
(WebCore::SettingsBase::setJavaEnabledForLocalFiles): Deleted.
(WebCore::SettingsBase::setPreferMIMETypeForImages): Deleted.
(WebCore::SettingsBase::setForcePendingWebGLPolicy): Deleted.
(WebCore::SettingsBase::setNeedsAdobeFrameReloadingQuirk): Deleted.
(WebCore::SettingsBase::setFontRenderingMode): Deleted.
(WebCore::SettingsBase::fontRenderingMode const): Deleted.
(WebCore::SettingsBase::setShowTiledScrollingIndicator): Deleted.
(WebCore::SettingsBase::setFontFallbackPrefersPictographs): Deleted.

  • page/SettingsBase.h:

(WebCore::SettingsBase::isJavaEnabled const): Deleted.
(WebCore::SettingsBase::isJavaEnabledForLocalFiles const): Deleted.
(WebCore::SettingsBase::preferMIMETypeForImages const): Deleted.
(WebCore::SettingsBase::needsAcrobatFrameReloadingQuirk const): Deleted.
(WebCore::SettingsBase::showTiledScrollingIndicator const): Deleted.
(WebCore::SettingsBase::setTouchEventEmulationEnabled): Deleted.
(WebCore::SettingsBase::isTouchEventEmulationEnabled const): Deleted.
(WebCore::SettingsBase::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
(WebCore::SettingsBase::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
(WebCore::SettingsBase::fontFallbackPrefersPictographs const): Deleted.
(WebCore::SettingsBase::setMediaKeysStorageDirectory): Deleted.
(WebCore::SettingsBase::mediaKeysStorageDirectory const): Deleted.
(WebCore::SettingsBase::setMediaDeviceIdentifierStorageDirectory): Deleted.
(WebCore::SettingsBase::mediaDeviceIdentifierStorageDirectory const): Deleted.
(WebCore::SettingsBase::applePayEnabled const): Deleted.
(WebCore::SettingsBase::setApplePayEnabled): Deleted.
(WebCore::SettingsBase::applePayCapabilityDisclosureAllowed const): Deleted.
(WebCore::SettingsBase::setApplePayCapabilityDisclosureAllowed): Deleted.
(WebCore::SettingsBase::isForcePendingWebGLPolicy const): Deleted.

Remove simple settings.

12:30 PM Changeset in webkit [223623] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

editing/deleting/delete-emoji-9.html is failing consistently.
https://bugs.webkit.org/show_bug.cgi?id=178478

Unreviewed.

  • platform/mac/editing/deleting/delete-emoji-9-expected.txt:
12:19 PM Changeset in webkit [223622] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move root/body marking dirty logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178477
<rdar://problem/35056478>

Reviewed by Simon Fraser.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::markRootOrBodyRendererDirty const):
(WebCore::FrameView::layout):

  • page/FrameView.h:
12:14 PM Changeset in webkit [223621] by keith_miller@apple.com
  • 18 edits
    5 adds
    1 delete in trunk

Setup WebCore build to start using unified sources.
https://bugs.webkit.org/show_bug.cgi?id=178362

Reviewed by Tim Horton.

.:

Pass features to the unified source bundler script.

  • Source/cmake/WebKitCommon.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

Change comments in source list files. Also, pass explicit names for build files.

  • CMakeLists.txt:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • Sources.txt:
  • SourcesGTK.txt:
  • SourcesMac.txt:

Source/WebCore:

This patch adds all the long tooling needed to start adding
unified sources to WebCore. Most of the source list files
are empty to start but will be filled over the next few days.

I started by moving all the non-derived bindings code to
unified sources to make sure everything worked correctly.

  • CMakeLists.txt:
  • Configurations/GenerateUnifiedSources.xcconfig: Added.
  • Configurations/WebCore.xcconfig:
  • PlatformMac.cmake:
  • Sources.txt: Added.
  • SourcesCocoa.txt: Added.
  • SourcesIOS.txt: Added.
  • SourcesMac.txt: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this...

Source/WTF:

There are a number of changes to the bundler script. First, it is
now possible to enable or disable building files based on if the
associated feature flag is enabled or not. The syntax for this is
similar to how we do #ifs in C++ code. e.g.

#if ENABLE_APPLE_PAY

myApplePayFile.cpp

#endif

would enable myApplePayFile.cpp if and only if the APPLE_PAY
feature define is set.

I also changed comments from # to to make it less likely they
would be confused with a #if.

Finally, this patch enables bundling files in the same relative
directory across source list files. Previously, if
SourcesCocoa.txt had platform/cf/foo.cpp and SourcesMac.txt had
platform/cf/bar.cpp those files would not be put in the same
unified source bundle. Now, those files will be put into the same
bundle but bar.cpp will always follow foo.cpp. The idea is that by
putting more specific files after more general files we can avoid
random build failures.

  • Scripts/generate-unified-source-bundles.rb:
11:42 AM Changeset in webkit [223620] by jmarcell@apple.com
  • 7 edits in branches/safari-604.3.5.1-branch/Source

Versioning.

11:39 AM Changeset in webkit [223619] by commit-queue@webkit.org
  • 1 edit
    1 add in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add Layers.svg
https://bugs.webkit.org/show_bug.cgi?id=178430

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-18
Reviewed by Michael Catanzaro.

  • UserInterface/Images/gtk/Layers.svg: Added.
11:28 AM Changeset in webkit [223618] by commit-queue@webkit.org
  • 16 edits
    2 deletes in trunk

Unreviewed, rolling out r223321.
https://bugs.webkit.org/show_bug.cgi?id=178476

This protocol change broke some internal builds (Requested by
brrian on #webkit).

Reverted changeset:

"Web Inspector: provide a way to enable/disable event
listeners"
https://bugs.webkit.org/show_bug.cgi?id=177451
https://trac.webkit.org/changeset/223321

11:23 AM Changeset in webkit [223617] by aestes@apple.com
  • 27 edits in trunk/Source/WTF/wtf

Roll out r223316.

11:21 AM Changeset in webkit [223616] by wilander@apple.com
  • 2 edits in trunk/Source/WebKit

Check notifyPagesWhenTelemetryWasCaptured before notifying pages if there is no WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=178470
<rdar://problem/34417518>

Reviewed by Brian Burg.

  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

Add a missing check of notifyPagesWhenTelemetryWasCaptured.
The page notification is only for testing purposes.

10:56 AM Changeset in webkit [223615] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.3.5.1.1

Tag Safari-604.3.5.1.1.

10:41 AM Changeset in webkit [223614] by mark.lam@apple.com
  • 11 edits
    1 add in trunk

The compiler should always register a structure when it adds its transitionWatchPointSet.
https://bugs.webkit.org/show_bug.cgi?id=178420
<rdar://problem/34814024>

Reviewed by Saam Barati and Filip Pizlo.

JSTests:

  • stress/regress-178420.js: Added.

(new.Array.10000.map):

Source/JavaScriptCore:

Instead of invoking addLazily() to add a structure's transitionWatchpointSet, we
now invoke Graph::registerAndWatchStructureTransition() on the structure.
registerAndWatchStructureTransition() both registers the structure and add its
transitionWatchpointSet to the plan desired watchpoints.

Graph::registerAndWatchStructureTransition() is based on Graph::registerStructure()
except registerAndWatchStructureTransition() adds the structure's
transitionWatchpointSet unconditionally.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::refine const):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::registerAndWatchStructureTransition):

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

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

  • The second set of addLazily()s is redundant. This set is executed only when prototypeChainIsSane is true, and prototypeChainIsSane can only be true if and only if we've executed the if statement above it. That preceding if statement already registerAndWatchStructureTransition() the same 2 structures. Hence, this second set can be deleted.
  • dfg/DFGWatchpointCollectionPhase.cpp:

(JSC::DFG::WatchpointCollectionPhase::addLazily):

  • Deleted an unused function.
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):

10:16 AM Changeset in webkit [223613] by achristensen@apple.com
  • 4 edits in trunk/LayoutTests

http/tests/loading/basic-auth-resend-wrong-credentials.html is still a flaky failure after proposed fix.
https://bugs.webkit.org/show_bug.cgi?id=178467

Reviewed by Andy Estes.

  • http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
  • http/tests/loading/basic-auth-resend-wrong-credentials.html:
  • platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:

Use setTimeout to make the loading order deterministic.
The important part of this test is that the passwords shown in the delegate callbacks are correct,
and this doesn't change that.

10:10 AM Changeset in webkit [223612] by commit-queue@webkit.org
  • 13 edits
    1 delete in trunk/Source/WebCore

[Settings] Miscellaneous cleanup of the settings generation scripts
https://bugs.webkit.org/show_bug.cgi?id=178462

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Daniel Bates.

  • Stop generating and remove now unused SettingsMacros.h
  • Make functions operating on the python Setting object member functions
  • Add predicate to determine if a Setting's type is a value type, allowing us to exclude those from using const references.
  • CMakeLists.txt:
  • DerivedSources.make:
  • Scripts/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py:
  • Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py:
  • Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
  • Scripts/GenerateSettings/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
  • Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
  • Scripts/GenerateSettings/Settings.py:
  • WebCoreMacros.cmake:
  • WebCore.xcodeproj/project.pbxproj:
9:59 AM Changeset in webkit [223611] by Chris Dumez
  • 8 edits in trunk

Align ImageData constructor with the specification
https://bugs.webkit.org/show_bug.cgi?id=178406

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Rebaseline test now that one more check is passing.

  • web-platform-tests/html/semantics/embedded-content/the-canvas-element/imagedata-expected.txt:

Source/WebCore:

Align ImageData constructor with the specification:

It sometimes throws the wrong exception.

No new tests, rebaselined existing test.

  • html/ImageData.cpp:

(WebCore::ImageData::create):

  • html/ImageData.h:
  • html/ImageData.idl:
9:54 AM Changeset in webkit [223610] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix build error after r223608 with some SDKs.

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::ensureSWOriginStoreForSession):

9:20 AM Changeset in webkit [223609] by Ms2ger@igalia.com
  • 2 edits in trunk/LayoutTests

[GTK] Test gardening.
https://bugs.webkit.org/show_bug.cgi?id=178461

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
9:12 AM Changeset in webkit [223608] by Chris Dumez
  • 38 edits
    4 copies in trunk

Add an efficient data structure for WebCore to query if there is a Service Worker registered for a given origin
https://bugs.webkit.org/show_bug.cgi?id=177876
<rdar://problem/34813129>

Reviewed by Ryosuke Niwa.

Source/WebCore:

No new tests, updatdd existing test.

  • dom/Document.h:
  • testing/Internals.cpp:

(WebCore::Internals::hasServiceWorkerRegisteredForOrigin):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/ServiceWorkerProvider.h:
  • workers/service/context/SWContextManager.cpp:

(WebCore::SWContextManager::startServiceWorkerContext):

  • workers/service/server/SWClientConnection.h:
  • workers/service/server/SWServer.cpp:

(WebCore::SWServer::Connection::scriptContextStarted):
(WebCore::SWServer::scriptContextStarted):

  • workers/service/server/SWServer.h:
  • workers/service/server/SWServerRegistration.cpp:

(WebCore::SWServerRegistration::scriptContextFailedToStart):
(WebCore::SWServerRegistration::scriptContextStarted):

  • workers/service/server/SWServerRegistration.h:

Source/WebKit:

Introduce a Service Worker origin store which gets populated / updated on the StorageProcess side
and queried on the WebContent process side via the WebSWOriginTable so that the WebProcess can
efficiently check if there is a ServiceWorker registered for a given origin without actually doing
an IPC to the StorageProcess.

For efficiency, the hash table is backed by SharedMemory so we only pass shared memory handles
between the StorageProcess and the WebProcesses.

We currently add entries to the WebSWOriginStore whenever a service worker registration succeeds
on the StorageProcess side. We also clear this store whenever the API to clear service worker
registrations is called. Code to query the WebSWOriginTable from the WebContent process side is
there but currently only used by Internals for testing. We will later leverage this code when
integrating with Fetch API.

  • CMakeLists.txt:
  • Shared/SharedStringHashStore.h:

(WebKit::SharedStringHashStore::Client::didUpdateSharedStringHashes):

  • Shared/SharedStringHashTable.cpp:

(WebKit::SharedStringHashTable::clear):

  • StorageProcess/ServiceWorker/WebSWOriginStore.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp.

(WebKit::WebSWOriginStore::WebSWOriginStore):
(WebKit::WebSWOriginStore::add):
(WebKit::WebSWOriginStore::remove):
(WebKit::WebSWOriginStore::clear):
(WebKit::WebSWOriginStore::registerSWServerConnection):
(WebKit::WebSWOriginStore::unregisterSWServerConnection):
(WebKit::WebSWOriginStore::sendStoreHandle):
(WebKit::WebSWOriginStore::didInvalidateSharedMemory):

  • StorageProcess/ServiceWorker/WebSWOriginStore.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
  • StorageProcess/ServiceWorker/WebSWServerConnection.cpp:

(WebKit::WebSWServerConnection::WebSWServerConnection):
(WebKit::WebSWServerConnection::resolveJobInClient):

  • StorageProcess/ServiceWorker/WebSWServerConnection.h:

(WebKit::WebSWServerConnection::sessionID const):

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::deleteWebsiteData):
(WebKit::StorageProcess::deleteWebsiteDataForOrigins):
(WebKit::StorageProcess::ensureSWOriginStoreForSession):
(WebKit::StorageProcess::swOriginStoreForSession const):
(WebKit::StorageProcess::serviceWorkerContextStarted):
(WebKit::StorageProcess::registerSWServerConnection):
(WebKit::StorageProcess::unregisterSWServerConnection):

  • StorageProcess/StorageProcess.h:
  • StorageProcess/StorageProcess.messages.in:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/Storage/WebSWClientConnection.cpp:

(WebKit::WebSWClientConnection::WebSWClientConnection):
(WebKit::WebSWClientConnection::hasServiceWorkerRegisteredForOrigin const):
(WebKit::WebSWClientConnection::setSWOriginTableSharedMemory):

  • WebProcess/Storage/WebSWClientConnection.h:
  • WebProcess/Storage/WebSWClientConnection.messages.in:
  • WebProcess/Storage/WebSWOriginTable.cpp: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.

(WebKit::WebSWOriginTable::contains const):
(WebKit::WebSWOriginTable::setSharedMemory):

  • WebProcess/Storage/WebSWOriginTable.h: Copied from Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.h.
  • WebProcess/Storage/WebServiceWorkerProvider.cpp:

(WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):

  • WebProcess/Storage/WebServiceWorkerProvider.h:
  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::serviceWorkerConnectionForSession):

  • WebProcess/Storage/WebToStorageProcessConnection.h:
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::startServiceWorkerContext):

Tools:

Clear service worker registrations between test runs to avoid flakiness.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Add layout test coverage. Also rebaseline a few tests now that registration succeeds.

  • http/tests/workers/service/basic-register-exceptions-expected.txt:
  • http/tests/workers/service/basic-register-expected.txt:
  • http/tests/workers/service/registration-task-queue-scheduling-1-expected.txt:
  • http/tests/workers/service/resources/basic-register.js:
  • http/tests/workers/service/resources/registration-task-queue-scheduling-1.js:
8:16 AM Changeset in webkit [223607] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Settings] Replace macros in Settings.h/cpp with generated code
https://bugs.webkit.org/show_bug.cgi?id=178419

Patch by Sam Weinig <sam@webkit.org> on 2017-10-18
Reviewed by Antti Koivisto.

  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:

Rather than use macros in the generated Settings class, generate the code the macros
would expand to.

7:57 AM Changeset in webkit [223606] by Konstantin Tokarev
  • 2 edits in trunk/Source/WTF

REGRESSION(r217771): nullTerminatedWCharToString loses last character of input string
https://bugs.webkit.org/show_bug.cgi?id=178444

Reviewed by Per Arne Vollan.

  • wtf/text/win/WCharStringExtras.h:

(WTF::nullTerminatedWCharToString):

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

[FrameView::layout cleanup] Move frame flattening layout logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178425
<rdar://problem/35045836>

Reviewed by Antti Koivisto.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
(WebCore::FrameView::layout):
(WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):

  • page/FrameView.h:
6:41 AM Changeset in webkit [223604] by Antti Koivisto
  • 12 edits
    2 adds in trunk

Resolve ::before and ::after pseudo elements during style resolution
https://bugs.webkit.org/show_bug.cgi?id=178339
Source/WebCore:

Reviewed by Ryosuke Niwa.

They are currently resolved during render tree building which creates problems with display:contents and animations.

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::PseudoElement):

Call InspectorInstrumentation from constructor.

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::pushParent):

Push the full update to the parent stack.

(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):

  • style/RenderTreeUpdater.h:
  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

No need to resolve pseudo style, we have it already.

(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
(WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.

  • style/RenderTreeUpdaterGeneratedContent.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):

Resolve pseudos.

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

Make a private member function.

(WebCore::Style::TreeResolver::resolveComposedTree):

  • style/StyleTreeResolver.h:
  • style/StyleUpdate.cpp:

(WebCore::Style::Update::elementUpdates const):
(WebCore::Style::Update::elementUpdates):

Bundle the style update for an element and the associated before/after pseudos.

(WebCore::Style::Update::elementStyle const):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::elementUpdate const): Deleted.
(WebCore::Style::Update::elementUpdate): Deleted.

  • style/StyleUpdate.h:

LayoutTests:

<rdar://problem/35025601>

Reviewed by Ryosuke Niwa.

Add a test verifying a crash noticed with earlier version of this patch.

  • fast/css-generated-content/svg-use-crash-expected.html: Added.
  • fast/css-generated-content/svg-use-crash.html: Added.
5:53 AM Changeset in webkit [223603] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Remove unused private name structure
https://bugs.webkit.org/show_bug.cgi?id=178436

Reviewed by Sam Weinig.

It is no longer used. This patch just removes it.

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::numberObjectStructure const):
(JSC::JSGlobalObject::privateNameStructure const): Deleted.

5:47 AM Changeset in webkit [223602] by Ms2ger@igalia.com
  • 4 edits in trunk/Source/WebCore

Update the signatures of texSubImage3D.
https://bugs.webkit.org/show_bug.cgi?id=178435

Reviewed by Sam Weinig.

Update the signatures of texSubImage3D.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
5:04 AM Changeset in webkit [223601] by zandobersek@gmail.com
  • 5 edits
    5 deletes in trunk

Remove remnants of OpenWebRTC
https://bugs.webkit.org/show_bug.cgi?id=178437

Reviewed by Alejandro G. Castro.

.:

Remove the FindOpenWebRTC.cmake file and the searches for it in both
OptionsGTK and OptionsWPE.

  • Source/cmake/FindOpenWebRTC.cmake: Removed.
  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Tools:

Drop OpenWebRTC packages from the GTK's Jhbuild modules file. Relevant
patches are also removed.

  • gtk/jhbuild.modules:
  • gtk/patches/libnice-0001-TURN-allow-REALM-to-be-empty.patch: Removed.
  • gtk/patches/libnice-0001-nicesrc-spin-the-agent-mainloop-in-a-separate-thread.patch: Removed.
  • gtk/patches/rtspsrc-timeout-on-udpsrc-is-in-nanoseconds.patch: Removed.
  • gtk/patches/udpsrc-improve-timeouts.patch: Removed.
4:05 AM Changeset in webkit [223600] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
https://bugs.webkit.org/show_bug.cgi?id=175106

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-18
Reviewed by Yusuke Suzuki.

No new tests because there is no behavior change.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::familyNameFromPrimitive): Call get() method of LazyNeverDestroyed.

  • dom/make_names.pl: Use LazyNeverDestroyed for font names.
3:58 AM Changeset in webkit [223599] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.18.1

WebKitGTK+ 2.18.1

3:53 AM Changeset in webkit [223598] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.18.1 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit:

  • gtk/NEWS: Add release notes for 2.18.1.
2:55 AM Changeset in webkit [223597] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

[GTK][Stable] BackingStoreBackendCairoImpl.h:23:10: fatal error: WebCore/HysteresisActivity.h
https://bugs.webkit.org/show_bug.cgi?id=178407

Reviewed by Žan Doberšek.

Do not use #include <WebCore/Foo.h> inside WebCore.

  • platform/graphics/cairo/BackingStoreBackendCairoImpl.h:
1:30 AM Changeset in webkit [223596] by zandobersek@gmail.com
  • 11 edits in trunk/Source/WebCore

[MSE] Move SourceBuffer's pending append data into the platform implementations
https://bugs.webkit.org/show_bug.cgi?id=178003

Reviewed by Jer Noble.

In SourceBuffer::appendBufferTimerFired(), we can use move semantics to
pass the pending append data into the platform layer, where it can then
be used more efficiently.

Resources in the m_pendingAppendData member are moved into the append()
call on the SourceBufferPrivate object. The m_pendingAppendData is still
cleared out manually in case the underlying implementation doesn't clear
it out through a move operation. The SourceBufferPrivate interface is
updated to accept a Vector rvalue reference as the only parameter of the
append() method.

For the GStreamer implementation, signature of the append() method in
MediaSourceClientGStreamerMSE class is also updated. The implementation
now moves the Vector resources over to a on-heap Vector object that is
then wrapped into a GstBuffer object by using the
gst_buffer_new_wrapped_full() API and specifying the custom deleter.

The AVFoundation implementation of SourceBufferPrivate is only updated
to reflect the changes in the interface. The Vector data that is passed
in is still copied into the NSData allocation.

MockSourceBufferPrivate is also updated, with the append data still
being copied into the m_inputBuffer Vector.

No new tests -- no change in behavior.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::appendBufferTimerFired):

  • platform/graphics/SourceBufferPrivate.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(WebCore::SourceBufferPrivateAVFObjC::append):

  • platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:

(WebCore::MediaSourceClientGStreamerMSE::append):

  • platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
  • platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:

(WebCore::SourceBufferPrivateGStreamer::append):

  • platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
  • platform/mock/mediasource/MockSourceBufferPrivate.cpp:

(WebCore::MockSourceBufferPrivate::append):

  • platform/mock/mediasource/MockSourceBufferPrivate.h:
1:12 AM Changeset in webkit [223595] by rniwa@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix macOS and iOS builds after r223594.

12:12 AM Changeset in webkit [223594] by Yusuke Suzuki
  • 37 edits
    13 adds in trunk

[JSC] proto getter should be fast
https://bugs.webkit.org/show_bug.cgi?id=178067

Reviewed by Saam Barati.

JSTests:

  • stress/dfg-object-proto-accessor.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-object-proto-getter.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-object-prototype-of.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-reflect-get-prototype-of.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/intrinsic-getter-with-poly-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-get-prototype-of-filtered.js: Added.

(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):

  • stress/object-get-prototype-of-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-get-prototype-of-poly-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-get-prototype-of-poly-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-proto-getter-filtered.js: Added.

(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):

  • stress/object-proto-getter-poly-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-proto-getter-poly-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js:
  • stress/string-proto.js: Added.

(shouldBe):
(target):

Source/JavaScriptCore:

In our ES6 class implementation, we access proto field to retrieve super constructor.
Currently, it is handled as an usual getter call to a generic function. And DFG just emits
Call node for this. It is inefficient since typically we know the prototype of the given
object when accessing object.__proto__ since we emit CheckStructure for this object.
If Structure has mono proto, we can immediately fold it to constant value. If it is poly proto,
we can still change this to efficient access to poly proto slot.

This patch implements GetPrototypeOf DFG node. This node efficiently accesses to prototype of
the given object. And in AI and ByteCodeParser phase, we attempt to fold it to constant.
ByteCodeParser's folding is a bit important since we have callee.__proto__ code to get super
constructor. If we can change this to constant, we can reify CallLinkInfo with this constant.
This paves the way to optimizing ArrayConstructor super calls[1], which is particularly important
for ARES-6 ML.

And we also optimize Reflect.getPrototypeOf and Object.getPrototypeOf with this GetPrototypeOf node.

Currently, proto access for poly proto object is not handled well in IC. But we add code handling
poly proto in GetPrototypeOf since Reflect.getPrototypeOf and Object.getPrototypeOf can use it.
Once IC starts handling poly proto & intrinsic getter well, this code will be used for that too.

This patch improves SixSpeed super.es6 by 3.42x.

baseline patched

super.es6 123.6666+-3.9917 36.1684+-1.0351 definitely 3.4192x faster

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

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleGetById):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::shouldSpeculateFunction):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateFunction):
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter):
(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • jit/JITOperations.h:
  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

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

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::booleanPrototype const):
(JSC::JSGlobalObject::numberPrototype const):
(JSC::JSGlobalObject::booleanObjectStructure const):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoGetter):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ObjectConstructor.cpp:
  • runtime/ReflectObject.cpp:

LayoutTests:

  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:

(set 2):
(get 1):

  • js/script-tests/sloppy-getter-setter-global-object.js:
  • js/sloppy-getter-setter-global-object-expected.txt:

Oct 17, 2017:

11:02 PM Changeset in webkit [223593] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r223313. rdar://problem/35042269

11:02 PM Changeset in webkit [223592] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r222417. rdar://problem/35010839

11:02 PM Changeset in webkit [223591] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/ThirdParty/libwebrtc

Cherry-pick r222531. rdar://problem/34985199

6:42 PM Changeset in webkit [223590] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Remove redundant body->renderer()->setChildNeedsLayout() call
https://bugs.webkit.org/show_bug.cgi?id=178414
<rdar://problem/35040876>

Reviewed by Simon Fraser.

Since m_size always equals to layoutSize() at this point, we never call setChildNeedsLayout() on the body's renderer.
However a few lines below, when we adjust the frame size and check if oldSize != m_size, we actually
dirty the body's renderer.

Covered by existing tests.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

5:34 PM Changeset in webkit [223589] by mmaxfield@apple.com
  • 3 edits
    4 adds in trunk

[Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=177345
<rdar://problem/32975942>

Reviewed by Jon Lee.

Source/WebCore:

This bug has a fairly insideous cause. In particular, the system font fallback path follows
system conventions, which are not the same as the CSS fallback path. For example, the Chinese
fallback of San Francisco weight 600 is Ping Fang weight 500. This doesn't match our
assumptions in CSS, because Ping Fang does have a 600 weight, which CSS would think is closer.
However, the whole point of system-ui is that it follows the system fallback path, not CSS's.
Therefore, falling back from a bold system-ui request to a non-bold fallback font is correct
and expected, and we shouldn't synthesize bold in this situation.

Test: fast/text/system-ui-chinese-bold-fallback.html

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationCoreText::fontRanges const):

LayoutTests:

  • fast/text/system-ui-chinese-bold-fallback.html:
5:06 PM Changeset in webkit [223588] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

5:05 PM Changeset in webkit [223587] by dino@apple.com
  • 2 edits in trunk/LayoutTests

webgl/1.0.2/conformance/canvas/drawingbuffer-static-canvas-test.html failing
https://bugs.webkit.org/show_bug.cgi?id=178417
<rdar://problem/35042291>

Skip this test while I work out what causes it to fail on older hardware.

4:49 PM Changeset in webkit [223586] by fpizlo@apple.com
  • 2 edits in trunk/Source/bmalloc

You can't vmDeallocate null
<rdar://problem/35038926>

Reviewed by Michael Saboff.

After failing allocation, we would try to deallocate the thing we failed to allocate. The fix is to
not try to deallocate something that is obviously null.

  • bmalloc/Gigacage.cpp:

(Gigacage::ensureGigacage):

4:38 PM Changeset in webkit [223585] by cpugh@apple.com
  • 2 edits in trunk/Source/WebCore

[iOS] Don't turn fields yellow after filling credentials
https://bugs.webkit.org/show_bug.cgi?id=178411

Reviewed by Wenson Hsieh.

  • editing/ios/AutofillElements.cpp:

(WebCore::AutofillElements::autofill): We don't want to turn fields yellow when filling the user name
and password. Remove the code that was causing that to happen.

4:34 PM Changeset in webkit [223584] by Ryan Haddad
  • 36 edits
    13 deletes in trunk

Unreviewed, rolling out r223523.

A test for this change is failing on debug JSC bots.

Reverted changeset:

"[JSC] proto getter should be fast"
https://bugs.webkit.org/show_bug.cgi?id=178067
https://trac.webkit.org/changeset/223523

4:10 PM Changeset in webkit [223583] by aestes@apple.com
  • 1 edit in trunk/Source/WebCore/Modules/applepay/cocoa/PaymentContactCocoa.mm

Fix the Sierra build after r223580.

  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):

4:03 PM Changeset in webkit [223582] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark fast/text/ellipsis-text-rtl.html as a failure on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178413

Unreviewed test gardening.

  • platform/win/TestExpectations:
2:51 PM Changeset in webkit [223581] by jmarcell@apple.com
  • 11 edits in tags/Safari-605.1.11/Source/WebCore

Cherry-pick r223579. rdar://problem/35032527

2:41 PM Changeset in webkit [223580] by aestes@apple.com
  • 12 edits in trunk

[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
https://bugs.webkit.org/show_bug.cgi?id=178191
<rdar://problem/34906367>

Reviewed by Tim Horton.

Source/WebCore:

Added test cases to http/tests/ssl/applepay/ApplePaySession.html.

  • Modules/applepay/ApplePayError.idl:
  • Modules/applepay/ApplePayPaymentContact.h:
  • Modules/applepay/ApplePayPaymentContact.idl:
  • Modules/applepay/ApplePaySessionPaymentRequest.h:
  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
(WebCore::convert):

Source/WebKit:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toNSError):

LayoutTests:

  • http/tests/ssl/applepay/ApplePayError-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
2:29 PM Changeset in webkit [223579] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

Unreviewed, rolling out r223500.
https://bugs.webkit.org/show_bug.cgi?id=178408

Introduced a crash in CSSAnimationController::updateAnimations
(Requested by rniwa on #webkit).

Reverted changeset:

"Resolve ::before and ::after pseudo elements during style
resolution"
https://bugs.webkit.org/show_bug.cgi?id=178339
https://trac.webkit.org/changeset/223500

2:21 PM Changeset in webkit [223578] by mmaxfield@apple.com
  • 7 edits
    48 adds in trunk

Delete button doesn't fully delete certain emoji
https://bugs.webkit.org/show_bug.cgi?id=178096
<rdar://problem/34785106>

Reviewed by Simon Fraser.

Source/WebCore:

System infrastructure for handling emoji changes every year. Instead of having
custom code to specifically walk over codepoints, we should delegate to the
system handling.

Tests: editing/deleting/delete-emoji.html

editing/deleting/delete-emoji-1.html
editing/deleting/delete-emoji-2.html
editing/deleting/delete-emoji-3.html
editing/deleting/delete-emoji-4.html
editing/deleting/delete-emoji-5.html
editing/deleting/delete-emoji-6.html
editing/deleting/delete-emoji-7.html
editing/deleting/delete-emoji-8.html
editing/deleting/delete-emoji-9.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::isHangulLVT): Deleted.
(WebCore::isMark): Deleted.
(WebCore::isRegionalIndicator): Deleted.
(WebCore::isInArmenianToLimbuRange): Deleted.

LayoutTests:

  • editing/deleting/delete-emoji-1.html: Added.
  • editing/deleting/delete-emoji-2.html: Added.
  • editing/deleting/delete-emoji-3.html: Added.
  • editing/deleting/delete-emoji-4.html: Added.
  • editing/deleting/delete-emoji-5.html: Added.
  • editing/deleting/delete-emoji-6.html: Added.
  • editing/deleting/delete-emoji-7.html: Added.
  • editing/deleting/delete-emoji-8.html: Added.
  • editing/deleting/delete-emoji-9.html: Added.
  • editing/deleting/delete-emoji.html:
  • platform/ios/editing/deleting/delete-emoji-1-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-2-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-3-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-4-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-5-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-6-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-7-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-8-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-9-expected.txt: Added.
  • platform/ios/editing/deleting/delete-emoji-expected.txt:
  • platform/mac-elcapitan/editing/deleting/delete-emoji-2-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-3-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-4-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-5-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-6-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-7-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-8-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-9-expected.txt: Added.
  • platform/mac-elcapitan/editing/deleting/delete-emoji-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-1-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-2-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-3-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-4-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-5-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-6-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-7-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-8-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-9-expected.txt: Added.
  • platform/mac-sierra/editing/deleting/delete-emoji-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-1-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-2-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-3-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-4-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-5-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-6-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-7-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-8-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-9-expected.txt: Added.
  • platform/mac/editing/deleting/delete-emoji-expected.txt:
  • platform/win/TestExpectations:
2:19 PM Changeset in webkit [223577] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Add preliminary support for fetch event
https://bugs.webkit.org/show_bug.cgi?id=178171

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17

  • workers/service/FetchEvent.cpp:

(WebCore::FetchEvent::promiseIsSettled): build fix by removing unnecessary captured this at the moment.

2:16 PM Changeset in webkit [223576] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Font Loading] Fonts are erroneously invisible when the policy says they should be visible
https://bugs.webkit.org/show_bug.cgi?id=178238

Reviewed by Simon Fraser.

When implementing font-display, I added testing infrastructure (so we don't have to wait for
3 second timeouts to occur). This testing infrastructure covered up a real bug where the wrong
font would be reported to CSSFontAccessor. This patch reverts the erroneous testing
infrastructure and replaces it with a real fix to the problem. The replacement fix is covered
by the same tests that I wrote when implementing the feature.

Covered by existing tests.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::pump):
(WebCore::visibility):
(WebCore::CSSFontFace::font):

1:55 PM Changeset in webkit [223575] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: [PARITY] Styles Redesign: Add color picker inline widget
https://bugs.webkit.org/show_bug.cgi?id=178354

Reviewed by Joseph Pecoraro.

Show color picker using the existing WI.InlineSwatch.

  • UserInterface/Models/Color.js:
  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment):
Syntax highlight comments in values.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._renderValue):
(WI.SpreadsheetStyleProperty.prototype._addColorTokens):
Find colors in CodeMirror tokens and replace them with color token elements.

1:45 PM Changeset in webkit [223574] by weinig@apple.com
  • 10 edits
    2 adds
    2 deletes in trunk/Source

[Settings] Generate Settings.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=178361

Reviewed by Dean Jackson.

Source/WebCore:

This change generates Settings.h and Settings.cpp exactly as they are,
using SettingsMacros.h and everything. In follow up changes, the use of
SettingsMacros.h will be removed.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Scripts/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:
  • page/Settings.cpp: Removed.
  • page/Settings.h: Removed.

Source/WebKit:

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:

Delete the old Settings.h from the forwarding
headers directory to allow the build to work.

1:35 PM Changeset in webkit [223573] by Ms2ger@igalia.com
  • 6 edits in trunk/Source/WebCore

Create bindings for WebGL2's versions of texSubImage2D.
https://bugs.webkit.org/show_bug.cgi?id=178382

Reviewed by Ryosuke Niwa.

Create bindings for WebGL2's versions of texSubImage2D.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texSubImage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
  • html/canvas/WebGLRenderingContext.idl:
  • html/canvas/WebGLRenderingContextBase.idl:
1:30 PM Changeset in webkit [223572] by Jonathan Bedard
  • 2 edits in trunk/Tools

webkitpy: Hang when workers write to the same stack trace file
https://bugs.webkit.org/show_bug.cgi?id=178402
<rdar://problem/35033432>

Reviewed by Aakash Jain.

Workers can hang if they all write to the same stack trace file when receiving
a SIGTERM. Attach the pid to the stack trace file name so that each worker
writes to a different file.

  • Scripts/webkitpy/common/interupt_debugging.py:

(log_stack_trace_on_term.handler): Name stack trace file path/<pid>-filename.
(log_stack_trace_on_cntrl_c.handler): Ditto.

1:24 PM Changeset in webkit [223571] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Skip service workers tests on Windows.

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:18 PM Changeset in webkit [223570] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark animations/play-state-suspend.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178341

Unreviewed test gardening.

  • platform/win/TestExpectations:
1:09 PM Changeset in webkit [223569] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Subtree should read subtreeLayout.
https://bugs.webkit.org/show_bug.cgi?id=178401

Reviewed by Simon Fraser.

Rename some variables to improve readability.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
(WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree):
(WebCore::FrameView::reset):
(WebCore::FrameView::willDestroyRenderTree):
(WebCore::FrameView::didDestroyRenderTree):
(WebCore::FrameView::calculateScrollbarModesForLayout):
(WebCore::FrameView::layout):
(WebCore::FrameView::convertSubtreeLayoutToFullLayout):
(WebCore::FrameView::scheduleRelayout):
(WebCore::FrameView::scheduleRelayoutOfSubtree):
(WebCore::FrameView::needsLayout const):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/FrameView.h:
12:55 PM Changeset in webkit [223568] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.11

Tag Safari-605.1.11.

12:17 PM Changeset in webkit [223567] by dino@apple.com
  • 4 edits
    2 adds in trunk

WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
https://bugs.webkit.org/show_bug.cgi?id=178223
<rdar://problem/34597567>

Reviewed by Antoine Quint.

Source/WebCore:

Remove the limit of 4k on the width/height of the renderbuffer.

Test: fast/canvas/webgl/large-drawing-buffer-resize.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::reshape):

LayoutTests:

Test that resizes an already large buffer to make sure it
doesn't get clamped to 4k.

  • fast/canvas/webgl/large-drawing-buffer-resize-expected.txt: Added.
  • fast/canvas/webgl/large-drawing-buffer-resize.html: Added.
12:04 PM Changeset in webkit [223566] by aestes@apple.com
  • 9 edits in trunk

Roll out r223447.

Broke the Sierra build.

11:57 AM Changeset in webkit [223565] by wilander@apple.com
  • 29 edits
    6 adds in trunk

Add and remove cookie partition accordingly in intermediary redirect requests
https://bugs.webkit.org/show_bug.cgi?id=178369
<rdar://problem/34467603>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html

http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html

  • loader/ResourceLoadObserver.h:

Now exposes notifyObserver() so that it can be triggered
by the TestRunner.
Removed unimplemented ResourceLoadObserver::setShouldThrottleObserverNotifications().

Source/WebKit:

  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::shouldChangePartition):

Convenience function. Comment documents the logic.

(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):

Now adds and removes cookie partition based on the
redirect-to URL's domain.

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

(WKBundleResourceLoadStatisticsNotifyObserver):

Test infrastructure.

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:

Tools:

Adds the function statisticsNotifyObserver().

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

(WTR::InjectedBundle::statisticsNotifyObserver):

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

(WTR::TestRunner::statisticsNotifyObserver):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

This patch adds two new tests, relevant for the code change.
Also makes changes to existing tests to increase speed and
reliability.

  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html: Added.
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect-expected.txt: Added.
  • http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html: Added.
  • http/tests/resourceLoadStatistics/resources/get-cookies.php: Added.
  • http/tests/resourceLoadStatistics/resources/redirect.php:
  • http/tests/resourceLoadStatistics/resources/set-cookie.php: Added.
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip.html:
  • http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost.html:
  • platform/ios/TestExpectations:

The two new tests are marked [ Pass ].

  • platform/mac-wk2/TestExpectations:

The two new tests are marked [ Pass ].

  • platform/wk2/TestExpectations:

The two new tests are marked [ Skip ] because they require cookie partitioning.

11:53 AM Changeset in webkit [223564] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Corrupted image after looping movie-backed <img>.
https://bugs.webkit.org/show_bug.cgi?id=178398

Reviewed by Eric Carlson.

Use the decode-order sample cursor rather than the destination sample cursor when generating
the CMSampleBuffer to decode.

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

(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):

11:49 AM Changeset in webkit [223563] by Ryan Haddad
  • 3 edits
    2 deletes in trunk

Unreviewed, rolling out r223459.

This change introduced LayoutTest failures.

Reverted changeset:

"WebGL clamps drawingBufferWidth to 4096 pixels on a 5120
monitor/canvas"
https://bugs.webkit.org/show_bug.cgi?id=178223
https://trac.webkit.org/changeset/223459

11:39 AM Changeset in webkit [223562] by commit-queue@webkit.org
  • 17 edits
    3 copies
    14 adds in trunk

Add preliminary support for fetch event
https://bugs.webkit.org/show_bug.cgi?id=178171

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17
Reviewed by Chris Dumez.

Source/JavaScriptCore:

Adding events

  • runtime/JSPromise.h:

Source/WebCore:

Test: http/wpt/service-workers/fetchEvent.https.html

http/wpt/service-workers/extendableEvent.https.html

Adding support for ExtendableEvent and FetchEvent as per
https://w3c.github.io/ServiceWorker/v1/#extendableevent-interface and
https://w3c.github.io/ServiceWorker/v1/#fetchevent-interface.

Both events need to handle promises as method parameters.
Beefing up DOMPromise for that purpose by exposing status, result and being able to call then.
Adding a new DOMPromise create method that would be the base for https://heycam.github.io/webidl/#es-promise
which might be implemented in the binding generator as a follow-up.

This patch makes them exposed on Window for test purposes until they can be fully tested on ServiceWorker environment.
It is also adding two internal methods for the same reason. These should be removed once events can be tested in its environment.

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/fetch/FetchResponse.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMPromise.cpp: Added.

(WebCore::callFunction):
(WebCore::DOMPromise::create):
(WebCore::DOMPromise::whenSettled):
(WebCore::DOMPromise::result const):
(WebCore::DOMPromise::status const):

  • bindings/js/JSDOMPromise.h:
  • bindings/js/WebCoreBuiltinNames.h:
  • dom/EventNames.in:
  • testing/Internals.cpp:

(WebCore::Internals::waitFetchEventToFinish):
(WebCore::Internals::waitExtendableEventToFinish):

  • testing/Internals.h:
  • testing/Internals.idl:
  • workers/service/ExtendableEvent.cpp: Added.

(WebCore::ExtendableEvent::ExtendableEvent):
(WebCore::ExtendableEvent::waitUntil):
(WebCore::ExtendableEvent::addPendingPromise):

  • workers/service/ExtendableEvent.h:

(WebCore::ExtendableEvent::onFinishedWaiting):
(WebCore::ExtendableEvent::promiseSettled):

  • workers/service/ExtendableEvent.idl: Added.
  • workers/service/ExtendableEventInit.h: Added.
  • workers/service/ExtendableEventInit.idl: Added.
  • workers/service/FetchEvent.cpp: Added.

(WebCore::FetchEvent::FetchEvent):
(WebCore::FetchEvent::respondWith):
(WebCore::FetchEvent::onResponse):
(WebCore::FetchEvent::respondWithError):
(WebCore::FetchEvent::processResponse):
(WebCore::FetchEvent::promiseSettled):

  • workers/service/FetchEvent.h:
  • workers/service/FetchEvent.idl:

LayoutTests:

Skipping new tests for WK1 and GTK that do not have SW.

  • http/wpt/service-workers/extendableEvent.https-expected.txt: Added.
  • http/wpt/service-workers/extendableEvent.https.html: Added.
  • http/wpt/service-workers/fetchEvent.https-expected.txt: Added.
  • http/wpt/service-workers/fetchEvent.https.html: Added.
  • platform/gtk/TestExpectations:
  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
11:39 AM Changeset in webkit [223561] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles: Command-click on a property name should jump to definition in Resources tab
https://bugs.webkit.org/show_bug.cgi?id=174329
<rdar://problem/33225564>

Reviewed by Joseph Pecoraro.

  • UserInterface/Base/Main.js:

Add "meta-key-pressed" class to <body> when Command key is pressed.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover):
Use the same styles as in CodeMirrorTokenTrackingController.css.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol):
This is very similar to WI.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked,
except it doesn't include special cases for CSS variables and links yet.

11:33 AM Changeset in webkit [223560] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

Leak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex()
https://bugs.webkit.org/show_bug.cgi?id=178397

Reviewed by Eric Carlson.

Explicitly wrap the return value of -copy in a RetainPtr.

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

(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):

11:30 AM Changeset in webkit [223559] by aestes@apple.com
  • 3 edits in trunk

Roll out r223247 until we can find a way to not break performance testing.

11:21 AM Changeset in webkit [223558] by commit-queue@webkit.org
  • 17 edits in trunk

Cache API implementation should be able to compute storage size for WebKit client applications.
https://bugs.webkit.org/show_bug.cgi?id=178350

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-17
Reviewed by Chris Dumez.

Source/WebCore:

  • page/SecurityOriginData.h:

(WebCore::SecurityOriginData::equals const):

Source/WebKit:

When gathering data from DOM Cache, we compute the size as follows:

  • If Caches object is not persistent, size is zero
  • If Caches object is persistent, we use the size computed by NetworkCache::Storage.

Covered by updated tests.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::ReadOriginsTaskCounter::create):
(WebKit::CacheStorage::ReadOriginsTaskCounter::addOrigin):
(WebKit::CacheStorage::Engine::fetchEntries):

  • NetworkProcess/cache/CacheStorageEngineCaches.cpp:

(WebKit::CacheStorage::Caches::storageSize const):

  • NetworkProcess/cache/CacheStorageEngineCaches.h:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreGetFetchCacheSizeForOrigin):

  • UIProcess/API/C/WKWebsiteDataStoreRef.h:

Tools:

Adding support for a domCacheSize getter.

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

(WTR::TestRunner::domCacheSize):

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

(WTR::FetchCacheSizeForOriginCallbackContext::FetchCacheSizeForOriginCallbackContext):
(WTR::fetchCacheSizeForOriginCallback):
(WTR::TestController::domCacheSize):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/cache-storage/cache-clearing-origin.https.html:
  • http/tests/cache-storage/cache-representation.https.html:
11:03 AM Changeset in webkit [223557] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Add expected result file for fast/css/DOMQuad-points-SameObject.html.
https://bugs.webkit.org/show_bug.cgi?id=178366

Unreviewed test gardening.

  • fast/css/DOMQuad-points-SameObject-expected.txt: Added.
10:41 AM Changeset in webkit [223556] by achristensen@apple.com
  • 5 edits in trunk/LayoutTests

de-flakify http/tests/security/cross-frame-access-put.html
https://bugs.webkit.org/show_bug.cgi?id=178371

Reviewed by Tim Horton.

In the iframe, the test was being run after 0ms. Sometimes, the whole iframe hadn't loaded yet,
so window.innerHeight and window.innerWidth were 0 instead of their intended values. This changes
the test to wait for the iframe to finish loading before running the test, then post a message to
the parent to tell it to finish running its test instead of just relying on setTimeout(..., 0) to
always work after the iframe had finished loading.

  • http/tests/security/cross-frame-access-put-expected.txt:
  • http/tests/security/cross-frame-access-put.html:
  • http/tests/security/resources/cross-frame-iframe-for-put-test.html:
  • platform/mac-wk2/TestExpectations:
10:37 AM Changeset in webkit [223555] by achristensen@apple.com
  • 4 edits in trunk/LayoutTests

Layout Test http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=150095

Reviewed by Tim Horton.

  • http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror-expected.txt:
  • http/tests/xmlhttprequest/xmlhttprequest-overridemimetype-invalidstaterror.html:
  • platform/mac-wk2/TestExpectations:

We were mixing jsTestIsAsync with testRunner.notifyDone which caused some flakiness.
Calling finishJSTest on the next runloop iteration causes it to no longer be flaky.

10:19 AM Changeset in webkit [223554] by achristensen@apple.com
  • 6 edits in trunk/LayoutTests

De-flakify http/tests/loading/basic-auth-resend-wrong-credentials.html
https://bugs.webkit.org/show_bug.cgi?id=178370

Reviewed by Ryosuke Niwa.

Like r223445, in WebKit2 (and WebKit1 with asynchronous loading) sometimes the iframe would start
loading before the main resource loading finished, sometimes it wouldn't. This isn't a problem,
and the rest of the test is still valid, but in order to make the dumped delegate callbacks deterministic,
we make it so the iframe always starts loading after the main resource is done loading.

  • http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
  • http/tests/loading/basic-auth-resend-wrong-credentials.html:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/wk2/http/tests/loading/basic-auth-resend-wrong-credentials-expected.txt:
10:13 AM Changeset in webkit [223553] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset()
https://bugs.webkit.org/show_bug.cgi?id=178322

Reviewed by Darin Adler.

Source/WebCore:

It is acceptable for InlineTextBox::clampedOffset() to be called for a fully truncated box,
say a person clicks on the ellipsis in a truncated text run. Restore the behavior prior to
r223259 and return the clamped offset.

Test: fast/text/click-ellipsis-assertion-failure.html

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::clampedOffset const):

LayoutTests:

Add a test to ensure that clicking on the ellipsis in a truncated text run does not
cause an assertion failure in a debug build.

  • fast/text/click-ellipsis-assertion-failure-expected.txt: Added.
  • fast/text/click-ellipsis-assertion-failure.html: Added.
10:04 AM Changeset in webkit [223552] by dbates@webkit.org
  • 7 edits
    2 adds in trunk

REGRESSION (r222670 and r222732): RTL truncated text may not be drawn
https://bugs.webkit.org/show_bug.cgi?id=178278
<rdar://problem/34982818>

Reviewed by Darin Adler.

Source/WebCore:

Revert r222732 and partially revert r222670. The underlying font rendering machinery implements
text truncation by taking a TextRun object that represents all of the text in the line fragment
and a subrange of the glyphs to render from this fragment. Only the glyphs in this subrange are
drawn and they are drawn in the same position they would be in had the entire line fragment been
drawn. Following r222670 InlineTextBox applies the truncation to the TextRun in InlineTextBox::text().
Together with r222732, which assumed that the number of glyphs to draw is equal to the length of
the TextRun, a truncated text run would be drawn at the wrong position on screen and could give
the impression that the text is not drawn. Instead InlineTextBox::text() should always return
the text for the entire line fragment without considering truncation and when calling TextPainter::paint()
we need to pass the truncated length of the line fragment.

Test: fast/text/ellipsis-text-rtl.html

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint): Compute the truncated length (number of glyphs) and pass this
to TextPainter::paint()
(WebCore::InlineTextBox::text const): Do not apply truncation to the text run. Truncation is
implemented by telling the underlying font rendering machinery to paint the subrange of the
text run that represents the non-truncated (visible) text.

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

(WebCore::SimpleLineLayout::paintFlow): Pass the entire length of the text run as we did prior
to r222732.

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paint): Take a length that represents the number of glyphs to draw from
the text run as we use to take prior to r222732.

  • rendering/TextPainter.h:

LayoutTests:

Add a test to ensure that we draw right-to-left truncated text correctly.

  • fast/text/ellipsis-text-rtl-expected.html: Added.
  • fast/text/ellipsis-text-rtl.html: Added.
9:34 AM Changeset in webkit [223551] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Move text auto sizing logic to a separate function
https://bugs.webkit.org/show_bug.cgi?id=178391
<rdar://problem/35030264>

Reviewed by Antti Koivisto.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::applyTextSizingIfNeeded):
(WebCore::FrameView::layout):

9:20 AM Changeset in webkit [223550] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Curl] Forward declaration "class Cookie;" in CookieJarCurl.h should be "struct Cookie;"
https://bugs.webkit.org/show_bug.cgi?id=178378

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-10-17
Reviewed by Per Arne Vollan.

No new tests. No change in behaviors.

  • platform/network/curl/CookieJarCurl.h:
9:17 AM Changeset in webkit [223549] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

[FrameView::layout cleanup] Merge InPreLayout blocks
https://bugs.webkit.org/show_bug.cgi?id=178373

Reviewed by Antti Koivisto.

Remove redundant comment and scoping.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

7:40 AM WebKitGTK/2.18.x edited by Carlos Garcia Campos
(diff)
7:39 AM Changeset in webkit [223548] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18

Merge r223043 - Safari 10 /11 problem with if (!await get(something)).
https://bugs.webkit.org/show_bug.cgi?id=176685

Reviewed by Saam Barati.

JSTests:

  • stress/async-await-basic.js:

(awaitEpression.async):

  • stress/async-await-syntax.js:

(testTopLevelAsyncAwaitSyntaxSloppyMode.testSyntax):
(prototype.testTopLevelAsyncAwaitSyntaxStrictMode):

Source/JavaScriptCore:

Using unary operator before await lead to count it as identifier.
According to spec https://tc39.github.io/ecma262/#sec-async-function-definitions
and Note 1 await is as AwaitExpression and it is allowed to use unary operator

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parsePrimaryExpression):

7:36 AM Changeset in webkit [223547] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r220861 - [GStreamer] GstStructure shouldn't be handled through GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=175673

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptTransformCaps): GstStructure isn't
ref-counted, so it should be handled through the GUniquePtr<GstStructure>
smart pointer.

7:35 AM Changeset in webkit [223546] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18

Merge r221372 - [WPE] Enable MEMORY_SAMPLER
https://bugs.webkit.org/show_bug.cgi?id=176099

Reviewed by Michael Catanzaro.

.:

Enable the otion at build time by default on Linux (currently
there are only Linux and Mac implementations of this feature).

  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

Enable it at runtime if the environment variable WEBKIT_SAMPLE_MEMORY is set.

  • UIProcess/API/wpe/WPEView.cpp:

(WKWPE::m_compositingManagerProxy):

7:34 AM Changeset in webkit [223545] by Carlos Garcia Campos
  • 5 edits
    1 move
    1 add
    1 delete in releases/WebKitGTK/webkit-2.18

Merge r221075, r221260 - [WPE] Some event handlers not working.
https://bugs.webkit.org/show_bug.cgi?id=175864

Reviewed by Michael Catanzaro.

Source/WebCore:

Share the EventHandler implementation with the GTK port and add ifdefs where needed.

Covered by existing tests.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • page/wpe/EventHandlerWPE.cpp: Removed.
  • platform/glib/EventHandlerGlib.cpp: Renamed from Source/WebCore/page/gtk/EventHandlerGtk.cpp.

(WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal const):

LayoutTests:

Remove expected failures for tests that now pass, add new expectation
for a test that is failing also on GTK+ and rebaseline a test with
the same expected result than on GTK+.

  • platform/wpe/TestExpectations:
  • platform/wpe/fast/events/focus-label-legend-elements-with-tab-expected.txt: Added.
7:29 AM Changeset in webkit [223544] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r220585 - [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
https://bugs.webkit.org/show_bug.cgi?id=175477

Reviewed by Žan Doberšek.

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
compiler choose the correct WTF::String constructor.

7:27 AM Changeset in webkit [223543] by Carlos Garcia Campos
  • 17 edits in releases/WebKitGTK/webkit-2.18

Merge r220595 - [CMake] Fix broken use of REQUIRED with find modules
https://bugs.webkit.org/show_bug.cgi?id=175427

Reviewed by Michael Catanzaro.

Module name passed to find_package_handle_standard_args() must exactly
match file name of CMake find module including letter case, e.g. "WebP"
must be used in FindWebP.cmake file. Otherwise find_package() arguments
(REQUIRED, QUIET, version) are not processed correctly.

To continue using old XXX_FOUND variables without case changes porting
to new find_package_handle_standard_args syntax which has FOUND_VAR
parameter. Unfortunately, variable name GTK_UNIX_PRINT_FOUND is not
allowed by find_package_handle_standard_args when package name is
GTKUnixPrint, so it's replaced to GTKUnixPrint_FOUND (default).

  • Source/cmake/FindGTKUnixPrint.cmake:
  • Source/cmake/FindGeoClue2.cmake:
  • Source/cmake/FindHyphen.cmake:
  • Source/cmake/FindLibEpoxy.cmake:
  • Source/cmake/FindLibGBM.cmake:
  • Source/cmake/FindLibsecret.cmake:
  • Source/cmake/FindLibtasn1.cmake:
  • Source/cmake/FindLibxkbcommon.cmake:
  • Source/cmake/FindOpenGL.cmake:
  • Source/cmake/FindOpenGLES2.cmake:
  • Source/cmake/FindOpenWebRTC.cmake:
  • Source/cmake/FindWPEBackend-mesa.cmake:
  • Source/cmake/FindWPEBackend.cmake:
  • Source/cmake/FindWayland.cmake:
  • Source/cmake/FindWebP.cmake:
  • Source/cmake/OptionsGTK.cmake:
7:25 AM Changeset in webkit [223542] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223143 - CSS constant properties should not be enabled by default
https://bugs.webkit.org/show_bug.cgi?id=177416

Reviewed by Darin Adler.

  • Shared/WebPreferencesDefinitions.h:
7:20 AM Changeset in webkit [223541] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r223442 - If an origin doesn't have databases in the Databases table we should still remove its information from disk in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178281
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brent Fulgham.

Source/WebCore:

New test:
DatabaseTracker.DeleteOriginWithMissingEntryInDatabasesTable

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):
If databaseNames is empty, don't bail early. Instead, delete everything in the directory
containing the databases for this origin. This condition indicates that we previously
tried to remove the origin but didn't get all of the way through the deletion process.
Because we have lost track of the databases for this origin, we can assume that no
other process is accessing them. This means it should be safe to delete them outright.

Tools:

Verify that if there is an entry in the Origins table but no entries in the Databases
table that we still remove the directory for the origin, and that we remove the
entry from the Origins table.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:

(TestWebKitAPI::TEST):

7:19 AM Changeset in webkit [223540] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r223438 - Unreviewed attempt to fix the Windows debug build.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):

7:19 AM Changeset in webkit [223539] by Carlos Garcia Campos
  • 5 edits
    1 add
    1 delete in releases/WebKitGTK/webkit-2.18

Merge r223427 - If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

Source/WebCore:

New tests:
DatabaseTracker.DeleteDatabase
DatabaseTracker.DeleteDatabaseWhenDatabaseDoesNotExist
DatabaseTracker.DeleteOrigin
DatabaseTracker.DeleteOriginWhenDeletingADatabaseFails
DatabaseTracker.DeleteOriginWhenDatabaseDoesNotExist

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
If the database doesn't exist, we previously deleted it but failed to remove the
information from the tracker database. We still want to delete all of the information
associated with this database from the tracker database, so add it to databaseNamesToDelete.
(WebCore::DatabaseTracker::deleteOrigin):
If a database doesn't exist, don't try to delete it. We don't need to, but more
importantly, deleteDatabaseFile() will fail if the database doesn't exist, which
will cause us to incorrectly think we failed to remove database information from disk.
If we actually fail to delete any database file, return before we remove the origin
information from the tracker database so we don't lose track of the database.
(WebCore::DatabaseTracker::deleteDatabase):
If a database doesn't exist, don't try to delete it. We don't need to, but also it
will cause us to incorrectly think that we were unable to delete a database, so we
would bail before we remove the database information from the tracker database. We
want to remove the database information from the tracker database because the database
doesn't exist.

  • Modules/webdatabase/DatabaseTracker.h:

Expose fullPathForDatabase() for use by tests.

  • platform/Logging.h:

Add a logging channel.

Tools:

Add tests that verify we correctly delete databases and remove their information from
the tracker database, even if the database doesn't exist. Verify that if we fail to
delete a database, we don't remove its information from the tracker database.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Move DatabaseTrackerTest.cpp to DatabaseTrackerTest.mm so that we can use the cocoa
method for creating a temporary directory in the tests.

  • TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Removed.

The existing test was copied to DatabaseTrackerTest.mm.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::addToDatabasesTable):
(TestWebKitAPI::removeDirectoryAndAllContents):
(TestWebKitAPI::createFileAtPath):

7:18 AM Changeset in webkit [223538] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r223423 - We should wrap the removal of information from the tracker database in a transaction in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178274
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Tim Horton.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):
Wrap the removal of information from the tracker database in a transaction so that
we don't end up in a case where only one of the tables contains information about
an origin.
If anything goes wrong when we're modifying the tracker database, rollback the transaction
before bailing.

7:07 AM Changeset in webkit [223537] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223416 - [WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
https://bugs.webkit.org/show_bug.cgi?id=178090

Reviewed by Michael Catanzaro.

EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
implementation, its build options, and the libepoxy build options. Using "static_cast"
works when it is a numeric value and the width of the value needs to be optionally
extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
cases. Therefore it seems reasonable to use a plain C cast expression to solve this
particular situation.

  • WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:

(WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression.

6:54 AM Changeset in webkit [223536] by nael.ouedraogo@crf.canon.fr
  • 4 edits in trunk/Tools

[GStreamer][GTK][WPE] update-webkit-libs-jhbuild fails to detect changes in included moduleset files
https://bugs.webkit.org/show_bug.cgi?id=178206

Reviewed by Michael Catanzaro.

The update-webkit-libs-jhbuild scripts computes MD5 sum of GTK/WPE jhbuild configuration files to check if it
needs to rebuild the dependencies libraries. This patch fixes a bug when main GTK/WPE jhbuild modules
configuration file includes additional files (for example GStreamer module). It parses jhbuild.modules file to
check if additional files are included. If any, it computes MD5 sum for each of these included files.

  • Scripts/update-webkit-libs-jhbuild:

(getJhbuildIncludedFilePaths): New function that returns included files in jhbuild.modules
(jhbuildConfigurationCheckFile): New function to check if MD5 sum file changes.
(jhbuildConfigurationChanged): Add MD5 sum check for included files.
(saveMd5File): New function to save MD5 sum of a file.
(saveJhbuildMd5): Add saving included files MD5 sum.
(deleteJhbuildMd5): Delete included files MD5 sum

  • gtk/install-dependencies: Add perl-libXML lib that is used to parse jhbuild file.
  • wpe/install-dependencies: Ditto.
6:14 AM Changeset in webkit [223535] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18

Merge r223313 - Protect FrameView during style calculations
https://bugs.webkit.org/show_bug.cgi?id=178300
<rdar://problem/34869329>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Protect the FrameView during layout and style updates in case arbitrary script
is run that might clear it.

Test: fast/html/marquee-reparent-check.html

  • page/FrameView.cpp:

(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):

LayoutTests:

  • fast/html/marquee-reparent-check-expected.txt: Added.
  • fast/html/marquee-reparent-check.html: Added.
6:05 AM Changeset in webkit [223534] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r223210 - Avoid triggering layout from style change
https://bugs.webkit.org/show_bug.cgi?id=178184
Source/WebCore:

rdar://problem/34699113

Reviewed by Zalan Bujtas.

It's bad for RenderBox::styleDidChange() to scroll RenderLayers, because that
can trigger layout via FrameView::updateWidgetPositions() and ScrollingCoordinator::absoluteEventTrackingRegions().
So postpone the scrolling until after layout.

Test: fast/scrolling/adjust-scroll-offset-on-zoom.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositions):
(WebCore::RenderLayer::setPostLayoutScrollPosition):
(WebCore::RenderLayer::applyPostLayoutScrollPositionIfNeeded):

  • rendering/RenderLayer.h:

LayoutTests:

Reviewed by Zalan Bujtas.

  • fast/scrolling/adjust-scroll-offset-on-zoom-expected.txt: Added.
  • fast/scrolling/adjust-scroll-offset-on-zoom.html: Added.
5:51 AM Changeset in webkit [223533] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r223190 - [ATK] Expose value of aria-keyshortcuts as object attribute
https://bugs.webkit.org/show_bug.cgi?id=171175

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the author-provided string through the "keyshortcuts" object attribute.

Test: accessibility/gtk/aria-keyshortcuts.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::ariaKeyShortcutsValue const):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

  • html/HTMLAttributeNames.in:

LayoutTests:

  • accessibility/gtk/aria-keyshortcuts-expected.txt: Added.
  • accessibility/gtk/aria-keyshortcuts.html: Added.
5:32 AM Changeset in webkit [223532] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r223168 - [GStreamer] Fix double seek requested by downloadbuffer GStreamer element in webkibwebsrc
https://bugs.webkit.org/show_bug.cgi?id=178079

Reviewed by Žan Doberšek.

When the downloadbuffer GStreamer element requests two seeks too
close to each other there's some rare race condition where our
source answers that it is not seekable and ends up with
downloadbuffer element to seek beyond the file size, which causes
the server to issue a 416 HTTP error code eventually, causing our
MediaPlayer to stop.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcStop): We only unset he seekable attribute if we are
not seeking.

5:29 AM Changeset in webkit [223531] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r223162 - [WPE] Remove the possibility of installing the old WebKit2 C API
https://bugs.webkit.org/show_bug.cgi?id=178125

Reviewed by Michael Catanzaro.

.:

  • Source/cmake/OptionsWPE.cmake: Remove definition of the EXPORT_DEPRECATED_WEBKIT2_C_API

build option.

Source/WebKit:

  • PlatformWPE.cmake: Remove support for installing the deprecated C API.
5:26 AM Changeset in webkit [223530] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18

Merge r223152 - [WPE] Expose ENABLE_XSLT option
https://bugs.webkit.org/show_bug.cgi?id=177857

Reviewed by Carlos Alberto Lopez Perez.

  • Source/cmake/OptionsWPE.cmake:
5:26 AM Changeset in webkit [223529] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223146 - [WPE] Header cairo.h is used in GLib API headers but cannot be found
https://bugs.webkit.org/show_bug.cgi?id=178100

Reviewed by Michael Catanzaro.

  • wpe/wpe-webkit.pc.in: Add Cairo to the "Requires" field, so its flags get pulled

in and the "cairo.h", used in the WPE WebKit GLib API headers, can be found.

5:25 AM Changeset in webkit [223528] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18

Merge r223145 - AX: [ATK] ARIA form role should be mapped to ATK_ROLE_LANDMARK; not ATK_ROLE_FORM
https://bugs.webkit.org/show_bug.cgi?id=178137

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the ARIA form role as ATK_ROLE_LANDMARK; continue to expose the HTML form
element as ATK_ROLE_FORM.

No new tests needed due to existing coverage. Update expectations for roles-exposed.html.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

Tools:

Add handling for ATK_ROLE_LANDMARK resulting from the ARIA form role.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated expectations.
5:23 AM Changeset in webkit [223527] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223133 - [WPE] Cannot link against libWPEWebkit due to wrong contents of wpe-webkit.pc
https://bugs.webkit.org/show_bug.cgi?id=178133

Reviewed by Žan Doberšek.

  • wpe/wpe-webkit.pc.in: Remove "-lWPE" and replace "Requires.private" with a plain "Requires".
5:21 AM Changeset in webkit [223526] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223129 - [WPE] GLib API headers WebKitScriptDialog.h and WebKitFileChooserRequest.h are not installed
https://bugs.webkit.org/show_bug.cgi?id=178104

Reviewed by Žan Doberšek.

  • PlatformWPE.cmake: Add missing header paths to the WPE_API_INSTALLED_HEADERS variable.
5:18 AM Changeset in webkit [223525] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r223128 - [WPE][CMake] The “install” target should install all public API headers
https://bugs.webkit.org/show_bug.cgi?id=176475

Reviewed by Žan Doberšek.

Install the WPE port GLib-based API headers. The deprecated C API is still available,
but disabled by default behind the "EXPORT_DEPRECATED_WEBKIT2_C_API" CMake option.

  • PlatformWPE.cmake: Always install "wpe-webkit.pc" and the GLib C API for WPE.
5:15 AM Changeset in webkit [223524] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r223126 - AX: [ATK] STATE_CHECKABLE should be removed from radio buttons in radiogroups with aria-readonly="true"
https://bugs.webkit.org/show_bug.cgi?id=177931

Reviewed by Chris Fleizach.

Source/WebCore:

Add a check in canSetValueAttribute() for readonly radiogroup ancestors of
radio buttons.

Test: accessibility/gtk/aria-readonly-radiogroup.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canSetValueAttribute const):

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::radioGroupAncestor const):

  • accessibility/AccessibilityObject.h:

LayoutTests:

  • accessibility/gtk/aria-readonly-radiogroup-expected.txt: Added.
  • accessibility/gtk/aria-readonly-radiogroup.html: Added.
5:02 AM Changeset in webkit [223523] by Yusuke Suzuki
  • 36 edits
    13 adds in trunk

[JSC] proto getter should be fast
https://bugs.webkit.org/show_bug.cgi?id=178067

Reviewed by Saam Barati.

JSTests:

  • stress/dfg-object-proto-accessor.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-object-proto-getter.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-object-prototype-of.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/dfg-reflect-get-prototype-of.js: Added.

(shouldBe):
(shouldThrow):
(target):

  • stress/object-get-prototype-of-filtered.js: Added.

(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):

  • stress/object-get-prototype-of-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-get-prototype-of-poly-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-get-prototype-of-poly-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-proto-getter-filtered.js: Added.

(shouldBe):
(shouldThrow):
(target):
(i.Cocoa):

  • stress/object-proto-getter-poly-mono-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-proto-getter-poly-proto.js: Added.

(shouldBe):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(target):

  • stress/object-prototype-proto-accessors-should-throw-on-undefined-this.js:
  • stress/string-proto.js: Added.

(shouldBe):
(target):

Source/JavaScriptCore:

In our ES6 class implementation, we access proto field to retrieve super constructor.
Currently, it is handled as an usual getter call to a generic function. And DFG just emits
Call node for this. It is inefficient since typically we know the prototype of the given
object when accessing object.__proto__ since we emit CheckStructure for this object.
If Structure has mono proto, we can immediately fold it to constant value. If it is poly proto,
we can still change this to efficient access to poly proto slot.

This patch implements GetPrototypeOf DFG node. This node efficiently accesses to prototype of
the given object. And in AI and ByteCodeParser phase, we attempt to fold it to constant.
ByteCodeParser's folding is a bit important since we have callee.__proto__ code to get super
constructor. If we can change this to constant, we can reify CallLinkInfo with this constant.
This paves the way to optimizing ArrayConstructor super calls[1], which is particularly important
for ARES-6 ML.

And we also optimize Reflect.getPrototypeOf and Object.getPrototypeOf with this GetPrototypeOf node.

Currently, proto access for poly proto object is not handled well in IC. But we add code handling
poly proto in GetPrototypeOf since Reflect.getPrototypeOf and Object.getPrototypeOf can use it.
Once IC starts handling poly proto & intrinsic getter well, this code will be used for that too.

This patch improves SixSpeed super.es6 by 3.42x.

baseline patched

super.es6 123.6666+-3.9917 36.1684+-1.0351 definitely 3.4192x faster

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

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::handleIntrinsicGetter):
(JSC::DFG::ByteCodeParser::handleGetById):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGHeapLocation.h:
  • dfg/DFGNode.h:

(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::shouldSpeculateFunction):

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

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::speculateFunction):
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::compileGetPrototypeOf):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetPrototypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):

  • jit/IntrinsicEmitter.cpp:

(JSC::IntrinsicGetterAccessCase::canEmitIntrinsicGetter):
(JSC::IntrinsicGetterAccessCase::emitIntrinsicGetter):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

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

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncProtoGetter):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ObjectConstructor.cpp:
  • runtime/ReflectObject.cpp:

LayoutTests:

  • js/object-literal-shorthand-construction-expected.txt:
  • js/script-tests/object-literal-shorthand-construction.js:

(set 2):
(get 1):

  • js/script-tests/sloppy-getter-setter-global-object.js:
  • js/sloppy-getter-setter-global-object-expected.txt:
4:49 AM Changeset in webkit [223522] by Carlos Garcia Campos
  • 6 edits
    2 adds in releases/WebKitGTK/webkit-2.18

AX: [ATK] Explicitly-set aria-sort value of "none" should be exposed as an object attribute
https://bugs.webkit.org/show_bug.cgi?id=177955

Reviewed by Chris Fleizach.

Source/WebCore:

Expose "none" as the value of aria-sort when the attribute is present and not
one of the other valid sort types. Also add a new AccessibilitySortDirection,
SortDirectionInvalid. This is currently only being used when the sort direction
is sought for a role which does not support this ARIA attribute, but might come
in handy if we want to add further sanity checks on the author-provided values.

Test: accessibility/gtk/aria-sort-values.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::sortDirection const):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):

LayoutTests:

  • accessibility/gtk/aria-sort-values-expected.txt: Added.
  • accessibility/gtk/aria-sort-values.html: Added.
4:44 AM Changeset in webkit [223521] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18

Merge r223045 - [WPE][GTK] Propagate libepoxy compiler flags obtained from pkg-config
https://bugs.webkit.org/show_bug.cgi?id=178081

Reviewed by Carlos Alberto Lopez Perez.

.:

  • Source/cmake/FindLibEpoxy.cmake: Define the ${LIBEPOXY_DEFINITIONS} variable when libepoxy

is found by pkg-config. This contains the value of the "Cflags" field from "epoxy.pc".

Source/WebCore:

No new tests needed.

  • CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebCore.

Source/WebKit:

  • CMakeLists.txt: Use ${LIBEPOXY_DEFINITIONS} for building WebKit.
4:42 AM Changeset in webkit [223520] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r223028 - Nullptr deref in WebCore::Node::computeEditability
https://bugs.webkit.org/show_bug.cgi?id=177905
<rdar://problem/34138402>

Reviewed by Darin Adler.

Source/WebCore:

Script can run when setting focus, because a blur event and a focus event are generated.
A handler for one of these events can cause the focused element to be cleared. We should
handle this possibility gracefully.

Test: fast/dom/focus-shift-crash.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

LayoutTests:

  • fast/dom/focus-shift-crash-expected.txt: Added.
  • fast/dom/focus-shift-crash.html: Added.
4:37 AM Changeset in webkit [223519] by Carlos Garcia Campos
  • 6 edits
    1 delete in releases/WebKitGTK/webkit-2.18/Source/bmalloc

Merge r222982 - Use one Scavenger thread for all Heaps
https://bugs.webkit.org/show_bug.cgi?id=174973

Reviewed by JF Bastien.

This combines the scavengers from all Heap instances into a single scavenger. It also combines
the accounting for deciding when to run. Each Heap still controls what it means to scavenge
itself (it's all in Heap::scavenge) but the policy decisions are all controlled by Scavenger.
Because Scavenger is also the only thing that needs an AsyncTask, this removes AsyncTask and
moves all of AsyncTask's logic into Scavenger.

This appears to be a 1% progression on JetStream (with high statistical confidence: p = 0.0049).

  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/AsyncTask.h: Removed.
  • bmalloc/Heap.cpp:

(bmalloc::Heap::Heap):
(bmalloc::Heap::allocateSmallChunk):
(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::deallocateSmallLine):
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::tryAllocateLarge):
(bmalloc::Heap::shrinkLarge):
(bmalloc::Heap::deallocateLarge):
(bmalloc::Heap::concurrentScavenge): Deleted.
(bmalloc::Heap::scheduleScavengerIfUnderMemoryPressure): Deleted.
(bmalloc::Heap::scheduleScavenger): Deleted.

  • bmalloc/Heap.h:
  • bmalloc/Scavenger.cpp:

(bmalloc::Scavenger::Scavenger):
(bmalloc::Scavenger::run):
(bmalloc::Scavenger::runHoldingLock):
(bmalloc::Scavenger::runSoon):
(bmalloc::Scavenger::runSoonHoldingLock):
(bmalloc::Scavenger::didStartGrowing):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressure):
(bmalloc::Scavenger::scheduleIfUnderMemoryPressureHoldingLock):
(bmalloc::Scavenger::schedule):
(bmalloc::Scavenger::threadEntryPoint):
(bmalloc::Scavenger::threadRunLoop):
(bmalloc::Scavenger::setSelfQOSClass):

  • bmalloc/Scavenger.h:

(bmalloc::Scavenger::willRun):
(bmalloc::Scavenger::willRunSoon):

4:36 AM Changeset in webkit [223518] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/JavaScriptCore

Merge r222981 - Avoid integer overflow in DFGStrengthReduction.cpp
https://bugs.webkit.org/show_bug.cgi?id=177944

Reviewed by Saam Barati.

The check that we won't do integer overflow by negating INT32_MIN was itself an integer overflow.
I think that signed integer overflow is undefined behaviour in C, so I replace it by an explicit check that value != INT32_MIN instead.

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

4:35 AM Changeset in webkit [223517] by Carlos Garcia Campos
  • 34 edits
    3 moves
    2 adds in releases/WebKitGTK/webkit-2.18/Source

Merge r222960 - Update Source/ThirdParty/woff2 to 22c256bc457777744ba14b7325a6e8e0e7dec91c
https://bugs.webkit.org/show_bug.cgi?id=177994

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

Source/ThirdParty:

  • woff2/CMakeLists.txt: Also consider the directory for public headers.
  • woff2/README.webkit:
  • woff2/include/woff2/decode.h: Renamed from Source/ThirdParty/woff2/src/woff2_dec.h.
  • woff2/include/woff2/encode.h: Renamed from Source/ThirdParty/woff2/src/woff2_enc.h.

(woff2::WOFF2Params::WOFF2Params):

  • woff2/include/woff2/output.h: Renamed from Source/ThirdParty/woff2/src/woff2_out.h.

(woff2::WOFF2Out::~WOFF2Out):
(woff2::WOFF2StringOut::MaxSize):

  • woff2/src/buffer.h:
  • woff2/src/convert_woff2ttf_*.cc:
  • woff2/src/file.h:
  • woff2/src/font.cc:
  • woff2/src/font.h:
  • woff2/src/glyph.cc:
  • woff2/src/glyph.h:
  • woff2/src/normalize.cc:
  • woff2/src/normalize.h:
  • woff2/src/port.h:
  • woff2/src/round.h:
  • woff2/src/store_bytes.h:
  • woff2/src/table_tags.cc:
  • woff2/src/table_tags.h:
  • woff2/src/transform.cc:
  • woff2/src/transform.h:
  • woff2/src/variable_length.cc:
  • woff2/src/variable_length.h:
  • woff2/src/woff2_common.cc:
  • woff2/src/woff2_common.h:
  • woff2/src/woff2_compress.cc:
  • woff2/src/woff2_dec.cc:
  • woff2/src/woff2_decompress.cc:
  • woff2/src/woff2_enc.cc:
  • woff2/src/woff2_info.cc:
  • woff2/src/woff2_out.cc:
  • woff2/update.sh: Also consider directory for public headers.

Source/WebCore:

No new tests, already covered by existing tests.

  • CMakeLists.txt: Include the directory for public headers instead.
  • platform/graphics/WOFFFileFormat.cpp: Use the public header

woff2/decode.h and do not use the "wOF2" constant from private headers.
(WebCore::isWOFF):
(WebCore::convertWOFFToSfnt):

3:44 AM Changeset in webkit [223516] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.18/Source

Merge r222945 - bmalloc mutex should be adaptive
https://bugs.webkit.org/show_bug.cgi?id=177839

Reviewed by Michael Saboff.

Source/bmalloc:

This pulls the WordLock algorithm into bmalloc, mostly by copy-pasting the code. We need to
copy paste because sometimes we build WTF without bmalloc, so WTF cannot rely on bmalloc for
anything other than malloc.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

  • bmalloc/Algorithm.h:

(bmalloc::compareExchangeWeak):
(bmalloc::compareExchangeStrong):

  • bmalloc/PerThread.h:
  • bmalloc/StaticMutex.cpp:

(bmalloc::StaticMutex::lockSlow):
(bmalloc::StaticMutex::unlockSlow):
(bmalloc::StaticMutex::lockSlowCase): Deleted.

  • bmalloc/StaticMutex.h:

(bmalloc::StaticMutex::try_lock):
(bmalloc::StaticMutex::isLocked const):
(bmalloc::StaticMutex::init):
(bmalloc::StaticMutex::tryLock):
(bmalloc::StaticMutex::lock):
(bmalloc::StaticMutex::unlock):
(bmalloc::sleep): Deleted.
(bmalloc::waitUntilFalse): Deleted.

Source/WTF:

Add some comments that I thought of while copy-pasting this code.

Reland after fixing ancient WordLock bug: the notify_one has to happen with the lock held
to ensure it doesn't run after that thread has died.

  • wtf/LockAlgorithmInlines.h:
  • wtf/WordLock.cpp:
3:43 AM Changeset in webkit [223515] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18

Merge r222930 - Generate a compile error if release is built without compiler optimizations
https://bugs.webkit.org/show_bug.cgi?id=177665

Reviewed by Brian Burg.

.:

Default to RelWithDebInfo if CMAKE_BUILD_TYPE is unset.

  • CMakeLists.txt:

Source/JavaScriptCore:

Pass -DRELEASE_WITHOUT_OPTIMIZATIONS to testair.cpp and testb3.cpp because
this files are compiled with -O0 for build speed reasons after r195639.

Source/WTF:

For GCC and Clang, generate an error at build time that will alert
the developer that she is trying to build Release without any compiler
optimization. A build time error is much better than an unexpected
"oh, WebKit is really slow ..." situation later.

If this was intended, then we tell the developer that she can continue
by just setting -DRELEASE_WITHOUT_OPTIMIZATIONS in the list of build
flags.

The intention of this patch is to ensure that nobody builds Release
without enabling compiler optimization by mistake.

  • wtf/Compiler.h:
3:18 AM Changeset in webkit [223514] by Antti Koivisto
  • 11 edits in trunk

Text nodes with display:contents parent should render as if they were wrapped in an unstyled <span>
https://bugs.webkit.org/show_bug.cgi?id=178332

Reviewed by Ryosuke Niwa.

Source/WebCore:

According to https://github.com/w3c/csswg-drafts/issues/1118

<div style="display:contents;color:green">text</div>

must result in green text even though div doesn't generate a box.

This patch implements the behavior by wrapping text renderers with display:contents parent element
in an anonymous inline box that receives its style by inheriting from the parent element.

  • dom/Document.cpp:

(WebCore::Document::updateTextRenderer):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::computeFirstLineStyle const):

Synthesize the first line style in display:contents parent case.

  • rendering/RenderObject.cpp:

(WebCore::findDestroyRootIncludingAnonymous):

Factor into a function.

(WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):

Get rid of the anonymous wrapper if it exists.

  • rendering/RenderText.cpp:

(WebCore::inlineWrapperForDisplayContentsMap):
(WebCore::RenderText::RenderText):
(WebCore::RenderText::willBeDestroyed):
(WebCore::RenderText::inlineWrapperForDisplayContents):
(WebCore::RenderText::setInlineWrapperForDisplayContents):

Add a weak member (implemented as a rare data map) for holding the wrapper pointer.

(WebCore::RenderText::findByDisplayContentsInlineWrapperCandidate):

Helper to get the text renderer for a wrapper.

  • rendering/RenderText.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::createTextRenderer):
(WebCore::RenderTreeUpdater::updateTextRenderer):

Create the wrapper if needed.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveComposedTree):

Compute the wrapper style by inheriting from the display:contents parent.

  • style/StyleUpdate.h:

(WebCore::Style::TextUpdate::TextUpdate):

LayoutTests:

3:05 AM Changeset in webkit [223513] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222910 - [GTK][WPE] GIFImageDecoder never clears decoded frames even when told to do so
https://bugs.webkit.org/show_bug.cgi?id=177864

Reviewed by Carlos Garcia Campos.

Fix GIFImageDecoder::clearFrameBufferCache() so it really deletes decoded buffers, and modify
GIFImageDecoder to be able to decode frames that are not requested in the expected order.

Covered by existent tests.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::findFirstRequiredFrameToDecode):
(WebCore::GIFImageDecoder::frameBufferAtIndex):
(WebCore::GIFImageDecoder::clearFrameBufferCache):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.cpp:

(GIFImageReader::decode):

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFImageReader::frameContext const):

3:02 AM Changeset in webkit [223512] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222906 - Align BitmapImage::LargeAnimationCutoff to a megabyte value
https://bugs.webkit.org/show_bug.cgi?id=177924

Reviewed by Carlos Garcia Campos.

  • platform/graphics/BitmapImage.h: Fix the 1014 multiplier used to calculate

the LargeAnimationCutoff value. It was most likely a typo.

3:00 AM Changeset in webkit [223511] by Carlos Garcia Campos
  • 28 edits
    15 adds
    5 deletes in releases/WebKitGTK/webkit-2.18/Source/ThirdParty

Merge r222903 - Upgrade Brotli to version 1.0.1 and WOFF2 to latest upstream
https://bugs.webkit.org/show_bug.cgi?id=177768

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-05
Reviewed by Michael Catanzaro.

  • brotli/CMakeLists.txt:
  • brotli/README.webkit:
  • brotli/common/constants.h: Added.
  • brotli/common/dictionary.bin: Added.
  • brotli/common/dictionary.c: Added.
  • brotli/common/dictionary.h: Added.
  • brotli/common/version.h: Added.
  • brotli/dec/Makefile: Removed.
  • brotli/dec/bit_reader.c:
  • brotli/dec/bit_reader.h:
  • brotli/dec/context.h:
  • brotli/dec/decode.c:
  • brotli/dec/decode.h: Removed.
  • brotli/dec/dictionary.c: Removed.
  • brotli/dec/dictionary.h: Removed.
  • brotli/dec/huffman.c:
  • brotli/dec/huffman.h:
  • brotli/dec/port.h:

(BrotliDump):
(BrotliRBit):

  • brotli/dec/prefix.h:
  • brotli/dec/state.c:
  • brotli/dec/state.h:
  • brotli/dec/transform.h:
  • brotli/dec/types.h: Removed.
  • brotli/include/brotli/decode.h: Added.
  • brotli/include/brotli/encode.h: Added.
  • brotli/include/brotli/port.h: Added.
  • brotli/include/brotli/types.h: Added.
  • brotli/update.sh:
  • woff2/CMakeLists.txt:
  • woff2/README.webkit:
  • woff2/src/buffer.h:

(woff2::Buffer::Buffer):
(woff2::Buffer::Read):

  • woff2/src/convert_woff2ttf_*.cc: Added.
  • woff2/src/font.cc:
  • woff2/src/glyph.cc:
  • woff2/src/normalize.cc:
  • woff2/src/port.h:
  • woff2/src/store_bytes.h:

(woff2::Store16):

  • woff2/src/variable_length.cc:
  • woff2/src/woff2_common.cc:
  • woff2/src/woff2_dec.cc:
  • woff2/src/woff2_decompress.cc:
  • woff2/src/woff2_enc.cc:
  • woff2/src/woff2_info.cc: Added.
2:55 AM Changeset in webkit [223510] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222855 - [GTK] WebKit2GTK+ does not handle touchmove and touchend events correctly
https://bugs.webkit.org/show_bug.cgi?id=158531

Reviewed by Carlos Alberto Lopez Perez.

Do not bypass WebCore event handling when receiving touch events.

Based on a patch by Andre Moreira Magalhaes <Andre Moreira Magalhaes>.
Thanks to Carlos Garnacho <carlosg@gnome.org> for helping out reviewing the code.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::doneWithTouchEvent): Make sure touchend reaches gesture controller if touchbegin evet got to it.

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseTouchEvent): Do not invoke gesture controller directly by bypassing WebCore event handling.

  • UIProcess/gtk/GestureController.cpp:

(WebKit::GestureController::reset): Added.
(WebKit::GestureController::handleEvent): Reset gesture controller when touchpadupdate/end is received without touchbegin.
(WebKit::GestureController::Gesture::reset): Added.

  • UIProcess/gtk/GestureController.h:
2:53 AM Changeset in webkit [223509] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222836 - [GTK][WPE] Fix playback of GIFs
https://bugs.webkit.org/show_bug.cgi?id=176089

Reviewed by Carlos Garcia Campos.

Allow GIFImageReader to decode again already decoded frames. Thanks to this, we don't
need to delete the GIFImageReader when GIFImageDecoder::clearFrameBufferCache() is
called, and the we don't need the lock to avoid crashes in that situation.

Covered by existent tests.

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::clearFrameBufferCache):
(WebCore::GIFImageDecoder::decode):

  • platform/image-decoders/gif/GIFImageDecoder.h:
  • platform/image-decoders/gif/GIFImageReader.cpp:

(GIFImageReader::decode):

2:49 AM Changeset in webkit [223508] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222833 - AX: [ATK] aria-pressed="mixed" should be exposed via ATK_STATE_INDETERMINATE
https://bugs.webkit.org/show_bug.cgi?id=177807

Reviewed by Chris Fleizach.

Source/WebCore:

Include toggle buttons in the element types for which the mixed state is checked
and exposed via ATK_STATE_INDETERMINATE if found. Also only do the role checks when
AccessibilityObject::isIndeterminate() has returned false.

Test: accessibility/gtk/aria-pressed-mixed-value.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

LayoutTests:

  • accessibility/gtk/aria-pressed-mixed-value-expected.txt: Added.
  • accessibility/gtk/aria-pressed-mixed-value.html: Added.
2:48 AM Changeset in webkit [223507] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.18

Merge r222832 - AX: [ATK] ARIA tabpanel role should be exposed as ATK_ROLE_SCROLL_PANE
https://bugs.webkit.org/show_bug.cgi?id=177815

Reviewed by Chris Fleizach.

Source/WebCore:

Change the mapping of TabPanelRole from ATK_ROLE_PANEL to ATK_ROLE_SCROLL_PANE.

No new tests because this mapping is already covered by aria-tab-roles.html and
roles-exposed.html. The platform expectations for each test have been updated.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

Updated expectations to reflect new mapping.

  • platform/gtk/accessibility/aria-tab-roles-expected.txt: Added.
  • platform/gtk/accessibility/roles-exposed-expected.txt: Updated.
2:47 AM Changeset in webkit [223506] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222823 - Move scroll snap point unregistration from willBeRemovedFromTree to willBeDestroyed
https://bugs.webkit.org/show_bug.cgi?id=177830
<rdar://problem/34796065>

Reviewed by Antti Koivisto.

willBeRemovedFromTree is called conditionally, relying on unregistering objects in there is highly error prone.

Covered by existing tests.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::willBeDestroyed):
(WebCore::RenderBox::willBeRemovedFromTree): Deleted.

  • rendering/RenderBox.h:
2:40 AM Changeset in webkit [223505] by commit-queue@webkit.org
  • 7 edits in trunk

[MSE][GStreamer] Insert parser elements in AppendPipeline when demuxing opus or Vorbis
https://bugs.webkit.org/show_bug.cgi?id=178076

Patch by Alicia Boya García <aboya@igalia.com> on 2017-10-17
Reviewed by Xabier Rodriguez-Calvar.

YouTube does not include durations in the WebM container for files
containing Opus audio, so we need to read them from the contained
stream. Fortunately, GStreamer has an element to do that: opusparse.

The same thing happens with Vorbis contained in WebM files from the
W3C tests, which should also be fixed by the GStreamer element
vorbisparse.

This patch adds an opusparse or vorbisparse element to the
AppendPipeline at the sinkpad of the demuxer when either is found.

Tests: updated expectations.

Source/WebCore:

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::appsinkNewSample):
(WebCore::createOptionalParserForFormat):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):

  • platform/graphics/gstreamer/mse/AppendPipeline.h:
  • platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:

(WebCore::GStreamerMediaSample::GStreamerMediaSample):

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::attachTrack):

LayoutTests:

  • platform/gtk/TestExpectations:
2:39 AM Changeset in webkit [223504] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222822 - AX: [ATK] ARIA menuitems should be exposed with ATK_ROLE_MENU_ITEM even when it's the child of group role
https://bugs.webkit.org/show_bug.cgi?id=177811

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityNodeObject::remapAriaRoleDueToParent() remaps ARIA menuitems to the
MenuButtonRole AccessibilityRole when the menuitem's parent is an ARIA group, but
the ATK code was not handling that remapped role value. As a result, the element
was being exposed as ATK_ROLE_UNKNOWN. Add MenuButtonRole to the AccessibilityRole
types exposed as ATK_ROLE_MENU_ITEM.

Test: accessibility/gtk/menu-with-group-child-tree.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(atkRole):

LayoutTests:

  • accessibility/gtk/menu-with-group-child-tree-expected.txt: Added.
  • accessibility/gtk/menu-with-group-child-tree.html: Added.
2:38 AM Changeset in webkit [223503] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222821 - AX: [ATK] aria-rowindex set on row element is not being exposed
https://bugs.webkit.org/show_bug.cgi?id=177821

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the value of aria-rowindex when set on a row as an object
attribute, as we already do when it's set on a cell.

Test: accessibility/gtk/aria-rowindex-on-row.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

LayoutTests:

  • accessibility/gtk/aria-rowindex-on-row-expected.txt: Added.
  • accessibility/gtk/aria-rowindex-on-row.html: Added.
2:38 AM Changeset in webkit [223502] by tpopela@redhat.com
  • 2 edits in trunk/Tools

Undefined WK_API_ENABLED warning when compiling COCOA content on WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=178208

Check whether we are on COCOA platform before checking for
WK_API_ENABLED.

Reviewed by Ryosuke Niwa.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::clearDOMCache):

2:30 AM Changeset in webkit [223501] by Ms2ger@igalia.com
  • 4 edits in trunk/Source/WebCore

Add WebGL2 texImage3D overloads.
https://bugs.webkit.org/show_bug.cgi?id=178119

Reviewed by Ryosuke Niwa.

No new tests: not much point in adding tests now; this method doesn't
do anything anyway.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::texImage3D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGL2RenderingContext.idl:
2:21 AM Changeset in webkit [223500] by Antti Koivisto
  • 11 edits in trunk/Source/WebCore

Resolve ::before and ::after pseudo elements during style resolution
https://bugs.webkit.org/show_bug.cgi?id=178339

Reviewed by Ryosuke Niwa.

They are currently resolved during render tree building which creates problems with display:contents and animations.

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::PseudoElement):

Call InspectorInstrumentation from constructor.

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::Parent::Parent):
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::pushParent):

Push the full update to the parent stack.

(WebCore::RenderTreeUpdater::popParent):
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):

  • style/RenderTreeUpdater.h:
  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):

No need to resolve pseudo style, we have it already.

(WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
(WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.

  • style/RenderTreeUpdaterGeneratedContent.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):

Resolve pseudos.

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

Make a private member function.

(WebCore::Style::TreeResolver::resolveComposedTree):

  • style/StyleTreeResolver.h:
  • style/StyleUpdate.cpp:

(WebCore::Style::Update::elementUpdates const):
(WebCore::Style::Update::elementUpdates):

Bundle the style update for an element and the associated before/after pseudos.

(WebCore::Style::Update::elementStyle const):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):
(WebCore::Style::Update::elementUpdate const): Deleted.
(WebCore::Style::Update::elementUpdate): Deleted.

  • style/StyleUpdate.h:
1:36 AM Changeset in webkit [223499] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18

Merge r222790 - [AX] Do not trigger redundant layout on tables.
https://bugs.webkit.org/show_bug.cgi?id=177781
<rdar://problem/34777030>

Reviewed by Antti Koivisto.

Source/WebCore:

RenderTable::forceSectionsRecalc() marks the RenderTable dirty and schedules a layout.
Every time AccessibilityTable asks for the table element (including during construction),
we end up triggering a layout. This call was added (r191357) to ensure RenderTable's m_firstBody is always
up-to-date (in case of anonymous wrapper table renderer). Instead of relying on the m_firstBody,
let's just use the first child to find the table element. The first child always points to a valid
renderer (or nullptr), while m_firstBody is the result of section computation.

Covered by existing tests.

  • accessibility/AccessibilityTable.cpp:

(WebCore::AccessibilityTable::tableElement const):

LayoutTests:

1:35 AM Changeset in webkit [223498] by Carlos Garcia Campos
  • 3 edits
    3 adds in releases/WebKitGTK/webkit-2.18

Merge r222788 - [CSP] Check policy before opening a new window to a JavaScript URL
https://bugs.webkit.org/show_bug.cgi?id=176815
<rdar://problem/34400057>

Reviewed by Brent Fulgham.

Source/WebCore:

Ensure that the Content Security Policy of the page allows navigation to a JavaScript URL
before opening a new window to it.

Test: http/tests/security/contentSecurityPolicy/window-open-javascript-url-blocked.html

  • loader/FrameLoader.cpp:

(WebCore::createWindow):

LayoutTests:

  • http/tests/security/contentSecurityPolicy/resources/window-open-javascript-url-blocked.js: Added.
  • http/tests/security/contentSecurityPolicy/window-open-javascript-url-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/window-open-javascript-url-blocked.html: Added.
1:33 AM Changeset in webkit [223497] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222787 - AX: [ATK] ARIA drag-and-drop attribute values should be exposed via AtkObject attributes
https://bugs.webkit.org/show_bug.cgi?id=177763

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the values of aria-grabbed and aria-dropeffect via the "grabbed" and "dropeffect"
AtkObject attributes.

Test: accessibility/gtk/aria-drag-and-drop.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

Implement ariaIsGrabbed() and ariaDropEffects() for ATK.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::ariaIsGrabbed const):
(WTR::AccessibilityUIElement::ariaDropEffects const):

LayoutTests:

  • accessibility/gtk/aria-drag-and-drop-expected.txt: Added.
  • accessibility/gtk/aria-drag-and-drop.html: Added.
1:31 AM Changeset in webkit [223496] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222765 - AX: [ATK] The value of aria-level is not exposed on non-heading roles
https://bugs.webkit.org/show_bug.cgi?id=177775

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the value of aria-level via the "level" AtkObject attribute, as is currently
done for headings.

Test: accessibility/gtk/aria-level.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::hierarchicalLevel const):

LayoutTests:

  • accessibility/gtk/aria-level-expected.txt: Added.
  • accessibility/gtk/aria-level.html: Added.
1:30 AM Changeset in webkit [223495] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222749 - [GTK] Do not hardcode font family in served remote inspector HTML snippets
https://bugs.webkit.org/show_bug.cgi?id=177742

Reviewed by Carlos Garcia Campos.

Instead of hardcoding Cantarell as the font used for the HTML snippets served
by the remote inspector handler, use "font: menu" to obtain the system UI
font, plus a "font-size" rule for adjusting the size.

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::handleRequest): Change the
CSS rules in the served snippet.

1:28 AM Changeset in webkit [223494] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r222737 - [WPE] Remove GnuTLS dependency
https://bugs.webkit.org/show_bug.cgi?id=177750

Patch by Olivier Blin <Olivier Blin> on 2017-10-02
Reviewed by Michael Catanzaro.

libgcrypt is used by default instead of GnuTLS.
See bug 163125

.:

  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

  • PlatformWPE.cmake:
1:28 AM Changeset in webkit [223493] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r222735 - [WPE][GTK] Crash in webkit_web_resource_get_data_finish()
https://bugs.webkit.org/show_bug.cgi?id=177107

Reviewed by Michael Catanzaro.

Source/WebKit:

Handle errors in webkit_web_resource_get_data() callback.

  • UIProcess/API/glib/WebKitWebResource.cpp:

(resourceDataCallback):
(webkit_web_resource_get_data):

Tools:

Add a test case to check we handle errors when webkit_web_resource_get_data() fails.

  • TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp:

(webViewloadChanged):
(testWebResourceGetDataError):
(beforeAll):

1:26 AM Changeset in webkit [223492] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222729 - [WPE] Fix UIProcess build with GStreamer and without VIDEO
https://bugs.webkit.org/show_bug.cgi?id=177753

Patch by Olivier Blin <Olivier Blin> on 2017-10-02
Reviewed by Michael Catanzaro.

GStreamer builds fail when WebAudio is enabled but VIDEO disabled.
This is the WPE counterpart of bug 153135.

  • UIProcess/API/wpe/PageClientImpl.h:
1:26 AM Changeset in webkit [223491] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18

Merge r222727 - [WPE] Do not require XSLT if disabled
https://bugs.webkit.org/show_bug.cgi?id=177752

Patch by Olivier Blin <Olivier Blin> on 2017-10-02
Reviewed by Michael Catanzaro.

  • Source/cmake/OptionsWPE.cmake: libxslt is not a hard dep
1:24 AM Changeset in webkit [223490] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222723 - [GLib] NetworkStateNotifier implementation missing
https://bugs.webkit.org/show_bug.cgi?id=177741

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> on 2017-10-02
Reviewed by Carlos Garcia Campos.

No new tests. The DOM support is already being tested, but we would need a way
of simulating a network outage to test GNetworkMonitor.

  • PlatformGTK.cmake: add new file.
  • PlatformWPE.cmake: add new file.
  • platform/network/NetworkStateNotifier.cpp: no longer need the empty implementations, all platforms covered.
  • platform/network/NetworkStateNotifier.h:
  • platform/network/glib/NetworkStateNotifierGLib.cpp: Added.

(WebCore::NetworkStateNotifier::updateStateWithoutNotifying): update the network state using GNetworkMonitor's availability.
(WebCore::NetworkStateNotifier::networkChangedCallback): when network-changed is emitted, trigger a state update.
(WebCore::NetworkStateNotifier::startObserving): watch GNetworkMonitor's network-changed signal.

1:16 AM Changeset in webkit [223489] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222708 - [GTK][WPE] Enable interactive forms validation by default
https://bugs.webkit.org/show_bug.cgi?id=177737

Reviewed by Michael Catanzaro.

It's currently disabled for no reason.

  • Shared/WebPreferencesDefinitions.h:
1:14 AM Changeset in webkit [223488] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222706 - [SOUP] Default kerberos authentication credentials are used in ephemeral (private) mode
https://bugs.webkit.org/show_bug.cgi?id=177738

Reviewed by Carlos Garcia Campos.

If the session is ephemeral then don't enable the Negotiate support in
our SoupSession.

  • platform/network/soup/NetworkStorageSessionSoup.cpp: Pass the

session ID if it's known to the SoupNetworkSession.
(WebCore::NetworkStorageSession::ensurePrivateBrowsingSession):
(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const):

  • platform/network/soup/SoupNetworkSession.cpp:

(WebCore::SoupNetworkSession::SoupNetworkSession): If the session is
ephemeral (based on given session ID) then don't activate the
Negotiate support in SoupSession.

  • platform/network/soup/SoupNetworkSession.h:

Change the constructor to accept the PAL::SessionID with the default
value set to PAL::SessionID::emptySessionID.

1:12 AM Changeset in webkit [223487] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebDriver

Merge r222703 - WebDriver: HTTP status code is not correct for some of the errors
https://bugs.webkit.org/show_bug.cgi?id=177354

Reviewed by Brian Burg.

I think this changed in the spec at some point. The thing is that no such alert, frame and window and stale
element reference errors should return 404 instead of 400.

https://w3c.github.io/webdriver/webdriver-spec.html#handling-errors

  • CommandResult.cpp:

(WebDriver::CommandResult::httpStatusCode const):

1:02 AM Changeset in webkit [223486] by Carlos Garcia Campos
  • 12 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222684 - Have IPC::Connection::Client objects consistently invalidate the connection when destroyed
https://bugs.webkit.org/show_bug.cgi?id=177708

Reviewed by Anders Carlsson.

I ran into an intermittent crash when running regression tests. It looked like a connection
client was being called after it was destroyed. I did an audit of the all the connection
clients to make sure they all invalidate their connection before they are destroyed.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): Invalidate the
connection since this object opened the connection. There is no obvious
guarantee that the connection will already be invalid when this is destroyed.

  • StorageProcess/StorageToWebProcessConnection.cpp:

(WebKit::StorageToWebProcessConnection::~StorageToWebProcessConnection): Ditto.

  • UIProcess/Plugins/PluginProcessProxy.cpp:

(WebKit::PluginProcessProxy::~PluginProcessProxy): Ditto.

  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::~NetworkProcessConnection): Ditto.

  • WebProcess/Storage/WebToStorageProcessConnection.cpp:

(WebKit::WebToStorageProcessConnection::~WebToStorageProcessConnection): Ditto.

  • StorageProcess/StorageToWebProcessConnection.h: Derive privately rather than publicly

from IPC::Connection::Client because we can, and this means we don't have to study quite
as much code to understand how this is used as a connection client.

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h: Ditto.
  • WebProcess/Storage/WebToStorageProcessConnection.h: Ditto.
  • WebProcess/WebPage/WebInspector.h: Ditto.
  • WebProcess/WebPage/WebInspectorUI.h: Ditto.
  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer): Added a comment about a
reference cycle cycle leading to a leak that I believe exists here.

12:57 AM Changeset in webkit [223485] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222705 - REGRESSION(r222640) [GTK] Build broken with ATK 2.14
https://bugs.webkit.org/show_bug.cgi?id=177634

Reviewed by Michael Catanzaro.

Use ATK_CHECK_VERSION to prevent the build failure.

No new tests. This fixes a downstream build failure.

  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

12:56 AM Changeset in webkit [223484] by Carlos Garcia Campos
  • 7 edits
    10 adds in releases/WebKitGTK/webkit-2.18

Merge r222640 - AX: [ATK] object:state-changed notifications missing for multiple ARIA attributes
https://bugs.webkit.org/show_bug.cgi?id=177542

Source/WebCore:

Add new notification types to AXObjectCache in order to support the notifications
needed, post the notifications to all platforms, emit the signals for ATK.

Reviewed by Chris Fleizach.

Tests: accessibility/gtk/aria-disabled-changed-notification.html

accessibility/gtk/aria-expanded-changed-notification.html
accessibility/gtk/aria-pressed-changed-notification.html
accessibility/gtk/aria-readonly-changed-notification.html
accessibility/gtk/aria-required-changed-notification.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::handleAttributeChanged):

  • accessibility/AXObjectCache.h:
  • accessibility/atk/AXObjectCacheAtk.cpp:

(WebCore::AXObjectCache::postPlatformNotification):

Tools:

Add platform support for the notifications. Also add support for getting the
boolean argument indicating whether the state has been set or unset.

Reviewed by Chris Fleizach.

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:

LayoutTests:

Reviewed by Chris Fleizach.

  • accessibility/gtk/aria-disabled-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-disabled-changed-notification.html: Added.
  • accessibility/gtk/aria-expanded-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-expanded-changed-notification.html: Added.
  • accessibility/gtk/aria-pressed-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-pressed-changed-notification.html: Added.
  • accessibility/gtk/aria-readonly-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-readonly-changed-notification.html: Added.
  • accessibility/gtk/aria-required-changed-notification-expected.txt: Added.
  • accessibility/gtk/aria-required-changed-notification.html: Added.
12:50 AM Changeset in webkit [223483] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.18

Merge r222623 - Add ports 6679 and 6697 (IRC SSL) to port blacklist
https://bugs.webkit.org/show_bug.cgi?id=177544
<rdar://problem/34666525>

Reviewed by Alex Christensen.

Source/WebCore:

Test: security/block-test.html

  • platform/URL.cpp:

(WebCore::portAllowed): Also block port 6679.

LayoutTests:

Update test and expectations for new port.

  • security/block-test-expected.txt:
  • security/block-test.html:
  • platform/gtk/security/block-test-expected.txt:
  • platform/mac/security/block-test-expected.txt:
  • platform/wpe/security/block-test-expected.txt:
12:49 AM Changeset in webkit [223482] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222612 - AX: Defer RenderListBox selectionChanged event until after layout is done.
https://bugs.webkit.org/show_bug.cgi?id=177589
<rdar://problem/34705785>

Reviewed by Chris Fleizach.

Defer AX update when the selection changed event is followed by a layout.

Covered by existing tests.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferSelectedChildrenChangedIfNeeded):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::selectionChanged):

12:46 AM Changeset in webkit [223481] by Carlos Garcia Campos
  • 8 edits in releases/WebKitGTK/webkit-2.18/Source

Merge r222610 - [Cairo] Remove the cairo_glyph_t complexity from GlyphBuffer
https://bugs.webkit.org/show_bug.cgi?id=177598

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Remove the decade-old use of cairo_glyph_t as the underlying type for
Glyph. The former spans 24 bytes in size, while the latte is just 2
bytes. The x and y coordinate attributes of cairo_glyph_t were only
used in FontCascade::drawGlyphs() implementation, where they were
overridden even if the same GlyphBuffer object was used here repeatedly.

FontCascade::drawGlyphs() now creates a new Vector<cairo_glyph_t> object
and fills it only with the glyph index and coordinates data for glyphs
that will actually be drawn. This will likely in the future be leveraged
to pack the necessary data and perform the drawing operations in
parallelized tasks. GlyphBuffer usages that before required USE(CAIRO)
special-casing can now be simplified.

This also removes the need for <cairo.h> header inclusion in the
GlyphBuffer.h header. This further removes Cairo header inclusion in
roughly 600 build targets.

No new tests -- no change in behavior.

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::widthForSimpleText const):

  • platform/graphics/GlyphBuffer.h:

(WebCore::GlyphBuffer::glyphAt const):
(WebCore::GlyphBuffer::add):

  • platform/graphics/cairo/FontCairo.cpp:

(WebCore::drawGlyphsToContext):
(WebCore::drawGlyphsShadow):
(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/displaylists/DisplayListItems.cpp:

(WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const):

Source/WebKit:

  • Shared/API/c/cairo/WKImageCairo.cpp: Explicitly include the <cairo.h>

header here now that it's not included in GlyphBuffer.h.

  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp: Ditto.
12:36 AM Changeset in webkit [223480] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18

Merge r222605 - [REGRESSION] word-spacing property is incorrectly applied
https://bugs.webkit.org/show_bug.cgi?id=142086
<rdar://problem/19985240>

Patch by Fujii Hironori <Fujii Hironori> on 2017-09-27
Reviewed by Zalan Bujtas.

Source/WebCore:

word-spacing property isn't applied to text nodes with starting
with '\n' if the kerning enabled. In Bug 165796, only ' ' and '\t'
are treated for word-spacing, but '\n'. It should be treated as
well.

Test: fast/text/word-space-between-inlines.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::setLogicalWidthForTextRun): Use
FontCascade::treatAsSpace() instead of checking explicitly by
comparing with ' ' and '\t'.

LayoutTests:

  • platform/gtk/TestExpectations: Unmark

fast/text/word-space-between-inlines.html

  • platform/mac/TestExpectations: Unmark

fast/css/word-spacing-between-blocks.html,
fast/css/word-spacing-between-inlines.html,
fast/css/word-spacing-characters.html and
fast/text/word-space-between-inlines.html.

  • platform/gtk/fast/css/word-space-extra-expected.txt:

Rebaselined.

  • platform/mac/fast/css/word-space-extra-expected.png: Ditto.
  • platform/mac/fast/css/word-space-extra-expected.txt: Ditto.
12:32 AM Changeset in webkit [223479] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222604 - [Cairo] Remove unnecessary cairo.h includes
https://bugs.webkit.org/show_bug.cgi?id=177540

Reviewed by Carlos Garcia Campos.

Drop unnecessary includes of the cairo.h header from the Font.h,
FontPlatformData.h and Pattern.h headers. For the former two the
header isn't required, while in the last one we can use a forward
declaration for the cairo_pattern_t type instead of including
the whole Cairo headers to have that available.

  • platform/graphics/Font.h:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/Pattern.h:
12:24 AM Changeset in webkit [223478] by Carlos Garcia Campos
  • 11 edits
    1 delete in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222603 - [Cairo] Drop cairo_matrix_t conversion operators for AffineTransform, TransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=177539

Reviewed by Carlos Garcia Campos.

Remove the cairo_matrix_t conversion operators from the AffineTransform
and TransformationMatrix classes. These are rarely used, but enforce
including the cairo.h header in both headers, which leads to the Cairo
headers being included in around 800 build targets.

Instead, the toCairoMatrix() function is added to CairoUtilities.h that
creates a cairo_matrix_t object for the given AffineTransform. No
toCairoMatrix() is needed for TransformationMatrix since objects of
that type aren't converted to cairo_matrix_t anywhere in the codebase.

This patch excludes unnecessary Cairo headers from about 550 build
targets (with those headers being included in the other affected 250
targets by some other header inclusion chain). CairoUtilities.h header
is now included where necessary to make toCairoMatrix() available, and
duplicated cairo.h inclusions are removed.

No new tests -- no change in behavior.

  • editing/gtk/EditorGtk.cpp: Explicitly include <cairo.h> since it's

necessary for Cairo operations used there.

  • platform/Cairo.cmake:
  • platform/graphics/cairo/CairoUtilities.cpp:

(WebCore::drawPatternToCairoContext):
(WebCore::toCairoMatrix):

  • platform/graphics/cairo/CairoUtilities.h:
  • platform/graphics/cairo/GradientCairo.cpp:

(WebCore::Gradient::platformGradient):
(WebCore::Gradient::setPlatformGradientSpaceTransform):

  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::concatCTM):
(WebCore::GraphicsContext::setCTM):

  • platform/graphics/cairo/PathCairo.cpp: No need to include AffineTransform.h.

(WebCore::Path::addPath):
(WebCore::Path::transform):

  • platform/graphics/cairo/PatternCairo.cpp: Ditto.

(WebCore::Pattern::createPlatformPattern const):

  • platform/graphics/cairo/TransformationMatrixCairo.cpp: Removed.
  • platform/graphics/transforms/AffineTransform.h:
  • platform/graphics/transforms/TransformationMatrix.h:
12:12 AM Changeset in webkit [223477] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/LayoutTests

[GStreamer][MSE] Unreviewed microgardening
https://bugs.webkit.org/show_bug.cgi?id=178344

Updates the following expectations:

  • imported/w3c/web-platform-tests/media-source/mediasource-is-type-supported.html

Updated with current output (as a prerequisite to land this:
https://bugs.webkit.org/show_bug.cgi?id=178160, which improves the
-expected output a bit)

  • imported/w3c/web-platform-tests/media-source/SourceBuffer-abort*.html

Marked them as passing, as they have been passing for a while.

  • imported/w3c/web-platform-tests/media-source/mediasource-play-then-seek-back.html imported/w3c/web-platform-tests/media-source/mediasource-sourcebuffer-mode.html

Marked them as passing. They were crashing on the build bot because
the changes of https://bugs.webkit.org/show_bug.cgi?id=176804 were
not being built, but Carlos López is already working on that.

Patch by Alicia Boya García <aboya@igalia.com> on 2017-10-17

  • platform/gtk/TestExpectations:
12:10 AM Changeset in webkit [223476] by keith_miller@apple.com
  • 418 edits
    2 adds
    2 deletes in trunk

Change WebCore sources to work with unified source builds
https://bugs.webkit.org/show_bug.cgi?id=178229

Rubber stamped by Tim Horton.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

This patch does the following:

1) Move all “using namespace <name>;” into the WebCore namespace
(They used to go in the global namespace) and change to "using
WebCore::<name>;” in .mm files.

2) Move a bunch of the soft linking library/framework macros out
of the .mm files since those caused name collision problems.

3) Fix minor other naming collisions.

The problem with 1 in a unified source world is generic names
often collide with system header names. For example, WebCore has a
Rect class and that collided with a system header type elsewhere.

This patch shouldn't change behavior so no new tests.

  • Configurations/FeatureDefines.xcconfig:
  • Modules/cache/CacheStorageConnection.cpp:
  • Modules/cache/DOMCache.cpp:
  • Modules/cache/DOMCacheStorage.cpp:
  • Modules/cache/WorkerCacheStorageConnection.cpp:
  • Modules/encryptedmedia/InitDataRegistry.cpp:
  • Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
  • Modules/indexeddb/IDBCursor.cpp:
  • Modules/indexeddb/IDBFactory.cpp:
  • Modules/indexeddb/IDBIndex.cpp:
  • Modules/indexeddb/IDBKeyRange.cpp:
  • Modules/indexeddb/IDBObjectStore.cpp:
  • Modules/indexeddb/IDBRequest.cpp:
  • Modules/indexeddb/IDBTransaction.cpp:
  • Modules/indexeddb/server/MemoryObjectStore.cpp:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:
  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::setReadyState):
(WebCore::toString): Deleted.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
  • Modules/plugins/QuickTimePluginReplacement.mm:

(WebCore::jsValueWithAVMetadataItemInContext):

  • Modules/webdriver/NavigatorWebDriver.cpp:
  • PlatformAppleWin.cmake:
  • PlatformMac.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • accessibility/ios/AccessibilityObjectIOS.mm:

(-[WAKView accessibilityIsIgnored]): Deleted.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WAKView accessibilityIsIgnored]):

  • accessibility/win/AXObjectCacheWin.cpp:
  • bindings/js/CommonVM.cpp:
  • bindings/js/DOMWrapperWorld.cpp:
  • bindings/js/GCController.cpp:
  • bindings/js/IDBBindingUtilities.cpp:
  • bindings/js/JSAudioTrackCustom.cpp:
  • bindings/js/JSAudioTrackListCustom.cpp:
  • bindings/js/JSBlobCustom.cpp:
  • bindings/js/JSCSSRuleCustom.cpp:
  • bindings/js/JSCSSRuleListCustom.cpp:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • bindings/js/JSCallbackData.cpp:
  • bindings/js/JSCanvasRenderingContext2DCustom.cpp:
  • bindings/js/JSCustomElementInterface.cpp:
  • bindings/js/JSCustomElementRegistryCustom.cpp:
  • bindings/js/JSCustomEventCustom.cpp:
  • bindings/js/JSDOMBindingSecurity.cpp:
  • bindings/js/JSDOMBuiltinConstructorBase.cpp:
  • bindings/js/JSDOMConstructorBase.cpp:
  • bindings/js/JSDOMConstructorWithDocument.cpp:
  • bindings/js/JSDOMConvertDate.cpp:
  • bindings/js/JSDOMConvertNumbers.cpp:
  • bindings/js/JSDOMConvertStrings.cpp:
  • bindings/js/JSDOMConvertWebGL.cpp:
  • bindings/js/JSDOMExceptionHandling.cpp:
  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMGlobalObjectTask.cpp:
  • bindings/js/JSDOMGuardedObject.cpp:
  • bindings/js/JSDOMPromiseDeferred.cpp:
  • bindings/js/JSDOMQuadCustom.cpp:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowProxy.cpp:
  • bindings/js/JSDOMWrapper.cpp:
  • bindings/js/JSDOMWrapperCache.cpp:
  • bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSDocumentFragmentCustom.cpp:
  • bindings/js/JSElementCustom.cpp:
  • bindings/js/JSErrorHandler.cpp:
  • bindings/js/JSEventCustom.cpp:
  • bindings/js/JSEventListener.cpp:
  • bindings/js/JSEventTargetCustom.cpp:
  • bindings/js/JSFileSystemEntryCustom.cpp:
  • bindings/js/JSHTMLCollectionCustom.cpp:
  • bindings/js/JSHTMLDocumentCustom.cpp:
  • bindings/js/JSHTMLTemplateElementCustom.cpp:
  • bindings/js/JSHistoryCustom.cpp:
  • bindings/js/JSIDBCursorCustom.cpp:
  • bindings/js/JSIDBCursorWithValueCustom.cpp:
  • bindings/js/JSIDBIndexCustom.cpp:
  • bindings/js/JSIDBObjectStoreCustom.cpp:
  • bindings/js/JSIDBTransactionCustom.cpp:
  • bindings/js/JSImageDataCustom.cpp:
  • bindings/js/JSLazyEventListener.cpp:
  • bindings/js/JSLocationCustom.cpp:
  • bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
  • bindings/js/JSMessageEventCustom.cpp:
  • bindings/js/JSMessagePortCustom.cpp:
  • bindings/js/JSMutationObserverCustom.cpp:
  • bindings/js/JSNodeCustom.cpp:
  • bindings/js/JSNodeListCustom.cpp:
  • bindings/js/JSPerformanceEntryCustom.cpp:
  • bindings/js/JSPluginElementFunctions.cpp:
  • bindings/js/JSPopStateEventCustom.cpp:
  • bindings/js/JSReadableStreamPrivateConstructors.cpp:
  • bindings/js/JSReadableStreamSourceCustom.cpp:
  • bindings/js/JSSVGPathSegCustom.cpp:
  • bindings/js/JSTextTrackCueCustom.cpp:
  • bindings/js/JSTextTrackCustom.cpp:
  • bindings/js/JSTextTrackListCustom.cpp:
  • bindings/js/JSTrackCustom.cpp:
  • bindings/js/JSVideoTrackCustom.cpp:
  • bindings/js/JSVideoTrackListCustom.cpp:
  • bindings/js/JSWebGL2RenderingContextCustom.cpp:
  • bindings/js/JSWebGLRenderingContextCustom.cpp:
  • bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp:
  • bindings/js/JSWebGPURenderingContextCustom.cpp:
  • bindings/js/JSWorkerGlobalScopeBase.cpp:
  • bindings/js/JSWorkerGlobalScopeCustom.cpp:
  • bindings/js/JSXMLHttpRequestCustom.cpp:
  • bindings/js/JSXPathNSResolverCustom.cpp:
  • bindings/js/ReadableStream.cpp:

(WebCore::ReadableStream::pipeTo):
(WebCore::ReadableStream::tee):
(WebCore::checkReadableStream):
(WebCore::callFunction): Deleted.

  • bindings/js/ScheduledAction.cpp:
  • bindings/js/ScriptCachedFrameData.cpp:
  • bindings/js/ScriptController.cpp:
  • bindings/js/SerializedScriptValue.cpp:
  • bindings/js/StructuredClone.cpp:
  • bindings/js/WebCoreJSClientData.cpp:
  • bindings/js/WorkerScriptController.cpp:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateEnumerationImplementation):
(GenerateImplementation):
(GenerateDictionaryImplementation):
(GenerateCallbackFunctionImplementation):
(GenerateCallbackInterfaceImplementation):

  • bindings/scripts/test/JS/JSInterfaceName.cpp:
  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCallTracer.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp:
  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
  • bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
  • bindings/scripts/test/JS/JSTestStringifier.cpp:
  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
  • bridge/IdentifierRep.cpp:
  • bridge/NP_jsobject.cpp:

(ObjectMap::get): Deleted.
(ObjectMap::add): Deleted.
(ObjectMap::remove): Deleted.
(objectMap): Deleted.
(ObjectMap::RootObjectInvalidationCallback::operator()): Deleted.
(getListFromVariantArgs): Deleted.
(jsAllocate): Deleted.
(jsDeallocate): Deleted.
(_NPN_CreateNoScriptObject): Deleted.
(_NPN_InvokeDefault): Deleted.
(_NPN_Invoke): Deleted.
(_NPN_Evaluate): Deleted.
(_NPN_GetProperty): Deleted.
(_NPN_SetProperty): Deleted.
(_NPN_RemoveProperty): Deleted.
(_NPN_HasProperty): Deleted.
(_NPN_HasMethod): Deleted.
(_NPN_SetException): Deleted.
(_NPN_Enumerate): Deleted.
(_NPN_Construct): Deleted.

  • bridge/NP_jsobject.h:
  • contentextensions/ContentExtensionParser.cpp:
  • crypto/SubtleCrypto.cpp:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):
(WebCore::CryptoAlgorithmAES_CFB::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::importKey):
(WebCore::CryptoAlgorithmAES_CTR::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::tagLengthIsValid):
(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):
(WebCore::CryptoAlgorithmAES_GCM::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::importKey):
(WebCore::CryptoAlgorithmRSA_PSS::exportKey):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):
(WebCore::commonCryptoHMACAlgorithm): Deleted.

  • css/CSSBasicShapes.cpp:
  • css/CSSPrimitiveValue.cpp:
  • css/parser/CSSParser.cpp:
  • css/parser/CSSPropertyParser.cpp:
  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues):
(WebCore::CSSPropertyParserHelpers::consumePosition):
(WebCore::CSSPropertyParserHelpers::createPrimitiveValuePair): Deleted.

  • dom/DOMQuad.cpp:
  • dom/Document.cpp:
  • dom/ErrorEvent.cpp:
  • dom/EventListenerMap.cpp:
  • dom/EventTarget.cpp:
  • dom/PromiseRejectionEvent.cpp:
  • dom/RejectedPromiseTracker.cpp:
  • dom/ScriptExecutionContext.cpp:
  • domjit/JSDocumentDOMJIT.cpp:
  • domjit/JSDocumentFragmentDOMJIT.cpp:
  • domjit/JSElementDOMJIT.cpp:
  • domjit/JSEventDOMJIT.cpp:
  • domjit/JSNodeDOMJIT.cpp:
  • editing/TextIterator.cpp:
  • editing/cocoa/HTMLConverter.mm:
  • history/CachedPage.cpp:
  • html/HTMLCanvasElement.cpp:
  • html/HTMLFontElement.cpp:
  • html/HTMLMediaElement.cpp:
  • html/HTMLSelectElement.cpp:
  • html/TypeAhead.cpp:
  • html/parser/HTMLSrcsetParser.cpp:

(WebCore::tokenizeDescriptors):

  • html/parser/HTMLTokenizer.cpp:
  • html/parser/ParsingUtilities.h:

(WebCore::isNotASCIISpace):

  • html/parser/XSSAuditorDelegate.cpp:
  • html/track/DataCue.cpp:
  • inspector/CommandLineAPIHost.cpp:
  • inspector/CommandLineAPIModule.cpp:
  • inspector/InspectorApplicationCacheAgent.cpp:
  • inspector/InspectorCSSAgent.cpp:
  • inspector/InspectorCanvas.cpp:
  • inspector/InspectorCanvasAgent.cpp:
  • inspector/InspectorClient.cpp:
  • inspector/InspectorController.cpp:
  • inspector/InspectorDOMAgent.cpp:
  • inspector/InspectorDOMDebuggerAgent.cpp:
  • inspector/InspectorDOMStorageAgent.cpp:
  • inspector/InspectorDatabaseAgent.cpp:
  • inspector/InspectorDatabaseResource.cpp:
  • inspector/InspectorFrontendClientLocal.cpp:
  • inspector/InspectorFrontendHost.cpp:
  • inspector/InspectorIndexedDBAgent.cpp:
  • inspector/InspectorInstrumentation.cpp:
  • inspector/InspectorLayerTreeAgent.cpp:
  • inspector/InspectorMemoryAgent.cpp:
  • inspector/InspectorNetworkAgent.cpp:
  • inspector/InspectorOverlay.cpp:
  • inspector/InspectorPageAgent.cpp:
  • inspector/InspectorShaderProgram.cpp:
  • inspector/InspectorStyleSheet.cpp:
  • inspector/InspectorTimelineAgent.cpp:
  • inspector/InspectorWorkerAgent.cpp:
  • inspector/InstrumentingAgents.cpp:
  • inspector/NetworkResourcesData.cpp:
  • inspector/PageConsoleAgent.cpp:
  • inspector/PageDebuggerAgent.cpp:
  • inspector/PageHeapAgent.cpp:
  • inspector/PageRuntimeAgent.cpp:
  • inspector/PageScriptDebugServer.cpp:
  • inspector/TimelineRecordFactory.cpp:
  • inspector/WebConsoleAgent.cpp:
  • inspector/WebDebuggerAgent.cpp:
  • inspector/WebHeapAgent.cpp:
  • inspector/WebInjectedScriptHost.cpp:
  • inspector/WebInjectedScriptManager.cpp:
  • inspector/WorkerConsoleAgent.cpp:
  • inspector/WorkerDebuggerAgent.cpp:
  • inspector/WorkerInspectorController.cpp:
  • inspector/WorkerRuntimeAgent.cpp:
  • inspector/WorkerScriptDebugServer.cpp:
  • loader/FTPDirectoryParser.cpp:
  • loader/TextResourceDecoder.cpp:
  • loader/cache/CachedResource.cpp:
  • loader/cache/CachedResourceLoader.cpp:
  • page/ContextMenuController.cpp:
  • page/DOMWindow.cpp:
  • page/Navigator.cpp:
  • page/PageConsoleClient.cpp:
  • page/PageDebuggable.cpp:
  • page/cocoa/ResourceUsageOverlayCocoa.mm:
  • page/csp/ContentSecurityPolicy.cpp:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::isNotASCIISpace): Deleted.

  • page/csp/ContentSecurityPolicyMediaListDirective.cpp:

(WebCore::isNotASCIISpace): Deleted.

  • page/scrolling/ios/ScrollingTreeIOS.cpp:
  • page/scrolling/ios/ScrollingTreeIOS.h:
  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
(WebCore::operator*): Deleted.

  • page/scrolling/mac/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
(WebCore::operator*): Deleted.

  • platform/Length.cpp:
  • platform/URL.cpp:

(WebCore::isSchemeFirstChar):
(WebCore::isSchemeChar):
(WebCore::isBadChar):
(WebCore::isTabNewline):

  • platform/audio/WebAudioBufferList.cpp:

(WebCore::WebAudioBufferList::WebAudioBufferList):

  • platform/audio/mac/AudioSampleDataSource.mm:

(WebCore::AudioSampleDataSource::pushSamples):

  • platform/cf/CoreMediaSoftLink.cpp: Removed.
  • platform/cf/CoreMediaSoftLink.h: Removed.
  • platform/encryptedmedia/clearkey/CDMClearKey.cpp:
  • platform/graphics/FloatPolygon.cpp:

(WebCore::areCollinearPoints):
(WebCore::FloatPolygon::FloatPolygon):
(WebCore::VertexPair::intersection const):
(WebCore::determinant): Deleted.

  • platform/graphics/FontCache.cpp:
  • platform/graphics/FontCascade.cpp:
  • platform/graphics/GraphicsContext3DPrivate.cpp:
  • platform/graphics/WidthIterator.cpp:
  • platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:

(WebCore::AudioSourceProviderAVFObjC::process):

  • platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:

(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
(WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):

  • platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
  • platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:

(WebCore::assetTrackMeetsHardwareDecodeRequirements):

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

(WebCore::ImageDecoderAVFObjC::readSampleMetadata):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
  • platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
  • platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
  • platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:
  • platform/graphics/cairo/ImageBufferCairo.cpp:
  • platform/graphics/cg/ImageBufferCG.cpp:

(WebCore::ImageBuffer::ImageBuffer):
(WebCore::releaseImageData): Deleted.

  • platform/graphics/cg/ImageBufferDataCG.h:
  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:
  • platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
  • platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • platform/graphics/opentype/OpenTypeMathData.cpp:
  • platform/graphics/opentype/OpenTypeVerticalData.cpp:
  • platform/graphics/transforms/MatrixTransformOperation.cpp:

(WebCore::MatrixTransformOperation::blend):
(WebCore::createOperation): Deleted.

  • platform/graphics/win/FontPlatformDataCairoWin.cpp:
  • platform/graphics/win/FontWin.cpp:
  • platform/graphics/win/GraphicsContextCGWin.cpp:
  • platform/graphics/win/GraphicsContextCairoWin.cpp:
  • platform/graphics/win/GraphicsContextDirect2D.cpp:
  • platform/graphics/win/GraphicsContextWin.cpp:
  • platform/graphics/win/UniscribeController.cpp:
  • platform/image-decoders/ScalableImageDecoder.cpp:

(): Deleted.

  • platform/ios/LegacyTileLayer.mm:

(-[LegacyTileHostLayer renderInContext:]):

  • platform/ios/PlaybackSessionInterfaceAVKit.mm:
  • platform/ios/ScrollAnimatorIOS.mm:
  • platform/ios/VideoFullscreenInterfaceAVKit.mm:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController skipBackwardThirtySeconds:]):
(-[WebAVPlayerController gotoEndOfSeekableRanges:]):
(-[WebAVPlayerController canSeekToBeginning]):
(-[WebAVPlayerController canSeekToEnd]):
(-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVPlayerController updateMinMaxTiming]):

  • platform/ios/WebEvent.mm:
  • platform/ios/WebItemProviderPasteboard.mm:
  • platform/ios/wak/WKContentObservation.cpp:
  • platform/mac/KeyEventMac.mm:
  • platform/mac/PlaybackSessionInterfaceMac.mm:

(WebCore::timeRangesToArray):

  • platform/mac/ScrollAnimatorMac.mm:

(macScrollbarTheme): Deleted.
(scrollerImpForScrollbar): Deleted.

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::scrollbarMap):

  • platform/mac/VideoFullscreenInterfaceMac.mm:
  • platform/mac/WebCoreFullScreenPlaceholderView.mm:
  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::dataForURLComponentType):

  • platform/mac/WebPlaybackControlsManager.mm:
  • platform/mac/WebVideoFullscreenController.mm:

(SOFT_LINK_CLASS): Deleted.

  • platform/mac/WebVideoFullscreenHUDWindowController.mm:
  • platform/mac/WebWindowAnimation.mm:

(WebWindowAnimationDurationFromDuration): Deleted.
(scaledRect): Deleted.
(squaredDistance): Deleted.

  • platform/mediastream/RealtimeOutgoingVideoSource.cpp:
  • platform/mediastream/mac/AVCaptureDeviceManager.mm:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::applyFrameRate):
(WebCore::AVVideoCaptureSource::processNewFrame):

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
  • platform/mediastream/mac/CoreAudioCaptureDevice.cpp:
  • platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:
  • platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
  • platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
  • platform/network/HTTPParsers.cpp:
  • platform/text/LocaleICU.cpp:
  • platform/text/TextCodecLatin1.cpp:
  • platform/text/TextCodecUTF8.cpp:
  • platform/text/TextEncodingRegistry.cpp:
  • platform/text/win/LocaleWin.cpp:
  • platform/win/BString.cpp:
  • platform/win/KeyEventWin.cpp:
  • platform/win/ScrollbarThemeWin.cpp:
  • rendering/BidiRun.cpp:
  • rendering/FloatingObjects.cpp:
  • rendering/RenderBlock.cpp:
  • rendering/RenderListMarker.cpp:
  • rendering/RenderQuote.cpp:
  • rendering/RenderText.cpp:
  • rendering/RenderThemeWin.cpp:
  • testing/Internals.cpp:
  • testing/js/WebCoreTestSupport.cpp:
  • workers/WorkerConsoleClient.cpp:
  • workers/WorkerGlobalScope.cpp:
  • workers/WorkerInspectorProxy.cpp:
  • xml/SoftLinkLibxslt.cpp: Added.
  • xml/SoftLinkLibxslt.h: Added.
  • xml/XPathGrammar.cpp:
  • xml/XPathParser.cpp:
  • xml/XSLStyleSheetLibxslt.cpp:
  • xml/XSLTExtensions.cpp:
  • xml/XSLTProcessorLibxslt.cpp:
  • xml/XSLTUnicodeSort.cpp:

(xsltTransformErrorTrampoline):
(WebCore::xsltUnicodeSortFunction):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::updateLeafTextNode):
(WebCore::toString): Deleted.

Source/WebCore/PAL:

Move soft linking code from WebCore to PAL.

  • Configurations/FeatureDefines.xcconfig:
  • pal/cf/CoreMediaSoftLink.cpp:
  • pal/cf/CoreMediaSoftLink.h:
  • pal/spi/cocoa/NSAttributedStringSPI.h:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/Platform.h:
  • wtf/cocoa/SoftLinking.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
12:05 AM Changeset in webkit [223475] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.18

Merge r222601 - REGRESSION(210837): RegExp containing failed non-zero minimum greedy groups incorrectly match
https://bugs.webkit.org/show_bug.cgi?id=177570

Reviewed by Filip Pizlo.

JSTests:

New regression test.

  • stress/regress-177570.js: Added.

Source/JavaScriptCore:

The change in r210837 neglected to change the check in Interpreter::backtrackParentheses() that
greedy parenthesis have backtracked as far as possible. Prior to r210837 when non-zero minimum greedy
parenthesis were factored into a fixed component and then a zero-based variable component. After
r210837, the variable component is not zero based and the check needs to compare the
backTrack->matchAmount with the quantity iminimum count.

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::backtrackParentheses):

12:04 AM Changeset in webkit [223474] by Carlos Garcia Campos
  • 3 edits
    1 add in releases/WebKitGTK/webkit-2.18

Merge r222598 - JSArray::canFastCopy() should fail if the source and destination arrays are the same.
https://bugs.webkit.org/show_bug.cgi?id=177584
<rdar://problem/34463903>

Reviewed by Saam Barati.

JSTests:

  • stress/regress-177584.js: Added.

(assertEqual):
(Array.prototype.Symbol.species):

Source/JavaScriptCore:

If the source and destination arrays are the same, we may be copying overlapping
regions. Hence, we need to take the slow path.

  • runtime/JSArrayInlines.h:

(JSC::JSArray::canFastCopy):

12:00 AM Changeset in webkit [223473] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18

Merge r222594 - Deferred image size change makes image-load-on-delay.html flaky.
https://bugs.webkit.org/show_bug.cgi?id=177520
<rdar://problem/34674299>

Reviewed by Dean Jackson.

Source/WebCore:

Only defer recomputeIsIgnored when the image change actually triggers layout.

  • accessibility/AXObjectCache.cpp:

(WebCore::rendererNeedsDeferredUpdate):
(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::deferRecomputeIsIgnoredIfNeeded):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

LayoutTests:

  • platform/mac/TestExpectations:
12:00 AM Changeset in webkit [223472] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r222546 - AX: Defer RenderImage's imageChanged event until after layout is done.
https://bugs.webkit.org/show_bug.cgi?id=177446

Reviewed by Dean Jackson.

Source/WebCore:

This is to avoid unintentional tree mutation during layout.

Covered by existing tests.

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::imageChanged):

LayoutTests:

  • accessibility/image-load-on-delay.html:

Oct 16, 2017:

11:56 PM Changeset in webkit [223471] by Wenson Hsieh
  • 5 edits in trunk

Allow reading data and blob URLs via DataTransfer when the pasteboard contains files
https://bugs.webkit.org/show_bug.cgi?id=178377

Reviewed by Ryosuke Niwa.

Source/WebCore:

Adds data and blob URLs, alongside http(s), as URL protocols safe to expose to bindings.

Test: editing/pasteboard/drag-drop-href-as-url.html

  • platform/Pasteboard.cpp:

(WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):

LayoutTests:

Tweaks an existing layout test to test dragging and dropping more URL protocols (ftp:, data: and blob:).

  • editing/pasteboard/drag-drop-href-as-url-expected.txt:
  • editing/pasteboard/drag-drop-href-as-url.html:
11:51 PM Changeset in webkit [223470] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222588 - Minimum font size may cause elements to have an infinite line-height
https://bugs.webkit.org/show_bug.cgi?id=177573
<rdar://problem/34573792>

Reviewed by Dan Bernstein.

Source/WebCore:

When minimum font size is specified, we were trying to preserve the ratio of specified font-size
and specified line-height in order to boost the computed font size proportionately to the font-size
boost. However, this doesn't work when the specified font-size is 0, because the ratio between
line-height and font-size is infinite.

The most straightforward solution is just to make small font-sizes opt out of the line-height
adjustment because the result would be too big.

Test: fast/text/line-height-minimumFontSize-text-small-font-size.html

  • css/StyleBuilderCustom.h:

(WebCore::computeLineHeightMultiplierDueToFontSize):
(WebCore::StyleBuilderCustom::applyValueLineHeight):

LayoutTests:

  • fast/text/line-height-minimumFontSize-text-small-font-size-expected.txt: Added.
  • fast/text/line-height-minimumFontSize-text-small-font-size.html: Added.
11:48 PM Changeset in webkit [223469] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222576 - "Tag" codepoints require the complex text codepath
https://bugs.webkit.org/show_bug.cgi?id=177251
<rdar://problem/34384001>

Reviewed by David Hyatt.

Source/WebCore:

Previously, Tag codepoints (U+E0000 - U+E007F) weren't triggering the
complex text codepath.

Eventually, we should migrate the default from simple to complex. I'll do
that in a separate patch.

Test: fast/text/flag-codepoint.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

  • fast/text/flag-codepoint-expected.html: Added.
  • fast/text/flag-codepoint.html: Added.
11:38 PM Changeset in webkit [223468] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18

Merge r222551 - [ATK] atk_table_cell_get_position() should return values of aria-rowindex and aria-colindex, if present
https://bugs.webkit.org/show_bug.cgi?id=171176

Reviewed by Chris Fleizach.

Source/WebCore:

Modify webKitAccessibleTableCellGetPosition() to prefer the ARIA value
over the DOM-based value.

No new tests needed: We have coverage through aria-table-attributes.html.
Platform expectations for this test were updated.

  • accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:

(webkitAccessibleTableCellGetPosition):

LayoutTests:

  • accessibility/aria-table-attributes.html: Updated to reflect new behavior.
  • platform/gtk/accessibility/aria-table-attributes-expected.txt: Updated to reflect new behavior.
11:33 PM Changeset in webkit [223467] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222544 - AX: Several ARIA roles with presentational children are exposing children
https://bugs.webkit.org/show_bug.cgi?id=177502

Reviewed by Chris Fleizach.

Source/WebCore:

Add MenuItemCheckboxRole, MenuItemRadioRole, and SplitterRole to the list
of AccessibilityRole types which cannot have children. In the case of
DocumentMathRole, only treat children as presentational (excluded from the
accessibility tree) if the element is not MathML.

Test: accessibility/presentational-children.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::canHaveChildren const):

LayoutTests:

New test. Also update the results for the inspector because ARIA separators
and their subclass roles should not expose (claim to have) children.

  • accessibility/presentational-children-expected.txt: Added.
  • accessibility/presentational-children.html: Added.
  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt: Updated.
11:32 PM Changeset in webkit [223466] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222539 - Fall back to normal line layout position, when simple line layout fails to find one.
https://bugs.webkit.org/show_bug.cgi?id=176220
<rdar://problem/34205774>

Reviewed by Brent Fulgham.

Source/WebCore:

In case of empty content, let's just fall back to normal line layout and try to
find the visually correct one.

Test: fast/text/invalid-positionForPoint-offset.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint):

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::RunResolver::runForPoint const):

LayoutTests:

  • fast/text/invalid-positionForPoint-offset-expected.txt: Added.
  • fast/text/invalid-positionForPoint-offset.html: Added.
11:31 PM Changeset in webkit [223465] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222536 - Web Automation: overflow:hidden elements with no children are mistakenly reported as not visible
https://bugs.webkit.org/show_bug.cgi?id=177514
<rdar://problem/31936291>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/atoms/ElementDisplayed.js:

(isShown.isElementSubtreeHiddenByOverflow):
Array.prototype.every returns true when passed an empty list, so we need
to check for the case where the element has no children and return 'false'.

11:29 PM Changeset in webkit [223464] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222527 - AX: ARIA grids claim to be multiselectable even with aria-multiselectable is set to false
https://bugs.webkit.org/show_bug.cgi?id=177498

Reviewed by Chris Fleizach.

Source/WebCore:

AccessibilityARIAGrid::isMultiSelectable() was unconditionally returning
true. Modify it to return false if aria-multiselectable has been set to
false by the author.

Test: accessibility/aria-multiselectable-grid.html

  • accessibility/AccessibilityARIAGrid.cpp:

(WebCore::AccessibilityARIAGrid::isMultiSelectable const):

  • accessibility/AccessibilityARIAGrid.h:

LayoutTests:

  • accessibility/aria-multiselectable-grid-expected.txt: Added.
  • accessibility/aria-multiselectable-grid.html: Added.
11:28 PM Changeset in webkit [223463] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222520 - Harden our access to the vector of URL schemes.
https://bugs.webkit.org/show_bug.cgi?id=177470
<rdar://problem/33881522>

Reviewed by Chris Dumez.

Instead of asserting, use MESSAGE_CHECK so that we actually refuse to access an invalid iterator.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::startURLSchemeTask):
(WebKit::WebPageProxy::stopURLSchemeTask):

11:25 PM Changeset in webkit [223462] by rniwa@webkit.org
  • 5 edits
    2 adds in trunk

Strip away event handlers and JavaScript URLs when copying
https://bugs.webkit.org/show_bug.cgi?id=178375

Reviewed by Wenson Hsieh.

Source/WebCore:

Don't serialize event handlers and URLs with javascript protocol when serializing HTML
since they're not safe to be pasted elsewhere.

Test: editing/pasteboard/copying-html-strips-javascript-url-and-event-handler.html

  • dom/Element.cpp:

(WebCore::Element::isEventHandlerAttribute const):
(WebCore::isEventHandlerAttribute): Deleted.

  • dom/Element.h:
  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::appendElement):

LayoutTests:

Added a regression test.

  • editing/pasteboard/copying-html-strips-javascript-url-and-event-handler-expected.txt: Added.
  • editing/pasteboard/copying-html-strips-javascript-url-and-event-handler.html: Added.
11:24 PM Changeset in webkit [223461] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore/PAL

Merge r222497 - [GCrypt] Only report libgcrypt errors when logging is enabled
https://bugs.webkit.org/show_bug.cgi?id=177360

Reviewed by Xabier Rodriguez-Calvar.

  • pal/crypto/gcrypt/Utilities.h:

(PAL::GCrypt::logError): Only print out the libgcrypt error on stderr
when logging is enabled at build-time, avoiding unnecessary output in
non-debugging use cases.

11:23 PM Changeset in webkit [223460] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18

Merge r222494 - [CMake] Use implicit include directories for Clang as well
https://bugs.webkit.org/show_bug.cgi?id=177426

Reviewed by Michael Catanzaro.

In WebKitCompilerFlags.cmake, also gather and use the system
include directories for C and C++ build targets when compiling
with Clang. This fixes compilation errors when cross-building
WebKit with a Clang-based toolchain.

COMPILER_IS_GCC_OR_CLANG is used to check for GCC or Clang
compilers. That only checks for the C++ compiler, but it's not
reasonable to expect two widely different compilers being used
for C and C++ compilation.

  • Source/cmake/WebKitCompilerFlags.cmake:
11:21 PM Changeset in webkit [223459] by dino@apple.com
  • 3 edits
    2 adds in trunk

WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
https://bugs.webkit.org/show_bug.cgi?id=178223
<rdar://problem/34597567>

Reviewed by Antoine Quint.

Source/WebCore:

Remove the limit of 4k on the width/height of the renderbuffer.

Test: fast/canvas/webgl/large-drawing-buffer-resize.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::reshape):

LayoutTests:

Test that resizes an already large buffer to make sure it
doesn't get clamped to 4k.

  • fast/canvas/webgl/large-drawing-buffer-resize-expected.txt: Added.
  • fast/canvas/webgl/large-drawing-buffer-resize.html: Added.
10:52 PM Changeset in webkit [223458] by rniwa@webkit.org
  • 6 edits in trunk/Source/WebCore

Assert that Node::insertedInto doesn't fire an event
https://bugs.webkit.org/show_bug.cgi?id=178376
<rdar://problem/35022857>

Reviewed by Daniel Bates.

Fixed the assertion in notifyChildNodeInserted since this function MUST NOT dispatch an event,
and moved a bunch of event-dispatching code from Node::insertedInto into Node::finishedInsertingSubtree.

No new tests since the existing tests cover the behavioral change.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted): Fixed the assertion.

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::insertedInto):
(WebCore::ProcessingInstruction::finishedInsertingSubtree): Extracted from insertedInto since
checkStyleSheet can dispatch an event.

  • dom/ProcessingInstruction.h:
  • html/HTMLBodyElement.cpp:

(WebCore::HTMLBodyElement::insertedInto):
(WebCore::HTMLBodyElement::finishedInsertingSubtree): Extracted from insertedInto since
setIntegralAttribute could dispatch DOMAttrModified synchronously.

  • html/HTMLBodyElement.h:
10:12 PM Changeset in webkit [223457] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

ServiceWorkerRegistration should subclass RefCounted<>
https://bugs.webkit.org/show_bug.cgi?id=178374

Reviewed by Ryosuke Niwa.

ServiceWorkerRegistration should subclass RefCounted<> or we end up with an infinite recursion
when constructing such object. This is because ServiceWorkerRegistration subclasses
EventTargetWithInlineData which implements ref() / deref() by calling refEventTarget() /
derefEventTarget(). refEventTarget() / derefEventTarget() are implemented in
ServiceWorkerRegistration so that they call ref() / deref() (which ends up being EventTarget's
methods).

  • workers/service/ServiceWorkerRegistration.h:
10:00 PM Changeset in webkit [223456] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the iOS build after r223431

Remove an unused variable captured in a lambda.

  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):

8:26 PM Changeset in webkit [223455] by dbates@webkit.org
  • 2 edits in trunk/Websites/webkit.org

No nightlies listed on nightly.webkit.org when using shipping Safari on macOS Sierra and OS X El Capitan
https://bugs.webkit.org/show_bug.cgi?id=178372

Reviewed by Tim Horton.

The Build Archive page depends on the collections (e.g. HTMLCollection) being
iterable so as to support iteration using ES6 for-of loop. Such support postdates
the version of WebKit shipped in macOS Sierra and OS X El Capitan. We should
make <https://webkit.org/build-archives/> work for these OSes since we still publish
nightlies for them.

  • wp-content/themes/webkit/build-archives.php: Use Array.prototype.slice() to

convert the HTMLCollection to an array that can be iterated using a ES6 for-of loop.

7:30 PM Changeset in webkit [223454] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[Win] Webkit should still be able to build when unable to check if libraries are up to date
https://bugs.webkit.org/show_bug.cgi?id=178367

Adding a option to skip the check to see if windows libraries are up to date.
This option is useful when testing modified libraries. This option also allows
building webkit when GitHub blocks requests to verify the latest library version.

Patch by Christopher Reid <chris.reid@sony.com> on 2017-10-16
Reviewed by Per Arne Vollan.

  • Scripts/build-webkit:
7:25 PM Changeset in webkit [223453] by Nikita Vasilyev
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: apply syntax highlighting to property values
https://bugs.webkit.org/show_bug.cgi?id=178176

Reviewed by Matt Baker.

  • Highlight links blue and CSS strings dark red.
  • Truncate URLs and strings over 150 characters.
  • UserInterface/Views/CodeMirrorAdditions.js:

Parse CSS values using CodeMirror.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link):
(.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string):

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._update):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing):
Replace trancated values with their full version.

(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
(WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
(WI.SpreadsheetStyleProperty.prototype._renderValue):
Highlight links and CSS strings in values when not editing.

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype.startEditing):
Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing.

  • UserInterface/Views/SyntaxHighlightingDefaultTheme.css:

(.syntax-highlighted a):

  • UserInterface/Views/Variables.css:

(:root):
Make link color a variable.

5:35 PM Changeset in webkit [223452] by jer.noble@apple.com
  • 4 edits in trunk/Source/WebCore

ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth.
https://bugs.webkit.org/show_bug.cgi?id=178360

Reviewed by Eric Carlson.

AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once
CMSampleBuffers representing about 32MB of memory are allocated, no more can be created
until previously created ones are released. So rather than (only) creating the sample
buffers up front in readSampleMetadata(), also create them dynamically, if missing, in
createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been
decoded.

Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC.
Now that the expected content length is available, we don't have to wait until the data is complete
to respond to requests.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::ensureDecoderAvailable):

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

(SOFT_LINK_POINTER_OPTIONAL):
(-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
(-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(WebCore::imageDecoderAssetOptions):
(WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
(WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
(WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
(WebCore::ImageDecoderAVFObjC::setExpectedContentSize):

5:30 PM Changeset in webkit [223451] by mrajca@apple.com
  • 13 edits in trunk

Add API support for quirk that lets an arbitrary click allow auto-play.
https://bugs.webkit.org/show_bug.cgi?id=178227

Reviewed by Alex Christensen.

Source/WebCore:

Added API test.

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

  • html/MediaElementSession.cpp:

(WebCore::needsArbitraryUserGestureAutoplayQuirk):

  • loader/DocumentLoader.h:

Source/WebKit:

Instead of hardcoding sites in WebCore, let API clients control which websites opt into the quirk that lets
an arbitrary click allow auto-play via website policies.

  • Shared/WebsitePolicies.h:
  • UIProcess/API/C/WKWebsitePolicies.cpp:

(WKWebsitePoliciesSetAllowedAutoplayQuirks):
(WKWebsitePoliciesGetAllowedAutoplayQuirks):

  • UIProcess/API/C/WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.h:
  • UIProcess/API/Cocoa/_WKWebsitePolicies.mm:

(-[_WKWebsitePolicies setAllowedAutoplayQuirks:]):
(-[_WKWebsitePolicies allowedAutoplayQuirks]):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::applyToDocumentLoader):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateWebsitePolicies):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:

(TEST): Added API test.

5:15 PM Changeset in webkit [223450] by jmarcell@apple.com
  • 7 edits in branches/safari-604.3.5.2-branch/Source

Versioning.

5:12 PM Changeset in webkit [223449] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.3.5.2.1

Tag Safari-604.3.5.2.1.

5:03 PM Changeset in webkit [223448] by Chris Dumez
  • 3 edits
    1 add in trunk

DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]
https://bugs.webkit.org/show_bug.cgi?id=178366

Reviewed by Youenn Fablet.

Source/WebCore:

DOMQuad.p1 / p2 / p3 / p4 should behave as [SameObject]. We attempted to do so using JSDOMQuad::visitAdditionalChildren()
but the code did not work because we failed to generate a "isReachableFromOpaqueRoots()" function for JSDOMPoint.

Test: fast/css/DOMQuad-points-SameObject.html

  • dom/DOMPoint.idl:

LayoutTests:

Add layout test coverage.

  • fast/css/DOMQuad-points-SameObject.html: Added.
5:00 PM Changeset in webkit [223447] by aestes@apple.com
  • 12 edits in trunk

[Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
https://bugs.webkit.org/show_bug.cgi?id=178191
<rdar://problem/34906367>

Reviewed by Tim Horton.

Source/WebCore:

Added test cases to http/tests/ssl/applepay/ApplePaySession.html.

  • Modules/applepay/ApplePayError.idl:
  • Modules/applepay/ApplePayPaymentContact.h:
  • Modules/applepay/ApplePayPaymentContact.idl:
  • Modules/applepay/ApplePaySessionPaymentRequest.h:
  • Modules/applepay/cocoa/PaymentContactCocoa.mm:

(WebCore::subLocality):
(WebCore::setSubLocality):
(WebCore::subAdministrativeArea):
(WebCore::setSubAdministrativeArea):
(WebCore::convert):

Source/WebKit:

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::toNSError):

LayoutTests:

  • http/tests/ssl/applepay/ApplePayError-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
4:29 PM Changeset in webkit [223446] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Allow modern decoding of URLs
https://bugs.webkit.org/show_bug.cgi?id=178265

Patch by Alex Christensen <achristensen@webkit.org> on 2017-10-16
Reviewed by Chris Dumez.

  • platform/URL.h:

(WebCore::URL::decode):

4:10 PM Changeset in webkit [223445] by achristensen@apple.com
  • 6 edits in trunk/LayoutTests

De-flakify http/tests/loading/basic-credentials-sent-automatically.html
https://bugs.webkit.org/show_bug.cgi?id=178365

Reviewed by Andy Estes.

  • http/tests/loading/basic-credentials-sent-automatically-expected.txt:
  • http/tests/loading/basic-credentials-sent-automatically.html:
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/wk2/http/tests/loading/basic-credentials-sent-automatically-expected.txt:
4:03 PM Changeset in webkit [223444] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Safari crashes after searching PDF (under [WKPDFView zoom:to:atPoint:kind:])
https://bugs.webkit.org/show_bug.cgi?id=178358
<rdar://problem/34676899>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WKPDFView.mm:

(-[WKPDFView _didFindMatch:]):
UIPDFSelection can return a null rect as the selection's bounds.
We can't zoom to a null rect (and doing so results in CA throwing an
exception later).

3:40 PM Changeset in webkit [223443] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r223425.

This change broke internal builds.

Reverted changeset:

"Remove unnecessary include from Document.h"
https://bugs.webkit.org/show_bug.cgi?id=178247
https://trac.webkit.org/changeset/223425

3:22 PM Changeset in webkit [223442] by Ryan Haddad
  • 4 edits in trunk

If an origin doesn't have databases in the Databases table we should still remove its information from disk in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178281
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brent Fulgham.

Source/WebCore:

New test:
DatabaseTracker.DeleteOriginWithMissingEntryInDatabasesTable

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):
If databaseNames is empty, don't bail early. Instead, delete everything in the directory
containing the databases for this origin. This condition indicates that we previously
tried to remove the origin but didn't get all of the way through the deletion process.
Because we have lost track of the databases for this origin, we can assume that no
other process is accessing them. This means it should be safe to delete them outright.

Tools:

Verify that if there is an entry in the Origins table but no entries in the Databases
table that we still remove the directory for the origin, and that we remove the
entry from the Origins table.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm:

(TestWebKitAPI::TEST):

2:57 PM Changeset in webkit [223441] by commit-queue@webkit.org
  • 9 edits
    4 adds in trunk

[FETCH] Remove Request.type getter
https://bugs.webkit.org/show_bug.cgi?id=177798

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Refreshing fetch WPT tests.

  • web-platform-tests/fetch/api/request/request-type-attribute-historical-expected.txt: Added.
  • web-platform-tests/fetch/api/request/request-type-attribute-historical.html: Added.
  • web-platform-tests/fetch/api/request/url-encoding-expected.txt: Added.
  • web-platform-tests/fetch/api/request/url-encoding.html: Added.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/fetch/api/request/request-type-attribute-historical.html

imported/w3c/web-platform-tests/fetch/api/request/url-encoding.html

Removing FetchRequest type getter.
Merging Type and Destination as per https://fetch.spec.whatwg.org/#concept-request-destination.
Setting destination of request within CachedResourceLoader as this will be useful to Service Workers.

  • Modules/fetch/FetchRequest.h:
  • Modules/fetch/FetchRequest.idl:
  • loader/FetchOptions.h:

(WebCore::FetchOptions::isolatedCopy const):
(WebCore::FetchOptions::FetchOptions):
(WebCore::FetchOptions::encode const):
(WebCore::FetchOptions::decode):

  • loader/ThreadableLoader.cpp:

(WebCore::ThreadableLoaderOptions::isolatedCopy const):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestImage):
(WebCore::CachedResourceLoader::requestFont):
(WebCore::CachedResourceLoader::requestTextTrack):
(WebCore::CachedResourceLoader::requestCSSStyleSheet):
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestScript):
(WebCore::CachedResourceLoader::requestXSLStyleSheet):
(WebCore::CachedResourceLoader::requestMedia):
(WebCore::CachedResourceLoader::requestIcon):
(WebCore::CachedResourceLoader::requestRawResource):
(WebCore::CachedResourceLoader::requestBeaconResource):
(WebCore::CachedResourceLoader::requestMainResource):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setDestinationIfNotSet):

  • loader/cache/CachedResourceRequest.h:
2:44 PM Changeset in webkit [223440] by rniwa@webkit.org
  • 37 edits
    15 adds
    3 deletes in trunk

Cannot access images included in the content pasted from Microsoft Word
https://bugs.webkit.org/show_bug.cgi?id=124391
<rdar://problem/26862741>

Reviewed by Antti Koivisto.

Source/WebCore:

The bug is caused by the fact Microsoft Word generates HTML content which references an image using file URL.
Because the websites don't have access to arbtirary file URLs, this prevents editors such as TinyMCE to save
those images.

This patch fixes the problem by converting file URLs for images and all other subresources in the web archive
generated by Microsoft Word by blob URLs like r222839 for RTF/RTFD and r222119 for images.

To avoid revealing privacy sensitive information such as the absolute local file path to the user's home directory
Microsoft Word and other applications in the system includes in the web archive placed in the system pasteboard,
this patch also introduces the mechanism to sanitize when the HTML content is read by DataTransfer's getData.

This patch also introduces the sanitization for when writing HTML into the pasteboard since other applications
in the syste which is capable to processing web archives are not necessarily equipped to pretect itself and the
rest of the system from potentially dangerous JavaScript included in the web archive placed in the system pasteboard.

Finally, this patch expands the list of clipboard types that are exposed as "text/html" to the Web platform by
adding the capability to convert RTF, RTFD, and web archive into HTML markup by introducing WebContentMarkupReader,
a new subclass of PasteboardWebContentReader which creates a HTML markup instead of a document fragment. Most of
the sanitization process happens in this new class, and will be expanded to WebContentReader to make pasting safer.

Tests: editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url.html

editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin.html
editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying.html
editing/pasteboard/data-transfer-set-data-sanitlize-html-when-dragging-in-null-origin.html
http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html.html
CopyHTML.Sanitizes
DataInteractionTests.DataTransferSanitizeHTML
PasteRTF.ExposesHTMLTypeInDataTransfer
PasteRTFD.ExposesHTMLTypeInDataTransfer
PasteRTFD.ImageElementUsesBlobURLInHTML
PasteWebArchive.ExposesHTMLTypeInDataTransfer

  • dom/DataTransfer.cpp:

(WebCore::originIdentifierForDocument): Moved to Document::originIdentifierForPasteboard.
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::getDataForItem const): Use WebContentMarkupReader read HTMl content so that we can read
web arhive, RTF, and RTFD as text/html.
(WebCore::DataTransfer::getData const):
(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::setDataFromItemList): Sanitize the HTML before placing into the system pasteboard.
(WebCore::DataTransfer::createForDragStartEvent):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForUpdatingDropTarget):

  • dom/DataTransfer.h:
  • dom/DataTransfer.idl:
  • dom/DataTransferItem.cpp:

(WebCore::DataTransferItem::getAsString const):

  • dom/Document.cpp:

(WebCore::Document::originIdentifierForPasteboard): Renamed from uniqueIdentifier. Moved the code to use the origin
string and then falling back to the UUID here from originIdentifierForDocument in DataTransfer.cpp.

  • dom/Document.h:
  • editing/WebContentReader.cpp:

(WebCore::WebContentMarkupReader::shouldSanitize const): Added.

  • editing/WebContentReader.h:

(WebCore::WebContentMarkupReader): Added.
(WebCore::WebContentMarkupReader::WebContentMarkupReader):

  • editing/cocoa/WebContentReaderCocoa.mm:

(WebCore::createFragmentFromWebArchive): Extracted out of WebContentReader::readWebArchive to share code.
(WebCore::WebContentReader::readWebArchive):
(WebCore::WebContentMarkupReader::readWebArchive): Added. Reads the web archive, replace all subresource URLs by
blob URLs, and re-generate the markup using our copy & paste code. The last step is requied to strip away any privacy
sensitive information as well as potentially dangerous JavaScript code.
(WebCore::stripMicrosoftPrefix): Extracted out of WebContentReader::readHTML to share code.
(WebCore::WebContentReader::readHTML):
(WebCore::WebContentMarkupReader::readHTML): Added. Only sanitize the markup when it comes from a different origin.
(WebCore::WebContentReader::readRTFD): Added a nullity check for frame.document().
(WebCore::WebContentMarkupReader::readRTFD): Added.
(WebCore::WebContentMarkupReader::readRTF): Added.

  • editing/markup.h:
  • editing/markup.cpp:

(WebCore::createPageForSanitizingWebContent): Added.
(WebCore::sanitizeMarkup): Added. This function "pastes" the markup into a new isolated document then reserializes
using our serialization code for copy. It strips away all invisible information such as comments, and strips away
event handlers and script elements to remove potentially dangerous scripts.

  • platform/Pasteboard.h:
  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::readPasteboardWebContentDataForType): Now that this code can be called by DataTransfer, added
the checks for the change count to make sure we stop letting web content read if the pasteboard had been changed by
some other applications. To do this, turned this function into a member of Pasteboard. Also changed the return type
to an enum with tri-state to exist the loop early in the call sites.
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readRespectingUTIFidelities):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Treat RTF, RTFD, and web archive as HTML.

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::read): Add the change count checks now that this code can be called by DataTransfer.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Treat RTF, RTFD, and web archive as HTML.

Tools:

Added tests for sanitizing HTML contents for copy & paste and drag & drop.

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

(readHTMLFromPasteboard): Added.
(createWebViewWithCustomPasteboardDataEnabled): Added.
(CopyHTML.Sanitizes): Added.

  • TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:

(createWebViewWithCustomPasteboardDataEnabled): Added to enable more tests on bots.

  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:

(writeRTFToPasteboard): Added.
(createWebViewWithCustomPasteboardDataEnabled): Added.
(createHelloWorldString): Added.
(PasteRTF.ExposesHTMLTypeInDataTransfer): Added.
(PasteRTFD.ExposesHTMLTypeInDataTransfer): Added.
(PasteRTFD.ImageElementUsesBlobURLInHTML): Added.

  • TestWebKitAPI/Tests/WebKitCocoa/copy-html.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/paste-rtfd.html: Store the clipboardData contents for

PasteRTF.ExposesHTMLTypeInDataTransfer and PasteRTFD.ExposesHTMLTypeInDataTransfer.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(DataInteractionTests.DataTransferSanitizeHTML):

LayoutTests:

Added tests for copying & pasting and dragging & dropping HTML contents.

  • TestExpectations:
  • editing/pasteboard/data-transfer-get-data-on-drop-rich-text-expected.txt: Rebaselined.
  • editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Ditto.
  • editing/pasteboard/data-transfer-get-data-on-paste-rich-text.html: Modified the test to strip away platform specific

inline style properties.

  • editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url-expected.txt: Added.
  • editing/pasteboard/data-transfer-get-data-on-pasting-html-uses-blob-url.html: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-expected.txt: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin-expected.txt: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying-in-null-origin.html: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-copying.html: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-dragging-in-null-origin-expected.txt: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-html-when-dragging-in-null-origin.html: Added.
  • editing/pasteboard/data-transfer-set-data-sanitizes-url-when-dragging-in-null-origin.html: Removed the superflous

call to setTimeout that was errornously added during debugging. Also updated the test to not claim all URL and
HTML values are read in the same origin, and updated the assertion for cross-origin case as it's now sanitized.

  • editing/pasteboard/onpaste-text-html-expected.txt: Rebaselined. The order of CSS properties have changed.
  • http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html-expected.txt: Added.
  • http/tests/security/clipboard/copy-paste-html-across-origin-sanitizes-html.html: Added.
  • http/tests/security/clipboard/copy-paste-url-across-origin-sanitizes-url.html:
  • http/tests/security/clipboard/resources/copy-html.html: Added.
  • http/tests/security/clipboard/resources/copy-url.html: Renamed from copy.html.
  • platform/ios-wk2/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Remoevd.
  • platform/ios-wk1/editing/pasteboard/data-transfer-get-data-on-paste-rich-text-expected.txt: Remoevd.
  • platform/mac-wk1/TestExpectations:
2:33 PM Changeset in webkit [223439] by achristensen@apple.com
  • 6 edits in trunk/Source/WebKit

Add a _WKThumbnailView initializer with a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=178351
<rdar://problem/34979453>

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _page]):
(-[WKWebView _setThumbnailView:]):
(-[WKWebView _thumbnailView]):
(-[WKWebView _setIgnoresAllEvents:]):
(-[WKWebView _ignoresAllEvents]):

  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKThumbnailView.h:
  • UIProcess/API/Cocoa/_WKThumbnailView.mm:

(-[_WKThumbnailView initWithFrame:fromWKWebView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):

2:33 PM Changeset in webkit [223438] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the Windows debug build.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):

2:02 PM Changeset in webkit [223437] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Expose more WKView properties as WKWebViewPrivate SPI
https://bugs.webkit.org/show_bug.cgi?id=178349
<rdar://problem/34980919>

Reviewed by Tim Horton.

_backgroundExtendsBeyondPage was already exposed on iOS, but we need it on Mac, too.
A few other properties also need exposing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(toAPIScrollbarStyle):
(toCoreScrollbarStyle):
(-[WKWebView _setBackgroundExtendsBeyondPage:]):
(-[WKWebView _backgroundExtendsBeyondPage]):
(-[WKWebView _setOverlayScrollbarStyle:]):
(-[WKWebView _overlayScrollbarStyle]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
1:52 PM Changeset in webkit [223436] by Chris Dumez
  • 7 edits in trunk/Source

Log using differential privacy domains where the WebContent process crashes
https://bugs.webkit.org/show_bug.cgi?id=178346
<rdar://problem/33293830>

Reviewed by Alex Christensen.

Source/WebCore:

Add new diagnostic logging key for domain causing crashes.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::domainCausingCrashKey):

  • page/DiagnosticLoggingKeys.h:

Source/WebKit:

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::reload):
(WebKit::WebPageProxy::currentURL const):
(WebKit::WebPageProxy::processDidTerminate):

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

(WebKit::WebProcessProxy::didClose):

1:50 PM Changeset in webkit [223435] by jmarcell@apple.com
  • 2 edits in branches/safari-604.3.5.2-branch/Source/JavaScriptCore

Cherry-pick r222417. rdar://problem/35010838

1:50 PM Changeset in webkit [223434] by jmarcell@apple.com
  • 7 edits in branches/safari-604.3.5.2-branch/Source

Versioning.

1:36 PM Changeset in webkit [223433] by commit-queue@webkit.org
  • 6 edits in trunk

Activate Cache API by default
https://bugs.webkit.org/show_bug.cgi?id=178186

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16
Reviewed by Chris Dumez.

Source/WebKit:

  • Shared/WebPreferencesDefinitions.h:

Tools:

Removing explicit activation of cache api.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setCacheAPIEnabled): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
1:33 PM Changeset in webkit [223432] by weinig@apple.com
  • 23 edits
    1 add in trunk/Source

[Settings] Remove all custom code from Settings.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=178330

Reviewed by Simon Fraser.

Source/WebCore:

Removes the two remaining functions out of Settings paving the way
for the file to be generated.

  • pageDestroyed was moved down into SettingsBase.
  • effectiveFrameFlattening was moved to FrameView (to reduce the need for additional includes, the FrameFlattening enum was converted to an enum class to allow it to be forward declared).


Also moves default values into SettingsDefaultValues.h

  • WebCore.xcodeproj/project.pbxproj:


Add new files.


  • page/FrameView.cpp:
  • page/FrameView.h:

Move effectiveFrameFlattening function here from Settings.

  • page/Settings.cpp:
  • page/Settings.h:

Move effectiveFrameFlattening, pageDestroyed and default values out.

  • page/Settings.in:


Update for turning FrameFlattening into an enum class.


  • page/SettingsBase.h:

Turn FrameFlattening into an enum class and move pageDestroyed here.

  • page/SettingsDefaultValues.h: Added.

Move all the default values from Settings here.

  • rendering/RenderFrameSet.cpp:
  • rendering/RenderIFrame.cpp:
  • rendering/RenderView.cpp:

Get effectiveFrameFlattening from the FrameView.

  • testing/InternalSettings.cpp:
  • testing/InternalSettings.h:


Update now that FrameFlattening is an enum class.

Source/WebKit:

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetFrameFlatteningEnabled):
(WKPreferencesGetFrameFlatteningEnabled):

  • UIProcess/API/glib/WebKitSettings.cpp:

(webkit_settings_get_enable_frame_flattening):
(webkit_settings_set_enable_frame_flattening):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setFrameFlatteningEnabled):

Update for naming changes of FrameFlattening now that it is an enum class.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::contentsSizeChanged const):

Ge the effectiveFrameFlattening from the FrameView, rather than the Settings.

Source/WebKitLegacy/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Update for naming changes of FrameFlattening now that it is an enum class.

Source/WebKitLegacy/win:

  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Update for naming changes of FrameFlattening now that it is an enum class.

1:29 PM Changeset in webkit [223431] by Chris Dumez
  • 9 edits in trunk/Source/WebKit

[WK2][NetworkSession] Add support for resuming downloads
https://bugs.webkit.org/show_bug.cgi?id=177625
<rdar://problem/34345975>

Reviewed by Alex Christensen.

Add support for resuming downloads for the WK2 NETWORK_SESSION code path.

This was tested manually. I was unable to write an API test because our tests
do not run an HTTP server and CFNetwork does not seem to generate resume data
when cancelling a download over non-HTTP.

  • NetworkProcess/Downloads/Download.cpp:

(WebKit::Download::didReceiveChallenge):
(WebKit::Download::continueCanAuthenticateAgainstProtectionSpace):

  • NetworkProcess/Downloads/Download.h:
  • NetworkProcess/Downloads/DownloadManager.cpp:

(WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::DownloadManager::resumeDownload):

  • NetworkProcess/Downloads/cocoa/DownloadCocoa.mm:

(WebKit::Download::resume):
This currently includes a workaround for <rdar://problem/34745171>. We update the
resume data to include the NSURLSessionResumeInfoLocalPath key with the final
destination path so that CFNetwork looks for the temporary data at the right
location.

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

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::NetworkSessionCocoa::downloadTaskWithResumeData):

  • Shared/Authentication/AuthenticationManager.cpp:

(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

  • Shared/Authentication/AuthenticationManager.h:
1:28 PM Changeset in webkit [223430] by jmarcell@apple.com
  • 1 copy in branches/safari-604.3.5.2-branch

New branch.

1:27 PM Changeset in webkit [223429] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

run-webkit-tests help text should mention arguments too
https://bugs.webkit.org/show_bug.cgi?id=178352

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-16
Reviewed by Tim Horton.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

1:25 PM Changeset in webkit [223428] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

Web Inspector: Layers tab mistakenly throws out the root element's layer.
https://bugs.webkit.org/show_bug.cgi?id=178222

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-16
Reviewed by Brian Burg.

Source/WebInspectorUI:

  • UserInterface/Controllers/LayerTreeManager.js:

(WI.LayerTreeManager.prototype.layersForNode):
Fix the issue at the manager level.

  • UserInterface/Views/Layers3DContentView.js:

(WI.Layers3DContentView.prototype.layout):
Update new sidebar based on simplified manager API.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype.layout):
Move overtailored code from manager to legacy sidebar.

LayoutTests:

  • inspector/layers/layer-tree-manager-expected.txt: Added.
  • inspector/layers/layer-tree-manager.html: Added.
1:20 PM Changeset in webkit [223427] by Ryan Haddad
  • 6 edits
    1 add
    1 delete in trunk

If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

Source/WebCore:

New tests:
DatabaseTracker.DeleteDatabase
DatabaseTracker.DeleteDatabaseWhenDatabaseDoesNotExist
DatabaseTracker.DeleteOrigin
DatabaseTracker.DeleteOriginWhenDeletingADatabaseFails
DatabaseTracker.DeleteOriginWhenDatabaseDoesNotExist

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
If the database doesn't exist, we previously deleted it but failed to remove the
information from the tracker database. We still want to delete all of the information
associated with this database from the tracker database, so add it to databaseNamesToDelete.
(WebCore::DatabaseTracker::deleteOrigin):
If a database doesn't exist, don't try to delete it. We don't need to, but more
importantly, deleteDatabaseFile() will fail if the database doesn't exist, which
will cause us to incorrectly think we failed to remove database information from disk.
If we actually fail to delete any database file, return before we remove the origin
information from the tracker database so we don't lose track of the database.
(WebCore::DatabaseTracker::deleteDatabase):
If a database doesn't exist, don't try to delete it. We don't need to, but also it
will cause us to incorrectly think that we were unable to delete a database, so we
would bail before we remove the database information from the tracker database. We
want to remove the database information from the tracker database because the database
doesn't exist.

  • Modules/webdatabase/DatabaseTracker.h:

Expose fullPathForDatabase() for use by tests.

  • platform/Logging.h:

Add a logging channel.

Tools:

Add tests that verify we correctly delete databases and remove their information from
the tracker database, even if the database doesn't exist. Verify that if we fail to
delete a database, we don't remove its information from the tracker database.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Move DatabaseTrackerTest.cpp to DatabaseTrackerTest.mm so that we can use the cocoa
method for creating a temporary directory in the tests.

  • TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Removed.

The existing test was copied to DatabaseTrackerTest.mm.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::addToDatabasesTable):
(TestWebKitAPI::removeDirectoryAndAllContents):
(TestWebKitAPI::createFileAtPath):

1:16 PM Changeset in webkit [223426] by Ryan Haddad
  • 2 edits
    1 add
    1 delete in trunk/Tools

Unreviewed, rolling out r223422.

These tests are for a change that was rolled out in r223420

Reverted changeset:

"If we fail to delete any database file, don't remove its
information from the tracker database"
https://bugs.webkit.org/show_bug.cgi?id=178251
https://trac.webkit.org/changeset/223422

12:49 PM Changeset in webkit [223425] by achristensen@apple.com
  • 3 edits in trunk/Source/WebCore

Remove unnecessary include from Document.h
https://bugs.webkit.org/show_bug.cgi?id=178247

Reviewed by Darin Adler.

  • dom/Document.cpp:

(WebCore::Document::hasTouchEventHandlers const):
(WebCore::Document::touchEventTargetsContain const):

  • dom/Document.h:

(WebCore::Document::hasTouchEventHandlers const): Deleted.
(WebCore::Document::touchEventTargetsContain const): Deleted.

12:46 PM Changeset in webkit [223424] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix iOS build after r223422
https://bugs.webkit.org/show_bug.cgi?id=178251

  • Modules/webdatabase/DatabaseManager.h:
12:21 PM Changeset in webkit [223423] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

We should wrap the removal of information from the tracker database in a transaction in DatabaseTracker::deleteOrigin()
https://bugs.webkit.org/show_bug.cgi?id=178274
<rdar://problem/34576132>

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Tim Horton.

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteOrigin):
Wrap the removal of information from the tracker database in a transaction so that
we don't end up in a case where only one of the tables contains information about
an origin.
If anything goes wrong when we're modifying the tracker database, rollback the transaction
before bailing.

12:20 PM Changeset in webkit [223422] by Brent Fulgham
  • 2 edits
    1 move in trunk/Tools

If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

Add tests that verify we correctly delete databases and remove their information from
the tracker database, even if the database doesn't exist. Verify that if we fail to
delete a database, we don't remove its information from the tracker database.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Move DatabaseTrackerTest.cpp to DatabaseTrackerTest.mm so that we can use the cocoa
method for creating a temporary directory in the tests.

  • TestWebKitAPI/Tests/WebCore/DatabaseTrackerTest.cpp: Removed.

The existing test was copied to DatabaseTrackerTest.mm.

  • TestWebKitAPI/Tests/WebCore/cocoa/DatabaseTrackerTest.mm: Added.

(TestWebKitAPI::TEST):
(TestWebKitAPI::addToDatabasesTable):
(TestWebKitAPI::removeDirectoryAndAllContents):
(TestWebKitAPI::createFileAtPath):

12:02 PM Changeset in webkit [223421] by ddkilzer@apple.com
  • 5 edits in trunk

Add RELEASE_ASSERT_WITH_SECURITY_IMPLICATION() macro
<https://webkit.org/b/178269>

Reviewed by Alex Christensen.

Source/WTF:

  • wtf/Assertions.h:

(RELEASE_ASSERT_WITH_SECURITY_IMPLICATION): Add macro.

Tools:

  • Scripts/webkitpy/style/checkers/cpp.py:

(check_language): Add checker to warn about using
ASSERT_WITH_SECURITY_IMPLICATION().
(CppChecker.categories): Add 'security/assertion' to list of
enabled checkers.

  • Scripts/webkitpy/style/checkers/cpp_unittest.py:

(CppStyleTest.test_debug_security_assertion): Add tests for
new checker.

11:53 AM Changeset in webkit [223420] by Ryan Haddad
  • 4 edits in trunk/Source/WebCore

Unreviewed, rolling out r223419.

This change broke the Windows build.

Reverted changeset:

"If we fail to delete any database file, don't remove its
information from the tracker database"
https://bugs.webkit.org/show_bug.cgi?id=178251
https://trac.webkit.org/changeset/223419

11:08 AM Changeset in webkit [223419] by Brent Fulgham
  • 4 edits in trunk/Source/WebCore

If we fail to delete any database file, don't remove its information from the tracker database
<rdar://problem/34576132> and https://bugs.webkit.org/show_bug.cgi?id=178251

Patch by Maureen Daum <mdaum@apple.com> on 2017-10-16
Reviewed by Brady Eidson.

New tests:
DatabaseTracker.DeleteDatabase
DatabaseTracker.DeleteDatabaseWhenDatabaseDoesNotExist
DatabaseTracker.DeleteOrigin
DatabaseTracker.DeleteOriginWhenDeletingADatabaseFails
DatabaseTracker.DeleteOriginWhenDatabaseDoesNotExist

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
If the database doesn't exist, we previously deleted it but failed to remove the
information from the tracker database. We still want to delete all of the information
associated with this database from the tracker database, so add it to databaseNamesToDelete.
(WebCore::DatabaseTracker::deleteOrigin):
If a database doesn't exist, don't try to delete it. We don't need to, but more
importantly, deleteDatabaseFile() will fail if the database doesn't exist, which
will cause us to incorrectly think we failed to remove database information from disk.
If we actually fail to delete any database file, return before we remove the origin
information from the tracker database so we don't lose track of the database.
(WebCore::DatabaseTracker::deleteDatabase):
If a database doesn't exist, don't try to delete it. We don't need to, but also it
will cause us to incorrectly think that we were unable to delete a database, so we
would bail before we remove the database information from the tracker database. We
want to remove the database information from the tracker database because the database
doesn't exist.

  • Modules/webdatabase/DatabaseTracker.h:

Expose fullPathForDatabase() for use by tests.

  • platform/Logging.h:

Add a logging channel.

11:05 AM Changeset in webkit [223418] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

REGRESSION(223307): ASSERTION in WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution
https://bugs.webkit.org/show_bug.cgi?id=178342
<rdar://problem/35008505>

Reviewed by Chris Dumez.

In r223307 I mistakenly used 'topDocument->topDocument()' because of a copy/paste error. I should have just used
'topDocument'.

Tests: CommandBackForwardTestWKWebView in TestWebKitAPI.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution): We might enter this routine at a time
where there is no page. If so, we should return early and not log credit.

  • page/EventHandler.cpp:

(WebCore::EventHandler::keyEvent): Correct the argument passed to the log function.

11:00 AM Changeset in webkit [223417] by timothy_horton@apple.com
  • 2 edits in trunk/LayoutTests

Adjust one more test from constant() to env() after r177581

  • fast/events/ios/rotation/safe-area-insets-during-safari-type-rotation.html:
10:30 AM Changeset in webkit [223416] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[WPE] Build failure due to invalid cast of EGLNativeWindowType when targetting 64-bit ARM
https://bugs.webkit.org/show_bug.cgi?id=178090

Reviewed by Michael Catanzaro.

EGLNativeWindowType can be aliased to a different type depending (at least) on the EGL
implementation, its build options, and the libepoxy build options. Using "static_cast"
works when it is a numeric value and the width of the value needs to be optionally
extended to 64 bits (e.g. the EGL type is "int" in a 32-bit CPU) but not for pointers,
and using "reinterpret_cast" works when the size of a pointer is 64 bits but not in other
cases. Therefore it seems reasonable to use a plain C cast expression to solve this
particular situation.

  • WebProcess/WebPage/wpe/AcceleratedSurfaceWPE.cpp:

(WebKit::AcceleratedSurfaceWPE::window const): Use a good old plain C cast expression.

10:19 AM Changeset in webkit [223415] by fpizlo@apple.com
  • 7 edits in trunk/Source

Make some asserts into release asserts
https://bugs.webkit.org/show_bug.cgi?id=178324

Reviewed by Saam Barati.
Source/JavaScriptCore:


These asserts are not on perf critical paths, so they might as well be release asserts.

  • runtime/DataView.h:

(JSC::DataView::get):
(JSC::DataView::set):

Source/WebCore:

No new tests because no change in behavior.

This introduces some release asserts. Perf testing shows that it's neutral. So, we get some extra
safety without losing any perf.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted):

  • dom/Document.cpp:

(WebCore::Document::adoptNode):
(WebCore::Document::frameDestroyed):
(WebCore::Document::attachToCachedFrame):
(WebCore::Document::detachFromCachedFrame):
(WebCore::Document::prepareForDestruction):
(WebCore::Document::dispatchWindowEvent):
(WebCore::Document::dispatchWindowLoadEvent):
(WebCore::Document::applyQuickLookSandbox):

  • dom/DocumentOrderedMap.cpp:

(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get const):
(WebCore:: const):

  • dom/Node.cpp:

(WebCore::Node::~Node):
(WebCore::DidMoveToNewDocumentAssertionScope::~DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::didRecieveCall):
(WebCore::moveNodeToNewDocument):
(WebCore::moveShadowTreeToNewDocument):
(WebCore::Node::moveTreeToNewScope):
(WebCore::Node::didMoveToNewDocument):
(WebCore::Node::dispatchSubtreeModifiedEvent):
(WebCore::Node::dispatchDOMActivateEvent):

10:18 AM Changeset in webkit [223414] by commit-queue@webkit.org
  • 4 edits in trunk/LayoutTests

LayoutTest http/tests/cache-storage/cache-clearing-origin.https.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=178305
<rdar://problem/34990264>

Unreviewed.

Removing flaky test expectations based on dashboard.

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-16

  • TestExpectations:
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
9:59 AM Changeset in webkit [223413] by Chris Dumez
  • 11 edits
    1 copy
    3 adds in trunk

Clicks on Link with download attribute causes all (other) links to trigger download when clicked
https://bugs.webkit.org/show_bug.cgi?id=178267
<rdar://problem/34985016>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline test which behave differently now in WebKit2 due to WKTR's injected bundle
using PassThrough policy for new windows. The new result is identical to what you
would get when you open the test in Safari so I think this is a good thing.

  • web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt:

Source/WebKit:

When clicking on an anchor with the download attribute, the m_syncNavigationActionHasDownloadAttribute
flag on WebPageProxy would get set. This flag would not get reset right away and instead, it would get
updated during the next call to WebPageProxy::decidePolicyForNavigationAction(). The issue is that if
you later click on a link with target="_blank", WebPageProxy::decidePolicyForNewWindowAction() gets
called instead of WebPageProxy::decidePolicyForNavigationAction() and we do not reset the
m_syncNavigationActionHasDownloadAttribute flag and we force a download.

To address the problem, I got rid of this flag on WebPageProxy and it is error-prone and should really
not be at page-level. Instead, I added a shouldForceDownload flag on the navigation object. It makes
more sense to associate the flag with the navigation and makes it less error-prone.

  • UIProcess/API/APINavigation.h:

(API::Navigation::setShouldForceDownload):
(API::Navigation::shouldForceDownload const):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):

  • UIProcess/WebPageProxy.h:

Tools:

Use PassThrough policy in WKTR's InjectedBundle's decidePolicyForNewWindowAction so that the
request is sent to the UIProcess. This gets WKTR's closer to Safari behavior and helps
reproduce the bug. Without this change, I would not be able to write a regression test for
this bug that is very easily reproducible in Safari.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::decidePolicyForNewWindowAction):

LayoutTests:

Add layout test coverage.

  • http/tests/download/anchor-load-after-download-expected.txt: Added.
  • http/tests/download/anchor-load-after-download.html: Added.
  • platform/ios-wk2/TestExpectations:
  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk1/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/browsers/windows/noreferrer-window-name-expected.txt.
9:40 AM Changeset in webkit [223412] by commit-queue@webkit.org
  • 3 edits
    2 copies
    4 moves
    2 adds in trunk/Source/WebCore

Make RealtimeIncomingAudioSources and RealtimeOutgoingAudioSources port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177928

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-10-16
Reviewed by Youenn Fablet.

Refactor the RealtimeIncomingAudioSource and RealtimeOutgoingAudioSource classes,
move the mac specific code to a different class. This way we can use them from
other ports.

No new tests, we are not adding new functionality just refactoring.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/RealtimeIncomingAudioSource.cpp: Copied from Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h. Just the port agnostic parts.
  • platform/mediastream/RealtimeIncomingAudioSource.h: Copied from Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h. Ditto.
  • platform/mediastream/RealtimeOutgoingAudioSource.cpp: Copied from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp. Ditto.
  • platform/mediastream/RealtimeOutgoingAudioSource.h: Copied from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h. Ditto.
  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp: Added, it adds Cocoa code parts from original Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.cpp.

(WebCore::RealtimeIncomingAudioSource::create): Moved this function from the RealtimeOutgoingAudioSource.cpp file to avoid including the Cocoa file there.

  • platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: Added Cocoa code from original Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSource.h.
  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp: Added Cocoa code from original Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.cpp.

(WebCore::RealtimeOutgoingAudioSource::create): Moved this function from the RealtimeOutgoingAudioSource.cpp file to avoid including the Cocoa file there.

  • platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h: Added Cocoa code from the original Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSource.h.
9:38 AM Changeset in webkit [223411] by Ryan Haddad
  • 1 edit
    3 adds in trunk/LayoutTests

Rebaseline imported/w3c/web-platform-tests/beacon/headers/header-content-type.html for macOS.
https://bugs.webkit.org/show_bug.cgi?id=178343

Unreviewed test gardening.

  • platform/mac-wk2/imported/w3c/web-platform-tests/beacon/headers/header-content-type-expected.txt: Added.
9:21 AM Changeset in webkit [223410] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix the tvOS build after r223340.

Add a new #define in PlatformPasteboardIOS.mm for item provider support, and guard usages of
WebItemProviderPasteboard using it.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::readURL):

9:19 AM Changeset in webkit [223409] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSRunLoopTimer: reduce likely race when used improperly
https://bugs.webkit.org/show_bug.cgi?id=178298
<rdar://problem/32899816>

Reviewed by Saam Barati.

If an API user sets a timer on JSRunLoopTimer, and then racily
destroys the JSRunLoopTimer while the timer is firing then it's
possible for timerDidFire to cause a use-after-free and / or crash
because e.g. m_apiLock becomes a nullptr while timerDidFire is
executing. That results from an invalid use of JSRunLoopTimer, but
we should try to be more resilient for that type of misuse because
it's not necessarily easy to catch by inspection.

With this change the only remaining race is if the timer fires,
and then only timerDidFire's prologue executes, but not the load
of the m_apiLock pointer from this. It's a much smaller race.

Separately, I'll reach out to API users who are seemingly misusing
the API.

  • runtime/JSRunLoopTimer.cpp:

(JSC::JSRunLoopTimer::timerDidFire): put m_apiLock on the stack,
and checks for nullptr. This prevents loading it twice off of
this and turns a nullptr deref into "just" a use-after-free.
(JSC::JSRunLoopTimer::~JSRunLoopTimer): acquire m_apiLock before
calling m_vm->unregisterRunLoopTimer(this), which in turn does
CFRunLoopRemoveTimer / CFRunLoopTimerInvalidate. This prevents
timerDidFire from doing much while the timers are un-registered.
~JSRunLoopTimer also needs to set m_apiLock to nullptr before
releasing the lock, so it needs its own local copy.

9:12 AM Changeset in webkit [223408] by Ryan Haddad
  • 49 edits
    2 copies
    2 adds in trunk

Unreviewed, rolling out r223271.

This change introduced LayoutTest failures on WK1.

Reverted changeset:

"Use asynchronous ResourceHandleClient calls for WebKit1"
https://bugs.webkit.org/show_bug.cgi?id=160677
https://trac.webkit.org/changeset/223271

8:23 AM Changeset in webkit [223407] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Mark animations/play-state-in-shorthand.html as flaky on Windows.
https://bugs.webkit.org/show_bug.cgi?id=178341

Unreviewed test gardening.

  • platform/win/TestExpectations:
7:44 AM Changeset in webkit [223406] by commit-queue@webkit.org
  • 3 edits
    1 copy
    4 moves
    3 adds in trunk/Source/WebCore

Make RealtimeIncomingVideoSources and RealtimeOutgoingVideoSources port agnostic
https://bugs.webkit.org/show_bug.cgi?id=177869

Patch by Alejandro G. Castro <alex@igalia.com> on 2017-10-16
Reviewed by Youenn Fablet.

Refactor the RealtimeIncomingVideoSource and RealtimeOutgoingVideoSource classes,
move the cocoa specific code to a different class. This way we can use them from
other ports.

No new functionality, just a refactor.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/RealtimeIncomingVideoSource.cpp: Moved from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h. Just the port agnostic parts.
  • platform/mediastream/RealtimeIncomingVideoSource.h: Moved from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h. DItto
  • platform/mediastream/RealtimeOutgoingVideoSource.cpp: Moved from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.cpp. Ditto
  • platform/mediastream/RealtimeOutgoingVideoSource.h: Moved from Source/WebCore/platform/mediastream/mac/RealtimeOutgoingVideoSource.h. Ditto
  • platform/mediastream/mac/RealtimeIncomingVideoSourceMac.cpp: Added, it adds the Cocoa specific parts from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.cpp.

(WebCore::RealtimeIncomingVideoSource::create): Moved this function from the base class, it allows avoiding the include.

  • platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h: Added, cocoa dependent code from Source/WebCore/platform/mediastream/mac/RealtimeIncomingVideoSource.h.

(WebCore::RealtimeOutgoingVideoSource::create): Moved this funtion from the base class, now we can use the Cocoa create without including it in the base class.

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: Added, cocoa dependent code.
  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h: Added, cocoa dependent code.
6:40 AM Changeset in webkit [223405] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222474 - Crash in WebCore::TreeScope::documentScope
https://bugs.webkit.org/show_bug.cgi?id=176159

Reviewed by Ryosuke Niwa.

Source/WebCore:

When all children are replaced with a new node in ContainerNode::replaceAllChildren,
the treescope of the new node should be set after the call to willRemoveChildren,
since this call can fire events, and execute JS code, which might change the treescope
of the container node.

Test: fast/dom/crash-moving-subtree-between-documents.html

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::replaceAllChildren):

LayoutTests:

  • fast/dom/crash-moving-subtree-between-documents-expected.txt: Added.
  • fast/dom/crash-moving-subtree-between-documents.html: Added.
6:34 AM Changeset in webkit [223404] by Carlos Garcia Campos
  • 30 edits in releases/WebKitGTK/webkit-2.18/Source

Merge r222456 - Separate form submission from PolicyChecker infrastructure
https://bugs.webkit.org/show_bug.cgi?id=177396

Reviewed by Geoffrey Garen.

Source/WebCore:

We used PolicyChecker for WillSubmitForm even though we just need a completion handler
with no parameters. That is what lambdas and WTF::Functions are for.

No change in behavior.

  • loader/EmptyClients.cpp:

(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
(WebCore::FrameLoader::continueLoadAfterWillSubmitForm): Deleted.

  • loader/FrameLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::continueLoadAfterWillSubmitForm): Deleted.

  • loader/PolicyChecker.h:

Source/WebKit:

  • UIProcess/API/APIFormClient.h:

(API::FormClient::willSubmitForm):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInputDelegate:]):

  • UIProcess/WebFormClient.cpp:

(WebKit::WebFormClient::willSubmitForm):

  • UIProcess/WebFormClient.h:
  • UIProcess/WebFormSubmissionListenerProxy.cpp:

(WebKit::WebFormSubmissionListenerProxy::continueSubmission):
(WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy): Deleted.

  • UIProcess/WebFormSubmissionListenerProxy.h:

(WebKit::WebFormSubmissionListenerProxy::create):
(WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):
(): Deleted.
(WebKit::WebFormSubmissionListenerProxy::operator new): Deleted.

  • UIProcess/WebFrameProxy.cpp:

(WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy): Deleted.

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

(WebKit::WebPageProxy::willSubmitForm):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::setUpWillSubmitFormListener):
(WebKit::WebFrame::continueWillSubmitForm):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::continueWillSubmitForm):

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:

(WebFrameLoaderClient::dispatchWillSubmitForm):

6:28 AM Changeset in webkit [223403] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222441 - [css-grid] Small refactoring adding RenderGrid::contentAlignment()
https://bugs.webkit.org/show_bug.cgi?id=177130

Reviewed by Sergio Villar Senin.

As a follow-up of r221931, this patch does a small refactoring
adding a new method RenderGrid::contentAlignment()
that is used from RenderGrid and GridTrackSizingAlgorithm.

No new tests, no change of behavior.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):

  • rendering/RenderGrid.cpp:

(WebCore::contentAlignmentNormalBehaviorGrid):
(WebCore::RenderGrid::contentAlignment const):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset const):
(WebCore::RenderGrid::contentAlignmentNormalBehaviorGrid): Deleted.

  • rendering/RenderGrid.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::resolvedContentAlignment):
(WebCore::RenderStyle::resolvedAlignContent const):
(WebCore::RenderStyle::resolvedJustifyContent const):

  • rendering/style/RenderStyle.h:
6:16 AM Changeset in webkit [223402] by Carlos Garcia Campos
  • 9 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222440 - [css-grid] fit-content() tracks shouldn't stretch
https://bugs.webkit.org/show_bug.cgi?id=177300

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Imported a new test in WPT covering several cases for this issue.

  • web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt: Added.
  • web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html: Added.
  • web-platform-tests/css/css-grid-1/alignment/w3c-import.log:

Source/WebCore:

The spec is pretty clear regarding this
(https://drafts.csswg.org/css-grid/#algo-stretch):

"This step sizes expands tracks that have an auto max track sizing

function by dividing any remaining positive, definite free space
equally amongst them."

The fit-content() tracks don't have an auto max track sizing function,
so they shouldn't be considered in this step of the algorithm.

The patch modifies GridTrackSizingAlgorithm::initializeTrackSizes()
so it doesn't consider fit-content() tracks as auto sized ones
(which are the ones later stretched in the last step of the algorithm).

Test: imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::reset):

  • rendering/GridTrackSizingAlgorithm.h:

LayoutTests:

Added new case to an existent test and also modified
the expected result in another one.

  • fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks-expected.txt:
  • fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html:
  • fast/css-grid-layout/grid-intrinsic-maximums-expected.html:
6:14 AM Changeset in webkit [223401] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222437 - [GTK] Unreviewed, move webkit_hit_test_result_context_is_scrollbar in documentation

  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
6:14 AM Changeset in webkit [223400] by Carlos Garcia Campos
  • 8 edits
    4 moves in releases/WebKitGTK/webkit-2.18

Merge r222433 - [ATK] Object attributes are missing for ARIA live region roles
https://bugs.webkit.org/show_bug.cgi?id=171174

Reviewed by Chris Fleizach.

Source/WebCore:

Expose the values of aria-live, aria-atomic, and aria-relevant via AtkObject
attributes on live region elements and their descendants. In order to accomplish
exposure on descendants, add AccessibilityObject::ariaLiveRegionAncestor(). Add an
optional argument, excludeIfOff, to AccessibilityObject::isInsideARIALiveRegion()
and AccessibilityObject::supportsARIALiveRegion(). This is needed because we need
to expose live region properties via ATK even in the case where the live region
is disabled/off, but supportsARIALiveRegion() deliberately checks if the live
region is enabled.

Tests: accessibility/aria-liveregion-marquee-default.html

accessibility/aria-liveregions-attributes.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isInsideARIALiveRegion const):
(WebCore::AccessibilityObject::ariaLiveRegionAncestor const):
(WebCore::AccessibilityObject::supportsARIALiveRegion const):

  • accessibility/AccessibilityObject.h:
  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(webkitAccessibleGetAttributes):

Tools:

Add support for testing property values for AXARIALive, AXARIAAtomic, and
AXARIARelevant. Also add handling for testing whether AXElementBusy is
"supported" (in ATK, busy is a state and is supported on all elements
regardless of whether the state is present or absent from the state set).

  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::boolAttributeValue):
(WTR::AccessibilityUIElement::isAttributeSupported):

LayoutTests:

Move two macOS tests to the shared layout test set.

  • accessibility/aria-liveregion-marquee-default-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default-expected.txt.
  • accessibility/aria-liveregion-marquee-default.html: Renamed from LayoutTests/accessibility/mac/aria-liveregion-marquee-default.html.
  • accessibility/aria-liveregions-attributes-expected.txt: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes-expected.txt.
  • accessibility/aria-liveregions-attributes.html: Renamed from LayoutTests/accessibility/mac/aria-liveregions-attributes.html.
  • platform/win/TestExpectations: Add the above tests to the list of known failures.
6:10 AM Changeset in webkit [223399] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.18

Merge r222530 - Followup (r222427): SynchronizedFixedQueue should not have a public constructor
https://bugs.webkit.org/show_bug.cgi?id=177458

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-09-26
Reviewed by Tim Horton.

Source/WebCore:

ImageFrameCache::decodingQueue() and frameRequestQueue() should return
raw references instead of Ref objects.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::decodingQueue):
(WebCore::ImageFrameCache::frameRequestQueue):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):

  • platform/graphics/ImageFrameCache.h:

Source/WTF:

Since SynchronizedFixedQueue is now derived from ThreadSafeRefCounted<SynchronizedFixedQueue>,
the standard way to have an instance of it is to call SynchronizedFixedQueue::create()
which returns a Ref<SynchronizedFixedQueue>. Now it does not make sense to still
have the constructor public.

  • wtf/SynchronizedFixedQueue.h:

(WTF::SynchronizedFixedQueue::SynchronizedFixedQueue):

Tools:

Fix the definition and the creation of SynchronizedFixedQueue.

  • TestWebKitAPI/Tests/WTF/SynchronizedFixedQueue.cpp:

(TestWebKitAPI::ToUpperConverter::ToUpperConverter):
(TestWebKitAPI::ToUpperConverter::startProducing):
(TestWebKitAPI::ToUpperConverter::startConsuming):
(TestWebKitAPI::ToUpperConverter::stopProducing):
(TestWebKitAPI::ToUpperConverter::stopConsuming):
(TestWebKitAPI::ToUpperConverter::enqueueLower):

6:10 AM Changeset in webkit [223398] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18/Source

Merge r222427 - Images may render partial frames even after loading all the encoded data
https://bugs.webkit.org/show_bug.cgi?id=177406

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-09-23
Reviewed by Simon Fraser.

Source/WebCore:

Because we do not want to block the main thread waiting for the image decoding
thread to terminate, we let the decoding thread finish its work even it will
be thrown away. If a new decoding thread is created and the SynchronizedFixedQueue
is reopened, the terminating decoding thread might have the chance to process
a new frame request. After it finishes decoding it, it realize that it is
terminating so it will drop the decoded frame to the floor. So the new request
was not processed by the new thread and because it was processed by the
terminating thread, nothing will be reported to the BitmapImage object and
the renderer will not be repainted.

The fix is to create a new SynchronizedFixedQueue every time a decoding
thread is created. This will guarantee that the terminating thread won't
have access to the new frame request and will shut down after being notified
by the old SynchronizedFixedQueue that it has been closed.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::frameRequestQueue):
(WebCore::ImageFrameCache::startAsyncDecodingQueue):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::stopAsyncDecodingQueue):

  • platform/graphics/ImageFrameCache.h:

Source/WTF:

Make it possible to create a RefPtr<SynchronizedFixedQueue>.

  • wtf/SynchronizedFixedQueue.h:

(WTF::SynchronizedFixedQueue::create):
(WTF::SynchronizedFixedQueue::enqueue):
(WTF::SynchronizedFixedQueue::dequeue):

6:05 AM Changeset in webkit [223397] by Carlos Garcia Campos
  • 9 edits in releases/WebKitGTK/webkit-2.18

Merge r222388 - [GTK] HTMLMediaElement resize event not fired when video size changes
https://bugs.webkit.org/show_bug.cgi?id=174582

Reviewed by Xabier Rodriguez-Calvar.

Modify AppendPipeline to notify MediaPlayerPrivateGStreamerMSE that a track is detected
not only for the initial track detection but also for subsequent in particular when the
video size has changed.

Update test expectation for new passing tests.

Source/WebCore:

  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::appsinkCapsChanged):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsink):

  • platform/graphics/gstreamer/mse/AppendPipeline.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::reattachTrack):

  • platform/graphics/gstreamer/mse/PlaybackPipeline.h:

LayoutTests:

  • platform/gtk/TestExpectations:
5:59 AM Changeset in webkit [223396] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222321 - In regular block layout, the width of a child's margin box should always be equal to that of its containing block
Merge from Blink https://bugs.chromium.org/p/chromium/issues/detail?id=708751
https://bugs.webkit.org/show_bug.cgi?id=176620

Patch by Zhifei FANG <facetothefate@gmail.com> on 2017-09-21
Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/block/over-constrained-auto-margin.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeLogicalWidthInRegion const):

LayoutTests:

  • fast/block/over-constrained-auto-margin-expected.txt: Added.
  • fast/block/over-constrained-auto-margin.html: Added.
5:56 AM Changeset in webkit [223395] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222304 - REGRESSION(r191731): SVGPatternElement can only reference another SVGPatternElement in the same SVG document
https://bugs.webkit.org/show_bug.cgi?id=176221

Reviewed by Tim Horton.

Source/WebCore:

According to the specs:

https://www.w3.org/TR/SVG11/filters.html#FilterElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#LinearGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#RadialGradientElementHrefAttribute
https://www.w3.org/TR/SVG11/pservers.html#PatternElementHrefAttribute

The xlink:href attribute of the SVG filter, gradient and pattern elements
must reference another element within the current SVG of the same type.

In r191731, the code of SVGPatternElement::collectPatternAttributes() was
removed and replaced by RenderSVGResourcePattern::collectPatternAttributes()
to avoid cyclic reference in the pattern element. The problem is the old
code used to check whether the referenced element is<SVGPatternElement>
before casting it. This code was not copied to the new function. So we
now allow the SVGPatternElement to reference any SVG resource element.

To fix this issue, we need to prevent SVGResources from chaining an incorrect
type of element to the SVG filter, gradient and pattern elements.

We also need to use the SVGResources for getting the referenced element
when collecting the attributes for the gradient elements. SVGResources solves
the cyclic referencing issue so there is no need to repeat the same code
in many places. Also, from now on the SVGResources will have valid linked
resource only. So casting the referenced element should always be valid.

Tests: svg/custom/pattern-invalid-content-inheritance.svg

  • rendering/svg/RenderSVGResourcePattern.cpp:

(WebCore::RenderSVGResourcePattern::collectPatternAttributes const): Asserts
the linkedResource is of type RenderSVGResourcePattern.

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::SVGResources):
(WebCore::isChainableResource): Ensure that an SVG resource can reference
only an SVG resource with the valid type.
(WebCore::SVGResources::buildCachedResources):

  • rendering/svg/SVGResources.h:

LayoutTests:

  • svg/custom/pattern-invalid-content-inheritance-expected.svg: Added.
  • svg/custom/pattern-invalid-content-inheritance.svg: Added.
5:53 AM Changeset in webkit [223394] by Carlos Garcia Campos
  • 4 edits
    1 add in releases/WebKitGTK/webkit-2.18

Merge r222276 - [ATK] atk_table_get_n_rows() and atk_table_get_n_columns() should return values of aria-rowcount and aria-colcount, if present
https://bugs.webkit.org/show_bug.cgi?id=171172

Reviewed by Chris Fleizach.

Source/WebCore:

Modify webKitAccessibleTableGetNColumns() and webkitAccessibleTableGetNRows()
to prefer the ARIA value over the DOM-based value.

No new tests needed: We already have coverage through aria-table-attributes.html.
Platform expectations for this test were updated.

  • accessibility/atk/WebKitAccessibleInterfaceTable.cpp:

(webkitAccessibleTableGetNColumns):
(webkitAccessibleTableGetNRows):

LayoutTests:

Generated platform-specific expectations to reflect the new behavior.

  • accessibility/aria-table-attributes.html: Modified to handle platform differences.
  • platform/gtk/accessibility/aria-table-attributes-expected.txt: Added.
5:19 AM Changeset in webkit [223393] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18

Merge r222275 - Fix HPPA and Alpha builds
https://bugs.webkit.org/show_bug.cgi?id=177224

Reviewed by Alex Christensen.

.:

  • CMakeLists.txt:

Source/JavaScriptCore:

  • CMakeLists.txt:

Source/WTF:

  • wtf/Platform.h:
5:18 AM Changeset in webkit [223392] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222264 - [GTK] Completely garbled display in GMail
https://bugs.webkit.org/show_bug.cgi?id=168964

Reviewed by Carlos Garcia Campos.

Do not try to decode images that are bigger than 32768 pixels, as cairo won't be able to render them,
and they will break the rendering of the rest of the page.

Covered by existent tests.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::isOverSize):

5:16 AM Changeset in webkit [223391] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18/Source/WebDriver

Merge r222256 - WebDriver: Implement commands to get and set the window rect
https://bugs.webkit.org/show_bug.cgi?id=177134

Reviewed by Brian Burg.

We are currently implementing the selenium legacy ones, we should implement the w3c ones instead.

https://w3c.github.io/webdriver/webdriver-spec.html#resizing-and-positioning-windows

  • Session.cpp:

(WebDriver::Session::getToplevelBrowsingContextRect): Helper to get the window rect. This is used by both get
and set window rect commands.
(WebDriver::Session::moveToplevelBrowsingContextwindow): Helper to ask automation to move the window.
(WebDriver::Session::resizeToplevelBrowsingContextwindow): Helper to ask automation to resize the window.
(WebDriver::Session::getWindowRect): Handle prompts and then call getToplevelBrowsingContextRect().
(WebDriver::Session::setWindowRect): Handle prompts and then move and resize the window according to the given
parameters and finish the operation calling getToplevelBrowsingContextRect().

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::WebDriverService::getWindowRect): Ask the session to get the window rect.
(WebDriver::valueAsNumberInRange): Helper to check a value is a valid number in the given range.
(WebDriver::WebDriverService::setWindowRect): Get and check size and position from parameters and then ask the
session to set the window rect.

  • WebDriverService.h:
5:15 AM Changeset in webkit [223390] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebDriver

Merge r222255 - WebDriver: wrong response in case of errors
https://bugs.webkit.org/show_bug.cgi?id=177127

Reviewed by Brian Burg.

I misunderstood the spec when I implemented this, so we either return a "value" key with the result in case of
success or the error object as the body in case of error. We should always add a "value" key to the body and set
it with either the result or the error object.

https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-an-error

  • WebDriverService.cpp:

(WebDriver::WebDriverService::sendResponse const):

5:10 AM Changeset in webkit [223389] by Manuel Rego Casasnovas
  • 9 edits
    2 adds in trunk

Don't use intrinsic width if our container's width is zero
https://bugs.webkit.org/show_bug.cgi?id=178073

Reviewed by Sergio Villar Senin.

Source/WebCore:

Based on Blink r173212 by <robhogan@gmail.com>.
https://chromium.googlesource.com/chromium/src/+/1592e8a1e8e56dfa6e5d709c50b129ae659c2fad

Since at least r798 we use a replaced element's intrinsic width
if its containing block has a width of zero. As a result our rendering
of width100percent-image.html has disagreed with all other browsers
and we display replaced elements when they should be invisible.

Test: fast/replaced/container-width-zero.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
If our container has zero width then let our width be zero too.

LayoutTests:

New rebaseline for width100percent-image.html test.

  • fast/replaced/container-width-zero-expected.txt: Added.
  • fast/replaced/container-width-zero.html: Added.
  • platform/ios/fast/replaced/width100percent-image-expected.txt:
  • platform/gtk/fast/replaced/width100percent-image-expected.png:
  • platform/gtk/fast/replaced/width100percent-image-expected.txt:
  • platform/mac/fast/replaced/width100percent-image-expected.png:
  • platform/mac/fast/replaced/width100percent-image-expected.txt:
  • platform/win/TestExpectations: Skips test as it needs a rebaseline.
4:59 AM Changeset in webkit [223388] by Carlos Garcia Campos
  • 5 edits
    1 add in releases/WebKitGTK/webkit-2.18

Merge r222245 - REGRESSION (r215613): Incorrect corners clipping with border-radius
https://bugs.webkit.org/show_bug.cgi?id=176498
<rdar://problem/34112607>

Reviewed by Tim Horton.

Source/WebCore:

http://trac.webkit.org/r215613 introduced an optimization to bail out of repainting borders if the invalidated
rect to paint is fully contained within the inner rounded rect of the border. However, due to issues with
coordinate and intersection math in RoundedRect::contains() and ellipseContainsPoint(), this causes
RenderBoxModelObject::paintBorder to return early even in circumstances where the border requires a repaint.
This patch fixes the contains() helper in RoundedRect and adds a new API test suite for RoundedRect that covers
these changes.

Test: WebCore.RoundedRectContainsRect

  • platform/graphics/GeometryUtilities.cpp:

(WebCore::ellipseContainsPoint):

This function attempts to return early if the Manhattan distance of the transformed point is less than the
radius of the circle that results from applying the same transformation to the ellipse. However, this bails and
returns true if x + y <= R, but this means that if x and y are negative, we'll always end up returning true.
We fix this by adding the absolute values instead, so the check becomes: |x| + |y| <= R.

  • platform/graphics/RoundedRect.cpp:

(WebCore::RoundedRect::contains const):

Before this patch, otherRect's upper left location was being used to hit-test against the ellipses formed from
each of the 4 corners of the rounded rect. Instead, this should use (x, y), (maxX, y), (x, maxY), (maxX, maxY)
for the top left, top right, bottom left, and bottom right corners, respectively.

Additionally, the checks for the bottom left and bottom right to determine whether the rect corner should be
checked for intersection against the ellipse's corner are incorrect. In the bottom left corner, the check for
otherRect.maxX() >= center.x() should instead be otherRect.x() <= center.x(), and the check for
otherRect.x() <= center.x() should instead be otherRect.maxX() >= center.x().

  • platform/graphics/RoundedRect.h:

Tools:

Add WebCore API tests for RoundedRect::contains().

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

(TestWebKitAPI::layoutRect):
(TestWebKitAPI::TEST):

4:22 AM Changeset in webkit [223387] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/LayoutTests

Merge r222237 - Add missing text after r222226.

  • accessibility/crash-table-recursive-layout.html:
4:22 AM Changeset in webkit [223386] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222226 - AXObjectCache::performDeferredCacheUpdate is called recursively through FrameView::layout.
https://bugs.webkit.org/show_bug.cgi?id=176218
<rdar://problem/34205612>

Reviewed by Simon Fraser.

Source/WebCore:

There are certain cases when we might re-enter performDeferredCacheUpdate through recursive
layout calls (see webkit.org/b/177176) and mutate m_deferredTextChangedList multiple times.

Test: accessibility/crash-table-recursive-layout.html

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::performDeferredCacheUpdate):

  • accessibility/AXObjectCache.h:

LayoutTests:

  • accessibility/crash-table-recursive-layout-expected.txt: Added.
  • accessibility/crash-table-recursive-layout.html: Added.
4:13 AM Changeset in webkit [223385] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.18

Merge r222222 - [CMake] Add ENABLE_WEB_CRYPTO option and make ENABLE_SUBTLE_CRYPTO depend on it.
https://bugs.webkit.org/show_bug.cgi?id=177180

Reviewed by Michael Catanzaro.

This adds a ENABLE_WEB_CRYPTO flag and makes ENABLE_SUBTLE_CRYPTO depend on it.
The GTK and WPE ports enable them and set ENABLE_WEB_CRYPTO to public.

  • Source/cmake/OptionsGTK.cmake: Set both features to ON and ENABLE_WEB_CRYPTO to public. No change in behaviour for GTK.
  • Source/cmake/OptionsWPE.cmake: Do like on the GTK port. The public flag is now ENABLE_WEB_CRYPTO.
  • Source/cmake/WebKitFeatures.cmake: Add the definition of ENABLE_WEB_CRYPTO and make ENABLE_SUBTLE_CRYPTO depend on it.
4:06 AM Changeset in webkit [223384] by Carlos Garcia Campos
  • 10 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222221 - Do not mutate RenderText content during layout.
https://bugs.webkit.org/show_bug.cgi?id=176219
<rdar://problem/34205724>

Reviewed by David Hyatt.

Source/WebCore:

Update combined text when the style/content change as opposed to lazily, during layout.
-content mutation during layout might make the inline tree go out of sync.

Test: fast/text/international/dynamic-text-combine-crash.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):

  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::styleDidChange):
(WebCore::RenderCombineText::setRenderedText):
(WebCore::RenderCombineText::combineTextIfNeeded):
(WebCore::RenderCombineText::combineText): Deleted.

  • rendering/RenderCombineText.h:
  • rendering/RenderText.h:
  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleText):

  • rendering/line/LineBreaker.cpp:

(WebCore::LineBreaker::skipLeadingWhitespace):

LayoutTests:

  • fast/text/international/dynamic-text-combine-crash.html: Added.
  • fast/text/text-combine-crash-expected.txt:
4:02 AM Changeset in webkit [223383] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222220 - createMarkupInternal should protect its pointer to the Range's common ancestor
https://bugs.webkit.org/show_bug.cgi?id=177033
<rdar://problem/34265390>

Reviewed by Tim Horton.

Source/WebCore:

Adds basic safeguarding to codepaths hit while executing an outdent command.

Test: editing/execCommand/outdent-with-media-query-listener-in-iframe.html

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::outdentRegion):

Avoid an infinite loop if endOfCurrentParagraph is a null position.

  • editing/markup.cpp:

(WebCore::createMarkupInternal):

Protect the raw pointer to the Range's common ancestor node.

LayoutTests:

Adds a test that removes the common ancestor node of a range in the middle of executing an outdent.

  • editing/execCommand/outdent-with-media-query-listener-in-iframe-expected.txt: Added.
  • editing/execCommand/outdent-with-media-query-listener-in-iframe.html: Added.
4:00 AM Changeset in webkit [223382] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebDriver

Merge r222204 - WebDriver: wrong key name for capabilities in new session response
https://bugs.webkit.org/show_bug.cgi?id=177074

Reviewed by Brian Burg.

We are using "value", it should be "capabilities".
https://w3c.github.io/webdriver/webdriver-spec.html#new-session

  • WebDriverService.cpp:

(WebDriver::WebDriverService::newSession):

3:59 AM Changeset in webkit [223381] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebDriver

Merge r222203 - WebDriver: HTTP responses should include Cache-Control header with no-cache value
https://bugs.webkit.org/show_bug.cgi?id=177073

Reviewed by Sergio Villar Senin.

6.3 Processing Model.
Set the response’s header with name and value with the following values:

Content-Type "application/json; charset=utf-8"
Cache-Control "no-cache"

https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-a-response

We were setting the Content-Type, but not the Cache-Control. This is checked by all WPT WebDriver tests.

  • soup/HTTPServerSoup.cpp:

(WebDriver::HTTPServer::listen): Add Cache-Control header.

3:56 AM Changeset in webkit [223380] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222168 - Always update display: contents styles in RenderTreeUpdater.
https://bugs.webkit.org/show_bug.cgi?id=177065

Patch by Emilio Cobos Álvarez <emilio> on 2017-09-18
Reviewed by Antti Koivisto.

Source/WebCore:

Otherwise we keep an old style around, making following style updates wrong.

Test: fast/css/display-contents-style-update.html

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):

LayoutTests:

  • fast/css/display-contents-style-update-expected.html: Added.
  • fast/css/display-contents-style-update.html: Added.
3:55 AM Changeset in webkit [223379] by Carlos Garcia Campos
  • 1 edit
    2 adds in releases/WebKitGTK/webkit-2.18/LayoutTests

Merge r222167 - Avoid style resolution when clearing focused element.
https://bugs.webkit.org/show_bug.cgi?id=176224
<rdar://problem/34206409>

Reviewed by Zalan Bujtas.

LayoutTests:

  • fast/dom/focus-style-resolution-expected.txt: Added.
  • fast/dom/focus-style-resolution.html: Added.
3:53 AM Changeset in webkit [223378] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222164 - Avoid style resolution when clearing focused element.
https://bugs.webkit.org/show_bug.cgi?id=176224
<rdar://problem/34206409>

Reviewed by Zalan Bujtas.

Test: fast/dom/focus-style-resolution.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

Don't do synchronous style resolution with FocusRemovalEventsMode::DoNotDispatch.
Style resolution may dispatch events.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didBlur):

Move resolveStyleIfNeeded call to setFocusedElement. It is the only client for didBlur.

3:50 AM Changeset in webkit [223377] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222134 - [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
https://bugs.webkit.org/show_bug.cgi?id=177041

Unreviewed fixup, I broke the size of the argv buffer when experimenting with how to respond
to review comments. Not sure why this didn't blow up everything during testing.

  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:

(WebKit::ProcessLauncher::launchProcess):

3:50 AM Changeset in webkit [223376] by Carlos Garcia Campos
  • 3 edits
    1 move
    1 add
    1 delete in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222133 - [WPE][GTK] Merge ProcessLauncher[WPE,GTK]
https://bugs.webkit.org/show_bug.cgi?id=177041

Reviewed by Carlos Garcia Campos.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: Renamed from Source/WebKit/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp.

(WebKit::childSetupFunction):
(WebKit::ProcessLauncher::launchProcess):
(WebKit::ProcessLauncher::terminateProcess):
(WebKit::ProcessLauncher::platformInvalidate):

  • UIProcess/Launcher/wpe/ProcessLauncherWPE.cpp: Removed.
3:48 AM Changeset in webkit [223375] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222130 - [GTK] Build failure with enchant-2.1.1
https://bugs.webkit.org/show_bug.cgi?id=176877

Unreviewed build fix for enchant 2.1.1.

enchant_dict_free_suggestions() has been deprecated since at least 2005. Use its
replacement, enchant_dict_free_string_list(), instead. That's also been around since at
least 2005.

  • platform/text/enchant/TextCheckerEnchant.cpp:

(WebCore::TextCheckerEnchant::getGuessesForWord):

3:45 AM Changeset in webkit [223374] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222114 - Avoid style recomputation when forwarding a focus event to an text field's input type
https://bugs.webkit.org/show_bug.cgi?id=176160
<rdar://problem/34184820>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Currently, TextFieldInputType::forwardEvent synchronously triggers style recomputation, for the purpose of
scrolling to the origin upon handling a blur event, and also for updating caps lock state after a blur or focus.
In synchronously triggering style recomputation, we may end up running arbitrary JavaScript, which may change
the HTMLInputElement's type and cause the current TextFieldInputType to be destroyed.

To mitigate this, we only update caps lock state when forwarding a focus or blur event to the InputType, and
instead scroll blurred text fields to the origin later, in HTMLInputElement::didBlur (invoked from
Document::setFocusedElement after blur and focusout events have fired). Instead of having the InputType update
style, lift the call to Document::updateStyleIfNeeded up into HTMLInputElement so that we gracefully handle the
case where the page destroys and sets a new InputType within the scope of this style update.

Test: fast/forms/change-input-type-in-focus-handler.html

  • dom/Document.cpp:

(WebCore::Document::setFocusedElement):

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didBlur):

  • html/HTMLInputElement.h:
  • html/InputType.h:

(WebCore::InputType::elementDidBlur):

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::forwardEvent):
(WebCore::TextFieldInputType::elementDidBlur):

  • html/TextFieldInputType.h:

LayoutTests:

Adds a new layout test verifying that we don't crash when changing the input type from within a focus event listener.

  • fast/forms/change-input-type-in-focus-handler-expected.txt: Added.
  • fast/forms/change-input-type-in-focus-handler.html: Added.
3:42 AM Changeset in webkit [223373] by Carlos Garcia Campos
  • 11 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222097 - Make DocumentLoader a FrameDestructionObserver
https://bugs.webkit.org/show_bug.cgi?id=176364
<rdar://problem/34254780>

Reviewed by Alex Christensen.

The DocumentLoader needs to know when its Frame is destroyed so that it can
perform properly cleanup.

Test: fast/events/beforeunload-dom-manipulation-crash.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::DocumentLoader): Call FrameDestructionObserver constructor.
(WebCore::DocumentLoader::responseReceived): Drive-by fix. Make sure the current
object is valid during the callback.
(WebCore::DocumentLoader::attachToFrame): Use FrameDestructionObserver::observerFrame rather
than setting the m_frame variable directly.
(WebCore::DocumentLoader::detachFromFrame): Ditto.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::frame const): Deleted, as this is provided by the FrameDestructionObserver.

Tools:
Provide mechanism to immediately end tests
https://bugs.webkit.org/show_bug.cgi?id=176364
<rdar://problem/34254780>

Reviewed by Alex Christensen.

WebKitTestRunner does not output state if the top loading frame has not been removed. This prevents some
tests that attempt to exercise failed load state from working properly.

This change adds a new 'forceImmediateCompletion' handler for DumpRenderTree and WebKitTestRunner so
that we can properly test these conditions.

  • DumpRenderTree/TestRunner.h:
  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::forceImmediateCompletion): Added.

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::forceImmediateCompletion): Ditto.

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

(WTR::TestRunner::forceImmediateCompletion): Ditto.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:
Make DocumentLoader a FrameDestructionObserver
https://bugs.webkit.org/show_bug.cgi?id=176364
<rdar://problem/34254780>

Reviewed by Alex Christensen.

  • fast/events/beforeunload-dom-manipulation-crash-expected.txt: Added.
  • fast/events/beforeunload-dom-manipulation-crash.html: Added.
3:37 AM Changeset in webkit [223372] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r222090 - [Harfbuzz] Material icons not rendered correctly when using the web font
https://bugs.webkit.org/show_bug.cgi?id=176995

Reviewed by Michael Catanzaro.

Only a few of them are correctly rendered and some others are wrong. We only render correctly the ones that
don't have an underscore in their name (or that start with a number like 3d_rotation). In the cases where the
name before the underscore is also an icon, we render that icon instead, that's why some of them are wrong. This
is happening because the underscore is causing the HarfbuffShaper to split the text in 3 runs, one for the word
before the underscore, another one for the underscore and another for the word after the underscore. So, we
end up trying to shape the 3 runs independently and we fail when the icon doesn't exist, or when it exists but
it's not the one we are looking for. The cause of this is that the underscore has a different script (Common)
than the rest of characters (Latin) which is a condition in HarfbuffShaper to create a different run. The
unicode spec says that characters with Common script should be handled differently, but we are just ignoring
it. The spec proposes to use an heuristic based on simply inheriting the script of the previous character, which
should work in most of the cases. We could take a more conservative approach and do that only if both characters
are ASCII. We should also consider handling other cases mentioned by the spec like brackets and quotation marks,
but that belongs to a different bug/commit.

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::scriptsAreCompatibleForCharacters): Helper function to check if the current and previous scripts are
compatible,
(WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Use scriptsAreCompatibleForCharacters() to decided whether to
finish the current run or not. In case of Common script, inherit also the script from the previous character.

3:29 AM Changeset in webkit [223371] by Antti Koivisto
  • 2 edits in trunk/Tools

Add Emilio Cobos Álvarez to the contributors list.
https://bugs.webkit.org/show_bug.cgi?id=178334

Patch by Emilio Cobos Álvarez <emilio> on 2017-10-16
Reviewed by Antti Koivisto.

  • Scripts/webkitpy/common/config/contributors.json:
3:28 AM Changeset in webkit [223370] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Tools

Merge r222032 - [GTK] Add a switch to start the mini-browser in full-screen mode
https://bugs.webkit.org/show_bug.cgi?id=176904

Reviewed by Carlos Garcia Campos.

  • MiniBrowser/gtk/main.c:

(main):

3:27 AM Changeset in webkit [223369] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r222027 - [GTK][Wayland] Flickering when resizing the window
https://bugs.webkit.org/show_bug.cgi?id=176774

Reviewed by Michael Catanzaro.

This regressed when we switched to always start the wayland compositor. In
AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState() we check if the nested compositor is
running, which is always true now (if EGL and the required extensions are available). We should check if we are
in AC mode instead.

  • UIProcess/AcceleratedDrawingAreaProxy.cpp:

(WebKit::AcceleratedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):

3:25 AM Changeset in webkit [223368] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/LayoutTests

Merge r222046 - fast/forms/append-children-during-form-submission.html fails due to a text diff on iOS
https://bugs.webkit.org/show_bug.cgi?id=176908

Reviewed by Tim Horton.

Tweak an existing layout test added in r222005 to make its expectation consistent across all platforms.

  • fast/forms/append-children-during-form-submission-expected.txt:
  • fast/forms/append-children-during-form-submission.html:
  • platform/ios/fast/forms/append-children-during-form-submission-expected.txt: Removed.
  • platform/mac-elcapitan/fast/forms/append-children-during-form-submission-expected.txt: Removed.
3:25 AM Changeset in webkit [223367] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r222005 - Submitting a form can cause HTMLFormElement's associated elements vector to be mutated during iteration
https://bugs.webkit.org/show_bug.cgi?id=176368
<rdar://problem/34254998>

Reviewed by Ryosuke Niwa.

Source/WebCore:

In the process of iterating over form.associatedElements() during form submission in FormSubmission::create, the
page may cause us to clobber the vector of FormAssociatedElements* we're currently iterating over by inserting
new form controls beneath the form element we're in the process of submitting. This happens because
FormSubmission::create calls HTMLTextAreaElement::appendFormData, which requires layout to be up to date, which
in turn makes us updateLayout() and set focus, which fires a change event, upon which the page's JavaScript
inserts additonal DOM nodes into the form, modifying the vector of associated elements.

To mitigate this, instead of iterating over HTMLFormElement::associatedElements(), which returns a reference to
the HTMLFormElement's actual m_associatedElements vector, we iterate over a new vector of
Ref<FormAssociatedElement>s created from m_associatedElements.

This patch also removes an event dispatch assertion added in r212026. This assertion was added to catch any
other events dispatched in this scope, since dispatching events there would have had security implications, but
after making iteration over associated elements robust, this NoEventDispatchAssertion is no longer useful.

Test: fast/forms/append-children-during-form-submission.html

  • loader/FormSubmission.cpp:

(WebCore::FormSubmission::create):

LayoutTests:

Adds a new test to make sure we don't crash when mutating a form's associated elements during form submission.

  • fast/forms/append-children-during-form-submission-expected.txt: Added.
  • fast/forms/append-children-during-form-submission.html: Added.
3:21 AM Changeset in webkit [223366] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221989 - [GTK] Fails to build because 'Float32Array' has not been declared in AudioContext.h
https://bugs.webkit.org/show_bug.cgi?id=176870

Reviewed by Konstantin Tokarev.

Add missing include of Float32Array.h

No new tests, its a build fix.

  • Modules/webaudio/AudioContext.h:
3:15 AM Changeset in webkit [223365] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r221948 - ASSERTION FAILED: !m_valueOrException under FontFaceSet::completedLoading loading a Serious Eats page
https://bugs.webkit.org/show_bug.cgi?id=175899

Reviewed by Tim Horton.

Source/WebCore:

Slight style update to r221835. Also adds a test.

Test: fast/text/document-fonts-while-loading-crash.html

  • css/CSSFontFaceSet.h:
  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::FontFaceSet):

LayoutTests:

  • fast/text/document-fonts-while-loading-crash-expected.txt: Added.
  • fast/text/document-fonts-while-loading-crash.html: Added.
3:13 AM Changeset in webkit [223364] by Carlos Garcia Campos
  • 7 edits in releases/WebKitGTK/webkit-2.18

Merge r221931 - [css-grid] Stretching auto tracks should be done as part of the track sizing algorithm
https://bugs.webkit.org/show_bug.cgi?id=176783

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Import changes on the test related to the new behavior.

  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html:

Source/WebCore:

CSS WG has agreed to modify the track sizing algorithm to include
a new step: https://drafts.csswg.org/css-grid/#algo-stretch
We used to do the stretch of the "auto" tracks at the end of
the track sizing algorithm, however this change integrates it
into the algorithm itself as the last step.
See: https://github.com/w3c/csswg-drafts/issues/1150

The patch moves the method
RenderGrid::applyStretchAlignmentToTracksIfNeeded() to
GridTrackSizingAlgorithm::stretchAutoTracks().
And then modifies the grid track sizing algorithm to execute
the new step.

This patch uses the WPT test updated to check the new behavior.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes): Initialize
the list of auto tracks.
(WebCore::GridTrackSizingAlgorithm::stretchFlexibleTracks): Add
early return if there are not flexible tracks.
(WebCore::GridTrackSizingAlgorithm::stretchAutoTracks): Code moved from
RenderGrid::applyStretchAlignmentToTracksIfNeeded().
(WebCore::GridTrackSizingAlgorithm::setup): Reset list of auto tracks.
(WebCore::GridTrackSizingAlgorithm::run): Add new step
stretchAutoTracks().
(WebCore::GridTrackSizingAlgorithm::reset): Reset auto tracks.

  • rendering/GridTrackSizingAlgorithm.h: Add m_autoSizedTracksIndex.
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::layoutBlock): Avoid applying stretch here.
(WebCore::RenderGrid::contentAlignmentNormalBehaviorGrid): Make public.
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded): Moved to
GridTrackSizingAlgorithm::stretchAutoTracks().

  • rendering/RenderGrid.h:
3:08 AM Changeset in webkit [223363] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r221918 - AX: On generic container elements, WebKit should distinguish between tooltip (e.g. @title) and label (e.g. @aria-label) attributes
https://bugs.webkit.org/show_bug.cgi?id=170475
<rdar://problem/31439222>

Reviewed by Joanmarie Diggs.

Source/WebCore:

Test: accessibility/title-tag-on-unimportant-elements-is-help-text.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::helpText):
(WebCore::AccessibilityNodeObject::accessibilityDescription):
(WebCore::AccessibilityNodeObject::roleIgnoresTitle):

  • accessibility/AccessibilityNodeObject.h:

LayoutTests:

  • accessibility/title-tag-on-unimportant-elements-is-help-text-expected.txt: Added.
  • accessibility/title-tag-on-unimportant-elements-is-help-text.html: Added.
3:07 AM Changeset in webkit [223362] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221916 - Remove RenderElement::isCSSAnimating boolean
https://bugs.webkit.org/show_bug.cgi?id=176779

Reviewed by Andreas Kling.

This optimization can be replaced with a simple style test that doesn't require keeping
two sources of truth in sync.

  • page/animation/CSSAnimationController.cpp:

(WebCore::CSSAnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::CSSAnimationControllerPrivate::clear):

Can't test here as style might have become non-animating and we don't clear animation when that happens.
This is only called on renderer destruction so it is not an important optimization.

(WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer const):
(WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer const):
(WebCore::CSSAnimationControllerPrivate::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation const):
(WebCore::CSSAnimationController::cancelAnimations):
(WebCore::CSSAnimationController::getAnimatedStyleForRenderer):
(WebCore::CSSAnimationController::computeExtentOfAnimation const):
(WebCore::CSSAnimationController::isRunningAnimationOnRenderer const):
(WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer const):

Test if the style has any animations. This is roughly equivalent of the old test.
(it is actually somewhat better as the boolean was never cleared on style changes)

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::RenderElement):

  • rendering/RenderElement.h:

(WebCore::RenderElement::isCSSAnimating const): Deleted.
(WebCore::RenderElement::setIsCSSAnimating): Deleted.

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasAnimationsOrTransitions const):

2:56 AM Changeset in webkit [223361] by Carlos Garcia Campos
  • 9 edits
    2 adds
    2 deletes in releases/WebKitGTK/webkit-2.18

Merge r221910 - [css-grid] Use transferred size over content size for automatic minimum size
https://bugs.webkit.org/show_bug.cgi?id=176688

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Import changes on the tests related to the new behavior.

  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-006.html:
  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-007.html:
  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-008.html:
  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-009.html:
  • web-platform-tests/css/css-grid-1/grid-items/grid-minimum-size-grid-items-021.html:
  • web-platform-tests/css/css-grid-1/grid-items/support/100x50-green.png: Removed.
  • web-platform-tests/css/css-grid-1/grid-items/support/25x50-green.png: Added.
  • web-platform-tests/css/css-grid-1/grid-items/support/50x100-green.png: Removed.
  • web-platform-tests/css/css-grid-1/grid-items/support/50x25-green.png: Added.
  • web-platform-tests/css/css-grid-1/grid-items/support/w3c-import.log:

Source/WebCore:

CSS WG has agreed to modify the spec so now the transferred size is used
(if it exists) independently if it's bigger or smaller
than the content size.
See: https://github.com/w3c/csswg-drafts/issues/1149

The spec text (https://drafts.csswg.org/css-grid/#min-size-auto):

"The automatic minimum size for a grid item in a given dimension is

its specified size if it exists, otherwise its transferred size
if that exists, else its content size"

This patch use the WPT tests updated to check the new behavior.

  • rendering/GridTrackSizingAlgorithm.cpp:

(WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
Modified so it always returns the transferred size (if any).

2:53 AM Changeset in webkit [223360] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.18

Merge r221879 - AX: [ATK] aria-autocomplete not exposed on comboboxes
https://bugs.webkit.org/show_bug.cgi?id=176724

Reviewed by Chris Fleizach.

Source/WebCore:

Add a check to AccessibilityObject::supportsARIAAutoComplete() for
combobox because isARIATextControl() returns false for that role.

Add new combobox test cases to existing aria-autocomplete.html test.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::supportsARIAAutoComplete const):

LayoutTests:

  • accessibility/gtk/aria-autocomplete-expected.txt: Updated for new test cases
  • accessibility/gtk/aria-autocomplete.html: New test cases for combobox added
2:50 AM Changeset in webkit [223359] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221850 - [GStreamer] Drop libgcrypt initialization in webkit_media_clear_key_decrypt_init()
https://bugs.webkit.org/show_bug.cgi?id=176656

Reviewed by Michael Catanzaro.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webkit_media_clear_key_decrypt_init): Don't re-initialize libgcrypt here
since that's already done in the WebProcess main(), and the calls here
only result in libgcrypt writing out 'Oops' warnings on stderr.

2:46 AM Changeset in webkit [223358] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221835 - Fix double resolve assertion in FontFaceSet seen while running tests
https://bugs.webkit.org/show_bug.cgi?id=176525

Reviewed by Brent Fulgham.

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::FontFaceSet): Only resolve the promise if the CSSFontFaceSet
is already loaded. Otherwise, we will resolve it later when it calls completedLoading.

2:41 AM Changeset in webkit [223357] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Tools

Merge r221833 - [GTK] Improve Ctrl+W and Ctrl+Q shortcuts in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=176619

Reviewed by Carlos Garcia Campos.

There are two different problems here. First, Ctrl+W is closing the entire window. That made
sense when I implemented the shortcut a couple years ago, but now MiniBrowser supports tabs
and it should really close only one single tab. Fix that.

Next, the keyboard shortcuts are not using webkit_web_view_try_close() and so are bypassing
onbeforeunload handlers, which are respected when closing with the mouse. Fix that too.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowTryCloseCurrentWebView):
(browserWindowTryClose):
(browser_window_init):

2:40 AM Changeset in webkit [223356] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r221831 - gl.detachShader breaks shader program
https://bugs.webkit.org/show_bug.cgi?id=137689
<rdar://problem/34025056>

Reviewed by Sam Weinig.

Source/WebCore:

It should be possible to compile shaders, attach them to a program,
link the program, detach the shaders, delete the shaders, and then
ask for the uniform and attribute locations. That is, once you've
linked, the shaders can be thrown away.

We were using the attached shaders to look up uniform locations, so
we now keep around a separate map that remembers what shaders were
attached when the program links.

This fixes the bug, but the whole area is still a bit messy. For one,
we're keeping around all the shader information even after it is
no longer used.
See https://bugs.webkit.org/show_bug.cgi?id=98204

Test: fast/canvas/webgl/detachShader-before-accessing-uniform.html

  • platform/graphics/GraphicsContext3D.h: Add another map to remember

what shaders were used when a program was linked.

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap): New helper
to look up a name in our source maps.
(WebCore::GraphicsContext3D::mappedSymbolName): Use the helper, and look
at linked shaders if there are no attached shaders.
(WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap): Does the
reverse of the above.
(WebCore::GraphicsContext3D::originalSymbolName):
(WebCore::GraphicsContext3D::linkProgram): Add to the new map.
(WebCore::GraphicsContext3D::deleteProgram): Delete the program from
our shader entries.

LayoutTests:

Test that detaches and deletes shaders after linking, but before
asking for uniform locations.

  • fast/canvas/webgl/detachShader-before-accessing-uniform-expected.txt: Added.
  • fast/canvas/webgl/detachShader-before-accessing-uniform.html: Added.
2:34 AM Changeset in webkit [223355] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Tools

Merge r221827 - [GTK] Unreviewed, fix typo forwad -> forward

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowUpdateNavigationActions):
(backForwardlistChanged):
(browserWindowSwitchTab):
(backForwadlistChanged): Deleted.

2:33 AM Changeset in webkit [223354] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Tools

Merge r221819 - MiniBrowser closes tab instead of window on close signal
https://bugs.webkit.org/show_bug.cgi?id=176587

Reviewed by Carlos Garcia Campos.

This has been broken since we added support for multiple tabs. We need to run try_close for
every open tab, not just the current one. If there are no onbeforeonload handlers then all
tabs will close; if there are some, then they'll be respected, but the remaining tabs will
be closed.

Note that we cannot simply iterate through the tabs of the GtkNotebook, as we'd be deleting
tabs as we go, so save all the tabs into a separate list and then try to close each in turn.

  • MiniBrowser/gtk/BrowserWindow.c:

(browserWindowTryClose):
(browserWindowDeleteEvent):

2:32 AM Changeset in webkit [223353] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221815 - [GStreamer] Missing GRefPtr adoptions in MediaPlayerPrivateGStreamerBase, PlaybackPipeline
https://bugs.webkit.org/show_bug.cgi?id=176646

Reviewed by Carlos Garcia Campos.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::registerWebKitGStreamerElements): Adopt the return value
of gst_element_factory_find(), which is transferred in full.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::flush): Adopt the return values
of gst_element_get_static_pad() and gst_pad_get_peer(), both being
transferred in full.

2:31 AM Changeset in webkit [223352] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Tools

Merge r221814 - Unreviewed WPE build fix.

  • TestWebKitAPI/PlatformWPE.cmake:

Link WebCore archives into the TestWebCore binary as a group.

2:28 AM Changeset in webkit [223351] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221781 - [GStreamer] Add GRefPtr specializations for GstGLDisplay, GstGLContext
https://bugs.webkit.org/show_bug.cgi?id=176543

Reviewed by Xabier Rodriguez-Calvar.

Both GstGLDisplay and GstGLContext inherit from GstObject, meaning
gst_object_ref_sink() and gst_object_unref() should be used for
incrementing and decrementing reference count. Template specializations
for the adoptGRef(), refGPtr() and derefGPtr() are added for both types,
preventing GRefPtr<> from falling back to using g_object_ref() and
g_object_unref() for reference count modification purposes.

  • platform/graphics/gstreamer/GRefPtrGStreamer.cpp:

(WTF::adoptGRef):
(WTF::refGPtr<GstGLDisplay>):
(WTF::derefGPtr<GstGLDisplay>):
(WTF::refGPtr<GstGLContext>):
(WTF::derefGPtr<GstGLContext>):

  • platform/graphics/gstreamer/GRefPtrGStreamer.h:
2:24 AM Changeset in webkit [223350] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r221779 - [GTK][WPE] UI process crash in WebBackForwardList::restoreFromState
https://bugs.webkit.org/show_bug.cgi?id=176303

Reviewed by Michael Catanzaro.

Ensure the current index provided by the session state is not out of actual item list bounds. This is a bug in
the session state decoder, but WebBackForwardList::backForwardListState() is already doing the check and using
the last item index instead, so it's not easy to know where the actual problem is. In any case we should
still protect the decoder.

  • UIProcess/API/glib/WebKitWebViewSessionState.cpp:

(decodeSessionState):

2:23 AM Changeset in webkit [223349] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r221778 - WebKit should claim that it can show responses for a broader range of JSON MIMETypes
https://bugs.webkit.org/show_bug.cgi?id=176252
<rdar://problem/34212885>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-09-07
Reviewed by Ryosuke Niwa.

Source/WebCore:

  • platform/MIMETypeRegistry.h:
  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::canShowMIMEType):
Extend this to support JavaScript and JSON MIMETypes that WebKit
knows how to treat as text.

Tools:

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

(-[WKNavigationResponseTestNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[WKNavigationResponseTestNavigationDelegate webView:didCommitNavigation:]):
(-[WKNavigationResponseTestSchemeHandler webView:startURLSchemeTask:]):
(-[WKNavigationResponseTestSchemeHandler webView:stopURLSchemeTask:]):
(TEST):
Test for canShowMIMEType with multiple JSON mime types and a garbage mime type.
Previously canShowMIMEType would have been YES for "application/json" but
NO for "application/vnd.api+json". Now it shows YES for both.

  • TestWebKitAPI/PlatformGTK.cmake:
  • TestWebKitAPI/PlatformWPE.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/MIMETypeRegistry.cpp: Added.

(TestWebKitAPI::TEST):
Tests for MIMETypeRegistry's dynamic JSON mime type detection.

2:16 AM Changeset in webkit [223348] by Carlos Garcia Campos
  • 2 edits
    3 adds in releases/WebKitGTK/webkit-2.18

Merge r221734 - [WPE][CMake] Add "dist" and "distcheck" targets
https://bugs.webkit.org/show_bug.cgi?id=176448

Reviewed by Carlos Garcia Campos.

Add "dist" and "distcheck" CMake targets, which create release tarballs.
These are available only when configuring with -DDEVELOPER_MODE=TRUE.

.:

  • Source/PlatformWPE.cmake: Added.
  • Source/cmake/FindXz.cmake: Added.

Tools:

  • wpe/manifest.txt.in: Added.
2:12 AM Changeset in webkit [223347] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r221681 - [WPE][CMake] Fix path to the WebKitApplicationInfo.h header.

Unreviewed build fix.

This doesn't really make a difference for the build bots, but it makes
it possible to craft working release tarballs of WPE.

  • PlatformWPE.cmake: Use the WPE version of WebKitApplicationInfo.h
2:11 AM Changeset in webkit [223346] by Carlos Garcia Campos
  • 8 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r221668 - [css-grid] grid shorthand should not reset the gutter properties
https://bugs.webkit.org/show_bug.cgi?id=176375

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Import new test from WPT.

  • web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001-expected.txt: Added.
  • web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html: Added.
  • web-platform-tests/css/css-grid-1/grid-definition/w3c-import.log:

Source/WebCore:

The CSS WG has resolved that the "grid" shorthand shouldn't reset
the gutter properties anymore:
https://github.com/w3c/csswg-drafts/issues/1036

This was originally implemented in r195529, so this is somehow
a revert of that change.

Test: imported/w3c/web-platform-tests/css/css-grid-1/grid-definition/grid-shorthand-001.html

  • css/CSSProperties.json:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeGridShorthand):

LayoutTests:

Update the test to check the new behavior.

  • fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
  • fast/css-grid-layout/grid-shorthand-get-set.html:
1:48 AM Changeset in webkit [223345] by Carlos Garcia Campos
  • 15 edits
    1 move
    1 add in releases/WebKitGTK/webkit-2.18/Source/WebKit

Merge r221610 - [GTK] Rename PLUGIN_ARCHITECTURE(X11) as PLUGIN_ARCHITECTURE(UNIX)
https://bugs.webkit.org/show_bug.cgi?id=176330

Reviewed by Michael Catanzaro.

It's no longer X11 specific since it's also used in Wayland when the X11 target is enabled. It should be renamed
as UNIX and make it available when building the wayland target even if the X11 on is disabled.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • PluginProcess/unix/PluginProcessMainUnix.cpp:
  • Shared/Plugins/Netscape/NetscapePluginModule.cpp:

(WebKit::NetscapePluginModule::tryLoad):

  • Shared/Plugins/Netscape/NetscapePluginModule.h:
  • Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp: Renamed from Source/WebKit/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp.
  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/Plugins/gtk/PluginInfoCache.cpp:

(WebKit::PluginInfoCache::getPluginInfo):
(WebKit::PluginInfoCache::updatePluginInfo):

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::scanPlugin):

  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:

(WebKit::NPN_InvalidateRect):

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::initialize):
(WebKit::NetscapePlugin::destroy):
(WebKit::NetscapePlugin::geometryDidChange):

  • WebProcess/Plugins/Netscape/NetscapePlugin.h:
  • WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:
  • WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.h:
  • config.h:
1:48 AM Changeset in webkit [223344] by Carlos Garcia Campos
  • 26 edits
    1 move
    1 add in releases/WebKitGTK/webkit-2.18

Merge r221609 - [GTK] Wrong use of PLUGIN_ARCHITECTURE(X11) in several places
https://bugs.webkit.org/show_bug.cgi?id=176329

Reviewed by Michael Catanzaro.

.:

Only define MOZ_X11 if X11 target is enabled and always define XP_UNIX if NETSCAPE_PLUGIN_API is enabled.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit:

We are using PLUGIN_ARCHITECTURE(X11) in several places where we should actually be using PLATFORM(X11). This is
confusing because PLUGIN_ARCHITECTURE(X11) is no longer specific to X11, it will be renamed as UNIX in a follow
up patch. Because of this we only support plugins in Wayland when building with both X11 and Wayland targets
enabled.

  • PluginProcess/PluginControllerProxy.cpp:
  • PluginProcess/PluginControllerProxy.h:
  • PluginProcess/unix/PluginProcessMainUnix.cpp:
  • Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:

(WebKit::NetscapePluginModule::determineQuirks):

  • Shared/Plugins/PluginQuirks.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/gtk/WebPageProxyGtk.cpp:
  • WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:

(WebKit::NPN_GetValue):

  • WebProcess/Plugins/Netscape/NetscapePlugin.cpp:

(WebKit::NetscapePlugin::shouldLoadSrcURL):
(WebKit::NetscapePlugin::initialize):

  • WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp:

(WebKit::NetscapePlugin::platformHandleMouseEvent):

  • WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
  • WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h:
  • WebProcess/Plugins/PluginController.h:
  • WebProcess/Plugins/PluginProxy.cpp:
  • WebProcess/Plugins/PluginProxy.h:
  • WebProcess/Plugins/PluginProxy.messages.in:
  • WebProcess/Plugins/PluginView.cpp:
  • WebProcess/Plugins/PluginView.h:

Tools:

  • CMakeLists.txt: Build TestNetscapePlugIn when NETSCAPE_PLUGIN_API is enabled and only link to X11 libraries

when building the X11 target.

  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • DumpRenderTree/TestNetscapePlugIn/Tests/unix/CallInvalidateRectWithNullNPPArgument.cpp: Renamed from Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp.
  • DumpRenderTree/TestNetscapePlugIn/main.cpp:

(NP_Initialize):
(NPP_HandleEvent):
(NPP_GetValue):

1:34 AM Changeset in webkit [223343] by Carlos Garcia Campos
  • 3 edits
    2 adds in releases/WebKitGTK/webkit-2.18

Merge r223313 - Protect FrameView during style calculations
https://bugs.webkit.org/show_bug.cgi?id=178300
<rdar://problem/34869329>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Protect the FrameView during layout and style updates in case arbitrary script
is run that might clear it.

Test: fast/html/marquee-reparent-check.html

  • page/FrameView.cpp:

(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):

LayoutTests:

  • fast/html/marquee-reparent-check-expected.txt: Added.
  • fast/html/marquee-reparent-check.html: Added.
1:33 AM Changeset in webkit [223342] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.18/Source/WebCore

Merge r221596 - Follow up FrameView::updateLayoutAndStyleIfNeededRecursive changes with related improvements
https://bugs.webkit.org/show_bug.cgi?id=176277

Reviewed by Antti Koivisto.

  • page/FrameView.cpp:

(WebCore::FrameView::needsStyleRecalcOrLayout): Deleted. This function was only used
by an assertion inside updateLayoutAndStyleIfNeededRecursive, and thus there is no reason
for it to be in the header file, or for it to be a public member function.
(WebCore::appendRenderedChildren): Deleted. This function was only used inside
updateLayoutAndStyleIfNeededRecursive, and it is now packaged in an even better way
for efficient use inside that function.
(WebCore::FrameView::renderedChildFrameViews): Deleted. This function was only used
inside needsStyleRecalcOrLayout, and it's now packaged in a better way inside that function.
(WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): Created a new lambda called
nextRendereredDescendant that packages up the process of repeatedly iterating this view
and all of its descendants in an easy-to-use way. Replaces both of the functions above.
Rewrote to use it; it made the logic clear enough that it was good to get rid of the
updateOneFrame lambda, too. Added two separate functions, one that checks for needed
style recalculation and a separate one that checked for needed layout. Using those,
replaced the old single assertion with two separate assertions.

  • page/FrameView.h: Removed needsStyleRecalcOrLayout, renderedChildFrameViews, and

FrameViewList.

1:16 AM Changeset in webkit [223341] by mjs@apple.com
  • 3 edits in trunk/Tools

Improve --help documentation and add --list-plans to show available benchmarks.
https://bugs.webkit.org/show_bug.cgi?id=178059

Reviewed by Ryosuke Niwa.

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py:

(BenchmarkRunner.available_plans): New function that returns the list of available plans.
(BenchmarkRunner.plan_directory): New method to centralize knowledge of where the plan files live.
(BenchmarkRunner._find_plan_file): Updated to use BenchmarkRunner.plan_directory

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:


(parse_args): Help cleanup: Reordered options to put more common
ones at the top. Fixed wording. Added help for each
option. Explained default for each option that has one.

New option: --list-plans which tells you the available benchmarks.

Code cleanup: Removed use of dest where redundant, made variable
names conforming to Python coding style.

(run_benchmark_plan): Adapted for new variable names.
(list_benchmark_plans): New helper for --list-plans option.
(start): Account for --list-plans. Also use
BechmarkRunner.available_plans and use
BenchmarkRunner.plan_directory instead of duplicating
code/knowledge here.

12:59 AM Changeset in webkit [223340] by Wenson Hsieh
  • 17 edits
    2 adds
    2 deletes in trunk

On ToT, event.dataTransfer.getData("text/uri-list") returns an empty string when dragging an image
https://bugs.webkit.org/show_bug.cgi?id=178301
<rdar://problem/34990050>

Reviewed by Darin Adler.

Source/WebCore:

After r222656, we consider images on the pasteboard to be files. This causes DataTransfer.getData to return the
empty string for all types, which brings back https://bugs.webkit.org/show_bug.cgi?id=170637. To allow pages to
access the URL part of a dragged image, we exempt "text/uri-list" from our heurstics to hide pasteboard data
which may contain files, and return the URL as long as its protocol is either HTTP or HTTPS.

Tweaked an existing layout test to cover this scenario, as well as the scenario in which the dragged image links
to a file URL (in which case we should avoid exposing the data).

Test: editing/pasteboard/drag-drop-href-as-url.html

DataInteractionTests.DataTransferGetDataWhenDroppingImageWithHTTPURL

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::getDataForItem const):

When the pasteboard contains files, allow data for "text/uri-list" to be returned, as long as the URL string has
a white-listed protocol (currently, this is just http and https).

(WebCore::DataTransfer::shouldSuppressGetAndSetDataToAvoidExposingFilePaths const):
(WebCore::DataTransfer::setData):
(WebCore::DataTransfer::types const):

When the pasteboard contains files, allow "text/uri-list" to be added, alongside the "Files" type, if it would
have been exposed in the list of safe DOM types.

  • dom/DataTransfer.h:
  • platform/Pasteboard.cpp:

(WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):

Add a new helper method to determine whether it is safe to expose an URL string as "text/uri-list" to bindings,
if the pasteboard contains files. While this currently checks whether or not the URL is in the HTTP family, we
may want to consider tweaking this to blacklist the "file" protocol instead, and allow all other valid URLs by
default.

  • platform/Pasteboard.h:
  • platform/PlatformPasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::stringForType const):

Mark stringForType as const, and also teach stringForType to return the null string for the platform URL type if
the pasteboard might contain file paths.

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

Before coercing a platform type to "text/uri-list" when building the list of DOM-safe types, check that the
stringForType is not the empty string, in which case we don't expose the type to the DOM at all. This ensures
that in cases where the URL might reveal a file path, we don't advertise "text/uri-list" as a type. We adopt a
similar strategy on iOS.

(WebCore::PlatformPasteboard::stringForType): Deleted.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::pasteboardMayContainFilePaths):
(WebCore::PlatformPasteboard::stringForType const):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::stringForType): Deleted.

Tools:

Fixes issues in DumpRenderTree's LocalPasteboard to ensure that drag-drop-href-as-url.html exposes files, and
also adds a new iOS drag and drop API test.

  • DumpRenderTree/mac/DumpRenderTreePasteboard.mm:

(-[LocalPasteboard addTypes:owner:]):
(-[LocalPasteboard setData:forType:]):

Fixes LocalPasteboard's implementation of changeCount to incremement when the pasteboard owner changes, rather
than every time data is changed. This is consistent with NSPasteboard behavior.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

Adds a new API test to verify that an image and HTTP URL written by the platform is correctly web exposed.

LayoutTests:

Fixes an existing test to account for asynchronous image decoding, and also rebaselines results to expect that
only the URL can be read, and not text.

  • TestExpectations:
  • editing/pasteboard/data-transfer-item-list-add-file-multiple-times-expected.txt:
  • editing/pasteboard/drag-drop-href-as-text-data-expected.txt: Removed.
  • editing/pasteboard/drag-drop-href-as-text-data.html: Removed.
  • editing/pasteboard/drag-drop-href-as-url-expected.txt: Added.
  • editing/pasteboard/drag-drop-href-as-url.html: Added.

Tweaks an existing drag and drop test to verify that an URL can be read back when dragging an image, but not
when if the URL is a file URL.

  • editing/pasteboard/files-during-page-drags-expected.txt:
  • editing/pasteboard/files-during-page-drags.html:

Fixes this test by decoding the dragged image element before starting the drag and drop simulation.

  • platform/mac-wk1/TestExpectations:
12:58 AM Changeset in webkit [223339] by fred.wang@free.fr
  • 9 edits in trunk/Source/WebCore

Use auto/nullptr in scrolling code
https://bugs.webkit.org/show_bug.cgi?id=178306

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-16
Reviewed by Carlos Garcia Campos.

This patch modifies the scrolling code to use the auto keyword when
possible. It also replaces '0' with 'nullptr' for the return value of
ScrollingStateTree::stateNodeForID.

No new tests, behavior unchanged.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
(WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
(WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
(WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
(WebCore::AsyncScrollingCoordinator::updateNodeLayer):
(WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints):
(WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
(WebCore::AsyncScrollingCoordinator::updateScrollLayerPosition):
(WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView const):
(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):
(WebCore::ScrollingCoordinator::scrollLayerForFrameView):
(WebCore::ScrollingCoordinator::headerLayerForFrameView):
(WebCore::ScrollingCoordinator::footerLayerForFrameView):
(WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
(WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
(WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
(WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
(WebCore::ScrollingCoordinator::handleWheelEventPhase):
(WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects const):
(WebCore::ScrollingCoordinator::updateSynchronousScrollingReasonsForAllFrames):
(WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const):

  • page/scrolling/ScrollingStateFixedNode.cpp:

(WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):

  • page/scrolling/ScrollingStateStickyNode.cpp:

(WebCore::ScrollingStateStickyNode::reconcileLayerPositionForViewportRect):

  • page/scrolling/ScrollingStateTree.cpp:

(WebCore::ScrollingStateTree::nodeTypeAndParentMatch const):
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::detachNode):
(WebCore::ScrollingStateTree::removeNodeAndAllDescendants):
(WebCore::ScrollingStateTree::stateNodeForID const):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
(WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode):

  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::enclosingFrameNode const):

  • page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:

(WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeLayer):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::updateNodeViewportConstraints):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):

12:48 AM Changeset in webkit [223338] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

A lot of "Can't stat WebCore/animation: No such file or directory" since r223328
https://bugs.webkit.org/show_bug.cgi?id=178326

Unreviewed build fix

The directory WebCore/animation was removed in r223328.

No new tests because there is no behavior change.

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-16

  • CMakeLists.txt: Removed animation from

WebCore_INCLUDE_DIRECTORIES and WebCore_IDL_INCLUDES.

  • DerivedSources.make: Removed animation from VPATH and IDL_INCLUDES
12:04 AM Changeset in webkit [223337] by fred.wang@free.fr
  • 6 edits in trunk/Source/WebCore

Replace some ScrollingTreeNode::nodeType() calls with is*Node()
https://bugs.webkit.org/show_bug.cgi?id=178259

Patch by Frederic Wang <fwang@igalia.com> on 2017-10-16
Reviewed by Darin Adler.

No new tests, behavior unchanged.

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):

  • page/scrolling/ScrollingStateNode.h:

(WebCore::ScrollingStateNode::isScrollingNode const):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::updateTreeFromStateNode):

  • page/scrolling/ScrollingTreeNode.cpp:

(WebCore::ScrollingTreeNode::enclosingFrameNode const):

  • page/scrolling/ScrollingTreeNode.h:

(WebCore::ScrollingTreeNode::isScrollingNode const):

Oct 15, 2017:

11:25 PM Changeset in webkit [223336] by Nikita Vasilyev
  • 5 edits
    2 adds in trunk

Web Inspector: Modify CSS number values with up key and down key
https://bugs.webkit.org/show_bug.cgi?id=170779
<rdar://problem/33170633>

Reviewed by Matt Baker.

Source/WebInspectorUI:

Up key increments a number, Down key decrements it.

Holding modifier keys changes the step value:

  • Option modifies the value by 0.1
  • Shift modifies the value by 10
  • Command modifies the value by 100
  • UserInterface/Test.html:
  • UserInterface/Views/EditingSupport.js:

(WI.incrementElementValue):
Abstract away incrementElementValue into a public method.

  • UserInterface/Views/SpreadsheetTextField.js:

(WI.SpreadsheetTextField.prototype._handleKeyDown):

LayoutTests:

Add tests for WI.incrementElementValue defined in WebInspectorUI/UserInterface/Views/EditingSupport.js.

  • inspector/unit-tests/editing-support-expected.txt: Added.
  • inspector/unit-tests/editing-support.html: Added.
9:46 PM Changeset in webkit [223335] by webkit@devinrousso.com
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: show warning when recorded Canvas action caused no visual change
https://bugs.webkit.org/show_bug.cgi?id=175282

Reviewed by Joseph Pecoraro.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction):
(WI.RecordingAction.prototype.get valid):
(WI.RecordingAction.prototype.get hasVisibleEffect):
(WI.RecordingAction.prototype.markInvalid):
(WI.RecordingAction.prototype.apply):
(WI.RecordingAction.prototype.async._swizzle):
If the selected action is visual, save a copy of the preview canvas' dataURL before
applying the action and compare it to its dataURL after. If there is no difference, the
action had no visual effect.

  • UserInterface/Models/Recording.js:

(WI.Recording):

  • UserInterface/Views/RecordingActionTreeElement.js:

(WI.RecordingActionTreeElement):
(WI.RecordingActionTreeElement.prototype._handleValidityChanged):
(WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged):

  • UserInterface/Views/RecordingActionTreeElement.css:

(.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning):

  • UserInterface/Views/RecordingContentView.js:

(WI.RecordingContentView):
(WI.RecordingContentView.prototype.async._generateContentCanvas2D):
(WI.RecordingContentView.prototype._applyAction): Deleted.

9:16 PM Changeset in webkit [223334] by tpopela@redhat.com
  • 2 edits in trunk/Source/WebCore

DataTransfer.cpp triggers -Wunused-but-set-variable
https://bugs.webkit.org/show_bug.cgi?id=178209

Reviewed by Wenson Hsieh.

Use the ASSERT_UNUSED to silence it.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::filesFromPasteboardAndItemList const):

8:42 PM Changeset in webkit [223333] by Nikita Vasilyev
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed tab should work
https://bugs.webkit.org/show_bug.cgi?id=178286
<rdar://problem/34986379>

Reviewed by Joseph Pecoraro.

Highlight the matching property using a yellow background and focus on the property value
if the property is editable (e.g., not a User Agent style).

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:

(.spreadsheet-style-declaration-editor):
(.spreadsheet-style-declaration-editor .property):
Move left padding to the property element so there's no awkward gap on the left side
when the property is highlighted.

(.spreadsheet-style-declaration-editor .property.highlighted):
(@keyframes style-property-highlight):
Use the same animation duration as we used in .text-editor > .CodeMirror .highlighted.
The highlight color was changed from light blue to yellow.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
Use the same logic as in WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty
to find matching style property to highlight.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.highlightProperty):
Use the same logic as in WI.CSSStyleDeclarationSection.prototype.highlightProperty.

  • UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:

(WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
Copied from WI.RulesStyleDetailsPanel.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty):
(WI.SpreadsheetStyleProperty.prototype.detached):
(WI.SpreadsheetStyleProperty.prototype.highlight):

7:59 PM Changeset in webkit [223332] by commit-queue@webkit.org
  • 6 edits
    2 copies
    1 move in trunk/Source/WebCore

[Settings] Split non-macro generated parts of Settings into SettingsBase base class
https://bugs.webkit.org/show_bug.cgi?id=178321

Patch by Sam Weinig <sam@webkit.org> on 2017-10-15
Reviewed by Darin Adler.

Working towards getting generated Settings working again, but in smaller patches, split
non-generated part off into SettingsBase as a first step.

One function, effectiveFrameFlattening(), needs to remain in Settings for now, as it directly
references a macro generated function, frameFlattening().

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • page/Page.h:
  • page/Settings.cpp:
  • page/Settings.h:
  • page/SettingsBase.h: Copied from Source/WebCore/page/Settings.h.
  • page/cocoa/SettingsBaseCocoa.mm: Copied from Source/WebCore/page/cocoa/SettingsCocoa.mm.
  • page/cocoa/SettingsCocoa.mm: Removed.
6:55 PM Changeset in webkit [223331] by Yusuke Suzuki
  • 13 edits in trunk/Source

[JSC] Perform module specifier validation at parsing time
https://bugs.webkit.org/show_bug.cgi?id=178256

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch make module loader's resolve operation synchronous. And we validate
module's requested module names when instantiating the module instead of satisfying
module's dependencies. This change is not observable to users. But this is precise
to the spec and this optimizes & simplifies the current module loader a bit by
reducing object allocations.

Previously, we have an object called pair in the module loader. This is pair of
module's name and module's record. And we use it to link one module to dependent
modules. Now, it is replaced with module's registry entry.

We also change our loader functions to take a registry entry instead of a module key.
Previous design is due to the consideration that these APIs may be exposed to users
in whatwg/loader spec. However, this won't happen. This change removes unnecessary
repeatedly hash map lookups.

  • builtins/ModuleLoaderPrototype.js:

(globalPrivate.newRegistryEntry):
(requestFetch):
(requestInstantiate):
(requestSatisfy):
(link):
(moduleEvaluation):
(loadModule):

  • jsc.cpp:

(GlobalObject::moduleLoaderResolve):

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::finishCreation):
(JSC::AbstractModuleRecord::hostResolveImportedModule):

  • runtime/JSGlobalObject.h:
  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::resolveSync):
(JSC::JSModuleLoader::resolve):

  • runtime/JSModuleLoader.h:
  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeResolveSync):

Source/WebCore:

No behavior change in the current implementation.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::moduleLoaderResolve):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/ScriptModuleLoader.cpp:

(WebCore::ScriptModuleLoader::resolve):

  • bindings/js/ScriptModuleLoader.h:
2:58 PM Changeset in webkit [223330] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

DOMTokenList shouldn't add empty attributes
https://bugs.webkit.org/show_bug.cgi?id=178280
<rdar://problem/34987431>

Reviewed by Ryosuke Niwa.

Follow-up to r223306, reverse the check conditions to avoid attribute
lookup when possible. Also use m_tokens instead of tokens() to avoid
unnecessary branch.

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

1:13 PM Changeset in webkit [223329] by Darin Adler
  • 7 edits
    1 add in trunk

UTF-8 decoding produces one replacement character per byte; Encoding standard requires one replacement character per illegal sequence instead
https://bugs.webkit.org/show_bug.cgi?id=178207

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/text/TextCodecUTF8.cpp:

(WebCore::TextCodecUTF8::create): Deleted. Use a lambda instead.
(WebCore::TextCodecUTF8::registerCodecs): Use a lambda.
(WebCore::nonASCIISequenceLength): Changed to return 0 instead of 2 for the range 80-C1 since
none of those are valid sequence leading characters.
(WebCore::decodeNonASCIISequence): Changed the length argument to be in/out so the caller
knows how much of the sequence we decoded for failure cases. Simplified the length 2 section.
(WebCore::TextCodecUTF8::handleError): Deleted.
(WebCore::TextCodecUTF8::handlePartialSequence): Changed this into a pair of plain functions
rather than two template function specializations since the two functions are rather different.
For the one-byte version, got rid of the unused arguments. For the two-byte version, got rid
of the ignored return value, stopped using the handleError function since each error case
needs to be handled differently. In each error case consume the entire incorrect sequence
instead of just one byte.
(WebCore::TextCodecUTF8::decode): Updated for the above change, and changed the non-partial
incorrect sequence to consume the entire incorrect sequence instead of just one byte. Also
use WTF prefixes explicitly so we don't have to do "using namespace".
(WebCore::TextCodecUTF8::encode): Got rid of unneeded type punning, and added some inline
capacity to save one memory allocation when encoding shorter strings.

  • platform/text/TextCodecUTF8.h: Use pragma once. Intialize m_partialSequenceSize where it

is defined and let the compiler generate the constructor. Updated for the changes above.

  • platform/text/TextEncoding.h: Export a constructor now used by a unit test.
  • platform/text/TextEncodingRegistry.h: Export newTextCodec, now used by a unit test.

Tools:

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

(TestWebKitAPI::decodeHexTestBytes): Decodes a string so we can write readable tests.
(TestWebKitAPI::escapeNonPrintableASCIICharacters): Encodes a string so we can write readable tests.
(TestWebKitAPI::TEST): Added some UTF-8 tests and UTF-8 invalid sequences tests.
Would be smart to add more tests for other cases, exercising the fast ASCII loop for example, and
other encodings.

6:35 AM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
Note: See TracTimeline for information about the timeline view.