WebKit-https.git
17 months agoUpdate StyleBench version number in page title to 0.3
antti@apple.com [Thu, 8 Mar 2018 10:58:10 +0000 (10:58 +0000)]
Update StyleBench version number in page title to 0.3

* StyleBench/index.html:

There has been a bunch of changes, most notably the addition of attribute selector test step.

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

17 months ago[iOS] Update PNG expectations for some MathML pixel tests.
fred.wang@free.fr [Thu, 8 Mar 2018 10:51:38 +0000 (10:51 +0000)]
[iOS] Update PNG expectations for some MathML pixel tests.

Unreviewed test gardening.

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-08

* platform/ios/TestExpectations: Remove ImageOnlyFailure for pixel tests, add reference to
bug 183441 for the reftest.
* platform/ios/mathml/opentype/opentype-stretchy-expected.png: Update expectation.
* platform/ios/mathml/presentation/menclose-notation-values-expected.png: Ditto.
* platform/ios/mathml/presentation/mo-stretch-expected.png: Ditto.
* platform/ios/mathml/presentation/roots-expected.png: Ditto.
* platform/ios/mathml/radical-fallback-expected.png: Ditto.

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

17 months ago[WPE] Update expectations for API tests
Ms2ger@igalia.com [Thu, 8 Mar 2018 10:31:25 +0000 (10:31 +0000)]
[WPE] Update expectations for API tests
https://bugs.webkit.org/show_bug.cgi?id=183434

Unreviewed test gardening.

* TestWebKitAPI/glib/TestExpectations.json:

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

17 months agoDon't have Celestial in minimal simulator configuration
timothy_horton@apple.com [Thu, 8 Mar 2018 09:18:54 +0000 (09:18 +0000)]
Don't have Celestial in minimal simulator configuration
https://bugs.webkit.org/show_bug.cgi?id=183432
<rdar://problem/38252985>

Reviewed by Dan Bernstein.

* wtf/Platform.h:

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

17 months agoStop linking ApplicationServices directly
timothy_horton@apple.com [Thu, 8 Mar 2018 08:28:38 +0000 (08:28 +0000)]
Stop linking ApplicationServices directly
https://bugs.webkit.org/show_bug.cgi?id=182867
<rdar://problem/38252142>

Reviewed by Alex Christensen.

The frameworks that we use that live inside ApplicationServices
have mostly moved out, so import them directly.

Source/WebCore:

* Configurations/WebCore.xcconfig:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/CanvasRenderingContext2DBase.cpp:
* platform/MIMETypeRegistry.cpp:
* platform/graphics/ComplexTextController.cpp:
* platform/graphics/cg/ColorCG.cpp:
* platform/graphics/cg/ImageDecoderCG.cpp:
* platform/graphics/cg/UTIRegistry.cpp:
* platform/graphics/cocoa/FontCocoa.mm:
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
* platform/graphics/mac/GlyphPageMac.cpp:
* platform/graphics/mac/PDFDocumentImageMac.mm:
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
* platform/graphics/win/FontCGWin.cpp:
* platform/graphics/win/FontCacheWin.cpp:
* platform/graphics/win/FontCustomPlatformData.cpp:
* platform/graphics/win/FontPlatformDataCGWin.cpp:
* platform/graphics/win/ImageCGWin.cpp:
* platform/graphics/win/SimpleFontDataCGWin.cpp:

Source/WebKit:

* Configurations/WebKit.xcconfig:

Source/WebKitLegacy/mac:

* Carbon/CarbonUtils.h:
* WebKitPrefix.h:
* WebView/WebHTMLView.mm:
* WebView/WebPDFView.mm:

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:

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

17 months ago[Extra zoom mode] Specify password mode as needed when inputting text
wenson_hsieh@apple.com [Thu, 8 Mar 2018 08:16:10 +0000 (08:16 +0000)]
[Extra zoom mode] Specify password mode as needed when inputting text
https://bugs.webkit.org/show_bug.cgi?id=183428
<rdar://problem/37609386>

Reviewed by Tim Horton.

If the focused element is a password field, or the input delegate has forced secure text entry, set a flag on
the text input view controller to opt in to password text input mode.

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

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

17 months agoSort and separate FeatureDefines.xcconfig
timothy_horton@apple.com [Thu, 8 Mar 2018 07:14:42 +0000 (07:14 +0000)]
Sort and separate FeatureDefines.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=183427

Reviewed by Dan Bernstein.

* Configurations/FeatureDefines.xcconfig:
Sort and split FeatureDefines into paragraphs
(to make it easier to sort later).

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

17 months ago[WTF] Set canInitializeWithMemset = true if T is an integral type
utatane.tea@gmail.com [Thu, 8 Mar 2018 06:44:42 +0000 (06:44 +0000)]
[WTF] Set canInitializeWithMemset = true if T is an integral type
https://bugs.webkit.org/show_bug.cgi?id=183357

Reviewed by Darin Adler.

This patch set `canInitializeWithMemset = true` if T is an integral type.
This can offer a chance to use memset if we use UniqueArray<T> where T is
an integral type. We also rename VectorTypeOperations::initialize to
VectorTypeOperations::initializeIfNonPOD, VectorTypeOperations::forceInitialize
to VectorTypeOperations::initialize respectively.

* wtf/RefCountedArray.h:
(WTF::RefCountedArray::RefCountedArray):
* wtf/UniqueArray.h:
* wtf/Vector.h:
(WTF::VectorTypeOperations::initializeIfNonPOD):
(WTF::VectorTypeOperations::initialize):
(WTF::Vector::Vector):
(WTF::Malloc>::resize):
(WTF::Malloc>::grow):
(WTF::VectorTypeOperations::forceInitialize): Deleted.
* wtf/VectorTraits.h:

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

17 months agoREGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherw...
carlosgc@webkit.org [Thu, 8 Mar 2018 06:37:41 +0000 (06:37 +0000)]
REGRESSION(r218089): [GTK] webkit_web_view_get_inspector() needs to be called, otherwise inspector does not close
https://bugs.webkit.org/show_bug.cgi?id=181126

Reviewed by Carlos Alberto Lopez Perez.

Fix the condition to decide whether to detach the inspector view ourselves.

* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformDetach): Remove the inspector view from its parent if we don't have a client
or the client didn't detach it.

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

17 months ago[GTK][WPE] Leak checker is not working in WebKitGLib web process tests
carlosgc@webkit.org [Thu, 8 Mar 2018 06:34:36 +0000 (06:34 +0000)]
[GTK][WPE] Leak checker is not working in WebKitGLib web process tests
https://bugs.webkit.org/show_bug.cgi?id=183404

Reviewed by Michael Catanzaro.

Source/WebKit:

Add private helper for testing to do a garbage collection when the page is closing.

* WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
(webkitWebExtensionSetGarbageCollectOnPageDestroy):
* WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h:
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMClientRectList.h: Fix annotation of
webkit_dom_client_rect_list_item(), it should be transfer full.

Tools:

This might have regressed when we started to use the JSC garbage collector timers. The thing is that we expect
that the WebProcessTester object that we expose to JavaScript is released when the web frame is destroyed, but
that's no longer the case. On window object cleared a GC is scheduled, but JSC timers do the actual garbage
collection later. In the case of tests that never happens because the web process finishes quickly after the
test. We need to force a garbage collection at some point when the web page is destroyed. We can't use the
WebKitWebPage destroy signal, since we are also checking that WebKitWebPage isn't leaked. The
API::InjectedBundle::Client::willDestroyPage() always happen when the page is closed, even if WebKitWebPage is
still alive, so we can force the GC at that point. The only problem is that the frame is detached right after
that point, so we can't check WebKitFrame leaks. The only frame in the tests is the main one, so we can assume
that if WebKitWebPage is released, the frame is too.

* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::testMainFrame): Stop checking we don't leak WebKitFrame.
(WebKitFrameTest::testURI): Ditto.
(WebKitFrameTest::testJavaScriptContext): Ditto.
* TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
(testWebKitFrameMainFrame): Use new WebViewTest::runWebProcessTest() API.
(testWebKitFrameURI): Ditto.
(testWebKitFrameJavaScriptContext): Ditto.
(webkitFrameTestRun): Deleted.
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(runTest): We no longer need the special case for dom-cache test.
(windowObjectClearedCallback): Only expose test runner object to JavaScript when loading tests.
(webkit_web_extension_initialize): Call webkitWebExtensionSetGarbageCollectOnPageDestroy() to ensure a garbage
collection is performed when the page is closing.
* TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
(WebKitDOMClientRectTest::testDivClientRectsPositionAndLength): Fix memory leak,
webkit_dom_client_rect_list_item() returns a full reference.
* TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:
(testWebProcessAutocleanups):Use new WebViewTest::runWebProcessTest() API.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:
(testWebKitDOMClientRectDivBoundingClientRectPosition): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMClientRectDivClientRectsPositionAndLength): Use new WebViewTest::runWebProcessTest() API.
(prepareDOMForClientRectPositionTests): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:
(testWebKitDOMNodeHierarchyNavigation): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMNodeInsertion): Ditto.
(testWebKitDOMNodeTagNamesNodeList): Ditto.
(testWebKitDOMNodeTagNamesHTMLCollection): Ditto.
(testWebKitDOMObjectCache): We no longer need to run the test several times, since runWebProcessTest() loads
about blank after every test.
(prepareDOMForTagNamesTests): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:
(testWebKitDOMNodeFilterTreeWalker): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMNodeFilterNodeIterator): Ditto.
(runTest): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:
(testWebKitDOMXPathNSResolverNative): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMXPathNSResolverCustom): Ditto.
* TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp:
(testWebKitWebEditorSelectionChanged): Use new WebViewTest::runWebProcessTest() API.
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::runWebProcessTest): It now receives the contents, so it automatically loads the view using
"webprocess://test" as base URI, used to detect tests in the web process. It also loads about:blank after every
test to ensure that window object is cleared.
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:

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

17 months agoUnreviewed, fix 32-bit build.
keith_miller@apple.com [Thu, 8 Mar 2018 04:18:50 +0000 (04:18 +0000)]
Unreviewed, fix 32-bit build.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOMGetter):

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

17 months agoInvalid innerTextRenderer in RenderTextControlSingleLine::styleDidChange()
zalan@apple.com [Thu, 8 Mar 2018 03:51:33 +0000 (03:51 +0000)]
Invalid innerTextRenderer in RenderTextControlSingleLine::styleDidChange()
https://bugs.webkit.org/show_bug.cgi?id=183385
<rdar://problem/38085397>

Reviewed by Antti Koivisto.

Source/WebCore:

When HTMLInputElement::updateType() is called with a dirty value, we eagerly change the m_inputType first
and then we take care of the dirty value by calling setAttributeWithoutSynchronization().
With a DOMSubtreeModified event listener attached, setAttributeWithoutSynchronization() can end up running some
layout code (offsetHeight) with a renderer - m_inputType mismatch.

This patch ensures that we don't change the m_inputType until after we finished setting the new value.

Test: fast/DOM/HTMLInputElement/input-value-and-type-change-crash.html

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):

LayoutTests:

* fast/DOM/HTMLInputElement/input-value-and-type-change-crash-expected.txt: Added.
* fast/DOM/HTMLInputElement/input-value-and-type-change-crash.html: Added.

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

17 months agoGet rid of custom bindings for History's replaceState() / pushState()
cdumez@apple.com [Thu, 8 Mar 2018 03:31:01 +0000 (03:31 +0000)]
Get rid of custom bindings for History's replaceState() / pushState()
https://bugs.webkit.org/show_bug.cgi?id=183372

Reviewed by Youenn Fablet.

Get rid of custom bindings for History's replaceState() / pushState() by
moving the cached state from the wrapper to the History implementation
object.

No new tests, no web-facing behavior change.

* bindings/js/JSHistoryCustom.cpp:
(WebCore::JSHistory::state const):
(WebCore::JSHistory::visitAdditionalChildren):
* page/History.cpp:
(WebCore::History::cachedState):
(WebCore::History::stateObjectAdded):
* page/History.h:
(WebCore::History::pushState):
(WebCore::History::replaceState):
* page/History.idl:

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

17 months agoMeta-program setupArguments and callOperation
keith_miller@apple.com [Thu, 8 Mar 2018 02:26:55 +0000 (02:26 +0000)]
Meta-program setupArguments and callOperation
https://bugs.webkit.org/show_bug.cgi?id=183263

Rubber-stamped by Filip Pizlo.

Source/JavaScriptCore:

This patch removes all the custom overrides of callOperation and setupArguments
throughout the JITs. In their place there is a new setupArguments that marshalls
the arguments into place based on the type of the operation's function pointer.
There were a couple of design choices in the implementation of setupArguments:

1) We assume that no TrustedImm floating point values are passed.
2) If ExecState* is the first argument the callFrameRegister should be marshalled implicitly.
3) Types should not be implicitly converted (with the exception of DFG::RegisteredStructure -> Structure*)

The new callOperation/setupArguments do their best to make sure
it's hard to call a function with the wrong parameters. They will
only try to pattern match if the types match up with the next
passed argument. Additionally, the base case should static_assert
of the number of inferred arguments does not match the arity of
the operation's function pointer.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
(JSC::AbstractMacroAssembler::TrustedImmPtr::asPtr):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::poke):
(JSC::MacroAssembler::move):
* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::swap):
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::storeDouble):
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::loadDouble):
(JSC::MacroAssemblerX86Common::swap):
(JSC::MacroAssemblerX86Common::move):
* bytecode/AccessCase.cpp:
(JSC::AccessCase::generateImpl):
* bytecode/AccessCaseSnippetParams.cpp:
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessGenerationState::emitExplicitExceptionHandler):
* dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
* dfg/DFGNode.h:
* dfg/DFGOSRExit.cpp:
(JSC::DFG::OSRExit::emitRestoreArguments):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::osrWriteBarrier):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGSlowPathGenerator.h:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithDoubleUnaryOp):
(JSC::DFG::SpeculativeJIT::compileArithMod):
(JSC::DFG::SpeculativeJIT::compileArithRounding):
(JSC::DFG::SpeculativeJIT::compileArithSqrt):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):
(JSC::DFG::SpeculativeJIT::compileCallDOMGetter):
(JSC::DFG::SpeculativeJIT::emitSwitchStringOnString):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::TrustedImmPtr):
(JSC::DFG::SpeculativeJIT::TrustedImmPtr::operator MacroAssembler::TrustedImm const):
(JSC::DFG::SpeculativeJIT::initConstantInfo):
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::callOperationWithCallFrameRollbackOnException):
(JSC::DFG::SpeculativeJIT::callCustomGetter): Deleted.
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLSlowPathCall.h:
(JSC::FTL::callOperation):
* jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
* jit/CCallHelpers.cpp:
(JSC::CCallHelpers::ensureShadowChickenPacket):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgument):
(JSC::CCallHelpers::setupStubArgs):
(JSC::CCallHelpers::ArgCollection::ArgCollection):
(JSC::CCallHelpers::ArgCollection::pushRegArg):
(JSC::CCallHelpers::ArgCollection::addGPRArg):
(JSC::CCallHelpers::ArgCollection::addStackArg):
(JSC::CCallHelpers::ArgCollection::addPoke):
(JSC::CCallHelpers::ArgCollection::argCount):
(JSC::CCallHelpers::clampArrayToSize):
(JSC::CCallHelpers::pokeForArgument):
(JSC::CCallHelpers::marshallArgumentRegister):
(JSC::CCallHelpers::setupArgumentsImpl):
(JSC::CCallHelpers::std::is_integral<CURRENT_ARGUMENT_TYPE>::value):
(JSC::CCallHelpers::std::is_pointer<CURRENT_ARGUMENT_TYPE>::value):
(JSC::CCallHelpers::setupArguments):
(JSC::CCallHelpers::prepareForTailCallSlow):
(JSC::CCallHelpers::setupArgumentsWithExecState): Deleted.
(JSC::CCallHelpers::resetCallArguments): Deleted.
(JSC::CCallHelpers::addCallArgument): Deleted.
(JSC::CCallHelpers::setupArgumentsExecState): Deleted.
(JSC::CCallHelpers::setupTwoStubArgsGPR): Deleted.
(JSC::CCallHelpers::setupThreeStubArgsGPR): Deleted.
(JSC::CCallHelpers::setupFourStubArgsGPR): Deleted.
(JSC::CCallHelpers::setupFiveStubArgsGPR): Deleted.
(JSC::CCallHelpers::setupTwoStubArgsFPR): Deleted.
(JSC::CCallHelpers::setupStubArguments): Deleted.
(JSC::CCallHelpers::setupArgumentsWithExecStateForCallWithSlowPathReturnType): Deleted.
(JSC::CCallHelpers::setupStubArguments134): Deleted.
(JSC::CCallHelpers::setupStubArgsGPR): Deleted.
* jit/FPRInfo.h:
(JSC::toInfoFromReg):
* jit/GPRInfo.h:
(JSC::JSValueRegs::JSValueRegs):
(JSC::toInfoFromReg):
* jit/JIT.h:
(JSC::JIT::callOperation):
(JSC::JIT::callOperationWithProfile):
(JSC::JIT::callOperationWithResult):
(JSC::JIT::callOperationNoExceptionCheck):
(JSC::JIT::callOperationWithCallFrameRollbackOnException):
* jit/JITArithmetic.cpp:
(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):
* jit/JITArithmetic32_64.cpp:
(JSC::JIT::emit_compareAndJumpSlow):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileSetupVarargsFrame):
* jit/JITInlines.h:
(JSC::JIT::callOperation): Deleted.
(JSC::JIT::callOperationNoExceptionCheck): Deleted.
(JSC::JIT::callOperationWithCallFrameRollbackOnException): Deleted.
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_array_with_size):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_instanceof):
(JSC::JIT::emitSlow_op_instanceof_custom):
(JSC::JIT::emit_op_set_function_name):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emit_op_throw):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::emit_op_switch_char):
(JSC::JIT::emit_op_switch_string):
(JSC::JIT::emitSlow_op_has_indexed_property):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_get_from_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_by_index):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emit_op_put_getter_by_val):
(JSC::JIT::emit_op_put_setter_by_val):
(JSC::JIT::emit_op_del_by_id):
(JSC::JIT::emit_op_del_by_val):
(JSC::JIT::emitGetByValWithCachedId):
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JIT::emitPutByValWithCachedId):
(JSC::JIT::emitSlow_op_put_by_val):
(JSC::JIT::emitSlow_op_try_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id):
(JSC::JIT::emitSlow_op_get_by_id_with_this):
(JSC::JIT::emitSlow_op_put_by_id):
(JSC::JIT::emitSlow_op_get_from_scope):
* jit/RegisterSet.h:
(JSC::RegisterSet::RegisterSet):
* jit/ThunkGenerators.cpp:
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
* jsc.cpp:
(GlobalObject::finishCreation):
(functionBreakpoint):
* runtime/JSCJSValue.h:
* wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):

Source/WTF:

Add a new function traits struct that provides interesting
information about the provided function pointer. Right now it only
provides information for function pointers, in theory we could
also get it to work for other types.

* WTF.xcodeproj/project.pbxproj:
* wtf/Bitmap.h:
(WTF::WordType>::Bitmap):
* wtf/CMakeLists.txt:
* wtf/FunctionTraits.h: Added.
(WTF::slotsForCCallArgument):
(WTF::computeCCallSlots):
(WTF::FunctionTraits<Result):

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

17 months agoMatch unsupported plugins based on domains and not origin
youenn@apple.com [Thu, 8 Mar 2018 02:06:39 +0000 (02:06 +0000)]
Match unsupported plugins based on domains and not origin
https://bugs.webkit.org/show_bug.cgi?id=183384

Reviewed by Chris Dumez.

Source/WebCore:

Move from an origin-keyed map to a vector of plugins.
We iterate through the vector and a match happens if the page host name ends with the provided matching domain.
This allows supporting rules for *.mydomain.com by passing 'mydomain.com'.
Covered by existing tests.
We are not testing subdomains like www.localhost since there is no support in our CI but this is tested through Unit tests.

* loader/EmptyClients.cpp:
* platform/URL.cpp:
(WebCore::URL::isMatchingDomain const):
* platform/URL.h:
* plugins/PluginData.h:
(WebCore::isSupportedPlugin):
(WebCore::SupportedPluginName::decode):
(WebCore::SupportedPluginName::encode const):
* plugins/PluginInfoProvider.h:

Source/WebKit:

Moved from a HashMap of plugins to a Vector of plugins since we cannot match exactly based on the origin.

* Scripts/webkit/messages.py:
* UIProcess/API/C/WKContext.cpp:
(WKContextAddSupportedPlugin):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _addSupportedPlugin:named:withMimeTypes:withExtensions:]):
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::isSupportedPlugin):
(WebKit::PluginInfoStore::supportedPluginNames):
(WebKit::PluginInfoStore::addSupportedPlugin):
* UIProcess/Plugins/PluginInfoStore.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::addSupportedPlugin):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getPlugins):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/Plugins/WebPluginInfoProvider.cpp:
(WebKit::WebPluginInfoProvider::getPluginInfo):
(WebKit::WebPluginInfoProvider::getWebVisiblePluginInfo):
* WebProcess/Plugins/WebPluginInfoProvider.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPluginInfoProvider.h:
* WebCoreSupport/WebPluginInfoProvider.mm:
(WebPluginInfoProvider::getPluginInfo):
(WebPluginInfoProvider::getWebVisiblePluginInfo):

Tools:

* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPluginSupportedMode): Update to whitelist
localhost and not http://localhost:8080

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

17 months agoUpdate to libwebrtc revision 4e70a72571dd26b85c2385e9c618e343428df5d3
youenn@apple.com [Thu, 8 Mar 2018 01:33:08 +0000 (01:33 +0000)]
Update to libwebrtc revision 4e70a72571dd26b85c2385e9c618e343428df5d3
https://bugs.webkit.org/show_bug.cgi?id=180843

Unreviewed.
Removed empty unused files.

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

17 months agoShuffle around some feature flags for minimal simulator mode
timothy_horton@apple.com [Thu, 8 Mar 2018 01:15:08 +0000 (01:15 +0000)]
Shuffle around some feature flags for minimal simulator mode
https://bugs.webkit.org/show_bug.cgi?id=183419
<rdar://problem/37694987>

Reviewed by Beth Dakin.

* wtf/FeatureDefines.h:
* wtf/Platform.h:

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

17 months agoREGRESSION (r229093): Media playback on Facebook and Hulu require mDNSResponder access
bfulgham@apple.com [Thu, 8 Mar 2018 00:39:19 +0000 (00:39 +0000)]
REGRESSION (r229093): Media playback on Facebook and Hulu require mDNSResponder access
https://bugs.webkit.org/show_bug.cgi?id=183421
<rdar://problem/38191574>

Reviewed by Dean Jackson.

CoreMedia fails to properly play back media on Facebook and Hulu if access to the
mDNSResponder is blocked by the sandbox. This Bug unblocks that access while we
investigate the underlying issue.

* WebProcess/com.apple.WebProcess.sb.in:

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

17 months agoUpdate to libwebrtc revision 4e70a72571dd26b85c2385e9c618e343428df5d3
youenn@apple.com [Thu, 8 Mar 2018 00:32:22 +0000 (00:32 +0000)]
Update to libwebrtc revision 4e70a72571dd26b85c2385e9c618e343428df5d3
https://bugs.webkit.org/show_bug.cgi?id=180843

Unreviewed.
Removed folder as it is now unused and is confusing mac internal bots.

* Source/webrtc/base: Removed.

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

17 months agoBetter build fix for watchOS and tvOS.
dino@apple.com [Thu, 8 Mar 2018 00:24:55 +0000 (00:24 +0000)]
Better build fix for watchOS and tvOS.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
* UIProcess/SystemPreviewController.cpp:

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

17 months agoUpdate TestExpectations for media/modern-media-controls/fullscreen-support/fullscreen...
ryanhaddad@apple.com [Thu, 8 Mar 2018 00:23:24 +0000 (00:23 +0000)]
Update TestExpectations for media/modern-media-controls/fullscreen-support/fullscreen-support-press.html.
https://bugs.webkit.org/show_bug.cgi?id=173946

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

17 months agoTry to fix build for watchOS and tvOS.
dino@apple.com [Thu, 8 Mar 2018 00:18:10 +0000 (00:18 +0000)]
Try to fix build for watchOS and tvOS.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
* UIProcess/SystemPreviewController.cpp:

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

17 months agowebkitpy: Allow apple_additions() to define additional ports
jbedard@apple.com [Thu, 8 Mar 2018 00:16:54 +0000 (00:16 +0000)]
webkitpy: Allow apple_additions() to define additional ports
https://bugs.webkit.org/show_bug.cgi?id=183412
<rdar://problem/38232353>

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/factory.py:
(PortFactory.get): Allow apple_additions to define port classes to be used
in run-webkit-tests.

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

17 months agowebkitpy: Remove obsolete function from MockAppleAdditions
jbedard@apple.com [Thu, 8 Mar 2018 00:13:29 +0000 (00:13 +0000)]
webkitpy: Remove obsolete function from MockAppleAdditions
https://bugs.webkit.org/show_bug.cgi?id=183415
<rdar://problem/38236407>

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/port_testcase.py:
(bind_mock_apple_additions.MockAppleAdditions):
(bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Deleted.
(bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Deleted.

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

17 months agowebkitpy: --dedicated-simulators does not boot the correct number of simulators
jbedard@apple.com [Thu, 8 Mar 2018 00:07:26 +0000 (00:07 +0000)]
webkitpy: --dedicated-simulators does not boot the correct number of simulators
https://bugs.webkit.org/show_bug.cgi?id=183409
<rdar://problem/38224631>

Reviewed by Aakash Jain.

* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.default_child_processes): When not using dedicated simulators,
we should use the number of booted simulators as our default child processes.

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

17 months agofix-180843
youenn@apple.com [Wed, 7 Mar 2018 23:22:15 +0000 (23:22 +0000)]
fix-180843

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

17 months agoWeb Inspector: Canvas tab: ensure that the Recording TreeOutline has a specified...
webkit@devinrousso.com [Wed, 7 Mar 2018 23:09:00 +0000 (23:09 +0000)]
Web Inspector: Canvas tab: ensure that the Recording TreeOutline has a specified height for virtualization
https://bugs.webkit.org/show_bug.cgi?id=183015

Reviewed by Matt Baker.

* UserInterface/Views/CanvasSidebarPanel.js:
(WI.CanvasSidebarPanel):

* UserInterface/Views/CanvasSidebarPanel.css:
(.sidebar > .panel.navigation.canvas > .content):
(.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
(.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
(.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
(.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar): Deleted.
(.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas): Deleted.

* UserInterface/Views/TreeElement.js:
(WI.TreeElement.prototype._detach):

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

17 months agoAdd SystemPreviewController for showing system-level views of special file types
dino@apple.com [Wed, 7 Mar 2018 22:37:42 +0000 (22:37 +0000)]
Add SystemPreviewController for showing system-level views of special file types
https://bugs.webkit.org/show_bug.cgi?id=183413
<rdar://problem/37800834>

Reviewed by Tim Horton.

Add a new controller class that hangs off WebPageProxy, with the goal
of providing system-level viewing of some some file types. Specifically
those that can't be shown by WebKit.

This is the initial implementation which is quite simple. The controller
can be queried about whether it supports a MIME type, then it can be
asked to show a URL.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm: Added.
(-[_WKPreviewControllerDataSource initWithURL:]):
(-[_WKPreviewControllerDataSource numberOfPreviewItemsInPreviewController:]):
(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]):
(WebKit::SystemPreviewController::canPreview const):
(WebKit::SystemPreviewController::showPreview):
* UIProcess/SystemPreviewController.cpp: Added.
(WebKit::SystemPreviewController::SystemPreviewController):
(WebKit::SystemPreviewController::canPreview const):
(WebKit::SystemPreviewController::showPreview):
* UIProcess/SystemPreviewController.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::m_configurationPreferenceValues):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::systemPreviewController):
* WebKit.xcodeproj/project.pbxproj:

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

17 months agoreplaceState cause back/forward malfunction on html page with <base href="/"> tag
commit-queue@webkit.org [Wed, 7 Mar 2018 22:09:49 +0000 (22:09 +0000)]
replaceState cause back/forward malfunction on html page with <base href="/"> tag
https://bugs.webkit.org/show_bug.cgi?id=182678
<rdar://problem/37517821>

Patch by Sihui Liu <sihui_liu@apple.com> on 2018-03-07
Reviewed by Chris Dumez.

Source/WebCore:

replaceState should not change URL when the URL argument is NULL, but should change URL when the URL argument is an empty string.

Test: http/tests/history/replacestate-no-url.html

* page/History.cpp:
(WebCore::History::urlForState):

LayoutTests:

* http/tests/history/replacestate-no-url-expected.txt: Added.
* http/tests/history/replacestate-no-url.html: Added.
Add layout test coverage.

* fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange-expected.txt:
Rebaseline a layout test as empty string for URL is handled differently.

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

17 months agoRename ProtoCallFrame::arityMissMatch to hasArityMismatch.
mark.lam@apple.com [Wed, 7 Mar 2018 21:10:57 +0000 (21:10 +0000)]
Rename ProtoCallFrame::arityMissMatch to hasArityMismatch.
https://bugs.webkit.org/show_bug.cgi?id=183414
<rdar://problem/38231678>

Reviewed by Michael Saboff.

* interpreter/ProtoCallFrame.cpp:
(JSC::ProtoCallFrame::init):
* interpreter/ProtoCallFrame.h:

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

17 months agoDon't invalidate descendants for sibling combinators unless needed
antti@apple.com [Wed, 7 Mar 2018 20:29:17 +0000 (20:29 +0000)]
Don't invalidate descendants for sibling combinators unless needed
https://bugs.webkit.org/show_bug.cgi?id=183410
<rdar://problem/38227297>

Reviewed by Zalan Bujtas.

If we know the matched sibling combinator doesn't affect descendants we shouldn't invalidate them.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively const):

    Use different bit for the descendant case.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::fragmentMatchesTheRightmostElement):

    Remove unneeded context assert.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

    Use different bit for the descendant case.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
* dom/Element.cpp:
(WebCore::invalidateForSiblingCombinators):

    Invalidate the target sibling or all descendants based on the bits.

* dom/Element.h:
(WebCore::Element::descendantsAffectedByPreviousSibling const):
(WebCore::Element::setDescendantsAffectedByPreviousSibling const):
* dom/Node.h:
* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):
* style/StyleRelations.h:

    Add DescendantsAffectedByPreviousSibling bit. AffectedByPreviousSibling is now just about the target element.

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

17 months agohttp/tests/misc/location-replace-crossdomain.html is failing with async policy delegates
cdumez@apple.com [Wed, 7 Mar 2018 18:53:21 +0000 (18:53 +0000)]
http/tests/misc/location-replace-crossdomain.html is failing with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183408

Reviewed by Alex Christensen.

The test was trying to navigate a cross-origin iframe via location.replace() and checking
that the load succeeded in a setTimeout(1). There is no guarantee that the frame has loaded
by that point. We would normally rely on the 'load' event but it is not feasible here since
the iframe is cross-origin. Instead, I opted to have the iframe to a page that posts a
message to its parent window to indicate that the load has succeeded.

* http/tests/misc/location-replace-crossdomain-async-delegates-expected.txt: Added.
* http/tests/misc/location-replace-crossdomain-async-delegates.html: Added.
* http/tests/misc/location-replace-crossdomain-expected.txt: Added.
* http/tests/misc/location-replace-crossdomain.html:
* platform/gtk/http/tests/misc/location-replace-crossdomain-expected.txt: Removed.
* platform/ios/http/tests/misc/location-replace-crossdomain-expected.txt: Removed.
* platform/mac/http/tests/misc/location-replace-crossdomain-expected.txt: Removed.
* platform/win/http/tests/misc/location-replace-crossdomain-expected.txt: Removed.

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

17 months agoFix incorrect test expectations for http/wpt/resource-timing/rt-initiatorType-media...
pvollan@apple.com [Wed, 7 Mar 2018 18:41:17 +0000 (18:41 +0000)]
Fix incorrect test expectations for http/wpt/resource-timing/rt-initiatorType-media.html.

Unreviewed test gardening.

* platform/win/TestExpectations:

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

17 months agohttp/tests/dom/window-open-about-webkit-org-and-access-document.html is failing with...
cdumez@apple.com [Wed, 7 Mar 2018 18:38:51 +0000 (18:38 +0000)]
http/tests/dom/window-open-about-webkit-org-and-access-document.html is failing with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183394

Reviewed by Alex Christensen.

http/tests/dom/window-open-about-webkit-org-and-access-document.html is failing with async policy delegates.
The issue is that the test calls window.open() with a cross-origin URL and then right away tries to access
newWindow.document, expecting it to throw. However, there is no guarantee that the cross origin URL has
started loading at this point. In particular, when the navigation policy decision is made asynchronously,
the URL is initially "about:blank" and it is OK to access the newWindow's document at this point.

We would normally rely on the window's load event before doing the check. However, this would not work
here since the window is cross origin. As a result, I am using a setInterval() in order to wait for the
cross-origin URL to load and for newWindow.document to start throwing.

* http/tests/dom/window-open-about-webkit-org-and-access-document-async-delegates-expected.txt: Added.
* http/tests/dom/window-open-about-webkit-org-and-access-document-async-delegates.html: Added.
* http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt:
* http/tests/dom/window-open-about-webkit-org-and-access-document.html:

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

17 months agocheckForSiblingStyleChanges should use internal versions of the invalidation functions
antti@apple.com [Wed, 7 Mar 2018 18:27:55 +0000 (18:27 +0000)]
checkForSiblingStyleChanges should use internal versions of the invalidation functions
https://bugs.webkit.org/show_bug.cgi?id=183405
<rdar://problem/38218310>

Reviewed by Zalan Bujtas.

Non-internal invalidateStyleForElement/Subtree() implement sibling combinator invalidation. Checking this
is only needed if the element in question changed somehow. In checkForSiblingStyleChanges we know that
another element changed and we really just want to invalidate.

* css/SelectorChecker.cpp:
(WebCore::isFirstOfType):
(WebCore::SelectorChecker::checkOne const):

Also make :first-of-type use ChildrenAffectedByForwardPositionalRules for invalidation similar to :last-of-type
for more correct invalidation.

* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):

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

17 months agoSimplify the variants of FunctionPtr constructors.
mark.lam@apple.com [Wed, 7 Mar 2018 18:21:41 +0000 (18:21 +0000)]
Simplify the variants of FunctionPtr constructors.
https://bugs.webkit.org/show_bug.cgi?id=183399
<rdar://problem/38212980>

Reviewed by Yusuke Suzuki.

* assembler/MacroAssemblerCodeRef.h:
(JSC::FunctionPtr::FunctionPtr):

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

17 months agoMarkedArgumentsBuffer should allocate from the JSValue Gigacage
fpizlo@apple.com [Wed, 7 Mar 2018 18:14:02 +0000 (18:14 +0000)]
MarkedArgumentsBuffer should allocate from the JSValue Gigacage
https://bugs.webkit.org/show_bug.cgi?id=183377

Reviewed by Michael Saboff.

That prevents it from being used to pivot UAF on malloc memory into corruption in the JS heap.

* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::expandCapacity):

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

17 months agoDisable test stress/var-injection-cache-invalidation.js on systems with limited memory
commit-queue@webkit.org [Wed, 7 Mar 2018 18:09:43 +0000 (18:09 +0000)]
Disable test stress/var-injection-cache-invalidation.js on systems with limited memory
https://bugs.webkit.org/show_bug.cgi?id=183334

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-07
Reviewed by Žan Doberšek.

* stress/var-injection-cache-invalidation.js:

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

17 months agoAdd support for ARM64E.
mark.lam@apple.com [Wed, 7 Mar 2018 18:04:30 +0000 (18:04 +0000)]
Add support for ARM64E.
https://bugs.webkit.org/show_bug.cgi?id=183398
<rdar://problem/38212621>

Reviewed by Michael Saboff.

* assembler/MacroAssembler.h:
* llint/LLIntOfflineAsmConfig.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/backends.rb:

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

17 months agoHTML `pattern` attribute should set `u` flag for regular expressions
utatane.tea@gmail.com [Wed, 7 Mar 2018 17:44:06 +0000 (17:44 +0000)]
HTML `pattern` attribute should set `u` flag for regular expressions
https://bugs.webkit.org/show_bug.cgi?id=151598

Reviewed by Chris Dumez.

Source/JavaScriptCore:

Add UnicodeMode for JSC::Yarr::RegularExpression.

* yarr/RegularExpression.cpp:
(JSC::Yarr::RegularExpression::Private::create):
(JSC::Yarr::RegularExpression::Private::Private):
(JSC::Yarr::RegularExpression::Private::compile):
(JSC::Yarr::RegularExpression::RegularExpression):
* yarr/RegularExpression.h:

Source/WebCore:

This patch attaches "u" flag to the RegExp compiled for HTML "pattern" attribute[1].

[1]: https://html.spec.whatwg.org/multipage/forms.html#the-pattern-attribute

* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch const):

LayoutTests:

* fast/forms/ValidityState-patternMismatch-expected.txt:
* fast/forms/ValidityState-patternMismatch.html:

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

17 months ago[JSC] Add more JSType based fast path for jsDynamicCast
utatane.tea@gmail.com [Wed, 7 Mar 2018 17:18:49 +0000 (17:18 +0000)]
[JSC] Add more JSType based fast path for jsDynamicCast
https://bugs.webkit.org/show_bug.cgi?id=183403

Reviewed by Mark Lam.

We add more JSType based fast path for jsDynamicCast. Basically, we add miscellaneous JSTypes which
are used for jsDynamicCast in JSC, arguments types, and scope types.

We also add ClassInfo to JSScope and JSSegmentedVariableObject since they are used with jsDynamicCast.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::setUpCall):
* runtime/ClonedArguments.h:
(JSC::ClonedArguments::specialsMaterialized const): Deleted.
* runtime/DirectArguments.h:
(JSC::DirectArguments::subspaceFor): Deleted.
(JSC::DirectArguments::internalLength const): Deleted.
(JSC::DirectArguments::length const): Deleted.
(JSC::DirectArguments::isMappedArgument const): Deleted.
(JSC::DirectArguments::isMappedArgumentInDFG const): Deleted.
(JSC::DirectArguments::getIndexQuickly const): Deleted.
(JSC::DirectArguments::setIndexQuickly): Deleted.
(JSC::DirectArguments::callee): Deleted.
(JSC::DirectArguments::argument): Deleted.
(JSC::DirectArguments::overrodeThings const): Deleted.
(JSC::DirectArguments::initModifiedArgumentsDescriptorIfNecessary): Deleted.
(JSC::DirectArguments::setModifiedArgumentDescriptor): Deleted.
(JSC::DirectArguments::isModifiedArgumentDescriptor): Deleted.
(JSC::DirectArguments::offsetOfCallee): Deleted.
(JSC::DirectArguments::offsetOfLength): Deleted.
(JSC::DirectArguments::offsetOfMinCapacity): Deleted.
(JSC::DirectArguments::offsetOfMappedArguments): Deleted.
(JSC::DirectArguments::offsetOfModifiedArgumentsDescriptor): Deleted.
(JSC::DirectArguments::storageOffset): Deleted.
(JSC::DirectArguments::offsetOfSlot): Deleted.
(JSC::DirectArguments::allocationSize): Deleted.
(JSC::DirectArguments::storage): Deleted.
* runtime/JSCast.h:
* runtime/JSGlobalLexicalEnvironment.h:
(JSC::JSGlobalLexicalEnvironment::create): Deleted.
(JSC::JSGlobalLexicalEnvironment::isEmpty const): Deleted.
(JSC::JSGlobalLexicalEnvironment::createStructure): Deleted.
(JSC::JSGlobalLexicalEnvironment::JSGlobalLexicalEnvironment): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::finishCreation):
* runtime/JSMap.h:
(JSC::isJSMap): Deleted.
* runtime/JSModuleEnvironment.h:
(JSC::JSModuleEnvironment::create): Deleted.
(JSC::JSModuleEnvironment::createStructure): Deleted.
(JSC::JSModuleEnvironment::offsetOfModuleRecord): Deleted.
(JSC::JSModuleEnvironment::allocationSize): Deleted.
(JSC::JSModuleEnvironment::moduleRecord): Deleted.
(JSC::JSModuleEnvironment::moduleRecordSlot): Deleted.
* runtime/JSObject.cpp:
(JSC::canDoFastPutDirectIndex):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
* runtime/JSObject.h:
(JSC::JSFinalObject::allocationSize): Deleted.
(JSC::JSFinalObject::typeInfo): Deleted.
(JSC::JSFinalObject::defaultInlineCapacity): Deleted.
(JSC::JSFinalObject::maxInlineCapacity): Deleted.
(JSC::JSFinalObject::createStructure): Deleted.
(JSC::JSFinalObject::finishCreation): Deleted.
(JSC::JSFinalObject::JSFinalObject): Deleted.
(JSC::isJSFinalObject): Deleted.
* runtime/JSScope.cpp:
* runtime/JSScope.h:
* runtime/JSSegmentedVariableObject.cpp:
* runtime/JSSegmentedVariableObject.h:
* runtime/JSSet.h:
(JSC::isJSSet): Deleted.
* runtime/JSType.h:
* runtime/JSWeakMap.h:
(JSC::isJSWeakMap): Deleted.
* runtime/JSWeakSet.h:
(JSC::isJSWeakSet): Deleted.
* runtime/JSWithScope.h:
(JSC::JSWithScope::object): Deleted.
* runtime/MapConstructor.cpp:
(JSC::constructMap):
(JSC::mapPrivateFuncMapBucketHead):
* runtime/MapPrototype.cpp:
(JSC::getMap):
* runtime/NumberObject.cpp:
(JSC::NumberObject::finishCreation):
* runtime/NumberPrototype.cpp:
(JSC::toThisNumber):
(JSC::numberProtoFuncToExponential):
(JSC::numberProtoFuncToFixed):
(JSC::numberProtoFuncToPrecision):
(JSC::numberProtoFuncToString):
(JSC::numberProtoFuncToLocaleString):
(JSC::numberProtoFuncValueOf):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::finishCreation):
* runtime/ScopedArguments.h:
(JSC::ScopedArguments::subspaceFor): Deleted.
(JSC::ScopedArguments::internalLength const): Deleted.
(JSC::ScopedArguments::length const): Deleted.
(JSC::ScopedArguments::isMappedArgument const): Deleted.
(JSC::ScopedArguments::isMappedArgumentInDFG const): Deleted.
(JSC::ScopedArguments::getIndexQuickly const): Deleted.
(JSC::ScopedArguments::setIndexQuickly): Deleted.
(JSC::ScopedArguments::callee): Deleted.
(JSC::ScopedArguments::overrodeThings const): Deleted.
(JSC::ScopedArguments::initModifiedArgumentsDescriptorIfNecessary): Deleted.
(JSC::ScopedArguments::setModifiedArgumentDescriptor): Deleted.
(JSC::ScopedArguments::isModifiedArgumentDescriptor): Deleted.
(JSC::ScopedArguments::offsetOfOverrodeThings): Deleted.
(JSC::ScopedArguments::offsetOfTotalLength): Deleted.
(JSC::ScopedArguments::offsetOfTable): Deleted.
(JSC::ScopedArguments::offsetOfScope): Deleted.
(JSC::ScopedArguments::overflowStorageOffset): Deleted.
(JSC::ScopedArguments::allocationSize): Deleted.
(JSC::ScopedArguments::overflowStorage const): Deleted.
* runtime/SetConstructor.cpp:
(JSC::constructSet):
(JSC::setPrivateFuncSetBucketHead):
* runtime/SetPrototype.cpp:
(JSC::getSet):
* runtime/StrictEvalActivation.h:
(JSC::StrictEvalActivation::create): Deleted.
(JSC::StrictEvalActivation::createStructure): Deleted.
* runtime/WeakMapPrototype.cpp:
(JSC::getWeakMap):
* runtime/WeakSetPrototype.cpp:
(JSC::getWeakSet):

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

17 months agoRelayout frames after AsyncFrameScrolling or FrameFlattening option is changed
fred.wang@free.fr [Wed, 7 Mar 2018 17:11:17 +0000 (17:11 +0000)]
Relayout frames after AsyncFrameScrolling or FrameFlattening option is changed
https://bugs.webkit.org/show_bug.cgi?id=183081

Patch by Frederic Wang <fwang@igalia.com> on 2018-03-07
Reviewed by Antonio Gomes.

Source/WebCore:

The frames may be resized when the FrameFlattening option is modified and hence this patch
forces a relayout. It also does that when AsyncFrameScrolling is modified too, since that
may imply changes in frame flattening after bug 173704. Forcing a relayout will also be
enough to trigger other updates for async frame scrolling in the future (see bug 149264 and
bug 171667).

Test: platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic.html

* page/Settings.yaml: Call setNeedsRelayoutAllFrames when one of the AsyncFrameScrolling or
FrameFlattening options is changed.
* page/SettingsBase.cpp: Include RenderWidget to make call on frame->ownerRenderer().
(WebCore::SettingsBase::setNeedsRelayoutAllFrames):  Make layout and preferred widths dirty
on all frames in the page and schedule a relayout.
* page/SettingsBase.h: Declare setNeedsRelayoutAllFrames().

LayoutTests:

Add a test to check whether an iframe changes its flattening status after one of the option
AsyncFrameScrolling/FrameFlattening is enabled/disabled.

* platform/ios-simulator/TestExpectations: Remove failure for scrolling-in-object.html.
* platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic-expected.txt: Added.
* platform/ios/fast/frames/flattening/iframe-flattening-async-frame-scrolling-dynamic.html: Added.

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

17 months agoMark http/wpt/resource-timing/rt-initiatorType-media.html as a flaky crash on Windows.
pvollan@apple.com [Wed, 7 Mar 2018 16:19:30 +0000 (16:19 +0000)]
Mark http/wpt/resource-timing/rt-initiatorType-media.html as a flaky crash on Windows.
https://bugs.webkit.org/show_bug.cgi?id=179297

Unreviewed test gardening.

* platform/win/TestExpectations:

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

17 months agoMake NetworkRTCResolver port agnostic
commit-queue@webkit.org [Wed, 7 Mar 2018 15:21:24 +0000 (15:21 +0000)]
Make NetworkRTCResolver port agnostic
https://bugs.webkit.org/show_bug.cgi?id=178855

Patch by Alejandro G. Castro <alex@igalia.com> on 2018-03-07
Reviewed by Youenn Fablet.

Source/WebCore:

Add new API in the DNSResolveQueue allowing to revolve hostnames and get the result. Add platform
specific code for soup platform and refactor the other platforms. Added new API to the DNS API header
and move the general code to the DNS.cpp file, that way we can reuse that code in all the platforms
and leave the ResolveQueue class of the platforms in a file.

No new tests because this is a refactor.

* PlatformAppleWin.cmake: Move the DNSCFNet class to DNSResolveQueueCFNet.
* PlatformMac.cmake: Ditto.
* Sources.txt: Add the DNS.cpp for compilation.
* SourcesCocoa.txt: Move the DNSCFNet class to DNSResolveQueueCFNet.
* WebCore.xcodeproj/project.pbxproj: Move the DNSCFNet class to DNSResolveQueueCFNet, add the DNS.cpp
for compilation. Add the new DNSResolveQueueCFNet class.
* platform/Curl.cmake: Move the DNSCFNet class to DNSResolveQueueCurl.
* platform/network/DNS.cpp: Add this file with the default implementation of the DNS functions for
all the platforms.
(WebCore::prefetchDNS): Copied from every platform implementation.
(WebCore::resolveDNS): Add the function, resolves a hostname, receives the identifier of the operation
and the completion handler.
(WebCore::stopResolveDNS): Add the function, stops a resolution operation, receives the identifier
of the operation.
* platform/network/DNS.h: Add the new APIs resolveDNS and stopResolveDNS with the classes used for the
implementation.
(WebCore::IPAddress::IPAddress): Add this class used to send the resolved address information, it does
not depend on libwebrtc rtc classes.
(WebCore::IPAddress::get): Get a reference to the struct sockaddr_in in the IPAddress class.
(WebCore::DNSCompletionHandler): Add this CompletionHandler type to be used when resolving the DNS
address.
* platform/network/DNSResolveQueue.cpp: Add the DNSResolveQueue platform instantiation in the singleton.
(WebCore::DNSResolveQueue::singleton): Use DNSResolveQueue platform classes when creating the singleton..
(WebCore::DNSResolveQueue::resolve): Add this method to get the address of a hostname, it sends the
identifier and the completion handler to use when returning the result.
(WebCore::DNSResolveQueue::stopResolve): Add this method to stop the resolve operation when required.
* platform/network/DNSResolveQueue.h: Add the new methods and make the class abstract, so that every
platform can implement the functions.
* platform/network/cf/DNSResolveQueueCFNet.cpp: Renamed from Source/WebCore/platform/network/cf/DNSCFNet.cpp.
Add the methods to the new class DNSResolveQueueCFNet, move the prefetchDNS to the DNS.cpp general
implementation.
* platform/network/cf/DNSResolveQueueCFNet.h: Add the new class inheriting from the DNSResolveQueue. Add the
new methods, we have to implement these methods and move the NetworkRTCResolver for COCOA code here.
(WebCore::DNSResolveQueueCF::resolve): Dummy method, not implemented.
(WebCore::DNSResolveQueueCF::stopResolve): Ditto.
* platform/network/curl/DNSResolveQueueCurl.cpp: Renamed from Source/WebCore/platform/network/curl/DNSCurl.cpp.
* platform/network/curl/DNSResolveQueueCurl.h: Add the new class inheriting from the DNSResolveQueue.
(WebCore::DNSResolveQueueCurl::resolve): Ditto.
(WebCore::DNSResolveQueueCurl::stopResolve): Ditto.
* platform/network/soup/DNSResolveQueueSoup.h: New class inheriting from the DNSResolveQueue class, adding
a HasMap with the active operations, it allows stopping them.
* platform/network/soup/DNSResolveQueueSoup.cpp: Renamed from Source/WebCore/platform/network/curl/DNSSoup.cpp.
(WebCore::resolvedWithObserverCallback): Called when the result address from the soup platform is ready,
sends the address to the completion handler.
(WebCore::DNSResolveQueueSoup::resolve): Launch the resolve operation with the soup library.
(WebCore::DNSResolveQueueSoup::stopResolve): Stop the resolve operation on process with a GCancellable.

Source/WebKit:

Create a specific Cocoa class to isolate the generic code in the base class, make the base implementation port
agnostic and dependent on DNS API in the platform directory which encapsulates the platform specific details.

* NetworkProcess/webrtc/NetworkRTCProvider.cpp: Create an alias class name defined per platform to instantiate the resolver.
(WebKit::NetworkRTCProvider::createResolver): Used the alias class name and receive a new IPAddress class that is not
dependent on rtc libwebrtc library.
* NetworkProcess/webrtc/NetworkRTCResolver.cpp: Remove the platform specific code. Use the DNS API to implement the
platform specific code in the default start and stop methods. Add the identifier of the resolve operation to the class.
(WebKit::NetworkRTCResolver::NetworkRTCResolver): Add the identifier in the initialization.
(WebKit::NetworkRTCResolver::~NetworkRTCResolver): Remove the platform specific code.
(WebKit::NetworkRTCResolver::completed): Ditto.
(WebKit::NetworkRTCResolver::start): Add a new implementation using the DNS API.
(WebKit::NetworkRTCResolver::stop): Ditto
* NetworkProcess/webrtc/NetworkRTCResolver.h: Remove the platform specific code and use the DNSResolveQueue for a general
solution to implement the platform specific code. Avoid using the IPAddress class that depends on libwertc classes to make
it more general regarding DNS name resolution.
(WebKit::NetworkRTCResolver::start): Make this class virtual.
(WebKit::NetworkRTCResolver::stop): Ditto.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.cpp: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.cpp.
Now this class overrides the start and stop methods that use DNS, cocoa implementation should use the DNS methods in the future and
remove this class, making sure all the platform specific class is in the platform directory.
* NetworkProcess/webrtc/NetworkRTCResolverCocoa.h: Copied Cocoa code from Source/WebKit/NetworkProcess/webrtc/NetworkRTCResolver.h.
* PlatformGTK.cmake: Add NetworkRTCResolver compilation for GTK.
* WebKit.xcodeproj/project.pbxproj: Add the NetworkRTCResolverCocoa class to the compilation.

Tools:

Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
other platforms when the APIs are supported.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/DNS.cpp:

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

17 months ago[WPE] Test gardening
Ms2ger@igalia.com [Wed, 7 Mar 2018 11:59:20 +0000 (11:59 +0000)]
[WPE] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=183402

Unreviewed test gardening.

WebDriverTests:

* TestExpectations.json: mark element_clear.py::test_closed_context as passing.

LayoutTests:

* platform/gtk/TestExpectations: skip some more appcache-sw tests.
* platform/wpe/TestExpectations:
  - Mark http/tests/appcache/different-https-origin-resource-main.html as passing after r228892.
  - Mark fast/canvas/canvas-createPattern-video-modify.html as passing after r228221.
  - Mark storage/indexeddb/modern/index-3-private.html as passing since r228560.
  - Skip some more appcache - service worker tests.
  - Mark some svg/animations tests as flaky (as they already are on GTK).
  - Mark imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.html as passing after r228983.
  - Mark http/tests/appcache/fail-on-update-2.html as flaky.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt: Added baseline.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt: Added baseline.
* platform/wpe/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt: Added baseline.
* platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: rebaseline.

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

17 months agoMark get_element_property.py::test_element as passing.
Ms2ger@igalia.com [Wed, 7 Mar 2018 11:32:44 +0000 (11:32 +0000)]
Mark get_element_property.py::test_element as passing.
https://bugs.webkit.org/show_bug.cgi?id=180414

Unreviewed test gardening.

It has been passing since the test was updated to expect the correct value
in r229166.

* TestExpectations.json:

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

17 months ago[ARM] offlineasm: fix indentation in armOpcodeReversedOperands
commit-queue@webkit.org [Wed, 7 Mar 2018 09:38:57 +0000 (09:38 +0000)]
[ARM] offlineasm: fix indentation in armOpcodeReversedOperands
https://bugs.webkit.org/show_bug.cgi?id=183400

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-07
Reviewed by Mark Lam.

* offlineasm/arm.rb:

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

17 months ago[GTK] fast/animation/request-animation-frame-during-modal.html sometimes crashing
csaavedra@igalia.com [Wed, 7 Mar 2018 09:17:26 +0000 (09:17 +0000)]
[GTK] fast/animation/request-animation-frame-during-modal.html sometimes crashing

Unreviewed gardening
* platform/gtk/TestExpectations:

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

17 months agoPrepare LLInt code to support pointer profiling.
mark.lam@apple.com [Wed, 7 Mar 2018 06:44:46 +0000 (06:44 +0000)]
Prepare LLInt code to support pointer profiling.
https://bugs.webkit.org/show_bug.cgi?id=183387
<rdar://problem/38199678>

Reviewed by JF Bastien.

Source/JavaScriptCore:

1. Introduced PtrTag enums for supporting pointer profiling later.

2. Also introduced tagging, untagging, retagging, and tag removal placeholder
   template functions for the same purpose.

3. Prepare the offlineasm for supporting pointer profiling later.

4. Tagged some pointers in LLInt asm code.  Currently, these should have no
   effect on behavior.

5. Removed returnToThrowForThrownException() because it is not used anywhere.

6. Added the offlineasm folder to JavaScriptCore Xcode project so that it's
   easier to view and edit these files in Xcode.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/LLIntCallLinkInfo.h:
(JSC::LLIntCallLinkInfo::unlink):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntData.h:
* llint/LLIntExceptions.cpp:
(JSC::LLInt::returnToThrowForThrownException): Deleted.
* llint/LLIntExceptions.h:
* llint/LLIntOfflineAsmConfig.h:
* llint/LLIntOffsetsExtractor.cpp:
* llint/LLIntPCRanges.h:
(JSC::LLInt::isLLIntPC):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::handleHostCall):
(JSC::LLInt::setUpCall):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* offlineasm/ast.rb:
* offlineasm/instructions.rb:
* offlineasm/risc.rb:
* runtime/PtrTag.h: Added.
(JSC::uniquePtrTagID):
(JSC::ptrTag):
(JSC::tagCodePtr):
(JSC::untagCodePtr):
(JSC::retagCodePtr):
(JSC::removeCodePtrTag):

Source/WTF:

* wtf/Platform.h:

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

17 months ago[Cocoa] Stop copying ForwardingHeaders directory that no longer exists
bburg@apple.com [Wed, 7 Mar 2018 05:17:30 +0000 (05:17 +0000)]
[Cocoa] Stop copying ForwardingHeaders directory that no longer exists
https://bugs.webkit.org/show_bug.cgi?id=183396

Reviewed by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj:
Rename the phase to "Copy ICU Headers". ForwardingHeaders are no longer a thing.

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

17 months agoSkip fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html and related...
pvollan@apple.com [Wed, 7 Mar 2018 03:06:58 +0000 (03:06 +0000)]
Skip fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html and related tests on Windows.
https://bugs.webkit.org/show_bug.cgi?id=183393

Unreviewed test gardening.

* platform/win/TestExpectations:

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

17 months ago[WinCairo] Unreviewed. Add platform-specific expectations.
ross.kirsling@sony.com [Wed, 7 Mar 2018 02:08:21 +0000 (02:08 +0000)]
[WinCairo] Unreviewed. Add platform-specific expectations.

Individual filenames are omitted for brevity.

* platform/wincairo/accessibility/: Added.
* platform/wincairo/animations/: Added.
* platform/wincairo/css1/: Added.
* platform/wincairo/css2.1/: Added.
* platform/wincairo/css3/: Added.
* platform/wincairo/editing/: Added.
* platform/wincairo/fast/: Added.
* platform/wincairo/fonts/: Added.
* platform/wincairo/ietestcenter/: Added.
* platform/wincairo/js/: Added.
* platform/wincairo/mathml/: Added.
* platform/wincairo/media/: Added.
* platform/wincairo/plugins/: Added.
* platform/wincairo/printing/: Added.
* platform/wincairo/scrollbars/: Added.
* platform/wincairo/svg/: Added.
* platform/wincairo/tables/: Added.
* platform/wincairo/transforms/: Added.
* platform/wincairo/transitions/: Added.

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

17 months agoVersioning.
kocsen_chung@apple.com [Wed, 7 Mar 2018 02:05:42 +0000 (02:05 +0000)]
Versioning.

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

17 months agodidReceiveServerRedirectForProvisionalNavigation is not called in case of document...
commit-queue@webkit.org [Wed, 7 Mar 2018 01:15:37 +0000 (01:15 +0000)]
didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
https://bugs.webkit.org/show_bug.cgi?id=183299
<rdar://problem/37547029>

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

Source/WebCore:

In case of redirection with service worker registration change, we cancel the load and create a new one.
This prevent ResourceLoader::willSendRequestInternal to call the didReceiveServerRedirectForProvisionalNavigation
callback. We thus explictly call this callback after restarting the load with the new service worker step.
We only call this callback if the main resource is there as we do not want to call it if it was blocked by content extension.

Test: http/wpt/service-workers/navigation-redirect-main-frame.https.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::restartLoadingDueToServiceWorkerRegistrationChange):

Tools:

Add support for checking whether this callback is called.
Used in the added layout test.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestController.h:
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestController::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

* http/wpt/service-workers/navigation-redirect-main-frame-worker.js: Added.
* http/wpt/service-workers/navigation-redirect-main-frame.https-expected.txt: Added.
* http/wpt/service-workers/navigation-redirect-main-frame.https.html: Added.

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

17 months agohttp/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non...
cdumez@apple.com [Wed, 7 Mar 2018 01:02:09 +0000 (01:02 +0000)]
http/wpt/html/browsers/history/the-location-interface/location-protocol-setter-non-broken-async-delegate.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=183390

Unreviewed, temporarily mark the test as flaky while I investigate.

* platform/mac-wk1/TestExpectations:

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

17 months ago[Curl] Remove unnecessary copied ResourceRequest member variable.
commit-queue@webkit.org [Wed, 7 Mar 2018 00:32:20 +0000 (00:32 +0000)]
[Curl] Remove unnecessary copied ResourceRequest member variable.
https://bugs.webkit.org/show_bug.cgi?id=183010

Patch by Basuke Suzuki <Basuke.Suzuki@sony.com> on 2018-03-06
Reviewed by Youenn Fablet.

* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
* platform/network/curl/CurlRequest.h:
(WebCore::CurlRequest::resourceRequest const):
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::start):
(WebCore::ResourceHandle::addCacheValidationHeaders):
(WebCore::ResourceHandle::createCurlRequest):
(WebCore::ResourceHandle::restartRequestWithCredential):
(WebCore::ResourceHandle::continueAfterWillSendRequest):

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

17 months agoUnreviewed, fixed incorrect name of test expectation file.
pvollan@apple.com [Tue, 6 Mar 2018 23:26:21 +0000 (23:26 +0000)]
Unreviewed, fixed incorrect name of test expectation file.

* platform/win/fast/text/combining-enclosing-keycap-expected.txt: Copied from LayoutTests/platform/win/fast/text/combining-enclosing-keycap.txt.
* platform/win/fast/text/combining-enclosing-keycap.txt: Removed.

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

17 months agoAX: Flaky test after r229310
n_wang@apple.com [Tue, 6 Mar 2018 22:49:27 +0000 (22:49 +0000)]
AX: Flaky test after r229310
https://bugs.webkit.org/show_bug.cgi?id=183376
<rdar://problem/38188685>

Reviewed by Chris Fleizach.

Source/WebCore:

The test that forces the context menu to show sometimes locks up
the test runner. Also, we missed a case where calling AXShowMenu
action on a combobox is not dispatching the accessibility event.

Using the combobox example to test the event dispatching in order to
avoid the test hang.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt:
* accessibility/mac/AOM-events-all.html:

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

17 months agoNetworkDataTask should enable logging for automation clients
bfulgham@apple.com [Tue, 6 Mar 2018 22:49:21 +0000 (22:49 +0000)]
NetworkDataTask should enable logging for automation clients
https://bugs.webkit.org/show_bug.cgi?id=183378
<rdar://problem/38189556>

Reviewed by Brian Burg.

The NetworkDataTaskCocoa class was only logging if the SessionID object allowed logging.
It should also be considering whether the current session is working on behalf of an
automation client. If so, it should allow logging.

* NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa):
(WebKit::NetworkDataTaskCocoa::willPerformHTTPRedirection):
(WebKit::NetworkDataTaskCocoa::isAlwaysOnLoggingAllowed const):

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

17 months agoUnreviewed build fix.
ryanhaddad@apple.com [Tue, 6 Mar 2018 22:41:41 +0000 (22:41 +0000)]
Unreviewed build fix.

* UIProcess/ios/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _EVOrganizationName]):

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

17 months agofast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with...
cdumez@apple.com [Tue, 6 Mar 2018 22:01:27 +0000 (22:01 +0000)]
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183345

Reviewed by Alex Christensen.

Source/WebCore:

FrameLoader::loadURL() was calling loadWithNavigationAction() and then resetting the
m_quickRedirectComing flag right after. This works if the navigation policy decision
triggered by loadWithNavigationAction() is made synchronously. However, when it is
made asynchronously, the flag gets reset too early, before the policy decision
handler has been called. This is an issue because the policy decision handler
relies on the m_quickRedirectComing flag.

Similarly, FrameLoader::loadFrameRequest() was calling loadPostRequest() / loadURL()
and then focusing a frame right after. This does not work as intended when the navigation
policy decision is made asynchronously.

To address the issue, we now pass a completion handler that gets called when the operation
has actually completion, after the policy decision has been made. This maintains the
behavior in place with synchronous policy delegates.

Test: fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithNavigationAction):
(WebCore::FrameLoader::load):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::reloadWithOverrideEncoding):
(WebCore::FrameLoader::reload):
(WebCore::FrameLoader::loadPostRequest):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::loadDifferentDocumentItem):
* loader/FrameLoader.h:

Tools:

Add layout test infrastructure so a test can know when didCancelClientRedirectForFrame has
been called. The tests used to rely on a 0-timer but this does not work when the client
responds to the navigation policy asynchronously.

* DumpRenderTree/TestRunner.cpp:
(getDidCancelClientRedirect):
(TestRunner::staticValues):
* DumpRenderTree/TestRunner.h:
(TestRunner::didCancelClientRedirect const):
(TestRunner::setDidCancelClientRedirect):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::didCancelClientRedirect const):
(WTR::TestRunner::setDidCancelClientRedirect):

LayoutTests:

* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates-expected.txt: Added.
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates.html: Added.
Add layout test coverage.

* fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-javascript-disallowed.html:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt:
* fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html:
* fast/loader/window-open-to-invalid-url-disallowed-expected.txt:
* fast/loader/window-open-to-invalid-url-disallowed.html:
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-javascript-disallowed-expected.txt:
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-async-delegates-expected.txt: Added.
* platform/mac-wk1/fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed-expected.txt:
* platform/mac-wk1/fast/loader/window-open-to-invalid-url-disallowed-expected.txt:
Update tests that were relying on a 0-timer to make sure that didCancelClientRedirectForFrame was
called to rely on our new test infrastructure instead. This is needed so that these tests keep passing
once we make policy delegates asynchronous by default. Without this, the didCancelClientRedirectForFrame lines
would be missing in the tests' output.

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

17 months ago[Web Animations] Add a new CSSTransition subclass of WebAnimation
commit-queue@webkit.org [Tue, 6 Mar 2018 21:27:03 +0000 (21:27 +0000)]
[Web Animations] Add a new CSSTransition subclass of WebAnimation
https://bugs.webkit.org/show_bug.cgi?id=183373
<rdar://problem/38181985>

Patch by Antoine Quint <graouts@apple.com> on 2018-03-06
Reviewed by Dean Jackson.

Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
upon identifying that a new CSS Animation has been added to an element.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/CSSTransition.cpp: Added.
(WebCore::CSSTransition::create):
(WebCore::CSSTransition::CSSTransition):
* animation/CSSTransition.h: Added.
* animation/CSSTransition.idl: Added.
* animation/KeyframeEffect.cpp:
* animation/WebAnimation.h:
(WebCore::WebAnimation::isCSSTransition const):
* bindings/js/JSWebAnimationCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/WebCoreBuiltinNames.h:

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

17 months agoUnreviewed, rolling out r229330.
commit-queue@webkit.org [Tue, 6 Mar 2018 20:53:52 +0000 (20:53 +0000)]
Unreviewed, rolling out r229330.
https://bugs.webkit.org/show_bug.cgi?id=183379

Broke some Apple internal code (Requested by ap on #webkit).

Reverted changeset:

"Remove unused crash hook functionality"
https://bugs.webkit.org/show_bug.cgi?id=183369
https://trac.webkit.org/changeset/229330

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

17 months agoEnsure system appearance is default for web content
megan_gardner@apple.com [Tue, 6 Mar 2018 20:20:29 +0000 (20:20 +0000)]
Ensure system appearance is default for web content
https://bugs.webkit.org/show_bug.cgi?id=183354
<rdar://problem/36975571>
<rdar://problem/38162381>

Make sure the the system appearance for web content is default, and
consolidate that code to a single class.

Reviewed by Tim Horton.

Not currently testable, will add tests in a future patch.

* WebCore.xcodeproj/project.pbxproj:
* platform/mac/LocalDefaultSystemAppearance.h: Added.
* platform/mac/LocalDefaultSystemAppearance.mm: Added.
(WebCore::LocalDefaultSystemAppearance::LocalDefaultSystemAppearance):
(WebCore::LocalDefaultSystemAppearance::~LocalDefaultSystemAppearance):
* platform/mac/ThemeMac.mm:
(-[WebCoreThemeView init]):
(WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor const):

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

17 months agoService worker test gardening
commit-queue@webkit.org [Tue, 6 Mar 2018 20:12:52 +0000 (20:12 +0000)]
Service worker test gardening
https://bugs.webkit.org/show_bug.cgi?id=183264
<rdar://problem/38048743>

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2018-03-06

* TestExpectations: mark test as slow in Debug.

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

17 months ago[Web Animations] Add a new runtime flag to control whether CSS Animations and CSS...
commit-queue@webkit.org [Tue, 6 Mar 2018 19:50:55 +0000 (19:50 +0000)]
[Web Animations] Add a new runtime flag to control whether CSS Animations and CSS Transitions should run using the Web Animations timeline
https://bugs.webkit.org/show_bug.cgi?id=183370
<rdar://problem/38180729>

Patch by Antoine Quint <graouts@apple.com> on 2018-03-06
Reviewed by Dean Jackson.

Before we start creating WebAnimation objects to perform CSS Animations and CSS Transitions, which will replace the existing codepath
involving CSSAnimationController and CompositeAnimation, we need a runtime flag that will allow all the new code to be turned off by
default while we bring this feature up.

Source/WebCore:

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WebCore::RuntimeEnabledFeatures::cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
(WKPreferencesGetCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled:]):
(-[WKPreferences _cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
(WebKit::InjectedBundle::setCSSAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled):
* WebProcess/InjectedBundle/InjectedBundle.h:

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

17 months agoMake more use of USE(OPENGL_ES) and replace typedefs with C++11 using statements
dbates@webkit.org [Tue, 6 Mar 2018 19:46:46 +0000 (19:46 +0000)]
Make more use of USE(OPENGL_ES) and replace typedefs with C++11 using statements
in TextureCacheCV.h

Rubber-stamped by Tim Horton.

* platform/graphics/cv/TextureCacheCV.h:

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

17 months agoCache hasComplexSelectorsForStyleAttribute bit
antti@apple.com [Tue, 6 Mar 2018 19:41:35 +0000 (19:41 +0000)]
Cache hasComplexSelectorsForStyleAttribute bit
https://bugs.webkit.org/show_bug.cgi?id=183363

Reviewed by Andreas Kling.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::collectFeatures const):
(WebCore::DocumentRuleSets::hasComplexSelectorsForStyleAttribute const):

Cache the bit to avoid hash lookups.

* css/DocumentRuleSets.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::invalidateStyleAttribute):
(WebCore::shouldSynchronizeStyleAttributeImmediatelyForInvalidation): Deleted.

Move code to DocumentRuleSets.

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

17 months ago[ARM] Assembler warnings: "use of r13 is deprecated"
commit-queue@webkit.org [Tue, 6 Mar 2018 19:14:10 +0000 (19:14 +0000)]
[ARM] Assembler warnings: "use of r13 is deprecated"
https://bugs.webkit.org/show_bug.cgi?id=183286

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-06
Reviewed by Mark Lam.

Usage of sp/r13 as operand Rm is deprecated on ARM. offlineasm
sometimes generates assembly code that triggers this warning. Prevent
this by simply switching operands.

* offlineasm/arm.rb:

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

17 months agoRemove unused crash hook functionality
mcatanzaro@igalia.com [Tue, 6 Mar 2018 19:10:52 +0000 (19:10 +0000)]
Remove unused crash hook functionality
https://bugs.webkit.org/show_bug.cgi?id=183369

Reviewed by Alexey Proskuryakov.

WTFSetCrashHook and WTFInstallReportBacktraceOnCrashHook are not used on any platforms and
can be removed.

* wtf/Assertions.cpp:
* wtf/Assertions.h:

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

17 months agoChange the type of SVGToOTFFontConverter::m_weight to be not a char
mmaxfield@apple.com [Tue, 6 Mar 2018 18:35:49 +0000 (18:35 +0000)]
Change the type of SVGToOTFFontConverter::m_weight to be not a char
https://bugs.webkit.org/show_bug.cgi?id=183339

Reviewed by Alex Christensen.

No new tests because there is no behavior change.

* svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendOS2Table):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

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

17 months ago[Web Animations] Add a new CSSAnimation subclass of WebAnimation
graouts@webkit.org [Tue, 6 Mar 2018 18:34:22 +0000 (18:34 +0000)]
[Web Animations] Add a new CSSAnimation subclass of WebAnimation
https://bugs.webkit.org/show_bug.cgi?id=183371
<rdar://problem/38181724>

Reviewed by Dean Jackson.

Adding a new CSSAnimation subclass which we will create in a later patch while resolving styles
upon identifying that a new CSS Animation has been added to an element.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* animation/CSSAnimation.cpp: Added.
(WebCore::CSSAnimation::create):
(WebCore::CSSAnimation::CSSAnimation):
* animation/CSSAnimation.h: Added.
* animation/CSSAnimation.idl: Added.
* animation/KeyframeEffectReadOnly.cpp
* animation/WebAnimation.h:
(WebCore::WebAnimation::isCSSAnimation const):
* animation/WebAnimation.idl:
* bindings/js/JSWebAnimationCustom.cpp:
(WebCore::toJSNewlyCreated):
(WebCore::toJS):
* bindings/js/WebCoreBuiltinNames.h:

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

17 months ago[GTK] Add new baseline after r229177
csaavedra@igalia.com [Tue, 6 Mar 2018 18:02:33 +0000 (18:02 +0000)]
[GTK] Add new baseline after r229177

Unreviewed gardening.

This baseline is needed because our mimetype database recognizes
the type of the file in the test and therefore the extension gets
added to the downloaded file.
* platform/gtk/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-async-delegate-expected.txt: Added.

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

17 months agoREGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in...
zandobersek@gmail.com [Tue, 6 Mar 2018 17:38:05 +0000 (17:38 +0000)]
REGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in LLInt on WPE
https://bugs.webkit.org/show_bug.cgi?id=183366

Reviewed by Michael Catanzaro.

Have the TestRunnerInjectedBundle CMake library link against libraries
in the WebKitTestRunnerInjectedBundle_LIBRARIES list, and not the
WebKitTestRunner_LIBRARIES list, which is used for the WebKitTestRunner
executable. This allows narrowing down the libraries to only those that
are necessary for the injected bundle shared object.

The GTK+ port already has this list specified, adding one for the WPE
port.

* WebKitTestRunner/CMakeLists.txt:
Link the TestRunnerInjectedBundle library against the libraries in the
WebKitTestRunnerInjectedBundle_LIBRARIES list.
* WebKitTestRunner/PlatformWPE.cmake:
Specify the WebKitTestRunnerInjectedBundle_LIBRARIES list, including the
basic system dependencies, WebCoreTestSupport and WebKit. This follows
the GTK+ port.

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

17 months agoUnreviewed, fix incorrect assertion after r229309
utatane.tea@gmail.com [Tue, 6 Mar 2018 17:38:03 +0000 (17:38 +0000)]
Unreviewed, fix incorrect assertion after r229309
https://bugs.webkit.org/show_bug.cgi?id=182975

* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::TypeProfilerLog):

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

17 months agoExplicitly qualify some method calls on this in lambdas in Service Worker code.
Ms2ger@igalia.com [Tue, 6 Mar 2018 17:10:24 +0000 (17:10 +0000)]
Explicitly qualify some method calls on this in lambdas in Service Worker code.
https://bugs.webkit.org/show_bug.cgi?id=183367

Reviewed by Chris Dumez.

No new tests -- no change in behavior.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::matchAll):

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

17 months agoUnreviewed, add baseline for fast/text/combining-enclosing-keycap.html.
pvollan@apple.com [Tue, 6 Mar 2018 16:35:35 +0000 (16:35 +0000)]
Unreviewed, add baseline for fast/text/combining-enclosing-keycap.html.

* platform/win/fast/text/combining-enclosing-keycap.txt: Added.

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

17 months ago[GTK] Mark a few Wayland tests as failing
csaavedra@igalia.com [Tue, 6 Mar 2018 13:47:42 +0000 (13:47 +0000)]
[GTK] Mark a few Wayland tests as failing

Unreviewed gardening
* platform/gtk-wayland/TestExpectations:

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

17 months ago[GLib] Implement WebsiteDataStore::defaultServiceWorkerRegistrationDirectory().
Ms2ger@igalia.com [Tue, 6 Mar 2018 13:30:04 +0000 (13:30 +0000)]
[GLib] Implement WebsiteDataStore::defaultServiceWorkerRegistrationDirectory().
https://bugs.webkit.org/show_bug.cgi?id=183364

Reviewed by Michael Catanzaro.

* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory): implement.

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

17 months agoUnreviewed. Addressing further review feedback for patch landed in r229315.
zandobersek@gmail.com [Tue, 6 Mar 2018 12:17:36 +0000 (12:17 +0000)]
Unreviewed. Addressing further review feedback for patch landed in r229315.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::commitSceneState): There's no need for
explicit calls of the clear() method on both containers in the CommitScope
objects, the destructors invoked for these objects from the CommitScope
destructor will have the same effect.

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

17 months ago[CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, Coordinat...
zandobersek@gmail.com [Tue, 6 Mar 2018 12:12:04 +0000 (12:12 +0000)]
[CoordGraphics] Remove unused scrolling-related code in TextureMapperLayer, CoordinatedGraphics stack
https://bugs.webkit.org/show_bug.cgi?id=183340

Reviewed by Michael Catanzaro.

Source/WebCore:

TextureMapperLayer::scrollBy() method is completely unused and can be
removed. This opens the gates on removing majority of scrolling-related
code in TextureMapperLayer, CoordinatedGraphicsLayer and
CoordinatedGraphicsScene classes, along with smaller bits in other
closely-associated classes.

We're able to remove two virtual method overrides in the
ScrollingCoordinatorCoordinatedGraphics class.

TextureMapperLayer can drop the ScrollingClient member variable, along
with multiple others. Various unused methods in that class are removed
as well.

CoordinatedGraphicsLayer and GraphicsLayerTextureMapper can both remove
the custom scrolling state tracking.

No new tests -- no change in behavior.

* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
(WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange): Deleted.
(WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea): Deleted.
* page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
(WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
(WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset): Deleted.
(WebCore::GraphicsLayerTextureMapper::setIsScrollable): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::hitTest): Deleted.
(WebCore::TextureMapperLayer::scrollableLayerHitTestCondition): Deleted.
(WebCore::TextureMapperLayer::findScrollableContentsLayerAt): Deleted.
(WebCore::TextureMapperLayer::mapScrollOffset): Deleted.
(WebCore::TextureMapperLayer::commitScrollOffset): Deleted.
(WebCore::TextureMapperLayer::scrollBy): Deleted.
(WebCore::TextureMapperLayer::didCommitScrollOffset): Deleted.
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::syncLayerState):
(WebCore::CoordinatedGraphicsLayer::resetLayerState):
(WebCore::CoordinatedGraphicsLayer::setScrollableArea): Deleted.
(WebCore::CoordinatedGraphicsLayer::commitScrollOffset): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:

Source/WebKit:

With most of the scrolling-related code in TextureMapperLayer on the
chopping block, we can now drop the ScrollingClient inheritance and the
commitScrollOffset() virtual method implementation. This enables
removing the whole commitScrollOffset() call chain that ran from
CoordinatedGraphicsScene through CoordinatedLayerTreeHost and
CompositingCoordinator to the affected CoordinatedGraphicsLayer object.

The CoordinatedGraphicsScene::findScrollableContentsLayerAt() method is
also unused and can be deleted.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):
(WebKit::CoordinatedGraphicsScene::createLayer):
(WebKit::CoordinatedGraphicsScene::commitScrollOffset): Deleted.
(WebKit::CoordinatedGraphicsScene::findScrollableContentsLayerAt): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::commitScrollOffset): Deleted.
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::commitScrollOffset): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::commitScrollOffset): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:

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

17 months ago[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
zandobersek@gmail.com [Tue, 6 Mar 2018 11:51:53 +0000 (11:51 +0000)]
[CoordGraphics] Apply TextureMapperLayer animations with a single MonotonicTime value
https://bugs.webkit.org/show_bug.cgi?id=183360

Reviewed by Sergio Villar Senin.

Source/WebCore:

When animations are being applied on the TextureMapperLayer tree, the
monotonic time value is retrieved repeatedly in TextureMapperAnimation
class. Instead of spawning repeated syscalls that are required to obtain
the time value, TextureMapperLayer::applyAnimationsRecursively() now
accepts a MonotonicTime value that should be used for all animation
updates.

No new tests -- no change in behavior.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/TextureMapperAnimation.cpp:
(WebCore::TextureMapperAnimation::apply):
(WebCore::TextureMapperAnimation::computeTotalRunningTime):
(WebCore::TextureMapperAnimations::apply):
* platform/graphics/texmap/TextureMapperAnimation.h:
(WebCore::TextureMapperAnimation::keyframes const):
(WebCore::TextureMapperAnimation::animation const):
(WebCore::TextureMapperAnimation::boxSize const): Deleted.
(WebCore::TextureMapperAnimation::listsMatch const): Deleted.
(WebCore::TextureMapperAnimation::startTime const): Deleted.
(WebCore::TextureMapperAnimation::pauseTime const): Deleted.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::applyAnimationsRecursively):
(WebCore::TextureMapperLayer::syncAnimations):
* platform/graphics/texmap/TextureMapperLayer.h:

Source/WebKit:

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
Pass the monotic time value, as returned by MonotonicTime::now(), to the
TextureMapperLayer::applyAnimationsRecursively() call.

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

17 months ago[CoordGraphics] Clean up CoordinatedImageBacking
zandobersek@gmail.com [Tue, 6 Mar 2018 11:35:22 +0000 (11:35 +0000)]
[CoordGraphics] Clean up CoordinatedImageBacking
https://bugs.webkit.org/show_bug.cgi?id=183332

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Clean up the CoordinatedImageBacking class. Prefer reference values in
class functions, methods and member variables, where possible. Move
member variables into a more sensible order. Initialize a few member
variables at the place of declaration.

Drop releaseSurfaceIfNeeded() and updateVisibilityIfNeeded() methods,
integrating them into the update() method, which was the only place
where they were called from.

We don't have to keep a reference to the buffer object, since we're
not using it internally after it's been passed to the client's
updateImageBacking() implementation.

No new tests -- no change in behavior.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::syncImageBacking):
(WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
(WebCore::CoordinatedImageBacking::getCoordinatedImageBackingID):
(WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
(WebCore::CoordinatedImageBacking::addHost):
(WebCore::CoordinatedImageBacking::removeHost):
(WebCore::CoordinatedImageBacking::update):
(WebCore::CoordinatedImageBacking::clearContentsTimerFired):
(WebCore::CoordinatedImageBacking::create): Deleted.
(WebCore::CoordinatedImageBacking::markDirty): Deleted.
(WebCore::CoordinatedImageBacking::releaseSurfaceIfNeeded): Deleted.
(WebCore::CoordinatedImageBacking::updateVisibilityIfNeeded): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:

Source/WebKit:

* WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:
(WebKit::CompositingCoordinator::createImageBackingIfNeeded):
Adjust call to CoordinatedImageBacking::getCoordinatedImageBackingID().

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

17 months agoCoordinatedGraphicsScene: properly limit data specific to state commit operation
zandobersek@gmail.com [Tue, 6 Mar 2018 11:34:19 +0000 (11:34 +0000)]
CoordinatedGraphicsScene: properly limit data specific to state commit operation
https://bugs.webkit.org/show_bug.cgi?id=183326

Reviewed by Sergio Villar Senin.

In the process of state commit in CoordinatedGraphicsScene, the released
image backings and backing stores with pending updates are stored in
Vector and HashSet objects, respectively. Instead of these two objects
being member variables on the CoordinatedGraphicsScene class, keep them
in the CommitScope structure that's limited to the operations done in
the commitSceneState() method.

The two member variables are dropped, and the CommitScope object is
passed by reference to any helper method that needs to append either
kind of object to the respective container. At the end of the state
commit, backing stores with pending updates have those updates applied,
and the two containers are cleared out as the CommitScope object is
destroyed.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::setLayerState):
(WebKit::CoordinatedGraphicsScene::prepareContentBackingStore):
(WebKit::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
(WebKit::CoordinatedGraphicsScene::removeTilesIfNeeded):
(WebKit::CoordinatedGraphicsScene::updateTilesIfNeeded):
(WebKit::CoordinatedGraphicsScene::syncImageBackings):
(WebKit::CoordinatedGraphicsScene::updateImageBacking):
(WebKit::CoordinatedGraphicsScene::clearImageBackingContents):
(WebKit::CoordinatedGraphicsScene::removeImageBacking):
(WebKit::CoordinatedGraphicsScene::commitSceneState):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
(WebKit::CoordinatedGraphicsScene::removeReleasedImageBackingsIfNeeded): Deleted.
(WebKit::CoordinatedGraphicsScene::commitPendingBackingStoreOperations): Deleted.
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:

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

17 months ago[ARM] Disable tests that run out of memory
commit-queue@webkit.org [Tue, 6 Mar 2018 11:31:50 +0000 (11:31 +0000)]
[ARM] Disable tests that run out of memory
https://bugs.webkit.org/show_bug.cgi?id=182699

Patch by Dominik Infuehr <dinfuehr@igalia.com> on 2018-03-06
Reviewed by Žan Doberšek.

JSTests:

Skip tests that run of of memory. Do not run
modules/module-jit-reachability.js without LLInt to prevent
running out of executable memory.

* modules.yaml:
* modules/module-jit-reachability.js:
* stress/has-own-property-name-cache-string-keys.js:
* stress/has-own-property-name-cache-symbol-keys.js:

Tools:

Add run mode to allow running modules.yaml-tests without
disabling LLInt for specific tests.

* Scripts/run-jsc-stress-tests:

LayoutTests:

Do not run test with LLInt disabled on Linux.

* js/script-tests/dfg-osr-entry-hoisted-clobbered-structure-check.js:

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

17 months agoGraphicsLayerTextureMapper: remove the setAnimations() method
zandobersek@gmail.com [Tue, 6 Mar 2018 11:23:08 +0000 (11:23 +0000)]
GraphicsLayerTextureMapper: remove the setAnimations() method
https://bugs.webkit.org/show_bug.cgi?id=183358

Reviewed by Carlos Garcia Campos.

Remove the GraphicsLayerTextureMapper::setAnimations() method. This was
not called from anywhere, and is not the way animations are generated
for a given GraphicsLayer object (that would be addAnimation() method).

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setAnimations): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:

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

17 months agoAX: AOM: More accessibility events support
n_wang@apple.com [Tue, 6 Mar 2018 08:18:53 +0000 (08:18 +0000)]
AX: AOM: More accessibility events support
https://bugs.webkit.org/show_bug.cgi?id=183023
<rdar://problem/37764380>

Reviewed by Chris Fleizach.

Source/WebCore:

Accessibility events.
Spec: https://wicg.github.io/aom/spec/phase2.html

This change adds support for these new events:
  accessiblecontextmenu
  accessibledecrement
  accessibledismiss
  accessiblefocus
  accessibleincrement
  accessiblescrollintoview
  accessibleselect

Note: The show context menu action is only supported on macOS now.
The dismiss action is not implemented for all the platforms yet.

Test: accessibility/mac/AOM-events-all.html

* accessibility/AccessibilityListBoxOption.cpp:
(WebCore::AccessibilityListBoxOption::setSelected):
* accessibility/AccessibilityMediaObject.cpp:
(WebCore::AccessibilityMediaObject::increment):
(WebCore::AccessibilityMediaObject::decrement):
* accessibility/AccessibilityMenuListOption.cpp:
(WebCore::AccessibilityMenuListOption::setSelected):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::increment):
(WebCore::AccessibilityNodeObject::decrement):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::press):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent const):
(WebCore::AccessibilityObject::dispatchAccessibilityEventWithType const):
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent const):
(WebCore::AccessibilityObject::scrollToMakeVisible const):
(WebCore::AccessibilityObject::dispatchAccessibilityEvent): Deleted.
(WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent): Deleted.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setFocused):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
* dom/Element.idl:
* dom/EventNames.h:

LayoutTests:

* accessibility/mac/AOM-events-all-expected.txt: Added.
* accessibility/mac/AOM-events-all.html: Added.
* js/dom/dom-static-property-for-in-iteration-expected.txt:

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

17 months agoFix std::make_unique / new[] using system malloc
utatane.tea@gmail.com [Tue, 6 Mar 2018 07:25:14 +0000 (07:25 +0000)]
Fix std::make_unique / new[] using system malloc
https://bugs.webkit.org/show_bug.cgi?id=182975

Reviewed by JF Bastien.

Source/JavaScriptCore:

Use Vector, FAST_ALLOCATED, or UniqueArray instead.

* API/JSStringRefCF.cpp:
(JSStringCreateWithCFString):
* bytecode/BytecodeKills.h:
* bytecode/BytecodeLivenessAnalysis.cpp:
(JSC::BytecodeLivenessAnalysis::computeKills):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::dumpDisassembly):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::PolymorphicCallStubRoutine):
* jit/PolymorphicCallStubRoutine.h:
* jit/Repatch.cpp:
(JSC::linkPolymorphicCall):
* jsc.cpp:
(currentWorkingDirectory):
* llint/LLIntData.cpp:
(JSC::LLInt::initialize):
* llint/LLIntData.h:
* runtime/ArgList.h:
* runtime/StructureChain.h:
* runtime/StructureIDTable.cpp:
(JSC::StructureIDTable::StructureIDTable):
(JSC::StructureIDTable::resize):
* runtime/StructureIDTable.h:
* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::TypeProfilerLog):
(JSC::TypeProfilerLog::initializeLog): Deleted.
* runtime/TypeProfilerLog.h:
(JSC::TypeProfilerLog::TypeProfilerLog): Deleted.
* runtime/VM.cpp:
(JSC::VM::~VM):
(JSC::VM::acquireRegExpPatternContexBuffer):
* runtime/VM.h:
* testRegExp.cpp:
(runFromFiles):
* tools/HeapVerifier.cpp:
(JSC::HeapVerifier::HeapVerifier):
* tools/HeapVerifier.h:

Source/WebCore:

Use Vector, FAST_ALLOCATED, or UniqueArray instead.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::setBuffer):
* Modules/webaudio/AudioBufferSourceNode.h:
* css/StyleRule.h:
* cssjit/CompiledSelector.h:
* html/HTMLFrameSetElement.h:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::LRUImageBufferCache):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::imageBuffer):
(WebCore::WebGLRenderingContextBase::LRUImageBufferCache::bubbleToFront):
* html/canvas/WebGLRenderingContextBase.h:
* platform/Length.cpp:
(WebCore::newCoordsArray):
(WebCore::newLengthArray):
(): Deleted.
* platform/Length.h:
* platform/audio/DynamicsCompressor.cpp:
(WebCore::DynamicsCompressor::setNumberOfChannels):
* platform/audio/DynamicsCompressor.h:
* platform/audio/FFTFrame.h:
* platform/audio/gstreamer/FFTFrameGStreamer.cpp:
(WebCore::FFTFrame::FFTFrame):
* platform/graphics/FormatConverter.h:
(WebCore::FormatConverter::FormatConverter):
* platform/graphics/GraphicsContext3D.cpp:
(WebCore::GraphicsContext3D::texImage2DResourceSafe):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::getDirtyRects):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::flipImageSurfaceVertically):
* platform/graphics/cg/GraphicsContext3DCG.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gpu/Texture.cpp:
(WebCore::Texture::updateSubRect):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::getActiveAttribImpl):
(WebCore::GraphicsContext3D::getActiveUniformImpl):
(WebCore::GraphicsContext3D::getProgramInfoLog):
(WebCore::GraphicsContext3D::getShaderInfoLog):
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(WebCore::getShaderLog):
(WebCore::getProgramLog):
* platform/graphics/win/ImageBufferDataDirect2D.cpp:
(WebCore::ImageBufferData::putData):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageReader::PNGImageReader):
(WebCore::PNGImageReader::close):
(WebCore::PNGImageReader::interlaceBuffer const):
(WebCore::PNGImageReader::createInterlaceBuffer):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decodeFrame):
* platform/network/curl/SocketStreamHandleImpl.h:
(WebCore::SocketStreamHandleImpl::SocketData::SocketData):
* platform/network/curl/SocketStreamHandleImplCurl.cpp:
(WebCore::createCopy):
(WebCore::SocketStreamHandleImpl::readData):
(): Deleted.
* platform/network/soup/SocketStreamHandleImpl.h:
* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::SocketStreamHandleImpl::connected):
* platform/win/LoggingWin.cpp:
(WebCore::logLevelString):

Source/WebCore/PAL:

Use Vector instead.

* pal/win/LoggingWin.cpp:
(PAL::logLevelString):

Source/WebKit:

Use Vector instead.

* NetworkProcess/win/SystemProxyWin.cpp:
(WindowsSystemProxy::getSystemHttpProxy):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::processMessage):
(IPC::Connection::sendOutputMessage):
* Platform/win/LoggingWin.cpp:
(WebKit::logLevelString):
* Shared/SandboxExtension.h:
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::SandboxExtension::HandleArray::allocate):
(WebKit::SandboxExtension::HandleArray::operator[]):
(WebKit::SandboxExtension::HandleArray::operator[] const):
(WebKit::SandboxExtension::HandleArray::size const):
(WebKit::SandboxExtension::HandleArray::encode const):

Source/WebKitLegacy/win:

Use Vector instead.

* MarshallingHelpers.cpp:
(MarshallingHelpers::safeArrayToStringArray):
(MarshallingHelpers::safeArrayToIntArray):
* Plugins/PluginPackageWin.cpp:
(WebCore::PluginPackage::fetchInfo):
* WebPreferences.cpp:
(WebPreferences::copyWebKitPreferencesToCFPreferences):
* WebView.cpp:
(WebView::onMenuCommand):

Source/WTF:

If we use `make_unique<char[]>(num)` or `new char[num]`, allocation is
done by the system malloc instead of bmalloc. This patch fixes this issue
by following three changes.

1. Introduce UniqueArray<T>. It allocates memory from FastMalloc. While C++
array with `new` need to hold the size to call destructor correctly, our
UniqueArray only supports type T which does not have a non trivial destructor.
It reduces the allocation size since we do not need to track the size of the
array compared to standard `new T[]`. This is basically usable if we want to
have raw array which pointer won't be changed even if the container is moved.
In addition, we also extend UniqueArray<T> for types which have non trivial
destructors.

2. Use Vector<T> instead.

3. Annotate allocated types with MAKE_FAST_ALLOCATED. Since it introduces
new[] and delete[] operators, make_unique<T[]>(num) will allocate memory
from FastMalloc.

* WTF.xcodeproj/project.pbxproj:
* wtf/Assertions.cpp:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.h:
(WTF::FastFree::operator() const):
(WTF::FastFree<T::operator() const):
* wtf/MallocPtr.h:
(WTF::MallocPtr::operator bool const):
* wtf/StackShot.h:
(WTF::StackShot::StackShot):
(WTF::StackShot::operator=):
* wtf/SystemFree.h:
(WTF::SystemFree<T::operator() const):
* wtf/UniqueArray.h: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
(WTF::makeUniqueArray):
* wtf/Vector.h:
(WTF::VectorTypeOperations::forceInitialize):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/UniqueArray.cpp: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
(TestWebKitAPI::NonTrivialDestructor::NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::~NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::setLog):
(TestWebKitAPI::TEST):

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

17 months agoSupport for preconnect Link headers
yoav@yoav.ws [Tue, 6 Mar 2018 06:59:34 +0000 (06:59 +0000)]
Support for preconnect Link headers
https://bugs.webkit.org/show_bug.cgi?id=181657

Reviewed by Darin Adler.

Source/WebCore:

Move the preconnect functionality into its own function, and
also call this function when Link headers are processed.

Test: http/tests/preconnect/link-header-rel-preconnect-http.php

* loader/LinkLoader.cpp:
(WebCore::LinkLoader::loadLinksFromHeader): Call preconnectIfNeeded.
(WebCore::LinkLoader::preconnectIfNeeded): Preconnect to a host functionality moved here.
(WebCore::LinkLoader::loadLink): Call preconnectIfNeeded.
* loader/LinkLoader.h:

LayoutTests:

Add test to see Link preconnect headers trigger a connection.

* http/tests/preconnect/link-header-rel-preconnect-http-expected.txt: Added.
* http/tests/preconnect/link-header-rel-preconnect-http.html: Added.
* http/tests/preconnect/resources/header-preconnect.php: Added.
* platform/win/TestExpectations: Skipped the preconnect test directory, rather than the individual files in it.

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

17 months agoAdd ChildrenAffectedByForwardPositionalRules bit for nth-child pseudo class marking
antti@apple.com [Tue, 6 Mar 2018 05:59:08 +0000 (05:59 +0000)]
Add ChildrenAffectedByForwardPositionalRules bit for nth-child pseudo class marking
https://bugs.webkit.org/show_bug.cgi?id=183341
<rdar://problem/38151470>

Reviewed by Zalan Bujtas.

Use it instead of AffectsNextSibling/AffectedByPreviousSibling bits, similar to ChildrenAffectedByBackwardPositionalRules bit.
This is more efficient and requires way less marking.

* css/SelectorChecker.cpp:
(WebCore::countElementsBefore):
(WebCore::countElementsOfTypeBefore):
(WebCore::SelectorChecker::checkOne const):

    Mark with ChildrenAffectedByForwardPositionalRules.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):

     Mark with ChildrenAffectedByForwardPositionalRules.

* dom/Element.cpp:
(WebCore::checkForSiblingStyleChanges):

    Invalidate siblings after added/removed element.

(WebCore::Element::setChildrenAffectedByForwardPositionalRules):
(WebCore::Element::hasFlagsSetDuringStylingOfChildren const):
(WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules const):

    Add the new marking bit.

* dom/Element.h:
(WebCore::Element::childrenAffectedByForwardPositionalRules const):
(WebCore::Element::attributeWithoutSynchronization const):

    Remove assert so we can use this to get the current unresolved lazy value of style attrbute.

* dom/ElementRareData.h:
(WebCore::ElementRareData::childrenAffectedByForwardPositionalRules const):
(WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::resetStyleRelations):

     Add the new marking bit.

* dom/StyledElement.cpp:
(WebCore::StyledElement::invalidateStyleAttribute):

    In special case where we have attribute selectors for style attribute, synchronize the attribute immediately so we get invalidation right.
    Tested by fast/css/style-attribute-invalidation-propagates-to-counted-siblings.html

* style/StyleRelations.cpp:
(WebCore::Style::commitRelationsToRenderStyle):
(WebCore::Style::commitRelations):

    Commit the new bit.

* style/StyleRelations.h:

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

17 months agoMark imported/w3c/web-platform-tests/service-workers/service-worker/registration...
ryanhaddad@apple.com [Tue, 6 Mar 2018 04:38:40 +0000 (04:38 +0000)]
Mark imported/w3c/web-platform-tests/service-workers/service-worker/registration-updateviacache.https.html as slow.
https://bugs.webkit.org/show_bug.cgi?id=180982

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

17 months agoUnreviewed build fix, remove unused variables.
ryanhaddad@apple.com [Tue, 6 Mar 2018 04:22:46 +0000 (04:22 +0000)]
Unreviewed build fix, remove unused variables.

* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeSpeakAs):
(WebCore::consumeHangingPunctuation):

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

17 months agofast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
cdumez@apple.com [Tue, 6 Mar 2018 03:13:32 +0000 (03:13 +0000)]
fast/loader/onload-policy-ignore-for-frame.html is timing out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183337

Reviewed by Ryosuke Niwa.

Source/WebCore:

Make sure we call checkCompleted() before calling checkLoadComplete() in
FrameLoader::continueLoadAfterNavigationPolicy() when the client tells us
to ignore the navigation, so that we properly recognize that the load is
done. This matches what is already done in FrameLoader::receivedMainResourceError().

Test: fast/loader/onload-policy-ignore-for-frame-async-delegates.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):

LayoutTests:

Add layout test coverage.

* fast/loader/onload-policy-ignore-for-frame-async-delegates-expected.txt: Added.
* fast/loader/onload-policy-ignore-for-frame-async-delegates.html: Added.

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

17 months ago[Cocoa] Allow user-installed fonts to be disabled
mmaxfield@apple.com [Tue, 6 Mar 2018 03:06:06 +0000 (03:06 +0000)]
[Cocoa] Allow user-installed fonts to be disabled
https://bugs.webkit.org/show_bug.cgi?id=183349

Rubber stamped by Brent Fulgham.

Tests: fast/text/user-installed-font.html
       fast/text/user-installed-fonts/disable.html
       fast/text/user-installed-fonts/shadow-disable.html
       fast/text/user-installed-fonts/shadow-family-disable.html
       fast/text/user-installed-fonts/shadow-family.html
       fast/text/user-installed-fonts/shadow-postscript-disable.html
       fast/text/user-installed-fonts/shadow-postscript-family-disable.html
       fast/text/user-installed-fonts/shadow-postscript-family.html
       fast/text/user-installed-fonts/shadow-postscript.html
       fast/text/user-installed-fonts/shadow.html
       fast/text/user-installed-fonts/system-ui.html

* platform/graphics/cocoa/FontCacheCoreText.cpp:

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

17 months agoJITThunk functions should only be called when the JIT is enabled.
mark.lam@apple.com [Tue, 6 Mar 2018 03:03:01 +0000 (03:03 +0000)]
JITThunk functions should only be called when the JIT is enabled.
https://bugs.webkit.org/show_bug.cgi?id=183351
<rdar://problem/38160091>

Reviewed by Keith Miller.

* jit/JITThunks.cpp:
(JSC::JITThunks::ctiNativeCall):
(JSC::JITThunks::ctiNativeConstruct):
(JSC::JITThunks::ctiInternalFunctionCall):
(JSC::JITThunks::ctiInternalFunctionConstruct):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::getCTIInternalFunctionTrampolineFor):

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

17 months agoStart using MAP_JIT for macOS
msaboff@apple.com [Tue, 6 Mar 2018 02:34:09 +0000 (02:34 +0000)]
Start using MAP_JIT for macOS
https://bugs.webkit.org/show_bug.cgi?id=183353

Reviewed by Filip Pizlo.

Unify setting this flag for both iOS and macOS.

* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit):

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

17 months agoDumpRenderTree build fix
mmaxfield@apple.com [Tue, 6 Mar 2018 02:15:56 +0000 (02:15 +0000)]
DumpRenderTree build fix

Unreviewed.

* DumpRenderTree/mac/LayoutTestHelper.m:

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

17 months agoSilence OpenGL and OpenGL ES deprecation warnings in newer SDKs
mmaxfield@apple.com [Tue, 6 Mar 2018 02:13:01 +0000 (02:13 +0000)]
Silence OpenGL and OpenGL ES deprecation warnings in newer SDKs
https://bugs.webkit.org/show_bug.cgi?id=183350

Unreviewed.

* Configurations/WebCore.xcconfig:

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

17 months ago[Mac] Teach WebCore::Pasteboard about file promise drags
aestes@apple.com [Tue, 6 Mar 2018 01:36:31 +0000 (01:36 +0000)]
[Mac] Teach WebCore::Pasteboard about file promise drags
https://bugs.webkit.org/show_bug.cgi?id=183314
<rdar://problem/38105493>

Reviewed by Darin Adler.

Source/WebCore:

While WebKit does support receiving file promise drags (since r210360), WebCore::Pasteboard
has not been instructed on how to read their file paths. When the various pasteboard readers
ask for file paths after a file promise drop, they receive an empty vector. This impacts
various features, most notably the DataTransfer API.

Pasteboard actually cannot learn about promised file paths from the pasteboard itself, as
the pasteboard only contains the dragged files' UTIs. Promised file paths aren't known until
the WebKits call -[NSFilePromiseReceiver receivePromisedFilesAtDestination:...], at which
point the file paths are passed to WebCore as part of WebCore::DragData.

When we construct new Pasteboards for drag and drop, we need to store any promised file
paths from the DragData. Then, when the various pasteboard readers ask for file paths and
NSFilesPromisePboardType is on the pasteboard, we can return these promised file paths.

Tests: editing/pasteboard/data-transfer-items-drag-drop-file-promise.html
       editing/pasteboard/data-transfer-items-drop-file-promise.html
       editing/pasteboard/datatransfer-items-drop-plaintext-file-promise.html
       editing/pasteboard/datatransfer-types-dropping-text-file-promise.html
       editing/pasteboard/drag-file-promises-to-editable-element-as-URLs.html
       editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html
       editing/pasteboard/file-input-files-access-promise.html

* platform/FileSystem.h:
* platform/Pasteboard.h:
(WebCore::Pasteboard::Pasteboard):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::containsPromise const):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::createForDragAndDrop):
(WebCore::toString):
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::readFilePaths):
(WebCore::absoluteURLsFromPasteboardFilenames): Deleted.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::numberOfFiles const):

Source/WebKit:

Added a FIXME comment.

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::performDragOperation):

Source/WebKitLegacy/mac:

Added a FIXME comment.

* WebView/WebView.mm:
(-[WebView performDragOperation:]):

Tools:

* DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
* DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
(-[DumpRenderTreeFileDraggingSource initWithPromisedFileURLs:]):
(-[DumpRenderTreeFileDraggingSource dealloc]):

Taught DumpRenderTreeFileDraggingSource to store the promised file URLs.

* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):

Called +[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers] after running a test.

* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
(-[DumpRenderTreeFilePromiseReceiver initWithPromisedUTIs:]):
(-[DumpRenderTreeFilePromiseReceiver fileTypes]):
(-[DumpRenderTreeFilePromiseReceiver fileNames]):
(-[DumpRenderTreeFilePromiseReceiver dealloc]):
(copyFile):
(-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):

We can't instantiate real NSFilePromiseReceivers in DumpRenderTree. They rely on the
pasteboard server to generate unique file URLs, which is incompatible with our swizzled
NSPasteboard.

Instead, create a subclass of NSFilePromiseReceiver that implements its own promise resolution.
-receivePromisedFilesAtDestination:... asks its DumpRenderTreeFileDraggingSource for the
array of file URLs, then copies each to the destination directory on the specified operation
queue. It emulates how NSPasteboard tries to find a unique destination name by appending
numbers to the file name.

All receivers are collected in a global array that is cleared when each test finishes.
DumpRenderTreeFilePromiseReceiver will delete the files it copied in -dealloc.

(+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]):
(-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):

If NSFilesPromisePboardType is on the pasteboard and classArray contains
NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of
all file promise receivers, then wrap it in an NSDraggingItem and call block.

* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController beginDragWithFilePromises:]):

Implement eventSender.beginDragWithFilePromises() by placing file UTIs on the pasteboard
with type NSFilesPromisePboardType, creating a DumpRenderTreeFileDraggingSource with the
file URLs, and creating a new DumpRenderTreeDraggingInfo and passing it to
-[WebView draggingEntered:].

LayoutTests:

Added versions of file dragging tests in editing/pasteboard/ that use
beginDragWithFilePromises() instead of beginDragWithFiles().

* TestExpectations: Skipped the new tests.
* editing/pasteboard/data-transfer-items-drag-drop-file-promise-expected.txt: Added.
* editing/pasteboard/data-transfer-items-drag-drop-file-promise.html: Added.
* editing/pasteboard/data-transfer-items-drop-file-promise-expected.txt: Added.
* editing/pasteboard/data-transfer-items-drop-file-promise.html: Added.
* editing/pasteboard/datatransfer-items-drop-plaintext-file-promise-expected.txt: Added.
* editing/pasteboard/datatransfer-items-drop-plaintext-file-promise.html: Added.
* editing/pasteboard/datatransfer-types-dropping-text-file-promise-expected.txt: Added.
* editing/pasteboard/datatransfer-types-dropping-text-file-promise.html: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-URLs-expected.txt: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-URLs.html: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-attachment-expected.txt: Added.
* editing/pasteboard/drag-file-promises-to-editable-element-as-attachment.html: Added.
* editing/pasteboard/file-input-files-access-promise-expected.txt: Added.
* editing/pasteboard/file-input-files-access-promise.html: Added.
* platform/mac-wk1/TestExpectations: Un-skipped the new tests.
* platform/win/TestExpectations: Skipped the new tests.

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

17 months ago[webkitpy] Bugzilla class should use NetworkTransaction for network operations
aakash_jain@apple.com [Tue, 6 Mar 2018 01:30:37 +0000 (01:30 +0000)]
[webkitpy] Bugzilla class should use NetworkTransaction for network operations
https://bugs.webkit.org/show_bug.cgi?id=183222

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.open_url): Method which uses NetworkTransaction for opening url.
(Bugzilla.fetch_user): Used self.open_url instead of directly calling browser.open().
(Bugzilla.add_user_to_groups): Ditto.
(Bugzilla._fetch_bug_page): Ditto.
(Bugzilla.fetch_attachment_contents): Ditto.
(Bugzilla.get_bug_id_for_attachment_id): Ditto.
(Bugzilla.authenticate): Ditto.
(Bugzilla.add_attachment_to_bug): Ditto.
(Bugzilla.add_patch_to_bug): Ditto.
(Bugzilla.create_bug): Ditto.
(Bugzilla.clear_attachment_flags): Ditto.
(Bugzilla.set_flag_on_attachment): Ditto.
(Bugzilla.obsolete_attachment): Ditto.
(Bugzilla.add_cc_to_bug): Ditto.
(Bugzilla.post_comment_to_bug): Ditto.
(Bugzilla.close_bug_as_fixed): Ditto.
(Bugzilla.reassign_bug): Ditto.
(Bugzilla.reopen_bug): Ditto.
(Bugzilla._fetch_bug_page_by_url): Deleted, not required anymore.
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Added a FIXME.

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