Timeline



Oct 3, 2017:

11:54 PM Changeset in webkit [222831] by Antti Koivisto
  • 5 edits in trunk/Source/WebCore

Use WeakPtr in RenderFullScreen
https://bugs.webkit.org/show_bug.cgi?id=177827

Reviewed by Zalan Bujtas.

Make Document::m_fullScreenRenderer RenderFullScreen::m_placeholder WeakPtrs
and get rid of the custom nulling code.

  • dom/Document.cpp:

(WebCore::Document::destroyRenderTree):
(WebCore::Document::webkitWillEnterFullScreenForElement):
(WebCore::Document::webkitDidExitFullScreenForElement):
(WebCore::Document::setFullScreenRenderer):
(WebCore::Document::fullScreenRendererDestroyed): Deleted.

  • dom/Document.h:

(WebCore::Document::fullScreenRenderer const):

  • rendering/RenderFullScreen.cpp:

(WebCore::RenderFullScreen::RenderFullScreen):
(WebCore::RenderFullScreen::willBeDestroyed):
(WebCore::RenderFullScreen::createPlaceholder):
(WebCore::RenderFullScreenPlaceholder::willBeDestroyed): Deleted.
(WebCore::RenderFullScreen::setPlaceholder): Deleted.

  • rendering/RenderFullScreen.h:
10:15 PM Changeset in webkit [222830] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Enable pasteboard custom data in macOS 10.12 and earlier
https://bugs.webkit.org/show_bug.cgi?id=177855

Reviewed by Wenson Hsieh.

Make customPasteboardDataEnabled return true on macOS 10.12 and earlier as long as the app is Safari.

  • page/Settings.cpp:

(WebCore::Settings::customPasteboardDataEnabled):

8:33 PM Changeset in webkit [222829] by Jon Davis
  • 4 edits in trunk/Source

Source/JavaScriptCore:
Update WebAssembly to "Supported"
https://bugs.webkit.org/show_bug.cgi?id=177831

Reviewed by Alexey Proskuryakov.

Cleaned up Async Iteration and Object rest/spread to use "In Development"
instead of "In development".

  • features.json:

Source/WebCore:
Update several features to "Supported"
https://bugs.webkit.org/show_bug.cgi?id=177831

Reviewed by Alexey Proskuryakov.

Update Media Capture and Streams, Performance Observer, Resource Timing, User Timing,
Web Cryptography, and WebRTC.

  • features.json:
8:15 PM Changeset in webkit [222828] by commit-queue@webkit.org
  • 12 edits in trunk/Source

[Curl] Reimplement CurlDownload with CurlRequest
https://bugs.webkit.org/show_bug.cgi?id=177779

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-03
Reviewed by Alex Christensen.

Source/WebCore:

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableAllowedProtocols):
(WebCore::CurlHandle::enableFollowLocation): Deleted.
(WebCore::CurlHandle::getEffectiveURL): Deleted.

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownload::~CurlDownload):
(WebCore::CurlDownload::init):
(WebCore::CurlDownload::start):
(WebCore::CurlDownload::cancel):
(WebCore::CurlDownload::createCurlRequest):
(WebCore::CurlDownload::curlDidReceiveResponse):
(WebCore::CurlDownload::curlDidReceiveBuffer):
(WebCore::CurlDownload::curlDidComplete):
(WebCore::CurlDownload::curlDidFailWithError):
(WebCore::CurlDownload::shouldRedirectAsGET):
(WebCore::CurlDownload::willSendRequest):
(WebCore::CurlDownload::getResponse const): Deleted.
(WebCore::CurlDownload::retain): Deleted.
(WebCore::CurlDownload::release): Deleted.
(WebCore::CurlDownload::setupTransfer): Deleted.
(WebCore::CurlDownload::didCompleteTransfer): Deleted.
(WebCore::CurlDownload::didCancelTransfer): Deleted.
(WebCore::CurlDownload::closeFile): Deleted.
(WebCore::CurlDownload::moveFileToDestination): Deleted.
(WebCore::CurlDownload::writeDataToFile): Deleted.
(WebCore::CurlDownload::didReceiveHeader): Deleted.
(WebCore::CurlDownload::didReceiveData): Deleted.
(WebCore::CurlDownload::didReceiveResponse): Deleted.
(WebCore::CurlDownload::didReceiveDataOfLength): Deleted.
(WebCore::CurlDownload::didFinish): Deleted.
(WebCore::CurlDownload::didFail): Deleted.
(WebCore::CurlDownload::writeCallback): Deleted.
(WebCore::CurlDownload::headerCallback): Deleted.

  • platform/network/curl/CurlDownload.h:

(WebCore::CurlDownloadListener::didReceiveResponse):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::finalizeTransfer):
(WebCore::CurlRequest::enableDownloadToFile):
(WebCore::CurlRequest::getDownloadedFilePath):
(WebCore::CurlRequest::writeDataToDownloadFileIfEnabled):
(WebCore::CurlRequest::closeDownloadFile):

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::create):

  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::createCurlRequest):

  • platform/network/curl/ResourceHandleCurlDelegate.h:

Source/WebKitLegacy/win:

  • WebDownload.h:
  • WebDownloadCurl.cpp:

(WebDownload::init):
(WebDownload::didReceiveResponse):

6:53 PM Changeset in webkit [222827] by sbarati@apple.com
  • 78 edits
    18 adds in trunk

Implement polymorphic prototypes
https://bugs.webkit.org/show_bug.cgi?id=176391

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/poly-proto-access.js: Added.

(assert):
(foo.C):
(foo.C.prototype.get bar):
(foo):
(bar):

  • microbenchmarks/poly-proto-put-transition-speed.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(performSet):

  • microbenchmarks/poly-proto-setter-speed.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo.C.prototype.set p):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(performSet):

  • stress/constructor-with-return.js:

(i.tests.forEach.Constructor):
(i.tests.forEach):
(tests.forEach.Constructor): Deleted.
(tests.forEach): Deleted.

  • stress/dom-jit-with-poly-proto.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(validate):

  • stress/poly-proto-custom-value-and-accessor.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(items.forEach):
(set get for):

  • stress/poly-proto-intrinsic-getter-correctness.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(foo):

  • stress/poly-proto-miss.js: Added.

(makePolyProtoInstanceWithNullPrototype.foo.C):
(makePolyProtoInstanceWithNullPrototype.foo):
(makePolyProtoInstanceWithNullPrototype):
(assert):
(validate):

  • stress/poly-proto-op-in-caching.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(validate):
(validate2):

  • stress/poly-proto-put-transition.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(performSet):
(i.obj.proto.set p):

  • stress/poly-proto-set-prototype.js: Added.

(assert):
(let.alternateProto.get x):
(let.alternateProto2.get y):
(let.alternateProto2.get x):
(foo.C):
(foo):
(validate):

  • stress/poly-proto-setter.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo.C.prototype.set p):
(makePolyProtoObject.foo.C.prototype.get p):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(performSet):

  • stress/poly-proto-using-inheritance.js: Added.

(assert):
(foo.C):
(foo.C.prototype.get baz):
(foo):
(bar.C):
(bar):
(validate):

  • stress/primitive-poly-proto.js: Added.

(makePolyProtoInstance.foo.C):
(makePolyProtoInstance.foo):
(makePolyProtoInstance):
(assert):
(validate):

  • stress/prototype-is-not-js-object.js: Added.

(foo.bar):
(foo):
(assert):
(validate):

  • stress/try-get-by-id-poly-proto.js: Added.

(assert):
(makePolyProtoObject.foo.C):
(makePolyProtoObject.foo):
(makePolyProtoObject):
(tryGetByIdText):
(x.proto.get bar):
(validate):

  • typeProfiler/overflow.js:

Source/JavaScriptCore:

This patch changes JSC's object model with respect to where the prototype
of an object is stored. Previously, it was always stored as
a constant value inside Structure. So an object's structure used to
always tell you what its prototype is. Anytime an object changed
its prototype, it would do a structure transition. This enables
a large class of optimizations: just by doing a structure check,
we know what the prototype is.

However, this design falls down when you have many objects that
have the same shape, but only differ in what their prototype value
is. This arises in many JS programs. A simple, and probably common, example
is when the program has a constructor inside of a function:
`
function foo() {

class C {

constructor() { this.field1 = 42; ...; this.fieldN = 42; }
method1() { doStuffWith(this.field); }
method2() { doStuffWith(this.field); }

}
let c = new C;
do things with c;
}

repeatedly call foo() here.
`

Before this patch, in the above program, each time new C created an
object, it would create an object with a different structure. The
reason for this is that each time foo is called, there is a new
instance of C.prototype. However, each new C that was created
with have identical shape sans its prototype value. This would
cause all ICs that used c to quickly give up on any form of caching
because they would see too many structures and give up and permanently
divert control flow to the slow path.

This patch fixes this issue by expanding the notion of where the prototype
of an object is stored. There are now two notions of where the prototype
is stored. A Structure can now be in two modes:

  1. Mono proto mode. This is the same mode as we used to have. It means

the structure itself has a constant prototype value.

  1. Poly proto mode. This means the structure knows nothing about the

prototype value itself. Objects with this structure store their prototype
in normal object field storage. The structure will tell you the offset of
this prototype inside the object's storage. As of today, we only reserve
inline slots for the prototype field because poly proto only occurs
for JSFinalObject. However, this will be expanded to support out of line
offsets in a future patch when we extend poly proto to work when we inherit
from builtin types like Map and Array.

In this initial patch, we do poly proto style inline caching whenever
we see an object that is poly proto or if an object in its prototype lookup
chain is poly proto. Poly proto ICs work by verifying the lookup chain
at runtime. This essentially boils down to performing structure checks
up the prototype chain. In a future patch, we're going to extend object
property condition set to work with objects that don't have poly proto bases.

Initially, accesses that have poly proto access chains will always turn
into GetById/PutById in the DFG. In a future patch, I'm going to teach
the DFG how to inline certain accesses that have poly proto in the access
chain.

One of most interesting parts about this patch is how we decide when to go
poly proto. This patch uses a profiling based approach. An IC will inform
a watchpoint that it sees an opportunity when two Structure's are structurally
the same, sans the base object's prototype. This means that two structures
have equivalent shapes all the way up the prototype chain. To support fast
structural comparison, we compute a hash for a structure based on the properties
it has. We compute this hash as we add properties to the structure. This
computation is nearly free since we always add UniquedStringImpl*'s which
already have their hashes computed. To compare structural equivalence, we
just compare hash values all the way up the prototype chain. This means we
can get hash conflicts between two structures, but it's extremely rare. First,
it'll be rare for two structures to have the same hash. Secondly, we only
consider structures originating from the same executable.

How we set up this poly proto watchpoint is crucial to its design. When we create_this
an object originating from some executable, that executable will create a Box<InlineWatchpointSet>.
Each structure that originates from this executable will get a copy of that
Box<InlineWatchpointSet>. As that structure transitions to new structures,
they too will get a copy of that Box<InilneWatchpointSet>. Therefore, when
invalidating an arbitrary structure's poly proto watchpoint, we will know
the next time we create_this from that executable that it had been
invalidated, and that we should create an object with a poly proto
structure. We also use the pointer value of this Box<InlineWatchpointSet>
to determine if two structures originated from the same executable. This
pruning will severely limit the chances of getting a hash conflict in practice.

This patch is neutral on my MBP on traditional JS benchmarks like Octane/Kraken/Sunspider.
It may be a 1-2% ARES-6 progression.

This patch is between neutral and a 9x progression on the various tests
I added. Most of the microbenchmarks are progressed by at least 50%.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • builtins/BuiltinNames.cpp:
  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):
(JSC::BuiltinNames::underscoreProtoPrivateName const):

  • bytecode/AccessCase.cpp:

(JSC::AccessCase::AccessCase):
(JSC::AccessCase::create):
(JSC::AccessCase::commit):
(JSC::AccessCase::guardedByStructureCheck const):
(JSC::AccessCase::canReplace const):
(JSC::AccessCase::dump const):
(JSC::AccessCase::visitWeak const):
(JSC::AccessCase::propagateTransitions const):
(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • bytecode/AccessCase.h:

(JSC::AccessCase::usesPolyProto const):
(JSC::AccessCase::AccessCase):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetterSetterAccessCase.cpp:

(JSC::GetterSetterAccessCase::GetterSetterAccessCase):
(JSC::GetterSetterAccessCase::create):

  • bytecode/GetterSetterAccessCase.h:
  • bytecode/InternalFunctionAllocationProfile.h:

(JSC::InternalFunctionAllocationProfile::createAllocationStructureFromBase):

  • bytecode/IntrinsicGetterAccessCase.cpp:

(JSC::IntrinsicGetterAccessCase::IntrinsicGetterAccessCase):

  • bytecode/IntrinsicGetterAccessCase.h:
  • bytecode/ModuleNamespaceAccessCase.cpp:

(JSC::ModuleNamespaceAccessCase::ModuleNamespaceAccessCase):

  • bytecode/ObjectAllocationProfile.cpp: Added.

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

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfile::clear):
(JSC::ObjectAllocationProfile::initialize): Deleted.
(JSC::ObjectAllocationProfile::possibleDefaultPropertyCount): Deleted.

  • bytecode/ObjectPropertyConditionSet.cpp:
  • bytecode/PolyProtoAccessChain.cpp: Added.

(JSC::PolyProtoAccessChain::create):
(JSC::PolyProtoAccessChain::needImpurePropertyWatchpoint const):
(JSC::PolyProtoAccessChain::operator== const):
(JSC::PolyProtoAccessChain::dump const):

  • bytecode/PolyProtoAccessChain.h: Added.

(JSC::PolyProtoAccessChain::clone):
(JSC::PolyProtoAccessChain:: const):
(JSC::PolyProtoAccessChain::operator!= const):
(JSC::PolyProtoAccessChain::forEach const):

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::addCases):
(JSC::PolymorphicAccess::regenerate):
(WTF::printInternal):

  • bytecode/PolymorphicAccess.h:

(JSC::AccessGenerationResult::shouldResetStub const):
(JSC::AccessGenerationState::AccessGenerationState):

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):

  • bytecode/ProxyableAccessCase.cpp:

(JSC::ProxyableAccessCase::ProxyableAccessCase):
(JSC::ProxyableAccessCase::create):

  • bytecode/ProxyableAccessCase.h:
  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeForStubInfo):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::addAccessCase):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::canDoFastSpread):

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

(JSC::DFG::SpeculativeJIT::compileInstanceOfForObject):
(JSC::DFG::SpeculativeJIT::compileInstanceOf):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • ftl/FTLLowerDFGToB3.cpp:

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

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_instanceof):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_instanceof):

  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):
(JSC::tryCachePutByID):
(JSC::tryRepatchIn):

  • jsc.cpp:

(WTF::DOMJITGetterBaseJSObject::DOMJITGetterBaseJSObject):
(WTF::DOMJITGetterBaseJSObject::createStructure):
(WTF::DOMJITGetterBaseJSObject::create):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::DOMJITAttribute):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::slowCall):
(WTF::DOMJITGetterBaseJSObject::DOMJITAttribute::callDOMGetter):
(WTF::DOMJITGetterBaseJSObject::customGetter):
(WTF::DOMJITGetterBaseJSObject::finishCreation):
(GlobalObject::finishCreation):
(functionCreateDOMJITGetterBaseJSObject):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/ArrayPrototype.cpp:

(JSC::holesMustForwardToPrototype):
(JSC::fastJoin):
(JSC::arrayProtoFuncReverse):
(JSC::moveElements):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createEmpty):
(JSC::ClonedArguments::createWithInlineFrame):
(JSC::ClonedArguments::createWithMachineFrame):
(JSC::ClonedArguments::createByCopyingFrom):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/FunctionExecutable.cpp:

(JSC::FunctionExecutable::visitChildren):

  • runtime/FunctionExecutable.h:
  • runtime/FunctionRareData.cpp:

(JSC::FunctionRareData::initializeObjectAllocationProfile):

  • runtime/FunctionRareData.h:
  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructureSlow):

  • runtime/JSArray.cpp:

(JSC::JSArray::fastSlice):
(JSC::JSArray::shiftCountWithArrayStorage):
(JSC::JSArray::shiftCountWithAnyIndexingType):
(JSC::JSArray::isIteratorProtocolFastAndNonObservable):

  • runtime/JSArrayInlines.h:

(JSC::JSArray::canFastCopy):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::dumpInContextAssumingStructure const):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::allocateAndInitializeRareData):
(JSC::JSFunction::initializeRareData):
(JSC::JSFunction::getOwnPropertySlot):

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

(JSC::JSMap::isIteratorProtocolFastAndNonObservable):
(JSC::JSMap::canCloneFastAndNonObservable):

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):
(JSC::JSObject::createInitialIndexedStorage):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::ensureInt32Slow):
(JSC::JSObject::ensureDoubleSlow):
(JSC::JSObject::ensureContiguousSlow):
(JSC::JSObject::ensureArrayStorageSlow):
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::ordinaryToPrimitive const):
(JSC::JSObject::putByIndexBeyondVectorLength):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::JSObject::getEnumerableLength):
(JSC::JSObject::anyObjectInChainMayInterceptIndexedAccesses const):
(JSC::JSObject::prototypeChainMayInterceptStoreTo):
(JSC::JSObject::needsSlowPutIndexing const):
(JSC::JSObject::suggestedArrayStorageTransition const):

  • runtime/JSObject.h:

(JSC::JSObject::finishCreation):
(JSC::JSObject::getPrototypeDirect const):
(JSC::JSObject::getPropertySlot):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::putInlineForJSObject):

  • runtime/JSPropertyNameEnumerator.h:

(JSC::propertyNameEnumerator):

  • runtime/JSSet.cpp:

(JSC::JSSet::isIteratorProtocolFastAndNonObservable):
(JSC::JSSet::canCloneFastAndNonObservable):

  • runtime/LazyClassStructure.h:

(JSC::LazyClassStructure::prototypeConcurrently const): Deleted.

  • runtime/Operations.cpp:

(JSC::normalizePrototypeChain):

  • runtime/Operations.h:
  • runtime/Options.h:
  • runtime/PrototypeMap.cpp:

(JSC::PrototypeMap::createEmptyStructure):
(JSC::PrototypeMap::emptyStructureForPrototypeFromBaseStructure):
(JSC::PrototypeMap::emptyObjectStructureForPrototype):
(JSC::PrototypeMap::clearEmptyObjectStructureForPrototype):

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

(JSC::Structure::Structure):
(JSC::Structure::create):
(JSC::Structure::holesMustForwardToPrototype const):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::isCheapDuringGC):
(JSC::Structure::toStructureShape):
(JSC::Structure::dump const):
(JSC::Structure::canCachePropertyNameEnumerator const):
(JSC::Structure::anyObjectInChainMayInterceptIndexedAccesses const): Deleted.
(JSC::Structure::needsSlowPutIndexing const): Deleted.
(JSC::Structure::suggestedArrayStorageTransition const): Deleted.
(JSC::Structure::prototypeForLookup const): Deleted.
(JSC::Structure::prototypeChainMayInterceptStoreTo): Deleted.
(JSC::Structure::canUseForAllocationsOf): Deleted.

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

(JSC::Structure::create):
(JSC::Structure::storedPrototypeObject const):
(JSC::Structure::storedPrototypeStructure const):
(JSC::Structure::storedPrototype const):
(JSC::prototypeForLookupPrimitiveImpl):
(JSC::Structure::prototypeForLookup const):
(JSC::Structure::prototypeChain const):
(JSC::Structure::isValid const):
(JSC::Structure::add):
(JSC::Structure::setPropertyTable):
(JSC::Structure::shouldConvertToPolyProto):

  • runtime/StructureRareData.h:
  • runtime/TypeProfilerLog.cpp:

(JSC::TypeProfilerLog::processLogEntries):

  • runtime/TypeSet.cpp:

(JSC::TypeSet::addTypeInformation):

  • runtime/TypeSet.h:
  • runtime/WriteBarrier.h:

(JSC::WriteBarrierBase<Unknown>::isInt32 const):

Source/WTF:

  • wtf/Box.h:

(WTF::Box::operator bool const):
(WTF::Box::operator bool): Deleted.
Make Box movable. Also ensure its operator bool doesn't do an atomic increment.

  • wtf/RefPtr.h:

(WTF::RefPtr::operator bool const):
Add explicit operator bool() for RefPtr.

Tools:

  • Scripts/run-jsc-stress-tests:
6:40 PM Changeset in webkit [222826] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Correct nullptr dereference during shutdown
https://bugs.webkit.org/show_bug.cgi?id=177845
<rdar://problem/33651405>

Reviewed by Chris Dumez.

It looks like the ResourceLoadStatisticsPersistentStorage destructor is calling code that attempts
to use member variables in its owning class (WebResourceLoadStatisticsStore). Since these may have
already been destroyed, they are in an invalid state when accessed.

  • UIProcess/ResourceLoadStatisticsPersistentStorage.cpp:

(WebKit::ResourceLoadStatisticsPersistentStorage::~ResourceLoadStatisticsPersistentStorage): Do not call
finishAllPendingWorkSynchronously() in the destructor, since it relies on the m_memoryStore to be
a reference to completely valid object.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore): Instead, call
'finishAllPendingWorkSynchronously' here, when the object is still in a known valid state.

5:53 PM Changeset in webkit [222825] by mmaxfield@apple.com
  • 1 edit
    3 adds in trunk/Tools

Create a SPIR-V assembler
https://bugs.webkit.org/show_bug.cgi?id=177726

Reviewed by Filip Pizlo.

Khronos has released a json file containing every SPIR-V opcode and operand at
https://github.com/KhronosGroup/SPIRV-Headers/blob/master/include/spirv/1.2/spirv.core.grammar.json
This patch creates a function which loads this file (via the fetch API), parses it, and creates
an object which holds two things:

  • For each opcode, a class which accepts the appropriate operands
  • For each enum type, an object which holds each enum value

The constructor for each opcode is smart enough to do some basic type-checking of the argument,
according to the types listed in Khronos's json file.

This patch also includes an example .html file which outputs a dummy SPIR-V program,
which happens to be compatible with the SPIR-V demo at
https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/demos/cube.cpp
If you modify this demo to use the generated SPIR-V program, you can see the result in
action.

This patch also commits a copy of Khronos's json file mentioned above. This isn't the first
Khronos file we've committed into our repository with this license, so there shouldn't be any
problems there.

  • WebGPUShadingLanguageRI/SPIR-V.js: Added.

(SPIRV.):
(SPIRVAssembler):
(SPIRVAssembler.prototype.append):
(SPIRVAssembler.prototype.get size):
(SPIRVAssembler.prototype.get storage):
(SPIRVAssembler.prototype.get result):

  • WebGPUShadingLanguageRI/SPIRV.html: Added.
  • WebGPUShadingLanguageRI/spirv.core.grammar.json: Added.
5:51 PM Changeset in webkit [222824] by achristensen@apple.com
  • 15 edits in trunk/Source/WebKit

Moderize WebKit's back forward list code
https://bugs.webkit.org/show_bug.cgi?id=177843

Reviewed by Tim Horton.

Use Ref instead of RefPtr when possible.
Use references instead of pointers when possible.
Remove unnecessary null checks.
Reduce unnecessary Vector copying.

  • Shared/SessionState.h:
  • Shared/WebBackForwardListItem.h:
  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::didChangeBackForwardList):
(API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):

  • UIProcess/WebBackForwardList.cpp:

(WebKit::WebBackForwardList::pageClosed):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
(WebKit::WebBackForwardList::currentItem const):
(WebKit::WebBackForwardList::backItem const):
(WebKit::WebBackForwardList::forwardItem const):
(WebKit::WebBackForwardList::itemAtIndex const):
(WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const):
(WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const):
(WebKit::WebBackForwardList::removeAllItems):
(WebKit::WebBackForwardList::clear):
(WebKit::WebBackForwardList::backForwardListState const):
(WebKit::WebBackForwardList::restoreFromState):

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

(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::didChangeBackForwardList):
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
(WebKit::WebPageProxy::backForwardGoToItem):

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

(WebKit::WebProcessProxy::registerNewWebBackForwardListItem):

  • UIProcess/WebProcessProxy.h:
  • WebProcess/WebPage/WebBackForwardListProxy.cpp:

(WebKit::WebBackForwardListProxy::itemAtIndex):

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

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:
5:05 PM Changeset in webkit [222822] by jdiggs@igalia.com
  • 3 edits
    2 adds in trunk

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.
5:03 PM Changeset in webkit [222821] by jdiggs@igalia.com
  • 3 edits
    2 adds in trunk

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.
4:59 PM Changeset in webkit [222820] by Chris Dumez
  • 11 edits
    1 add in trunk

SharedStringHashStore should support removing hashes
https://bugs.webkit.org/show_bug.cgi?id=177770

Reviewed by Alex Christensen.

Source/WebKit:

SharedStringHashStore should support removing hashes. It currently only supports adding hashes or
clearing all of them, which is sufficient for the VisitedLinkStore but will not be for Service
Worker purposes.

  • Shared/SharedStringHashStore.cpp:

(WebKit::SharedStringHashStore::SharedStringHashStore):
(WebKit::SharedStringHashStore::add):
(WebKit::SharedStringHashStore::remove):
(WebKit::SharedStringHashStore::contains):
(WebKit::SharedStringHashStore::clear):
(WebKit::SharedStringHashStore::resizeTable):
(WebKit::SharedStringHashStore::pendingOperationsTimerFired):

  • Shared/SharedStringHashStore.h:
  • Shared/SharedStringHashTable.cpp:

(WebKit::SharedStringHashTable::remove):

  • Shared/SharedStringHashTable.h:
  • UIProcess/API/Cocoa/_WKVisitedLinkStore.h:
  • UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:

(-[_WKVisitedLinkStore containsVisitedLinkWithURL:]):
(-[_WKVisitedLinkStore removeVisitedLinkWithURL:]):

  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::containsVisitedLinkHash):
(WebKit::VisitedLinkStore::removeVisitedLinkHash):
(WebKit::VisitedLinkStore::didUpdateSharedStringHashes):

  • UIProcess/VisitedLinkStore.h:

Tools:

Add API test coverage.

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

(TestWebKitAPI::TEST):

4:35 PM Changeset in webkit [222819] by dbates@webkit.org
  • 6 edits in trunk/Source/WebCore

Share code to normalize an HTTP method
https://bugs.webkit.org/show_bug.cgi?id=177837

Reviewed by Andy Estes.

Currently we duplicate code in XMLHttpRequest and FetchRequest to normalize an HTTP method.
We should add a common helper function and update both classes to make use of it.

No functionality changed. So, no new tests.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::setMethod): Modified to use WebCore::normalizeHTTPMethod().

  • platform/network/HTTPParsers.cpp:

(WebCore::normalizeHTTPMethod): Moved from XMLHttpRequest.cpp.

  • platform/network/HTTPParsers.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::open): Modified to use WebCore::normalizeHTTPMethod().
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Deleted; moved to HTTPParsers.cpp.

  • xml/XMLHttpRequest.h:
4:17 PM Changeset in webkit [222818] by Ms2ger@igalia.com
  • 3 edits
    30 deletes in trunk/LayoutTests

Remove some duplicate w3c tests for media tracks.
https://bugs.webkit.org/show_bug.cgi?id=177819

Reviewed by Youenn Fablet.

All these tests also exist in
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces,
where they are kept up-to-date with upstream.

  • media/track/w3c/interfaces/HTMLMediaElement/addTextTrack-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLMediaElement/addTextTrack.html: Removed.
  • media/track/w3c/interfaces/HTMLMediaElement/textTracks-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLMediaElement/textTracks.html: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/default-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/default.html: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/label-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/label.html: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/readyState-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/readyState.html: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/srclang-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/srclang.html: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/track-expected.txt: Removed.
  • media/track/w3c/interfaces/HTMLTrackElement/track.html: Removed.
  • media/track/w3c/interfaces/TextTrack/addCue-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/addCue.html: Removed.
  • media/track/w3c/interfaces/TextTrack/constants-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/constants.html: Removed.
  • media/track/w3c/interfaces/TextTrack/kind-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/kind.html: Removed.
  • media/track/w3c/interfaces/TextTrack/label-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/label.html: Removed.
  • media/track/w3c/interfaces/TextTrack/language-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/language.html: Removed.
  • media/track/w3c/interfaces/TextTrack/mode-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/mode.html: Removed.
  • media/track/w3c/interfaces/TextTrack/oncuechange-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/oncuechange.html: Removed.
  • media/track/w3c/interfaces/TextTrack/removeCue-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrack/removeCue.html: Removed.
  • media/track/w3c/interfaces/TextTrackCue/endTime-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCue/endTime.html: Removed.
  • media/track/w3c/interfaces/TextTrackCue/id-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCue/id.html: Removed.
  • media/track/w3c/interfaces/TextTrackCue/pauseOnExit-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCue/pauseOnExit.html: Removed.
  • media/track/w3c/interfaces/TextTrackCue/startTime-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCue/startTime.html: Removed.
  • media/track/w3c/interfaces/TextTrackCue/track-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCue/track.html: Removed.
  • media/track/w3c/interfaces/TextTrackCueList/getCueById-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCueList/getCueById.html: Removed.
  • media/track/w3c/interfaces/TextTrackCueList/length-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackCueList/length.html: Removed.
  • media/track/w3c/interfaces/TextTrackList/length-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackList/length.html: Removed.
  • media/track/w3c/interfaces/TextTrackList/onaddtrack-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackList/onaddtrack.html: Removed.
  • media/track/w3c/interfaces/TextTrackList/onremovetrack-expected.txt: Removed.
  • media/track/w3c/interfaces/TextTrackList/onremovetrack.html: Removed.
  • platform/ios/TestExpectations: Removed references to removed tests.
  • platform/mac/TestExpectations: Removed references to removed tests.
4:12 PM Changeset in webkit [222817] by dbates@webkit.org
  • 9 edits in trunk/LayoutTests

XMLHttpRequest.setRequestHeader() should allow Content-Transfer-Encoding header; remove
duplicate logic to check for a forbidden XHR header field
https://bugs.webkit.org/show_bug.cgi?id=177829
<rdar://problem/34798441>

LayoutTests/imported/w3c:

Update expected result now that we match the XHR standard, <https://xhr.spec.whatwg.org> (09/08/2017).

We no longer consider Content-Transfer-Encoding and User-Agent forbidden headers as per
the standard.

  • web-platform-tests/XMLHttpRequest/setrequestheader-header-allowed-expected.txt:

LayoutTests:

Update tests and expected results now that we match the XHR standard, <https://xhr.spec.whatwg.org> (09/08/2017).

We no longer consider Content-Transfer-Encoding and User-Agent forbidden headers as per
the standard.

  • fast/xmlhttprequest/set-dangerous-headers-expected.txt:
  • fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html:
  • fast/xmlhttprequest/set-dangerous-headers.html:
  • http/tests/xmlhttprequest/check-combining-headers-expected.txt:
  • http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
  • http/tests/xmlhttprequest/set-dangerous-headers.html:
4:08 PM Changeset in webkit [222816] by Dewei Zhu
  • 2 edits in trunk/Tools

Fix missing import for BenchmarkRunner.
https://bugs.webkit.org/show_bug.cgi?id=177842

Reviewed by Ryosuke Niwa.

'show_results' requires BenchmarkRunner.

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:
3:40 PM Changeset in webkit [222815] by dbates@webkit.org
  • 6 edits in trunk/Source/WebCore

Share code to determine a forbidden method
https://bugs.webkit.org/show_bug.cgi?id=177833

Reviewed by Andy Estes.

Currently we duplicate code in XMLHttpRequest and FetchRequest to determine if a method is
forbidden. We should add a common helper function and update both classes to make use of it.

No functionality changed. So, no new tests.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::setMethod): Modified to use WebCore::isForbiddenMethod().

  • platform/network/HTTPParsers.cpp:

(WebCore::isForbiddenMethod): Added.

  • platform/network/HTTPParsers.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::open): Modified to use WebCore::isForbiddenMethod().
(WebCore::XMLHttpRequest::isAllowedHTTPMethod): Deleted.

  • xml/XMLHttpRequest.h:
3:39 PM Changeset in webkit [222814] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

RenderMenuList should not hold raw pointers
https://bugs.webkit.org/show_bug.cgi?id=177836

Reviewed by Antti Koivisto.

While both m_buttonText and m_innerBlock are child renderers of
the RenderMenuList, so the their lifecycles are supposed to tied
to the parent object, this patch removes some manual raw pointer managing.

Covered by existing tests.

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::RenderMenuList):
(WebCore::RenderMenuList::createInnerBlock):
(RenderMenuList::takeChild):
(RenderMenuList::setText):

  • rendering/RenderMenuList.h:
3:12 PM Changeset in webkit [222813] by Megan Gardner
  • 2 edits
    2 adds in trunk/LayoutTests

Add long press and drag test
https://bugs.webkit.org/show_bug.cgi?id=177289

Reviewed by Wenson Hsieh.

Adding a test to test the long press and then drag functionality of selection.
Also add additional helper functions to basic gestures, so that this and other
tests can be written. Mostly deals with not lifting between gestures.

  • fast/events/touch/ios/long-press-then-drag-to-select-text-expected.txt: Added.
  • fast/events/touch/ios/long-press-then-drag-to-select-text.html: Added.
  • fast/events/touch/ios/resources/basic-gestures.js:

(longPressAndHoldAtPoint):
(touchAndDragFromPointToPoint):

2:56 PM Changeset in webkit [222812] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Include a few widespread WTF headers in WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=173481

  • WebCorePrefix.h:

Turn this off on Windows because it doesn't work; needs further investigation.

2:27 PM Changeset in webkit [222811] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip imported/w3c/web-platform-tests/payment-request/rejects_if_not_active.https.html on iOS.
https://bugs.webkit.org/show_bug.cgi?id=177832

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:12 PM Changeset in webkit [222810] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Include a few widespread WTF headers in WebCorePrefix.h
https://bugs.webkit.org/show_bug.cgi?id=173481

Reviewed by Alex Christensen.

  • WebCorePrefix.h:

These are four of the headers that contribute the most pre-processed
source to the WebCore build. They (and their dependents) change infrequently
enough that a world rebuild of WebCore when they change seems like an
acceptable tradeoff for the ~9% reduction in WebCore build time that I
measure from this change.

We can't do this on macOS 10.12 because of https://bugs.llvm.org/show_bug.cgi?id=33520.

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

Fix API tests after r222794.
https://bugs.webkit.org/show_bug.cgi?id=177825

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::willGoToBackForwardListItem):
Sometimes there's no navigation client.

2:10 PM Changeset in webkit [222808] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Layout Test http/tests/inspector/network/beacon-type.html is flaky.
https://bugs.webkit.org/show_bug.cgi?id=177834

Unreviewed test gardening.

  • http/tests/inspector/network/beacon-type.html:
  • http/tests/inspector/network/ping-type.html:

Don't wait for the resource to finish loading if it has already finished loading.
Logs showed the resource had already finished loading earlier, before this
promise microtask started running.

1:55 PM Changeset in webkit [222807] by dbates@webkit.org
  • 9 edits in trunk

XMLHttpRequest.setRequestHeader() should allow Content-Transfer-Encoding header; remove
duplicate logic to check for a forbidden XHR header field
https://bugs.webkit.org/show_bug.cgi?id=177829

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Use isForbiddenHeaderName() (defined in HTTPParsers.h) to check if the header field specified
to XMLHttpRequest.setRequestHeader() is allowed. Among other benefits this makes the behavior
of XMLHttpRequest.setRequestHeader() more closely aligned with the behavior of this method in
the XHR standard, <https://xhr.spec.whatwg.org> (8 September 2017). In particular, XMLHttpRequest.setRequestHeader()
no longer forbids setting the header Content-Transfer-Encoding. This header has not been
considered a forbidden header since <https://www.w3.org/TR/2012/WD-XMLHttpRequest-20121206/>.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setRequestHeader):
(WebCore::isForbiddenRequestHeader): Deleted.
(WebCore::XMLHttpRequest::isAllowedHTTPHeader): Deleted.

  • xml/XMLHttpRequest.h:

LayoutTests:

Update tests and test results now that we no longer consider Content-Transfer-Encoding a
forbidden header.

  • fast/xmlhttprequest/set-dangerous-headers-expected.txt:
  • fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html:
  • fast/xmlhttprequest/set-dangerous-headers.html:
  • http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
  • http/tests/xmlhttprequest/set-dangerous-headers.html:
1:51 PM Changeset in webkit [222806] by Ryan Haddad
  • 22 edits
    1 move
    1 add
    14 deletes in trunk/Source/WebCore

Unreviewed, rolling out r222686, r222695, and r222698.
https://bugs.webkit.org/show_bug.cgi?id=177835

Caused LayoutTests to crash in
WebCore::TimerBase::setNextFireTime (Requested by ryanhaddad
on #webkit).

Reverted changesets:

"[Settings] Replace SettingsMacros.h with a generated base
class for Settings"
https://bugs.webkit.org/show_bug.cgi?id=177681
http://trac.webkit.org/changeset/222686

"[Settings] Enums should not be passed by const reference"
https://bugs.webkit.org/show_bug.cgi?id=177727
http://trac.webkit.org/changeset/222695

"[Settings] Move remaining simple settings to Settings.in"
https://bugs.webkit.org/show_bug.cgi?id=177730
http://trac.webkit.org/changeset/222698

Patch by Commit Queue <commit-queue@webkit.org> on 2017-10-03

1:36 PM Changeset in webkit [222805] by Joseph Pecoraro
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening. Add debugging to flakey test.

  • http/tests/inspector/network/beacon-type.html:

Add some debugging to try and understand why this test times out.

1:32 PM Changeset in webkit [222804] by commit-queue@webkit.org
  • 2 edits in trunk/Tools

[WPE] Bump deps to add support for xdg-shell-unstable-v6 protocol
https://bugs.webkit.org/show_bug.cgi?id=177820

Patch by Olivier Blin <Olivier Blin> on 2017-10-03
Reviewed by Žan Doberšek.

gnome-shell does not advertize the xdg-shell protocol anymore, but xdg-shell-unstable-v6 instead.
Support has been added in WPEBackend-mesa, we need to update the requirements.
wayland-1.10 is needed for wl_proxy_get_version(), used in the generated headers.

  • wpe/jhbuild.modules:
12:56 PM Changeset in webkit [222803] by jer.noble@apple.com
  • 5 edits in trunk/Source/WebCore

Implement quality-of-service tiers in WebCoreDecompressionSession
https://bugs.webkit.org/show_bug.cgi?id=177769

Reviewed by Dean Jackson.

VTDecompressionSession will suggest quality-of-service tiers to be used when decompression
can't keep up with playback speed. Use a simple exponential-moving-average heuristic to
determine when to move up and down the tiers.

Drive-by fix: When frames are so late that they miss the display deadline, mark them as
dropped rather than just delayed.

  • platform/graphics/cocoa/WebCoreDecompressionSession.h:
  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
(WebCore::WebCoreDecompressionSession::decodeSample):
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
(WebCore::WebCoreDecompressionSession::automaticDequeue):
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
(WebCore::WebCoreDecompressionSession::resetQosTier):
(WebCore::WebCoreDecompressionSession::increaseQosTier):
(WebCore::WebCoreDecompressionSession::decreaseQosTier):
(WebCore::WebCoreDecompressionSession::updateQosWithDecodeTimeStatistics):

  • platform/cocoa/VideoToolboxSoftLink.cpp:
  • platform/cocoa/VideoToolboxSoftLink.h:
12:23 PM Changeset in webkit [222802] by achristensen@apple.com
  • 8 edits in trunk/Source/WebKit

Add ObjC equivalent of WKPageLoaderClient.pluginDidFail
https://bugs.webkit.org/show_bug.cgi?id=177787
<rdar://problem/22387633>

Reviewed by Tim Horton.

  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::didFailToInitializePlugin):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::canHandleDidFailToInitializePlugIn const):
(API::NavigationClient::didFailToInitializePlugIn):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):

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

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::canHandleDidFailToInitializePlugIn const):
(WebKit::NavigationState::NavigationClient::didFailToInitializePlugIn):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFailToInitializePlugin):

12:21 PM Changeset in webkit [222801] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Layers tab sidebar's DOM highlight should be by row hover, not row selection
https://bugs.webkit.org/show_bug.cgi?id=177690

Patch by Ross Kirsling <Ross Kirsling> on 2017-10-03
Reviewed by Devin Rousso.

  • UserInterface/Views/LayerDetailsSidebarPanel.js:

(WI.LayerDetailsSidebarPanel):
(WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
(WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
(WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove):
(WI.LayerDetailsSidebarPanel.prototype._dataGridMouseLeave):
(WI.LayerDetailsSidebarPanel.prototype._hideDOMNodeHighlight):
(WI.LayerDetailsSidebarPanel.prototype._dataGridFocused): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred): Deleted.
(WI.LayerDetailsSidebarPanel.prototype._highlightSelectedNode): Deleted.

12:21 PM Changeset in webkit [222800] by Adrian Perez de Castro
  • 6 edits
    2 adds in trunk

[GTK] Support the "system" CSS font family
https://bugs.webkit.org/show_bug.cgi?id=177755

Reviewed by Carlos Garcia Campos.

Obtain the system UI font from the GtkSettings::gtk-font-name property

Source/WebCore:

Test: platform/gtk/fonts/systemFont.html

  • platform/graphics/freetype/FontCacheFreeType.cpp:

(WebCore::getFamilyNameStringFromFamily): Use defaultGtkSystemFont()
to handle -webkit-system-font and -webkit-system-ui.
(WebCore::isCommonlyUsedGenericFamily): Handle -webkit-system-font and
-webkit-system-ui as generic family names.

  • platform/graphics/gtk/GtkUtilities.cpp:

(WebCore::defaultGtkSystemFont): Added.

  • platform/graphics/gtk/GtkUtilities.h: Add prototype for defaultGtkSystemFont().

LayoutTests:

  • platform/gtk/fonts/systemFont-expected.html: Added.
  • platform/gtk/fonts/systemFont.html: Added.
12:17 PM Changeset in webkit [222799] by Nikita Vasilyev
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: support editing of rule selectors
https://bugs.webkit.org/show_bug.cgi?id=177012

Reviewed by Matt Baker.

Clicking or focusing (by tabbing from another field) on a CSS selector should select the text and make the selector
field editable.

Keyboard behavior while editing:

  • Enter should commit changes.
  • Escape should discard changes.
  • Tab should commit changes and navigate to the first property name.
  • Shift-Tab should commit changes and navigate to the last rule's property value, if there's one.
  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetStyleProperty.prototype._update):
Add tabIndex so the keyboard navigation (Tab & Shift-Tab) to and from selectors works as expected.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:

(.spreadsheet-css-declaration .selector:focus,):
(.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
(.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing):

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
Split layout into _renderOrigin and _renderSelector, so selector field can be updated separately
from everything else.

(WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidDiscard):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._discardSelectorChange):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
(WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderOrigin):

(WI.SpreadsheetSelectorField):
(WI.SpreadsheetSelectorField.prototype.get editing):
(WI.SpreadsheetSelectorField.prototype.startEditing):
(WI.SpreadsheetSelectorField.prototype.stopEditing):
(WI.SpreadsheetSelectorField.prototype._handleClick):
(WI.SpreadsheetSelectorField.prototype._handleFocus):
(WI.SpreadsheetSelectorField.prototype._handleBlur):
(WI.SpreadsheetSelectorField.prototype._handleKeyDown):

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

Cherry-pick r222786. rdar://problem/34706688

12:09 PM Changeset in webkit [222797] by jmarcell@apple.com
  • 6 edits in branches/safari-604-branch

Cherry-pick r222779. rdar://problem/34706688

12:02 PM Changeset in webkit [222796] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[GTK] Prefer -webkit-system-font
https://bugs.webkit.org/show_bug.cgi?id=177814

Reviewed by Carlos Garcia Campos.

Use "font-family: -webkit-system-font" instead of "font: menu".

  • UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:

(WebKit::RemoteInspectorProtocolHandler::handleRequest): Edited HTML snippet.

11:54 AM Changeset in webkit [222795] by dbates@webkit.org
  • 5 edits
    4 adds in trunk

[XHR] Only exempt Dashboard widgets from XHR header restrictions
https://bugs.webkit.org/show_bug.cgi?id=177824
<rdar://problem/34384301>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Currently we allow file URLs to set arbitrary XHR headers. In contrast, non-file URLs are
restricted from setting some XHR headers (e.g. COOKIE). Historically the relaxation for file
URL was for backwards compatibility to allow Dashboard widgets to work. Instead we should
apply the non-file URL policy to all URLs and only relax the policy for Dashboard widgets.

Tests: fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html

fast/xmlhttprequest/set-dangerous-headers.html

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setRequestHeader):

LayoutTests:

Add tests to ensure that file URLs are forbidden from setting the same set of blacklisted
headers as non-file URLs except when running in Dashboard compatibility mode.

  • TestExpectations: Mark test fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html

as WontFix on all platforms. We will selectively enable this test on Mac because it is the
only platform that supports Dashboard widgets.

  • fast/xmlhttprequest/set-dangerous-headers-expected.txt: Added.
  • fast/xmlhttprequest/set-dangerous-headers-in-dashboard-expected.txt: Added.
  • fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html: Added.
  • fast/xmlhttprequest/set-dangerous-headers.html: Added. Derived from LayoutTests/http/tests/xmlhttprequest/set-dangerous-headers.html.
  • platform/mac/TestExpectations: Enable test fast/xmlhttprequest/set-dangerous-headers-in-dashboard.html

on Mac.

11:54 AM Changeset in webkit [222794] by achristensen@apple.com
  • 13 edits in trunk

Add ObjC SPI equivalent to WKPageLoaderClient.willGoToBackForwardListItem
https://bugs.webkit.org/show_bug.cgi?id=177825
<rdar://problem/22387505>

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/API/APILoaderClient.h:

(API::LoaderClient::willGoToBackForwardListItem):

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::canHandleWillGoToBackForwardListItem const):
(API::NavigationClient::willGoToBackForwardListItem):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageLoaderClient):

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

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::canHandleWillGoToBackForwardListItem const):
(WebKit::NavigationState::NavigationClient::willGoToBackForwardListItem):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::willGoToBackForwardListItem):

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

(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem const):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:

(-[BackForwardDelegate _webView:willGoToBackForwardListItem:inPageCache:]):
(-[BackForwardDelegate webView:didFinishNavigation:]):
(TEST):

11:48 AM Changeset in webkit [222793] by Antti Koivisto
  • 4 edits in trunk

Allow assigning WeakPtr<Derived> to WeakPtr<Base>
https://bugs.webkit.org/show_bug.cgi?id=177817

Reviewed by Geoff Garen.

Source/WTF:

Add templated copy/move constructors/assignment operators, similar to RefPtr.

  • wtf/WeakPtr.h:

(WTF::WeakPtrFactory::createWeakPtr const):
(WTF::weak_reference_upcast):
(WTF::weak_reference_downcast):
(WTF::WeakPtr<T>::WeakPtr):
(WTF::=):
(WTF::makeWeakPtr):

Tools:

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::Base::weakPtrFactory):
(TestWebKitAPI::TEST):

11:39 AM Changeset in webkit [222792] by commit-queue@webkit.org
  • 5 edits in trunk

REGRESSION(r221909): Failing fast/text/international/iso-8859-8.html
https://bugs.webkit.org/show_bug.cgi?id=177364

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-03
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Range.getClientRects returned an incorrect rect for a last
collapsed space of RenderText in HarfBuzz port.

HarfBuzzShaper::selectionRect needs to return a valid value even
if the arguments 'from' and 'to' point to the just after the end
of the text run.

Tests: fast/text/international/iso-8859-8.html

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::HarfBuzzShaper::shape): Do not check the return value of
fillGlyphBuffer.
(WebCore::HarfBuzzShaper::fillGlyphBuffer): Change the return
value type from bool to void.
(WebCore::HarfBuzzShaper::selectionRect): Set the rightmost
position to fromX if foundFromX is false.

  • platform/graphics/harfbuzz/HarfBuzzShaper.h: Change the return

value type of fillGlyphBuffer from bool to void.

LayoutTests:

  • platform/gtk/TestExpectations: Unmark fast/text/international/iso-8859-8.html.
11:33 AM Changeset in webkit [222791] by jfbastien@apple.com
  • 100 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.

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 Wasm::CodeBlock'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 isn't adding any indirection to the generated code because the B3 IR generator now reaches for Wasm::CodeBlock 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.

Source/WTF:

  • wtf/StdLibExtras.h:

(WTF::default_construct_at): this makes code in WasmTable much
more readable, and is generally useful for generic code

11:24 AM Changeset in webkit [222790] by Alan Bujtas
  • 4 edits in trunk

[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:

11:09 AM Changeset in webkit [222789] by commit-queue@webkit.org
  • 2 edits
    4 deletes in trunk

Remove no longer needed WebRTC build infrastructure
https://bugs.webkit.org/show_bug.cgi?id=177756

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-03
Reviewed by Alejandro G. Castro.

Source/ThirdParty/libwebrtc:

  • WebKit/project.json: Removed.
  • WebKit/rtc_sdk_framework_objc_info_plist.plist: Removed.

Tools:

  • Scripts/generate-libwebrtc-cmake: Removed.
  • Scripts/webkitpy/libwebrtc/init.py: Removed.
  • Scripts/webkitpy/libwebrtc/generate_cmake.py: Removed.
11:03 AM Changeset in webkit [222788] by dbates@webkit.org
  • 3 edits
    3 adds in trunk

[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.
10:56 AM Changeset in webkit [222787] by jdiggs@igalia.com
  • 5 edits
    2 adds in trunk

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.
10:29 AM Changeset in webkit [222786] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed test fix after r222779.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createCFURLResponseFromResponseData): Setting NSSecureCoding in this test code should be
done based on build system, just like it is in the actual WebArchive handling code.

9:28 AM WebKitGTK/Gardening/Calendar edited by cturner@igalia.com
(diff)
9:26 AM Changeset in webkit [222785] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Clean-up RealtimeIncomingVideoSource
https://bugs.webkit.org/show_bug.cgi?id=177782

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-03
Reviewed by Alejandro G. Castro.

No change of behavior.
Removing code that is no longer needed.

  • platform/mediastream/mac/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::create):
(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):

  • platform/mediastream/mac/RealtimeIncomingVideoSource.h:
9:25 AM Changeset in webkit [222784] by cturner@igalia.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

  • platform/gtk/TestExpectations:
9:16 AM Changeset in webkit [222783] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Move payment-request TestExpectations to ios-wk2.

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
  • platform/ios/TestExpectations:
9:12 AM Changeset in webkit [222782] by Matt Baker
  • 5 edits
    9 adds in trunk

Web Inspector: Add View layout tests, make views more testable
https://bugs.webkit.org/show_bug.cgi?id=161274
<rdar://problem/28038615>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

This patch adds support for View testing. Since view layouts are scheduled
using requestAnimationFrame, FrontendTestHarness now provides a timer-based
polyfill, to allow nonintrusive testing of the frontend View hierarchy.

  • UserInterface/Test.html:

Make WI.View available to tests.

  • UserInterface/Test/FrontendTestHarness.js:

(FrontendTestHarness.prototype.redirectRequestAnimationFrame):

  • UserInterface/Views/View.js:

(WI.View.rootView):
(WI.View.prototype.replaceSubview):
(WI.View.prototype._didMoveToWindow):
(WI.View._cancelScheduledLayoutForView):
Fixed issues caught while writing tests for the expected View behavior.

LayoutTests:

Add tests for creating views, adding and removing subviews, and layout
operations. These tests rely on a mock requestAnimationFrame, which is
enabled with FrontendTestHarness.redirectRequestAnimationFrame.

  • inspector/view/asynchronous-layout-expected.txt: Added.
  • inspector/view/asynchronous-layout.html: Added.
  • inspector/view/basics-expected.txt: Added.
  • inspector/view/basics.html: Added.
  • inspector/view/synchronous-layout-expected.txt: Added.
  • inspector/view/synchronous-layout.html: Added.
  • inspector/view/resources/test-view.js: Added.

(TestPage.registerInitializer.WI.TestView):
(TestPage.registerInitializer.WI.TestView.prototype.get initialLayoutCount):
(TestPage.registerInitializer.WI.TestView.prototype.get layoutCount):
(TestPage.registerInitializer.WI.TestView.prototype.evaluateAfterLayout):
(TestPage.registerInitializer.WI.TestView.prototype.initialLayout):
(TestPage.registerInitializer.WI.TestView.prototype.layout):
(TestPage.registerInitializer):
Register an instrumentation subclass of View. TestView counts calls to
protected methods and accepts callbacks to execute when a layout completes.

9:05 AM Changeset in webkit [222781] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update iOS TestExpectations for payment-request tests.
https://bugs.webkit.org/show_bug.cgi?id=177786

Unreviewed test gardening.

  • platform/ios/TestExpectations:
9:05 AM Changeset in webkit [222780] by Ryan Haddad
  • 2 edits in trunk/JSTests

Skip JSC test stress/regress-159779-2.js on debug.
https://bugs.webkit.org/show_bug.cgi?id=177204

Unreviewed test gardening.

  • stress/regress-159779-2.js:
9:00 AM Changeset in webkit [222779] by Brent Fulgham
  • 6 edits in trunk

[Mac] Use safer decoding practices for NSKeyedUnarchiver
https://bugs.webkit.org/show_bug.cgi?id=175887
<rdar://problem/33435281>

Reviewed by Daniel Bates.

Source/WebCore:

  • loader/archive/cf/LegacyWebArchiveMac.mm:

(WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Use NSSecureCoding to unarchive.
(WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto for archiving.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createCFURLResponseFromResponseData): Update to use NSSecureCoding if possible.

LayoutTests:

Mark two tests as flaky for now, until the relevant CFNetwork changes are available on the test systems.

  1. webarchive/loading/cache-expired-subresource.html
  2. webarchive/loading/test-loading-archive-subresource-null-mimetype.html
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
8:41 AM Changeset in webkit [222778] by Ms2ger@igalia.com
  • 4 edits
    77 deletes in trunk/LayoutTests

Remove some duplicated canvas toDataURL tests.
https://bugs.webkit.org/show_bug.cgi?id=177805

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

This copy of the canvas test suite was added in bug 138324 (r176144).
At that point there already was an older copy, that was added in
bug 20553 (r59954). A newer copy was added in bug 148822 (r189394) and
has been kept up-to-date with upstream since.

I have verified that the latest tests cover everything the older copies
do. There seems to be no reason to keep the older copies around.

  • canvas/resources/toDataURL.jpeg.alpha.png: Removed.
  • canvas/resources/toDataURL.jpeg.primarycolours.png: Removed.
  • canvas/resources/toDataURL.jpeg.quality.basic.png: Removed.
  • canvas/resources/toDataURL.png.complexcolours.png: Removed.
  • canvas/resources/toDataURL.png.primarycolours.png: Removed.
  • canvas/toDataURL.arguments.1-expected.txt: Removed.
  • canvas/toDataURL.arguments.1.html: Removed.
  • canvas/toDataURL.arguments.2-expected.txt: Removed.
  • canvas/toDataURL.arguments.2.html: Removed.
  • canvas/toDataURL.arguments.3-expected.txt: Removed.
  • canvas/toDataURL.arguments.3.html: Removed.
  • canvas/toDataURL.bogustype-expected.txt: Removed.
  • canvas/toDataURL.bogustype.html: Removed.
  • canvas/toDataURL.default-expected.txt: Removed.
  • canvas/toDataURL.default.html: Removed.
  • canvas/toDataURL.jpeg.alpha.html: Removed.
  • canvas/toDataURL.jpeg.primarycolours.html: Removed.
  • canvas/toDataURL.jpeg.quality.basic.html: Removed.
  • canvas/toDataURL.jpeg.quality.notnumber-expected.txt: Removed.
  • canvas/toDataURL.jpeg.quality.notnumber.html: Removed.
  • canvas/toDataURL.jpeg.quality.outsiderange-expected.txt: Removed.
  • canvas/toDataURL.jpeg.quality.outsiderange.html: Removed.
  • canvas/toDataURL.lowercase.ascii-expected.txt: Removed.
  • canvas/toDataURL.lowercase.ascii.html: Removed.
  • canvas/toDataURL.lowercase.unicode-expected.txt: Removed.
  • canvas/toDataURL.lowercase.unicode.html: Removed.
  • canvas/toDataURL.nocontext-expected.txt: Removed.
  • canvas/toDataURL.nocontext.html: Removed.
  • canvas/toDataURL.png-expected.txt: Removed.
  • canvas/toDataURL.png.complexcolours.html: Removed.
  • canvas/toDataURL.png.html: Removed.
  • canvas/toDataURL.png.primarycolours.html: Removed.
  • canvas/toDataURL.unrecognised-expected.txt: Removed.
  • canvas/toDataURL.unrecognised.html: Removed.
  • canvas/toDataURL.zerosize-expected.txt: Removed.
  • canvas/toDataURL.zerosize.html: Removed.

LayoutTests:

This copy of the canvas test suite was added in bug 20553 (r59954).
Another one-time import was done in bug 138324 (r176144). Yet another
copy was added in bug 148822 (r189394) and this one has been kept
up-to-date with upstream since.

I have verified that the latest tests cover everything the older copies
do. There seems to be no reason to keep the older copies around.

  • TestExpectations: Removed reference to removed test.
  • canvas/philip/tests/toDataURL.arguments.1-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.arguments.1.html: Removed.
  • canvas/philip/tests/toDataURL.arguments.2-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.arguments.2.html: Removed.
  • canvas/philip/tests/toDataURL.arguments.3-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.arguments.3.html: Removed.
  • canvas/philip/tests/toDataURL.bogustype-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.bogustype.html: Removed.
  • canvas/philip/tests/toDataURL.default-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.default.html: Removed.
  • canvas/philip/tests/toDataURL.jpeg.alpha-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.jpeg.alpha.html: Removed.
  • canvas/philip/tests/toDataURL.jpeg.alpha.png: Removed.
  • canvas/philip/tests/toDataURL.jpeg.primarycolours-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.jpeg.primarycolours.html: Removed.
  • canvas/philip/tests/toDataURL.jpeg.primarycolours.png: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.basic-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.basic.html: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.basic.png: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.notnumber-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.notnumber.html: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.outsiderange-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.jpeg.quality.outsiderange.html: Removed.
  • canvas/philip/tests/toDataURL.lowercase.ascii-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.lowercase.ascii.html: Removed.
  • canvas/philip/tests/toDataURL.lowercase.unicode-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.lowercase.unicode.html: Removed.
  • canvas/philip/tests/toDataURL.nocontext-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.nocontext.html: Removed.
  • canvas/philip/tests/toDataURL.png-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.png.complexcolours-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.png.complexcolours.html: Removed.
  • canvas/philip/tests/toDataURL.png.complexcolours.png: Removed.
  • canvas/philip/tests/toDataURL.png.html: Removed.
  • canvas/philip/tests/toDataURL.png.primarycolours-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.png.primarycolours.html: Removed.
  • canvas/philip/tests/toDataURL.png.primarycolours.png: Removed.
  • canvas/philip/tests/toDataURL.unrecognised-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.unrecognised.html: Removed.
  • canvas/philip/tests/toDataURL.zerosize-expected.txt: Removed.
  • canvas/philip/tests/toDataURL.zerosize.html: Removed.
  • platform/ios-device/TestExpectations: Removed reference to removed test.
8:19 AM Changeset in webkit [222777] by Ryan Haddad
  • 6 edits in trunk

Unreviewed, rolling out r222760.

This change caused LayoutTest crashes.

Reverted changeset:

"[Mac] Use safer decoding practices for NSKeyedUnarchiver"
https://bugs.webkit.org/show_bug.cgi?id=175887
http://trac.webkit.org/changeset/222760

2:50 AM Changeset in webkit [222776] by Michael Catanzaro
  • 11 edits in trunk

REGRESSION(r222392): [WPE][GTK] Many forms tests are failing due to broken event timestamps
https://bugs.webkit.org/show_bug.cgi?id=177449

Reviewed by Chris Dumez.

Source/WebCore:

  • platform/gtk/GtkUtilities.cpp:

(WebCore::wallTimeForEvent):

  • platform/gtk/GtkUtilities.h:

(WebCore::wallTimeForEvent):

  • platform/gtk/PlatformKeyboardEventGtk.cpp:

(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

  • platform/gtk/PlatformMouseEventGtk.cpp:

(WebCore::PlatformMouseEvent::PlatformMouseEvent):

  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):

Source/WebKit:

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebTouchEvent):

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::wallTimeForEventTime):
(WebKit::WebEventFactory::createWebKeyboardEvent):
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
(WebKit::WebEventFactory::createWebTouchEvent):

LayoutTests:

  • platform/gtk/TestExpectations:
2:43 AM Changeset in webkit [222775] by commit-queue@webkit.org
  • 13 edits
    3 adds in trunk

Build libwebrtc unit tests executables
https://bugs.webkit.org/show_bug.cgi?id=177211

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-03
Reviewed by Alex Christensen.

.:

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

Source/ThirdParty/libwebrtc:

Adding support for a new target called unittests that will be several executables.
Each executable run unit tests dedicated to a part of libwebrtc.

Adding one target/executable per unit test suite.
Adding one composite target to build all unit test targets.
Adding a target to build a static libwebrtctest library.
The static libwebrtctest library is then linked to each unit test executable which is also linked to libwebrtc dylib.

Some unit tests require a default codec (VP8) that is disabled in libwebrtc.
This ends up making some tests crashing.
An additional work should follow to execute only the meaningful subset of tests.

  • Configurations/libwebrtc-base.xcconfig: Added.
  • Configurations/libwebrtc-test-static.xcconfig: Added.
  • Configurations/rtc_pc_unittests.xcconfig: Added.
  • Source/third_party/gflags/gen/posix/include/private/config.h:
  • Source/webrtc/modules/audio_coding/neteq/tools/neteq_test.cc: Replacing FATAL by RTC_FATAL.
  • Source/webrtc/sdk/objc/Framework/Classes/Common/helpers.mm: Removing UIKit dependency.
  • Source/webrtc/test/gmock.h: Using googletest version instead of checking in testing folder.
  • Source/webrtc/test/gtest.h: Ditto.
  • Source/webrtc/test/rtp_file_reader.cc: Replacing FATAL by RTC_FATAL.
  • libwebrtc.xcodeproj/project.pbxproj:
2:35 AM Changeset in webkit [222774] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Use vector map routine in WebCore CacheStorage implementation
https://bugs.webkit.org/show_bug.cgi?id=177002

Patch by Youenn Fablet <youenn@apple.com> on 2017-10-03
Reviewed by Darin Adler.

No change of behavior.
Replacing use of reserveInitialCapacity/uncheckedAppend by use of map.

  • Modules/cache/CacheStorage.cpp:

(WebCore::copyCache):
(WebCore::CacheStorage::match):
(WebCore::CacheStorage::retrieveCaches):
(WebCore::CacheStorage::keys):
(WebCore::copyCaches): Deleted.

  • Modules/cache/DOMCache.cpp:

(WebCore::DOMCache::matchAll):
(WebCore::copyRequestRef):
(WebCore::DOMCache::keys):

  • Modules/cache/DOMCacheEngine.cpp:

(WebCore::DOMCacheEngine::isolateCacheInfo):
(WebCore::DOMCacheEngine::CacheInfos::isolatedCopy):

  • Modules/cache/WorkerCacheStorageConnection.cpp:

(WebCore::recordsDataFromRecords):
(WebCore::recordsFromRecordsData):

2:21 AM WebKitGTK/2.18.x edited by Michael Catanzaro
(diff)
1:58 AM Changeset in webkit [222773] by Carlos Garcia Campos
  • 5 edits
    19 deletes in trunk/LayoutTests/imported/w3c

W3C tests importer should not import the whole tools directory
https://bugs.webkit.org/show_bug.cgi?id=177351

Reviewed by Youenn Fablet.

Only wptserve and its dependencies are needed to run the layout tests. It seems we already tried to avoid
importing pytest for example, but the wrong path is used in import-expectations.json. Instead of skipping what
we don't want, I think it's better to skip tools and import only what we need, that way if new directories are
added upstream we won't import them. This will reduce a lot the size of the tools directory, and will avoid
duplication with the WebDriver tests importer that needs wptrunner, webdriver and pytest from tools directory.

  • resources/TestRepositories:
  • resources/import-expectations.json:
  • web-platform-tests/tools/OWNERS: Removed.
  • web-platform-tests/tools/appveyor.yml: Removed.
  • web-platform-tests/tools/browserutils: Removed.
  • web-platform-tests/tools/certs: Removed.
  • web-platform-tests/tools/ci: Removed.
  • web-platform-tests/tools/conftest.py: Removed.
  • web-platform-tests/tools/gitignore: Removed.
  • web-platform-tests/tools/html5lib: Removed.
  • web-platform-tests/tools/lint: Removed.
  • web-platform-tests/tools/py: Removed.
  • web-platform-tests/tools/pytest.ini: Removed.
  • web-platform-tests/tools/pytest: Removed.
  • web-platform-tests/tools/runner: Removed.
  • web-platform-tests/tools/scripts: Removed.
  • web-platform-tests/tools/six: Removed.
  • web-platform-tests/tools/tox.ini: Removed.
  • web-platform-tests/tools/w3c-import.log:
  • web-platform-tests/tools/webdriver: Removed.
  • web-platform-tests/tools/wpt: Removed.
  • web-platform-tests/tools/wptrunner: Removed.
1:12 AM Changeset in webkit [222772] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[GTK][WPE] WebProcess should run cleanup on quit to release resources
https://bugs.webkit.org/show_bug.cgi?id=168126

Reviewed by Michael Catanzaro.

Do not call exit on sync message send failure for GTK and WPE ports.

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeConnection):

Oct 2, 2017:

11:42 PM Changeset in webkit [222771] by mmaxfield@apple.com
  • 8 edits
    2 moves in trunk/Source

Move LineEnding.{h,cpp} from WebCore/platform/text to wtf/text
https://bugs.webkit.org/show_bug.cgi?id=176575

Reviewed by Alex Christensen.

Source/WebCore:

No new tests because there is no behavior change.

  • WebCore.xcodeproj/project.pbxproj:
  • fileapi/BlobBuilder.cpp:
  • html/FormDataList.cpp:

Source/WTF:

As part of the PAL effort, we're trying to move everything out of WebCore/platform, one-by-one.
These LineEnding files belong in WTF.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/text/LineEnding.cpp: Renamed from Source/WebCore/platform/text/LineEnding.cpp.

(WTF::normalizeLineEndingsToCRLF):

  • wtf/text/LineEnding.h: Renamed from Source/WebCore/platform/text/LineEnding.h.
11:36 PM Changeset in webkit [222770] by mmaxfield@apple.com
  • 2 edits in trunk/Tools

Make WSL demo compatible with Microsoft Edge
https://bugs.webkit.org/show_bug.cgi?id=177643

Reviewed by Saam Barati.

This patch does two things. The first is it migrates a loop over ParentNode.children to a legacy style loop
because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides
the compilation behind a setTimeout(0) so there is some indication that something is happening during a
compile.

  • Tools/WebGPUShadingLanguageRI/index.html:
10:31 PM Changeset in webkit [222769] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Web Inspector: Rename methods ending in *Json() as *JSON()
https://bugs.webkit.org/show_bug.cgi?id=177793

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-02
Reviewed by Matt Baker.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::didReceiveResponse):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::resourceTypeJSON):
(WebCore::InspectorPageAgent::cachedResourceTypeJSON):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
(WebCore::InspectorPageAgent::resourceTypeJson): Deleted.
(WebCore::InspectorPageAgent::cachedResourceTypeJson): Deleted.

  • inspector/InspectorPageAgent.h:
10:10 PM Changeset in webkit [222768] by Wenson Hsieh
  • 5 edits
    2 adds in trunk

REGRESSION(r222595): Intermittent crash while accessing DataTransferItemList
https://bugs.webkit.org/show_bug.cgi?id=177791
<rdar://problem/34781456>

Reviewed by Ryosuke Niwa.

Source/WebCore:

DataTransfer::moveDragState() currently attempts to move the other DataTransfer's DataTransferItemList and
DragImageLoader as members of its own. This is incorrect, since both of these entities hold raw references of
some form to the other DataTransfer, yet they are held as unique_ptrs in the new DataTransfer. To fix this, we
(1) remove the line of code that moves the item list, since item lists will be lazily generated on the new
DataTransfer anyways, and (2) update the DataTransfer pointer on the old DataTransfer's DragImageLoader after
moving it to the new DataTransfer.

Test: editing/pasteboard/drag-end-crash-accessing-item-list.html

  • dom/DataTransfer.cpp:

(WebCore::DragImageLoader::moveToDataTransfer):
(WebCore::DataTransfer::moveDragState):

LayoutTests:

Add a new layout test that simulates the crash encountered in this bug by forcing a garbage collection sweep
right before accessing the pasteboard in a "dragend" event handler.

  • TestExpectations:
  • editing/pasteboard/drag-end-crash-accessing-item-list-expected.txt: Added.
  • editing/pasteboard/drag-end-crash-accessing-item-list.html: Added.
  • platform/mac-wk1/TestExpectations:
9:35 PM Changeset in webkit [222767] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Rename computeSharedStringHash() overload taking a URL to computedVisitedLinkHash()
https://bugs.webkit.org/show_bug.cgi?id=177776

Reviewed by Alex Christensen.

  • dom/VisitedLinkState.cpp:

(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):

  • html/HTMLAnchorElement.h:

(WebCore::HTMLAnchorElement::visitedLinkHash const):

  • platform/SharedStringHash.cpp:

(WebCore::computeVisitedLinkHash):

  • platform/SharedStringHash.h:
8:07 PM Changeset in webkit [222766] by Brent Fulgham
  • 1 edit
    6 adds in trunk/LayoutTests

Merge three Blink test cases
https://bugs.webkit.org/show_bug.cgi?id=177797
<rdar://problem/27331975>

Unreviewed merge of Blink test cases.

Merge three test cases from the following Blink change:

https://chromium.googlesource.com/chromium/blink/+/17c5b48f130e4ebb796f9db89628f887624db4ef

Relevant fixes had been made in WebKit over the years, but we did not include proper
test coverage.

  • fast/dom/assertion-on-node-removal-expected.txt: Added.
  • fast/dom/assertion-on-node-removal.html: Added.
  • fast/forms/control-detach-crash-expected.txt: Added.
  • fast/forms/control-detach-crash.html: Added.
  • svg/custom/assert-on-node-removal-expected.txt: Added.
  • svg/custom/assert-on-node-removal.html: Added.
6:02 PM Changeset in webkit [222765] by jdiggs@igalia.com
  • 5 edits
    2 adds in trunk

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.
5:42 PM Changeset in webkit [222764] by ggaren@apple.com
  • 4 edits in trunk

WeakPtr should have a move constructor
https://bugs.webkit.org/show_bug.cgi?id=177789

Reviewed by Chris Dumez.

Source/WTF:

  • wtf/WeakPtr.h: Now that we just have a RefPtr data member,

the default operators are sufficient.

Tools:

Chris made me write an API test. It wasn't that painful.

  • TestWebKitAPI/Tests/WTF/WeakPtr.cpp:

(TestWebKitAPI::TEST):

5:37 PM Changeset in webkit [222763] by aestes@apple.com
  • 5 edits in trunk

[Payment Request] Validate payment method identifiers
https://bugs.webkit.org/show_bug.cgi?id=177794

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/payment-request/payment-request-ctor-pmi-handling.https-expected.txt:

Source/WebCore:

  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::isValidStandardizedPaymentMethodIdentifier):
(WebCore::isValidURLBasedPaymentMethodIdentifier):
(WebCore::convertAndValidatePaymentMethodIdentifier):
(WebCore::PaymentRequest::create):

  • Modules/paymentrequest/PaymentRequest.h:
5:29 PM Changeset in webkit [222762] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Escape more characters in posix string conversion
https://bugs.webkit.org/show_bug.cgi?id=177761
<rdar://problem/34506832>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-10-02
Reviewed by Brian Burg.

  • UserInterface/Models/Resource.js:

(WI.Resource.prototype.generateCURLCommand.escapeStringPosix):
Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times.

5:22 PM Changeset in webkit [222761] by rniwa@webkit.org
  • 10 edits in trunk/Source

Move more code into PasteboardCustomData
https://bugs.webkit.org/show_bug.cgi?id=177795

Reviewed by Wenson Hsieh.

Source/WebCore:

Moved sharedBufferFromCustomData, customDataFromSharedBuffer, and customWebKitPasteboardDataType into
PasteboardCustomData as createSharedBuffer, fromSharedBuffer, and cocoaType respectively.

  • platform/Pasteboard.cpp:

(WebCore::PasteboardCustomData::createSharedBuffer const): Renamed from sharedBufferFromCustomData.
(WebCore::PasteboardCustomData::fromSharedBuffer): Renamed from customDataFromSharedBuffer.

  • platform/Pasteboard.h:
  • platform/StaticPasteboard.cpp:

(WebCore::StaticPasteboard::commitToPasteboard): Now initializes with an empty origin string.

  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::PasteboardCustomData::cocoaType): Moved here from Pasteboard.h
(WebCore::Pasteboard::readStringInCustomData):

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard typeIdentifiersToLoadForRegisteredTypeIdentfiers:]):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::write):

Source/WebKit:

Added the support for encoding and decoding the origin string in PasteboardCustomData.

  • Shared/WebCoreArgumentCoders.cpp:

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

5:13 PM Changeset in webkit [222760] by Brent Fulgham
  • 6 edits in trunk

[Mac] Use safer decoding practices for NSKeyedUnarchiver
https://bugs.webkit.org/show_bug.cgi?id=175887
<rdar://problem/33435281>

Reviewed by Daniel Bates.

Source/WebCore:

  • loader/archive/cf/LegacyWebArchiveMac.mm:

(WebCore::LegacyWebArchive::createResourceResponseFromMacArchivedData): Use NSSecureCoding to unarchive.
(WebCore::LegacyWebArchive::createPropertyListRepresentation): Ditto for archiving.

  • testing/cocoa/WebArchiveDumpSupport.mm:

(WebCoreTestSupport::createCFURLResponseFromResponseData): Update to use NSSecureCoding if possible.

LayoutTests:

Mark two tests as flaky for now, until the relevant CFNetwork changes are available on the test systems.

  1. webarchive/loading/cache-expired-subresource.html
  2. webarchive/loading/test-loading-archive-subresource-null-mimetype.html
  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
5:09 PM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
4:55 PM Changeset in webkit [222759] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned
https://bugs.webkit.org/show_bug.cgi?id=150551

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

content setter should only be used when NOT repositioning the popover.
presentNewContentWithFrame exists to update content and position at once.

  • UserInterface/Views/LayerDetailsSidebarPanel.js:

(WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
(WI.LayerDetailsSidebarPanel.prototype._presentPopover):
Fix new sidebar.

  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:

(WI.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
Fix legacy sidebar.

4:44 PM Changeset in webkit [222758] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Use InlineTextBox::lineFont() in more places
https://bugs.webkit.org/show_bug.cgi?id=177749

Reviewed by Zalan Bujtas.

Currently InlineTextBox::paint() calls InlineTextBox::lineFont() to compute the font for the
line and then passes this value to various paint helper functions. The computation is not
expensive and it is sufficient to have the individual paint helper functions compute it
directly. We should have the individual paint helper functions compute it directly. This
will help towards sharing more code throughout InlineTextBox by reducing the noise of
passing the font for the line.

No functionality changed. So, no new tests.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintTextSubrangeBackground):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::paintDecoration):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintDocumentMarkers):

  • rendering/InlineTextBox.h:
4:40 PM Changeset in webkit [222757] by jmarcell@apple.com
  • 7 edits in branches/safari-604-branch/Source

Versioning.

4:34 PM Changeset in webkit [222756] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

[Curl] Implement missing async method in RecourceHandle and make it actually async
https://bugs.webkit.org/show_bug.cgi?id=173964

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-02
Reviewed by Alex Christensen.

  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::continueWillSendRequest): Deleted.
(WebCore::ResourceHandle::continueDidReceiveResponse): Deleted.
(WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): Deleted.

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::start):
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::suspend):
(WebCore::CurlRequest::resume):
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::didCancelTransfer):
(WebCore::CurlRequest::finalizeTransfer):
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
(WebCore::CurlRequest::invokeDidReceiveResponse):
(WebCore::CurlRequest::completeDidReceiveResponse):
(WebCore::CurlRequest::setRequestPaused):
(WebCore::CurlRequest::setCallbackPaused):
(WebCore::CurlRequest::pausedStatusChanged):
(WebCore::CurlRequest::setPaused): Deleted.

  • platform/network/curl/CurlRequest.h:

(WebCore::CurlRequest::needToInvokeDidReceiveResponse const):
(WebCore::CurlRequest::isPaused const):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::continueDidReceiveResponse):
(WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse):

  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::continueDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::platformContinueSynchronousDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::continueAfterDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::shouldRedirectAsGET):

  • platform/network/curl/ResourceHandleCurlDelegate.h:
  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::shouldRedirect):
(WebCore::ResourceResponse::isMovedPermanently const):
(WebCore::ResourceResponse::isFound const):
(WebCore::ResourceResponse::isSeeOther const):
(WebCore::ResourceResponse::isNotModified const):
(WebCore::ResourceResponse::isUnauthorized const):

4:33 PM Changeset in webkit [222755] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.3.4

Tag Safari-604.3.4.

4:04 PM Changeset in webkit [222754] by aestes@apple.com
  • 10 edits
    18 adds in trunk/LayoutTests

[Payment Request] Update payment-request imported tests
https://bugs.webkit.org/show_bug.cgi?id=177786

Reviewed by Zalan Bujtas.

LayoutTests/imported/w3c:

  • resources/import-expectations.json:
  • web-platform-tests/payment-request/PaymentAddress/attributes-and-toJSON-method-manual.https.html: Added.
  • web-platform-tests/payment-request/PaymentAddress/w3c-import.log: Added.
  • web-platform-tests/payment-request/algorithms-manual.https.html: Added.
  • web-platform-tests/payment-request/change-shipping-option-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-request-canmakepayment-method.https.html:
  • web-platform-tests/payment-request/payment-request-constructor.https-expected.txt:
  • web-platform-tests/payment-request/payment-request-constructor.https.html:
  • web-platform-tests/payment-request/payment-request-ctor-pmi-handling.https.html:
  • web-platform-tests/payment-request/payment-response/complete-method-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/helpers.js:

(async.runManualTest):

  • web-platform-tests/payment-request/payment-response/methodName-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/payerEmail-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/payerName-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/payerPhone-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/requestId-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/shippingAddress-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/payment-response/shippingOption-attribute-manual.https.html: Added.
  • web-platform-tests/payment-request/rejects_if_not_active.https.html: Added.
  • web-platform-tests/payment-request/shipping-address-changed-manual.https.html: Added.
  • web-platform-tests/payment-request/updateWith-method-pmi-handling-manual.https.html: Added.
  • web-platform-tests/payment-request/user-abort-algorithm-manual.https.html: Added.
  • web-platform-tests/payment-request/user-accepts-payment-request-algo-manual.https.html: Added.
  • web-platform-tests/payment-request/w3c-import.log:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
3:28 PM Changeset in webkit [222753] by Matt Lewis
  • 2 edits
    1 move
    2 adds
    1 delete in trunk/LayoutTests

Additional rebaselining of js/dom/global-constructors-attributes.html.

Unreviewed test gardening.

  • platform/mac-sierra-wk1/js/dom/global-constructors-attributes-expected.txt: Renamed from LayoutTests/platform/mac-sierra-wk2/js/dom/global-constructors-attributes-expected.txt.
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk2/js/dom/global-constructors-attributes-expected.txt: Removed.
3:21 PM Changeset in webkit [222752] by ggaren@apple.com
  • 2 edits in trunk/Source/WTF

NULL WeakPtr should not malloc!
https://bugs.webkit.org/show_bug.cgi?id=177773

Reviewed by Antti Koivisto.

Translating NULL into malloc is... inefficient.

  • wtf/WeakPtr.h:

(WTF::WeakPtr::WeakPtr):
(WTF::WeakPtr::operator=):
(WTF::WeakPtr::clear): Make m_ref lazy so that a NULL m_ref can represent
a NULL pointer. Normal dereference is no slower because we can rely on
the fact that dereference of NULL should crash. operator bool() and get()
incur an extra branch. That's probably worth it to avoid malloc
for NULL.

3:10 PM Changeset in webkit [222751] by fpizlo@apple.com
  • 7 edits in trunk/Tools

WSL should be *
https://bugs.webkit.org/show_bug.cgi?id=177705

Rubber stamped by Keith Miller.

When I first wrote the prototype, I thought it would be cool to use for pointers. Nobody agrees. I've
gotten so much feedback to use *. This changes pointers to use *.

  • WebGPUShadingLanguageRI/DereferenceExpression.js:

(DereferenceExpression.prototype.toString):
(DereferenceExpression):

  • WebGPUShadingLanguageRI/Intrinsics.js:

(Intrinsics):

  • WebGPUShadingLanguageRI/Parse.js:

(parseType):
(parsePossiblePrefix):

  • WebGPUShadingLanguageRI/PtrType.js:

(PtrType.prototype.toString):
(PtrType):

  • WebGPUShadingLanguageRI/StandardLibrary.js:
  • WebGPUShadingLanguageRI/Test.js:

(tests.simpleDereference):
(tests.dereferenceStore):
(tests.simpleMakePtr):
(tests.loadNull):
(tests.storeNull):
(tests.returnNull):
(tests.dereferenceDefaultNull):
(tests.defaultInitializedNull):
(tests.passNullToPtrMonomorphic):
(tests.passNullToPtrPolymorphic):
(tests.passNullAndNotNull):
(tests.passNullAndNotNullFullPoly):
(tests.passNullAndNotNullFullPolyReverse):
(tests.chainGeneric):
(tests.chainStruct):
(tests.chainStructNewlyValid):
(tests.chainStructDevice):
(tests.paramChainStructDevice):
(tests.simpleProtocolExtends):
(tests.protocolExtendsTwo):
(tests.overrideSubscriptStruct):
(tests.overrideSubscriptStructAndDoStores):
(tests.overrideSubscriptStructAndUsePointers):
(tests.overrideSubscriptStructAndUsePointersIncorrectly):
(tests.makeArrayRefFromPointer):
(tests.nonArrayRefArrayLengthFail):
(tests.constexprIsNotLValuePtr):
(tests.genericAccessors):
(tests.nestedSubscriptLValueEmulationSimple):
(tests.nestedSubscriptLValueEmulationGeneric):
(tests.shaderTypes):
(tests.enumPtrBase):
(tests.mutuallyRecursiveStructWithPointersBroken):
(tests.mutuallyRecursiveStructWithPointers):
(tests.linkedList):
(tests.pointerToPointer):
(tests.pointerGetter):
(tests.operatorCastWithTypeVariableInferredFromReturnType):
(tests.loneSetterPointer):
(tests.anderWithNothingWrong):
(tests.anderWithWrongNumberOfArguments):
(tests.anderDoesntReturnPointer):
(tests.anderDoesntTakeReference):
(tests.anderWithArrayRef):
(tests.pointerIndexGetter):
(tests.loneIndexSetterPointer):
(tests.indexAnderWithNothingWrong):
(tests.indexAnderWithWrongNumberOfArguments):
(tests.indexAnderDoesntReturnPointer):
(tests.indexAnderDoesntTakeReference):
(tests.indexAnderWithArrayRef):
(tests.devicePtrPtr):
(tests.threadgroupPtrPtr):
(tests.constantPtrPtr):
(tests.pointerIndexGetterInProtocol):
(tests.loneIndexSetterPointerInProtocol):
(tests.indexAnderWithNothingWrongInProtocol):
(tests.indexAnderWithWrongNumberOfArgumentsInProtocol):
(tests.indexAnderDoesntReturnPointerInProtocol):
(tests.indexAnderDoesntTakeReferenceInProtocol):
(tests.indexAnderWithArrayRefInProtocol):
(tests.andReturnedArrayRef):

3:01 PM Changeset in webkit [222750] by fpizlo@apple.com
  • 8 edits in trunk/Tools

WSL should be fine with &foo()[i] if foo() returns a []
https://bugs.webkit.org/show_bug.cgi?id=177704

Reviewed by Saam Barati.

Previously, we'd determine if a property access expression (base.field or base[index]) was an lvalue by
asking if its base was an lvalue. This is right in all cases except if the base is of type []. Then, the
property access expression is an lvalue so long as there is a setter or ander.

This fixes the issue and adds a test.

Also, this makes error messages in the case that something is not an lvalue a lot better. If something
is not an lvalue because we could not find anders or setters, then we will tell you why we could not
find them.

  • WebGPUShadingLanguageRI/Checker.js:

(Checker.prototype.visitAssignment):
(Checker.prototype.visitReadModifyWriteExpression):
(Checker.prototype.visitMakePtrExpression):
(Checker.prototype._finishVisitingPropertyAccess):

  • WebGPUShadingLanguageRI/DotExpression.js:

(DotExpression.prototype.get fieldName):
(DotExpression.prototype.get isLValue): Deleted.
(DotExpression.prototype.get addressSpace): Deleted.

  • WebGPUShadingLanguageRI/IndexExpression.js:

(IndexExpression.prototype.get index):
(IndexExpression.prototype.get isLValue): Deleted.
(IndexExpression.prototype.get addressSpace): Deleted.

  • WebGPUShadingLanguageRI/PropertyAccessExpression.js:

(PropertyAccessExpression):
(PropertyAccessExpression.prototype.get isLValue):
(PropertyAccessExpression.prototype.set isLValue):

  • WebGPUShadingLanguageRI/PropertyResolver.js:

(PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitMakeArrayRefExpression):
(PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
(PropertyResolver.prototype._visitRValuesWithinLValue):

  • WebGPUShadingLanguageRI/Test.js:

(tests.storeNullArrayRef):
(tests.andReturnedArrayRef):

3:00 PM Changeset in webkit [222749] by Adrian Perez de Castro
  • 2 edits in trunk/Source/WebKit

[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.

2:58 PM Changeset in webkit [222748] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

VMTraps shouldn't crash if it sees an exception it doesn't understand.
https://bugs.webkit.org/show_bug.cgi?id=177780

Reviewed by Mark Lam.

VMTraps could see a JIT breakpoint (SegV) for any number of
reasons it doesn't understand. e.g. a bug in JIT code, Wasm OOB,
etc. This patch makes it handle that case gracefully. It's worth
noting that this means there's no way to know if, due to a bug, we
didn't accurately track all the VMTraps we installed. I'm not sure
if there is a good solution to that problem though.

  • runtime/VMTraps.cpp:
2:46 PM Changeset in webkit [222747] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKitLegacy

[Win] Link error: cannot open file 'WebKitGUID.lib'
https://bugs.webkit.org/show_bug.cgi?id=177759

Reviewed by Alex Christensen.

For backward compatibility reasons, this library should not be renamed from
WebKitGUID.lib to WebKitLegacyGUID.lib.

  • PlatformWin.cmake:
2:44 PM Changeset in webkit [222746] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

PasteImage tests are failing on debug builds
https://bugs.webkit.org/show_bug.cgi?id=177778

Reviewed by Wenson Hsieh.

After r222702, PlatformPasteboard is no longer responsible for adding "Files" as a type"
as DataTransfer takes care of it now. Removed the code to do this from PlatformPasteboardIOS.mm
and PlatformPasteboardMac.mm so that we don't fail assertions in debug builds.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

2:42 PM Changeset in webkit [222745] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

No need to truncate text after calling InlineTextBox::text()
https://bugs.webkit.org/show_bug.cgi?id=177748

Reviewed by Zalan Bujtas.

Following r222670 it is no longer necessary to explicitly truncate the text run length
as InlineTextBox::text() returns a text run with respect to the truncation of the text box.

No functionality changed. So, no new tests.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

2:40 PM Changeset in webkit [222744] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Add missing exception check for the custom-get-set-inline-caching-one-level-up-proto-chain.js
test that I added. It uncovered a pre-existing missing exception check.

  • runtime/JSObject.cpp:

(JSC::JSObject::putInlineSlow):

2:31 PM Changeset in webkit [222743] by Wenson Hsieh
  • 2 edits in trunk/Tools

Guard iOS webkitGetAsEntry API tests on older iOS versions

Unreviewed test gardening. After r222688, these tests require custom pasteboard data to be enabled by default,
so don't run them against shipping iOS.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2:31 PM Changeset in webkit [222742] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Ensure popovers are not malformed on window resize.
https://bugs.webkit.org/show_bug.cgi?id=177771

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

  • UserInterface/Views/Popover.js:

Ensure stale arrow-* CSS classes are removed on update, even if our content didn't change.

2:31 PM Changeset in webkit [222741] by Antti Koivisto
  • 4 edits in trunk/Source

Add makeWeakPtr variant that takes pointer
https://bugs.webkit.org/show_bug.cgi?id=177767

Reviewed by Zalan Bujtas.

Source/WebCore:

Use it.

  • rendering/SelectionRangeData.h:

(WebCore::SelectionRangeData::Context::Context):

Source/WTF:

  • wtf/WeakPtr.h:

(WTF::makeWeakPtr):

This version deals with the nullptr.

2:15 PM WebKitGTK/2.18.x edited by Adrian Perez de Castro
(diff)
2:06 PM Changeset in webkit [222740] by Antti Koivisto
  • 6 edits in trunk/Source/WebCore

Make RenderPtr a type alias of std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=177739

Reviewed by Sam Weinig.

It just needs a custom deleter.

  • page/FrameView.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::insertChildInternal):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):
(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):

  • rendering/RenderObject.cpp:

(WebCore::RenderObjectDeleter::operator() const):
(WebCore::RenderObject::willBeDestroyed):

  • rendering/RenderPtr.h:

(WebCore::createRenderer):
(WebCore::static_pointer_cast):

Make this safer with downcast.

(WebCore::RenderPtr::RenderPtr): Deleted.
(WebCore::RenderPtr::~RenderPtr): Deleted.
(WebCore::RenderPtr::get const): Deleted.
(WebCore::RenderPtr::operator* const): Deleted.
(WebCore::RenderPtr::operator-> const): Deleted.
(WebCore::RenderPtr::operator! const): Deleted.
(WebCore::RenderPtr::operator UnspecifiedBoolType const): Deleted.
(WebCore::RenderPtr::operator=): Deleted.
(WebCore::RenderPtr::swap): Deleted.
(WebCore::RenderPtr::operator==): Deleted.
(WebCore::RenderPtr::operator!=): Deleted.
(WebCore::RenderPtr<T>::clear): Deleted.
(WebCore::RenderPtr<T>::leakPtr): Deleted.
(WebCore::RenderPtr<T>::RenderPtr): Deleted.
(WebCore::=): Deleted.
(WebCore::swap): Deleted.
(WebCore::operator==): Deleted.
(WebCore::operator!=): Deleted.
(WebCore::getPtr): Deleted.
(WTF::HashTraits<WebCore::RenderPtr<T>>::emptyValue): Deleted.
(WTF::HashTraits<WebCore::RenderPtr<T>>::peek): Deleted.

We already have hash traits for std::unique_ptr.

1:24 PM Changeset in webkit [222739] by Joseph Pecoraro
  • 40 edits
    7 adds in trunk

Web Inspector: Include Beacon and Ping requests in Network tab
https://bugs.webkit.org/show_bug.cgi?id=177641
<rdar://problem/33086839>

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • inspector/protocol/Page.json:

Include new "Beacon" and "Ping" resource types.

Source/WebCore:

Tests: http/tests/inspector/network/beacon-type.html

http/tests/inspector/network/ping-type.html

  • Modules/beacon/NavigatorBeacon.cpp:

(WebCore::NavigatorBeacon::sendBeacon):
Fix a typo.

  • loader/PingLoader.cpp:

(WebCore::PingLoader::startPingLoad):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):
Include InspectorInstrumentation hooks for ping network loads.

  • loader/LoaderStrategy.h:
  • platform/network/PingHandle.h:

Include an optional ResourceResponse in the ping load completion callback.
If available this will be enough for Web Inspector to include details such
as the response statusCode.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willSendRequestOfTypeImpl):
(WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willSendRequestOfType):
(WebCore::InspectorInstrumentation::continueAfterPingLoader): Deleted.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::resourceTypeForCachedResource):
(WebCore::resourceTypeForLoadType):
(WebCore::InspectorNetworkAgent::willSendRequest):
(WebCore::InspectorNetworkAgent::willSendRequestOfType):

  • inspector/InspectorNetworkAgent.h:

Make a general willSendRequestOfType hook when sending a request that does
not go through normal CachedResource loading. The Ping and Beacon requests
go through this process, we may also use this path for Preflight requests.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::resourceTypeJson):
(WebCore::InspectorPageAgent::cachedResourceType):

  • inspector/InspectorPageAgent.h:

Small refactoring.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New strings for Beacon/Ping.

  • UserInterface/Images/Beacon.svg: Added.
  • UserInterface/Views/ResourceIcons.css:

(.resource-icon.resource-type-ping .icon,):
(body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,):
(body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,):
New icon for Beacon/Ping. They share an icon since they are similiar in concept:
a request that is sent and the page doesn't expect a response.

  • UserInterface/Controllers/FrameResourceManager.js:

(WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
When a sub-resource and a main-resource have the same URL we were not
distinguishing them. Use the resource type to distinguish them better.

  • UserInterface/Models/SourceCode.js:

(WI.SourceCode.prototype._processContent):
Safer handling if the body was base64 encoded but an empty string.

  • UserInterface/Models/Resource.js:

(WI.Resource.displayNameForType):

  • UserInterface/Models/ResourceCollection.js:

(WI.ResourceCollection.verifierForType):

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView.shortDisplayNameForResourceType):

  • UserInterface/Views/ResourceClusterContentView.js:

(WI.ResourceClusterContentView.prototype.get responseContentView):
New resource types.

  • UserInterface/Views/ResourceContentView.js:

(WI.ResourceContentView.prototype.showMessage):

  • UserInterface/Views/TextResourceContentView.js:

(WI.TextResourceContentView.prototype._contentDidPopulate):
Nicer display for empty content, which may be common for these requests.

Source/WebKit:

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::didFinishPingLoad):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::didFinish):
(WebKit::PingLoad::didReceiveResponseNetworkSession):

  • NetworkProcess/PingLoad.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:

(WebKit::NetworkProcessConnection::didFinishPingLoad):

  • WebProcess/Network/NetworkProcessConnection.h:
  • WebProcess/Network/NetworkProcessConnection.messages.in:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::networkProcessCrashed):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::didFinishPingLoad):

  • WebProcess/Network/WebLoaderStrategy.h:

Pass an optional ResourceResponse back to the ping completion handler.

LayoutTests:

  • http/tests/inspector/network/beacon-type-expected.txt: Added.
  • http/tests/inspector/network/beacon-type.html: Added.
  • http/tests/inspector/network/ping-type-expected.txt: Added.
  • http/tests/inspector/network/ping-type.html: Added.
  • http/tests/inspector/network/resources/beacon.php: Added.
  • http/tests/inspector/network/resources/ping.php: Added.

Test for Beacon and Ping resource loads.

  • platform/mac-wk1/TestExpectations:
  • platform/mac-wk2/TestExpectations:
  • platform/win/TestExpectations:

Skip beacon tests where beacon is not supported.

1:06 PM Changeset in webkit [222738] by Alan Bujtas
  • 5 edits in trunk/Source/WebCore

SelectionRangeData should not hold raw RenderObject pointers
https://bugs.webkit.org/show_bug.cgi?id=177677
<rdar://problem/34763060>

Reviewed by Sam Weinig.

SelectionRangeData::Context start and end renderers' lifetime is not strictly tied
to the lifetime of SelectionRangeData.

Covered by existing tests.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::updateAppearance):

  • platform/DragImage.cpp:

(WebCore::createDragImageForRange):

  • rendering/SelectionRangeData.cpp:

(WebCore::isValidRendererForSelection):
(WebCore::collect):
(WebCore::SelectionRangeData::set):
(WebCore::SelectionRangeData::clear):
(WebCore::SelectionRangeData::repaint const):
(WebCore::SelectionRangeData::collectBounds const):
(WebCore::SelectionRangeData::apply):

  • rendering/SelectionRangeData.h:

(WebCore::SelectionRangeData::Context::Context):
(WebCore::SelectionRangeData::Context::start const):
(WebCore::SelectionRangeData::Context::end const):
(WebCore::SelectionRangeData::Context::startPosition const):
(WebCore::SelectionRangeData::Context::endPosition const):
(WebCore::SelectionRangeData::Context::operator== const):
(WebCore::SelectionRangeData::start const):
(WebCore::SelectionRangeData::end const):
(WebCore::SelectionRangeData::startPosition const):
(WebCore::SelectionRangeData::endPosition const):

1:04 PM October 2017 Meeting edited by rniwa@webkit.org
Add clipboard API as a topic for 2017 contributor's meeting (diff)
1:00 PM Changeset in webkit [222737] by commit-queue@webkit.org
  • 4 edits in trunk

[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:
12:49 PM Changeset in webkit [222736] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION: API tests WebKit.ProcessDidTerminateRequestedByClient and WebKit.ProcessDidTerminateWithReasonCrash are timing out
https://bugs.webkit.org/show_bug.cgi?id=177764

Reviewed by Chris Dumez.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):
I shouldn't have reverted the A API telling the listener to continue if there's no client function.

12:48 PM Changeset in webkit [222735] by Carlos Garcia Campos
  • 4 edits in trunk

[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):

12:40 PM Changeset in webkit [222734] by jiewen_tan@apple.com
  • 3 edits in trunk/LayoutTests

Mark imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.html as slow
https://bugs.webkit.org/show_bug.cgi?id=177615

Unreviewed test gardening.

12:34 PM Changeset in webkit [222733] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Addressing post-review comments after r222621
https://bugs.webkit.org/show_bug.cgi?id=177610

Reviewed by Darin Adler.

  • rendering/RenderMenuList.cpp:

(RenderMenuList::didUpdateActiveOption):

12:23 PM Changeset in webkit [222732] by dbates@webkit.org
  • 5 edits in trunk/Source/WebCore

Remove length argument from TextPainter::paint()
https://bugs.webkit.org/show_bug.cgi?id=177758

Reviewed by Alex Christensen.

Have TextPainter.paint() use the length of the specified TextRun as opposed to
taking an explicit argument for the length of the TextRun.

Following r222670 InlineTextBox creates a TextRun with respect to the truncated
line. Prior to r222670 InlineTextBox did not do this and hence it had to pass both
the TextRun and truncated length to TextPainter.paint() to have the line painted.
Code that needs to paint a substring of a TextRun can still do so by using TextPainter.paintRange().

No functionality changed. So, no new tests.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paint):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paint):

  • rendering/TextPainter.h:
12:20 PM Changeset in webkit [222731] by Yusuke Suzuki
  • 2 edits in trunk/Source/bmalloc

[Linux] Enable Gigacage in x64 Linux environment
https://bugs.webkit.org/show_bug.cgi?id=177745

Reviewed by Carlos Garcia Campos.

This patch enables Gigacage in x64 Linux environment.
Gigacage enforces a caged pointer to reference to the
specific memory region. This reduces the effectiveness
of some types of attacks setting a pointer to ArrayBuffer
and modifying arbitrary memory region.

  • bmalloc/Gigacage.h:
12:04 PM Changeset in webkit [222730] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[curl] Crashes in CurlRequest::setupPUT()
https://bugs.webkit.org/show_bug.cgi?id=177733

Patch by Fujii Hironori <Fujii Hironori> on 2017-10-02
Reviewed by Alex Christensen.

Tests: http/tests/xmlhttprequest/xmlhttprequest-open-method-allowed.html

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupPUT): Null-check the result of request.httpBody().

12:02 PM Changeset in webkit [222729] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

[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:
12:00 PM Changeset in webkit [222728] by commit-queue@webkit.org
  • 10 edits in trunk/Source/WebCore

[CURL] Should handle redirects in WebCore
https://bugs.webkit.org/show_bug.cgi?id=21242

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-10-02
Reviewed by Alex Christensen.

  • platform/network/ResourceHandle.cpp:
  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::enableAutoReferer): Deleted.

  • platform/network/curl/CurlContext.h:
  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didReceiveData):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::continueDidReceiveResponse):
(WebCore::ResourceHandle::continueWillSendRequest):

  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::shouldRedirectAsGET):
(WebCore::ResourceHandleCurlDelegate::willSendRequest):
(WebCore::ResourceHandleCurlDelegate::continueWillSendRequest):
(WebCore::ResourceHandleCurlDelegate::continueAfterWillSendRequest):

  • platform/network/curl/ResourceHandleCurlDelegate.h:
  • platform/network/curl/ResourceResponse.h:
  • platform/network/curl/ResourceResponseCurl.cpp:

(WebCore::ResourceResponse::shouldRedirect):
(WebCore::ResourceResponse::isMovedPermanently const):
(WebCore::ResourceResponse::isFound const):
(WebCore::ResourceResponse::isSeeOther const):
(WebCore::ResourceResponse::isRedirection const): Deleted.

11:58 AM Changeset in webkit [222727] by commit-queue@webkit.org
  • 2 edits in trunk

[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
11:29 AM Changeset in webkit [222726] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Crashes with guard malloc under RenderFullScreen::unwrapRenderer
https://bugs.webkit.org/show_bug.cgi?id=177760

Unreviewed.

  • rendering/RenderFullScreen.cpp:

(WebCore::RenderFullScreen::unwrapRenderer):

The assert accesses 'this' after it has been deleted. It is not very valuable so remove the assert.

11:17 AM Changeset in webkit [222725] by zandobersek@gmail.com
  • 3 edits in trunk/Source/WebCore

GraphicsContext: remove unused ENABLE(3D_TRANSFORMS) && USE(TEXTURE_MAPPER)
https://bugs.webkit.org/show_bug.cgi?id=177757

Reviewed by Michael Catanzaro.

Remove three methods from the GraphicsContext class that were conditioned
with the ENABLE(3D_TRANSFORMS) and USE(TEXTURE_MAPPER) guards. These aren't
used anywhere at this point, but apparently used to be in the TextureMapper
implementation.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/cairo/GraphicsContextCairo.cpp:

(WebCore::GraphicsContext::get3DTransform const): Deleted.
(WebCore::GraphicsContext::concat3DTransform): Deleted.
(WebCore::GraphicsContext::set3DTransform): Deleted.

11:15 AM Changeset in webkit [222724] by Caio Lima
  • 4 edits in trunk

ChakraCore/test/Function/apply3.js is resulting wrong result in x86_64
https://bugs.webkit.org/show_bug.cgi?id=175642

Reviewed by Darin Adler.

JSTests:

  • ChakraCore/test/Function/apply3.baseline-jsc:

Source/JavaScriptCore:

According JS spec, the ToLength operation[1] has a range of 0..(253)

  • 1. In Interpreter.cpp::sizeFrameForVarargs, the call to

sizeOfVarargs() was being assigned to "unsigned length", forcing a
type cast that results in different value among architectures JSC supports.
For instance, in x86_64 "4294967295 + 1" results in 0, while in ARMv6 it
results 4294967295. This patch is changing "sizeOfVarargs" to clamp the
result from "toLength" to unsigned and then get desired behavior for
all supported platforms.

[1] - https://tc39.github.io/ecma262/#sec-tolength

  • interpreter/Interpreter.cpp:

(JSC::sizeOfVarargs):

  • interpreter/Interpreter.h:
11:08 AM Changeset in webkit [222723] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk/Source/WebCore

[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.

11:04 AM Changeset in webkit [222722] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Rebaseline of js/dom/global-constructors-attributes-dedicated-worker.html after r222692.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
10:59 AM Changeset in webkit [222721] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Fix build with MathML disabled
https://bugs.webkit.org/show_bug.cgi?id=177744

Patch by Olivier Blin <Olivier Blin> on 2017-10-02
Reviewed by Michael Catanzaro.

These are regressions from r217549 (StyleResolver) and r221379 (RenderBlockFlow), which do not guard MathML usage.

  • css/StyleResolver.cpp:

(WebCore::hasEffectiveDisplayNoneForDisplayContents):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willCreateColumns const):

10:58 AM Changeset in webkit [222720] by zandobersek@gmail.com
  • 2 edits in trunk/LayoutTests

Unreviewed WPE gardening.

  • platform/wpe/TestExpectations: Unskip some more tests, and add

failure expectations for whatever is still failing from that subset.

10:52 AM Changeset in webkit [222719] by Yusuke Suzuki
  • 3 edits in trunk/Source/WebCore

Use ThreadIdentifier instead of thread::this_thread::get_id
https://bugs.webkit.org/show_bug.cgi?id=177729

Reviewed by Sam Weinig.

We can use WTF::ThreadIdentifier instead of thread::this_thread::get_id
to make use of ThreadIdentifier consistent in WebKit. In the other places,
we use ThreadIdentifier for this debugging purpose. And this is the only
place using thread::this_thread::get_id for the exact same purpose.
Furthermore, thread::this_thread::get_id in Windows platform. So we prefer
using ThreadIdentifier than thread::this_thread::get_id.

  • Modules/webdatabase/DatabaseDetails.h:

(WebCore::DatabaseDetails::DatabaseDetails):
(WebCore::DatabaseDetails::threadID const):

  • Modules/webdatabase/DatabaseManager.cpp:

(WebCore::DatabaseManager::detailsForNameAndOrigin):

10:35 AM Changeset in webkit [222718] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix build after r222715
https://bugs.webkit.org/show_bug.cgi?id=177697

  • TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:

(TEST):
Use the public API instead of the removed SPI.

10:26 AM Changeset in webkit [222717] by Jon Davis
  • 1 edit
    1 add in trunk/Websites/webkit.org

Add a WebKit Build Archives page
https://bugs.webkit.org/show_bug.cgi?id=177654

Reviewed by Alexey Proskuryakov.

  • wp-content/themes/webkit/build-archives.php: Added.
10:22 AM Changeset in webkit [222716] by Matt Lewis
  • 4 edits in trunk/LayoutTests

Rebaseline of js/dom/global-constructors-attributes.html after r222692.

Unreviewed test gardening.

  • platform/mac-elcapitan-wk2/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-sierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
10:13 AM Changeset in webkit [222715] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Expose more WKPreferences SPI to match C SPI
https://bugs.webkit.org/show_bug.cgi?id=177697

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _javaEnabledForLocalFiles]):
(-[WKPreferences _setPlugInsEnabled:]): Deleted.
(-[WKPreferences _plugInsEnabled]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

_javaEnabledForLocalFiles should return the correct value.
_plugInsEnabled has public API. This SPI is not needed.

10:09 AM Changeset in webkit [222714] by achristensen@apple.com
  • 15 edits
    1 add in trunk

REGRESSION(r214201): WebProcess hangs during policy decisions
https://bugs.webkit.org/show_bug.cgi?id=177590
<rdar://problem/33362929>

Reviewed by Andy Estes.

Source/WebKit:

This is like r222431 but for trunk instead of a branch.
It includes the same regression API test so I don't make the same mistake again.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageNavigationClient):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::receivedPolicyDecision):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForResponseSync):

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

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::applyToDocumentLoader):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
  • WebProcess/WebPage/WebDocumentLoader.cpp:

(WebKit::WebDocumentLoader::setNavigationID):

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::setUpPolicyListener):
(WebKit::WebFrame::invalidatePolicyListener):
(WebKit::WebFrame::didReceivePolicyDecision):

  • WebProcess/WebPage/WebFrame.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didReceivePolicyDecision):

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

Tools:

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

(-[JSNavigationDelegate webView:didFinishNavigation:]):
(-[JSNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[JSNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[JSNavigationDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

10:09 AM Changeset in webkit [222713] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed. Fix debug assertion after r222671.

JSTestCustomGetterSetter::finishCreation needs to call its base's finishCreation implementation.

  • jsc.cpp:

(JSTestCustomGetterSetter::finishCreation):

9:54 AM Changeset in webkit [222712] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Remove unnecessary copy of SessionID in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=177702

Reviewed by Darin Adler.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::sessionID const):
(WebKit::WebPageProxy::creationParameters):

  • UIProcess/WebPageProxy.h:

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

9:50 AM Changeset in webkit [222711] by achristensen@apple.com
  • 3 edits in trunk/Source/WebKit

Expose more WKPreferences SPI to match C SPI
https://bugs.webkit.org/show_bug.cgi?id=177697
<rdar://problem/24110556>

Reviewed by Darin Adler.

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setJavaEnabledForLocalFiles:]):
(-[WKPreferences _javaEnabledForLocalFiles]):
(-[WKPreferences _setCanvasUsesAcceleratedDrawing:]):
(-[WKPreferences _canvasUsesAcceleratedDrawing]):
(-[WKPreferences _setAcceleratedCompositingEnabled:]):
(-[WKPreferences _acceleratedCompositingEnabled]):
(-[WKPreferences _setDefaultTextEncodingName:]):
(-[WKPreferences _defaultTextEncodingName]):
(-[WKPreferences _setNeedsSiteSpecificQuirks:]):
(-[WKPreferences _needsSiteSpecificQuirks]):
(-[WKPreferences _setAuthorAndUserStylesEnabled:]):
(-[WKPreferences _authorAndUserStylesEnabled]):
(-[WKPreferences _setDOMTimersThrottlingEnabled:]):
(-[WKPreferences _domTimersThrottlingEnabled]):
(-[WKPreferences _setWebArchiveDebugModeEnabled:]):
(-[WKPreferences _webArchiveDebugModeEnabled]):
(-[WKPreferences _setLocalFileContentSniffingEnabled:]):
(-[WKPreferences _localFileContentSniffingEnabled]):
(-[WKPreferences _setUsesPageCache:]):
(-[WKPreferences _usesPageCache]):
(-[WKPreferences _setPageCacheSupportsPlugins:]):
(-[WKPreferences _pageCacheSupportsPlugins]):
(-[WKPreferences _setShouldPrintBackgrounds:]):
(-[WKPreferences _shouldPrintBackgrounds]):
(-[WKPreferences _setWebSecurityEnabled:]):
(-[WKPreferences _webSecurityEnabled]):
(-[WKPreferences _setUniversalAccessFromFileURLsAllowed:]):
(-[WKPreferences _universalAccessFromFileURLsAllowed]):
(-[WKPreferences _setAVFoundationEnabled:]):
(-[WKPreferences _avFoundationEnabled]):
(-[WKPreferences _setSuppressesIncrementalRendering:]):
(-[WKPreferences _suppressesIncrementalRendering]):
(-[WKPreferences _setAsynchronousPluginInitializationEnabled:]):
(-[WKPreferences _asynchronousPluginInitializationEnabled]):
(-[WKPreferences _setArtificialPluginInitializationDelayEnabled:]):
(-[WKPreferences _artificialPluginInitializationDelayEnabled]):
(-[WKPreferences _setCookieEnabled:]):
(-[WKPreferences _cookieEnabled]):
(-[WKPreferences _setPlugInSnapshottingEnabled:]):
(-[WKPreferences _plugInSnapshottingEnabled]):
(-[WKPreferences _setQTKitEnabled:]):
(-[WKPreferences _qtKitEnabled]):
(-[WKPreferences _setSubpixelCSSOMElementMetricsEnabled:]):
(-[WKPreferences _subpixelCSSOMElementMetricsEnabled]):
(-[WKPreferences _setMediaSourceEnabled:]):
(-[WKPreferences _mediaSourceEnabled]):
(-[WKPreferences _setViewGestureDebuggingEnabled:]):
(-[WKPreferences _viewGestureDebuggingEnabled]):
(-[WKPreferences _setCSSAnimationTriggersEnabled:]):
(-[WKPreferences _cssAnimationTriggersEnabled]):
(-[WKPreferences _setStandardFontFamily:]):
(-[WKPreferences _standardFontFamily]):
(-[WKPreferences _setNotificationsEnabled:]):
(-[WKPreferences _notificationsEnabled]):
(-[WKPreferences _setBackspaceKeyNavigationEnabled:]):
(-[WKPreferences _backspaceKeyNavigationEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
9:00 AM Changeset in webkit [222710] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Fix memory leaks in RenderMultiColumnFlow
https://bugs.webkit.org/show_bug.cgi?id=177735

Reviewed by Zalan Bujtas.

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):

Switch from destroy() to removeFromParentAndDestroy() (they are currently equivalent in practice).

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):

Destroy the placeholders instead of leaking them.

(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):

Destroy the placeholder instead of leaking it.

7:59 AM Changeset in webkit [222709] by Jonathan Bedard
  • 2 edits
    1 add in trunk/Tools

Log stack-trace for run-webkit-tests when interrupted
https://bugs.webkit.org/show_bug.cgi?id=176393
<rdar://problem/34262310>

Reviewed by Darin Adler.

When run-webkit-tests is stuck, it is difficult to immediately tell
why. Saving a stack-trace when run-webkit-tests is terminated
or stopped with CNTRL-C will make such issues easier to debug.

  • Scripts/webkitpy/common/interupt_debugging.py: Added.

(log_stack_trace): Given a Python frame object, log a stack trace to
the provided file.
(log_stack_trace_on_term): Attach a listener to SIGTERM so that a
stack-trace can be logged when a program is terminated.
(log_stack_trace_on_cntrl_c): Attach a listener to SIGINT so that a
stack-trace can be logged when a program is CNTRL-Ced.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(main): Set handlers to log stack trace on interruption.

7:32 AM Changeset in webkit [222708] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

[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:
6:17 AM Changeset in webkit [222707] by cturner@igalia.com
  • 2 edits in trunk/Source/WebCore

Try to play AVC codec even if H.264 decoder only advertises byte-stream profile.
https://bugs.webkit.org/show_bug.cgi?id=177550

GStreamer's element factory filters will claim they can't play videos with AVC
codec strings, but the elements really are capable of playing them when filters
like videoconvert are inserted by playbin. Videos of this variety are in the YouTube
2018 EME conformance tests.

Also replace std::array with a stack array, this saves having to count
the number of elements (the compiler does that now) and reduces braces.

Reviewed by Carlos Alberto Lopez Perez.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::codecSet):

5:55 AM Changeset in webkit [222706] by tpopela@redhat.com
  • 4 edits in trunk/Source/WebCore

[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.

5:17 AM Changeset in webkit [222705] by jdiggs@igalia.com
  • 2 edits in trunk/Source/WebCore

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):

5:05 AM Changeset in webkit [222704] by Michael Catanzaro
  • 15 edits in trunk

Remove ENABLE_CSS_REGIONS
https://bugs.webkit.org/show_bug.cgi?id=177689

Reviewed by Darin Adler.

.:

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsMac.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWin.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmake/tools/vsprops/FeatureDefines.props:
  • Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/WebKit:

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

(webkit_dom_element_get_webkit_region_overset):

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.h:
  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.cpp:

(webkit_dom_element_get_webkit_region_overset): Deleted.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMElement.h:

Tools:

  • Scripts/webkitperl/FeatureList.pm:
2:09 AM Changeset in webkit [222703] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebDriver

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:55 AM Changeset in webkit [222702] by rniwa@webkit.org
  • 8 edits in trunk/Source/WebCore

Pasteboard shouldn't add "Files" as a type
https://bugs.webkit.org/show_bug.cgi?id=177731

Reviewed by Wenson Hsieh.

Removed the platform specific code to add "Files" when there is a file present in platform's pasteboard.
DataTransfer::types now adds "Files" automatically when Pasteboard::containsFiles returns true.

No new tests since there should be no behavioral change.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::types const):

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::typesForLegacyUnsafeBindings):

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType):

  • platform/win/PasteboardWin.cpp:

(WebCore::addMimeTypesForFormat): Removed the code to add "Text" and "URL" as separate types since
this is not what the rest of ports do, and this type normalization is now taken care of by DataTransfer
since r221063.

1:25 AM Changeset in webkit [222701] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Another attempt to fix Windows build after r222697.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::updateAppearance):

  • platform/DragImage.cpp:

(WebCore::createDragImageForRange):

  • rendering/SelectionRangeData.cpp:

(WebCore::SelectionRangeData::clear):

  • rendering/SelectionRangeData.h:

(WebCore::SelectionRangeData::Context::Context):

12:26 AM Changeset in webkit [222700] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Windows build fix attempt after r222697.

  • platform/DragImage.cpp:

(WebCore::createDragImageForRange):

12:03 AM Changeset in webkit [222699] by rniwa@webkit.org
  • 10 edits in trunk/Source/WebCore

Merge readFilenames() and read(PasteboardFileReader)
https://bugs.webkit.org/show_bug.cgi?id=177728
<rdar://problem/34761725>

Reviewed by Sam Weinig.

Generalized PasteboardFileReader to return multiple files instead of just one file, and replaced the use
of Pasteboard::readFilenames() with it. Because eliminates the need for finding the list of types to read
as files in addition to file names, this patch also removes Pasteboard::typesTreatedAsFiles().

Note that Pasteboard::readFilenames() continues to exist in macOS and iOS as it's internally used by
Pasteboard::read(PasteboardFileReader) in PasteboardCocoa.mm.

No new tests since there should be no behavioral change.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::files const): Now makes a single call to Pasteboard::read(PasteboardFileReader)
instead of reading filenames and then falling back to it. Also got rid of if-def for drag drop checks
since forDrag() and forFileDrag() are always defined since r222688.
(WebCore::PasteboardFileTypeReader): Added. Gets the list of all file types.
(WebCore::PasteboardFileTypeReader::readFilename): Added. Gets the list of all file types.
(WebCore::PasteboardFileTypeReader::readBuffer): Added. Gets the list of all file types.
(WebCore::DataTransfer::hasFileOfType): Reimplemented using PasteboardFileTypeReader.

  • editing/WebCorePasteboardFileReader.cpp:

(WebCore::WebCorePasteboardFileReader::readFilename): Added.
(WebCore::WebCorePasteboardFileReader::readBuffer): Renamed from read.

  • editing/WebCorePasteboardFileReader.h:
  • platform/Pasteboard.h:

(WebCore::PasteboardFileReader): Removed the constructor since we no longer specify a specific type to
read off of pasteboard, and renamed the existing read function to readBuffer, and added a new variant
which takes a filename.

  • platform/StaticPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::imageTypeToFakeFilename): Return "image/png" for ImageType::TIFF (to do TIFF-to-PNG conversion;
see r222656 for why this is needed) now that this function is used to convert directly from image type
converted from cocoa type instead of the one reverse-converted from MIME type.
(WebCore::mimeTypeToImageType): Deleted.
(WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
(WebCore::Pasteboard::typesForLegacyUnsafeBindings): Use newly added readTypesWithSecurityCheck.
(WebCore::convertTIFFToPNG): Extracted out of read(PasteboardFileReader).
(WebCore::Pasteboard::read): Generalized to add filenames as well as image buffers as files. Because now
we're concerting Cocoa types to ImageType, we no longer have to detect when TIFF-as-PNG conversion is
happening here. We just treat ImageType::TIFF as PNG and do the conversion.
(WebCore::Pasteboard::readStringInCustomData): Use newly added readBufferForTypeWithSecurityCheck.
(WebCore::Pasteboard::readTypesWithSecurityCheck): Added.
(WebCore::Pasteboard::readBufferForTypeWithSecurityCheck): Added.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::read): Implemented.
(WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
(WebCore::Pasteboard::containsFiles): Implemented without calling readFilenames, which has been deleted.
(WebCore::Pasteboard::readFilenames): Deleted.

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
(WebCore::PasteboardFileCounter): Added. Used to counts the number of files in the pasteboard.
(WebCore::PasteboardFileCounter::readFilename):
(WebCore::PasteboardFileCounter::readBuffer):
(WebCore::Pasteboard::containsFiles):
(WebCore::Pasteboard::read): Moved the code to extract filenames out of readFilenames.
(WebCore::Pasteboard::readFilenames): Deleted.

  • platform/wpe/PasteboardWPE.cpp:

(WebCore::Pasteboard::typesTreatedAsFiles): Deleted.
(WebCore::Pasteboard::readFilenames): Deleted.

Oct 1, 2017:

11:02 PM Changeset in webkit [222698] by commit-queue@webkit.org
  • 10 edits
    1 add in trunk/Source/WebCore

[Settings] Move remaining simple settings to Settings.in
https://bugs.webkit.org/show_bug.cgi?id=177730

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

  • Adds new option type for Settings.in, 'getter', which allows you to specify a custom name for the setting's getter. For instance, the setting javaEnabled has a custom getter name, 'isJavaEnabled'.
  • Adds support for WTF::Seconds as a type of setting. Used by only timeWithoutMouseMovementBeforeHidingControls at the moment.
  • Moves non-generated settings from Settings.h/cpp that don't require custom action when set, to Settings.in
  • Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
  • Scripts/GenerateSettings/Settings.py:

Add support for 'getter' and the Seconds type.

  • WebCore.xcodeproj/project.pbxproj:
  • platform/text/FontRenderingMode.h: Copied from Source/WebCore/platform/text/TextFlags.h.
  • platform/text/TextFlags.h:

Add FontRenderingMode.h. Moved out of TextFlags.h to be accessible by
the settings generator.

  • page/Settings.cpp:

(WebCore::Settings::Settings):
(WebCore::Settings::setJavaEnabled): Deleted.
(WebCore::Settings::setJavaEnabledForLocalFiles): Deleted.
(WebCore::Settings::setPreferMIMETypeForImages): Deleted.
(WebCore::Settings::setForcePendingWebGLPolicy): Deleted.
(WebCore::Settings::setNeedsAdobeFrameReloadingQuirk): Deleted.
(WebCore::Settings::setFontRenderingMode): Deleted.
(WebCore::Settings::fontRenderingMode const): Deleted.
(WebCore::Settings::setShowTiledScrollingIndicator): Deleted.
(WebCore::Settings::setFontFallbackPrefersPictographs): Deleted.
(WebCore::Settings::setWebFontsAlwaysFallBack): Deleted.

  • page/Settings.h:

(WebCore::Settings::isJavaEnabled const): Deleted.
(WebCore::Settings::isJavaEnabledForLocalFiles const): Deleted.
(WebCore::Settings::preferMIMETypeForImages const): Deleted.
(WebCore::Settings::needsAcrobatFrameReloadingQuirk const): Deleted.
(WebCore::Settings::showTiledScrollingIndicator const): Deleted.
(WebCore::Settings::setTouchEventEmulationEnabled): Deleted.
(WebCore::Settings::isTouchEventEmulationEnabled const): Deleted.
(WebCore::Settings::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
(WebCore::Settings::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
(WebCore::Settings::fontFallbackPrefersPictographs const): Deleted.
(WebCore::Settings::webFontsAlwaysFallBack const): Deleted.
(WebCore::Settings::setMediaKeysStorageDirectory): Deleted.
(WebCore::Settings::mediaKeysStorageDirectory const): Deleted.
(WebCore::Settings::setMediaDeviceIdentifierStorageDirectory): Deleted.
(WebCore::Settings::mediaDeviceIdentifierStorageDirectory const): Deleted.
(WebCore::Settings::applePayEnabled const): Deleted.
(WebCore::Settings::setApplePayEnabled): Deleted.
(WebCore::Settings::applePayCapabilityDisclosureAllowed const): Deleted.
(WebCore::Settings::setApplePayCapabilityDisclosureAllowed): Deleted.
(WebCore::Settings::isForcePendingWebGLPolicy const): Deleted.

  • page/Settings.in:

Moved hand-written settings to be Settings.in based.

9:46 PM Changeset in webkit [222697] by Alan Bujtas
  • 16 edits
    2 adds
    2 deletes in trunk/Source/WebCore

RenderView does not need to be a SelectionSubtreeRoot
https://bugs.webkit.org/show_bug.cgi?id=177713

Reviewed by Darin Adler and Antti Koivisto.

  1. SelectionSubtreeRoot -> SelectionRangeData
  2. Move all selection logic from RenderView to SelectionRangeData
  3. class RenderView : public SelectionSubtreeRoot -> SelectionRangeData m_selection;
  4. Remove redundant code
  5. General modernization

No change in functionality.

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::setNeedsSelectionUpdate):
(WebCore::DragCaretController::nodeWillBeRemoved):
(WebCore::FrameSelection::respondToNodeModification):
(WebCore::FrameSelection::prepareForDestruction):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::updateAppearance):
(WebCore::FrameSelection::selectionBounds const):

  • page/FrameView.cpp:

(WebCore::FrameView::paintContentsForSnapshot):

  • platform/DragImage.cpp:

(WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
(WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
(WebCore::createDragImageForRange):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::selectionStartEnd const):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::isSelectionRoot const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::isSelectionBorder const):

  • rendering/RenderObject.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::isSelected const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionRectsForLineBoxes):

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::setSelectionState):

  • rendering/RenderView.cpp:

(WebCore::RenderView::RenderView):
(WebCore::SelectionIterator::SelectionIterator): Deleted.
(WebCore::SelectionIterator::current const): Deleted.
(WebCore::SelectionIterator::next): Deleted.
(WebCore::SelectionIterator::checkForSpanner): Deleted.
(WebCore::rendererAfterPosition): Deleted.
(WebCore::RenderView::selectionBounds const): Deleted.
(WebCore::RenderView::subtreeSelectionBounds const): Deleted.
(WebCore::RenderView::repaintSelection const): Deleted.
(WebCore::RenderView::repaintSubtreeSelection const): Deleted.
(WebCore::RenderView::setSelection): Deleted.
(WebCore::isValidObjectForNewSelection): Deleted.
(WebCore::RenderView::clearSubtreeSelection const): Deleted.
(WebCore::RenderView::applySubtreeSelection): Deleted.
(WebCore::RenderView::getSelection const): Deleted.
(WebCore::RenderView::clearSelection): Deleted.

  • rendering/RenderView.h:
  • rendering/SelectionSubtreeRoot.cpp:

(WebCore::rendererAfterPosition):
(WebCore::SelectionIterator::SelectionIterator):
(WebCore::SelectionIterator::current const):
(WebCore::SelectionIterator::next):
(WebCore::SelectionIterator::checkForSpanner):
(WebCore::SelectionRangeData::SelectionRangeData):
(WebCore::SelectionRangeData::set):
(WebCore::SelectionRangeData::clear):
(WebCore::SelectionRangeData::repaint const):
(WebCore::SelectionRangeData::bounds const):
(WebCore::SelectionRangeData::collectAndClear const):
(WebCore::SelectionRangeData::apply):
(WebCore::SelectionRangeData::isValidRendererForNewSelection const):
(WebCore::SelectionSubtreeRoot::SelectionSubtreeRoot): Deleted.

  • rendering/SelectionSubtreeRoot.h:

(WebCore::SelectionRangeData::Context::operator== const):
(WebCore::SelectionRangeData::get const):
(WebCore::SelectionRangeData::start const):
(WebCore::SelectionRangeData::end const):
(WebCore::SelectionRangeData::startPosition const):
(WebCore::SelectionRangeData::endPosition const):
(WebCore::SelectionSubtreeRoot::OldSelectionData::OldSelectionData): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::SelectionSubtreeData): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStart const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartPos const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEnd const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionEndPos const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::selectionStartEndPositions const): Deleted.
(WebCore::SelectionSubtreeRoot::SelectionSubtreeData::clearSelection): Deleted.
(WebCore::SelectionSubtreeRoot::selectionData): Deleted.
(WebCore::SelectionSubtreeRoot::selectionData const): Deleted.
(WebCore::SelectionSubtreeRoot::setSelectionData): Deleted.

8:33 PM Changeset in webkit [222696] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r222588. rdar://problem/34717517

8:17 PM Changeset in webkit [222695] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[Settings] Enums should not be passed by const reference
https://bugs.webkit.org/show_bug.cgi?id=177727

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

  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:

(printGetterAndSetter):

Use the new typeIsAggregate predicate to determine whether to
use const reference or not.

(includeForSetting): Deleted.

Move includeForSetting to Settings.py with the rest of the Setting
helpers.

  • Scripts/GenerateSettings/Settings.py:

(mapToIDLType):
(typeIsPrimitive):
(typeIsAggregate):

Add predicate to determine if a setting's type is an aggregate (struct or class)
or a primitive. Remove references to size_t, which is not used.

6:35 PM Changeset in webkit [222694] by weinig@apple.com
  • 2 edits in trunk/LayoutTests

Skip failing tests from r222692 that have different output on each run.


Skips imported/w3c/web-platform-tests/fetch/api/abort/general.any.html
and imported/w3c/web-platform-tests/fetch/api/abort/general.any.worker.html

6:28 PM Changeset in webkit [222693] by weinig@apple.com
  • 1 edit
    2 adds in trunk/LayoutTests/imported/w3c

Add missing results from r222690.

  • web-platform-tests/XMLHttpRequest/responseType-document-in-worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/responseXML-unavailable-in-worker-expected.txt: Added.
3:32 PM Changeset in webkit [222692] by weinig@apple.com
  • 16 edits
    6 adds in trunk

Add support for DOM aborting (https://dom.spec.whatwg.org/#aborting-ongoing-activities)
https://bugs.webkit.org/show_bug.cgi?id=177718

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/dom/abort/event.any-expected.txt:
  • web-platform-tests/dom/abort/event.any.worker-expected.txt:
  • web-platform-tests/dom/interface-objects-expected.txt:
  • web-platform-tests/dom/interfaces-expected.txt:
  • web-platform-tests/fetch/api/abort/cache.https-expected.txt:
  • web-platform-tests/fetch/api/abort/general.any-expected.txt:
  • web-platform-tests/fetch/api/abort/general.any.worker-expected.txt:
  • web-platform-tests/payment-request/interfaces.https-expected.txt:

Update test results.

Source/WebCore:

Adds standalone support for AbortController and AbortSignal. No integration
with other specs yet.

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


Add new files.


  • dom/AbortController.cpp: Added.
  • dom/AbortController.h: Added.
  • dom/AbortController.idl: Added.
  • dom/AbortSignal.cpp: Added.
  • dom/AbortSignal.h: Added.
  • dom/AbortSignal.idl: Added.


Add basic support AbortController and AbortSignal.


  • dom/EventTargetFactory.in:


Add AbortSignal to the list of EventTargets.

LayoutTests:

  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:

Update test results.

2:24 PM Changeset in webkit [222691] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Use WeakPtr for first-letter memory management
https://bugs.webkit.org/show_bug.cgi?id=177716

Reviewed by Darin Adler.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::destroyLeftoverChildren):

Remove first-letter special case.
Use removeAndDestroyChild instead of calling destroy() directly. The latter should
eventually stop calling takeChild and assert that the renderer is not in the tree.

  • rendering/RenderTextFragment.cpp:

(WebCore::RenderTextFragment::willBeDestroyed):
(WebCore::RenderTextFragment::setText):

  • rendering/RenderTextFragment.h:

Use WeakPtr.

2:12 PM Changeset in webkit [222690] by commit-queue@webkit.org
  • 6 edits
    4 adds in trunk

XMLHttpRequest's responseXML should be annotated with [Exposed=Window]
https://bugs.webkit.org/show_bug.cgi?id=177714

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

LayoutTests/imported/w3c:

  • web-platform-tests/XMLHttpRequest/resources/responseType-document-in-worker.js: Added.
  • web-platform-tests/XMLHttpRequest/resources/responseXML-unavailable-in-worker.js: Added.
  • web-platform-tests/XMLHttpRequest/resources/w3c-import.log:
  • web-platform-tests/XMLHttpRequest/responseType-document-in-worker.html: Added.
  • web-platform-tests/XMLHttpRequest/responseXML-unavailable-in-worker.html: Added.
  • web-platform-tests/XMLHttpRequest/w3c-import.log:

Import latest XMLHttpRequest tests that include tests for responseXML not
being available in workers and setting a responseType of 'document' being
a no-op in workers.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/XMLHttpRequest/responseType-document-in-worker.html

imported/w3c/web-platform-tests/XMLHttpRequest/responseXML-unavailable-in-worker.html

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::responseXML):

Replace returning null for non-document contexts with an assertion now
that the bindings layer ensures this doesn't get called.

(WebCore::XMLHttpRequest::setResponseType):

Match the spec and turn attempts to set a responseType of 'document' in
non-documents contexts as a no-op.

  • xml/XMLHttpRequest.idl:

Address FIXME and annotate responseXML with [Exposed=Window] now that it
is supported.

10:23 AM Changeset in webkit [222689] by commit-queue@webkit.org
  • 36 edits
    2 deletes in trunk

Unreviewed, rolling out r222564.
https://bugs.webkit.org/show_bug.cgi?id=177720

"It regressed JetStream by 2% on iOS caused by a 50%
regression on the bigfib subtest" (Requested by saamyjoon on
#webkit).

Reverted changeset:

"Add Above/Below comparisons for UInt32 patterns"
https://bugs.webkit.org/show_bug.cgi?id=177281
http://trac.webkit.org/changeset/222564

Sep 30, 2017:

11:59 PM Changeset in webkit [222688] by rniwa@webkit.org
  • 11 edits
    2 adds in trunk

Don't reveal file URL when pasting an image
https://bugs.webkit.org/show_bug.cgi?id=177710
<rdar://problem/34757924>

Reviewed by Wenson Hsieh.

Source/WebCore:

Fixed the bug by generalizing the code we had for drag & drop to hide string types when there is a file.

We don't hide string types when customPasteboardDataEnabled() is false to preserve the backwards compatiblity
with apps that are relying on being able to read files URLs in the pasteboard.

Test: editing/pasteboard/paste-image-does-not-reveal-file-url.html

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::getData const): Pretend there is no string data when there is a file in the pasteboard
custom pasteboard data is enabled.
(WebCore::DataTransfer::setData): Ditto.
(WebCore::DataTransfer::types const): Ditto.

  • dom/DataTransfer.h:

(WebCore::DataTransfer::forDrag const): Added for when drag & drop support is disabled at compilation time.
(WebCore::DataTransfer::forFileDrag const): Ditto.

  • platform/Pasteboard.h:
  • platform/StaticPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::Pasteboard::containsFiles): Added.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::containsFiles): Added.

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::containsFiles): Added.

  • platform/wpe/PasteboardWPE.cpp:

(WebCore::Pasteboard::containsFiles): Added.
(WebCore::Pasteboard::readFilenames): Annotated this function with notImplemented().

LayoutTests:

Added a regression test for pasting an image. We enable this protection only when custom data is enabled
to preserve the backwards compatibility.

  • editing/pasteboard/paste-image-does-not-reveal-file-url-expected.txt: Added.
  • editing/pasteboard/paste-image-does-not-reveal-file-url.html: Added.
10:00 PM Changeset in webkit [222687] by Wenson Hsieh
  • 3 edits in trunk/LayoutTests

Augment editing/pasteboard/data-transfer-get-data-non-normalized-types.html to check whitespace stripping
https://bugs.webkit.org/show_bug.cgi?id=177707

Reviewed by Ryosuke Niwa.

Augment an existing layout test to check that whitespace is stripped from types passed into DataTransfer's
getData and setData methods.

  • editing/pasteboard/data-transfer-get-data-non-normalized-types-expected.txt:
  • editing/pasteboard/data-transfer-get-data-non-normalized-types.html:
6:13 PM Changeset in webkit [222686] by commit-queue@webkit.org
  • 20 edits
    1 copy
    1 move
    12 adds
    1 delete in trunk/Source/WebCore

[Settings] Replace SettingsMacros.h with a generated base class for Settings
https://bugs.webkit.org/show_bug.cgi?id=177681

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

  • Adds a SettingsGenerated class that Settings inherits from. The new class has the members and getters/setters for all the generated bindings.
  • Some default values for settings are literals in Settings.in, but rather constants or functions defined externally. These have all been moved to SettingsDefaultValues.h to allow for the script to include them all for SettingsGenerated.
  • Previously, a few enums were declared in Settings.h for use by Settings. Now that SettingsGenerated needs access, we standarize the same way that exists for the IDL generator; expecting the enum to be in a header of the same name.
  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:

Add new files / generation steps.

  • Scripts/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateSettings.py:
  • Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
  • Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
  • Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
  • Scripts/GenerateSettings/Settings.py:

Replace script to generate SettingsMacros.h with scripts to generate a SettingsGenerated.{h,cpp}.

  • accessibility/ForcedAccessibilityValue.h: Added.
  • editing/EditableLinkBehavior.h: Added.
  • editing/EditingBehavior.h:
  • editing/EditingBehaviorType.h: Copied from editing/EditingBehaviorTypes.h.
  • editing/EditingBehaviorTypes.h: Removed.
  • editing/cocoa/DataDetection.h:
  • editing/cocoa/DataDetectorTypes.h: Added.
  • page/DebugOverlayRegions.h: Added.
  • page/FrameFlattening.h: Added.
  • page/PDFImageCachingPolicy.h: Added.
  • page/TextDirectionSubmenuInclusionBehavior.h: Added.
  • page/UserInterfaceDirectionPolicy.h: Added.
  • platform/text/TextDirection.h: Added.
  • platform/text/WritingMode.h:

Split out enums from Settings.h

  • css/MediaQueryEvaluator.cpp:

Update for new name of ForcedAccessibilityValue.

  • html/parser/HTMLParserOptions.cpp:

Update for new name of defaultMaximumHTMLParserDOMTreeDepth.

  • page/Settings.cpp:
  • page/Settings.h:
  • Move defaults to SettingsDefaultValues.h (and SettingsDefaultValuesCocoa.mm for defaultTextAutosizingEnabled).
  • Move enums to their own files.
  • Inherit from SettingsGenerated.h
  • page/Settings.in:
  • Use new 'include' option for javaScriptRuntimeFlags setting to include <runtime/RuntimeFlags.h>, as it doesn't fit the normal idiomatic model.
  • Replace call to defaultMinimumZoomFontSize() with direct constant access.
  • page/SettingsDefaultValues.h: Added.
  • page/cocoa/SettingsDefaultValuesCocoa.mm: Added.

Move default values from Settings to this new file.

  • page/cocoa/SettingsCocoa.mm:

Move defaultTextAutosizingEnabled() out of here and into SettingsDefaultValuesCocoa.mm.

  • style/StyleTreeResolver.cpp:
  • Update for new scoping of defaultMaximumRenderTreeDepth.
  • Move defaultMaximumRenderTreeDepth from Settings here. This is the only use.
  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue const):
(WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue const):
(WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue const):
(WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
(WebCore::settingsToInternalSettingsValue): Deleted.
(WebCore::internalSettingsToSettingsValue): Deleted.

  • testing/InternalSettings.h:

Replace duplicate definition of ForcedAccessibilityValue with a using declaration
and simplify code now that it doesn't need to map between the two enums.

4:33 PM Changeset in webkit [222685] by Wenson Hsieh
  • 2 edits
    2 adds in trunk/LayoutTests

Add a layout test test that exercises setData and getData for non-normalized types
https://bugs.webkit.org/show_bug.cgi?id=177707

Reviewed by Darin Adler.

We have test coverage for getData and setData with non-normalized types on some of our bots where custom
pasteboard data is enabled by default, but this is not the case in EWS. This patch adds a copy and paste test
that exercises this codepath across all Cocoa platforms.

  • editing/pasteboard/data-transfer-get-data-non-normalized-types-expected.txt: Added.
  • editing/pasteboard/data-transfer-get-data-non-normalized-types.html: Added.
  • platform/ios-simulator-wk1/TestExpectations:
3:50 PM Changeset in webkit [222684] by Darin Adler
  • 12 edits in trunk/Source/WebKit

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.

2:25 PM Changeset in webkit [222683] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS WK2] API test EditorStateTests.ContentViewHasTextInContentEditableElement is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=177698

Reviewed by Ryosuke Niwa.

The WebKit2 API test EditorStateTests.ContentViewHasTextInContentEditableElement is currently hitting
intermittent failures on test runners. After inserting just an image in the editable element, we would expect
that -hasText should return NO because the text content is an empty string, but we find that -hasText is YES.
This is because we're bailing on an early return in computeEditableRootHasContentAndPlainText because the
EditorState's PostLayoutData contains non-zero characters near the selection, which is incorrect.

However, upon closer inspection, this is due to a latent bug in the charactersAroundPosition helper function.
This function attempts to compute characters before and after the current selection by initializing a Vector
of size 3 with the relevant character data, and then sets oneAfter, oneBefore and twoBefore to the UChar32
values in the vector. However, in the case where there are less than three characters, we end up assigning
the uninitialized values in the vector to one or more of oneAfter, oneBefore and twoBefore, which causes the
helper added in r222654 to bail early when it should not.

To fix this, we initialize the values in characters to 0 (which is the initial value for the 3 corresponding
members in the PostLayoutData struct). We also turn characters into a UChar32 array on the stack, to avoid the
heap allocations using a Vector<UChar32>.

No new tests; fixes a flaky API test.

  • editing/VisibleUnits.cpp:

(WebCore::charactersAroundPosition):

6:44 AM Changeset in webkit [222682] by Antti Koivisto
  • 9 edits in trunk/Source

Add makeWeakPtr for easier WeakPtr construction
https://bugs.webkit.org/show_bug.cgi?id=177706

Reviewed by Sam Weinig.

Source/WebCore:

Use it in render tree.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadPlugin):

  • page/FrameView.cpp:

(WebCore::FrameView::updateEmbeddedObject):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):

  • rendering/RenderObject.h:

(WebCore::RenderObject::weakFactory const):
(WebCore::RenderObject::createWeakPtr): Deleted.

  • rendering/RenderView.cpp:

(WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):

  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::updateWidgetPosition):

Source/WTF:

Standalone makeWeakPtr() returns a WeakPtr of the same type as the argument.

For this to work the argument type needs to expose a (possibly base type) WeakPtrFactory
as a public weakPtrFactory() member function.

  • wtf/WeakPtr.h:

(WTF::WeakPtr::operator-> const):
(WTF::WeakPtr::operator* const): Also add operator*.
(WTF::makeWeakPtr):

6:00 AM Changeset in webkit [222681] by Carlos Garcia Campos
  • 231 edits
    1 add in trunk

Unreviewed. Upgrade webkitgtk-test-fonts to version 0.0.7.

Tools:

This version upgrades liberation fonts to version 2, that has a wider glyph coverage.

  • gtk/jhbuild.modules:

LayoutTests:

Rebaseline tests affected by the new fonts.

  • platform/gtk/css3/unicode-bidi-isolate-basic-expected.png:
  • platform/gtk/css3/unicode-bidi-isolate-basic-expected.txt:
  • platform/gtk/editing/selection/caret-rtl-2-expected.png:
  • platform/gtk/editing/selection/caret-rtl-2-expected.txt:
  • platform/gtk/editing/selection/caret-rtl-2-left-expected.png:
  • platform/gtk/editing/selection/caret-rtl-2-left-expected.txt:
  • platform/gtk/editing/selection/caret-rtl-expected.png:
  • platform/gtk/editing/selection/caret-rtl-expected.txt:
  • platform/gtk/editing/selection/caret-rtl-right-expected.png:
  • platform/gtk/editing/selection/caret-rtl-right-expected.txt:
  • platform/gtk/editing/selection/extend-by-word-002-expected.png:
  • platform/gtk/editing/selection/extend-by-word-002-expected.txt:
  • platform/gtk/editing/selection/extend-selection-bidi-expected.png:
  • platform/gtk/editing/selection/extend-selection-bidi-expected.txt:
  • platform/gtk/editing/selection/move-past-trailing-space-expected.png:
  • platform/gtk/editing/selection/move-past-trailing-space-expected.txt:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.png:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.png:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-backward-p-expected.txt:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.png:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-br-expected.txt:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.png:
  • platform/gtk/editing/selection/vertical-rl-rtl-extend-line-forward-p-expected.txt:
  • platform/gtk/fast/borders/rtl-border-04-expected.png:
  • platform/gtk/fast/borders/rtl-border-04-expected.txt:
  • platform/gtk/fast/borders/rtl-border-05-expected.png:
  • platform/gtk/fast/borders/rtl-border-05-expected.txt:
  • platform/gtk/fast/css/rtl-ordering-expected.png:
  • platform/gtk/fast/css/rtl-ordering-expected.txt:
  • platform/gtk/fast/css/text-overflow-ellipsis-bidi-expected.png:
  • platform/gtk/fast/css/text-overflow-ellipsis-bidi-expected.txt:
  • platform/gtk/fast/css/text-overflow-ellipsis-expected.png:
  • platform/gtk/fast/css/text-overflow-ellipsis-expected.txt:
  • platform/gtk/fast/css/text-overflow-ellipsis-strict-expected.png:
  • platform/gtk/fast/css/text-overflow-ellipsis-strict-expected.txt:
  • platform/gtk/fast/css/word-space-extra-expected.png:
  • platform/gtk/fast/css/word-space-extra-expected.txt:
  • platform/gtk/fast/dom/34176-expected.png:
  • platform/gtk/fast/dom/34176-expected.txt:
  • platform/gtk/fast/dom/52776-expected.png:
  • platform/gtk/fast/dom/52776-expected.txt:
  • platform/gtk/fast/forms/listbox-bidi-align-expected.png:
  • platform/gtk/fast/forms/listbox-bidi-align-expected.txt:
  • platform/gtk/fast/forms/search-rtl-expected.png:
  • platform/gtk/fast/forms/search-rtl-expected.txt:
  • platform/gtk/fast/forms/select-visual-hebrew-expected.png:
  • platform/gtk/fast/forms/select-visual-hebrew-expected.txt:
  • platform/gtk/fast/forms/visual-hebrew-text-field-expected.png:
  • platform/gtk/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/gtk/fast/inline/inline-box-background-expected.png:
  • platform/gtk/fast/inline/inline-box-background-expected.txt:
  • platform/gtk/fast/inline/inline-box-background-long-image-expected.png:
  • platform/gtk/fast/inline/inline-box-background-long-image-expected.txt:
  • platform/gtk/fast/inline/inline-box-background-repeat-x-expected.png:
  • platform/gtk/fast/inline/inline-box-background-repeat-x-expected.txt:
  • platform/gtk/fast/inline/inline-box-background-repeat-y-expected.png:
  • platform/gtk/fast/inline/inline-box-background-repeat-y-expected.txt:
  • platform/gtk/fast/text/atsui-negative-spacing-features-expected.png:
  • platform/gtk/fast/text/atsui-negative-spacing-features-expected.txt:
  • platform/gtk/fast/text/atsui-spacing-features-expected.png:
  • platform/gtk/fast/text/atsui-spacing-features-expected.txt:
  • platform/gtk/fast/text/basic/006-expected.png:
  • platform/gtk/fast/text/basic/006-expected.txt:
  • platform/gtk/fast/text/bidi-embedding-pop-and-push-same-expected.png:
  • platform/gtk/fast/text/bidi-embedding-pop-and-push-same-expected.txt:
  • platform/gtk/fast/text/capitalize-boundaries-expected.png:
  • platform/gtk/fast/text/capitalize-boundaries-expected.txt:
  • platform/gtk/fast/text/cg-fallback-bolding-expected.png:
  • platform/gtk/fast/text/cg-fallback-bolding-expected.txt:
  • platform/gtk/fast/text/drawBidiText-expected.png:
  • platform/gtk/fast/text/drawBidiText-expected.txt:
  • platform/gtk/fast/text/hyphenate-avoid-orphaned-word-expected.txt:
  • platform/gtk/fast/text/hyphenate-character-expected.png:
  • platform/gtk/fast/text/hyphenate-character-expected.txt:
  • platform/gtk/fast/text/hyphenate-first-word-expected.png:
  • platform/gtk/fast/text/hyphenate-first-word-expected.txt:
  • platform/gtk/fast/text/hyphenate-limit-before-after-expected.png:
  • platform/gtk/fast/text/hyphenate-limit-before-after-expected.txt:
  • platform/gtk/fast/text/hyphenate-limit-lines-expected.png:
  • platform/gtk/fast/text/hyphenate-limit-lines-expected.txt:
  • platform/gtk/fast/text/hyphens-expected.png:
  • platform/gtk/fast/text/hyphens-expected.txt:
  • platform/gtk/fast/text/in-rendered-text-rtl-expected.png:
  • platform/gtk/fast/text/in-rendered-text-rtl-expected.txt:
  • platform/gtk/fast/text/international/bidi-AN-after-L-expected.png:
  • platform/gtk/fast/text/international/bidi-AN-after-L-expected.txt:
  • platform/gtk/fast/text/international/bidi-L2-run-reordering-expected.png:
  • platform/gtk/fast/text/international/bidi-L2-run-reordering-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-CSS-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-HTML-expected.txt:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.png:
  • platform/gtk/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
  • platform/gtk/fast/text/international/bidi-explicit-embedding-expected.png:
  • platform/gtk/fast/text/international/bidi-explicit-embedding-expected.txt:
  • platform/gtk/fast/text/international/bidi-ignored-for-first-child-inline-expected.png:
  • platform/gtk/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
  • platform/gtk/fast/text/international/bidi-innertext-expected.png:
  • platform/gtk/fast/text/international/bidi-innertext-expected.txt:
  • platform/gtk/fast/text/international/bidi-linebreak-001-expected.png:
  • platform/gtk/fast/text/international/bidi-linebreak-001-expected.txt:
  • platform/gtk/fast/text/international/bidi-linebreak-002-expected.png:
  • platform/gtk/fast/text/international/bidi-linebreak-002-expected.txt:
  • platform/gtk/fast/text/international/bidi-linebreak-003-expected.png:
  • platform/gtk/fast/text/international/bidi-linebreak-003-expected.txt:
  • platform/gtk/fast/text/international/bidi-mirror-he-ar-expected.png:
  • platform/gtk/fast/text/international/bidi-mirror-he-ar-expected.txt:
  • platform/gtk/fast/text/international/bidi-neutral-run-expected.png:
  • platform/gtk/fast/text/international/bidi-neutral-run-expected.txt:
  • platform/gtk/fast/text/international/bidi-override-expected.png:
  • platform/gtk/fast/text/international/bidi-override-expected.txt:
  • platform/gtk/fast/text/international/hebrew-vowels-expected.png:
  • platform/gtk/fast/text/international/hebrew-vowels-expected.txt:
  • platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
  • platform/gtk/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/gtk/fast/text/international/rtl-caret-expected.png:
  • platform/gtk/fast/text/international/rtl-caret-expected.txt:
  • platform/gtk/fast/text/international/rtl-white-space-pre-wrap-expected.png:
  • platform/gtk/fast/text/international/rtl-white-space-pre-wrap-expected.txt:
  • platform/gtk/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.png:
  • platform/gtk/fast/text/international/unicode-bidi-plaintext-in-textarea-expected.txt:
  • platform/gtk/fast/text/line-breaks-expected.png:
  • platform/gtk/fast/text/line-breaks-expected.txt:
  • platform/gtk/fast/text/midword-break-after-breakable-char-expected.png:
  • platform/gtk/fast/text/midword-break-after-breakable-char-expected.txt:
  • platform/gtk/fast/text/trailing-white-space-2-expected.png:
  • platform/gtk/fast/text/trailing-white-space-2-expected.txt:
  • platform/gtk/fast/text/trailing-white-space-expected.png:
  • platform/gtk/fast/text/trailing-white-space-expected.txt:
  • platform/gtk/fast/text/vertical-rl-rtl-linebreak-expected.png:
  • platform/gtk/fast/text/vertical-rl-rtl-linebreak-expected.txt:
  • platform/gtk/fast/text/whitespace/026-expected.png:
  • platform/gtk/fast/text/whitespace/026-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorEnd-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorMiddle-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirLTR-anchorStart-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorEnd-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorMiddle-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirNone-anchorStart-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorEnd-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorMiddle-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-dirRTL-anchorStart-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorEnd-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorMiddle-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirLTR-anchorStart-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorEnd-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorMiddle-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-inherited-dirRTL-anchorStart-expected.txt:
  • platform/gtk/svg/W3C-I18N/text-anchor-no-markup-expected.png:
  • platform/gtk/svg/W3C-I18N/text-anchor-no-markup-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-02-b-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1-SE/text-intro-09-b-expected.txt:
  • platform/gtk/svg/W3C-SVG-1.1/text-tselect-02-f-expected.png:
  • platform/gtk/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt:
  • platform/gtk/svg/custom/glyph-selection-bidi-mirror-expected.png:
  • platform/gtk/svg/custom/glyph-selection-bidi-mirror-expected.txt:
  • platform/gtk/svg/text/bidi-embedded-direction-expected.png:
  • platform/gtk/svg/text/bidi-embedded-direction-expected.txt:
  • platform/gtk/svg/text/bidi-reorder-value-lists-expected.png:
  • platform/gtk/svg/text/bidi-reorder-value-lists-expected.txt: Added.
  • platform/gtk/svg/text/bidi-text-anchor-direction-expected.png:
  • platform/gtk/svg/text/bidi-text-anchor-direction-expected.txt:
  • platform/gtk/svg/text/text-tselect-02-f-expected.png:
  • platform/gtk/svg/text/text-tselect-02-f-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_layers-opacity-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_layers-opacity-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_position-table-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_position-table-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-cell-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-cell-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-column-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-column-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-column-group-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-column-group-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-row-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-row-expected.txt:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-row-group-expected.png:
  • platform/gtk/tables/mozilla/marvin/backgr_simple-table-row-group-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-cell-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-cell-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-column-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-column-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-column-group-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-column-group-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-quirks-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-quirks-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-row-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-row-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-row-group-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_border-table-row-group-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_fixed-bg-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_layers-hide-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_layers-hide-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_layers-show-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_layers-show-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-cell-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-cell-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-column-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-column-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-column-group-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-column-group-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-row-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-row-expected.txt:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-row-group-expected.png:
  • platform/gtk/tables/mozilla_expected_failures/marvin/backgr_position-table-row-group-expected.txt:
3:31 AM Changeset in webkit [222680] by rniwa@webkit.org
  • 15 edits in trunk/Source/WebCore

Share more pasteboard code between iOS and macOS and remove dependency on Settings
https://bugs.webkit.org/show_bug.cgi?id=177700

Reviewed by Wenson Hsieh.

Moved more code from PasteboardIOS.mm and PasteboardMac.mm into PasteboardCocoa.mm to share code.

This patch also removes the layering violation inadvertently introduced in r222595 whereby which
Pasteboard code depends on Settings. To do this, this patch splits readStringForBindings is into
readString and readStringInCustomData and typesForBindings into typesSafeForBindings and
typesForLegacyUnsafeBindings, and moves the logic to decide whether a given type or string is read
off of the native pasteboard entry or our custom data entry is moved to DataTransfer.

No new tests since there should be no behavioral change.

  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::getData const): Moved the code to decide whether string is
read off of custom data or native pasteboard from readStringForBindings.
(WebCore::DataTransfer::types const): Ditto from typesForBindings.

  • platform/Pasteboard.cpp:

(WebCore::Pasteboard::isSafeTypeForDOMToReadAndWrite): Moved into Pasteboard.

  • platform/Pasteboard.h:
  • platform/StaticPasteboard.cpp:

(WebCore::StaticPasteboard::readString): Renamed from readStringForBindings.
(WebCore::StaticPasteboard::readStringInCustomData): Added.
(WebCore::StaticPasteboard::writeString):

  • platform/StaticPasteboard.h:
  • platform/cocoa/PasteboardCocoa.mm:

(WebCore::Pasteboard::typesSafeForBindings): Extracted out of typesForBindings in PasteboardIOS.mm
and PasteboardMac.mm.
(WebCore::Pasteboard::typesForLegacyUnsafeBindings): Ditto.
(WebCore::Pasteboard::readString): Ditto.
(WebCore::Pasteboard::readStringInCustomData): Ditto.
(WebCore::Pasteboard::writeCustomData): Moved here from PasteboardIOS.mm and PasteboardCocoa.mm.
(WebCore::Pasteboard::changeCount const): Ditto.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::typesSafeForBindings): Added.
(WebCore::Pasteboard::typesForLegacyUnsafeBindings): Renamed from readStringForBindings.
(WebCore::Pasteboard::readString):
(WebCore::Pasteboard::readStringInCustomData): Added.

  • platform/ios/PasteboardIOS.mm:

(WebCore::Pasteboard::writeCustomData): Moved to PasteboardCocoa.mm.
(WebCore::Pasteboard::changeCount const): Ditto.
(WebCore::Pasteboard::readPlatformValueAsString): Moved into Pasteboard.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::readStringForBindings): Moved to PasteboardCocoa.mm.
(WebCore::Pasteboard::typesForBindings): Ditto.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

  • platform/mac/PasteboardMac.mm:

(WebCore::Pasteboard::changeCount const): Moved to PasteboardCocoa.mm.
(WebCore::Pasteboard::writeCustomData): Ditto.
(WebCore::Pasteboard::readPlatformValueAsString): Moved into Pasteboard.
(WebCore::Pasteboard::readStringForBindings): Moved to PasteboardCocoa.mm.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Moved into Pasteboard.
(WebCore::Pasteboard::typesForBindings): Moved to PasteboardCocoa.mm.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::typesSafeForBindings): Added.
(WebCore::Pasteboard::typesForLegacyUnsafeBindings): Renamed from readStringForBindings.
(WebCore::Pasteboard::readString): Renamed from readStringForBindings.
(WebCore::Pasteboard::readStringInCustomData): Added.

  • platform/wpe/PasteboardWPE.cpp:

(WebCore::Pasteboard::typesSafeForBindings): Added.
(WebCore::PasteboardtypesForLegacyUnsafeBindings): Renamed from readStringForBindings.
(WebCore::Pasteboard::readString): Renamed from readStringForBindings.
(WebCore::Pasteboard::readStringInCustomData): Added.

Sep 29, 2017:

11:45 PM Changeset in webkit [222679] by Antti Koivisto
  • 56 edits in trunk/Source/WebCore

Use smart pointers for creating, adding and removing renderers
https://bugs.webkit.org/show_bug.cgi?id=177603

Reviewed by Zalan Bujtas.

With this patch RenderObject ownership is consistently managed using RenderPtrs. It also
clarifies that in-tree renderers are always owned by the parent renderer.

  • renderers are constructed with createRenderer<> which returns RenderPtr
  • addChild and related functions take RenderPtrs
  • removeChild is replaced with takeChild that returns a RenderPtr
  • only addChildInternal/takeChildInternal deal with raw ownder renderer pointers.

There are still a few exception left, noted below, to be fixed later.

  • dom/Document.cpp:

(WebCore::Document::webkitWillEnterFullScreenForElement):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::addChildToContinuation):
(WebCore::RenderBlock::addChild):
(WebCore::RenderBlock::addChildIgnoringContinuation):
(WebCore::RenderBlock::makeChildrenNonInline):
(WebCore::RenderBlock::dropAnonymousBoxChild):
(WebCore::RenderBlock::takeChild):
(WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
(WebCore::RenderBlock::removeChild): Deleted.

  • rendering/RenderBlock.h:

(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
(WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs const):
(WebCore::RenderBlock::createAnonymousBlock const):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::addChild):
(WebCore::RenderBlockFlow::takeChild):
(WebCore::RenderBlockFlow::removeChild): Deleted.

  • rendering/RenderBlockFlow.h:
  • rendering/RenderBox.cpp:

(WebCore::RenderBox::splitAnonymousBoxesAroundChild):

  • rendering/RenderBox.h:

(WebCore::RenderBox::createAnonymousBoxWithSameTypeAs const):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::moveChildTo):

  • rendering/RenderButton.cpp:

(WebCore::RenderButton::addChild):
(WebCore::RenderButton::takeChild):
(WebCore::RenderButton::setText):
(WebCore::RenderButton::removeChild): Deleted.

  • rendering/RenderButton.h:
  • rendering/RenderElement.cpp:

(WebCore::RenderElement::addChild):
(WebCore::RenderElement::takeChild):
(WebCore::RenderElement::removeAndDestroyChild):
(WebCore::RenderElement::destroyLeftoverChildren):

Keep the existing behavior and leak the firstLetter renderer. The comment claims they get destroyed by RenderTextFragment.
To be cleaned up later.

(WebCore::RenderElement::insertChildInternal):
(WebCore::RenderElement::takeChildInternal):
(WebCore::RenderElement::handleDynamicFloatPositionChange):
(WebCore::RenderElement::removeChild): Deleted.
(WebCore::RenderElement::removeChildInternal): Deleted.

  • rendering/RenderElement.h:

(WebCore::RenderElement::addChildIgnoringContinuation):

  • rendering/RenderFullScreen.cpp:

(WebCore::RenderFullScreen::willBeDestroyed):
(WebCore::RenderFullScreen::wrapNewRenderer):
(WebCore::RenderFullScreen::wrapExistingRenderer):

Split wrapRenderer() into two functions, wrapNewRenderer() and wrapExistingRenderer().
The first one deals with adding new renderers to the tree while the latter mutates
existing render tree in-place.

(WebCore::RenderFullScreen::unwrapRenderer):
(WebCore::RenderFullScreen::createPlaceholder):
(WebCore::RenderFullScreen::wrapRenderer): Deleted.

  • rendering/RenderFullScreen.h:
  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::addChild):
(WebCore::RenderGrid::takeChild):
(WebCore::RenderGrid::removeChild): Deleted.

  • rendering/RenderGrid.h:
  • rendering/RenderInline.cpp:

(WebCore::RenderInline::addChild):
(WebCore::RenderInline::addChildIgnoringContinuation):
(WebCore::RenderInline::splitInlines):
(WebCore::RenderInline::splitFlow):
(WebCore::RenderInline::addChildToContinuation):
(WebCore::RenderInline::childBecameNonInline):

  • rendering/RenderInline.h:
  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::createInnerBlock):
(RenderMenuList::addChild):
(RenderMenuList::takeChild):
(RenderMenuList::setText):
(RenderMenuList::removeChild): Deleted.

  • rendering/RenderMenuList.h:
  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::evacuateAndDestroy):
(WebCore::RenderMultiColumnFlow::processPossibleSpannerDescendant):
(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):

Keep the existing behavior and leak the placeholder renderer.
To be cleaned up later.

(WebCore::RenderMultiColumnFlow::handleSpannerRemoval):

Keep the existing behavior and leak the placeholder renderer.
To be cleaned up later.

  • rendering/RenderMultiColumnSpannerPlaceholder.cpp:

(WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):

  • rendering/RenderMultiColumnSpannerPlaceholder.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::removeFromParentAndDestroy):
(WebCore::RenderObject::willBeDestroyed):
(WebCore::RenderObject::destroy):
(WebCore::RenderObject::removeFromParent): Deleted.

  • rendering/RenderObject.h:
  • rendering/RenderQuote.cpp:

(WebCore::RenderQuote::updateTextRenderer):

  • rendering/RenderRuby.cpp:

(WebCore::createAnonymousRubyInlineBlock):
(WebCore::RenderRubyAsInline::addChild):
(WebCore::RenderRubyAsInline::takeChild):
(WebCore::RenderRubyAsBlock::addChild):
(WebCore::RenderRubyAsBlock::takeChild):
(WebCore::RenderRubyAsInline::removeChild): Deleted.
(WebCore::RenderRubyAsBlock::removeChild): Deleted.

  • rendering/RenderRuby.h:
  • rendering/RenderRubyBase.cpp:

(WebCore::RenderRubyBase::moveInlineChildren):

  • rendering/RenderRubyRun.cpp:

(WebCore::RenderRubyRun::rubyBaseSafe):
(WebCore::RenderRubyRun::addChild):
(WebCore::RenderRubyRun::takeChild):
(WebCore::RenderRubyRun::createRubyBase const):
(WebCore::RenderRubyRun::staticCreateRubyRun):
(WebCore::RenderRubyRun::removeChild): Deleted.

  • rendering/RenderRubyRun.h:
  • rendering/RenderTable.cpp:

(WebCore::RenderTable::addChild):
(WebCore::RenderTable::createTableWithStyle):
(WebCore::RenderTable::createAnonymousWithParentRenderer):

  • rendering/RenderTable.h:

(WebCore::RenderTable::createAnonymousBoxWithSameTypeAs const):

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::createTableCellWithStyle):
(WebCore::RenderTableCell::createAnonymousWithParentRenderer):

  • rendering/RenderTableCell.h:

(WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs const):

  • rendering/RenderTableRow.cpp:

(WebCore::RenderTableRow::addChild):
(WebCore::RenderTableRow::createTableRowWithStyle):
(WebCore::RenderTableRow::createAnonymousWithParentRenderer):

  • rendering/RenderTableRow.h:

(WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs const):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::addChild):
(WebCore::RenderTableSection::createTableSectionWithStyle):
(WebCore::RenderTableSection::createAnonymousWithParentRenderer):

  • rendering/RenderTableSection.h:

(WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs const):

  • rendering/mathml/RenderMathMLFenced.cpp:

(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::addChild):

  • rendering/mathml/RenderMathMLFenced.h:
  • rendering/svg/RenderSVGContainer.cpp:

(WebCore::RenderSVGContainer::addChild):
(WebCore::RenderSVGContainer::takeChild):
(WebCore::RenderSVGContainer::removeChild): Deleted.

  • rendering/svg/RenderSVGContainer.h:
  • rendering/svg/RenderSVGInline.cpp:

(WebCore::RenderSVGInline::addChild):
(WebCore::RenderSVGInline::takeChild):
(WebCore::RenderSVGInline::removeChild): Deleted.

  • rendering/svg/RenderSVGInline.h:
  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::addChild):
(WebCore::RenderSVGRoot::takeChild):
(WebCore::RenderSVGRoot::removeChild): Deleted.

  • rendering/svg/RenderSVGRoot.h:
  • rendering/svg/RenderSVGText.cpp:

(WebCore::RenderSVGText::addChild):
(WebCore::RenderSVGText::takeChild):
(WebCore::RenderSVGText::removeChild): Deleted.

  • rendering/svg/RenderSVGText.h:
  • style/RenderTreePosition.h:

(WebCore::RenderTreePosition::insert):

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::createRenderer):
(WebCore::createTextRenderer):

  • style/RenderTreeUpdaterFirstLetter.cpp:

(WebCore::updateFirstLetterStyle):
(WebCore::createFirstLetterRenderer):

  • style/RenderTreeUpdaterGeneratedContent.cpp:

(WebCore::createContentRenderers):

  • style/RenderTreeUpdaterListItem.cpp:

(WebCore::RenderTreeUpdater::ListItem::updateMarker):

  • style/RenderTreeUpdaterMultiColumn.cpp:

(WebCore::RenderTreeUpdater::MultiColumn::createFragmentedFlow):

10:07 PM Changeset in webkit [222678] by Nikita Vasilyev
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Styles Redesign: support undo/redo of manual edits
https://bugs.webkit.org/show_bug.cgi?id=177314

Reviewed by Joseph Pecoraro.

Make sure Command-Z and Command-Shift-Z undo changes in the styles sidebar
when not focused on a contentEditable field.

  • UserInterface/Views/EditingSupport.js:

(WI.isEventTargetAnEditableField):
Make sure WI._undoKeyboardShortcut doesn't call WI.undo() when editing inside of a contentEditable element.

  • UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:

(WI.SpreadsheetCSSStyleDeclarationEditor):
Call style setter to setup event listeners during instantiation.

(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
Update style declaration section when it isn't focused.
This is the same logic as in the old styles sidebar (CSSStyleDeclarationTextEditor style setter).

9:31 PM Changeset in webkit [222677] by Alan Bujtas
  • 8 edits in trunk/Source/WebCore

Remove redundant RenderObject::selectionRoot and dependencies
https://bugs.webkit.org/show_bug.cgi?id=177696

Reviewed by Ryosuke Niwa.

There's only one selection root (RenderView).

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::selectionState):
(WebCore::InlineTextBox::selectionStartEnd const):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::selectionRoot const): Deleted.
(WebCore::RenderObject::selectionStartEnd const): Deleted.

  • rendering/RenderObject.h:
  • rendering/RenderReplaced.cpp:

(WebCore::RenderReplaced::isSelected const):

  • rendering/RenderText.cpp:

(WebCore::RenderText::collectSelectionRectsForLineBoxes):

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::setSelectionState):

  • rendering/RenderView.h:
  • rendering/SelectionSubtreeRoot.h:
7:11 PM Changeset in webkit [222676] by ap@apple.com
  • 2 edits in trunk/Source/WebKitLegacy/mac

Follow-up to https://trac.webkit.org/r222239 to fix crashes.
rdar://problem/34705779

Addressing review comments that I somehow landed without.

  • WebView/WebHTMLView.mm: Undo adding #if guards around -_web_uniqueWebDataURL
6:16 PM Changeset in webkit [222675] by Yusuke Suzuki
  • 18 edits
    14 adds in trunk

[DFG] Support ArrayPush with multiple args
https://bugs.webkit.org/show_bug.cgi?id=175823

Reviewed by Saam Barati.

JSTests:

  • microbenchmarks/array-push-0.js: Added.

(arrayPush0):

  • microbenchmarks/array-push-1.js: Added.

(arrayPush1):

  • microbenchmarks/array-push-2.js: Added.

(arrayPush2):

  • microbenchmarks/array-push-3.js: Added.

(arrayPush3):

  • stress/array-push-multiple-contiguous.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-double-nan.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-double.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-int32.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-many-contiguous.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-many-double.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-many-int32.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-many-storage.js: Added.

(shouldBe):
(test):

  • stress/array-push-multiple-storage.js: Added.

(shouldBe):
(test):

  • stress/array-push-with-force-exit.js: Added.

(target.createBuiltin):

Source/JavaScriptCore:

Reviewed by Saam Barati.

This patch implements ArrayPush(with multiple arguments) in DFG and FTL. Previously, they are not handled
by ArrayPush. Then they go to generic direct call to Array#push and it does in slow path. This patch
extends ArrayPush to push multiple arguments in a bulk push manner.

The problem of ArrayPush is that we need to perform ArrayPush atomically: If OSR exit occurs in the middle
of ArrayPush, we incorrectly push pushed elements twice. Once we start pushing values, we should not exit.
But we do not want to iterate elements twice, once for type checks and once for actually pushing it. It
could move elements between registers and memory back and forth.

This patch achieves the above goal by separating type checks from ArrayPush. When starting ArrayPush, type
checks for elements are already done by separately emitted Check nodes.

We also add JSArray::pushInline for DFG operations just calling JSArray::push. And we also use it in
arrayProtoFuncPush's fast path.

This patch significantly improves performance of push(multiple args).

baseline patched

Microbenchmarks:

array-push-0 461.8455+-28.9995 151.3438+-6.5653 definitely 3.0516x faster
array-push-1 133.8845+-7.0349 ? 136.1775+-5.8327 ? might be 1.0171x slower
array-push-2 675.6555+-13.4645 145.8747+-6.4621 definitely 4.6318x faster
array-push-3 849.5284+-15.2540 253.4421+-9.1249 definitely 3.3520x faster

baseline patched

SixSpeed:

spread-literal.es5 90.3482+-6.6514 24.8123+-2.3304 definitely 3.6413x faster

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

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

(JSC::DFG::SpeculativeJIT::compileArrayPush):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):

  • jit/JITOperations.h:
  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncPush):

  • runtime/JSArray.cpp:

(JSC::JSArray::push):

  • runtime/JSArray.h:
  • runtime/JSArrayInlines.h:

(JSC::JSArray::pushInline):

5:54 PM Changeset in webkit [222674] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

REGRESSION: ASSERTION FAILED: m_provisionalURL.isEmpty() in WebKit::FrameLoadState::didStartProvisionalLoad
https://bugs.webkit.org/show_bug.cgi?id=177491

Patch by Alex Christensen <achristensen@webkit.org> on 2017-09-29
Reviewed by Andy Estes.

  • WebProcess/WebPage/WebFrame.cpp:

(WebKit::WebFrame::setUpWillSubmitFormListener):
(WebKit::WebFrame::continueWillSubmitForm):
(WebKit::WebFrame::invalidatePolicyListener):
Speculative fix for a flaky assertion.
Restore the clearing of the policy listeners we used to have when form submission was treated as a policy.

5:35 PM Changeset in webkit [222673] by Chris Dumez
  • 21 edits in trunk

http/tests/preconnect/link-rel-preconnect-https.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=177673

Reviewed by Alex Christensen.

Source/WebCore:

No new tests, unskipped test that is now passing consistently.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLink):

  • loader/LoaderStrategy.h:

Source/WebKit:

Update PreconnectTask to query the client when a certificate needs to be
validated. This allows WebKitTestRunner to ignore invalid certificates
and this causes http/tests/preconnect/link-rel-preconnect-https.html
to pass consistently.

To avoid duplicating code, PreconnectTask now uses NetworkLoad internally
instead of using a NetworkDataTask directly.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::preconnectTo):

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

(WebKit::generateCanAuthenticateIdentifier):
(WebKit::NetworkProcess::canAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::NetworkProcess::preconnectTo):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkResourceLoadParameters.cpp:

(WebKit::NetworkResourceLoadParameters::encode const):
(WebKit::NetworkResourceLoadParameters::decode):

  • NetworkProcess/PreconnectTask.cpp:

(WebKit::PreconnectTask::PreconnectTask):
(WebKit::PreconnectTask::~PreconnectTask):
(WebKit::PreconnectTask::willSendRedirectedRequest):
(WebKit::PreconnectTask::didReceiveResponse):
(WebKit::PreconnectTask::didReceiveBuffer):
(WebKit::PreconnectTask::didFinishLoading):
(WebKit::PreconnectTask::didFailLoading):
(WebKit::PreconnectTask::didSendData):
(WebKit::PreconnectTask::canAuthenticateAgainstProtectionSpaceAsync):
(WebKit::PreconnectTask::continueCanAuthenticateAgainstProtectionSpace):
(WebKit::PreconnectTask::frameID const):
(WebKit::PreconnectTask::pageID const):

  • NetworkProcess/PreconnectTask.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::preconnectTo):

  • WebProcess/Network/WebLoaderStrategy.h:

Source/WebKitLegacy:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

(WebResourceLoadScheduler::preconnectTo):

  • WebCoreSupport/WebResourceLoadScheduler.h:

LayoutTests:

  • http/tests/preconnect/link-rel-preconnect-https-expected.txt:

Rebaseline test now that it is passing.

  • platform/wk2/TestExpectations:

Uskip test as it should no longer be flaky.

5:29 PM Changeset in webkit [222672] by achristensen@apple.com
  • 5 edits in trunk

Expose WebPreferences::webGLEnabled through WKPreferences
https://bugs.webkit.org/show_bug.cgi?id=177692
<rdar://problem/24110556>

Reviewed by Andy Estes.

Source/WebKit:

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _setWebGLEnabled:]):
(-[WKPreferences _webGLEnabled]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Preferences.mm:

(-[AlertSaver alert]):
(-[AlertSaver webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):

4:48 PM Changeset in webkit [222671] by sbarati@apple.com
  • 7 edits
    1 add in trunk

Custom GetterSetterAccessCase does not use the correct slotBase when making call
https://bugs.webkit.org/show_bug.cgi?id=177639

Reviewed by Geoffrey Garen.

JSTests:

  • stress/custom-get-set-inline-caching-one-level-up-proto-chain.js: Added.

(assert):
(Class):
(items.forEach):
(set get for):

Source/JavaScriptCore:

The bug occurred when you had a custom set value. Custom set/get
values are passed the property holder, not the base of the access.
If we had an object chain like this:
o = {proto: thingWithCustomSetValue}

We would end up not providing thingWithCustomSetValue as the argument
to the PutValueFunc. The reason is, we would use generateConditionsForPrototypePropertyHitCustom
for custom sets. This would return to us an empty ConditionSet, because
the property holder was only one level up the prototype chain. The reason
is, it didn't generate a condition for the slot holder, because the
protocol for custom set/get is that if an object responds to a custom
setter/getter, it will continue to respond to that getter/setter for
the lifetime of that object. Therefore, it's not strictly necessary to
generate an OPC for the slot base for custom accesses. However, AccessCase
uses !m_conditionSet.isEmtpy() to indicate that the IC is doing a prototype
access. With the above object "o", we were doing a prototype access, but we
had an empty condition set. This lead us to passing the base instead of
the property holder to the custom set value function, which is incorrect.

With custom getters, we never called to into the generateConditionsForPrototypePropertyHitCustom
API. Gets would always call into generateConditionsForPrototypePropertyHit, which
will generate an OPC on the slot base, even if it isn't strictly necessary for custom accessors.
This patch simply removes generateConditionsForPrototypePropertyHitCustom
and aligns the set case with the get case. It makes us properly detect
when we're doing a prototype access with the above object "o". If we find
that generateConditionsForPrototypePropertyHitCustom was a worthwhile
optimization to have, we can re-introduce it. We'll just need to pipe through
a new notion of when we're doing prototype accesses that doesn't rely solely
on !m_conditionSet.isEmpty().

  • bytecode/ObjectPropertyConditionSet.cpp:

(JSC::generateConditionsForPrototypePropertyHitCustom): Deleted.

  • bytecode/ObjectPropertyConditionSet.h:
  • jit/Repatch.cpp:

(JSC::tryCachePutByID):

  • jsc.cpp:

(JSTestCustomGetterSetter::JSTestCustomGetterSetter):
(JSTestCustomGetterSetter::create):
(JSTestCustomGetterSetter::createStructure):
(customGetAccessor):
(customGetValue):
(customSetAccessor):
(customSetValue):
(JSTestCustomGetterSetter::finishCreation):
(GlobalObject::finishCreation):
(functionLoadGetterFromGetterSetter):
(functionCreateCustomTestGetterSetter):

  • runtime/PropertySlot.h:

(JSC::PropertySlot::setCustomGetterSetter):

4:42 PM Changeset in webkit [222670] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Extract logic to compute text to render into common function
https://bugs.webkit.org/show_bug.cgi?id=177607

Reviewed by Zalan Bujtas.

Currently we duplicate the logic to compute the text to render
throughout InlineTextBox. Instead we should move this common
code into a member function. This will allow us to audit the
the code paths that render text and ensure such code paths
account for hyphenation and combined text, if applicable.

Note that a TextRun does not own the text. The caller owns it.

No functionality changed. So, no new tests.

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::localSelectionRect const): Modified to
use text() and createTextRun() to compute the text to render
and the text run for it.
(WebCore::InlineTextBox::paint): Ditto.
(WebCore::InlineTextBox::paintSelection): Ditto. Additionally query
lineStyle() for the style of the line instead of requiring it to be
passed as an argument.
(WebCore::InlineTextBox::paintTextSubrangeBackground): Modified
to use text() and createTextRun() to compute the text to render
and the text run for it.
(WebCore::InlineTextBox::paintDocumentMarker): Ditto.
(WebCore::InlineTextBox::offsetForPosition const): Ditto.
(WebCore::InlineTextBox::positionForOffset const): Ditto.
(WebCore::InlineTextBox::createTextRun const): Added; formerly named constructTextRun.
(WebCore::InlineTextBox::text const): Added.
(WebCore::InlineTextBox::substringToRender const): Deleted.
(WebCore::InlineTextBox::hyphenatedStringForTextRun const): Deleted.
(WebCore::InlineTextBox::constructTextRun const): Deleted.

  • rendering/InlineTextBox.h:

(WebCore::InlineTextBox::substringToRender): Deleted.
(WebCore::InlineTextBox::hyphenatedStringForTextRun): Deleted.
(WebCore::InlineTextBox::constructTextRun): Deleted; renamed to createTextRun.

3:50 PM Changeset in webkit [222669] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

Remove SelectionSubtreeRoot::RenderSubtreesMap
https://bugs.webkit.org/show_bug.cgi?id=177685

Reviewed by Andy Estes.

This is in preparation of removing redundant SelectionSubtreeRoot.
(Now that we removed regions, RenderView is the only selection root)

No change in functionality.

  • rendering/RenderView.cpp:

(WebCore::RenderView::selectionBounds const):
(WebCore::RenderView::subtreeSelectionBounds const):
(WebCore::RenderView::repaintSelection const):
(WebCore::RenderView::repaintSubtreeSelection const):
(WebCore::RenderView::setSelection):
(WebCore::isValidObjectForNewSelection):
(WebCore::RenderView::clearSubtreeSelection const):
(WebCore::RenderView::applySubtreeSelection):
(WebCore::RenderView::updateSelectionForSubtrees): Deleted.

  • rendering/RenderView.h:
  • rendering/SelectionSubtreeRoot.h:
3:25 PM Changeset in webkit [222668] by Matt Lewis
  • 13 edits
    3 deletes in trunk

Unreviewed, rolling out r222652.

This broke an internal build.

Reverted changeset:

"Build libwebrtc unit tests executables"
https://bugs.webkit.org/show_bug.cgi?id=177211
http://trac.webkit.org/changeset/222652

3:08 PM Changeset in webkit [222667] by Chris Dumez
  • 10 edits in trunk/Source/WebKit

[WK2][NETWORK_SESSION] Move some authentication-related code to avoid duplication
https://bugs.webkit.org/show_bug.cgi?id=177667

Reviewed by Alex Christensen.

Move some authentication-related code to avoid duplication.
This is a preparation code supporting Download authentication
as Download uses a NSURLSessionDownloadTask and not a
NetworkDataTask.

  • NetworkProcess/NetworkDataTask.h:

(WebKit::NetworkDataTask::setSuggestedFilename):

  • NetworkProcess/NetworkLoad.cpp:

(WebKit::NetworkLoad::didReceiveChallenge):
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):

  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost):

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

(WebKit::PreconnectTask::didReceiveChallenge):

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

(WebKit::NetworkDataTaskCocoa::didReceiveChallenge):

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

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(WebKit::certificatesMatch):
(WebKit::NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost):

2:35 PM Changeset in webkit [222666] by achristensen@apple.com
  • 5 edits
    1 add in trunk

Fix WKWebViewConfigurationPrivate after r222663
https://bugs.webkit.org/show_bug.cgi?id=177644

Source/WebKit:

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Tools:

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

(TEST):

2:19 PM Changeset in webkit [222665] by commit-queue@webkit.org
  • 5 edits
    3 adds in trunk/Source/WebCore

[Curl] Extract a features to manage HTTP communication from ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=175148

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-09-29
Reviewed by Alex Christensen.

  • platform/Curl.cmake:
  • platform/network/curl/CurlRequest.cpp: Added.

(WebCore::CurlRequest::CurlRequest):
(WebCore::CurlRequest::setUserPass):
(WebCore::CurlRequest::start):
(WebCore::CurlRequest::startWithJobManager):
(WebCore::CurlRequest::cancel):
(WebCore::CurlRequest::suspend):
(WebCore::CurlRequest::resume):
(WebCore::CurlRequest::callDelegate):
(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::willSetupSslCtx):
(WebCore::CurlRequest::willSendData):
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didReceiveData):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::didCancelTransfer):
(WebCore::CurlRequest::resolveBlobReferences):
(WebCore::CurlRequest::setupPUT):
(WebCore::CurlRequest::setupPOST):
(WebCore::CurlRequest::setupFormData):
(WebCore::CurlRequest::invokeDidReceiveResponseForFile):
(WebCore::CurlRequest::invokeDidReceiveResponse):
(WebCore::CurlRequest::setPaused):
(WebCore::CurlRequest::willSetupSslCtxCallback):
(WebCore::CurlRequest::willSendDataCallback):
(WebCore::CurlRequest::didReceiveHeaderCallback):
(WebCore::CurlRequest::didReceiveDataCallback):

  • platform/network/curl/CurlRequest.h: Added.

(WebCore::CurlRequest::~CurlRequest):
(WebCore::CurlRequest::setDelegate):
(WebCore::CurlRequest::isSyncRequest):
(WebCore::CurlRequest::getNetworkLoadMetrics):

  • platform/network/curl/CurlRequestDelegate.h: Added.
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::cancel):
(WebCore::ResourceHandle::platformSetDefersLoading):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
(WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
(WebCore::ResourceHandle::receivedCancellation):

  • platform/network/curl/ResourceHandleCurlDelegate.cpp:

(WebCore::ResourceHandleCurlDelegate::ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::~ResourceHandleCurlDelegate):
(WebCore::ResourceHandleCurlDelegate::start):
(WebCore::ResourceHandleCurlDelegate::cancel):
(WebCore::ResourceHandleCurlDelegate::setDefersLoading):
(WebCore::ResourceHandleCurlDelegate::setAuthentication):
(WebCore::ResourceHandleCurlDelegate::dispatchSynchronousJob):
(WebCore::ResourceHandleCurlDelegate::createCurlRequest):
(WebCore::ResourceHandleCurlDelegate::cancelledOrClientless):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveResponse):
(WebCore::ResourceHandleCurlDelegate::curlDidReceiveBuffer):
(WebCore::ResourceHandleCurlDelegate::curlDidComplete):
(WebCore::ResourceHandleCurlDelegate::curlDidFailWithError):
(WebCore::ResourceHandleCurlDelegate::response):
(WebCore::ResourceHandleCurlDelegate::getCredential):
(WebCore::ResourceHandleCurlDelegate::retain): Deleted.
(WebCore::ResourceHandleCurlDelegate::release): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::didCompleteTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::didCancelTransfer): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupAuthentication): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveAllHeaders): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveContentData): Deleted.
(WebCore::ResourceHandleCurlDelegate::handleLocalReceiveResponse): Deleted.
(WebCore::ResourceHandleCurlDelegate::prepareSendData): Deleted.
(WebCore::ResourceHandleCurlDelegate::didFinish): Deleted.
(WebCore::ResourceHandleCurlDelegate::didFail): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupPOST): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupPUT): Deleted.
(WebCore::ResourceHandleCurlDelegate::getFormElementsCount): Deleted.
(WebCore::ResourceHandleCurlDelegate::setupFormData): Deleted.
(WebCore::ResourceHandleCurlDelegate::applyAuthentication): Deleted.
(WebCore::ResourceHandleCurlDelegate::getNetworkLoadMetrics): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSetupSslCtx): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveHeader): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveData): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSendData): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSetupSslCtxCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveHeaderCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::didReceiveDataCallback): Deleted.
(WebCore::ResourceHandleCurlDelegate::willSendDataCallback): Deleted.

  • platform/network/curl/ResourceHandleCurlDelegate.h:
2:14 PM Changeset in webkit [222664] by Chris Dumez
  • 32 edits
    1 copy
    4 moves
    1 add in trunk/Source

Split some logic out of VisitedLinkStore and make it reusable
https://bugs.webkit.org/show_bug.cgi?id=177575

Reviewed by Alex Christensen.

Source/WebCore:

Rename LinkHash to SharedStringHash to make it more reusable.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • css/StyleResolver.cpp:
  • dom/VisitedLinkState.cpp:

(WebCore::linkHashForElement):
(WebCore::VisitedLinkState::invalidateStyleForLink):
(WebCore::VisitedLinkState::determineLinkStateSlowCase):

  • dom/VisitedLinkState.h:
  • html/HTMLAnchorElement.h:

(WebCore::HTMLAnchorElement::visitedLinkHash const):

  • loader/EmptyClients.cpp:
  • loader/HistoryController.cpp:

(WebCore::addVisitedLink):

  • page/Page.cpp:

(WebCore::Page::invalidateStylesForLink):

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

(WebCore::VisitedLinkStore::invalidateStylesForLink):

  • page/VisitedLinkStore.h:
  • platform/SharedStringHash.cpp: Renamed from Source/WebCore/platform/LinkHash.cpp.

(WebCore::needsTrailingSlash):
(WebCore::computeSharedStringHashInline):
(WebCore::computeSharedStringHash):

  • platform/SharedStringHash.h: Renamed from Source/WebCore/platform/LinkHash.h.

(WebCore::SharedStringHashHash::hash):
(WebCore::SharedStringHashHash::equal):
(WebCore::SharedStringHashHash::avoidDeletedValue):

Source/WebKit:

Split some logic out of VisitedLinkStore and make it reusable for other purposes than
visited links and from other processes than the UIProcess.

The plan is to reuse the new SharedStringHashStore for Service Worker registration
on StorageProcess side and querying on WebContent process side.

  • CMakeLists.txt:
  • Shared/SharedStringHashStore.cpp: Added.

(WebKit::nextPowerOf2):
(WebKit::tableSizeForKeyCount):
(WebKit::SharedStringHashStore::SharedStringHashStore):
(WebKit::SharedStringHashStore::createSharedMemoryHandle):
(WebKit::SharedStringHashStore::add):
(WebKit::SharedStringHashStore::clear):
(WebKit::SharedStringHashStore::resizeTable):
(WebKit::SharedStringHashStore::pendingSharedStringHashesTimerFired):

  • Shared/SharedStringHashStore.h: Copied from Source/WebKit/WebProcess/WebPage/VisitedLinkTableController.h.

(WebKit::SharedStringHashStore::Client::~Client):
(WebKit::SharedStringHashStore::isEmpty const):

  • Shared/SharedStringHashTable.cpp: Renamed from Source/WebKit/Shared/VisitedLinkTable.cpp.

(WebKit::SharedStringHashTable::SharedStringHashTable):
(WebKit::SharedStringHashTable::~SharedStringHashTable):
(WebKit::SharedStringHashTable::setSharedMemory):
(WebKit::SharedStringHashTable::add):
(WebKit::SharedStringHashTable::contains const):
(WebKit::SharedStringHashTable::clear):

  • Shared/SharedStringHashTable.h: Renamed from Source/WebKit/Shared/VisitedLinkTable.h.
  • UIProcess/API/C/WKContext.cpp:

(WKContextAddVisitedLink):

  • UIProcess/API/Cocoa/_WKVisitedLinkStore.mm:

(-[_WKVisitedLinkStore addVisitedLinkWithURL:]):

  • UIProcess/VisitedLinkStore.cpp:

(WebKit::VisitedLinkStore::VisitedLinkStore):
(WebKit::VisitedLinkStore::addProcess):
(WebKit::VisitedLinkStore::addVisitedLinkHash):
(WebKit::VisitedLinkStore::removeAll):
(WebKit::VisitedLinkStore::addVisitedLinkHashFromPage):
(WebKit::VisitedLinkStore::sendStoreHandleToProcess):
(WebKit::VisitedLinkStore::didInvalidateSharedMemory):
(WebKit::VisitedLinkStore::didAddSharedStringHashes):

  • UIProcess/VisitedLinkStore.h:
  • UIProcess/WebProcessPool.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.h:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/VisitedLinkTableController.cpp:

(WebKit::VisitedLinkTableController::isLinkVisited):
(WebKit::VisitedLinkTableController::addVisitedLink):
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):

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

Source/WebKitLegacy/mac:

  • WebCoreSupport/WebVisitedLinkStore.h:
  • WebCoreSupport/WebVisitedLinkStore.mm:

(WebVisitedLinkStore::addVisitedLink):
(WebVisitedLinkStore::removeVisitedLink):
(WebVisitedLinkStore::isLinkVisited):
(WebVisitedLinkStore::addVisitedLinkHash):

Source/WebKitLegacy/win:

  • WebCoreSupport/WebVisitedLinkStore.cpp:

(WebVisitedLinkStore::addVisitedLink):
(WebVisitedLinkStore::isLinkVisited):
(WebVisitedLinkStore::addVisitedLinkHash):

  • WebCoreSupport/WebVisitedLinkStore.h:
1:50 PM Changeset in webkit [222663] by achristensen@apple.com
  • 4 edits in trunk/Source/WebKit

Add WKWebViewConfiguration SPI equivalent to WKPageConfigurationSetBackgroundCPULimit
https://bugs.webkit.org/show_bug.cgi?id=177644
<rdar://problem/34338698>

Reviewed by Geoffrey Garen.

WKPageConfigurationSetBackgroundCPULimit is a setter of a std::optional<double> with no accessor.
It's never set to 0 in practice, so I guess the ObjC equivalent is a double that is zero or nonzero.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _setCPULimit:]):
(-[WKWebViewConfiguration _cpuLimit]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
12:54 PM Changeset in webkit [222662] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32)
https://bugs.webkit.org/show_bug.cgi?id=177631
<rdar://problem/34729636>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-09-29
Reviewed by Matt Baker.

  • UserInterface/Views/OpenResourceDialog.css:

(.open-resource-dialog > .tree-outline.large .item):
(.open-resource-dialog > .tree-outline.large .item .icon):
(.open-resource-dialog .tree-outline.large .item .titles):
Make the rows large enough to fit the full 32x32 icon instead of a blurry 24x24.

12:47 PM Changeset in webkit [222661] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught exception with populate find keyboard shortcut
https://bugs.webkit.org/show_bug.cgi?id=177672

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-09-29
Reviewed by Matt Baker.

  • UserInterface/Base/Main.js:

The focusedContentView can be null so bail if that is the case.

12:32 PM Changeset in webkit [222660] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[WinCairo] Fix build after rev 222610
https://bugs.webkit.org/show_bug.cgi?id=177674

Reviewed by Per Arne Vollan.

No new tests. No change in behavior.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
11:53 AM Changeset in webkit [222659] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS] Remove unused pre-iOS 11 codepaths for writing to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=177669

Reviewed by Tim Horton.

Now that PlatformPasteboardIOS codepaths for writing data on drag and copy have been unified to both use
NSItemProviders, we can remove the legacy codepath that called -setItems on UIPasteboard, since nothing uses it
any more. No change in behavior.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
(WebCore::PlatformPasteboard::allowReadingURLAtIndex const):
(WebCore::PlatformPasteboard::readURL):
(WebCore::richTextRepresentationsForPasteboardWebContent): Deleted.

11:49 AM Changeset in webkit [222658] by commit-queue@webkit.org
  • 18 edits
    13 deletes in trunk

Unreviewed, rolling out r222563, r222565, and r222581.
https://bugs.webkit.org/show_bug.cgi?id=177675

"It causes a crash when playing youtube videos" (Requested by
saamyjoon on #webkit).

Reverted changesets:

"[DFG] Support ArrayPush with multiple args"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222563

"Unreviewed, build fix after r222563"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222565

"Unreviewed, fix x86 breaking due to exhausted registers"
https://bugs.webkit.org/show_bug.cgi?id=175823
http://trac.webkit.org/changeset/222581

11:48 AM Changeset in webkit [222657] by Chris Dumez
  • 2 edits in trunk/LayoutTests

Unreviewed, temporarily mark http/tests/preconnect/link-rel-preconnect-https.html as flaky.

  • platform/wk2/TestExpectations:
11:46 AM Changeset in webkit [222656] by rniwa@webkit.org
  • 25 edits
    9 adds in trunk

Image pasting is not working on tineye.com / gmail.com / GitHub.com due to lack of support for DataTransfer.items
https://bugs.webkit.org/show_bug.cgi?id=170449
<rdar://problem/31432525>

Reviewed by Wenson Hsieh.

Source/WebCore:

The bug was caused by image types in NSPasteboard or UIPasteboard not being treated as file items in dataTransfer.
Because there is no Web API to get binary data out of dataTransfer unlike text data, we need to treat any image
data as files even if they're entirely in the memory.

This patch introduces the notion of pasteboard types to be treated as files and expose them on dataTransfer.files
as well as dataTransfer.items of type "file". Because in-memory images are stored as TIFF in macOS and websites
don't typically support image/tiff, we convert all such in-memory TIFF images into PNG images ourselves for
a better web compatibility. This is done inside read(PasteboardFileReader&) in PasteboardCocoa.mm.

Note that PasteboardFileReader cannot directly have RefPtr<File> as a member variable as code in WebCore/platform
including Pasteboard code is not supposed to depend on WebCore types. WebCorePasteboardFileReader, a subclass of
PasteboardFileReader was introduced to resolve this reverse dependency.

In addition, this patch removes the restriction on dataTransfer.items that it only includes files of the supported
MIME types. This was unwarranted since 1. we don't have any restriction on what an user can drag & drop into a web
page via input element so there is no security benefit in this, and 2. the user should be able to copy & paste
whatever file he/she desires regardless of the MIME type on websites like Google Drive.

Tests: PasteImage

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCore/PlatformMac.cmake:
  • dom/DataTransfer.cpp:

(WebCore::DataTransfer::types const): Now excludes image/gif, image/png, image/jpeg, and image/tiff.
(WebCore::DataTransfer::files const): Add fake files we create for in-memory images but only when there are no real
files in the pasteboard since it's expensive to copy image data across UI/Web processes to create a blob URL.

  • dom/DataTransferItemList.cpp:

(WebCore::DataTransferItemList::ensureItems const): Just expose every file type. If the user had decided to paste
a file, it's okay for the page to access that file regardless of whether it's a zip file, JPEG image, etc...

  • editing/WebCorePasteboardFileReader.cpp:

(WebCorePasteboardFileReader::~WebCorePasteboardFileReader):
(WebCorePasteboardFileReader::read):

  • editing/WebCorePasteboardFileReader.h:

(WebCorePasteboardFileReader):

  • platform/Pasteboard.cpp:

(WebCore::PasteboardImage::PasteboardImage): Moved from platform specific translation units.
(WebCore::PasteboardImage::~PasteboardImage): Ditto.

  • platform/Pasteboard.h:

(PasteboardFileReader): Added.
(* platform/StaticPasteboard.h:
(StaticPasteboard::typesForBindings): Added.
(StaticPasteboard::typesTreatedAsFiles): Added. Returns an empty list we don't support the web content writing image
files into pasteboard at the moment.

  • platform/cocoa/PasteboardCocoa.mm: Added.

(WebCore::PasteboardWebContent::PasteboardWebContent): Moved from PasteboardMac.mm and PasteboardIOS.mm.
(WebCore::PasteboardWebContent::~PasteboardWebContent):
(WebCore::cocoaTypeToImageType): Added.
(WebCore::imageTypeToMIMEType): Added. Pretends to have image/png when the Cocoa type is image/tiff since most of
websites don't support image/tiff.
(WebCore::imageTypeToFakeFilename): Added.
(WebCore::mimeTypeToImageType): Added.
(WebCore::Pasteboard::shouldTreatCocoaTypeAsFile): Added. Pasteboard::typesForBindings excludes the type for which
this function returns true.
(WebCore::Pasteboard::typesTreatedAsFiles): Returns the list of all in-memory image types in the pasteboard.
(WebCore::Pasteboard::read): Added. On macOS, we convert TIFF to PNG for web compatibility. We don't do this rather
memory intensive coercion on iOS where most of apps like Photos put PNG file into the pasteboard in the first place.

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):

  • platform/ios/PasteboardIOS.mm:

(WebCore::addHTMLClipboardTypesForCocoaType):
(WebCore::Pasteboard::typesForBindings):
(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::Pasteboard::types): Deleted.

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Add "Files" to dataTransfer.types when there is an in-memory
image type in the pasteboard.

  • platform/mac/PasteboardMac.mm:

(WebCore::PasteboardWebContent::PasteboardWebContent): Deleted.
(WebCore::PasteboardWebContent::~PasteboardWebContent): Deleted.
(WebCore::PasteboardImage::PasteboardImage): Deleted.
(WebCore::PasteboardImage::~PasteboardImage): Deleted.
(WebCore::addHTMLClipboardTypesForCocoaType): Moved the check for the legacy NeXT plain text check here. Also add
"Files" to dataTransfer.types when there is an in-memory image type in the pasteboard.
(WebCore::Pasteboard::typesForBindings): Renamed from types.

  • platform/mac/PlatformPasteboardMac.mm:

(WebCore::safeTypeForDOMToReadAndWriteForPlatformType): Ditto to add "Files".

  • platform/win/PasteboardWin.cpp:

(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):

  • platform/wpe/PasteboardWPE.cpp:

(WebCore::Pasteboard::typesForBindings): Renamed from types.
(WebCore::Pasteboard::typesTreatedAsFiles):
(WebCore::Pasteboard::read):

Source/WebKit:

Add sandbox extensions for files in the pasteboard to make copying & pasting image files work.
This is what we do for drag & drop but we should consider adding a mechanism to rekoke the extension in the future.

  • UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:

(WebKit::WebPasteboardProxy::getPasteboardPathnamesForType): Add sandbox extensions to the pasted files.

  • UIProcess/WebPasteboardProxy.h:
  • UIProcess/WebPasteboardProxy.messages.in:
  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::getPathnamesForType): Consume the sandbox tokens sent by the UI process permanently
since WebCore will now create File objects for these pasted files.

Tools:

Added an API test to paste an image from pasteboard. The test is shared between iOS and macOS.

The tests to paste image files are only enabled on macOS since putting files into pasteboard isn't a thing on iOS.

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

(writeImageDataToPasteboard):
(writeBundleFileToPasteboard):

  • TestWebKitAPI/Tests/WebKitCocoa/paste-image.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-100px.tiff: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-200px.png: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-400px.gif: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/sunset-in-cupertino-600px.jpg: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm: Rebaselined the test now that types contain "Files".
11:37 AM Changeset in webkit [222655] by rniwa@webkit.org
  • 2 edits in trunk/LayoutTests

Re-enable more pasteboard tests on iOS after r222595
https://bugs.webkit.org/show_bug.cgi?id=177637

Reviewed by Wenson Hsieh.

  • platform/ios/TestExpectations:
11:33 AM Changeset in webkit [222654] by Wenson Hsieh
  • 14 edits in trunk

[iOS WK2] Implement -[WKContentView hasText] for compatibility with the UITextInput protocol
https://bugs.webkit.org/show_bug.cgi?id=177662
<rdar://problem/33410373>

Reviewed by Tim Horton.

Source/WebCore:

Adds a new TextIterator helper function to determine whether a Range has any plain text.

Tests: EditorStateTests.ContentViewHasTextInContentEditableElement

EditorStateTests.ContentViewHasTextInTextarea

  • editing/TextIterator.cpp:

(WebCore::hasAnyPlainText):

Add a new helper to determine whether a Range contains any plain text. While inspired by and very similar to the
plainText() helper function, this variant does not create a new string buffer when invoked, and is therefore
more efficient for the purposes of determining whether there is any plain text at all.

  • editing/TextIterator.h:

Source/WebKit:

Implements -[WKContentView hasText] by propagating a flag through post-layout editor state.

  • Shared/EditorState.cpp:

(WebKit::EditorState::PostLayoutData::encode const):
(WebKit::EditorState::PostLayoutData::decode):

  • Shared/EditorState.h:

Add a new flag to EditorState indicating whether or not the current editable root containing the selection has
any plain text. Add IPC support for this new flag.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView hasText]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::computeEditableRootHasContentAndPlainText):

Add a new helper to compute whether or not the editable root has any content, and any plain text. This
is used as the last cached value for -hasText on WKContentView that we will deliver to UIKit. Some important
things to note here:

  • If post layout data already indicates that we have selected some plain text, or that there is a plain text character near the selection, just set the flags to true and bail, since the editable root necessarily has content that is plain text.
  • If hasContent is false, don't even bother computing hasPlainText, because it must also be false.
  • Otherwise, use hasAnyPlainText to compute the value of hasPlainText, which is a faster variant of plainText.

These optimizations help us avoid doing extra work at all when running Speedometer, apart from checking the
values of a few PostLayoutData flags. This also fixes the value of hasContent, which was previously always false
if we had a range selection rather than a caret selection even when the editable root has content, because the
logic to compute the value of hasContent only existed in the branch where we have a caret selection.

(WebKit::WebPage::platformEditorState const):

Tools:

Add EditorState API tests to check that the value of -[WKContentView hasText] is correct when editing both plain
and rich text areas.

  • TestWebKitAPI/EditingTestHarness.h:
  • TestWebKitAPI/EditingTestHarness.mm:

(-[EditingTestHarness insertParagraph]):
(-[EditingTestHarness insertText:]):
(-[EditingTestHarness insertHTML:]):
(-[EditingTestHarness selectAll]):
(-[EditingTestHarness deleteBackwards]):

  • TestWebKitAPI/Tests/WebKitCocoa/EditorStateTests.mm:

Add versions of EditingTestHarness helpers that don't require us to expect any editor state after executing the
edit command.

(TestWebKitAPI::checkContentViewHasTextWithFailureDescription):
(TestWebKitAPI::TEST):

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

(-[TestWKWebView textInputContentView]):

10:50 AM Changeset in webkit [222653] by Alan Bujtas
  • 11 edits in trunk/Source/WebCore

Add WeakPtr support to RenderObject.
https://bugs.webkit.org/show_bug.cgi?id=177429
<rdar://problem/34625212>

Reviewed by Dean Jackson.

This is in preparation to start using weak pointers extensively in rendering.

No change in functionality.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadPlugin):

  • page/FrameView.cpp:

(WebCore::FrameView::updateEmbeddedObject):

  • rendering/RenderMultiColumnFlow.cpp:

(WebCore::RenderMultiColumnFlow::fragmentedFlowDescendantInserted):

  • rendering/RenderMultiColumnSpannerPlaceholder.h:
  • rendering/RenderObject.cpp:
  • rendering/RenderObject.h:

(WebCore::RenderObject::createWeakPtr):

  • rendering/RenderView.cpp:

(WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):
(WebCore::RenderView::RepaintRegionAccumulator::~RepaintRegionAccumulator):

  • rendering/RenderView.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::setWidgetGeometry):
(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::updateWidgetPosition):

  • rendering/RenderWidget.h:

(WebCore::RenderWidget::createWeakPtr): Deleted.

10:05 AM Changeset in webkit [222652] by commit-queue@webkit.org
  • 13 edits
    3 adds in trunk

Build libwebrtc unit tests executables
https://bugs.webkit.org/show_bug.cgi?id=177211

Patch by Youenn Fablet <youenn@apple.com> on 2017-09-29
Reviewed by Alex Christensen.

.:

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

Source/ThirdParty/libwebrtc:

Adding support for a new target called unittests that will be several executables.
Each executable run unit tests dedicated to a part of libwebrtc.

Adding one target/executable per unit test suite.
Adding one composite target to build all unit test targets.
Adding a target to build a static libwebrtctest library.
The static libwebrtctest library is then linked to each unit test executable which is also linked to libwebrtc dylib.

Some unit tests require a default codec (VP8) that is disabled in libwebrtc.
This ends up making some tests crashing.
An additional work should follow to execute only the meaningful subset of tests.

  • Configurations/libwebrtc-base.xcconfig: Added.
  • Configurations/libwebrtc-test-static.xcconfig: Added.
  • Configurations/rtc_pc_unittests.xcconfig: Added.
  • Source/third_party/gflags/gen/posix/include/private/config.h:
  • Source/webrtc/modules/audio_coding/neteq/tools/neteq_test.cc: Replacing FATAL by RTC_FATAL.
  • Source/webrtc/sdk/objc/Framework/Classes/Common/helpers.mm: Removing UIKit dependency.
  • Source/webrtc/test/gmock.h: Using googletest version instead of checking in testing folder.
  • Source/webrtc/test/gtest.h: Ditto.
  • Source/webrtc/test/rtp_file_reader.cc: Replacing FATAL by RTC_FATAL.
  • libwebrtc.xcodeproj/project.pbxproj:
9:47 AM Changeset in webkit [222651] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Unreviewed, rolling out r222625.
https://bugs.webkit.org/show_bug.cgi?id=177664

causes crashes on iOS (Requested by pizlo-mbp on #webkit).

Reverted changeset:

"Enable gigacage on iOS"
https://bugs.webkit.org/show_bug.cgi?id=177586
http://trac.webkit.org/changeset/222625

5:33 AM Changeset in webkit [222650] by cturner@igalia.com
  • 2 edits in trunk/Tools

Update my status.

Unreviewed.

  • Scripts/webkitpy/common/config/contributors.json:
3:22 AM Changeset in webkit [222649] by eocanha@igalia.com
  • 12 edits in trunk/Source/WebCore

[GStreamer] Refactor media player to use MediaTime consistently
https://bugs.webkit.org/show_bug.cgi?id=174817

Reviewed by Xabier Rodriguez-Calvar.

Make consistent use of the MediaTime class in the GStreamer media
player implementations.

This patch is authored by Charlie Turner <cturner@igalia.com> plus
some minor modifications by Enrique: migration of m_cachedPosition,
usage of m_seekTime as MediaTime in the MSE player and more logging
using toString().

Covered by existing tests.

  • platform/graphics/gstreamer/GStreamerUtilities.cpp:

(WebCore::toGstUnsigned64Time): Scales MediaTime to the precision used
by GStreamer and returns a value compatible with GstClockTime.
(WebCore::toGstClockTime): Deleted.

  • platform/graphics/gstreamer/GStreamerUtilities.h:

(WebCore::toGstClockTime): Inlined, now it takes MediaTime and converts
to GstClockTime.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

Several changes to use MediaTime instead of float and to log MediaTime
values converting them toString().
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition const):
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::currentMediaTime const):
(WebCore::MediaPlayerPrivateGStreamer::seek): Uses MediaTime.
(WebCore::MediaPlayerPrivateGStreamer::doSeek):
(WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
(WebCore::MediaPlayerPrivateGStreamer::buffered const):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
(WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
(WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates):
(WebCore::MediaPlayerPrivateGStreamer::didEnd):
(WebCore::MediaPlayerPrivateGStreamer::durationChanged):
(WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable const): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Changed

seek(), playBackposition(), m_cachedPosition, m_durationAtEOS,
m_seekTime and m_timeOfOverlappingSeek to be of MediaTime type.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Prefer the methods based on MediaTime over those based on fload/double.
(WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded const):

  • platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:

(WebCore::GStreamerMediaSample::offsetTimestampsBy): toGstClockTime()
now can handle MediaTime.

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

Several changes to use MediaTime instead of float and to log MediaTime
values converting them toString().
(WebCore::MediaPlayerPrivateGStreamerMSE::seek):
(WebCore::MediaPlayerPrivateGStreamerMSE::notifySeekNeedsDataForTime):
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::maybeFinishSeek):
(WebCore::MediaPlayerPrivateGStreamerMSE::isTimeBuffered const):
(WebCore::MediaPlayerPrivateGStreamerMSE::durationChanged):
(WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
(WebCore::MediaPlayerPrivateGStreamerMSE::maxTimeSeekable const):

  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:

seek() now takes a MediaTime argument.

  • platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:

(WebCore::PlaybackPipeline::enqueueSample): Use MediaTime values in
MediaSample.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webKitMediaSrcQueryWithParent): Use MediaTime values in
durationMediaTime().

12:34 AM Changeset in webkit [222648] by Dewei Zhu
  • 8 edits in trunk/Websites/perf.webkit.org

Update syncing script to be able to build binary for commit set with owned commits.
https://bugs.webkit.org/show_bug.cgi?id=177225

Reviewed by Ryosuke Niwa.

Added support for syncing script to be able to schedule builds to build binary for owned commits.
Introduces 'ifRepositorySet' and 'ownedRevisions' in 'buildProperties'.
'ifRepositorySet' will conditionaly set a build property if at least one of the repositories it specified requires build.
'ownedRevisions' specifies owned commits revision informations.

  • public/v3/models/commit-set.js:

(CommitSet): Added '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype.updateSingleton): Reset '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype._updateFromObject): Only update '_repositoryToCommitOwnerMap' and '_ownerRepositoryToOwnedRepositoriesMap' when 'commitOwner' exists.
(CommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
(CommitSet.prototype.ownedRepositoriesForOwnerRepository): Returns owned repositories given a owner repository.
(CustomCommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.

  • public/v3/models/triggerable.js:

(prototype.accepts): It should only check against top-level repositories. Removed a deprecated 'FIXME'.

  • server-tests/tools-sync-buildbot-integration-tests.js: Added unit test for building owned commits binary.

(createTriggerable): Added conditional 'ifRepositorySet' and 'ownedRevisions' in the repository groups.

  • tools/js/buildbot-syncer.js:

(BuildbotSyncer.prototype._propertiesForBuildRequest):

Added logic to conditionaly create build property for 'ifRepositorySet'.
Added logic to create 'ownedRevisions' based on the owner repositories it specified.

(BuildbotSyncer._parseRepositoryGroup): Build property template should be able to handle 'ifRepositorySet' and 'ownedRevisions'.

  • unit-tests/buildbot-syncer-tests.js: Added unit tests for 'ifRepositorySet' and 'ownedRevisions'.
  • unit-tests/commit-set-tests.js: Added unit tests for 'topLevelRepositoriesSortedByNamePreferringOnesWithURL'.
  • unit-tests/resources/mock-v3-models.js: Added a repository group contains 'ios', 'webkit' and 'ownerRepository'.
Note: See TracTimeline for information about the timeline view.