Timeline



Dec 13, 2016:

11:20 PM Changeset in webkit [209793] by commit-queue@webkit.org
  • 48 edits in trunk/Source

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

Cause build failures (Requested by yusukesuzuki on #webkit).

Reverted changeset:

"Use JSValue::toWTFString instead of calling toString(exec)
and value(exec)"
https://bugs.webkit.org/show_bug.cgi?id=165795
http://trac.webkit.org/changeset/209792

11:02 PM Changeset in webkit [209792] by Yusuke Suzuki
  • 48 edits in trunk/Source

Use JSValue::toWTFString instead of calling toString(exec) and value(exec)
https://bugs.webkit.org/show_bug.cgi?id=165795

Reviewed by Saam Barati.

Source/JavaScriptCore:

In old days, we frequently use the idiom like, value.toString(exec)->value(exec) to
get WTFString from the given JSValue. But now, we have better function, toWTFString.
toWTFString does not create intermediate JSString objects, then reduce unnecessary
allocations.

This patch mechanically replaces value.toString(exec)->value(exec) with toWTFString(exec).

  • API/JSValueRef.cpp:

(JSValueToStringCopy):

  • bindings/ScriptValue.cpp:

(Deprecated::ScriptValue::toString):

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::reportAPIException):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::evaluateWithScopeExtension):

  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::JSJavaScriptCallFrame::evaluateWithScopeExtension):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::extractSourceInformationFromException):

  • runtime/ConsoleObject.cpp:

(JSC::valueToStringWithUndefinedOrNullCheck):
(JSC::valueOrDefaultLabelString):

  • runtime/DateConstructor.cpp:

(JSC::dateParse):

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::sanitizedToString):

  • runtime/ErrorPrototype.cpp:

(JSC::errorProtoFuncToString):

  • runtime/InspectorInstrumentationObject.cpp:

(JSC::inspectorInstrumentationObjectLog):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::toWTFStringSlowCase):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • runtime/JSModuleLoader.cpp:

(JSC::JSModuleLoader::fetch):

  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

  • runtime/RegExpConstructor.cpp:

(JSC::regExpCreate):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncCompile):
(JSC::regExpProtoFuncToString):

  • runtime/StringPrototype.cpp:

(JSC::replaceUsingRegExpSearch):
(JSC::replaceUsingStringSearch):
(JSC::stringProtoFuncSlice):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstr):
(JSC::stringProtoFuncLocaleCompare):
(JSC::stringProtoFuncBig):
(JSC::stringProtoFuncSmall):
(JSC::stringProtoFuncBlink):
(JSC::stringProtoFuncBold):
(JSC::stringProtoFuncFixed):
(JSC::stringProtoFuncItalics):
(JSC::stringProtoFuncStrike):
(JSC::stringProtoFuncSub):
(JSC::stringProtoFuncSup):
(JSC::stringProtoFuncFontcolor):
(JSC::stringProtoFuncFontsize):
(JSC::stringProtoFuncAnchor):
(JSC::stringProtoFuncLink):
(JSC::trimString):
(JSC::stringProtoFuncStartsWith):
(JSC::stringProtoFuncEndsWith):
(JSC::stringProtoFuncIncludes):
(JSC::builtinStringIncludesInternal):
(JSC::stringProtoFuncNormalize):

  • tools/JSDollarVMPrototype.cpp:

(JSC::functionPrint):

  • wasm/js/JSWebAssemblyCompileError.h:

(JSC::JSWebAssemblyCompileError::create):

  • wasm/js/JSWebAssemblyRuntimeError.h:

(JSC::JSWebAssemblyRuntimeError::create):

Source/WebCore:

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::createIDBKeyFromValue):
(WebCore::getNthValueOnKeyPath): Deleted.
(WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::ensureNthValueOnKeyPath): Deleted.
(WebCore::canInjectNthValueOnKeyPath): Deleted.
(WebCore::injectIDBKeyIntoScriptValue): Deleted.
(WebCore::maybeCreateIDBKeyFromScriptValueAndKeyPath): Deleted.
(WebCore::canInjectIDBKeyIntoScriptValue): Deleted.
(WebCore::deserializeIDBValueToJSValue): Deleted.
(WebCore::scriptValueToIDBKey): Deleted.
(WebCore::idbKeyDataToScriptValue): Deleted.
(WebCore::createKeyPathArray): Deleted.
(WebCore::generateIndexKeyForValue): Deleted.

  • bindings/js/JSAudioTrackCustom.cpp:

(WebCore::JSAudioTrack::setKind):
(WebCore::JSAudioTrack::setLanguage):

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):

  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::setLocation):

  • bindings/js/JSDeviceMotionEventCustom.cpp:

(WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):

  • bindings/js/JSDeviceOrientationEventCustom.cpp:

(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):

  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::handleEvent):
(WebCore::JSEventListener::virtualisAttribute): Deleted.
(WebCore::JSEventListener::operator==): Deleted.
(WebCore::eventHandlerAttribute): Deleted.
(WebCore::createEventListenerForEventHandlerAttribute): Deleted.
(WebCore::setEventHandlerAttribute): Deleted.
(WebCore::windowEventHandlerAttribute): Deleted.
(WebCore::setWindowEventHandlerAttribute): Deleted.
(WebCore::documentEventHandlerAttribute): Deleted.
(WebCore::setDocumentEventHandlerAttribute): Deleted.

  • bindings/js/JSHTMLAllCollectionCustom.cpp:

(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::namedItem):

  • bindings/js/JSHTMLFormControlsCollectionCustom.cpp:

(WebCore::JSHTMLFormControlsCollection::namedItem):

  • bindings/js/JSHTMLInputElementCustom.cpp:

(WebCore::JSHTMLInputElement::setSelectionDirection):
(WebCore::JSHTMLInputElement::setSelectionRange): Deleted.

  • bindings/js/JSInspectorFrontendHostCustom.cpp:

(WebCore::populateContextMenuItems):
(WebCore::JSInspectorFrontendHost::showContextMenu): Deleted.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::handleInitMessageEvent):

  • bindings/js/JSSQLTransactionCustom.cpp:

(WebCore::JSSQLTransaction::executeSql):

  • bindings/js/JSTextTrackCustom.cpp:

(WebCore::JSTextTrack::setLanguage):

  • bindings/js/JSVideoTrackCustom.cpp:

(WebCore::JSVideoTrack::setKind):
(WebCore::JSVideoTrack::setLanguage):

  • bindings/js/JSWebKitSubtleCryptoCustom.cpp:

(WebCore::cryptoKeyFormatFromJSValue):
(WebCore::cryptoKeyUsagesFromJSValue):

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::send):
(WebCore::JSXMLHttpRequest::responseText): Deleted.
(WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.

  • bindings/js/JSXSLTProcessorCustom.cpp:

(WebCore::JSXSLTProcessor::setParameter):
(WebCore::JSXSLTProcessor::getParameter):
(WebCore::JSXSLTProcessor::removeParameter):

  • bindings/js/ScheduledAction.cpp:

(WebCore::ScheduledAction::create):

  • bridge/c/c_utility.cpp:

(JSC::Bindings::convertValueToNPVariant):

  • bridge/testbindings.cpp:

(main):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):

Source/WebKit2:

  • WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:

(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):

10:22 PM Changeset in webkit [209791] by Yusuke Suzuki
  • 4 edits in trunk

ASSERTION FAILED: hasParserBlockingScript() seen with js/dom/modules/module-will-fire-beforeload.html
https://bugs.webkit.org/show_bug.cgi?id=164883

Reviewed by Ryosuke Niwa.

Source/WebCore:

This is *attempt to fix* patch since I cannot reproduce the crash reported in this issue.
One possible scenario of this crash is the following.

  1. There is pending deferred scripts, that is not fetched yet.
  2. Then, we start watching on the script. And stop document parser.
  3. The document parser is stopped/detached by calling finishJSTest in beforeload.
  4. At this critical timing, (2)'s script is fetched, and notifyFinished is called since it is watched.

In this patch, we ignore the script execution if the document parser is stopped / detached.
Previously, it goes into the wrong path. And it causes assertion failure.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::notifyFinished):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
10:09 PM Changeset in webkit [209790] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Memory warning logging appears to capture resident footprint, missing compress/swap.
https://bugs.webkit.org/show_bug.cgi?id=165533
<rdar://problem/29318410>

Patch by Keith Rollin <Keith Rollin> on 2016-12-13
Reviewed by Daniel Bates.

Fix GTK build by adding an explicit constructor.

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::ReliefLogger::MemoryUsage::MemoryUsage):

8:18 PM Changeset in webkit [209789] by dbates@webkit.org
  • 3 edits
    8 adds in trunk

CSP: ws: and wss: blocked with connect-src *
https://bugs.webkit.org/show_bug.cgi?id=165804
<rdar://problem/28563643>

Reviewed by David Kilzer.

Source/WebCore:

Allow * to match ws: and wss:. This will make our behavior of * more closely conform
the behavior of * in the Content Security Policy Level 3 spec.,
<https://w3c.github.io/webappsec-csp/#match-url-to-source-expression> (Editor's Draft, 2 December 2016).

Tests: http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed.html

http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed.html
http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed.html
http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed.html

  • page/csp/ContentSecurityPolicySourceList.cpp:

(WebCore::ContentSecurityPolicySourceList::isProtocolAllowedByStar):

LayoutTests:

Add tests to ensure that * matches ws: and wss:.

  • http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-secure-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/connect-src-star-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-secure-websocket-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/default-src-star-websocket-allowed.html: Added.
7:24 PM Changeset in webkit [209788] by hyatt@apple.com
  • 7 edits in trunk/Source/WebCore

[CSS Parser] Make CSSFunctionValue derive from CSSValueList
https://bugs.webkit.org/show_bug.cgi?id=165832

Reviewed by Dean Jackson.

With the old parser gone, we can now shrink CSSFunctionValue a bit by
having it derive from CSSValueList instead of having an extra member
that holds a value list of arguments. This is similar to the trick
already employed by WebkitCSSTransformValue.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::specifiedValueForGridTrackSize):

  • css/CSSFunctionValue.cpp:

(WebCore::CSSFunctionValue::customCSSText):
(WebCore::CSSFunctionValue::CSSFunctionValue): Deleted.
(WebCore::CSSFunctionValue::equals): Deleted.
(WebCore::CSSFunctionValue::append): Deleted.

  • css/CSSFunctionValue.h:
  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertScrollSnapPoints):
(WebCore::StyleBuilderConverter::createGridTrackSize):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::createFilterOperations):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::isGridTrackFixedSized):

6:39 PM Changeset in webkit [209787] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Make Document a FrameDestructionObserver
https://bugs.webkit.org/show_bug.cgi?id=165810
<rdar://problem/29157645>

Reviewed by Ryosuke Niwa.

Make Document a FrameDestructionObserver to make sure Document::m_frame
is properly nulled out when a Frame gets destroyed.
Document::disconnectFromFrame() is supposed to be called before the Frame
gets destroyed so this also adds an assertion to try and identify places
where we fail to call it.

No new tests, no known reproduction case.

  • dom/Document.cpp:

(WebCore::Document::Document):
(WebCore::Document::disconnectFromFrame):
(WebCore::Document::frameDestroyed):

  • dom/Document.h:

(WebCore::Document::frame): Deleted.

6:39 PM Changeset in webkit [209786] by achristensen@apple.com
  • 4 edits in trunk

Fix CMake build.

Source/WebKit2:

  • PlatformMac.cmake:

Tools:

  • DumpRenderTree/PlatformMac.cmake:

Define NS_RETURNS_RETAINED as nothing for now.

5:31 PM Changeset in webkit [209785] by sbarati@apple.com
  • 8 edits
    2 adds in trunk

WebAssembly: implement the elements section
https://bugs.webkit.org/show_bug.cgi?id=165715

Reviewed by Keith Miller.

JSTests:

  • wasm/Builder.js:

(export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
(export.default.Builder.prototype._registerSectionBuilders.switch):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Element):

  • wasm/function-tests/basic-element.js: Added.
  • wasm/js-api/element.js: Added.

(assertBadBinary):
(assertBadBinary.badInstantiation):

Source/JavaScriptCore:

This is a straight forward implementation of the Element
section in the Wasm spec:
https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#element-section

There are a few ambiguities I encountered when implementing this, so I've
filed bugs against the Wasm design repo, and corresponding bugzilla bugs
for us to address after they've been discussed by the various Wasm folks:

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

(JSC::Wasm::ModuleParser::parseElement):
(JSC::Wasm::ModuleParser::parseInitExpr):
(JSC::Wasm::ModuleParser::parseData):

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

(JSC::WebAssemblyModuleRecord::evaluate):

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

REGRESSION(r204163): Web Inspector: Page crashes when Inspector tries to load insecure SourceMap
https://bugs.webkit.org/show_bug.cgi?id=165806
<rdar://problem/28169025>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-13
Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/inspector/network/loadResource-insecure-resource.html

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::loadResource):
DocumentThreadableLoader now triggers the ThreadableLoaderClient's didFail
callback, so this didFailLoaderCreation is now redundent and incorrect.

LayoutTests:

  • http/tests/inspector/network/loadResource-insecure-resource-expected.txt: Added.
  • http/tests/inspector/network/loadResource-insecure-resource.html: Added.
  • http/tests/inspector/network/resource-timing.html:
  • http/tests/inspector/resources/inspector-test.js:

(runTestHTTPS):

4:18 PM Changeset in webkit [209783] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Enhance fast path translate transforms to allow percentages
https://bugs.webkit.org/show_bug.cgi?id=165822

Reviewed by Simon Fraser.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseTransformTranslateArguments):

3:37 PM Changeset in webkit [209782] by jer.noble@apple.com
  • 6 edits in trunk

Fullscreen in WebKit2 does not restore topContentInset upon exiting; leaves top of page not visible
https://bugs.webkit.org/show_bug.cgi?id=165697

Source/WebKit2:

Delegate the values of topContentInset() from WebViewImpl (used by WKWebView and WKView) to the
WebPageProxy, so that setting the topContentInset() on WebPageProxy is reflected in the getters
for the two view classes.

Reviewed by Tim Horton.

  • UIProcess/Cocoa/WebViewImpl.h:

(WebKit::WebViewImpl::topContentInset): Deleted.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateContentInsetsIfAutomatic):
(WebKit::WebViewImpl::topContentInset):
(WebKit::WebViewImpl::setTopContentInset):
(WebKit::WebViewImpl::dispatchSetTopContentInset):

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
(-[WKFullScreenWindowController _saveTopContentInset]): Deleted.
(-[WKFullScreenWindowController _restoreTopContentInset]): Deleted.

Tools:

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebKit2Cocoa/FullscreenTopContentInset.mm:

(TestWebKitAPI::TEST):

3:24 PM Changeset in webkit [209781] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html after r209777.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
3:22 PM Changeset in webkit [209780] by rniwa@webkit.org
  • 5 edits
    4 adds in trunk

:hover rule causes a single tap to not activate a slotted anchor element
https://bugs.webkit.org/show_bug.cgi?id=165551

Reviewed by Antti Koivisto.

Source/WebCore:

Fixed a bug in ancestorRespondingToClickEvents that we were traversing the ancestor nodes without taking
shadow roots and slots into account. This prevented tapping on a text node assigned to a slot inside
an anchor element to activate the hyperlink on iOS.

This bug was supposed to be fixed in r206605, and it was still broken on iOS due to the bug in
ancestorRespondingToClickEvents. It is now tested by click-text-inside-linked-slot.html.

Tests: fast/shadow-dom/click-on-slotted-anchor-with-hover.html

fast/shadow-dom/click-text-inside-linked-slot.html

  • page/ios/FrameIOS.mm:

(WebCore::ancestorRespondingToClickEvents):
(WebCore::Frame::qualifyingNodeAtViewportLocation):

LayoutTests:

Added a test for tapping on an anchor element assigned to a slot, which has been fixed in r209065.

Also added a new helper JS wrapepr, UIHelper, defined inside LayoutTests/resources/js-helper.js
to provide an abstraction around EventSender and UIScriptController.

Fixed click-text-inside-linked-slot.html on iOS using UIHelper.

  • fast/shadow-dom/click-on-slotted-anchor-with-hover-expected.txt: Added.
  • fast/shadow-dom/click-on-slotted-anchor-with-hover.html: Added.
  • fast/shadow-dom/click-text-inside-linked-slot.html:
  • platform/ios-simulator/fast/shadow-dom/click-text-inside-linked-slot-expected.txt: Added.
  • resources/ui-helper.js: Added.

(window.UIHelper.isIOS):
(window.UIHelper.activateAt.return.new.Promise):
(window.UIHelper.activateAt):
(window.UIHelper.wait):
(window.UIHelper):

  • platform/ios-simulator-wk2/TestExpectations: Skip the test in the open source iOS's WebKit2.
2:56 PM Changeset in webkit [209779] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit2

[Mac][WK2] Tighten Keychain directory access
https://bugs.webkit.org/show_bug.cgi?id=165818
<rdar://problem/16863857>

Reviewed by Anders Carlsson.

Lock down Keychain directory access to just the file-read-data, file-read-metadata, and
file-write-data operations we actually need.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
2:27 PM Changeset in webkit [209778] by jfbastien@apple.com
  • 2 edits in trunk/Source/WTF

std::expected: fix rvalue forwarding issues
https://bugs.webkit.org/show_bug.cgi?id=165812

Reviewed by Mark Lam.

  • wtf/Expected.h:

(WTF::UnexpectedType::UnexpectedType):
(WTF::ExpectedDetail::Base::Base):
(WTF::Expected::Expected):

2:15 PM Changeset in webkit [209777] by hyatt@apple.com
  • 51 edits
    6 deletes in trunk

[CSS Parser] Eliminate SVGPaint and SVGColor
https://bugs.webkit.org/show_bug.cgi?id=165819

Reviewed by Dean Jackson.

Source/WebCore:

Remove SVGColor and SVGPaint CSS values from the tree. The new parser
already stopped making these values when parsing, so all that's left
is to make sure computed style doesn't use these values either.

We are the only browser engine to support these CSS values, they see no use
on the Web, and they're already gone at the parsing level, so it's time
to remove these interfaces from our tree.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::toJSNewlyCreated):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
(WebCore::CSSValue::cloneForCSSOM):

  • css/CSSValue.h:

(WebCore::CSSValue::isSubtypeExposedToCSSOM):
(WebCore::CSSValue::isSVGColor): Deleted.
(WebCore::CSSValue::isSVGPaint): Deleted.

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertSVGColor):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueFill):
(WebCore::StyleBuilderCustom::applyValueStroke):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::fillPaintType):
(WebCore::RenderStyle::setFillPaintColor):
(WebCore::RenderStyle::strokePaintType):
(WebCore::RenderStyle::setStrokePaintColor):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialFillPaintType):
(WebCore::SVGRenderStyle::initialStrokePaintType):
(WebCore::SVGRenderStyle::setFillPaint):
(WebCore::SVGRenderStyle::setStrokePaint):
(WebCore::SVGRenderStyle::fillPaintType):
(WebCore::SVGRenderStyle::strokePaintType):
(WebCore::SVGRenderStyle::visitedLinkFillPaintType):
(WebCore::SVGRenderStyle::visitedLinkStrokePaintType):
(WebCore::SVGRenderStyle::hasStroke):
(WebCore::SVGRenderStyle::hasFill):

  • rendering/style/SVGRenderStyleDefs.h:
  • rendering/svg/RenderSVGResource.cpp:

(WebCore::requestPaintingResource):

  • rendering/svg/SVGResources.cpp:

(WebCore::paintingResourceFromSVGPaint):

  • svg/SVGAllInOne.cpp:
  • svg/SVGAnimatedColor.cpp:

(WebCore::SVGAnimatedColorAnimator::constructFromString):
(WebCore::parseColorFromString):
(WebCore::SVGAnimatedColorAnimator::calculateDistance):

  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::setValueAsString):

  • svg/SVGAnimatedType.h:
  • svg/SVGColor.cpp: Removed.
  • svg/SVGColor.h: Removed.
  • svg/SVGColor.idl: Removed.
  • svg/SVGFEDiffuseLightingElement.cpp:
  • svg/SVGFESpecularLightingElement.cpp:
  • svg/SVGPaint.cpp: Removed.
  • svg/SVGPaint.h: Removed.
  • svg/SVGPaint.idl: Removed.

LayoutTests:

  • fast/dom/Window/resources/window-properties.js:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/fast/dom/Window/window-lookup-precedence-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • svg/animations/additive-type-by-animation-expected.txt:
  • svg/animations/animate-color-calcMode-discrete-expected.txt:
  • svg/animations/animate-color-fill-currentColor-expected.txt:
  • svg/animations/animate-color-fill-from-by-expected.txt:
  • svg/animations/animate-color-transparent-expected.txt:
  • svg/animations/animate-currentColor-expected.txt:
  • svg/animations/animate-dynamic-update-attributeName-expected.txt:
  • svg/animations/animate-elem-03-t-drt-expected.txt:
  • svg/animations/animate-inherit-css-property-expected.txt:
  • svg/animations/attributeTypes-expected.txt:
  • svg/animations/resources/SVGAnimationTestCase.js:

(expectColor):

  • svg/animations/script-tests/animate-color-fill-currentColor.js:

(sample1):
(sample2):
(sample3):

  • svg/animations/script-tests/animate-color-fill-from-by.js:

(sample1):
(sample2):
(sample3):

  • svg/css/getComputedStyle-basic-expected.txt:
  • svg/css/rect-system-color-expected.txt:
  • svg/css/rect-system-color.xhtml:
  • svg/custom/global-constructors-expected.txt:
  • svg/custom/js-svg-constructors-expected.txt:
  • svg/custom/js-svg-constructors.svg:
  • svg/custom/script-tests/global-constructors.js:
2:11 PM Changeset in webkit [209776] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Restore NSURLRequest's default time interval to match behavior before NSURLSession adoption
https://bugs.webkit.org/show_bug.cgi?id=165821
<rdar://problem/28492939>

Reviewed by Brady Eidson.

Before adopting NSURLSession, iOS used CFURLConnection, not NSURLConnection.
iOS used to have a default timeout of INT_MAX and it now has a default timeout of 0, which means use the
default NSURLRequest timeout, which is 60 seconds. This is not enough for some slow mobile networks,
so we want to match behavior of our CFURLConnection code here.

  • platform/network/ResourceRequestBase.cpp:

Use INT_MAX as the default timeout of requests on iOS.

2:08 PM Changeset in webkit [209775] by aestes@apple.com
  • 7 edits in trunk

[Cocoa] Implement -shouldInsertText: on WKWebProcessPlugInEditingDelegate
https://bugs.webkit.org/show_bug.cgi?id=165785
<rdar://problem/26929398>

Reviewed by Darin Adler.

Source/WebKit2:

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Defined

WKEditorInsertAction and declared
-_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction:.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(toWK): Added. Mapped a WebCore::EditorInsertAction to a WKEditorInsertAction.
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Implemented
EditorClient::shouldInsertText() by calling
-_webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction: with
the text, wrapped range handle, and action. Added shouldInsertText to DelegateMethods and
initialized it according to whether the delegate responds to shouldInsertText:.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

(-[BundleEditingDelegateRemoteObject shouldInsertText:replacingRange:givenAction:]): Added
expectations for the text, range, and action.
(TEST): Set the "EditingDelegateShouldInsertText" bundle parameter to NO so that the plug-in
will return NO in -_webProcessPlugInBrowserContextController:willInsertText:. Added a
plain-text string to the pasteboard, executed a paste action, and verified that the selected
text in the web view did not change.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm:

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]): Set
_editingDelegateShouldInsertText according to the "EditingDelegateShouldInsertText" bundle
parameter.
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:shouldInsertText:replacingRange:givenAction:]):
Added. Called -shouldInsertText:replacingRange:givenAction: on the remote object proxy
and returned the value of _editingDelegateShouldInsertText.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegateProtocol.h: Declared

-shouldInsertText:replacingRange:givenAction:.

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

Rebaseline js/dom/global-constructors-attributes.html after r209760.

Unreviewed test gardening.

  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
12:44 PM Changeset in webkit [209773] by Chris Dumez
  • 6 edits in trunk

Unreviewed, rolling out r209544.

Looks like r209489 did not cause the performance regression
after all

Reverted changeset:

"Unreviewed, rolling out r209489."
https://bugs.webkit.org/show_bug.cgi?id=165550
http://trac.webkit.org/changeset/209544

12:41 PM Changeset in webkit [209772] by beidson@apple.com
  • 1 edit
    1 add in trunk/PerformanceTests

Add a PerfTest targeting IDBObjectStore.get().
https://bugs.webkit.org/show_bug.cgi?id=165816

Reviewed by Alex Christensen.

  • IndexedDB/objectstore-get.html: Added.
12:32 PM Changeset in webkit [209771] by sbarati@apple.com
  • 27 edits
    4 adds in trunk

WebAssembly: implement the table section and table import
https://bugs.webkit.org/show_bug.cgi?id=165716

Reviewed by Keith Miller.

JSTests:

  • wasm/Builder.js:

(const._importMemoryContinuation):
(const._importTableContinuation):
(export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
(const._importMemoryContinuation.section): Deleted.
(const): Deleted.
(const._importMemoryContinuation.assert): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.putResizableLimits):
(const.putTable):
(const.emitters.Import):
(const.emitters.Table):

  • wasm/function-tests/call-indirect-params.js:
  • wasm/function-tests/call-indirect.js:
  • wasm/function-tests/table-basic-2.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):
(func):

  • wasm/function-tests/table-basic.js: Added.

(import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.makeInstance):

  • wasm/js-api/call-indirect-results.js:

(const.wasmModuleWhichImportJS): Deleted.
(MonomorphicImport): Deleted.

  • wasm/js-api/call-indirect.js:

(const.wasmModuleWhichImportJS):
(const.makeTable):
(Polyphic2Import):
(VirtualImport):
(MonomorphicImport): Deleted.

  • wasm/js-api/table.js: Added.

(assertBadBinary):
(assert.truthy):
(assertBadTable):
(assertBadTableImport):
(assertBadBinary.assertBadTableInstance):
(assertBadTableInstance):
(new.WebAssembly.Table):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

Source/JavaScriptCore:

This patch implements the Table space for wasm:
https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#table-section

It only implements defining and importing a table. The bulk
of this patch is implementing the various wasm Table prototype
methods and the underlying Table object:
https://github.com/WebAssembly/design/blob/master/JS.md#webassemblytable-constructor

This patch also fixes a bug in our implementation with call_indirect.
We initially implemented call_indirect as a way to call functions that
are imported or defined in the module. This was the wrong
interpretation of the spec. Instead, call_indirect can only index into
the table index space.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmFormat.h:

(JSC::Wasm::TableInformation::TableInformation):
(JSC::Wasm::TableInformation::operator bool):
(JSC::Wasm::TableInformation::isImport):
(JSC::Wasm::TableInformation::initial):
(JSC::Wasm::TableInformation::maximum):
(JSC::Wasm::CallableFunction::CallableFunction):

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseResizableLimits):
(JSC::Wasm::ModuleParser::parseTableHelper):
(JSC::Wasm::ModuleParser::parseTable):
(JSC::Wasm::ModuleParser::parseMemoryHelper):
(JSC::Wasm::ModuleParser::parseExport):

  • wasm/WasmModuleParser.h:
  • wasm/js/JSWebAssemblyHelpers.h: Added.

(JSC::toNonWrappingUint32):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::table):
(JSC::JSWebAssemblyInstance::setTable):
(JSC::JSWebAssemblyInstance::offsetOfTable):

  • wasm/js/JSWebAssemblyTable.cpp:

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

  • wasm/js/JSWebAssemblyTable.h:

(JSC::JSWebAssemblyTable::maximum):
(JSC::JSWebAssemblyTable::size):
(JSC::JSWebAssemblyTable::getFunction):
(JSC::JSWebAssemblyTable::offsetOfSize):
(JSC::JSWebAssemblyTable::offsetOfFunctions):
(JSC::JSWebAssemblyTable::isValidSize):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::call):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):

  • wasm/js/WebAssemblyFunction.h:

(JSC::WebAssemblyFunction::signature):
(JSC::WebAssemblyFunction::wasmEntrypoint):
(JSC::WebAssemblyFunction::webAssemblyCallee): Deleted.

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::constructJSWebAssemblyTable):

  • wasm/js/WebAssemblyTablePrototype.cpp:

(JSC::getTable):
(JSC::webAssemblyTableProtoFuncLength):
(JSC::webAssemblyTableProtoFuncGrow):
(JSC::webAssemblyTableProtoFuncGet):
(JSC::webAssemblyTableProtoFuncSet):
(JSC::WebAssemblyTablePrototype::create):
(JSC::WebAssemblyTablePrototype::finishCreation):

  • wasm/js/WebAssemblyTablePrototype.h:
12:24 PM Changeset in webkit [209770] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove ios-simulator-wk2 pass expectation for a directory that requires touch events.
https://bugs.webkit.org/show_bug.cgi?id=165787

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
12:23 PM Changeset in webkit [209769] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

NSArray leaks seen in Safari, allocated under WKIconDatabaseTryCopyCGImageArrayForURL
https://bugs.webkit.org/show_bug.cgi?id=165809

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-13
Reviewed by Dan Bernstein.

  • UIProcess/API/C/cg/WKIconDatabaseCG.cpp:

(WKIconDatabaseTryCopyCGImageArrayForURL):
Avoid an extra retain on already newly created array.

12:18 PM Changeset in webkit [209768] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking two scroll-to-fragid tests as flaky on ios-simulator.

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
12:14 PM Changeset in webkit [209767] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Add null checks to opaque root APIs.

Rubber stamped by Saam Barati.

If we got a crash report about null in the opaque root HashSet, we would probably not
celebrate how great it is that we found out about a new race - instead we would probably
be annoyed that null wasn't just silently ignored.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRootTriState):

11:54 AM Changeset in webkit [209766] by fpizlo@apple.com
  • 27 edits in trunk/Source

Make opaque root scanning truly constraint-based
https://bugs.webkit.org/show_bug.cgi?id=165760

Reviewed by Saam Barati.
Source/JavaScriptCore:


We have bugs when visitChildren() changes its mind about what opaque root to add, since
we don't have barriers on opaque roots. This supposedly once worked for generational GC,
and I started adding more barriers to support concurrent GC. But I think that the real
bug here is that we want the JSObject->OpaqueRoot to be evaluated as a constraint that
participates in the fixpoint. A constraint is different from the normal visiting in that
the GC will not wait for a barrier to rescan the object.

So, it's now possible for any visitChildren() method to become a constraint by calling
slotVisitor.rescanAsConstraint(). Because opaque roots are constraints, addOpaqueRoot()
does rescanAsConstraint() for you.

The constraint set is simply a HashSet<JSCell*> that accumulates with every
rescanAsConstraint() call and is only cleared at the start of full GC. This trivially
resolves most classes of GC bugs that would have arisen from opaque roots being changed
in a way that the GC did not anticipate.

Looks like this is perf-neutral.

  • heap/Heap.cpp:

(JSC::Heap::markToFixpoint):
(JSC::Heap::setMutatorShouldBeFenced):
(JSC::Heap::writeBarrierOpaqueRootSlow): Deleted.
(JSC::Heap::addMutatorShouldBeFencedCache): Deleted.

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::writeBarrierOpaqueRoot): Deleted.

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::visitWeakSets):

  • heap/MarkedSpace.h:
  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::visitSubsequently):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::rescanAsConstraint):
(JSC::SlotVisitor::mergeIfNecessary):
(JSC::SlotVisitor::mergeOpaqueRootsAndConstraints):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary): Deleted.

  • heap/SlotVisitor.h:
  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::reportExternalMemoryVisited):
(JSC::SlotVisitor::didNotRace):

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::visit):

  • heap/WeakBlock.h:
  • heap/WeakSet.h:

(JSC::WeakSet::visit):

Source/WebCore:

No new tests yet. I think that writing tests for this is a big investigation:
https://bugs.webkit.org/show_bug.cgi?id=165808

Remove the previous advancing wavefront DOM write barrier. I don't think this will scale
very well. It's super confusing.

This change makes it so that visitChildren can become a GC constraint that executes as
part of the fixpoint. This changes all WebCore visitChildren methods that do opaque
roots into constraints.

  • bindings/js/CommonVM.cpp:

(WebCore::commonVMSlow):
(WebCore::writeBarrierOpaqueRootSlow): Deleted.

  • bindings/js/CommonVM.h:

(WebCore::writeBarrierOpaqueRoot): Deleted.

  • bindings/js/JSAttrCustom.cpp:

(WebCore::JSAttr::visitAdditionalChildren):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::visitAdditionalChildren):

  • bindings/js/JSIDBCursorCustom.cpp:

(WebCore::JSIDBCursor::visitAdditionalChildren):

  • bindings/js/JSMessageChannelCustom.cpp:

(WebCore::JSMessageChannel::visitAdditionalChildren):

  • bindings/js/JSMessagePortCustom.cpp:

(WebCore::JSMessagePort::visitAdditionalChildren):

  • bindings/js/JSNodeIteratorCustom.cpp:

(WebCore::JSNodeIterator::visitAdditionalChildren):

  • bindings/js/JSTextTrackCueCustom.cpp:

(WebCore::JSTextTrackCue::visitAdditionalChildren):

  • bindings/js/JSTreeWalkerCustom.cpp:

(WebCore::JSTreeWalker::visitAdditionalChildren):

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::visitAdditionalChildren):

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::visitAdditionalChildren):

  • bindings/js/JSXPathResultCustom.cpp:

(WebCore::JSXPathResult::visitAdditionalChildren):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted):
(WebCore::notifyChildNodeRemoved):

11:44 AM Changeset in webkit [209765] by beidson@apple.com
  • 1 edit
    1 add in trunk/PerformanceTests

Add a PerfTest targeting IDBIndex.get().
https://bugs.webkit.org/show_bug.cgi?id=165803

Reviewed by Alex Christensen.

  • IndexedDB/index-get.html: Added.
11:38 AM Changeset in webkit [209764] by commit-queue@webkit.org
  • 105 edits
    14 deletes in trunk

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

"Broke ARMv7 builds" (Requested by msaboff on #webkit).

Reverted changeset:

"REGRESSION(r209653): speedometer crashes making virtual slow
path tailcalls"
https://bugs.webkit.org/show_bug.cgi?id=165748
http://trac.webkit.org/changeset/209725

11:28 AM Changeset in webkit [209763] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, revert the collectorPermittedIdleRatio back to 0 because of 100MB
regression on membuster. Also, it didn't seem to help perf.

  • runtime/Options.h:
11:26 AM Changeset in webkit [209762] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/events/page-visibility-onvisibilitychange.html on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=165799

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
11:15 AM Changeset in webkit [209761] by jfbastien@apple.com
  • 6 edits in trunk/Source

[WTF] Turn tryMakeString(), makeString() into variadic templates
https://bugs.webkit.org/show_bug.cgi?id=147142

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/JSStringBuilder.h:

(JSC::jsMakeNontrivialString): remove WTF:: prefix, it isn't needed anymore

  • runtime/Lookup.cpp:

(JSC::reifyStaticAccessor): remove WTF:: prefix, it isn't needed anymore

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncToString): remove WTF:: prefix, it isn't needed anymore

Source/WTF:

I wrote this patch while improving WebAssembly's error messages,
and only found this bug afterwards. My implementation does the
bare minimum to make this code variadic without changing
behavior. I think it's better to go with this baby step first, and
improve the code later.

Notable, for my WebAssembly patch I also taught the code to handle
integers and other types (including WebAssembly types). A
follow-up could rely on ADL magic to pretty-format these other
types.

  • wtf/text/StringConcatenate.h:

(WTF::sumWithOverflow): This unconditionally does the sum for all
inputs, which the compiler is more likely to appreciate (because
it's the common case) compared to testing for overflow and bailing
on each addition
(WTF::are8Bit): are: the plural of is!
(WTF::makeStringAccumulator): accumulate strings
(WTF::tryMakeStringFromAdapters): a small helper which creates the string adapters
(WTF::tryMakeString): expose out of WTF, since it's part of this file's used API
(WTF::makeString): make it variadic

10:47 AM Changeset in webkit [209760] by weinig@apple.com
  • 14 edits
    3 adds
    1 delete in trunk

[WebIDL] Remove use of Dictionary in ApplePaySession
https://bugs.webkit.org/show_bug.cgi?id=165787

Reviewed by Anders Carlsson.

Source/WebCore:

First take at generating the bindings for ApplePaySession and removing
all use of Dictionary.

  • Removes all use of Dictionary!
  • Removes use of logging errors to the console with improved Exception messages.
  • Use ExceptionOr extensively to pass exception state.


Still to do:

  • Reconcile / merge ApplePaySession::PaymentRequest with WebCore::PaymentRequest and all the sub-objects held within.
  • Remove PaymentRequestValidator entirely, merging validation into the validation we already do in ApplePaySession.cpp
  • Make ApplePayEvents use generated dictionary creation code.

Test: http/tests/ssl/applepay/ApplePaySession.html

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::convertAndValidate):
(WebCore::canCallApplePaySessionAPIs):
(WebCore::ApplePaySession::create):
(WebCore::ApplePaySession::ApplePaySession):
(WebCore::ApplePaySession::supportsVersion):
(WebCore::ApplePaySession::canMakePayments):
(WebCore::ApplePaySession::canMakePaymentsWithActiveCard):
(WebCore::ApplePaySession::openPaymentSetup):
(WebCore::ApplePaySession::begin):
(WebCore::ApplePaySession::completeMerchantValidation):
(WebCore::ApplePaySession::completeShippingMethodSelection):
(WebCore::ApplePaySession::completeShippingContactSelection):
(WebCore::ApplePaySession::completePaymentMethodSelection):
(WebCore::ApplePaySession::didSelectShippingMethod):
(WebCore::createContactFields): Deleted.
(WebCore::toLineItemType): Deleted.
(WebCore::isValidLineItemPropertyName): Deleted.
(WebCore::createLineItem): Deleted.
(WebCore::createLineItems): Deleted.
(WebCore::createMerchantCapabilities): Deleted.
(WebCore::createSupportedNetworks): Deleted.
(WebCore::toShippingType): Deleted.
(WebCore::isValidShippingMethodPropertyName): Deleted.
(WebCore::createShippingMethod): Deleted.
(WebCore::createShippingMethods): Deleted.
(WebCore::isValidPaymentRequestPropertyName): Deleted.
(WebCore::createPaymentRequest): Deleted.

  • Modules/applepay/ApplePaySession.h:

Replace hand written dictionary extraction code with autogenerated code
and hand written additional validation.

  • Modules/applepay/ApplePaySession.idl:

Add helper dictionaries and enums.

  • Modules/applepay/PaymentRequestValidator.cpp:

(WebCore::PaymentRequestValidator::validate):
(WebCore::PaymentRequestValidator::validateTotal):
(WebCore::validateCountryCode):
(WebCore::validateCurrencyCode):
(WebCore::validateMerchantCapabilities):
(WebCore::validateSupportedNetworks):
(WebCore::validateShippingMethod):
(WebCore::validateShippingMethods):
(WebCore::PaymentRequestValidator::PaymentRequestValidator): Deleted.
(WebCore::PaymentRequestValidator::~PaymentRequestValidator): Deleted.
(WebCore::PaymentRequestValidator::validateCountryCode): Deleted.
(WebCore::PaymentRequestValidator::validateCurrencyCode): Deleted.
(WebCore::PaymentRequestValidator::validateMerchantCapabilities): Deleted.
(WebCore::PaymentRequestValidator::validateShippingMethod): Deleted.
(WebCore::PaymentRequestValidator::validateSupportedNetworks): Deleted.
(WebCore::PaymentRequestValidator::validateShippingMethods): Deleted.

  • Modules/applepay/PaymentRequestValidator.h:

Instead of reporting the validation errors to the console, pass them in the exception.
This allows us to remove the window member, and move the helpers to the implementation
file as statics.

  • WebCore.xcodeproj/project.pbxproj:

Remove file.

  • bindings/generic/IDLTypes.h:

(WebCore::IDLObject::nullValue):
(WebCore::IDLObject::isNullValue):
(WebCore::IDLObject::extractValueFromNullable):
Add nullability traits for IDLObject.

  • bindings/js/JSApplePaySessionCustom.cpp:

Removed.

Tools:

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):
(WTR::TestController::platformCreateWebView):
Enable ApplePay for the tests (where supported).

LayoutTests:

  • http/tests/ssl/applepay: Added.
  • http/tests/ssl/applepay/ApplePaySession-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePaySession.html: Added.

Add a compressive test of the handling of the payment request to the ApplePaySession
constructor. For further testing, we will need to mock out bits of the underlying
coordinator, but this allows for testing the aspect I am changing. The applepay
directory is in the ssl directory, as all use of ApplePay requires https.

  • TestExpectations:
  • platform/ios-simulator-wk2/TestExpectations:
  • platform/mac-wk2/TestExpectations:

Only enable the tests on iOS 10.10 and greater, and macOS 10.12 and greater, WebKit2.

10:21 AM Changeset in webkit [209759] by dbates@webkit.org
  • 5 edits
    8 adds in trunk

CSP: Teach the preload scanner about the 'nonce' attribute
https://bugs.webkit.org/show_bug.cgi?id=161192
<rdar://problem/28010354>

Reviewed by Darin Adler.

Source/WebCore:

This patch was inspired by a similar Blink change:
<https://chromium.googlesource.com/chromium/src/+/dde5487f380cf774e4c0e96ba7f88ea68e723907>

Preload external scripts and stylesheets whose HTML script and link elements have a nonce
attribute that is listed in the Content Security Policy (CSP) of the page.

Currently the preload scanner ignores the nonce attribute on HTML script and link elements.
So, WebKit does not preload their associated subresources unless the value of the src
attribute or href attribute is whitelisted in the CSP of the page for script and link
elements, respectively. Instead the preload scanner should recognize the nonce attribute on
script and link elements and query the CSP of the page with it. If the nonce attribute is
whitelisted then the request should be preloaded.

Tests: http/tests/loading/do-not-preload-css-blocked-by-csp.html

http/tests/loading/do-not-preload-script-src-blocked-by-csp.html
http/tests/loading/preload-css-with-csp-nonce.html
http/tests/loading/preload-script-src-with-csp-nonce.html

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest): Set the nonce on the
PreloadRequest to the nonce that we found during the scan.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): For script and link tag names,
save the value of the nonce attribute (if it has one).

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::PreloadRequest::resourceRequest): Skip CSP policy check if the nonce is listed in
the CSP of the page.

  • html/parser/HTMLResourcePreloader.h:

(WebCore::PreloadRequest::setNonce): Added.

LayoutTests:

Add tests to ensure that we preload <script>s and <link>s whose nonce is allowed by the
Content Security Policy of the page.

  • http/tests/loading/do-not-preload-css-blocked-by-csp-expected.txt: Added.
  • http/tests/loading/do-not-preload-css-blocked-by-csp.html: Added.
  • http/tests/loading/do-not-preload-script-src-blocked-by-csp-expected.txt: Added.
  • http/tests/loading/do-not-preload-script-src-blocked-by-csp.html: Added.
  • http/tests/loading/preload-css-with-csp-nonce-expected.txt: Added.
  • http/tests/loading/preload-css-with-csp-nonce.html: Added.
  • http/tests/loading/preload-script-src-with-csp-nonce-expected.txt: Added.
  • http/tests/loading/preload-script-src-with-csp-nonce.html: Added.
9:39 AM Changeset in webkit [209758] by hyatt@apple.com
  • 20 edits in trunk/Source/WebCore

[CSS Parser] Rename CSSPrimitiveValue::UnitTypes to CSSPrimitiveValue::UnitType
https://bugs.webkit.org/show_bug.cgi?id=165776

Reviewed by Zalan Bujtas.

  • css/CSSCalculationValue.cpp:

(WebCore::unitCategory):
(WebCore::hasDoubleValue):
(WebCore::determineCategory):
(WebCore::CSSCalcExpressionNodeParser::parseValue):

  • css/CSSCalculationValue.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::unitCategory):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::computeLengthDouble):
(WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
(WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
(WebCore::CSSPrimitiveValue::getFloatValue):
(WebCore::CSSPrimitiveValue::doubleValue):
(WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
(WebCore::CSSPrimitiveValue::doubleValueInternal):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):

  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::isFontRelativeLength):
(WebCore::CSSPrimitiveValue::isLength):
(WebCore::CSSPrimitiveValue::isResolution):
(WebCore::CSSPrimitiveValue::createAllowingMarginQuirk):

  • css/CSSValue.h:
  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createValue):

  • css/CSSValuePool.h:

(WebCore::CSSValuePool::createValue):

  • css/MediaQueryExp.cpp:

(WebCore::featureWithValidDensity):
(WebCore::MediaQueryExpression::MediaQueryExpression):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::parseSimpleLength):
(WebCore::parseSimpleLengthValue):
(WebCore::parseColorIntOrPercentage):
(WebCore::fastParseColorInternal):
(WebCore::parseTransformTranslateArguments):
(WebCore::parseTransformNumberArguments):

  • css/parser/CSSParserToken.cpp:

(WebCore::cssPrimitiveValueUnitFromTrie):
(WebCore::stringToUnitType):
(WebCore::CSSParserToken::CSSParserToken):
(WebCore::CSSParserToken::convertToPercentage):

  • css/parser/CSSParserToken.h:

(WebCore::CSSParserToken::unitType):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeTransformOrigin):
(WebCore::consumeCounter):
(WebCore::consumeAnimationName):
(WebCore::consumePerspective):
(WebCore::consumePositionLonghand):
(WebCore::consumeCounterContent):
(WebCore::consumeReflect):
(WebCore::consumeGridBreadth):
(WebCore::CSSPropertyParser::consumeFlex):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumber):
(WebCore::CSSPropertyParserHelpers::consumeInteger):
(WebCore::CSSPropertyParserHelpers::consumeLength):
(WebCore::CSSPropertyParserHelpers::consumePercent):
(WebCore::CSSPropertyParserHelpers::consumeAngle):
(WebCore::CSSPropertyParserHelpers::consumeTime):
(WebCore::CSSPropertyParserHelpers::consumeCustomIdent):
(WebCore::CSSPropertyParserHelpers::consumeString):
(WebCore::CSSPropertyParserHelpers::consumeUrl):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientPoint):
(WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
(WebCore::CSSPropertyParserHelpers::consumeCrossFade):
(WebCore::CSSPropertyParserHelpers::consumeImageSet):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::readFeatureValue):

  • css/parser/SizesAttributeParser.cpp:

(WebCore::SizesAttributeParser::computeLength):

  • css/parser/SizesAttributeParser.h:
  • dom/StyledElement.cpp:

(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):

  • dom/StyledElement.h:
  • svg/SVGLengthValue.cpp:

(WebCore::SVGLengthValue::toCSSPrimitiveValue):

8:59 AM Changeset in webkit [209757] by eric.carlson@apple.com
  • 6 edits in trunk

Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
https://bugs.webkit.org/show_bug.cgi?id=165251

Reviewed by Youenn Fablet.

Source/WebCore:

No new tests, fixes an API test.

  • page/Settings.in: Delete mediaStreamEnabled and peerConnectionEnabled, we don't need a

setting and a runtime feature.

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Update the media stream and peer connection runtime
feature instead of the setting.

Tools:

  • TestWebKitAPI/Tests/WebKit2/EnumerateMediaDevices.cpp:

(TestWebKitAPI::TEST): Enable MediaStream, create web view from the page group upon which
the preferences have been set.

8:08 AM Changeset in webkit [209756] by Antti Koivisto
  • 13 edits
    2 adds in trunk

Source/WebCore:
REGRESSION (r198990): Cannot edit content inside <details> in wysiwyg editor
https://bugs.webkit.org/show_bug.cgi?id=165757

Reviewed by Andreas Kling.

Test: fast/html/details-edit.html

-webkit-user-modify is reset on shadow boundary so it doesn't go through <details> shadow tree.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):

  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::computeEditability):

Make -webkit-user-modify (which we would want to get rid of completely eventually) have no effect in shadow trees.
Check for contenteditable directly instead.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::createInnerTextStyle):

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::createInnerTextStyle):

  • html/shadow/TextControlInnerElements.cpp:
  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::createFlowThreadStyle):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::styleDidChange):

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::createAnonymousStyleWithDisplay):
(WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
(WebCore::RenderStyle::inheritFrom):

Let -webkit-user-modify inherit through shadow boundary as normal.

  • rendering/style/RenderStyle.h:

LayoutTests:
REGRESSION (r198990): Safari - Cannot edit content inside <details> in wysiwyg editor
https://bugs.webkit.org/show_bug.cgi?id=165757

Reviewed by Andreas Kling.

  • editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt:
  • fast/html/details-edit-expected.txt: Added.
  • fast/html/details-edit.html: Added.
4:49 AM Changeset in webkit [209755] by Konstantin Tokarev
  • 2 edits in trunk/Source/WTF

Unreviewed, silence -Wsuggest-attribute for GCC with pragmas

  • wtf/PrintStream.cpp:

(WTF::PrintStream::printfVariableFormat):

4:25 AM Changeset in webkit [209754] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

Update test expectations on Windows for failing tests. These failures are tracked in
https://bugs.webkit.org/show_bug.cgi?id=160447.

  • platform/win/TestExpectations:
2:23 AM Changeset in webkit [209753] by svillar@igalia.com
  • 2 edits in trunk/Source/WebKit2

Fix GTK build after r209733
https://bugs.webkit.org/show_bug.cgi?id=165794

Document::visibilityState() now returns an IDL string enumeration.

Reviewed by Žan Doberšek.

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

(webkit_dom_document_get_visibility_state):

Dec 12, 2016:

9:17 PM Changeset in webkit [209752] by Darin Adler
  • 24 edits in trunk

Remove bindings generation support for legacy WebCore::Dictionary
https://bugs.webkit.org/show_bug.cgi?id=165762

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/datachannel-emptystring-expected.txt:
  • web-platform-tests/webrtc/no-media-call-expected.txt:
  • web-platform-tests/webrtc/promises-call-expected.txt:
  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:
  • web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:

Updated to expect error messages with "dictionary" with a lowercase D.

Source/WebCore:

After this patch, all use of legacy WebCore::Dictionary is within custom bindings or
inside the DOM code itself. Bindings generation machinery no longer has a special
type named "Dictionary" but has increasingly good support for IDL-defined dictionaries.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::create): Take ExecState and a JSValue rather than a Dictionary.
(WebCore::ApplePaySession::completeMerchantValidation): Ditto.

  • Modules/applepay/ApplePaySession.h: Updated for the above changes.
  • Modules/applepay/ApplePaySession.idl: For this last file using Dictionary in IDL, move

to "[CallWith=ScriptState]" and "any" as a stopgap. Later we can return and use IDL
dictionaries or other more modern solutions.

  • Modules/mediastream/MediaDevices.idl: For the custom binding written in JavaScript,

use the type mentioned in the specification rather than Dictionary. The bindings generator
ignores the type, so this is more like changing a comment rather than changing source code.

  • Modules/mediastream/RTCPeerConnection.js:

(initializeRTCPeerConnection): Refer to a non-object as not a valid "dictionary", lowercase
rather than "Dictionary".

  • Modules/mediastream/RTCPeerConnectionInternals.js:

(callbacksAndDictionaryOverload): Ditto.

  • bindings/generic/IDLTypes.h: Removed IDLLegacyDictionary.
  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::getHashAlgorithm): Fixed a comment.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLLegacyDictionary<T>>::convert): Deleted.

  • bindings/scripts/CodeGenerator.pm:

(IsBuiltinType): Removed special case for "Dictionary".

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType): Ditto.
(AreTypesDistinguishableForOverloadResolution): Ditto.
(GenerateOverloadedFunctionOrConstructor): Ditto.
(GenerateParametersCheck): Ditto.
(GetBaseIDLType): Ditto.

  • bindings/scripts/test/JS/JSTestObj.cpp: Regenerated results.
  • bindings/scripts/test/TestObj.idl: Removed test case for Dictionary.

LayoutTests:

  • fast/mediastream/RTCPeerConnection-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params-expected.txt:
  • fast/mediastream/RTCPeerConnection-overloaded-operations-params.html:

Updated to expect error messages with "dictionary" with a lowercase D.

6:20 PM Changeset in webkit [209751] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Drop unnecessary null check in removeDetachedChildrenInContainer()
https://bugs.webkit.org/show_bug.cgi?id=165778

Reviewed by Alex Christensen.

Drop unnecessary null check in removeDetachedChildrenInContainer().
Node cannot be null but we do an implicit null check.

No new tests, no Web-exposed behavior change.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::removeDetachedChildrenInContainer):

6:05 PM Changeset in webkit [209750] by Chris Dumez
  • 3 edits
    2 adds in trunk

Add Document.onvisibilitychange event handler attribute
https://bugs.webkit.org/show_bug.cgi?id=165784

Reviewed by Daniel Bates.

Source/WebCore:

Add Document.onvisibilitychange event handler attribute as per Page
Visibility Level 2 API:

Test: fast/events/page-visibility-onvisibilitychange.html

  • dom/Document.idl:

LayoutTests:

Add layout test coverage.

  • fast/events/page-visibility-onvisibilitychange-expected.txt: Added.
  • fast/events/page-visibility-onvisibilitychange.html: Added.
5:32 PM Changeset in webkit [209749] by jiewen_tan@apple.com
  • 2 edits
    4 moves
    15 adds in trunk/LayoutTests

[WebCrypto] Migrate some tests from webkitSubtle to subtle
https://bugs.webkit.org/show_bug.cgi?id=165554

Reviewed by Brent Fulgham.

To improve test coverage for subtle.

  • crypto/crypto-key-algorithm-gc-expected.txt: Renamed from LayoutTests/crypto/webkitSubtle/crypto-key-algorithm-gc-expected.txt.
  • crypto/crypto-key-algorithm-gc.html: Renamed from LayoutTests/crypto/webkitSubtle/crypto-key-algorithm-gc.html.
  • crypto/crypto-key-usages-gc-expected.txt: Renamed from LayoutTests/crypto/webkitSubtle/crypto-key-usages-gc-expected.txt.
  • crypto/crypto-key-usages-gc.html: Renamed from LayoutTests/crypto/webkitSubtle/crypto-key-usages-gc.html.
  • crypto/subtle/resources/rsa-indexeddb-non-exportable.js: Added.
  • crypto/subtle/resources/rsa-indexeddb.js: Added.
  • crypto/subtle/rsa-indexeddb-expected.txt: Added.
  • crypto/subtle/rsa-indexeddb-non-exportable-expected.txt: Added.
  • crypto/subtle/rsa-indexeddb-non-exportable-private-expected.txt: Added.
  • crypto/subtle/rsa-indexeddb-non-exportable-private.html: Added.
  • crypto/subtle/rsa-indexeddb-non-exportable.html: Added.
  • crypto/subtle/rsa-indexeddb-private-expected.txt: Added.
  • crypto/subtle/rsa-indexeddb-private.html: Added.
  • crypto/subtle/rsa-indexeddb.html: Added.
  • crypto/subtle/rsa-oaep-plaintext-length-expected.txt: Added.
  • crypto/subtle/rsa-oaep-plaintext-length.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key-with-leading-zeroes-in-exponent.html: Added.
  • platform/ios-simulator-wk1/TestExpectations:
5:05 PM Changeset in webkit [209748] by Nikita Vasilyev
  • 1 edit
    1 add in trunk/Source/WebInspectorUI

[GTK] Web Inspector: Add NavigationItemCodeCoverage.svg icon
https://bugs.webkit.org/show_bug.cgi?id=165698

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Added.

Match in style the existing NavigationItemTypes.svg icon.

4:45 PM Changeset in webkit [209747] by dino@apple.com
  • 12 edits in trunk/Source

[iOS] MediaDocument "Done" button should navigate the page back
https://bugs.webkit.org/show_bug.cgi?id=165779

Reviewed by Sam Weinig.

Source/WebCore:

Detect if the exit from fullscreen was caused by the Done button,
and if so, tell the page to navigate back.

Unfortunately this is not yet testable. It's waiting on the
UI-based device testing in development by the media team.

  • platform/cocoa/WebVideoFullscreenModel.h: Add a finishedWithMedia parameter to

requestFullscreenMode, to indicate if the change in mode is associated with
the closing of the media document.

  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.mm:

(WebVideoFullscreenModelVideoElement::requestFullscreenMode): If we're a media
document, and we say we're finished with the media, tell the document
to navigate back a page.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::requestFullscreenMode):

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):

Source/WebKit2:

  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.h:
  • UIProcess/Cocoa/WebVideoFullscreenManagerProxy.mm:

(WebKit::WebVideoFullscreenModelContext::requestFullscreenMode):
(WebKit::WebVideoFullscreenManagerProxy::requestFullscreenMode):

  • WebProcess/cocoa/WebVideoFullscreenManager.h:
  • WebProcess/cocoa/WebVideoFullscreenManager.messages.in:
  • WebProcess/cocoa/WebVideoFullscreenManager.mm:

(WebKit::WebVideoFullscreenManager::requestFullscreenMode):

4:37 PM Changeset in webkit [209746] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit/mac

Remove unused workaround for Silverlight
https://bugs.webkit.org/show_bug.cgi?id=165773

Patch by Alex Christensen <achristensen@webkit.org> on 2016-12-12
Reviewed by Dean Jackson.

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView _workaroundSilverlightFullscreenBug:]): Deleted.
This code was introduced in January 2010. Microsoft fixed their bug shortly thereafter.
Allowing 6 years for users to update Silverlight is more than enough.
Safari doesn't even use WebKit1 for this any more.
I need this to be removed because this is the only non-WebGL code that needs to link against
the OpenGL framework, and I'm changing how that is done to link only through ANGLE instead.

4:35 PM Changeset in webkit [209745] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Infinite recursion when viewport is set to the size of the content but the content overflows the viewport.
https://bugs.webkit.org/show_bug.cgi?id=165775
rdar://problem/29366628

Reviewed by Simon Fraser.

In certain cases when the viewport is sized to accomodate the content and
the content always overflows the viewport, we might end up in recursive FrameView::layout calls.
This is specific to content with viewport units, because we always invalidate elements with vw/vh units on
viewport size change. However if this viewport size change is in response to content size change (layout),
invalidating elements could trigger synchronous layout, while we are still inside this current layout.
This is very similar to the m_setNeedsLayoutWasDeferred case and they should eventually be merged.
It also means that we might be behind by one layout on elements with vw/vh units (fixed layout only though).

Currently not testable.

  • page/FrameView.cpp:

(WebCore::FrameView::availableContentSizeChanged):

4:28 PM Changeset in webkit [209744] by Keith Rollin
  • 8 edits in trunk/Source/WebCore

Memory warning logging appears to capture resident footprint, missing compress/swap.
https://bugs.webkit.org/show_bug.cgi?id=165533
<rdar://problem/29318410>

Reviewed by Andreas Kling.

Have platformMemoryUsage return both resident and resident + swapped
values. This is now returned as a struct in a std::optional to better
support cases where values cannot or are not returned. Report these
values in logMemoryUsageChange.

Remove most of the ReliefLogger instances and their messages. We no
longer free up fastMalloc memory after each memory-release operation,
so there are no memory regions returned to the OS. Instead, we now
free up fastMalloc memory regions at the end of all memory-releasing
operations in one fell swoop and report a grand total of memory
returned.

No new tests -- no changes to user accessible functionality.

  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):
(WebCore::releaseCriticalMemory):
(WebCore::releaseMemory):

  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/MemoryPressureHandler.cpp:

(WebCore::MemoryPressureHandler::releaseMemory):
(WebCore::MemoryPressureHandler::ReliefLogger::logMemoryUsageChange):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::ReliefLogger::ReliefLogger):
(WebCore::MemoryPressureHandler::ReliefLogger::~ReliefLogger):
(WebCore::MemoryPressureHandler::ReliefLogger::loggingEnabled):

  • platform/cocoa/MemoryPressureHandlerCocoa.mm:

(WebCore::MemoryPressureHandler::platformReleaseMemory):
(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

  • platform/linux/MemoryPressureHandlerLinux.cpp:
  • platform/win/MemoryPressureHandlerWin.cpp:

(WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):

4:23 PM Changeset in webkit [209743] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.15.1

Merge r209485. rdar://problem/29502055

4:23 PM Changeset in webkit [209742] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.15.1

Merge r209479. rdar://problem/29502055

4:21 PM Changeset in webkit [209741] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.14.4

Merge r209485. rdar://problem/29502055

4:21 PM Changeset in webkit [209740] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.14.4

Merge r209479. rdar://problem/29502055

4:19 PM Changeset in webkit [209739] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.14.4/Source

Versioning.

4:12 PM Changeset in webkit [209738] by beidson@apple.com
  • 3 edits
    3 adds in trunk/PerformanceTests

More IndexedDB perf tests.
https://bugs.webkit.org/show_bug.cgi?id=165634

Reviewed by Sam Weinig.

  • IndexedDB/index-multientry.html:
  • IndexedDB/large-number-of-inserts-responsiveness.html: Added.
  • IndexedDB/large-number-of-inserts.html: Added.
  • IndexedDB/objectstore-cursor.html: Added. Runtime cut in 1/4th compared to r209672.
  • resources/runner.js:
4:11 PM Changeset in webkit [209737] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.14.4

New tag.

4:07 PM Changeset in webkit [209736] by timothy_horton@apple.com
  • 5 edits in trunk/Source/WebKit2

Provide SPI to avoid blocking on painting when coming into view
https://bugs.webkit.org/show_bug.cgi?id=165780
<rdar://problem/29009559>

Reviewed by Simon Fraser.

By default, when parenting a WKWebView which was previously in-window,
we block on painting to ensure that we don't flash stale content.
We added SPI to disable this behavior to WKWebViewConfiguration, but
some clients might want the behavior most of the time, but sometimes
instead want to not block the UI process main thread, but instead do
their own work (e.g. removing a snapshot) when painting eventually occurs.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tell WebPageProxy not to block on painting next time we are parented,
and use doAfterNextPresentationUpdate to call the block when the painting
does eventually happen. This SPI must be called before - but in the same
runloop cycle - the WKWebView is brought back in-window to work correctly.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::skipWaitingForPaintAfterNextViewDidMoveToWindow):
If we would block because we're coming in-window, but the bit to skip
blocking the next time we get brought in-window is set, reset the bit,
and avoid blocking.

3:56 PM Changeset in webkit [209735] by Matt Baker
  • 2 edits in trunk/LayoutTests

Unreviewed, follow-up after r209706.

  • inspector/debugger/breakpoint-action-log.html:

Add missing test case description.

3:36 PM Changeset in webkit [209734] by Joseph Pecoraro
  • 2 edits
    3 adds in trunk/LayoutTests

Web Inspector: Add tests for Fetch API Network Data (CORs, Opaque Responses, Filtered Headers)
https://bugs.webkit.org/show_bug.cgi?id=165683

Reviewed by Brian Burg.

  • http/tests/inspector/network/fetch-network-data-expected.txt: Added.
  • http/tests/inspector/network/fetch-network-data.html: Added.
  • http/tests/inspector/network/resources/cors-data.pl: Added.
  • http/tests/inspector/resources/inspector-test.js:
3:27 PM Changeset in webkit [209733] by Chris Dumez
  • 14 edits
    1 delete in trunk/Source

Document.visibilityState should use an IDL string enumeration
https://bugs.webkit.org/show_bug.cgi?id=165774

Reviewed by Daniel Bates.

Source/WebCore:

Document.visibilityState should use an IDL string enumeration:

No new tests, there should be no Web-exposed behavior change.

  • CMakeLists.txt:
  • Modules/vibration/NavigatorVibration.cpp:

(WebCore::NavigatorVibration::vibrate):

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::hidden):
(WebCore::Document::pageVisibilityState): Deleted.
(WebCore::Document::visibilityState): Deleted.

  • dom/Document.h:
  • dom/Document.idl:
  • page/Page.cpp:

(WebCore::Page::visibilityState):

  • page/PageVisibilityState.cpp: Removed.
  • page/PageVisibilityState.h:

(): Deleted.

Source/WebKit/mac:

  • DOM/DOMDocument.mm:

(-[DOMDocument visibilityState]):

  • WebView/WebView.mm:

(kit):

Source/WebKit2:

  • Shared/API/c/WKSharedAPICast.h:

(WebKit::toPageVisibilityState):

3:25 PM Changeset in webkit [209732] by Ryan Haddad
  • 5 edits
    40 adds in branches/safari-602-branch

Merge r209540.

3:21 PM Changeset in webkit [209731] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.15.1/Source

Versioning.

3:12 PM Changeset in webkit [209730] by jer.noble@apple.com
  • 16 edits
    2 deletes in trunk

Remove implementation of legacy Mozilla-based Fullscreen API.
https://bugs.webkit.org/show_bug.cgi?id=165689
Source/WebCore:

Reviewed by Eric Carlson.

Alias the legacy webkitRequestFull_S_creen() function on Element to webkitRequestFull_s_creen().
Remove the custom behavior in Document::requestFullScreenForElement() to handle the legacy path.

  • dom/Document.cpp:

(WebCore::Document::requestFullScreenForElement):

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

(WebCore::Element::webkitRequestFullscreen):
(WebCore::Element::webkitRequestFullScreen): Deleted.

  • dom/Element.h:
  • dom/Element.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):

  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):

Source/WebKit/mac:

<rdar://problem/29603053>

Reviewed by Eric Carlson.

  • DOM/DOMElement.mm:

(-[DOMElement webkitRequestFullScreen:]):

LayoutTests:

Reviewed by Eric Carlson.

  • fullscreen/full-screen-css-expected.txt:
  • fullscreen/full-screen-css.html:
  • fullscreen/full-screen-keyboard-disabled-expected.txt: Removed.
  • fullscreen/full-screen-keyboard-disabled.html: Removed.
  • fullscreen/full-screen-twice-expected.txt:
  • fullscreen/full-screen-twice.html:
  • js/dom/dom-static-property-for-in-iteration-expected.txt:
3:11 PM Changeset in webkit [209729] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.15.1

New tag.

3:11 PM Changeset in webkit [209728] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Rename BytecodeGenerator's ControlFlowContext to ControlFlowScope.
https://bugs.webkit.org/show_bug.cgi?id=165777

Reviewed by Keith Miller.

The existing code sometimes refer to ControlFlowContext (and associated references)
as context, and sometimes as scope. Let's be consistent and always call it a scope.

Also renamed push/popScopedControlFlowContext() to push/popLocalControlFlowScope()
because these are only used when we inc/dec the m_localScopeDepth.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::popLexicalScopeInternal):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::pushFinallyControlFlowScope):
(JSC::BytecodeGenerator::pushIteratorCloseControlFlowScope):
(JSC::BytecodeGenerator::popFinallyControlFlowScope):
(JSC::BytecodeGenerator::popIteratorCloseControlFlowScope):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::emitPopScopes):
(JSC::BytecodeGenerator::pushLocalControlFlowScope):
(JSC::BytecodeGenerator::popLocalControlFlowScope):
(JSC::BytecodeGenerator::emitEnumeration):
(JSC::BytecodeGenerator::pushFinallyContext): Deleted.
(JSC::BytecodeGenerator::pushIteratorCloseContext): Deleted.
(JSC::BytecodeGenerator::popFinallyContext): Deleted.
(JSC::BytecodeGenerator::popIteratorCloseContext): Deleted.
(JSC::BytecodeGenerator::pushScopedControlFlowContext): Deleted.
(JSC::BytecodeGenerator::popScopedControlFlowContext): Deleted.

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:

(JSC::TryNode::emitBytecode):

2:06 PM Changeset in webkit [209727] by fpizlo@apple.com
  • 6 edits
    2 adds in trunk/Source/JavaScriptCore

GC scheduler should avoid consecutive pauses
https://bugs.webkit.org/show_bug.cgi?id=165758

Reviewed by Michael Saboff.

This factors out the scheduler from lambdas in Heap::markToFixpoint to an actual class.
It's called the SpaceTimeScheduler because it is a linear controller that ties the
amount of time you spend on things to the amount of space you are using.

This patch uses this refactoring to fix a bug where the GC would pause even though we
still had time during a mutator timeslice. This is a 15% improvement on
JetStream/splay-latency. Seems neutral on everything else. However, it's not at all
clear if this is the right policy or not since retreating wavefront can sometimes be so
sensitive to scheduling decisions. For this reason, there is a tunable option that lets
you decide how long the GC will sit idle before the start of its timeslice.

So, we can revert this policy change in this patch without reverting the patch.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/Heap.cpp:

(JSC::Heap::markToFixpoint):

  • heap/Heap.h:
  • heap/SpaceTimeScheduler.cpp: Added.

(JSC::SpaceTimeScheduler::Decision::targetMutatorUtilization):
(JSC::SpaceTimeScheduler::Decision::targetCollectorUtilization):
(JSC::SpaceTimeScheduler::Decision::elapsedInPeriod):
(JSC::SpaceTimeScheduler::Decision::phase):
(JSC::SpaceTimeScheduler::Decision::shouldBeResumed):
(JSC::SpaceTimeScheduler::Decision::timeToResume):
(JSC::SpaceTimeScheduler::Decision::timeToStop):
(JSC::SpaceTimeScheduler::SpaceTimeScheduler):
(JSC::SpaceTimeScheduler::snapPhase):
(JSC::SpaceTimeScheduler::currentDecision):

  • heap/SpaceTimeScheduler.h: Added.

(JSC::SpaceTimeScheduler::Decision::Decision):
(JSC::SpaceTimeScheduler::Decision::operator bool):

  • runtime/Options.h:
1:49 PM Changeset in webkit [209726] by hyatt@apple.com
  • 5 edits in trunk/Source/WebCore

[CSS Parser] MediaQueryParser should use Ref and not RefPtr
https://bugs.webkit.org/show_bug.cgi?id=165771

Reviewed by Simon Fraser.

  • css/MediaList.cpp:

(WebCore::MediaQuerySet::create):

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeImportRule):
(WebCore::CSSParserImpl::consumeMediaRule):

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::parseMediaQuerySet):
(WebCore::MediaQueryParser::parseMediaCondition):
(WebCore::MediaQueryParser::parseInternal):

  • css/parser/MediaQueryParser.h:
1:46 PM Changeset in webkit [209725] by msaboff@apple.com
  • 105 edits
    14 adds in trunk

REGRESSION(r209653): speedometer crashes making virtual slow path tailcalls
https://bugs.webkit.org/show_bug.cgi?id=165748

Reviewed by Filip Pizlo.

JSTests:

New regression test.

  • stress/regress-165748.js: Added.

(sum1):
(sum2):
(sum3):
(sum4):
(sum5):
(sum6):
(tailCaller):
(test):

Source/JavaScriptCore:

The virtual slow path for tailcalls always passes arguments on the stack.
The fix here is to link to the stack argument entrypoint instead of a register
argument entrypoint.

While fixing this bug, I found that we weren't clearing the code origin when
shuffling the call frame for a register argument tailcall.

Also rolling back in r209653, r209654, r209663, and r209673.

  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::prepareAny):

  • jit/ThunkGenerators.cpp:

(JSC::virtualThunkFor):

Source/WTF:

Rolling back in r209653, r209654, r209663, and r209673.

  • wtf/Platform.h:
1:26 PM Changeset in webkit [209724] by mark.lam@apple.com
  • 2 edits in trunk/JSTests

Debug JSC test timeout: stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js.ftl-no-cjit.
https://bugs.webkit.org/show_bug.cgi?id=164630

Reviewed by Keith Miller.

Speculative fix for timeout issue. It looks like this test just runs a bit
slower on debug builds. So, we'll give it a little more time to run.

  • stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
1:03 PM Changeset in webkit [209723] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Rename BytecodeGenerator's m_symbolTableStack to m_lexicalScopeStack.
https://bugs.webkit.org/show_bug.cgi?id=165768

Reviewed by Saam Barati.

The lexical scope in "m_lexicalScopeStack" here refers to a pair of { } in the
source code that bounds the scope of variables.

There are 4 places in the code where we call m_symbolTableStack.append() to
append a new stack entry. In only 3 of the 4 cases, a symbol table is provided
in the new stack entry. In all 4 cases, a scope register is provided in the new
stack entry.

Also, 3 of the 4 functions that appends an entry to this stack are named:

  1. initializeVarLexicalEnvironment()
  2. pushLexicalScopeInternal()
  3. emitPushWithScope()

The 4th function is the BytecodeGenerator constructor where it pushes the scope
for a module environment.

Based on these details, m_lexicalScopeStack is a better name for this stack than
m_symbolTableStack.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
(JSC::BytecodeGenerator::initializeBlockScopedFunctions):
(JSC::BytecodeGenerator::hoistSloppyModeFunctionIfNecessary):
(JSC::BytecodeGenerator::popLexicalScopeInternal):
(JSC::BytecodeGenerator::prepareLexicalScopeForNextForLoopIteration):
(JSC::BytecodeGenerator::variable):
(JSC::BytecodeGenerator::resolveType):
(JSC::BytecodeGenerator::emitResolveScope):
(JSC::BytecodeGenerator::emitPushWithScope):
(JSC::BytecodeGenerator::emitPopWithScope):
(JSC::BytecodeGenerator::pushFinallyContext):
(JSC::BytecodeGenerator::pushIteratorCloseContext):
(JSC::BytecodeGenerator::emitComplexPopScopes):
(JSC::BytecodeGenerator::popTryAndEmitCatch):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):

  • bytecompiler/BytecodeGenerator.h:
12:55 PM Changeset in webkit [209722] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed. Try to fix the cloop build.

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::Frame::calleeSaveRegisters):

  • interpreter/StackVisitor.h:
12:49 PM Changeset in webkit [209721] by Manuel Rego Casasnovas
  • 7 edits in trunk/LayoutTests

[css-grid] Add some test cases that were removed in r209562
https://bugs.webkit.org/show_bug.cgi?id=165750

Reviewed by Sergio Villar Senin.

Some valid test cases were removed in r209562, this patch adds them back.

  • fast/css-grid-layout/grid-template-shorthand-get-set.html: The specified style is now preserved,

so we've to use a different value for it (as it doesn't merge the line names).

  • fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Flexible sizes must be non-negative,

but 0fr should be accepted (this is new as it was not working like that with the old parser).
A space between the dimension and the unit is wrong for flexible sizes.

  • fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Ditto.
12:35 PM Changeset in webkit [209720] by Ryan Haddad
  • 5 edits in branches/safari-602-branch/Tools

Merge r209216. rdar://problem/29560678

12:17 PM Changeset in webkit [209719] by Alan Bujtas
  • 3 edits
    2 adds in trunk

The CSS 'columns' property when set on the <body> element makes short columns
https://bugs.webkit.org/show_bug.cgi?id=164891

Reviewed by Darin Adler and David Hyatt.

Source/WebCore:

Currently when the body has auto height, we use the height of the viewport as
the available height for the columns defined on the body element.
This is the desired behaviour for paginated content.
However in case of a simple, non-paginated multicolumn context, we should let the columns grow beyond
the viewport vertically. This is also what other browsers do.
This patch sets the available height on columns (in non-paginated context) only if the logical height
is defined (we are right before layout, so applying non-defined values does not make much sense anyway).
The reason why it is only broken on the <body> is because it stretches to the viewport by
default (see stretchesToViewport()) while other block renderers do not.

Test: fast/multicol/columns-on-body.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):

LayoutTests:

  • fast/multicol/columns-on-body-expected.html: Added.
  • fast/multicol/columns-on-body.html: Added.
11:55 AM Changeset in webkit [209718] by hyatt@apple.com
  • 36 edits
    23 adds in trunk

[CSS Parser] Implement deferred parsing of properties, @media, @supports and @keyframes
https://bugs.webkit.org/show_bug.cgi?id=165743

Reviewed by Darin Adler.

Source/WebCore:

Added new tests in fast/css/deferred-parsing.

This patch implements deferred parsing in CSS. By default, when parsing
author stylesheets, the parser goes into a deferred mode where it leaves
the declaration block of all style rules unparsed initially. Instead of
creating and setting an ImmutableStyleProperties object on the StyleRule,
the parser creates a DeferredStyleProperties object instead that is
capable of calling into CSSDeferredParser to parse the properties and values
only when the properties are finally asked for.

In addition, this patch defers the parsing of the interior of @media,
@supports, and @keyframes rules. @media blocks that are never matched will
never parse any of the rules inside. @supports conditions for unsupported
features will also not be parsed. For @keyframes, if the animation is never
referenced/used, then the @keyframes child rules will never be parsed.

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

Add CSSDeferredParser to the build.

  • css/CSSFontFaceSet.cpp:

(WebCore::CSSFontFaceSet::matchingFaces):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parseDeferredRulesIfNeeded):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):

  • css/CSSKeyframesRule.h:

Keyframes now hold both a keyframes Vector and a DeferredStyleGroupRuleList
object. The keyframes vector won't be populated until it is needed, and the
population is done by DeferredStyleGroupRuleList, which holds both the original
CSSParserTokenRange of the keyframes rule interior, and a references to the
CSSDeferredParser that will do the parsing.

  • css/DOMCSSNamespace.cpp:

(WebCore::DOMCSSNamespace::supports):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::collectMatchingRulesForList):
ElementRuleCollector tests to see if a rule is empty by counting properties(),
but we don't want to initiate deferred parsing just to check this. Instead we
invoke propertiesWithoutDeferredParsing, which will hand back a nullptr if
the properties haven't been parsed yet. In order to ensure this optimization
continues to work, any rules whose interiors consist of only whitespace do
not get deferred.

  • css/FontFace.cpp:

(WebCore::FontFace::setVariant):

  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::setProperty):
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

  • css/StyleProperties.cpp:

(WebCore::MutableStyleProperties::MutableStyleProperties):
(WebCore::MutableStyleProperties::setProperty):
(WebCore::DeferredStyleProperties::create):
(WebCore::DeferredStyleProperties::DeferredStyleProperties):
(WebCore::DeferredStyleProperties::~DeferredStyleProperties):
(WebCore::DeferredStyleProperties::parseDeferredProperties):

  • css/StyleProperties.h:

(WebCore::StylePropertiesBase::type):
(WebCore::StylePropertiesBase::cssParserMode):
(WebCore::StylePropertiesBase::StylePropertiesBase):
(WebCore::StyleProperties::isMutable):
(WebCore::StyleProperties::StyleProperties):
(WebCore::StylePropertiesBase::deref):
(isType):
(WebCore::StyleProperties::cssParserMode): Deleted.
(WebCore::StyleProperties::deref): Deleted.
Right now StyleProperties has two subclasses, ImmutableStyleProperties (which
is created by the parser when not deferring), and MutableStyleProperties (used
when making changes and doing DOM Manipulations).

This patch adds a new base class called StylePropertiesBase, and StyleProperties
now derives from it. DeferredStyleProperties derives from this base. The members
of StyleProperties have been moved up into StylePropertiesBase.

The m_isMutable bit, used to determine the type for downcasting has been enhanced
to m_type (2 bits), since there are now three possible subclasses.

  • css/StyleRule.cpp:

(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::properties):
(WebCore::StyleRule::mutableProperties):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
Patched to ensure that when properties() are accessed, that if the current
stored StylePropertyBase in the rule is a DeferredStyleProperties, we then
parse and replace DeferredStyleProperties with ImmutableStyleProperties on the
rule. By using a common base class, we avoid increasing memory usage in
StyleRule.

(WebCore::DeferredStyleGroupRuleList::create):
(WebCore::DeferredStyleGroupRuleList::DeferredStyleGroupRuleList):
(WebCore::DeferredStyleGroupRuleList::parseDeferredRules):
(WebCore::DeferredStyleGroupRuleList::parseDeferredKeyframes):
DeferredStyleGroupList is used to handle deferred parsing of objects with
child rules. These include @media, @supports and @keyframes.

(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleGroup::childRules):
(WebCore::StyleRuleGroup::wrapperInsertRule):
(WebCore::StyleRuleGroup::wrapperRemoveRule):
(WebCore::StyleRuleGroup::parseDeferredRulesIfNeeded):
(WebCore::StyleRuleMedia::StyleRuleMedia):
(WebCore::StyleRuleSupports::StyleRuleSupports):
StyleRuleGroup now holds both a child rules Vector and a
DeferredStyleGroupRuleList. If DeferredStyleGroupRuleList is set, then
when the childRules are finally accessed, we will populate the childRules
Vector and then null out the DeferredStyleGroupRuleList.

  • css/StyleRule.h:

(WebCore::StyleRule::propertiesWithoutDeferredParsing):
(WebCore::StyleRuleGroup::childRulesWithoutDeferredParsing):
(WebCore::StyleRuleGroup::childRules): Deleted.
Add new accesors for fetching properties and child rules without causing
deferred parsing to happen.

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
Patched to turn on deferred parsing for author sheets and for all
non-UA stylesheets parsed from a string (e.g., <style>).

(WebCore::traverseSubresourcesInRules):
The broken resource check was aggressively accessing properties(). Patch
it to call propertiesWithoutDeferredParsing() instead so that it doesn't
defeat the new optimization.

  • css/WebKitCSSMatrix.cpp:

(WebCore::WebKitCSSMatrix::setMatrixValue):
Patched to drop the StyleSheetContents* argument from parseValue, since it
is no longer needed.

  • css/parser/CSSDeferredParser.cpp: Added.

(WebCore::CSSDeferredParser::CSSDeferredParser):
(WebCore::CSSDeferredParser::parseDeclaration):
(WebCore::CSSDeferredParser::parseRuleList):
(WebCore::CSSDeferredParser::parseKeyframeList):

  • css/parser/CSSDeferredParser.h: Added.

(WebCore::CSSDeferredParser::create):
(WebCore::CSSDeferredParser::tokenizer):
(WebCore::CSSDeferredParser::mode):
(WebCore::CSSDeferredParser::context):
(WebCore::CSSDeferredParser::styleSheet):
The CSSDeferredParser. It caches the original CSSTokenizer used to parse
the sheet, which in turn retains all the tokens and escaped strings. Because
the CSSDeferredParser is referenced by all the rules that have yet to parse,
it will stay alive until all rules in the stylesheet has been fully parsed.

The parser receives CSSParserTokenRanges from DeferredStyleProperties or
DeferredStyleGroupRuleList and feeds them to CSSParserImpl, which then
is able to do the parsing as it would have occurred originally had the
range not been deferred.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseSingleValue):
(WebCore::CSSParser::parseValue):

  • css/parser/CSSParser.h:
  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::parseKeywordValue):
(WebCore::CSSParserFastPaths::maybeParseValue):

  • css/parser/CSSParserFastPaths.h:

Drop the StyleSheetContents* argument from the methods that no longer need
them.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::CSSParserImpl):
(WebCore::CSSParserImpl::tokenizer):
(WebCore::CSSParserImpl::parseValue):
(WebCore::CSSParserImpl::parseCustomPropertyValue):
(WebCore::CSSParserImpl::parseDeclarationList):
(WebCore::CSSParserImpl::parseInlineStyleDeclaration):
(WebCore::CSSParserImpl::parseRule):
(WebCore::CSSParserImpl::parseStyleSheet):
(WebCore::CSSParserImpl::parseDeclarationListForInspector):
(WebCore::CSSParserImpl::parseStyleSheetForInspector):
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::CSSParserImpl::consumeMediaRule):
(WebCore::CSSParserImpl::consumeSupportsRule):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumeStyleRule):
Drop the StyleSheetContents* argument from the methods that no longer need
them.

(WebCore::CSSParserImpl::createDeferredStyleProperties):
(WebCore::CSSParserImpl::parseDeferredDeclaration):
(WebCore::CSSParserImpl::parseDeferredRuleList):
(WebCore::CSSParserImpl::parseDeferredKeyframeList):
The methods that handle deferred parsing. They make sure to initialize
new CSSParserImpls with the original deferred parser, and then call existing
methods to do the parsing.

  • css/parser/CSSParserImpl.h:

Patched to remove StyleSheetContents* arguments from some methods and
to add the new deferred parsing methods.

  • css/parser/CSSParserTokenRange.cpp:

(WebCore::CSSParserTokenRange::consumeBlockCheckingForEditability):

  • css/parser/CSSParserTokenRange.h:

In order to preserve the editability optimization from r180867, when
a style rule's block is consumed, we use a special method that looks
for -webkit-user-modify tokens. If one is seen, then the editability
optimization is turned off. Because we do this at the token level,
the optimization keeps working even if properties don't get parsed.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::parseShorthand):
Patched to remove StyleSheetContents* arguments now that the editability
check is in CSSTokenizer instead.

  • css/parser/CSSTokenizer.cpp:

(WebCore::CSSTokenizer::tokenRange):

  • css/parser/CSSTokenizer.h:

Make tokenRange() const.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::setFont):
Patched to drop the StyleSheetContents* argument.

  • testing/Internals.cpp:

(WebCore::deferredStyleRulesCountForList):
(WebCore::Internals::deferredStyleRulesCount):
(WebCore::deferredGroupRulesCountForList):
(WebCore::Internals::deferredGroupRulesCount):
(WebCore::deferredKeyframesRulesCountForList):
(WebCore::Internals::deferredKeyframesRulesCount):

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

Add new testing methods that can count the deferred style rules and
group child rule lists. These methods are used by the new layout tests.

LayoutTests:

  • fast/css/deferred-parsing: Added.
  • fast/css/deferred-parsing/dynamic-external-style-expected.txt: Added.
  • fast/css/deferred-parsing/dynamic-external-style.html: Added.
  • fast/css/deferred-parsing/dynamic-style-in-document-expected.txt: Added.
  • fast/css/deferred-parsing/dynamic-style-in-document.html: Added.
  • fast/css/deferred-parsing/hover-test-expected.txt: Added.
  • fast/css/deferred-parsing/hover-test.html: Added.
  • fast/css/deferred-parsing/keyframes-rule-expected.txt: Added.
  • fast/css/deferred-parsing/keyframes-rule.html: Added.
  • fast/css/deferred-parsing/media-print-expected.txt: Added.
  • fast/css/deferred-parsing/media-print.html: Added.
  • fast/css/deferred-parsing/nth-of-type-expected.txt: Added.
  • fast/css/deferred-parsing/nth-of-type.html: Added.
  • fast/css/deferred-parsing/resources: Added.
  • fast/css/deferred-parsing/resources/basic-sheet.css: Added.
  • fast/css/deferred-parsing/simple-external-style-expected.txt: Added.
  • fast/css/deferred-parsing/simple-external-style.html: Added.
  • fast/css/deferred-parsing/simple-style-in-document-expected.txt: Added.
  • fast/css/deferred-parsing/simple-style-in-document.html: Added.
  • fast/css/deferred-parsing/supports-rule-expected.txt: Added.
  • fast/css/deferred-parsing/supports-rule.html: Added.
11:49 AM Changeset in webkit [209717] by Antti Koivisto
  • 4 edits in trunk/Tools

Enable network cache speculative revalidation in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=165616

Reviewed by Darin Adler.

Match Safari. Also add a menu item to disable it.

  • MiniBrowser/mac/AppDelegate.m:

(defaultConfiguration):

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController networkCacheSpeculativeRevalidationDisabled]):
(-[SettingsController toggleNetworkCacheSpeculativeRevalidationDisabled:]):

11:04 AM WebInspectorCodingStyleGuide edited by Joseph Pecoraro
Removed section about bugs that have been fixed. (diff)
11:02 AM WebInspectorCodingStyleGuide edited by Joseph Pecoraro
Added style notes for trivial getters. (diff)
10:59 AM Changeset in webkit [209716] by commit-queue@webkit.org
  • 3 edits
    3 deletes in trunk/PerformanceTests

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

IndexedDB/objectstore-cursor.html perf test always times out
(Requested by ap on #webkit).

Reverted changeset:

"More IndexedDB perf tests."
https://bugs.webkit.org/show_bug.cgi?id=165634
http://trac.webkit.org/changeset/209672

10:42 AM Changeset in webkit [209715] by dino@apple.com
  • 5 edits
    3 adds in trunk

Autoplay isn't working in iPhone MediaDocuments
https://bugs.webkit.org/show_bug.cgi?id=165710
<rdar://problems/29606761>

Reviewed by Darin Adler.
Source/WebCore:

Our silent video autoplay detection disabled autoplay
of videos in MediaDocuments.

Test: media/ios/autoplay-only-in-main-document.html

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::playbackPermitted):
Return true if we're in a top-level media document.

LayoutTests:

  • media/ios/autoplay-only-in-main-document.html: Make sure that

an iframe pointing to media is not autoplayed.

10:18 AM Changeset in webkit [209714] by ap@apple.com
  • 2 edits in trunk/Tools

ChangeLogs become readonly after resolving a conflict
https://bugs.webkit.org/show_bug.cgi?id=165440
rdar://problem/29491002

Reviewed by Darin Adler.

  • Scripts/resolve-ChangeLogs: (resolveChangeLog): Set correct permissions when

moving the file.

10:17 AM Changeset in webkit [209713] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=165691

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
9:38 AM Changeset in webkit [209712] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline js/dom/global-constructors-attributes.html for mac-wk1 after r209666.

Unreviewed test gardening.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
9:24 AM Changeset in webkit [209711] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Cleanup HierarchicalPathComponent
https://bugs.webkit.org/show_bug.cgi?id=165745

Reviewed by Brian Burg.

Prefer toggle for style class names, remove single use CSS class name
constants, and back all properties by the model not the DOM.

  • UserInterface/Views/HierarchicalPathComponent.js:

(WebInspector.HierarchicalPathComponent):
(WebInspector.HierarchicalPathComponent.prototype.get element):
(WebInspector.HierarchicalPathComponent.prototype.get representedObject):
(WebInspector.HierarchicalPathComponent.prototype.get minimumWidth):
(WebInspector.HierarchicalPathComponent.prototype.get forcedWidth):
(WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
(WebInspector.HierarchicalPathComponent.prototype.get hidden):
(WebInspector.HierarchicalPathComponent.prototype.set hidden):
(WebInspector.HierarchicalPathComponent.prototype.get collapsed):
(WebInspector.HierarchicalPathComponent.prototype.set collapsed):
(WebInspector.HierarchicalPathComponent.prototype.get selectorArrows):
(WebInspector.HierarchicalPathComponent.prototype.set selectorArrows):
(WebInspector.HierarchicalPathComponent.prototype.get previousSibling):
(WebInspector.HierarchicalPathComponent.prototype.set previousSibling):
(WebInspector.HierarchicalPathComponent.prototype.get nextSibling):
(WebInspector.HierarchicalPathComponent.prototype.set nextSibling):
(WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
(WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):

9:21 AM Changeset in webkit [209710] by fpizlo@apple.com
  • 2 edits in trunk/Tools

Re-enable collectContinuously since it doesn't crash anymore

Rubber stamped by Michael Saboff.

  • Scripts/run-jsc-stress-tests:
9:20 AM Changeset in webkit [209709] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Allow keyboard navigation in Heap Snapshot data grids
https://bugs.webkit.org/show_bug.cgi?id=165752

Reviewed by Brian Burg.

  • UserInterface/Views/DOMTreeOutline.css:

(.tree-outline.dom:focus li.selected > span::after):
Use new color variable.

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable): Deleted.
Should be selectable.

  • UserInterface/Views/HeapSnapshotInstancesContentView.css:

(.heap-snapshot > .data-grid:focus tr.selected > td .sub-retained):
(.heap-snapshot > .data-grid:focus tr.selected .object-id,):
(.heap-snapshot > .data-grid:focus tr.selected .formatted-string,):
(.heap-snapshot > .data-grid:focus tr.selected td .location):
Selected row text should just be white, except for values that are usually
gray (object ID, object size, and sub-retained size values). These should
be styled like the "= $0" marker in the DOM tree outline.

(.heap-snapshot > .data-grid:matches(:focus, .force-focus) tr.selected td .location): Deleted.
Removed forced-focus reference. Only used by TreeOutlineDataGridSynchronizer.

  • UserInterface/Views/Variables.css:

(:root):
Added --selected-secondary-text-color.

9:10 AM Changeset in webkit [209708] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

FTL: Dumping disassembly requires that code origin is set when making polymorphic tail calls.
https://bugs.webkit.org/show_bug.cgi?id=165747

Reviewed by Filip Pizlo.

Setting the code origin needs to be done for both the fast and slow path as we might need
it when linking a polymorphic or virtual call stub.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):

8:17 AM Changeset in webkit [209707] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening.

Update test expectations on Windows for failing tests. These failures are tracked in
https://bugs.webkit.org/show_bug.cgi?id=160447.

  • platform/win/TestExpectations:
3:11 AM Changeset in webkit [209706] by Matt Baker
  • 8 edits
    5 adds in trunk

Web Inspector: Breakpoint Log action should support template literals
https://bugs.webkit.org/show_bug.cgi?id=165116
<rdar://problem/29464765>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New string "${expr} = expression" for breakpoint popover.

  • UserInterface/Controllers/BreakpointLogMessageLexer.js: Added.

To support template literal placeholders in message text, it is necessary
to distinguish plain text parts of the message from placeholders, since
plain text must be escaped.

(WebInspector.BreakpointLogMessageLexer):
(WebInspector.BreakpointLogMessageLexer.prototype.tokenize):
(WebInspector.BreakpointLogMessageLexer.prototype.reset):
(WebInspector.BreakpointLogMessageLexer.prototype._finishPlainText):
(WebInspector.BreakpointLogMessageLexer.prototype._finishExpression):
(WebInspector.BreakpointLogMessageLexer.prototype._appendToken):
(WebInspector.BreakpointLogMessageLexer.prototype._consume):
(WebInspector.BreakpointLogMessageLexer.prototype._peek):
(WebInspector.BreakpointLogMessageLexer.prototype._expression):
(WebInspector.BreakpointLogMessageLexer.prototype._plainText):
(WebInspector.BreakpointLogMessageLexer.prototype._possiblePlaceholder):
(WebInspector.BreakpointLogMessageLexer.prototype._regExpOrStringLiteral):

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._debuggerBreakpointOptions):
Build breakpoint "options" object for DebuggerAgent. If a Log action
contains template literal placeholders it is changed to an Evaluate
action, which calls console.log with a template literal.

(WebInspector.DebuggerManager.prototype._setBreakpoint):
Use converted breakpoint options.

  • UserInterface/Main.html:
  • UserInterface/Test.html:

New file.

  • UserInterface/Views/BreakpointActionView.css:

(.breakpoint-action-block-body > .description):
Styles for breakpoint Log action hint text.

  • UserInterface/Views/BreakpointActionView.js:

(WebInspector.BreakpointActionView.prototype._updateBody):
Add Log action hint text element.

LayoutTests:

  • inspector/debugger/breakpoint-action-log-expected.txt: Added.
  • inspector/debugger/breakpoint-action-log.html: Added.

Check that breakpoint log actions support template literal placeholders.

  • inspector/unit-tests/breakpoint-log-message-lexer-expected.txt: Added.
  • inspector/unit-tests/breakpoint-log-message-lexer.html: Added.

Check that the lexer correctly scans breakpoint log action text.

1:10 AM Changeset in webkit [209705] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fixing build breakage in GStreamer's WebKitCommonEncryptionDecryptorGStreamer.

  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:

(webkitMediaCommonEncryptionDecryptTransformInPlace):
WTF::Seconds should be used instead of std::chrono::seconds.

12:32 AM Changeset in webkit [209704] by Konstantin Tokarev
  • 3 edits in trunk/Source/WTF

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

Broke Apple builds (Requested by annulen|home on #webkit).

Reverted changeset:

"Unreviewed, use WTF_ATTRIBUTE_PRINTF instead of clang pragma"
http://trac.webkit.org/changeset/209703

Patch by Commit Queue <commit-queue@webkit.org> on 2016-12-12

12:14 AM Changeset in webkit [209703] by Konstantin Tokarev
  • 3 edits in trunk/Source/WTF

Unreviewed, use WTF_ATTRIBUTE_PRINTF instead of clang pragma

  • wtf/PrintStream.cpp:

(WTF::PrintStream::printfVariableFormat):

  • wtf/PrintStream.h:

Dec 11, 2016:

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

Unreviewed. Try to fix the linux build.

  • runtime/StackFrame.h:
11:20 PM Changeset in webkit [209701] by Konstantin Tokarev
  • 2 edits in trunk/Source/WTF

Unreviewed, guarded clang pragma with COMPILER(CLANG) to fix -Werror

  • wtf/PrintStream.cpp:

(WTF::PrintStream::printfVariableFormat):

11:13 PM Changeset in webkit [209700] by Konstantin Tokarev
  • 4 edits in trunk

Unreviewed attempt to fix EFL and Mac/cmake builds after r209665.
https://bugs.webkit.org/show_bug.cgi?id=165686

Source/WebKit2:

  • PlatformEfl.cmake: WebKit2 should precede other target so that right

config.h comes first in include path.

Tools:

  • DumpRenderTree/CMakeLists.txt: WebKit2 should precede other target

so that right config.h comes first in include path.

10:39 PM Changeset in webkit [209699] by hyatt@apple.com
  • 2 edits in trunk/Tools

[CSS Parser] Make sure content extensions initialize AtomicString
https://bugs.webkit.org/show_bug.cgi?id=165737

Reviewed by Darin Adler.

  • TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:

(TestWebKitAPI::makeBackend):

8:59 PM Changeset in webkit [209698] by Matt Baker
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: ThreadTreeElement should have a "Resume" status button when paused
https://bugs.webkit.org/show_bug.cgi?id=165581

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/Resume.svg:

Fill/stroke should be unspecified so that both can be styled in CSS.

  • UserInterface/Views/DebuggerDashboardView.css:

(.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated):

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume):
(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated):
Recreate original style which relied on 'fill="none"' being specified in the SVG.

  • UserInterface/Views/ThreadTreeElement.css:

(.tree-outline > .item.thread .icon):
(.tree-outline > .item.thread .status-button.resume):
(.tree-outline > .item.thread .status-button.resume:active):
(.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume):
(.tree-outline > .item.thread.selected .status-button.resume,):
(.details-section.call-stack .thread .icon): Deleted.
Status button styles. Colors match those of the goto-arrow button.

  • UserInterface/Views/ThreadTreeElement.js:

(WebInspector.ThreadTreeElement.prototype.refresh):
Update status icon.
(WebInspector.ThreadTreeElement.prototype.oncontextmenu):
(WebInspector.ThreadTreeElement.prototype._updateStatus):
Add/remove status button based on paused state.
Stop propagation of "mousedown" events on the status button, to
prevent button press from selecting the tree element.
(WebInspector.ThreadTreeElement):

8:58 PM Changeset in webkit [209697] by Simon Fraser
  • 4 edits
    2 adds in trunk

REGRESSION (r200283): Transform, overflow hidden and filter combination completely hides the element
https://bugs.webkit.org/show_bug.cgi?id=161509

Reviewed by David Hyatt.
Source/WebCore:

When the filter painting code needs to recompute a paintDirtyRect, it was using selfClipRect()
which is obviously wrong because it returns a rect in absolute coordinates. Use code factored
out of localClipRect() instead, which returns a rect relative to the painting root.

Test: css3/filters/filter-on-overflow-hidden.html

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintLayerContents):

LayoutTests:

  • css3/filters/filter-on-overflow-hidden-expected.html: Added.
  • css3/filters/filter-on-overflow-hidden.html: Added.
7:11 PM Changeset in webkit [209696] by sbarati@apple.com
  • 39 edits
    2 adds in trunk

We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
https://bugs.webkit.org/show_bug.cgi?id=165429

Reviewed by Keith Miller.

JSTests:

  • wasm/function-tests/trap-load.js: Added.

(assert):
(wasmFrameCountFromError):
(i.catch):
(assert.continuation):

  • wasm/function-tests/trap-store.js: Added.

(import.Builder.from.string_appeared_here.assert):
(i.catch):
(assert.continuation):
(assert):

  • wasm/js-api/test_memory_constructor.js:

(assert):

Source/JavaScriptCore:

This patch teaches the stack walking runtime about wasm.
To do this, I taught StackVisitor that a callee is not
always an object.

To be able to unwind callee save registers properly, I've given
JSWebAssemblyCallee a list of RegisterAtOffsetList for the callee
saves that B3 saved in the prologue. Also, because we have two
B3Compilations per wasm function, one for wasm entrypoint, and
one for the JS entrypoint, I needed to create a callee for each
because they each might spill callee save registers.

I also fixed a bug inside the Wasm::Memory constructor where we
were trying to mmap the same number of bytes even after the first
mmap failed. We should start by trying to mmap the maximum bytes,
and if that fails, fall back to the specified initial bytes. However,
the code was just mmapping the maximum twice. I've fixed that and
also added a RELEASE_ASSERT_NOT_REACHED() for when the second mmap
fails along with a FIXME to throw an OOM error.

There was a second bug I fixed where JSModuleRecord was calling
visitWeak on its CallLinkInfos inside ::visitChldren(). It needs
to do this after marking. I changed JSModuleRecord to do what
CodeBlock does and call visitWeak on its CallLinkInfos inside
an UnconditionalFinalizer.

  • API/JSContextRef.cpp:

(BacktraceFunctor::operator()):

  • inspector/ScriptCallStackFactory.cpp:

(Inspector::createScriptCallStackFromException):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::vmEntryGlobalObject):

  • interpreter/CallFrame.h:

(JSC::ExecState::callee):

  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
(JSC::UnwindFunctor::copyCalleeSavesToVMEntryFrameCalleeSavesBuffer):

  • interpreter/Interpreter.h:
  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::update):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::StackVisitor):
(JSC::StackVisitor::readFrame):
(JSC::StackVisitor::readNonInlinedFrame):
(JSC::StackVisitor::readInlinedFrame):
(JSC::StackVisitor::Frame::isWasmFrame):
(JSC::StackVisitor::Frame::codeType):
(JSC::StackVisitor::Frame::calleeSaveRegisters):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::toString):
(JSC::StackVisitor::Frame::hasLineAndColumnInfo):
(JSC::StackVisitor::Frame::setToEnd):

  • interpreter/StackVisitor.h:

(JSC::StackVisitor::Frame::callee):
(JSC::StackVisitor::Frame::isNativeFrame):
(JSC::StackVisitor::Frame::isJSFrame): Deleted.

  • jsc.cpp:

(callWasmFunction):
(functionTestWasmModuleFunctions):

  • runtime/Error.cpp:

(JSC::addErrorInfoAndGetBytecodeOffset):

  • runtime/JSCell.cpp:

(JSC::JSCell::isAnyWasmCallee):

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

(JSC::RetrieveArgumentsFunctor::operator()):
(JSC::RetrieveCallerFunctionFunctor::operator()):

  • runtime/StackFrame.cpp:

(JSC::StackFrame::sourceID):
(JSC::StackFrame::sourceURL):
(JSC::StackFrame::functionName):
(JSC::StackFrame::computeLineAndColumn):
(JSC::StackFrame::toString):

  • runtime/StackFrame.h:

(JSC::StackFrame::StackFrame):
(JSC::StackFrame::hasLineAndColumnInfo):
(JSC::StackFrame::hasBytecodeOffset):
(JSC::StackFrame::bytecodeOffset):
(JSC::StackFrame::isNative): Deleted.

  • runtime/VM.h:
  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::setupFrameInPrologue):

  • wasm/WasmFormat.h:
  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::Memory):

  • wasm/WasmMemory.h:

(JSC::Wasm::Memory::isValid):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::run):
(JSC::Wasm::Plan::initializeCallees):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::jsToWasmEntryPointForFunction): Deleted.

  • wasm/js/JSWebAssemblyCallee.cpp:

(JSC::JSWebAssemblyCallee::finishCreation):

  • wasm/js/JSWebAssemblyCallee.h:

(JSC::JSWebAssemblyCallee::create):
(JSC::JSWebAssemblyCallee::entrypoint):
(JSC::JSWebAssemblyCallee::calleeSaveRegisters):
(JSC::JSWebAssemblyCallee::jsToWasmEntryPoint): Deleted.

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::visitChildren):
(JSC::JSWebAssemblyModule::UnconditionalFinalizer::finalizeUnconditionally):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::jsEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::wasmEntrypointCalleeFromFunctionIndexSpace):
(JSC::JSWebAssemblyModule::setJSEntrypointCallee):
(JSC::JSWebAssemblyModule::setWasmEntrypointCallee):
(JSC::JSWebAssemblyModule::allocationSize):
(JSC::JSWebAssemblyModule::calleeFromFunctionIndexSpace): Deleted.

  • wasm/js/JSWebAssemblyRuntimeError.h:
  • wasm/js/WebAssemblyFunction.cpp:

(JSC::WebAssemblyFunction::call):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::link):

Source/WebCore:

  • bindings/js/JSDOMBinding.cpp:

(WebCore::GetCallerGlobalObjectFunctor::operator()):

6:50 PM Changeset in webkit [209695] by Darin Adler
  • 37 edits
    9 deletes in trunk

Remove uses of Dictionary in WebRTC IDL files
https://bugs.webkit.org/show_bug.cgi?id=165736

Reviewed by Sam Weinig.

Source/WebCore:

Also removed quite a bit of unused code. There were some mocks that were out of date and
no longer matched the types used in the real code, that also were no longer hooked up,
and other types of dead code. We will have to implement anew when we want to restore tests
like the ones these were intended to enable.

  • CMakeLists.txt: Updated for all the removed files.
  • Modules/mediastream/MediaEndpointPeerConnection.cpp: Moved some types in here

that don't need to be in the header.
(WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): Use make_unique.
(WebCore::MediaEndpointPeerConnection::setConfiguration): Changed argument type,
obviating the need for most of the code that was here.

  • Modules/mediastream/MediaEndpointPeerConnection.h: Updated for the above. Made more

things private and final. Marked the constructor explicit. Removed unneeded includes.

  • Modules/mediastream/PeerConnectionBackend.h: Removed unneeded includes and forward

declarations. Changed the argument type for setConfiguration (see above).

  • Modules/mediastream/RTCConfiguration.cpp: Removed.

None of the code here was needed except for the ICE server validation, and that was
moved into RTCPeerConnection::setConfiguration.

  • Modules/mediastream/RTCConfiguration.h: Changed this from a class to a struct since

this is now a dictionary rather than an interface.

  • Modules/mediastream/RTCConfiguration.idl: Changed this from an interface to a dictionary.
  • Modules/mediastream/RTCDTMFSender.cpp: Removed some of the code from this file. This

class currently isn't implemented, but was depending on RTCPeerConnectionHandler. I removed
some of the dead code. Someone will have to straighten this out so we can turn it back on.

  • Modules/mediastream/RTCDTMFSender.h: Ditto.
  • Modules/mediastream/RTCDataChannel.cpp: Updated includes.
  • Modules/mediastream/RTCIceCandidate.cpp:

(WebCore::RTCIceCandidate::create): Removed most of the code, since this now takes
a structure rather than a WebCore::Dictionary, and so the bindings take care of the work.

  • Modules/mediastream/RTCIceCandidate.h: Updated for the above.
  • Modules/mediastream/RTCIceCandidate.idl: Changed the constructor to take a

RTCIceCandidateInit instead of a Dictionary.

  • Modules/mediastream/RTCIceServer.h: Changed this from a class to a struct since

this is now a dictionary rather than an interface.

  • Modules/mediastream/RTCIceServer.idl: Changed this from an interface to a dictionary.
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::initializeWith): Take an RTCConfiguration rather than
a Dictionary.
(WebCore::RTCPeerConnection::getConfiguration): Moved to header, now an inline.
(WebCore::RTCPeerConnection::setConfiguration): Use the configuration dictionary now instead
of the configuration class. Also moved validation of server URLs here, formerly in the
RTCConfiguration RTCConfiguration::initialize function. Also moved code to convert from
RTCConfiguration to MediaEndpointConfiguration here, formerly in
MediaEndpointPeerConnection::setConfiguration.

  • Modules/mediastream/RTCPeerConnection.h: Updated for the above.
  • Modules/mediastream/RTCPeerConnection.idl: Changed argument to initializeWith and

setConfiguration from Dictionary to RTCConfiguration.

  • Modules/mediastream/RTCSessionDescription.cpp:

(WebCore::parseTypeString): Deleted.
(WebCore::RTCSessionDescription::create): Changed to take struct instead of Dictionary.

  • Modules/mediastream/RTCSessionDescription.h: Added Init struct and changed create to

take it.

  • Modules/mediastream/RTCSessionDescription.idl: Changed constructor argument to take

RTCSessionDescriptionInit dictionary instead of Dictionary.

  • Modules/webaudio/MediaStreamAudioDestinationNode.cpp: Updated includes.
  • WebCore.xcodeproj/project.pbxproj: Updated for all the removed files.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent): Fixed convertDictionaryToJS to work with other
nullable types besides RefPtr.

  • bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.
  • platform/mediastream/RTCConfigurationPrivate.h: Removed.
  • platform/mediastream/RTCIceServerPrivate.h: Removed.
  • platform/mediastream/RTCPeerConnectionHandler.cpp: Removed.
  • platform/mediastream/RTCPeerConnectionHandler.h: Removed.
  • platform/mock/RTCDTMFSenderHandlerMock.cpp: Removed.
  • platform/mock/RTCDTMFSenderHandlerMock.h: Removed.
  • platform/mock/RTCDataChannelHandlerMock.h: Updated includes, made more things private and final.
  • platform/mock/RTCPeerConnectionHandlerMock.cpp: Removed.
  • platform/mock/RTCPeerConnectionHandlerMock.h: Removed.
  • testing/Internals.cpp:

(WebCore::Internals::Internals): Removed call to enableMockRTCPeerConnectionHandler.
(WebCore::Internals::enableMockRTCPeerConnectionHandler): Deleted.

LayoutTests:

  • fast/mediastream/RTCIceCandidate-expected.txt: Regenerated; no new failures.
  • fast/mediastream/RTCIceCandidate.html: Updated test to expect the WebIDL rules for parsing

unsigned short for sdpMLineIndex. The old code expected additional range checking which is
not expected behavior.

  • fast/mediastream/RTCPeerConnection-expected.txt: Regenerated; no new failures.
  • fast/mediastream/RTCPeerConnection.html: Updated test to not expect an exception when

iceServers is entirely omitted or when it is an empty array. This is a progression and is
closer to the specification.

  • fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt: Regenerated; no new failures.
  • fast/mediastream/RTCPeerConnection-getConfiguration.html: Updated test to expect the username

and credential fields to round trip as missing rather than turning from missing into empty strings.
Also updated the tests to pass in sequences of strings for "urls" since they expect sequences on
the way back out. We could also test round tripping of single strings, which should go in and come
back out as individual strings, but for now I did not bother adding that to this test.

  • fast/mediastream/RTCSessionDescription-expected.txt: Regenerated; some exception messages are

now more specific than they were before.

  • imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt:

Updated expected results. The new code correctly allows callers of the RTCPeerConnection constructor
to omit iceServers, pass undefined, or pass an empty array, as specified. Thuis change leads to
a couple tests that now correctly pass instead of failing. And it also leads to some other tests
failing that were passing before. These were passing because they expected an exception for some
other reason, however the exception was actually occurring because of incorrect handling of iceServers.

5:41 PM Changeset in webkit [209694] by fpizlo@apple.com
  • 1 edit in trunk/Source/JavaScriptCore/ChangeLog

Re-enable concurrent GC.

Rubber stampted by Saam Barati.

This change actually landed in r209692 by accident.

  • runtime/Options.h:
5:39 PM Changeset in webkit [209693] by fpizlo@apple.com
  • 2 edits in trunk/Source/WTF

Change to use #pragma once (requested by Darin Adler).

  • wtf/RecursiveLockAdapter.h:
5:34 PM Changeset in webkit [209692] by fpizlo@apple.com
  • 3 edits in trunk/Source

Change to use #pragma once (requested by Darin Adler).

  • wtf/LockedPrintStream.h:
5:19 PM Changeset in webkit [209691] by fpizlo@apple.com
  • 20 edits
    4 adds in trunk/Source

MarkedBlock::marksConveyLivenessDuringMarking should take into account collection scope
https://bugs.webkit.org/show_bug.cgi?id=165741

Reviewed by Saam Barati.

Source/JavaScriptCore:

MarkedBlock::marksConveyLivenessDuringMarking thought that the off-by-one marking
version indicated liveness during any collection when it's just during full collection.
One of its users - MarkedBlock::sweep - knew this and had a special case, but the other
one - MarkedBlock::isLive - didn't. So, I moved the special case into
marksConveyLivenessDuringMarking.

Also, this cleans up some remaining bitvector races.

To find this bug, I significantly strengthened our assertions.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • heap/CellContainer.cpp: Added.

(JSC::CellContainer::isNewlyAllocated):

  • heap/CellContainer.h:
  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::addBlock):
(JSC::MarkedAllocator::removeBlock):
(JSC::MarkedAllocator::dumpBits):

  • heap/MarkedAllocator.h:

(JSC::MarkedAllocator::forEachBitVector):
(JSC::MarkedAllocator::forEachBitVectorWithName):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::tryCreate):
(JSC::MarkedBlock::Handle::~Handle):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweepHelperSelectMarksMode):
(JSC::MarkedBlock::Handle::stopAllocating):
(JSC::MarkedBlock::Handle::resumeAllocating):
(JSC::MarkedBlock::aboutToMarkSlow):
(JSC::MarkedBlock::Handle::didConsumeFreeList):
(JSC::MarkedBlock::Handle::dumpState):

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::markingVersion):
(JSC::MarkedBlock::isMarkedRaw):
(JSC::MarkedBlock::isMarked):

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::marksConveyLivenessDuringMarking):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::appendJSCellOrAuxiliary):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/StructureIDTable.h:

(JSC::StructureIDTable::size):
(JSC::StructureIDTable::get):

Source/WTF:

To find this bug, I needed to seriously beef up our logging infrastructure.

It's now the case that:

dataLog(...);


will print its output atomically. This happens with some careful magic:

  • dataFile() is now a LockedPrintStream that locks around print().


  • The lock is a recursive lock via RecursiveLockAdapter<>, so if the dump methods end up calling back into dataLog() then it just works. This is important: say the dump() calls a getter that itself does logging, maybe because it's encountering badness and wants to report it before crashing).


  • The lock is a WordLock so that ParkingLot and Lock can keep using dataLog() for debugging. We probably won't need to debug WordLock anytime soon - the algorithm is so simple.


  • LockedPrintStream::print(...) causes the print callbacks of its arguments to run on the underlying PrintStream, so that you don't need to do recursive lock acquisition on each individual argument and whatever printing it does recursively.
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/DataLog.cpp:

(WTF::initializeLogFileOnce):
(WTF::initializeLogFile):
(WTF::dataFile):

  • wtf/DataLog.h:
  • wtf/LockedPrintStream.cpp: Added.

(WTF::LockedPrintStream::LockedPrintStream):
(WTF::LockedPrintStream::~LockedPrintStream):
(WTF::LockedPrintStream::vprintf):
(WTF::LockedPrintStream::flush):
(WTF::LockedPrintStream::begin):
(WTF::LockedPrintStream::end):

  • wtf/LockedPrintStream.h: Added.
  • wtf/PrintStream.cpp:

(WTF::PrintStream::printfVariableFormat):
(WTF::PrintStream::begin):
(WTF::PrintStream::end):

  • wtf/PrintStream.h:

(WTF::PrintStream::atomically):
(WTF::PrintStream::print):
(WTF::PrintStream::println):
(WTF::PrintStream::printImpl):
(WTF::>::unpack):
(WTF::FormatImpl::FormatImpl):
(WTF::FormatImpl::dump):
(WTF::format):
(WTF::printInternal):

  • wtf/RecursiveLockAdapter.h: Added.

(WTF::RecursiveLockAdapter::RecursiveLockAdapter):
(WTF::RecursiveLockAdapter::lock):
(WTF::RecursiveLockAdapter::unlock):
(WTF::RecursiveLockAdapter::tryLock):
(WTF::RecursiveLockAdapter::isLocked):

  • wtf/WordLock.cpp:
  • wtf/WordLock.h:
5:10 PM Changeset in webkit [209690] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

Quarter-second stalls scrolling images that are links because of sync getPositionInformation
https://bugs.webkit.org/show_bug.cgi?id=165707

Reviewed by Simon Fraser.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
For now, synchronously block when presenting the action sheet if we
don't have a snapshot ready.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):
Respect includeSnapshot in another place in getPositionInformation,
so that many getPositionInformations don't have to do extra snapshotting work.

4:57 PM Changeset in webkit [209689] by Darin Adler
  • 7 edits in trunk/Source

Use std::vsnprintf instead of vasprintf
https://bugs.webkit.org/show_bug.cgi?id=165740

Reviewed by Sam Weinig.

Source/WebCore:

  • platform/FileHandle.cpp:

(WebCore::FileHandle::printf): Use vsnprintf, including StringExtras.h to
ensure compatibility with older versions of the Visual Studio library,
and Vector for the buffer. Use inline capacity in the vector so we normally
don't need to allocate any memory on the heap.

  • xml/XSLTUnicodeSort.cpp:

(xsltTransformErrorTrampoline): Ditto.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::error): Ditto.

Source/WTF:

  • wtf/Platform.h: Remove HAVE_VASPRINTF.
  • wtf/StringExtras.h: Change the vsnprintf workaround to be used only

in older versions of Visual Studio, since the problem it works around
was resolved in Visual Studio 2015.

4:56 PM Changeset in webkit [209688] by Darin Adler
  • 4 edits in trunk/Source/WebCore

Make some refinements to HTMLPlugInImageElement
https://bugs.webkit.org/show_bug.cgi?id=165742

Reviewed by Sam Weinig.

  • html/HTMLPlugInImageElement.cpp: Removed many unneeded includes.

(WebCore::titleText): Use HashMap::ensure, correct argument types.
(WebCore::subtitleText): Ditto.
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Moved
initialization of most scalars to the class definition.
(WebCore::HTMLPlugInImageElement::isImageType): Use auto.
(WebCore::HTMLPlugInImageElement::wouldLoadAsPlugIn): Removed
unneeded local variable and if statement.
(WebCore::HTMLPlugInImageElement::willDetachRenderers): Use auto.
(WebCore::HTMLPlugInImageElement::updateSnapshot): Do not call
renderer twice unnecessarily.
(WebCore::plugInImageElementIsolatedWorld): Use auto.
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Use auto.
(WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Use auto.
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Got rid of
unnecessary typedef.
(WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Take a
reference rather than PassRefPtr.
(WebCore::documentHadRecentUserGesture): Removed unneeded if.
(WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting): Use auto.
(WebCore::isSmallerThanTinySizingThreshold): Use auto.
(WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin): Use auto.
(WebCore::HTMLPlugInImageElement::checkSnapshotStatus): Use auto.
(WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Got rid
of unnecessary local variable. Use auto.
(WebCore::HTMLPlugInImageElement::requestObject): Got rid of unnecessary
local variable.

  • html/HTMLPlugInImageElement.h: Updated for the above. Removed incorrect

use of const. Initialized all scalars. Made function private and final.

  • rendering/RenderSnapshottedPlugIn.cpp:

(WebCore::RenderSnapshottedPlugIn::handleEvent): Pass reference instead
of pointer.

3:40 PM Changeset in webkit [209687] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

Web Inspector: Cleanup some InspectorInstrumentation network loading notifications
https://bugs.webkit.org/show_bug.cgi?id=165688

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-11
Reviewed by Brian Burg.

Eliminate InspectorInstrumentation::willReceiveResourceResponse by folding
it into InspectorInstrumentation::didReceiveResourceResponse. Simplify other
related InspectorInstrumentation calls by using references and using more
consistent InspectorInstrumentation patterns.

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
(WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Deleted.
(WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Deleted.
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl): Deleted.
(WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl): Deleted.
(WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
(WebCore::InspectorInstrumentation::continueWithPolicyDownload):
(WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
(WebCore::InspectorInstrumentation::willReceiveResourceResponse): Deleted.

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
(WebCore::DocumentLoader::continueAfterContentPolicy):

  • loader/ResourceLoadNotifier.cpp:

(WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didReceiveResponse):

3:37 PM Changeset in webkit [209686] by commit-queue@webkit.org
  • 5 edits
    2 adds in trunk/Source/WebInspectorUI

Web Inspector: Move MainTarget and WorkerTarget to their own files
https://bugs.webkit.org/show_bug.cgi?id=165701

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-11
Reviewed by Brian Burg.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.scriptDidParse):

  • UserInterface/Main.html:
  • UserInterface/Protocol/MainTarget.js: Added.

(WebInspector.MainTarget):
(WebInspector.MainTarget.prototype.get displayName):
(WebInspector.MainTarget.prototype.get mainResource):

  • UserInterface/Protocol/Target.js:

(WebInspector.Target):
(WebInspector.MainTarget): Deleted.
(WebInspector.MainTarget.prototype.get displayName): Deleted.
(WebInspector.MainTarget.prototype.get mainResource): Deleted.
(WebInspector.MainTarget.prototype.initialize): Deleted.
(WebInspector.WorkerTarget): Deleted.
(WebInspector.WorkerTarget.prototype.get displayName): Deleted.
(WebInspector.WorkerTarget.prototype.initialize): Deleted.

  • UserInterface/Protocol/WorkerTarget.js: Added.

(WebInspector.WorkerTarget):
(WebInspector.WorkerTarget.prototype.get displayName):

  • UserInterface/Test.html:
2:08 PM Changeset in webkit [209685] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream] Protect MediaDevicesRequest during callback
https://bugs.webkit.org/show_bug.cgi?id=165711
<rdar://problem/28400468>

Reviewed by Sam Weinig.

No new tests, I was unable to create a reproducible test but this fix avoids
an occasional crash in existing tests.

  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp:

(WebCore::MediaDevicesEnumerationRequest::start): Take a reference to the object
before calling the controller in case the completion handler is called synchronously.

2:00 PM Changeset in webkit [209684] by jiewen_tan@apple.com
  • 1 edit
    8 adds in trunk/LayoutTests

[WebCrypto] Add tests for wrap/unwrap SPKI/PKCS8 keys
https://bugs.webkit.org/show_bug.cgi?id=165557

Reviewed by Darin Adler.

  • crypto/subtle/aes-cbc-import-key-unwrap-pkcs8-key-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-unwrap-pkcs8-key.html: Added.
  • crypto/subtle/aes-cbc-import-key-unwrap-spki-key-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-unwrap-spki-key.html: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-pkcs8-key-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-pkcs8-key.html: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-spki-key-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-spki-key.html: Added.
10:19 AM Changeset in webkit [209683] by fpizlo@apple.com
  • 58 edits
    2 adds in trunk/Source

The DOM should have an advancing wavefront opaque root barrier
https://bugs.webkit.org/show_bug.cgi?id=165712

Reviewed by Yusuke Suzuki.
Source/JavaScriptCore:


This exposes the ability to fire an advancing wavefront barrier on opaque roots. It also
gives clients the ability to maintain their own cache of whether that barrier needs to
be enabled.

The DOM uses this to enable a very cheap barrier on the DOM. This is neutral on
Speedometer and fixes another concurrent GC crash.

  • heap/Heap.cpp:

(JSC::Heap::beginMarking):
(JSC::Heap::endMarking):
(JSC::Heap::writeBarrierOpaqueRootSlow):
(JSC::Heap::addMutatorShouldBeFencedCache):
(JSC::Heap::setMutatorShouldBeFenced):

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::writeBarrierOpaqueRoot):

Source/WebCore:

No new tests because this was covered by crashing tests.

Consider these two cases:

Removal:
1) DOM at start: D->X->Y
2) Mark X, X->visitChildren, addOpaqueRoot(D)
3) remove X
4) Y thinks it's not reachable (its opaque root, X, is not in the set).


Insertion:
1) DOM at start: D, X->Y
2) Mark X, X->visitChildren, addOpaqueRoot(X)
3) insert X into D
4) Y thinks it's not reachable (its opaque root, D, is not in the set).


We can fix this with two barriers:

Removal: add X (the removed child) to the opaque root set.
Insertion: add D (the insertion point) to the opaque root set.


Thanks Rysosuke for coming up with this idea!

Both barriers advance the wavefront. We could consider retreating wavefront barriers in
the future (where we cause visitChildren to be called again on wrappers that belonged to
roots that got affected by insertion/removal) but those would probably require more
bookkeeping.

To make this barrier very fast, the WebCore caches the JSC VM's barrier state in
its own global variable for very fast access. This variable will be false most of the
time. It's false when there is no VM, so triggering the barrier won't cause the VM to be
created. It's only true when GC is running, which is rare by design.

To make that caching more sensible, I finally gave WebCore a central header for
the common VM (CommonVM.h).

  • CMakeLists.txt:
  • Modules/mediastream/SDPProcessor.cpp:

(WebCore::SDPProcessor::callScript):

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CommonVM.cpp: Added.

(WebCore::commonVMSlow):
(WebCore::writeBarrierOpaqueRootSlow):

  • bindings/js/CommonVM.h: Added.

(WebCore::commonVM):
(WebCore::writeBarrierOpaqueRoot):

  • bindings/js/DOMWrapperWorld.cpp:

(WebCore::mainThreadNormalWorld):

  • bindings/js/GCController.cpp:

(WebCore::collect):
(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::garbageCollectNowIfNotDoneRecently):
(WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
(WebCore::GCController::deleteAllCode):
(WebCore::GCController::deleteAllLinkedCode):

  • bindings/js/JSCustomXPathNSResolver.cpp:

(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):

  • bindings/js/JSDOMBinding.cpp:

(WebCore::addImpureProperty):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
(WebCore::JSDOMWindowBase::commonVM): Deleted.

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowShell.cpp:

(WebCore::JSDOMWindowShell::setWindow):

  • bindings/js/JSNodeCustom.h:

(WebCore::root):

  • bindings/js/ScriptCachedFrameData.cpp:

(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
(WebCore::ScriptCachedFrameData::clear):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::~ScriptController):
(WebCore::ScriptController::createWorld):
(WebCore::ScriptController::getAllWorlds):
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::cacheableBindingRootObject):
(WebCore::ScriptController::bindingRootObject):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
(WebCore::ScriptController::clearScriptObjects):

  • dom/CollectionIndexCache.cpp:

(WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):

  • dom/ContainerNode.cpp:
  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyChildNodeInserted):
(WebCore::notifyChildNodeRemoved):

  • dom/Document.cpp:

(WebCore::Document::shouldBypassMainWorldContentSecurityPolicy):

  • dom/Node.h:

(WebCore::Node::opaqueRoot):

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::vm):

  • html/HTMLImageLoader.cpp:

(WebCore::HTMLImageLoader::notifyFinished):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pauseAfterDetachedTask):
(WebCore::HTMLMediaElement::ensureIsolatedWorld):

  • html/HTMLPlugInImageElement.cpp:

(WebCore::plugInImageElementIsolatedWorld):

  • inspector/InspectorController.cpp:

(WebCore::InspectorController::vm):

  • inspector/PageScriptDebugServer.cpp:

(WebCore::PageScriptDebugServer::PageScriptDebugServer):

  • page/PerformanceLogging.cpp:

(WebCore::PerformanceLogging::memoryUsageStatistics):
(WebCore::PerformanceLogging::javaScriptObjectCounts):

  • page/ResourceUsageThread.cpp:

(WebCore::ResourceUsageThread::createThreadIfNeeded):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::reportApproximateMemoryCost):

  • testing/MemoryInfo.h:

(WebCore::MemoryInfo::MemoryInfo):

Source/WebKit/mac:


Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics javaScriptObjectsCount]):
(+[WebCoreStatistics javaScriptGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
(+[WebCoreStatistics javaScriptObjectTypeCounts]):
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):
(+[WebCoreStatistics memoryStatistics]):
(+[WebCoreStatistics javaScriptReferencedObjectsCount]):

  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(identifierFromIdentifierRep):

  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::ProxyInstance::getPropertyNames):

  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::wantsAllStreams):

  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView sendEvent:isDrawRect:]):
(-[WebNetscapePluginView privateBrowsingModeDidChange]):
(-[WebNetscapePluginView setWindowIfNecessary]):
(-[WebNetscapePluginView createPluginScriptableObject]):
(-[WebNetscapePluginView getFormValue:]):
(-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
(-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
(-[WebNetscapePluginView loadPluginRequest:]):
(-[WebNetscapePluginView _printedPluginBitmap]):

  • Plugins/WebPluginController.mm:

(-[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
(-[WebPluginController stopOnePlugin:]):
(-[WebPluginController stopOnePluginForPageCache:]):
(-[WebPluginController destroyOnePlugin:]):
(-[WebPluginController startAllPlugins]):
(-[WebPluginController addPlugin:]):

Source/WebKit/win:


Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.

  • Plugins/PluginView.cpp:

(WebCore::PluginView::start):
(WebCore::PluginView::stop):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::npObject):
(WebCore::PluginView::privateBrowsingStateChanged):

  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowRect):

  • WebCoreStatistics.cpp:

(WebCoreStatistics::javaScriptObjectsCount):
(WebCoreStatistics::javaScriptGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectsCount):
(WebCoreStatistics::javaScriptProtectedGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectTypeCounts):
(WebCoreStatistics::javaScriptObjectTypeCounts):
(WebCoreStatistics::shouldPrintExceptions):
(WebCoreStatistics::setShouldPrintExceptions):
(WebCoreStatistics::memoryStatistics):

  • WebJavaScriptCollector.cpp:

(WebJavaScriptCollector::objectCount):

Source/WebKit2:


Propagate the JSDOMWindowBase::commonVM() -> commonVM() change.

  • Shared/linux/WebMemorySamplerLinux.cpp:

(WebKit::WebMemorySampler::sampleWebKit):

  • Shared/mac/WebMemorySampler.mac.mm:

(WebKit::WebMemorySampler::sampleWebKit):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::javaScriptObjectsCount):

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::callObject):
(WebKit::JSNPObject::callConstructor):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::getOwnPropertyNames):
(WebKit::JSNPObject::propertyGetter):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::runJavaScriptInMainFrame):
(WebKit::WebPage::getBytecodeProfile):
(WebKit::WebPage::getSamplingProfilerOutput):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::getWebCoreStatistics):

10:10 AM Changeset in webkit [209682] by mitz@apple.com
  • 4 edits in trunk

[Cocoa] NSAttributedString representation of text copied from -webkit-nbsp-mode:space element contains non-breaking space characters, but shouldn’t
https://bugs.webkit.org/show_bug.cgi?id=165515
<rdar://problem/4108460>

Reviewed by Darin Adler.

Source/WebCore:

Test: platform/mac/fast/text/attributed-substring-from-range.html

  • editing/cocoa/HTMLConverter.mm:

(HTMLConverter::_processText): Emit a space instead of a non-breaking space if the text node

is styled with -webkit-nbsp-mode:space.

(WebCore::editingAttributedStringFromRange): Replace all non-breaking spaces with spaces if

they come from a text node with -webkit-nbsp-mode:space.

LayoutTests:

  • platform/mac/fast/text/attributed-substring-from-range-expected.txt: Updated.
4:48 AM Changeset in webkit [209681] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix for EFL after r209665

  • UIProcess/efl/TextCheckerClientEfl.h:
3:11 AM Changeset in webkit [209680] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebCore

Unreviewed, add KHR include dir to fix ANGLE build after r209665
https://bugs.webkit.org/show_bug.cgi?id=165686

  • CMakeLists.txt:

Dec 10, 2016:

9:14 PM Changeset in webkit [209679] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

Rolling out 165737, since it broke layout tests. I need to find a
different place to put the init.

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::isValidSelector):

5:14 PM Changeset in webkit [209678] by commit-queue@webkit.org
  • 105 edits
    13 deletes in trunk

Unreviewed, rolling out r209653, r209654, r209663, and
r209673.
https://bugs.webkit.org/show_bug.cgi?id=165739

speedometer crashes (Requested by pizlo on #webkit).

Reverted changesets:

"JSVALUE64: Pass arguments in platform argument registers when
making JavaScript calls"
https://bugs.webkit.org/show_bug.cgi?id=160355
http://trac.webkit.org/changeset/209653

"Unreviewed build fix for 32 bit builds."
http://trac.webkit.org/changeset/209654

"Unreviewed build fix for the CLOOP after r209653"
http://trac.webkit.org/changeset/209663

"REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()"
https://bugs.webkit.org/show_bug.cgi?id=165728
http://trac.webkit.org/changeset/209673

4:04 PM Changeset in webkit [209677] by Simon Fraser
  • 8 edits in trunk

Support the deprecated dictionary constructor for DOMPointReadOnly and DOMPoint
https://bugs.webkit.org/show_bug.cgi?id=165732

Reviewed by Sam Weinig.
Source/WebCore:

For compatibility with other browsers, support the DOMPointInit constructor to
DOMPoint and DOMPointReadOnly per <https://www.w3.org/TR/geometry-1/#DOMPoint>

Extended geometry/DOMPoint-001.html to test.

  • dom/DOMPoint.h:
  • dom/DOMPoint.idl:
  • dom/DOMPointReadOnly.h:

(WebCore::DOMPointReadOnly::create):

  • dom/DOMPointReadOnly.idl:

LayoutTests:

  • geometry/DOMPoint-001-expected.txt:
  • geometry/DOMPoint-001.html:
3:36 PM Changeset in webkit [209676] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure content extensions initialize AtomicString
https://bugs.webkit.org/show_bug.cgi?id=165737

Reviewed by Simon Fraser.

Fixes two broken tests in TestWebkitAPI.

  • contentextensions/ContentExtensionParser.cpp:

(WebCore::ContentExtensions::isValidSelector):

2:29 PM Changeset in webkit [209675] by Simon Fraser
  • 4 edits
    2 adds in trunk

Animation followed by transition doesn't always fire transitionend event
https://bugs.webkit.org/show_bug.cgi?id=165731
rdar://problem/28471240

Reviewed by Zalan Bujtas.
Source/WebCore:

After r200047, a keyframe animation of an accelerated property followed by a
transition didn't always fire a transitionend event.

This happened if CompositeAnimation::timeToNextService() happend to be called
when the transitions's timeToNextService() returned a positive value, but the
keyframe animation still existed, but its timeToNextService() returned -1. In
this case that -1 would clobber the positing minT.

Fix by just continuing in each loop when the timeToNextService() returns -1.

This code should probably be rewritten to use std::optional<double> rather than
magic values.

Test: animations/animation-followed-by-transition.html

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::timeToNextService):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::addAnimation):
(WebCore::GraphicsLayerCA::pauseAnimation):
(WebCore::GraphicsLayerCA::removeAnimation):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):

LayoutTests:

  • animations/animation-followed-by-transition-expected.txt: Added.
  • animations/animation-followed-by-transition.html: Added.
2:13 PM Changeset in webkit [209674] by weinig@apple.com
  • 11 edits
    2 deletes in trunk/Source/WebCore

[WebIDL] Merge JSDictionary into Dictionary, and remove unused bits
https://bugs.webkit.org/show_bug.cgi?id=165641

Reviewed by Dan Bernstein.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:

Remove JSDictionary.h/cpp

  • Modules/mediastream/RTCDataChannel.cpp:

Remove unused #include of Dictionary.h

  • Modules/mediastream/RTCPeerConnection.cpp:
  • Modules/mediastream/RTCPeerConnection.h:

Replace unnecessary #include of Dictionary in a header with forward declaration.

  • bindings/js/Dictionary.cpp:

(WebCore::Dictionary::Dictionary):
(WebCore::Dictionary::tryGetProperty):
(WebCore::Dictionary::getOwnPropertyNames):
(WebCore::Dictionary::convertValue):
(WebCore::Dictionary::asJSObject<Notification>): Deleted.
(WebCore::Dictionary::getOwnPropertiesAsStringHashMap): Deleted.
(WebCore::Dictionary::getWithUndefinedOrNullCheck): Deleted.

  • bindings/js/Dictionary.h:

(WebCore::Dictionary::isObject):
(WebCore::Dictionary::isUndefinedOrNull):
(WebCore::Dictionary::execState):
(WebCore::Dictionary::initializerObject):
(WebCore::Dictionary::isValid):
(WebCore::Dictionary::convertValue):
(WebCore::Dictionary::get):
(WebCore::Dictionary::tryGetPropertyAndResult):
(WebCore::Dictionary::getEventListener): Deleted.
Merge JSDictionary into Dictionary. Remove all unused functions (some getters, lots
of convertValue overrides). Modernize to taste.

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
(WebCore::getHashAlgorithm):
(WebCore::createHmacParams):
(WebCore::createHmacKeyParams):
(WebCore::createRsaKeyGenParams):
(WebCore::createRsaOaepParams):
(WebCore::createRsaSsaParams):
Update for rename. JSDictionary is now Dictionary.

  • bindings/js/JSDictionary.cpp: Removed.
  • bindings/js/JSDictionary.h: Removed.
  • dom/MutationObserver.cpp:

Remove unused #include of Dictionary.h

1:04 PM Changeset in webkit [209673] by msaboff@apple.com
  • 3 edits
    1 add in trunk

REGRESSION(r209653) Crash in CallFrameShuffler::snapshot()
https://bugs.webkit.org/show_bug.cgi?id=165728

Reviewed by Filip Pizlo.

JSTests:

New regression test.

  • stress/regress-165728.js: Added.

(sum1):
(sum2):
(tailCaller):
(test):

Source/JavaScriptCore:

It can be the case that a JSValueReg's CachedRecovery is the source for mutliple
GPRs. We only store the CachedRecovery in one slot of m_newRegisters to simplify
the recovery process. This is also done for the case where the recovery source
and destination are the same GPR.

In light of this change, snapshot needs to be taught that one CacheRecovery is
the source for multiple registers. This is done by using a two step process.
First find all the argument CachedRecovery's and create a vector mapping all of
the target GPRs and the source recovery. Then use that vector to get the
recovery for each register.

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::snapshot):

12:44 PM Changeset in webkit [209672] by beidson@apple.com
  • 3 edits
    3 adds in trunk/PerformanceTests

More IndexedDB perf tests.
https://bugs.webkit.org/show_bug.cgi?id=165634

Reviewed by Sam Weinig.

  • IndexedDB/index-multientry.html:
  • IndexedDB/large-number-of-inserts-responsiveness.html: Added.
  • IndexedDB/large-number-of-inserts.html: Added.
  • IndexedDB/objectstore-cursor.html: Added.
  • resources/runner.js: Add "track responsiveness" functionality to PerfTestRunner.
12:38 PM Changeset in webkit [209671] by hyatt@apple.com
  • 10 edits
    2 moves in trunk/Source/WebCore

[CSS Parser] Move CSSParserValues.h/.cpp to CSSParserSelector.h/.cpp
https://bugs.webkit.org/show_bug.cgi?id=165730

Reviewed by Simon Fraser.

  • WebCore.xcodeproj/project.pbxproj:
  • css/CSSCustomPropertyValue.cpp:
  • css/CSSPrimitiveValue.cpp:
  • css/CSSSelectorList.cpp:
  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
  • css/parser/CSSParserImpl.cpp:
  • css/parser/CSSParserSelector.cpp: Copied from Source/WebCore/css/parser/CSSParserValues.cpp.
  • css/parser/CSSParserSelector.h: Copied from Source/WebCore/css/parser/CSSParserValues.h.
  • css/parser/CSSParserValues.cpp: Removed.
  • css/parser/CSSParserValues.h: Removed.
  • css/parser/CSSSelectorParser.h:
12:24 PM BuildingGtk edited by Michael Catanzaro
(diff)
12:22 PM Changeset in webkit [209670] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Remove the pseudoclass/element hacks
https://bugs.webkit.org/show_bug.cgi?id=165729

Reviewed by Sam Weinig.

  • css/SelectorPseudoClassAndCompatibilityElementMap.in:
  • css/SelectorPseudoElementTypeMap.in:
  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

12:21 PM BuildingGtk edited by Michael Catanzaro
(diff)
11:36 AM Changeset in webkit [209669] by weinig@apple.com
  • 17 edits
    1 add
    1 delete in trunk

[WebIDL] Remove custom bindings for Geolocation
https://bugs.webkit.org/show_bug.cgi?id=165625

Reviewed by Alex Christensen.

Source/WebCore:

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:

Add/remove files.

  • Modules/geolocation/GeoNotifier.cpp:

(WebCore::GeoNotifier::GeoNotifier):
(WebCore::GeoNotifier::hasZeroTimeout):
(WebCore::GeoNotifier::startTimerIfNeeded):

  • Modules/geolocation/GeoNotifier.h:

(WebCore::GeoNotifier::create):
(WebCore::GeoNotifier::options):
Update to store PositionOptions as a value, and pass the PositionCallback
as a Ref, rather than a RefPtr, since it is not optional.

  • Modules/geolocation/Geolocation.cpp:

(WebCore::createGeoposition):
Use auto, to get the good type for Coordinates (Ref).

(WebCore::Geolocation::getCurrentPosition):
(WebCore::Geolocation::watchPosition):
(WebCore::Geolocation::haveSuitableCachedPosition):
(WebCore::Geolocation::startUpdating):

  • Modules/geolocation/Geolocation.h:

Update to pass PositionOptions itself now that it is a plain struct.

  • Modules/geolocation/Geolocation.idl:

Remove [Custom] extended attribute and add FIXME about nullable annotation.

  • Modules/geolocation/Geoposition.h:

Pass/store Coordinates as a Ref.

  • Modules/geolocation/PositionOptions.h:

Convert to be a simple struct.

  • Modules/geolocation/PositionOptions.idl:

Added.

  • bindings/js/JSGeolocationCustom.cpp:

Removed.

LayoutTests:

  • fast/dom/Geolocation/argument-types-expected.txt:
  • fast/dom/Geolocation/not-enough-arguments-expected.txt:
  • fast/dom/Geolocation/script-tests/argument-types.js:

Update tests for improved error messages / adherence to WebIDL.

11:14 AM Changeset in webkit [209668] by keith_miller@apple.com
  • 3 edits
    1 add in trunk

Fix indirect_call if the result type is used.
https://bugs.webkit.org/show_bug.cgi?id=165727

Reviewed by Michael Saboff.

JSTests:

  • wasm/js-api/call-indirect-results.js: Added.

(const.wasmModuleWhichImportJS):
(MonomorphicImport):

Source/JavaScriptCore:

The patchpoint for indirect_call assumed that the callee would be
in params[0]. This is not the case, however, if the callee returns
a value.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addCallIndirect):

10:32 AM Changeset in webkit [209667] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit

Unreviewed attempt to fix cmake build of Mac port after r209665.

  • PlatformMac.cmake: Avoid using relative path in

WebKit_INCLUDE_DIRECTORIES.

10:31 AM Changeset in webkit [209666] by hyatt@apple.com
  • 74 edits
    3 adds
    11 deletes in trunk

[CSS Parser] Remove the old CSS Parser
https://bugs.webkit.org/show_bug.cgi?id=165645

Reviewed by Daniel Bates.

Source/WebCore:

Remove the old CSS parser code. In doing so, code that used documentless
CSSParserContexts is now going through the new parser. This resulted in
some additional changes. These include:

(1) Canvas color parsing switched to new parser's code. This resulted in
progressions on canvas tests.

(2) Support for CSSNamespaceRule in the CSS OM, since the Inspector's
creation of CSS OM wrappers made it necessary to add this in. The old parser
did not create style rules for namespaces, but the new one (and other browsers)
did.

(3) <font face="X"> now uses the new parser's font-family parsing code. This
change was made in createFontFaceValue in CSSValuePool.

(4) FontFace now uses a new function on the new parser called
parseFontFaceDescriptor. This function sets things up so that parsing occurs
as though you are inside a @font-face. The old parser let you call parseValue
to parse "properties", but descriptors need to be handled differently in the
new parser.

(5) Illegal CSS rules in mediaControlsApple/ios.css forced me to add a quirk
to handle chained shadow DOM pseudo-elements. This should not be allowed, but
for now it is.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • css/CSSCalculationValue.cpp:

(WebCore::unitCategory):
(WebCore::hasDoubleValue):
(WebCore::checkDepthAndIndexDeprecated): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseCalc): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::operatorValue): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValue): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueTerm): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueMultiplicativeExpression): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseAdditiveValueExpression): Deleted.
(WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueExpression): Deleted.

  • css/CSSCalculationValue.h:
  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::specifiedValueForGridTrackSize):

  • css/CSSCustomPropertyValue.cpp:

(WebCore::CSSCustomPropertyValue::checkVariablesForCycles):
(WebCore::CSSCustomPropertyValue::resolveVariableReferences):

  • css/CSSCustomPropertyValue.h:
  • css/CSSFunctionValue.cpp:

(WebCore::CSSFunctionValue::CSSFunctionValue):
(WebCore::CSSFunctionValue::customCSSText):
(WebCore::CSSFunctionValue::append):
(WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables): Deleted.

  • css/CSSFunctionValue.h:
  • css/CSSGrammar.y.in: Removed.
  • css/CSSGrammar.y.includes: Removed.
  • css/CSSGroupingRule.cpp:

(WebCore::CSSGroupingRule::insertRule):

  • css/CSSKeyframeRule.h:
  • css/CSSKeyframesRule.cpp:

(WebCore::CSSKeyframesRule::appendRule):

  • css/CSSNamespaceRule.cpp: Added.

(WebCore::CSSNamespaceRule::CSSNamespaceRule):
(WebCore::CSSNamespaceRule::~CSSNamespaceRule):
(WebCore::CSSNamespaceRule::namespaceURI):
(WebCore::CSSNamespaceRule::prefix):
(WebCore::CSSNamespaceRule::cssText):
(WebCore::CSSNamespaceRule::reattach):

  • css/CSSNamespaceRule.h: Added.
  • css/CSSNamespaceRule.idl: Added.
  • css/CSSPrimitiveValue.cpp:

(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::isStringType):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
(WebCore::CSSPrimitiveValue::buildParserValue): Deleted.

  • css/CSSPrimitiveValue.h:
  • css/CSSRule.h:
  • css/CSSRule.idl:
  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::insertRule):

  • css/CSSValue.cpp:

(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):

  • css/CSSValue.h:

(WebCore::CSSValue::isCustomPropertyValue):
(WebCore::CSSValue::hasVariableReferences):
(WebCore::CSSValue::isVariableDependentValue): Deleted.
(WebCore::CSSValue::isVariableValue): Deleted.

  • css/CSSValueList.cpp:

(WebCore::CSSValueList::customCSSText):
(WebCore::CSSValueList::containsVariables): Deleted.
(WebCore::CSSValueList::checkVariablesForCycles): Deleted.
(WebCore::CSSValueList::buildParserValueSubstitutingVariables): Deleted.
(WebCore::CSSValueList::buildParserValueListSubstitutingVariables): Deleted.

  • css/CSSValueList.h:

(WebCore::CSSValueList::createSlashSeparated):
(WebCore::CSSValueList::createFromParserValueList): Deleted.

  • css/CSSValuePool.cpp:

(WebCore::CSSValuePool::createFontFaceValue):

  • css/CSSVariableData.cpp:
  • css/CSSVariableDependentValue.cpp: Removed.
  • css/CSSVariableDependentValue.h: Removed.
  • css/CSSVariableValue.cpp: Removed.
  • css/CSSVariableValue.h: Removed.
  • css/DOMCSSNamespace.cpp:
  • css/FontFace.cpp:

(WebCore::FontFace::parseString):

  • css/InspectorCSSOMWrappers.cpp:
  • css/MediaQueryExp.cpp:

(WebCore::isFeatureValidWithIdentifier): Deleted.
(WebCore::isFeatureValidWithNonNegativeLengthOrNumber): Deleted.
(WebCore::isFeatureValidWithDensity): Deleted.
(WebCore::isFeatureValidWithNonNegativeInteger): Deleted.
(WebCore::isFeatureValidWithNonNegativeNumber): Deleted.
(WebCore::isFeatureValidWithZeroOrOne): Deleted.
(WebCore::isFeatureValidWithNumberWithUnit): Deleted.
(WebCore::isFeatureValidWithNumber): Deleted.
(WebCore::isSlash): Deleted.
(WebCore::isPositiveIntegerValue): Deleted.

  • css/MediaQueryExp.h:
  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::setCssText):
(WebCore::PropertySetCSSStyleDeclaration::setProperty):

  • css/SelectorPseudoTypeMap.h:
  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::getPropertyCSSValue):
(WebCore::MutableStyleProperties::setCustomProperty):
(WebCore::MutableStyleProperties::parseDeclaration):
(WebCore::StyleProperties::asText):

  • css/StyleProperties.h:
  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):

  • css/StyleResolver.h:
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::createCSSOMWrapper):

  • css/StyleSheetContents.cpp:

(WebCore::StyleSheetContents::parseAuthorStyleSheet):
(WebCore::StyleSheetContents::parseString):
(WebCore::StyleSheetContents::completeURL):
(WebCore::StyleSheetContents::parseStringAtPosition): Deleted.

  • css/StyleSheetContents.h:
  • css/WebKitCSSMatrix.cpp:
  • css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::CSSParser):
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseRule):
(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseSystemColor):
(WebCore::CSSParser::parseSingleValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseCustomPropertyValue):
(WebCore::CSSParser::parseSelector):
(WebCore::CSSParser::parseInlineStyleDeclaration):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::parseValueWithVariableReferences):
(WebCore::CSSParser::parseKeyframeKeyList):
(WebCore::CSSParser::parseFontFaceDescriptor):
(WebCore::equalLettersIgnoringASCIICase): Deleted.
(WebCore::hasPrefix): Deleted.
(WebCore::createPrimitiveValuePair): Deleted.
(WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
(WebCore::AnimationParseContext::hasCommittedFirstAnimation): Deleted.
(WebCore::AnimationParseContext::commitAnimationPropertyKeyword): Deleted.
(WebCore::AnimationParseContext::animationPropertyKeywordAllowed): Deleted.
(WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword): Deleted.
(WebCore::AnimationParseContext::sawAnimationPropertyKeyword): Deleted.
(): Deleted.
(WebCore::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParser::setupParser): Deleted.
(WebCore::isColorPropertyID): Deleted.
(WebCore::CSSParser::isValidSystemColorValue): Deleted.
(WebCore::validPrimitiveValueColor): Deleted.
(WebCore::parseColorValue): Deleted.
(WebCore::isSimpleLengthPropertyID): Deleted.
(WebCore::parseSimpleLength): Deleted.
(WebCore::parseSimpleLengthValue): Deleted.
(WebCore::isValidKeywordPropertyAndValue): Deleted.
(WebCore::isUniversalKeyword): Deleted.
(WebCore::isKeywordPropertyID): Deleted.
(WebCore::parseKeywordValue): Deleted.
(WebCore::parseTransformTranslateArguments): Deleted.
(WebCore::parseTranslateTransformValue): Deleted.
(WebCore::CSSParser::parseFontFaceValue): Deleted.
(WebCore::CSSParser::parseColorFromString): Deleted.
(WebCore::CSSParser::parseDeclarationDeprecated): Deleted.
(WebCore::filterProperties): Deleted.
(WebCore::CSSParser::createStyleProperties): Deleted.
(WebCore::CSSParser::addProperty): Deleted.
(WebCore::CSSParser::rollbackLastProperties): Deleted.
(WebCore::CSSParser::clearProperties): Deleted.
(WebCore::CSSParser::completeURL): Deleted.
(WebCore::CSSParser::validateCalculationUnit): Deleted.
(WebCore::CSSParser::shouldAcceptUnitLessValues): Deleted.
(WebCore::CSSParser::validateUnit): Deleted.
(WebCore::CSSParser::createPrimitiveNumericValue): Deleted.
(WebCore::CSSParser::createPrimitiveStringValue): Deleted.
(WebCore::isComma): Deleted.
(WebCore::isForwardSlashOperator): Deleted.
(WebCore::CSSParser::isValidSize): Deleted.
(WebCore::CSSParser::parseValidPrimitive): Deleted.
(WebCore::CSSParser::addExpandedPropertyForValue): Deleted.
(WebCore::isImageSetFunctionValue): Deleted.
(WebCore::CSSParser::addFillValue): Deleted.
(WebCore::isContentDistributionKeyword): Deleted.
(WebCore::isContentPositionKeyword): Deleted.
(WebCore::isBaselinePositionKeyword): Deleted.
(WebCore::isAlignmentOverflowKeyword): Deleted.
(WebCore::isItemPositionKeyword): Deleted.
(WebCore::CSSParser::parseLegacyPosition): Deleted.
(WebCore::CSSParser::parseContentDistributionOverflowPosition): Deleted.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Deleted.
(WebCore::parseBackgroundClip): Deleted.
(WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): Deleted.
(WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
(WebCore::CSSParser::parseScrollSnapPositions): Deleted.
(WebCore::CSSParser::parseScrollSnapDestination): Deleted.
(WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
(WebCore::CSSParser::parseFillShorthand): Deleted.
(WebCore::CSSParser::addAnimationValue): Deleted.
(WebCore::CSSParser::parseAnimationShorthand): Deleted.
(WebCore::CSSParser::parseColumnWidth): Deleted.
(WebCore::CSSParser::parseColumnCount): Deleted.
(WebCore::CSSParser::parseColumnsShorthand): Deleted.
(WebCore::CSSParser::parseTransitionShorthand): Deleted.
(WebCore::CSSParser::parseShorthand): Deleted.
(WebCore::CSSParser::parse4Values): Deleted.
(WebCore::CSSParser::parsePage): Deleted.
(WebCore::CSSParser::parseSize): Deleted.
(WebCore::CSSParser::parseSizeParameter): Deleted.
(WebCore::CSSParser::parseQuotes): Deleted.
(WebCore::CSSParser::parseAlt): Deleted.
(WebCore::CSSParser::parseCustomPropertyDeclaration): Deleted.
(WebCore::CSSParser::parseContent): Deleted.
(WebCore::CSSParser::parseAttr): Deleted.
(WebCore::CSSParser::parseBackgroundColor): Deleted.
(WebCore::CSSParser::parseFillImage): Deleted.
(WebCore::CSSParser::parsePositionX): Deleted.
(WebCore::CSSParser::parsePositionY): Deleted.
(WebCore::CSSParser::parseFillPositionComponent): Deleted.
(WebCore::isValueConflictingWithCurrentEdge): Deleted.
(WebCore::isFillPositionKeyword): Deleted.
(WebCore::CSSParser::parse4ValuesFillPosition): Deleted.
(WebCore::CSSParser::parse3ValuesFillPosition): Deleted.
(WebCore::CSSParser::isPotentialPositionValue): Deleted.
(WebCore::CSSParser::parseFillPosition): Deleted.
(WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
(WebCore::CSSParser::parseFillRepeat): Deleted.
(WebCore::CSSParser::parseFillSize): Deleted.
(WebCore::CSSParser::parseFillProperty): Deleted.
(WebCore::CSSParser::parseAnimationDelay): Deleted.
(WebCore::CSSParser::parseAnimationDirection): Deleted.
(WebCore::CSSParser::parseAnimationDuration): Deleted.
(WebCore::CSSParser::parseAnimationFillMode): Deleted.
(WebCore::CSSParser::parseAnimationIterationCount): Deleted.
(WebCore::CSSParser::parseAnimationName): Deleted.
(WebCore::CSSParser::parseAnimationPlayState): Deleted.
(WebCore::CSSParser::parseAnimationTrigger): Deleted.
(WebCore::CSSParser::parseAnimationProperty): Deleted.
(WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
(WebCore::CSSParser::isSpringTimingFunctionEnabled): Deleted.
(WebCore::CSSParser::parseCubicBezierTimingFunctionValue): Deleted.
(WebCore::CSSParser::parseSpringTimingFunctionValue): Deleted.
(WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
(WebCore::isValidGridPositionCustomIdent): Deleted.
(WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition): Deleted.
(WebCore::CSSParser::parseGridPosition): Deleted.
(WebCore::gridMissingGridPositionValue): Deleted.
(WebCore::CSSParser::parseGridItemPositionShorthand): Deleted.
(WebCore::CSSParser::parseGridGapShorthand): Deleted.
(WebCore::CSSParser::parseGridTemplateColumns): Deleted.
(WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Deleted.
(WebCore::CSSParser::parseGridTemplateShorthand): Deleted.
(WebCore::parseImplicitAutoFlow): Deleted.
(WebCore::CSSParser::parseGridShorthand): Deleted.
(WebCore::CSSParser::parseGridAreaShorthand): Deleted.
(WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
(WebCore::CSSParser::parseGridLineNames): Deleted.
(WebCore::isGridTrackFixedSized): Deleted.
(WebCore::CSSParser::parseGridTrackList): Deleted.
(WebCore::CSSParser::parseGridTrackRepeatFunction): Deleted.
(WebCore::CSSParser::parseGridTrackSize): Deleted.
(WebCore::CSSParser::parseGridBreadth): Deleted.
(WebCore::isValidGridAutoFlowId): Deleted.
(WebCore::CSSParser::parseGridAutoFlow): Deleted.
(WebCore::skipCommaInDashboardRegion): Deleted.
(WebCore::CSSParser::parseDashboardRegions): Deleted.
(WebCore::parseGridTemplateAreasColumnNames): Deleted.
(WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
(WebCore::CSSParser::parseGridTemplateAreas): Deleted.
(WebCore::CSSParser::parseCounterContent): Deleted.
(WebCore::CSSParser::parseClipShape): Deleted.
(WebCore::completeBorderRadii): Deleted.
(WebCore::CSSParser::parseInsetRoundedCorners): Deleted.
(WebCore::CSSParser::parseBasicShapeInset): Deleted.
(WebCore::CSSParser::parseShapeRadius): Deleted.
(WebCore::CSSParser::parseBasicShapeCircle): Deleted.
(WebCore::CSSParser::parseBasicShapeEllipse): Deleted.
(WebCore::CSSParser::parseBasicShapePolygon): Deleted.
(WebCore::CSSParser::parseBasicShapePath): Deleted.
(WebCore::isBoxValue): Deleted.
(WebCore::CSSParser::parseBasicShapeAndOrBox): Deleted.
(WebCore::CSSParser::parseShapeProperty): Deleted.
(WebCore::CSSParser::parseClipPath): Deleted.
(WebCore::CSSParser::parseBasicShape): Deleted.
(WebCore::CSSParser::parseFont): Deleted.
(WebCore::CSSParser::parseSystemFont): Deleted.
(WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder): Deleted.
(WebCore::FontFamilyValueBuilder::add): Deleted.
(WebCore::FontFamilyValueBuilder::commit): Deleted.
(WebCore::valueIsCSSKeyword): Deleted.
(WebCore::CSSParser::parseFontFamily): Deleted.
(WebCore::CSSParser::parseLineHeight): Deleted.
(WebCore::CSSParser::parseFontSize): Deleted.
(WebCore::createFontWeightValueKeyword): Deleted.
(WebCore::CSSParser::parseFontWeight): Deleted.
(WebCore::CSSParser::parseFontSynthesis): Deleted.
(WebCore::CSSParser::parseFontFaceSrcURI): Deleted.
(WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
(WebCore::CSSParser::parseFontFaceSrc): Deleted.
(WebCore::CSSParser::parseFontFaceUnicodeRange): Deleted.
(WebCore::checkForValidDouble): Deleted.
(WebCore::parseDouble): Deleted.
(WebCore::parseColorIntOrPercentage): Deleted.
(WebCore::isTenthAlpha): Deleted.
(WebCore::parseAlphaValue): Deleted.
(WebCore::mightBeRGBA): Deleted.
(WebCore::mightBeRGB): Deleted.
(WebCore::fastParseColorInternal): Deleted.
(WebCore::CSSParser::fastParseColor): Deleted.
(WebCore::CSSParser::parsedDouble): Deleted.
(WebCore::CSSParser::isCalculation): Deleted.
(WebCore::isPercent): Deleted.
(WebCore::CSSParser::parseColorInt): Deleted.
(WebCore::CSSParser::parseColorDouble): Deleted.
(WebCore::CSSParser::parseRGBParameters): Deleted.
(WebCore::CSSParser::parseColorFunctionParameters): Deleted.
(WebCore::CSSParser::parseHSLParameters): Deleted.
(WebCore::CSSParser::parseColorFromValue): Deleted.
(WebCore::ShadowParseContext::ShadowParseContext): Deleted.
(WebCore::ShadowParseContext::allowLength): Deleted.
(WebCore::ShadowParseContext::commitValue): Deleted.
(WebCore::ShadowParseContext::commitLength): Deleted.
(WebCore::ShadowParseContext::commitColor): Deleted.
(WebCore::ShadowParseContext::commitStyle): Deleted.
(WebCore::CSSParser::parseShadow): Deleted.
(WebCore::CSSParser::parseReflect): Deleted.
(WebCore::CSSParser::parseFlex): Deleted.
(WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
(WebCore::BorderImageParseContext::canAdvance): Deleted.
(WebCore::BorderImageParseContext::setCanAdvance): Deleted.
(WebCore::BorderImageParseContext::allowCommit): Deleted.
(WebCore::BorderImageParseContext::allowImage): Deleted.
(WebCore::BorderImageParseContext::allowImageSlice): Deleted.
(WebCore::BorderImageParseContext::allowRepeat): Deleted.
(WebCore::BorderImageParseContext::allowForwardSlashOperator): Deleted.
(WebCore::BorderImageParseContext::requireWidth): Deleted.
(WebCore::BorderImageParseContext::requireOutset): Deleted.
(WebCore::BorderImageParseContext::commitImage): Deleted.
(WebCore::BorderImageParseContext::commitImageSlice): Deleted.
(WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
(WebCore::BorderImageParseContext::commitBorderWidth): Deleted.
(WebCore::BorderImageParseContext::commitBorderOutset): Deleted.
(WebCore::BorderImageParseContext::commitRepeat): Deleted.
(WebCore::BorderImageParseContext::commitWebKitBorderImage): Deleted.
(WebCore::BorderImageParseContext::commitBorderImage): Deleted.
(WebCore::BorderImageParseContext::commitBorderImageProperty): Deleted.
(WebCore::CSSParser::parseBorderImage): Deleted.
(WebCore::isBorderImageRepeatKeyword): Deleted.
(WebCore::CSSParser::parseBorderImageRepeat): Deleted.
(WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): Deleted.
(WebCore::BorderImageSliceParseContext::allowNumber): Deleted.
(WebCore::BorderImageSliceParseContext::allowFill): Deleted.
(WebCore::BorderImageSliceParseContext::allowFinalCommit): Deleted.
(WebCore::BorderImageSliceParseContext::top): Deleted.
(WebCore::BorderImageSliceParseContext::commitNumber): Deleted.
(WebCore::BorderImageSliceParseContext::commitFill): Deleted.
(WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
(WebCore::CSSParser::parseBorderImageSlice): Deleted.
(WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): Deleted.
(WebCore::BorderImageQuadParseContext::allowNumber): Deleted.
(WebCore::BorderImageQuadParseContext::allowFinalCommit): Deleted.
(WebCore::BorderImageQuadParseContext::top): Deleted.
(WebCore::BorderImageQuadParseContext::commitNumber): Deleted.
(WebCore::BorderImageQuadParseContext::setAllowFinalCommit): Deleted.
(WebCore::BorderImageQuadParseContext::setTop): Deleted.
(WebCore::BorderImageQuadParseContext::commitBorderImageQuad): Deleted.
(WebCore::CSSParser::parseBorderImageQuad): Deleted.
(WebCore::CSSParser::parseBorderImageWidth): Deleted.
(WebCore::CSSParser::parseBorderImageOutset): Deleted.
(WebCore::CSSParser::parseBorderRadius): Deleted.
(WebCore::CSSParser::parseAspectRatio): Deleted.
(WebCore::CSSParser::parseCounter): Deleted.
(WebCore::parseDeprecatedGradientPoint): Deleted.
(WebCore::parseDeprecatedGradientColorStop): Deleted.
(WebCore::CSSParser::parseDeprecatedGradient): Deleted.
(WebCore::valueFromSideKeyword): Deleted.
(WebCore::parseGradientColorOrKeyword): Deleted.
(WebCore::CSSParser::parseDeprecatedLinearGradient): Deleted.
(WebCore::CSSParser::parseDeprecatedRadialGradient): Deleted.
(WebCore::CSSParser::parseLinearGradient): Deleted.
(WebCore::CSSParser::parseRadialGradient): Deleted.
(WebCore::CSSParser::parseGradientColorStops): Deleted.
(WebCore::CSSParser::isGeneratedImageValue): Deleted.
(WebCore::CSSParser::parseGeneratedImage): Deleted.
(WebCore::CSSParser::parseFilterImage): Deleted.
(WebCore::CSSParser::parseCrossfade): Deleted.
(WebCore::CSSParser::parseCanvas): Deleted.
(WebCore::CSSParser::parseNamedImage): Deleted.
(WebCore::CSSParser::parseImageResolution): Deleted.
(WebCore::CSSParser::parseImageSet): Deleted.
(WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
(WebCore::TransformOperationInfo::type): Deleted.
(WebCore::TransformOperationInfo::argCount): Deleted.
(WebCore::TransformOperationInfo::unit): Deleted.
(WebCore::TransformOperationInfo::unknown): Deleted.
(WebCore::TransformOperationInfo::hasCorrectArgCount): Deleted.
(WebCore::CSSParser::parseTransform): Deleted.
(WebCore::CSSParser::parseTransformValue): Deleted.
(WebCore::CSSParser::isBlendMode): Deleted.
(WebCore::CSSParser::isCompositeOperator): Deleted.
(WebCore::isValidPrimitiveFilterFunction): Deleted.
(WebCore::CSSParser::parseBuiltinFilterArguments): Deleted.
(WebCore::cssValueKeywordIDForFunctionName): Deleted.
(WebCore::CSSParser::parseFilter): Deleted.
(WebCore::validFlowName): Deleted.
(WebCore::CSSParser::isTextAutosizingEnabled): Deleted.
(WebCore::CSSParser::isCSSGridLayoutEnabled): Deleted.
(WebCore::CSSParser::parseFlowThread): Deleted.
(WebCore::CSSParser::parseRegionThread): Deleted.
(WebCore::CSSParser::parseTransformOrigin): Deleted.
(WebCore::CSSParser::parsePerspectiveOrigin): Deleted.
(WebCore::CSSParser::addTextDecorationProperty): Deleted.
(WebCore::CSSParser::parseTextDecoration): Deleted.
(WebCore::CSSParser::parseTextDecorationSkip): Deleted.
(WebCore::CSSParser::parseTextUnderlinePosition): Deleted.
(WebCore::CSSParser::parseTextEmphasisStyle): Deleted.
(WebCore::CSSParser::parseTextEmphasisPosition): Deleted.
(WebCore::CSSParser::parseTextIndent): Deleted.
(WebCore::CSSParser::parseHangingPunctuation): Deleted.
(WebCore::CSSParser::parseLineBoxContain): Deleted.
(WebCore::CSSParser::parseFontFeatureTag): Deleted.
(WebCore::CSSParser::parseFontFeatureSettings): Deleted.
(WebCore::CSSParser::parseFontVariationTag): Deleted.
(WebCore::CSSParser::parseFontVariationSettings): Deleted.
(WebCore::CSSParser::parseFontVariantLigatures): Deleted.
(WebCore::CSSParser::parseFontVariantNumeric): Deleted.
(WebCore::CSSParser::parseFontVariantEastAsian): Deleted.
(WebCore::CSSParser::parseFontVariant): Deleted.
(WebCore::isValidWillChangeAnimatableFeature): Deleted.
(WebCore::CSSParser::parseWillChange): Deleted.
(WebCore::CSSParser::parseCalculation): Deleted.
(WebCore::isCSSLetter): Deleted.
(WebCore::isCSSEscape): Deleted.
(WebCore::isURILetter): Deleted.
(WebCore::isIdentifierStartAfterDash): Deleted.
(WebCore::isCustomPropertyIdentifier): Deleted.
(WebCore::isEqualToCSSIdentifier): Deleted.
(WebCore::isEqualToCSSCaseSensitiveIdentifier): Deleted.
(WebCore::checkAndSkipEscape): Deleted.
(WebCore::skipWhiteSpace): Deleted.
(WebCore::CSSParserString::characters<LChar>): Deleted.
(WebCore::CSSParserString::characters<UChar>): Deleted.
(WebCore::CSSParser::currentCharacter<LChar>): Deleted.
(WebCore::CSSParser::currentCharacter<UChar>): Deleted.
(WebCore::CSSParser::currentCharacter16): Deleted.
(WebCore::CSSParser::tokenStart<LChar>): Deleted.
(WebCore::CSSParser::tokenStart<UChar>): Deleted.
(WebCore::CSSParser::currentLocation): Deleted.
(WebCore::CSSParser::isIdentifierStart): Deleted.
(WebCore::checkAndSkipString): Deleted.
(WebCore::CSSParser::parseEscape): Deleted.
(WebCore::CSSParser::UnicodeToChars<LChar>): Deleted.
(WebCore::CSSParser::UnicodeToChars<UChar>): Deleted.
(WebCore::CSSParser::parseIdentifierInternal): Deleted.
(WebCore::CSSParser::parseIdentifier): Deleted.
(WebCore::CSSParser::parseStringInternal): Deleted.
(WebCore::CSSParser::parseString): Deleted.
(WebCore::CSSParser::findURI): Deleted.
(WebCore::CSSParser::parseURIInternal): Deleted.
(WebCore::CSSParser::parseURI): Deleted.
(WebCore::CSSParser::parseUnicodeRange): Deleted.
(WebCore::CSSParser::parseNthChild): Deleted.
(WebCore::CSSParser::parseNthChildExtra): Deleted.
(WebCore::CSSParser::detectFunctionTypeToken): Deleted.
(WebCore::CSSParser::detectMediaQueryToken): Deleted.
(WebCore::CSSParser::detectNumberToken): Deleted.
(WebCore::CSSParser::detectDashToken): Deleted.
(WebCore::CSSParser::detectAtToken): Deleted.
(WebCore::CSSParser::detectSupportsToken): Deleted.
(WebCore::CSSParser::realLex): Deleted.
(WebCore::CSSParser::createImportRule): Deleted.
(WebCore::CSSParser::createMediaRule): Deleted.
(WebCore::CSSParser::createEmptyMediaRule): Deleted.
(WebCore::CSSParser::createSupportsRule): Deleted.
(WebCore::CSSParser::markSupportsRuleHeaderStart): Deleted.
(WebCore::CSSParser::markSupportsRuleHeaderEnd): Deleted.
(WebCore::CSSParser::popSupportsRuleData): Deleted.
(WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded): Deleted.
(WebCore::CSSParser::addNewRuleToSourceTree): Deleted.
(WebCore::CSSParser::popRuleData): Deleted.
(WebCore::CSSParser::syntaxError): Deleted.
(WebCore::CSSParser::isLoggingErrors): Deleted.
(WebCore::CSSParser::logError): Deleted.
(WebCore::CSSParser::createKeyframesRule): Deleted.
(WebCore::CSSParser::createStyleRule): Deleted.
(WebCore::CSSParser::createFontFaceRule): Deleted.
(WebCore::CSSParser::addNamespace): Deleted.
(WebCore::CSSParser::determineNameInNamespace): Deleted.
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Deleted.
(WebCore::CSSParser::rewriteSpecifiersWithElementName): Deleted.
(WebCore::CSSParser::rewriteSpecifiers): Deleted.
(WebCore::CSSParser::createPageRule): Deleted.
(WebCore::CSSParser::createSelectorVector): Deleted.
(WebCore::CSSParser::recycleSelectorVector): Deleted.
(WebCore::CSSParser::createRegionRule): Deleted.
(WebCore::CSSParser::createMarginAtRule): Deleted.
(WebCore::CSSParser::startDeclarationsForMarginBox): Deleted.
(WebCore::CSSParser::endDeclarationsForMarginBox): Deleted.
(WebCore::CSSParser::createKeyframe): Deleted.
(WebCore::CSSParser::invalidBlockHit): Deleted.
(WebCore::CSSParser::updateLastMediaLine): Deleted.
(WebCore::fixUnparsedProperties): Deleted.
(WebCore::CSSParser::fixUnparsedPropertyRanges): Deleted.
(WebCore::CSSParser::markRuleHeaderStart): Deleted.
(WebCore::CSSParser::setRuleHeaderEnd): Deleted.
(WebCore::CSSParser::markRuleHeaderEnd): Deleted.
(WebCore::CSSParser::markSelectorStart): Deleted.
(WebCore::CSSParser::markSelectorEnd): Deleted.
(WebCore::CSSParser::markRuleBodyStart): Deleted.
(WebCore::CSSParser::markRuleBodyEnd): Deleted.
(WebCore::CSSParser::markPropertyStart): Deleted.
(WebCore::CSSParser::markPropertyEnd): Deleted.
(WebCore::CSSParser::createViewportRule): Deleted.
(WebCore::CSSParser::parseViewportProperty): Deleted.
(WebCore::CSSParser::parseViewportShorthand): Deleted.
(WebCore::isAppleLegacyCSSPropertyKeyword): Deleted.
(WebCore::cssPropertyID): Deleted.
(WebCore::cssPropertyNameIOSAliasing): Deleted.
(WebCore::isAppleLegacyCSSValueKeyword): Deleted.
(WebCore::cssValueKeywordID): Deleted.
(WebCore::isValidNthToken): Deleted.

  • css/parser/CSSParser.h:

(): Deleted.
(WebCore::CSSParser::ValueWithCalculation::ValueWithCalculation): Deleted.
(WebCore::CSSParser::ValueWithCalculation::value): Deleted.
(WebCore::CSSParser::ValueWithCalculation::operator CSSParserValue&): Deleted.
(WebCore::CSSParser::ValueWithCalculation::calculation): Deleted.
(WebCore::CSSParser::ValueWithCalculation::setCalculation): Deleted.
(WebCore::CSSParser::hasProperties): Deleted.
(WebCore::CSSParser::startNestedSelectorList): Deleted.
(WebCore::CSSParser::endNestedSelectorList): Deleted.
(WebCore::CSSParser::resetPropertyRange): Deleted.
(WebCore::CSSParser::isExtractingSourceData): Deleted.
(WebCore::CSSParser::lex): Deleted.
(WebCore::CSSParser::token): Deleted.
(WebCore::CSSParser::markViewportRuleBodyStart): Deleted.
(WebCore::CSSParser::markViewportRuleBodyEnd): Deleted.
(WebCore::CSSParser::setCustomPropertyName): Deleted.
(WebCore::CSSParser::is8BitSource): Deleted.
(WebCore::CSSParser::setStyleSheet): Deleted.
(WebCore::CSSParser::inStrictMode): Deleted.
(WebCore::CSSParser::inQuirksMode): Deleted.
(WebCore::CSSParser::setupParser): Deleted.
(WebCore::CSSParser::inShorthand): Deleted.
(WebCore::CSSParser::inViewport): Deleted.
(WebCore::CSSParser::operator|): Deleted.
(WebCore::CSSParser::validateUnit): Deleted.
(WebCore::ShorthandScope::ShorthandScope): Deleted.
(WebCore::ShorthandScope::~ShorthandScope): Deleted.
(WebCore::CSSParser::setTokenStart<LChar>): Deleted.
(WebCore::CSSParser::setTokenStart<UChar>): Deleted.
(WebCore::CSSParser::tokenStartOffset): Deleted.
(WebCore::CSSParser::currentCharacterOffset): Deleted.
(WebCore::CSSParser::tokenStartChar): Deleted.
(WebCore::isCustomPropertyName): Deleted.
(WebCore::cssyylex): Deleted.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • css/parser/CSSParserMode.h:

(WebCore::CSSParserContextHash::hash):

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::setSelectorList):
(WebCore::destroy): Deleted.
(WebCore::CSSParserValueList::~CSSParserValueList): Deleted.
(WebCore::CSSParserValueList::addValue): Deleted.
(WebCore::CSSParserValueList::insertValueAt): Deleted.
(WebCore::CSSParserValueList::extend): Deleted.
(WebCore::CSSParserValueList::containsVariables): Deleted.
(WebCore::CSSParserValue::createCSSValue): Deleted.
(WebCore::CSSParserSelector::parsePseudoElementSelector): Deleted.
(WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector): Deleted.
(WebCore::CSSParserSelector::parsePseudoElementSlottedFunctionSelector): Deleted.
(WebCore::CSSParserSelector::parsePseudoClassHostFunctionSelector): Deleted.
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector): Deleted.
(WebCore::CSSParserSelector::setPseudoClassValue): Deleted.

  • css/parser/CSSParserValues.h:

(WebCore::CSSParserString::init): Deleted.
(WebCore::CSSParserString::clear): Deleted.
(WebCore::CSSParserString::is8Bit): Deleted.
(WebCore::CSSParserString::characters8): Deleted.
(WebCore::CSSParserString::characters16): Deleted.
(WebCore::CSSParserString::length): Deleted.
(WebCore::CSSParserString::setLength): Deleted.
(WebCore::CSSParserString::operator[]): Deleted.
(WebCore::CSSParserString::operator String): Deleted.
(WebCore::CSSParserString::operator AtomicString): Deleted.
(WebCore::CSSParserString::toStringView): Deleted.
(): Deleted.
(WebCore::CSSParserValueList::CSSParserValueList): Deleted.
(WebCore::CSSParserValueList::size): Deleted.
(WebCore::CSSParserValueList::currentIndex): Deleted.
(WebCore::CSSParserValueList::current): Deleted.
(WebCore::CSSParserValueList::next): Deleted.
(WebCore::CSSParserValueList::previous): Deleted.
(WebCore::CSSParserValueList::setCurrentIndex): Deleted.
(WebCore::CSSParserValueList::valueAt): Deleted.
(WebCore::CSSParserValueList::clear): Deleted.
(WebCore::CSSParserValue::setFromValueList): Deleted.
(WebCore::equalLettersIgnoringASCIICase): Deleted.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::isCustomPropertyName):
(WebCore::cssPropertyNameIOSAliasing):

  • css/parser/CSSPropertyParser.h:
  • css/parser/SVGCSSParser.cpp: Removed.
  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData):

  • page/animation/AnimationController.cpp:
  • rendering/style/RenderStyle.cpp:
  • svg/SVGAnimateElementBase.cpp:
  • svg/SVGAnimationElement.cpp:
  • svg/SVGElement.cpp:

Source/WebKit/mac:

  • DOM/DOMCSS.mm:

(kitClass):

  • DOM/DOMCSSRule.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/CSSParser.cpp:

(TestWebKitAPI::TEST):

LayoutTests:

Some canvas tests pass now that they use the new parser's color parsing.

  • fast/dom/HTMLFontElement/face-attribute-expected.txt:
  • fast/dom/HTMLFontElement/face-attribute.html:

Converted font face parsing over to just use the CSS parser's font-family
parsing. This matches other browsers, so removing cases that we used to
accept now that we're more strict.

  • platform/mac/canvas/philip/tests/2d.fillStyle.parse.rgb-eof-expected.txt:
  • platform/mac/canvas/philip/tests/2d.fillStyle.parse.rgba-eof-expected.txt:

These tests pass now that canvas uses the new parser's color parsing.

  • platform/ios-simulator/svg/custom/fill-SVGPaint-interface-expected.txt: Removed.
  • platform/mac/svg/custom/fill-SVGPaint-interface-expected.png: Removed.
  • platform/mac/svg/custom/fill-SVGPaint-interface-expected.txt: Removed.
  • svg/custom/fill-SVGPaint-interface.svg: Removed.

Remove another test of the SVG CSS OM, since the SVG CSS OM for SVGPaint etc.
is gone now.

  • platform/mac/js/dom/global-constructors-attributes-expected.txt:

Rebaselined because of CSSNamespaceRule.

10:16 AM Changeset in webkit [209665] by Konstantin Tokarev
  • 40 edits in trunk

[cmake] Include WTF, JSC, and WebCore headers automatically to targers using them
https://bugs.webkit.org/show_bug.cgi?id=165686

Reviewed by Michael Catanzaro.

This change reduces duplication of include path lists between modules,
and reduces future need for fixes like r209605 (broken build because of
WebCore header suddenly becoming used in WebKit2).

.:

  • Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

  • CMakeLists.txt:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformJSCOnly.cmake:
  • PlatformMac.cmake:

Source/ThirdParty:

  • gtest/CMakeLists.txt:

Source/WebCore:

No new tests needed.

  • CMakeLists.txt:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformWinCairo.cmake:

Source/WebKit:

  • CMakeLists.txt:
  • PlatformMac.cmake:
  • PlatformWin.cmake:

Source/WebKit2:

  • CMakeLists.txt:
  • PlatformEfl.cmake:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:

Tools:

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformMac.cmake:
  • ImageDiff/CMakeLists.txt:
  • MiniBrowser/gtk/CMakeLists.txt:
  • MiniBrowser/mac/CMakeLists.txt:
  • MiniBrowser/win/CMakeLists.txt:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/PlatformEfl.cmake:
  • TestWebKitAPI/PlatformJSCOnly.cmake:
  • TestWebKitAPI/PlatformMac.cmake:
  • TestWebKitAPI/Tests/WebKit2Gtk/CMakeLists.txt:
  • WebKitTestRunner/CMakeLists.txt:
  • WebKitTestRunner/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformMac.cmake:
10:04 AM Changeset in webkit [209664] by Chris Dumez
  • 2 edits in trunk/Source/WTF

Avoid calling shrink() in the Vector destructor
https://bugs.webkit.org/show_bug.cgi?id=165675

Reviewed by Daniel Bates.

Avoid calling shrink() in the Vector destructor to avoid function call
overhead and unnecessarily reseting m_size to 0.

  • wtf/Vector.h:

(WTF::Vector::~Vector):
(WTF::Vector::asanSetBufferSizeToFullCapacity):
(WTF::minCapacity>::asanSetBufferSizeToFullCapacity):

6:13 AM Changeset in webkit [209663] by msaboff@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Unreviewed build fix for the CLOOP after r209653

  • jit/GPRInfo.h:

Provided a definition for NUMBER_OF_JS_FUNCTION_ARGUMENT_REGISTERS when the JIT is disabled.

  • jit/JITEntryPoints.h:

Removed #if ENABLE(JIT) protection around contents.

3:56 AM Changeset in webkit [209662] by Yusuke Suzuki
  • 3 edits
    2 adds in trunk

[JSC] Module namespace object behaves like immutable prototype exotic object
https://bugs.webkit.org/show_bug.cgi?id=165598

Reviewed by Mark Lam.

JSTests:

  • modules/namespace-prototype-assignment.js: Added.

(else):
(reportError):
(shouldEqual):
(shouldThrow):
(stringify):
(makeTestID):
(doInternalSetPrototypeOf):
(ordinarySetPrototypeOf):
(setImmutablePrototype):
(windowProxySetPrototypeOf):
(initSetterExpectation):
(throwIfNoExceptionPending):
(objectSetPrototypeOf):
(setUnderscoreProto):
(reflectSetPrototypeOf):
(setPrototypeOf):
(newObjectProto.toString):
(Symbol):
(test):
(runTests):

  • modules/namespace-set-prototype-of.js: Added.

(shouldThrow):
(TypeError.Cannot.set prototype):

Source/JavaScriptCore:

In the latest ECMA262 draft, the module namespace object behaves like immutable prototype exotic object.
https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects-setprototypeof-v

  • runtime/JSModuleNamespaceObject.h:
2:19 AM Changeset in webkit [209661] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Replace isUnclosedNode by isClosedShadowHidden
https://bugs.webkit.org/show_bug.cgi?id=165722

Reviewed by Antti Koivisto.

Replaced Node::isUnclosedNode by Node::isClosedShadowHidden and negated the semantics as done in the spec:
https://dom.spec.whatwg.org/#concept-closed-shadow-hidden
https://github.com/whatwg/dom/pull/306

Also added a version which follows the spec text for a debug assertion.

No new tests since this has no behavioral change.

  • dom/EventContext.h:

(WebCore::EventContext::isUnreachableNode):

  • dom/EventPath.cpp:

(WebCore::EventPath::computePathUnclosedToTarget):
(WebCore::RelatedNodeRetargeter::checkConsistency):

  • dom/Node.cpp:

(WebCore::isClosedShadowHiddenUsingSpecDefinition): Added to assert our implementation matches the spec text.
(WebCore::Node::isClosedShadowHidden): Renamed from Node::isUnclosedNode and negated the return value.

  • dom/Node.h:
2:00 AM Changeset in webkit [209660] by Antti Koivisto
  • 4 edits in trunk/Source/WebKit2

CrashTracer: com.apple.WebKit.Networking at WTF::ThreadSafeRefCounted<WebKit::NetworkCache::IOChannel>::deref
https://bugs.webkit.org/show_bug.cgi?id=165659
<rdar://problem/27077977>

Reviewed by Darin Adler.

  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::~IOChannel):

Add non-inlined destructor and release assert against double deletion to narrow down this crash.

1:58 AM Changeset in webkit [209659] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WTF::match_constness<WebCore::CSSValue, WebCore::CSSContentDistributionValue>::type& WTF::downcast<WebCore::CSSContentDistributionValue, WebCore::CSSValue> + 65
https://bugs.webkit.org/show_bug.cgi?id=165652
rdar://problem/28465278

Reviewed by Darin Adler.

No, test don't know how to get here.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertContentAlignmentData):

Add type checks.

1:29 AM Changeset in webkit [209658] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r208791): Assertion in testb3
https://bugs.webkit.org/show_bug.cgi?id=165651

Reviewed by Saam Barati.

Accidentally we always use edx/rdx for the result of UDiv/UMod.
But it is incorrect. We should use eax/rax for the result of UDiv.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lowerX86UDiv):

12:57 AM Changeset in webkit [209657] by jiewen_tan@apple.com
  • 7 edits
    12 adds in trunk

[WebCrypto] RSA algorithms should allow importing keys without usages
https://bugs.webkit.org/show_bug.cgi?id=165680
<rdar://problem/29601354>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:

Source/WebCore:

Tests: crypto/subtle/rsa-oaep-import-jwk-public-key-empty-usages.html

crypto/subtle/rsa-oaep-import-spki-key-empty-usages.html
crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages.html
crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages.html
crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-empty-usages.html
crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key-empty-usages.html

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

LayoutTests:

  • crypto/subtle/rsa-oaep-import-jwk-public-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-jwk-public-key-empty-usages.html: Added.
  • crypto/subtle/rsa-oaep-import-spki-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-spki-key-empty-usages.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-empty-usages.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key-empty-usages-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key-empty-usages.html: Added.
12:43 AM Changeset in webkit [209656] by fred.wang@free.fr
  • 2 edits in trunk/Source/WebCore

Add STIX Two Math to the list of math fonts in mathml.css
https://bugs.webkit.org/show_bug.cgi?id=165676

Reviewed by Darin Adler.

No new tests, this is just changing default style.

  • css/mathml.css:

(math):

12:04 AM Changeset in webkit [209655] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

Unreviewed buildfix after r209630.

  • Scripts/build-jsc: Remove building the non-existing testWASM.

Dec 9, 2016:

11:43 PM Changeset in webkit [209654] by msaboff@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed build fix for 32 bit builds.

  • dfg/DFGMinifiedNode.h:

(JSC::DFG::MinifiedNode::argumentIndex): Added a static_cast<unsigned>().

11:32 PM Changeset in webkit [209653] by msaboff@apple.com
  • 105 edits
    12 adds in trunk

JSVALUE64: Pass arguments in platform argument registers when making JavaScript calls
https://bugs.webkit.org/show_bug.cgi?id=160355

Reviewed by Filip Pizlo.

JSTests:

New microbenchmarks to measure call type performance.

  • microbenchmarks/calling-computed-args.js: Added.
  • microbenchmarks/calling-many-callees.js: Added.
  • microbenchmarks/calling-one-callee-fixed.js: Added.
  • microbenchmarks/calling-one-callee.js: Added.
  • microbenchmarks/calling-poly-callees.js: Added.
  • microbenchmarks/calling-poly-extra-arity-callees.js: Added.
  • microbenchmarks/calling-tailcall.js: Added.
  • microbenchmarks/calling-virtual-arity-fixup-callees.js: Added.
  • microbenchmarks/calling-virtual-arity-fixup-stackargs.js: Added.
  • microbenchmarks/calling-virtual-callees.js: Added.
  • microbenchmarks/calling-virtual-extra-arity-callees.js: Added.

Source/JavaScriptCore:

This patch implements passing JavaScript function arguments in registers for 64 bit platforms.

The implemented convention follows the ABI conventions for the associated platform.
The first two arguments are the callee and argument count, the rest of the argument registers
contain "this" and following argument until all platform argument registers are exhausted.
Arguments beyond what fit in registers are placed on the stack in the same location as
before this patch.

For X86-64 non-Windows platforms, there are 6 argument registers specified in the related ABI.
ARM64 has had argument registers. This allows for 4 or 6 parameter values to be placed in
registers on these respective platforms. This patch doesn't implement passing arguments in
registers for 32 bit platform, since most platforms have at most 4 argument registers
specified and 32 bit platforms use two 32 bit registers/memory locations to store one JSValue.

The call frame on the stack in unchanged in format and the arguments that are passed in
registers use the corresponding call frame location as a spill location. Arguments can
also be passed on the stack. The LLInt, baseline JIT'ed code as well as the initial entry
from C++ code base arguments on the stack. DFG s and FTL generated code pass arguments
via registers. All callees can accept arguments either in registers or on the stack.
The callee is responsible for moving argument to its preferred location.

The multiple entry points to JavaSCript code is now handled via the JITEntryPoints class and
related code. That class now has entries for StackArgsArityCheckNotRequired,
StackArgsMustCheckArity and for platforms that support registers arguments,
RegisterArgsArityCheckNotRequired, RegisterArgsMustCheckArity as well as and additional
RegisterArgsPossibleExtraArgs entry point when extra registers argument are passed.
This last case is needed to spill those extra arguments to the corresponding call frame
slots.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • b3/B3ArgumentRegValue.h:
  • b3/B3Validate.cpp:
  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::CallLinkInfo):

  • bytecode/CallLinkInfo.h:

(JSC::CallLinkInfo::setUpCall):
(JSC::CallLinkInfo::argumentsLocation):
(JSC::CallLinkInfo::argumentsInRegisters):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

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

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::specialCaseArguments):
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCommon.h:
  • dfg/DFGDCEPhase.cpp:

(JSC::DFG::DCEPhase::run):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGGenerationInfo.h:

(JSC::DFG::GenerationInfo::initArgumentRegisterValue):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::methodOfGettingAValueProfileFor):

  • dfg/DFGGraph.h:

(JSC::DFG::Graph::needsFlushedThis):
(JSC::DFG::Graph::addImmediateShouldSpeculateInt32):

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::initialize):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
(JSC::DFG::JITCompiler::compileEntry): Deleted.

  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::addJSDirectCall):
(JSC::DFG::JITCompiler::JSDirectCallRecord::JSDirectCallRecord):
(JSC::DFG::JITCompiler::JSDirectCallRecord::hasSlowCall):

  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::JITFinalizer):
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • dfg/DFGJITFinalizer.h:
  • dfg/DFGLiveCatchVariablePreservationPhase.cpp:

(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlock):

  • dfg/DFGMaximalFlushInsertionPhase.cpp:

(JSC::DFG::MaximalFlushInsertionPhase::treatRegularBlock):
(JSC::DFG::MaximalFlushInsertionPhase::treatRootBlock):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGMinifiedNode.cpp:

(JSC::DFG::MinifiedNode::fromNode):

  • dfg/DFGMinifiedNode.h:

(JSC::DFG::belongsInMinifiedGraph):

  • dfg/DFGNode.cpp:

(JSC::DFG::Node::hasVariableAccessData):

  • dfg/DFGNode.h:

(JSC::DFG::Node::accessesStack):
(JSC::DFG::Node::setVariableAccessData):
(JSC::DFG::Node::hasArgumentRegisterIndex):
(JSC::DFG::Node::argumentRegisterIndex):

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):

  • dfg/DFGOSREntrypointCreationPhase.cpp:

(JSC::DFG::OSREntrypointCreationPhase::run):

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl):

  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGPredictionInjectionPhase.cpp:

(JSC::DFG::PredictionInjectionPhase::run):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPutStackSinkingPhase.cpp:
  • dfg/DFGRegisterBank.h:

(JSC::DFG::RegisterBank::iterator::unlock):
(JSC::DFG::RegisterBank::unlockAtIndex):

  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::clearGenerationInfo):
(JSC::DFG::dumpRegisterInfo):
(JSC::DFG::SpeculativeJIT::dump):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::setupArgumentRegistersForEntry):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::allocate):
(JSC::DFG::SpeculativeJIT::spill):
(JSC::DFG::SpeculativeJIT::generationInfoFromVirtualRegister):
(JSC::DFG::JSValueOperand::JSValueOperand):
(JSC::DFG::JSValueOperand::gprUseSpecific):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGStrengthReductionPhase.cpp:

(JSC::DFG::StrengthReductionPhase::handleNode):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrEntryThunkGenerator):

  • dfg/DFGVariableEventStream.cpp:

(JSC::DFG::VariableEventStream::reconstruct):

  • dfg/DFGVirtualRegisterAllocationPhase.cpp:

(JSC::DFG::VirtualRegisterAllocationPhase::allocateRegister):
(JSC::DFG::VirtualRegisterAllocationPhase::run):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeEntrypointThunk):
(JSC::FTL::JITCode::setEntryFor):
(JSC::FTL::JITCode::addressForCall):
(JSC::FTL::JITCode::executableAddressAtOffset):
(JSC::FTL::JITCode::initializeAddressForCall): Deleted.
(JSC::FTL::JITCode::initializeArityCheckEntrypoint): Deleted.

  • ftl/FTLJITCode.h:
  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::finalizeFunction):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileGetArgumentRegister):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileDirectCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):

  • ftl/FTLOSREntry.cpp:

(JSC::FTL::prepareOSREntry):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::argumentRegister):
(JSC::FTL::Output::argumentRegisterInt32):

  • ftl/FTLOutput.h:
  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::update):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitDumbVirtualCall):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::spillArgumentRegistersToFrameBeforePrologue):
(JSC::AssemblyHelpers::spillArgumentRegistersToFrame):
(JSC::AssemblyHelpers::fillArgumentRegistersFromFrameBeforePrologue):
(JSC::AssemblyHelpers::emitPutArgumentToCallFrameBeforePrologue):
(JSC::AssemblyHelpers::emitPutArgumentToCallFrame):
(JSC::AssemblyHelpers::emitGetFromCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::emitGetFromCallFrameArgumentBeforePrologue):
(JSC::AssemblyHelpers::emitGetPayloadFromCallFrameHeaderBeforePrologue):
(JSC::AssemblyHelpers::incrementCounter):

  • jit/CachedRecovery.cpp:

(JSC::CachedRecovery::addTargetJSValueRegs):

  • jit/CachedRecovery.h:

(JSC::CachedRecovery::gprTargets):
(JSC::CachedRecovery::setWantedFPR):
(JSC::CachedRecovery::wantedJSValueRegs):
(JSC::CachedRecovery::setWantedJSValueRegs): Deleted.

  • jit/CallFrameShuffleData.h:
  • jit/CallFrameShuffler.cpp:

(JSC::CallFrameShuffler::CallFrameShuffler):
(JSC::CallFrameShuffler::dump):
(JSC::CallFrameShuffler::tryWrites):
(JSC::CallFrameShuffler::prepareAny):

  • jit/CallFrameShuffler.h:

(JSC::CallFrameShuffler::snapshot):
(JSC::CallFrameShuffler::addNew):
(JSC::CallFrameShuffler::initDangerFrontier):
(JSC::CallFrameShuffler::updateDangerFrontier):
(JSC::CallFrameShuffler::findDangerFrontierFrom):

  • jit/CallFrameShuffler64.cpp:

(JSC::CallFrameShuffler::emitDisplace):

  • jit/GPRInfo.h:

(JSC::JSValueRegs::operator==):
(JSC::JSValueRegs::operator!=):
(JSC::GPRInfo::toArgumentIndex):
(JSC::argumentRegisterFor):
(JSC::argumentRegisterForCallee):
(JSC::argumentRegisterForArgumentCount):
(JSC::argumentRegisterIndexForJSFunctionArgument):
(JSC::jsFunctionArgumentForArgumentRegister):
(JSC::argumentRegisterForFunctionArgument):
(JSC::numberOfRegisterArgumentsFor):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):
(JSC::JIT::link):
(JSC::JIT::compileCTINativeCall): Deleted.

  • jit/JIT.h:

(JSC::JIT::compileNativeCallEntryPoints):

  • jit/JITCall.cpp:

(JSC::JIT::compileSetupVarargsFrame):
(JSC::JIT::compileCallEval):
(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCode.cpp:

(JSC::JITCode::execute):
(JSC::DirectJITCode::DirectJITCode):
(JSC::DirectJITCode::initializeEntryPoints):
(JSC::DirectJITCode::addressForCall):
(JSC::NativeJITCode::addressForCall):
(JSC::DirectJITCode::initializeCodeRef): Deleted.

  • jit/JITCode.h:

(JSC::JITCode::executableAddress): Deleted.

  • jit/JITEntryPoints.h: Added.

(JSC::JITEntryPoints::JITEntryPoints):
(JSC::JITEntryPoints::entryFor):
(JSC::JITEntryPoints::setEntryFor):
(JSC::JITEntryPoints::offsetOfEntryFor):
(JSC::JITEntryPoints::registerEntryTypeForArgumentCount):
(JSC::JITEntryPoints::registerEntryTypeForArgumentType):
(JSC::JITEntryPoints::clearEntries):
(JSC::JITEntryPoints::operator=):
(JSC::JITEntryPointsWithRef::JITEntryPointsWithRef):
(JSC::JITEntryPointsWithRef::codeRef):
(JSC::argumentsLocationFor):
(JSC::registerEntryPointTypeFor):
(JSC::entryPointTypeFor):
(JSC::thunkEntryPointTypeFor):
(JSC::JITJSCallThunkEntryPointsWithRef::JITJSCallThunkEntryPointsWithRef):
(JSC::JITJSCallThunkEntryPointsWithRef::entryFor):
(JSC::JITJSCallThunkEntryPointsWithRef::setEntryFor):
(JSC::JITJSCallThunkEntryPointsWithRef::offsetOfEntryFor):
(JSC::JITJSCallThunkEntryPointsWithRef::clearEntries):
(JSC::JITJSCallThunkEntryPointsWithRef::codeRef):
(JSC::JITJSCallThunkEntryPointsWithRef::operator=):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileJITEntryNativeCall):
(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileJITEntryNativeCall):
(JSC::JIT::privateCompileCTINativeCall): Deleted.

  • jit/JITOperations.cpp:
  • jit/JITThunks.cpp:

(JSC::JITThunks::jitEntryNativeCall):
(JSC::JITThunks::jitEntryNativeConstruct):
(JSC::JITThunks::jitEntryStub):
(JSC::JITThunks::jitCallThunkEntryStub):
(JSC::JITThunks::hostFunctionStub):
(JSC::JITThunks::ctiNativeCall): Deleted.
(JSC::JITThunks::ctiNativeConstruct): Deleted.

  • jit/JITThunks.h:
  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::emitJumpIfNotInt32):
(JSC::JSInterfaceJIT::emitLoadInt32):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::argumentRegisters):

  • jit/RegisterSet.h:
  • jit/Repatch.cpp:

(JSC::linkSlowFor):
(JSC::revertCall):
(JSC::unlinkFor):
(JSC::linkVirtualFor):
(JSC::linkPolymorphicCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::SpecializedThunkJIT):
(JSC::SpecializedThunkJIT::checkJSStringArgument):
(JSC::SpecializedThunkJIT::linkFailureHere):
(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerator.h:
  • jit/ThunkGenerators.cpp:

(JSC::createRegisterArgumentsSpillEntry):
(JSC::slowPathFor):
(JSC::linkCallThunkGenerator):
(JSC::linkDirectCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::nativeCallGenerator):
(JSC::nativeTailCallGenerator):
(JSC::nativeTailCallWithoutSavedTagsGenerator):
(JSC::nativeConstructGenerator):
(JSC::stringCharLoadRegCall):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::clz32ThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::floorThunkGenerator):
(JSC::ceilThunkGenerator):
(JSC::truncThunkGenerator):
(JSC::roundThunkGenerator):
(JSC::expThunkGenerator):
(JSC::logThunkGenerator):
(JSC::absThunkGenerator):
(JSC::imulThunkGenerator):
(JSC::randomThunkGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):

  • jit/ThunkGenerators.h:
  • jsc.cpp:

(jscmain):

  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setModuleProgramEntrypoint):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::entryOSR):
(JSC::LLInt::setUpCall):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):
(JSC::LLInt::functionForRegisterCallEntryThunkGenerator):
(JSC::LLInt::functionForStackCallEntryThunkGenerator):
(JSC::LLInt::functionForRegisterConstructEntryThunkGenerator):
(JSC::LLInt::functionForStackConstructEntryThunkGenerator):
(JSC::LLInt::functionForRegisterCallArityCheckThunkGenerator):
(JSC::LLInt::functionForStackCallArityCheckThunkGenerator):
(JSC::LLInt::functionForRegisterConstructArityCheckThunkGenerator):
(JSC::LLInt::functionForStackConstructArityCheckThunkGenerator):
(JSC::LLInt::functionForCallEntryThunkGenerator): Deleted.
(JSC::LLInt::functionForConstructEntryThunkGenerator): Deleted.
(JSC::LLInt::functionForCallArityCheckThunkGenerator): Deleted.
(JSC::LLInt::functionForConstructArityCheckThunkGenerator): Deleted.

  • llint/LLIntThunks.h:
  • runtime/ArityCheckMode.h:
  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/ExecutableBase.h:

(JSC::ExecutableBase::entrypointFor):
(JSC::ExecutableBase::offsetOfEntryFor):
(JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor): Deleted.

  • runtime/JSBoundFunction.cpp:

(JSC::boundThisNoArgsFunctionCall):

  • runtime/NativeExecutable.cpp:

(JSC::NativeExecutable::finishCreation):

  • runtime/ScriptExecutable.cpp:

(JSC::ScriptExecutable::installCode):

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::thunkGeneratorForIntrinsic):
(JSC::VM::clearCounters):
(JSC::VM::dumpCounters):

  • runtime/VM.h:

(JSC::VM::getJITEntryStub):
(JSC::VM::getJITCallThunkEntryStub):
(JSC::VM::addressOfCounter):
(JSC::VM::counterFor):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::importStubGenerator):

Source/WTF:

Added a new build option ENABLE_VM_COUNTERS to enable JIT'able counters.
The default is for the option to be off.

  • wtf/Platform.h:

Added ENABLE_VM_COUNTERS

11:12 PM Changeset in webkit [209652] by keith_miller@apple.com
  • 16 edits
    3 adds in trunk

Wasm should support call_indirect
https://bugs.webkit.org/show_bug.cgi?id=165718

Reviewed by Filip Pizlo.

JSTests:

  • wasm/Builder.js:
  • wasm/function-tests/call-indirect-params.js: Added.
  • wasm/function-tests/call-indirect.js: Added.
  • wasm/js-api/call-indirect.js: Added.

(const.wasmModuleWhichImportJS):
(MonomorphicImport):
(Polyphic2Import):
(VirtualImport):

  • wasm/wasm.json:

Source/JavaScriptCore:

This patch adds support for call_indirect. The basic framework for
an indirect call is that the module holds a buffer containing a
stub for each function in the index space. Whenever a function
needs to do an indirect call it gets a index into that table. In
order to ensure call_indirect is calling a valid function the
functionIndexSpace also needs a pointer to a canonicalized
signature. When making an indirect call, we first check the index
is in range, then check the signature matches the value we were given.

This patch also differentiates between FunctionIndexSpaces and
ImmutableFunctionIndexSpaces. Since we don't know the size of the
FunctionIndexSpace when we start parsing we need to be able to
resize the IndexSpace. However, once we have finished parsing all
the sections we want to prevent an relocation of the function
index space pointer.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::addCall):
(JSC::Wasm::B3IRGenerator::addCallIndirect):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::setupCall):

  • wasm/WasmFormat.h:
  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser::setErrorMessage):
(JSC::Wasm::FunctionParser<Context>::FunctionParser):
(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::run):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::takeFunctionIndexSpace):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addCallIndirect):
(JSC::Wasm::validateFunction):

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

(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::signatureForFunctionIndexSpace):
(JSC::JSWebAssemblyModule::offsetOfFunctionIndexSpace):

11:08 PM Changeset in webkit [209651] by jfbastien@apple.com
  • 8 edits
    1 add in trunk

WebAssembly: implement data section
https://bugs.webkit.org/show_bug.cgi?id=165696

Reviewed by Keith Miller.

As specified in https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#data-section
Note that some of the interesting corner cases are ill-defined by the spec: https://github.com/WebAssembly/design/issues/897

JSTests:

  • wasm/Builder.js: create a data section from JavaScript
  • wasm/Builder_WebAssemblyBinary.js: assemble the data section into the proper binary encoding

(const.emitters.Data):

  • wasm/js-api/test_Data.js: Added.

(DataSection):
(DataSectionOffTheEnd):
(DataSectionPartlyOffTheEnd):
(DataSectionEmptyOffTheEnd):
(DataSectionSeenByStart):

  • wasm/self-test/test_BuilderJSON.js: make sure the JSON structure is fine (this sanity checks before going to binary)

Source/JavaScriptCore:

  • wasm/WasmFormat.h: segments are what represent sections of memory to initialize (similar to ELF's non-zero intializer data / rodata)

(JSC::Wasm::Segment::make):
(JSC::Wasm::Segment::destroy):
(JSC::Wasm::Segment::byte):
(JSC::Wasm::Segment::makePtr):

  • wasm/WasmModuleParser.cpp: parse the data section, and prevent a few overflows if a user passes in UINT_MAX (the loops would overflow)

(JSC::Wasm::ModuleParser::parseType):
(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseFunction):
(JSC::Wasm::ModuleParser::parseExport):
(JSC::Wasm::ModuleParser::parseCode):
(JSC::Wasm::ModuleParser::parseData):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::evaluate): the only sensible time to initialize the data section is after linking, but before calling start, I test for this but the spec isn't clear it's correct yet

10:04 PM Changeset in webkit [209650] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

It is okay to turn undefined into null because we are producing values for a
JSON representation (InspectorValue) and JSON has a null value and no
undefined value.
https://bugs.webkit.org/show_bug.cgi?id=165506

Patch by Karim H <karim@karhm.com> on 2016-12-09
Reviewed by Darin Adler.

  • bindings/ScriptValue.cpp:

(Inspector::jsToInspectorValue):

9:56 PM Changeset in webkit [209649] by commit-queue@webkit.org
  • 6 edits in trunk

[Readable Streams API] Implement ReadableByteStreamController desiredSize
https://bugs.webkit.org/show_bug.cgi?id=165599

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-12-09
Reviewed by Darin Adler.

Source/WebCore:

Implemented ReadableByteStreamController attribute desiredSize.

Added test to check desiredSize value.

  • Modules/streams/ReadableByteStreamController.js:

(desiredSize):

  • Modules/streams/ReadableByteStreamInternals.js:

(readableByteStreamControllerGetDesiredSize):

LayoutTests:

Added test to check ReadableByteStreamController desiredSize value.

  • streams/readable-byte-stream-controller-expected.txt: Added expectation for new test.
  • streams/readable-byte-stream-controller.js: Added new test for desiredSize.
9:18 PM Changeset in webkit [209648] by rniwa@webkit.org
  • 11 edits
    4 adds in trunk

document.pointerLockElement exposes a node inside a shadow tree
https://bugs.webkit.org/show_bug.cgi?id=165702

Reviewed by Simon Fraser.

Source/WebCore:

Expose pointerLockElement on ShadowRoot as spec'ed (DocumentOrShadowRoot):
https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin

Use ancestorElementInThisScope to find the correct node in pointerLockElement.

Tests: fast/shadow-dom/pointerlockelement-in-shadow-tree.html

fast/shadow-dom/pointerlockelement-in-slot.html

  • dom/Document.cpp:

(WebCore::Document::pointerLockElement): Moved to TreeScope.

  • dom/Document.h:
  • dom/Document.idl: Moved ointerLockElement to DocumentOrShadowRoot.idl.
  • dom/DocumentOrShadowRoot.idl: Ditto.
  • dom/TreeScope.cpp:

(WebCore::TreeScope::focusedElementInScope): Use documentScope instead of acessing it via m_rootNode.
(WebCore::TreeScope::pointerLockElement): Moved from Document.

  • dom/TreeScope.h:

LayoutTests:

Added tests for pointer locks inside a shadow root as well as one assigned to a slot.

  • fast/shadow-dom/pointerlockelement-in-shadow-tree-expected.txt: Added.
  • fast/shadow-dom/pointerlockelement-in-shadow-tree.html: Added.
  • fast/shadow-dom/pointerlockelement-in-slot-expected.txt: Added.
  • fast/shadow-dom/pointerlockelement-in-slot.html: Added.
  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/ios-simulator/TestExpectations:
8:27 PM Changeset in webkit [209647] by fpizlo@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

REGRESSION (r209554-209571): stress/poly-setter-combo crashing
https://bugs.webkit.org/show_bug.cgi?id=165669

Reviewed by Geoffrey Garen.

We now rely on objects being zero-filled in a bunch of places, not just concurrent GC.
So, we need 32-bit to do it too.

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_new_object):

7:25 PM Changeset in webkit [209646] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit2

WebCore::Timer is not compatible with UIProcess
https://bugs.webkit.org/show_bug.cgi?id=165706
<rdar://problem/29360564>

Reviewed by Andy Estes.

Anders has explained to me (at least twice) that WebCore::Timer must not
be used in UIProcess code. A recent bug fix introduced a WebCore::Timer,
which led to another crash.

This patch switches from WebCore::Timer to WTF::RunLoop::Timer to avoid
the problem.

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

(WebKit::NavigationState::NavigationState):

7:07 PM Changeset in webkit [209645] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests/imported/w3c

Ignore LayoutTests/imported/w3c/web-platform-tests/config.json
https://bugs.webkit.org/show_bug.cgi?id=165685

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-09
Reviewed by Ryosuke Niwa.

  • web-platform-tests/.gitignore:

Ignore generated user-specific config.json file.

6:53 PM Changeset in webkit [209644] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

Add reflected nonce attribute to HTML Link element IDL
https://bugs.webkit.org/show_bug.cgi?id=165709

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add the reflected nonce attribute to the HTML Link element IDL definition
as per the HTML standard <https://html.spec.whatwg.org/multipage/semantics.html#the-link-element> (9 December 2016).

Test: fast/dom/nonce-attribute-reflection.html

  • html/HTMLLinkElement.idl:

LayoutTests:

Add a test to ensure that we reflect the nonce attribute for the HTML link, script,
and style elements.

  • fast/dom/nonce-attribute-reflection-expected.txt: Added.
  • fast/dom/nonce-attribute-reflection.html: Added.
6:46 PM Changeset in webkit [209643] by eric.carlson@apple.com
  • 32 edits in trunk

Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
https://bugs.webkit.org/show_bug.cgi?id=165251

Reviewed by Dean Jackson.

Based on a patch by Dr Alex Gouaillard <Dr Alex Gouaillard>
Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h: Add WebRTC and MediaStream identifiers.

Source/WebCore:

No new tests, covered by existing tests.

  • Modules/mediastream/MediaStreamEvent.idl: Add "EnabledAtRuntime".
  • Modules/mediastream/NavigatorMediaDevices.idl: Ditto.
  • Modules/mediastream/NavigatorUserMedia.idl: Ditto.
  • Modules/mediastream/RTCDTMFToneChangeEvent.idl: Ditto.
  • Modules/mediastream/RTCIceCandidate.idl: Ditto.
  • Modules/mediastream/RTCPeerConnection.idl: Ditto.
  • Modules/mediastream/RTCRtpReceiver.idl: Ditto.
  • Modules/mediastream/RTCRtpSender.idl: Ditto.
  • Modules/mediastream/RTCRtpTransceiver.idl: Ditto.
  • Modules/mediastream/RTCSessionDescription.idl: Ditto.
  • Modules/mediastream/RTCTrackEvent.idl: Ditto.
  • bindings/generic/RuntimeEnabledFeatures.cpp:

(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): Set m_isMediaStreamEnabled in the

constructor instead of in reset() because the later is called by the Internals constructor,
making it impossible to override the runtime flag from WTR or DRT.

(WebCore::RuntimeEnabledFeatures::reset): Don't set m_isMediaStreamEnabled.

  • page/Settings.in: Add peerConnectionEnabled.

Source/WebKit/mac:

  • WebView/WebPreferenceKeysPrivate.h: Add MediaStream and PeerConnection preferences.
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences mediaStreamEnabled]):
(-[WebPreferences setMediaStreamEnabled:]):
(-[WebPreferences peerConnectionEnabled]):
(-[WebPreferences setPeerConnectionEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

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

(WKPreferencesSetPeerConnectionEnabled): Added.
(WKPreferencesGetPeerConnectionEnabled): Added.

  • UIProcess/API/C/WKPreferencesRef.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add WebKitMediaStreamEnabled

and WebKitPeerConnectionEnabled.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences): Initialize the peerConnection preference.

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues): Enable MediaStream and PeerConnection.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting): Ditto.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setMediaStreamEnabled): New.
(WTR::TestRunner::setPeerConnectionEnabled): New.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
6:34 PM Changeset in webkit [209642] by jfbastien@apple.com
  • 12 edits
    1 add in trunk

WebAssembly JS API: implement start function
https://bugs.webkit.org/show_bug.cgi?id=165150

Reviewed by Saam Barati.

JSTests:

  • wasm/Builder.js: allow building a .Start()
  • wasm/Builder_WebAssemblyBinary.js:
  • wasm/js-api/test_Start.js: Added.

(const.emitters.Start): serialize a start section

  • wasm/self-test/test_BuilderJSON.js: validate the start section's content

Source/JavaScriptCore:

  • wasm/WasmFormat.h: pass the start function around
  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseTable): mark unreachable code
(JSC::Wasm::ModuleParser::parseGlobal): mark unreachable code
(JSC::Wasm::ModuleParser::parseStart): mark unreachable code
(JSC::Wasm::ModuleParser::parseElement): mark unreachable code
(JSC::Wasm::ModuleParser::parseData): mark unreachable code

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction): NFC: call the new function below
(JSC::WebAssemblyFunction::call): separate this out so that the start function can use it

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

(JSC::WebAssemblyModuleRecord::visitChildren): visit the start function
(JSC::WebAssemblyModuleRecord::link): handle start function
(JSC::WebAssemblyModuleRecord::evaluate): call the start function, if present

  • wasm/js/WebAssemblyModuleRecord.h:
6:03 PM Changeset in webkit [209641] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove QuickLook scheme from the list of secure schemes
https://bugs.webkit.org/show_bug.cgi?id=165699

Reviewed by Andy Estes.

Following r207155 we use a unique origin for QuickLook documents. Unique origins are not
subject to mixed content restrictions. Prior to r207155 QuickLook documents used the
origin from which they were served. We added the QuickLook scheme to the list of secure
schemes as a workaround to avoid mixed content errors when loading subresources in a
QuickLook document served over HTTPS. Now that we use a unique origin for QuickLook
documents we no longer need this workaround.

  • platform/SchemeRegistry.cpp:

(WebCore::secureSchemes):

5:25 PM Changeset in webkit [209640] by beidson@apple.com
  • 25 edits
    6 copies
    1 add in trunk

Re-landing:
Source/WebCore:

Add _WKIconLoadingDelegate SPI.
https://bugs.webkit.org/show_bug.cgi?id=164894

Reviewed by Alex Christensen.

No new tests (Manual testing possible in MiniBrowser now, WKTR tests coming soon in https://bugs.webkit.org/show_bug.cgi?id=164895).

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::implicitClose):

  • html/LinkIconCollector.cpp:

(WebCore::iconSize):
(WebCore::compareIcons):

  • html/LinkIconCollector.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startIconLoading):
(WebCore::DocumentLoader::didGetLoadDecisionForIcon):
(WebCore::DocumentLoader::finishedLoadingIcon):

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • platform/LinkIcon.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(WebCore::LinkIcon::encode):
(WebCore::LinkIcon::decode):

Source/WebKit2:

Add _WKIconLoadingDelegate SPI.
https://bugs.webkit.org/show_bug.cgi?id=164894

Reviewed by Alex Christensen.

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(API::IconLoadingClient::~IconLoadingClient):
(API::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _iconLoadingDelegate]):
(-[WKWebView _setIconLoadingDelegate:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.

(-[_WKLinkIconParameters _initWithLinkIcon:]):
(-[_WKLinkIconParameters url]):
(-[_WKLinkIconParameters mimeType]):
(-[_WKLinkIconParameters size]):
(-[_WKLinkIconParameters iconType]):

  • UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.mm: Added.

(WebKit::IconLoadingDelegate::IconLoadingDelegate):
(WebKit::IconLoadingDelegate::~IconLoadingDelegate):
(WebKit::IconLoadingDelegate::createIconLoadingClient):
(WebKit::IconLoadingDelegate::delegate):
(WebKit::IconLoadingDelegate::setDelegate):
(WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIconLoadingClient):
(WebKit::WebPageProxy::getLoadDecisionForIcon):
(WebKit::WebPageProxy::finishedLoadingIcon):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::iconLoadingClient):

  • UIProcess/WebPageProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient):
(WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
(WebKit::WebFrameLoaderClient::finishedLoadingIcon):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

(WebKit::WebFrameLoaderClient::setUseIconLoadingClient):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didGetLoadDecisionForIcon):
(WebKit::WebPage::setUseIconLoadingClient):

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

Tools:

Add _WKIconLoadingDelegate SPI.
https://bugs.webkit.org/show_bug.cgi?id=164894

Reviewed by Alex Christensen.

Add MiniBrowser support for this new SPI, configurable with a setting.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController loadsAllSiteIcons]):
(-[SettingsController toggleLoadsAllSiteIcons:]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController webView:shouldLoadIconWithParameters:completionHandler:]):

5:24 PM Changeset in webkit [209639] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Fix initialization of contentUpdateFrequency
https://bugs.webkit.org/show_bug.cgi?id=165705
rdar://problem/29602039

Reviewed by Tim Horton.

The value that controls web content update frequency was not being initialized.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

5:22 PM Changeset in webkit [209638] by fpizlo@apple.com
  • 24 edits in trunk/Source/JavaScriptCore

GC might be forced to look at a nuked object due to ordering of AllocatePropertyStorage, MaterializeNewObject, and PutStructure
https://bugs.webkit.org/show_bug.cgi?id=165672

Reviewed by Geoffrey Garen.

We need to make sure that the shady stuff in a property put happens after the
PutByOffset, since the PutByOffset is the place where we materialize. More generally, we
should strive to not have any fenceposts between Nodes where a GC would be illegal.

This gets us most of the way there by separating NukeStructureAndSetButterfly from
[Re]AllocatePropertyStorage. A transitioning put will now look something like:

GetButterfly
ReallocatePropertyStorage
PutByOffset
NukeStructureAndSetButterfly
PutStructure


Previously the structure would get nuked by ReallocatePropertyStorage, so if we placed
an object materialization just after it (before the PutByOffset) then any GC that
completed at that safepoint would encounter an unresolved visit race due to seeing a
nuked structure. We cannot have nuked structures at safepoints, and this change makes
sure that we don't - at least until someone tries to sink to the PutStructure. We will
eventually have to create a combined SetStructureAndButterfly node, but we don't need it
yet.

This also fixes a goof where the DFG's AllocatePropertyStorage was nulling the structure
instead of nuking it. This could easily have caused many crashes in GC.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handlePutById):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::emitPutByOffset):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileNukeStructureAndSetButterfly):

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • dfg/DFGTypeCheckHoistingPhase.cpp:

(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNukeStructureAndSetButterfly):
(JSC::FTL::DFG::LowerDFGToB3::storageForTransition):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h: Fix a bug - make it possible to turn on concurrent GC optionally again.
4:06 PM Changeset in webkit [209637] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebKit/mac

Don’t expose pointer lock in WebKit1 Objective-C API
https://bugs.webkit.org/show_bug.cgi?id=165692

Reviewed by Simon Fraser.

  • DOM/DOMDocument.mm:

(-[DOMDocument pointerLockElement]): Deleted.
(-[DOMDocument exitPointerLock]): Deleted.

  • DOM/DOMElement.mm:

(-[DOMElement requestPointerLock]): Deleted.

  • DOM/DOMMouseEvent.mm:

(-[DOMMouseEvent movementX]): Deleted.
(-[DOMMouseEvent movementY]): Deleted.

3:37 PM Changeset in webkit [209636] by Chris Dumez
  • 4 edits in trunk/Source/JavaScriptCore

Inline JSCell::toObject()
https://bugs.webkit.org/show_bug.cgi?id=165679

Reviewed by Geoffrey Garen.

Inline JSCell::toObject() as it shows on Speedometer profiles.

  • runtime/JSCell.cpp:

(JSC::JSCell::toObjectSlow):
(JSC::JSCell::toObject): Deleted.

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:

(JSC::JSCell::toObject):

3:30 PM Changeset in webkit [209635] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Once we can send Mach messages again, make sure to send any pending outgoing messages
https://bugs.webkit.org/show_bug.cgi?id=165693

Reviewed by Brady Eidson.

  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::initializeSendSource):

3:22 PM Changeset in webkit [209634] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/debugger/csp-exceptions.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165292

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:05 PM Changeset in webkit [209633] by jiewen_tan@apple.com
  • 19 edits
    3 copies
    21 adds in trunk

[Part 2 of 2] Add support for PKCS8 format while doing SubtleCrypto.importKey/exportKey
https://bugs.webkit.org/show_bug.cgi?id=129978
<rdar://problem/21799829>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:

Source/WebCore:

This is part 2 of Bug 129978. In this patch, it adds the PKCS8 format support for
SubtleCrypto.importKey/exportKey. Currently support algorithms are RSAES-PKCS1-v1_5,
RSASSA-PKCS1-v1_5 and RSA-OAEP.

Tests: crypto/subtle/rsa-import-jwk-key-export-pkcs8-key.html

crypto/subtle/rsa-import-pkcs8-key-export-jwk-key.html
crypto/subtle/rsa-import-pkcs8-key-export-pkcs8-key.html
crypto/subtle/rsa-oaep-generate-export-key-pkcs8.html
crypto/subtle/rsa-oaep-import-pkcs8-key.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8.html
crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-pkcs8.html
crypto/subtle/rsassa-pkcs1-v1_5-import-pkcs8-key.html
crypto/workers/subtle/rsa-export-pkcs8-key.html
crypto/workers/subtle/rsa-import-pkcs8-key.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::toKeyData):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportPkcs8):

  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::importSpki):
(WebCore::CryptoKeyRSA::importPkcs8):
(WebCore::CryptoKeyRSA::exportPkcs8):

LayoutTests:

  • crypto/subtle/import-key-malformed-parameters-expected.txt:
  • crypto/subtle/import-key-malformed-parameters.html:
  • crypto/subtle/rsa-export-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-export-key-malformed-parameters.html:
  • crypto/subtle/rsa-import-jwk-key-export-pkcs8-key-expected.txt: Added.
  • crypto/subtle/rsa-import-jwk-key-export-pkcs8-key.html: Added.
  • crypto/subtle/rsa-import-jwk-key-export-spki-key-expected.txt:
  • crypto/subtle/rsa-import-jwk-key-export-spki-key.html:
  • crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • crypto/subtle/rsa-import-key-malformed-parameters.html:
  • crypto/subtle/rsa-import-pkcs8-key-export-jwk-key-expected.txt: Added.
  • crypto/subtle/rsa-import-pkcs8-key-export-jwk-key.html: Added.
  • crypto/subtle/rsa-import-pkcs8-key-export-pkcs8-key-expected.txt: Added.
  • crypto/subtle/rsa-import-pkcs8-key-export-pkcs8-key.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-pkcs8-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-pkcs8.html: Added.
  • crypto/subtle/rsa-oaep-import-pkcs8-key-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-pkcs8-key.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-pkcs8-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-pkcs8.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-pkcs8-key-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-pkcs8-key.html: Added.
  • crypto/workers/subtle/resources/rsa-export-pkcs8-key.js: Added.
  • crypto/workers/subtle/resources/rsa-import-pkcs8-key.js: Added.
  • crypto/workers/subtle/rsa-export-pkcs8-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-export-pkcs8-key.html: Added.
  • crypto/workers/subtle/rsa-import-pkcs8-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-import-pkcs8-key.html: Added.
2:59 PM Changeset in webkit [209632] by ggaren@apple.com
  • 16 edits in trunk/Source

Deploy OrdinalNumber in JSC::SourceCode
https://bugs.webkit.org/show_bug.cgi?id=165687

Reviewed by Michael Saboff.

Source/JavaScriptCore:

We have a lot of confusion between 1-based and 0-based counting in line
and column numbers. Let's use OrdinalNumber to clear up the confusion.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::link):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::emitExpressionInfo):

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::functionDetails):

  • parser/Lexer.cpp:

(JSC::Lexer<T>::setCode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::Parser):

  • parser/Parser.h:

(JSC::Parser<LexerType>::parse):

  • parser/SourceCode.h:

(JSC::SourceCode::SourceCode):
(JSC::SourceCode::firstLine):
(JSC::SourceCode::startColumn):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/ScriptExecutable.h:

(JSC::ScriptExecutable::firstLine):
(JSC::ScriptExecutable::startColumn):

  • tools/CodeProfile.h:

(JSC::CodeProfile::CodeProfile):

Source/WebCore:

Updated for interface changes.

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateModule):

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::startLine):

Source/WTF:

  • wtf/text/OrdinalNumber.h:

(WTF::OrdinalNumber::operator>): Added a >.

2:43 PM Changeset in webkit [209631] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Frontend should not be resetting TypeProfiler state when switching between ContentViews
https://bugs.webkit.org/show_bug.cgi?id=165648

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-09
Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):
Update all backends when the state changes.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
(WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
Moved this code to when the global Setting (which affects all editors) changes.

2:38 PM Changeset in webkit [209630] by sbarati@apple.com
  • 34 edits
    5 adds
    1 delete in trunk

WebAssembly JS API: implement importing and defining Memory
https://bugs.webkit.org/show_bug.cgi?id=164134

Reviewed by Keith Miller.

JSTests:

  • wasm/Builder.js:

(const._importMemoryContinuation.section):
(const._importMemoryContinuation.assert):
(const._importMemoryContinuation):
(const._exportFunctionContinuation.const): Deleted.
(const._exportFunctionContinuation): Deleted.

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Import):

  • wasm/js-api/test_basic_api.js:

(const.c.in.constructorProperties.switch):

  • wasm/js-api/test_memory.js: Added.

(assert):
(binaryShouldNotParse):
(test):
(test.testMemImportError):

  • wasm/js-api/test_memory_constructor.js: Added.

(assert):
(throw.new.Error):
(testInvalidSize):
(assert.testInvalidInitial):
(testInvalidInitial.testInvalidMaximum):
(testInvalidInitial):
(testInvalidMaximum):

  • wasm/self-test/test_BuilderJSON.js:

Source/JavaScriptCore:

This patch implements the WebAssembly.Memory object. It refactors
the code to now associate a Memory with the instance instead of
the Module.

(functionTestWasmModuleFunctions):

  • runtime/VM.h:
  • shell/CMakeLists.txt:
  • testWasm.cpp: Removed.

This has bitrotted. I'm removing it.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::sizeOfLoadOp):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

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

(JSC::Wasm::ModuleInformation::~ModuleInformation): Deleted.

  • wasm/WasmFormat.h:
  • wasm/WasmMemory.cpp:

(JSC::Wasm::Memory::Memory):

  • wasm/WasmMemory.h:

(JSC::Wasm::Memory::size):
(JSC::Wasm::Memory::initial):
(JSC::Wasm::Memory::maximum):
(JSC::Wasm::Memory::pinnedRegisters): Deleted.

  • wasm/WasmMemoryInformation.cpp: Added.

(JSC::Wasm::MemoryInformation::MemoryInformation):

  • wasm/WasmMemoryInformation.h: Added.

(JSC::Wasm::MemoryInformation::MemoryInformation):
(JSC::Wasm::MemoryInformation::pinnedRegisters):
(JSC::Wasm::MemoryInformation::initial):
(JSC::Wasm::MemoryInformation::maximum):
(JSC::Wasm::MemoryInformation::isImport):
(JSC::Wasm::MemoryInformation::operator bool):

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseImport):
(JSC::Wasm::ModuleParser::parseMemoryHelper):
(JSC::Wasm::ModuleParser::parseMemory):
(JSC::Wasm::ModuleParser::parseExport):

  • wasm/WasmModuleParser.h:
  • wasm/WasmPageCount.h: Added. Implement a new way of describing Wasm

pages and then asking for how many bytes a quantity of pages is. This
class also makes it clear when we're talking about bytes or pages.

(JSC::Wasm::PageCount::PageCount):
(JSC::Wasm::PageCount::bytes):
(JSC::Wasm::PageCount::isValid):
(JSC::Wasm::PageCount::max):
(JSC::Wasm::PageCount::operator bool):
(JSC::Wasm::PageCount::operator<):
(JSC::Wasm::PageCount::operator>):
(JSC::Wasm::PageCount::operator>=):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::run):

  • wasm/WasmPlan.h:

(JSC::Wasm::Plan::memory): Deleted.

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::hasMemory):
(JSC::Wasm::Validate::Validate):
(JSC::Wasm::validateFunction):

  • wasm/WasmValidate.h:
  • wasm/generateWasmValidateInlinesHeader.py:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::visitChildren):

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::memory):
(JSC::JSWebAssemblyInstance::setMemory):
(JSC::JSWebAssemblyInstance::offsetOfImportFunctions):
(JSC::JSWebAssemblyInstance::allocationSize):

  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::create):
(JSC::JSWebAssemblyMemory::JSWebAssemblyMemory):
(JSC::JSWebAssemblyMemory::buffer):
(JSC::JSWebAssemblyMemory::visitChildren):

  • wasm/js/JSWebAssemblyMemory.h:

(JSC::JSWebAssemblyMemory::memory):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

Handle importing and creating of memory according
to the spec. This also does the needed validation
of making sure the memory defined in the module
is compatible with the imported memory.

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):
(JSC::callJSWebAssemblyMemory):

  • wasm/js/WebAssemblyMemoryPrototype.cpp:

(JSC::webAssemblyMemoryProtoFuncBuffer):
(JSC::WebAssemblyMemoryPrototype::create):
(JSC::WebAssemblyMemoryPrototype::finishCreation):

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

(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::link):

2:12 PM Changeset in webkit [209629] by Joseph Pecoraro
  • 27 edits
    10 adds in trunk

Web Inspector: Some resources fetched via Fetch API do not have data
https://bugs.webkit.org/show_bug.cgi?id=165230
<rdar://problem/29449220>

Reviewed by Alex Christensen.

Source/JavaScriptCore:

  • inspector/protocol/Page.json:

Add new Fetch Page.ResourceType.

Source/WebCore:

Tests: http/tests/inspector/network/fetch-response-body.html

http/tests/inspector/network/xhr-response-body.html

  • platform/network/ResourceRequestBase.h:

Distinguish Fetch requests.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::FetchRequest::initializeWith):
Set the requester type as Fetch.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didReceiveResponse):

  • loader/DocumentThreadableLoader.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponseImpl):
(WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didReceiveResourceResponse):
(WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponse):
(WebCore::InspectorInstrumentation::didReceiveXHRResponse): Deleted.

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didReceiveThreadableLoaderResponse):
(WebCore::InspectorNetworkAgent::didFinishXHRLoading):
(WebCore::InspectorNetworkAgent::didReceiveXHRResponse): Deleted.
Add a generic way for a ThreadableLoader load to update the type of a network request.
This will include both XHR and Fetch requests.

  • inspector/InspectorPageAgent.cpp:

(WebCore::hasTextContent):
(WebCore::createXHRTextDecoder):
(WebCore::InspectorPageAgent::resourceTypeJson):
(WebCore::InspectorPageAgent::cachedResourceType):
(WebCore::InspectorPageAgent::createTextDecoder):
(WebCore::textContentForCachedResource):

  • inspector/InspectorPageAgent.h:
  • inspector/NetworkResourcesData.cpp:

(WebCore::createOtherResourceTextDecoder): Deleted.
Share the logic that creates a Text Decoders for XHR with other non-buffered requests
(like Fetch). This moves us to identical behavior for now.

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::isSupportedJSONMIMEType):
(WebCore::MIMETypeRegistry::isTextMIMEType):

  • platform/MIMETypeRegistry.h:

Better detect different JSON content based on MIME Type.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New "Fetch" and "Fetches" localized strings.

  • UserInterface/Models/Resource.js:

(WebInspector.Resource.displayNameForType):

  • UserInterface/Models/ResourceCollection.js:

(WebInspector.ResourceCollection.verifierForType):

  • UserInterface/Views/CollectionContentView.js:

(WebInspector.CollectionContentView):

  • UserInterface/Views/ResourceClusterContentView.js:

(WebInspector.ResourceClusterContentView.prototype.get responseContentView):

  • UserInterface/Views/ResourceTreeElement.js:

(WebInspector.ResourceTreeElement.compareResourceTreeElements):
New ResourceType.Fetch. Behave like XHR in most places.

LayoutTests:

  • http/tests/inspector/network/fetch-response-body-expected.txt: Added.
  • http/tests/inspector/network/fetch-response-body.html: Added.
  • http/tests/inspector/network/resources/data.html: Added.
  • http/tests/inspector/network/resources/data.json: Added.
  • http/tests/inspector/network/resources/data.svg: Added.
  • http/tests/inspector/network/resources/data.txt: Added.
  • http/tests/inspector/network/resources/echo.php: Added.
  • http/tests/inspector/network/xhr-response-body-expected.txt: Added.
  • http/tests/inspector/network/xhr-response-body.html: Added.

Tests for viewing content of XHR and Fetch requested resources
with different kinds of content.

2:06 PM Changeset in webkit [209628] by rniwa@webkit.org
  • 16 edits
    12 adds in trunk

document.webkitFullscreenElement leaks elements inside a shadow tree
https://bugs.webkit.org/show_bug.cgi?id=158471

Reviewed by Chris Dumez.

Source/WebCore:

Fixed the bug by calling the newly added ancestorElementInThisScope in webkitCurrentFullScreenElementForBindings
and webkitFullscreenElementForBinding.

The specification (https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement) uses "the result of
retargeting fullscreen element" and returns null if the result is not in the same tree as the context object.

This is equivalent to the algorithm implemented by ancestorElementInThisScope. Observe that the retargeting
algorithm (https://dom.spec.whatwg.org/#retarget) finds the lowest common tree scope of the retargetee and
the context object. There are two cases to consider.

  1. The context object's tree scope is the lowest common tree scope: In this case, an ancestor shadow host or

the retargetee itself is in this tree scope. It's sufficient traverse every shadow host to find the one that
resides in the same tree scope as the context object. This is precisely what ancestorElementInThisScope does.

  1. The context object's tree scope is not the lowest common tree scope: In this case, the context object is

inside a shadow tree whose ancestor shadow host is in the lowest common tree scope. In this case, retargeting
algorithm finds a node which is not in the same tree as the context object. Thus, the result is null.
ancestorElementInThisScope traveres ancestor shadow hosts and returns null if no shadow host's tree scope
matches that of the context object's tree scope. Thus, it would return null in this case as desired.

Also renamed TreeScope::focusedElement to focusedElementInScope for clarity since Document which inherits
from TreeScope also has a distinct member function named focusedElement called by TreeScope::focusedElement,
and used ancestorElementInThisScope since it uses the same algorithm.

Tests: fast/shadow-dom/activeElement-for-focused-element-in-another-shadow.html

fast/shadow-dom/blur-on-shadow-host-with-focused-shadow-content.html
fast/shadow-dom/fullscreen-in-shadow-fullscreenElement.html
fast/shadow-dom/fullscreen-in-shadow-webkitCurrentFullScreenElement.html
fast/shadow-dom/fullscreen-in-slot-fullscreenElement.html
fast/shadow-dom/fullscreen-in-slot-webkitCurrentFullScreenElement.html

  • dom/Document.cpp:

(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::activeElement):

  • dom/Document.h:

(WebCore::Document::webkitCurrentFullScreenElementForBindings): Added.
(WebCore::Document::webkitFullscreenElementForBindings): Added.

  • dom/Document.idl:
  • dom/Element.cpp:

(WebCore::Element::blur):

  • dom/ShadowRoot.h:

(WebCore::ShadowRoot::activeElement):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::ancestorNodeInThisScope): Renamed from ancestorInThisScope for clarity.
(WebCore::TreeScope::ancestorElementInThisScope):
(WebCore::TreeScope::focusedElementInScope): Renamed from focusedElement to disambiguate it from Document's
focusedElement.

  • dom/TreeScope.h:
  • editing/VisibleSelection.cpp:

(WebCore::adjustPositionForEnd):
(WebCore::adjustPositionForStart):

  • editing/htmlediting.cpp:

(WebCore::comparePositions):
(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):

  • page/DOMSelection.cpp:

(WebCore::selectionShadowAncestor):
(WebCore::DOMSelection::shadowAdjustedNode):
(WebCore::DOMSelection::shadowAdjustedOffset):

  • rendering/HitTestResult.cpp:

(WebCore::HitTestResult::addNodeToRectBasedTestResult): Added a FIXME here since this is clearly wrong for
shadow trees created by author scripts.

Source/WebKit/mac:

Use the API for bindings to avoid exposing nodes inside a shadow tree.

  • DOM/DOMDocument.mm:

(-[DOMDocument webkitCurrentFullScreenElement]):
(-[DOMDocument webkitFullscreenElement]):

LayoutTests:

Added tests for calling webkitFullscreenElement and webkitCurrentFullScreenElement on a fullscreened element
to make sure they return the shadow host instead.

Also added two unrelated test cases for temporal regressions I introduced while working on this patch.

Skip the fullscreen tests on iOS WK2 since eventSender doesn't work there.

  • fast/shadow-dom/activeElement-for-focused-element-in-another-shadow-expected.txt: Added.
  • fast/shadow-dom/activeElement-for-focused-element-in-another-shadow.html: Added.
  • fast/shadow-dom/blur-on-shadow-host-with-focused-shadow-content-expected.txt: Added.
  • fast/shadow-dom/blur-on-shadow-host-with-focused-shadow-content.html: Added.
  • fast/shadow-dom/fullscreen-in-shadow-fullscreenElement-expected.txt: Added.
  • fast/shadow-dom/fullscreen-in-shadow-fullscreenElement.html: Added.
  • fast/shadow-dom/fullscreen-in-shadow-webkitCurrentFullScreenElement-expected.txt: Added.
  • fast/shadow-dom/fullscreen-in-shadow-webkitCurrentFullScreenElement.html: Added.
  • fast/shadow-dom/fullscreen-in-slot-fullscreenElement-expected.txt: Added.
  • fast/shadow-dom/fullscreen-in-slot-fullscreenElement.html: Added.
  • fast/shadow-dom/fullscreen-in-slot-webkitCurrentFullScreenElement-expected.txt: Added.
  • fast/shadow-dom/fullscreen-in-slot-webkitCurrentFullScreenElement.html: Added.
  • platform/ios-simulator-wk2/TestExpectations:
2:04 PM Changeset in webkit [209627] by ggaren@apple.com
  • 27 edits in trunk/Source

TextPosition and OrdinalNumber should be more like idiomatic numbers
https://bugs.webkit.org/show_bug.cgi?id=165678

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Adopt default constructor.

  • API/JSBase.cpp:

(JSEvaluateScript):
(JSCheckScriptSyntax):

  • API/JSObjectRef.cpp:

(JSObjectMakeFunction):

  • API/JSScriptRef.cpp:

(OpaqueJSScript::OpaqueJSScript):

  • jsc.cpp:

(functionCheckModuleSyntax):

  • parser/SourceCode.h:

(JSC::makeSource):

  • parser/SourceProvider.h:

(JSC::StringSourceProvider::create):
(JSC::WebAssemblySourceProvider::WebAssemblySourceProvider):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):

Source/WebCore:

  • bindings/js/CachedScriptSourceProvider.h:

(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):

  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::sourcePosition):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::JSLazyEventListener::JSLazyEventListener):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::eventHandlerPosition):

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::ScriptSourceCode):

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::create):

  • dom/ScriptElement.h:
  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::uninitializedPositionValue1):

  • inspector/InspectorStyleSheet.cpp:

(WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): Adopt
default construtor.

  • xml/XMLErrors.cpp:

(WebCore::XMLErrors::XMLErrors):
(WebCore::XMLErrors::handleError):

  • xml/XMLErrors.h: Use std::optional instead of belowRangePosition()

because in-band signaling is harder to reason about.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::textPosition): Adopt default constructor.

Source/WebKit/win:

Adopt default constructor.

  • Plugins/PluginPackage.cpp:

(WebCore::makeSource):

Source/WTF:

  • wtf/text/TextPosition.h:

(WTF::TextPosition::minimumPosition): Deleted. Just use the default
constructor. Other numbers use their default constructors to mean zero.

Any time you need a comment that says "used as a default value", that's
a pretty good indicator that it should be the default constructor.

2:00 PM Changeset in webkit [209626] by Beth Dakin
  • 6 edits in trunk/Source

Password fields should not show the emoji button in TouchBar
https://bugs.webkit.org/show_bug.cgi?id=165673
-and corresponding-
rdar://problem/29235739

Reviewed by Wenson Hsieh.

Source/WebKit/mac:

This patch adds a new ivar for the password touch bar and password
candidateListTouchBarItem. Since this TouchBar will actually have a different set
of identifiers than the plain text TouchBar, it should just have its own variable.

The candidate list should be the only item for passwords.

  • WebView/WebView.mm:

(-[WebView _passwordTextTouchBarDefaultItemIdentifiers]):

Account for _passwordTextTouchBar.
(-[WebView didChangeAutomaticTextCompletion:]):
(-[WebView setUpTextTouchBar:]):
(-[WebView textTouchBar]):

The empty candidates array is not needed. We can just set @[ ] as the candidates
for the _passwordTextCandidateListTouchBarItem. Safe guards already exist in the
other parts of the code to prevent us from requesting or setting other candidates
when in a password field.
(-[WebView updateTextTouchBar]):

Account for _passwordTextTouchBar.
(-[WebView candidateList]):

  • WebView/WebViewData.h:

Source/WebKit2:

This patch adds a new member variable for the password touch bar and password
candidateListTouchBarItem. Since this TouchBar will actually have a different set
of identifiers than the plain text TouchBar, it should just have its own variable.

  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

Return m_passwordTextCandidateListTouchBarItem when appropriate.
(WebKit::WebViewImpl::candidateListTouchBarItem):

The candidate list should be the only item for passwords.
(WebKit::passwordTextTouchBarDefaultItemIdentifiers):

Account for m_passwordTextTouchBar.
(WebKit::WebViewImpl::updateTouchBarAndRefreshTextBarIdentifiers):
(WebKit::WebViewImpl::setUpTextTouchBar):
(WebKit::WebViewImpl::textTouchBar):

The empty candidates array is not needed. We can just set @[ ] as the candidates
for the m_passwordTextCandidateListTouchBarItem. Safe guards already exist in the
other parts of the code to prevent us from requesting or setting other candidates
when in a password field.
(WebKit::WebViewImpl::updateTextTouchBar):

1:59 PM Changeset in webkit [209625] by Keith Rollin
  • 6 edits in trunk/Source/WebKit2

Fix string specification in print format
https://bugs.webkit.org/show_bug.cgi?id=165650

Reviewed by Alex Christensen.

Change "%{public}s" string specifier to something that can be changed
to "%s" at compile time when the build environment doesn't support the
former.

  • NetworkProcess/capture/NetworkCaptureLogging.h:
  • NetworkProcess/capture/NetworkCaptureManager.cpp:

(WebKit::NetworkCapture::Manager::initialize):
(WebKit::NetworkCapture::Manager::findMatch):
(WebKit::NetworkCapture::Manager::findExactMatch):
(WebKit::NetworkCapture::Manager::findBestFuzzyMatch):
(WebKit::NetworkCapture::Manager::fuzzyMatchURLs):
(WebKit::NetworkCapture::Manager::logPlayedBackResource):
(WebKit::NetworkCapture::Manager::openCacheFile):
(WebKit::NetworkCapture::Manager::getLine):

  • NetworkProcess/capture/NetworkCaptureRecorder.cpp:

(WebKit::NetworkCapture::Recorder::recordRequestSent):
(WebKit::NetworkCapture::Recorder::recordResponseReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectReceived):
(WebKit::NetworkCapture::Recorder::recordRedirectSent):
(WebKit::NetworkCapture::Recorder::writeEvents):

  • NetworkProcess/capture/NetworkCaptureResource.cpp:

(WebKit::NetworkCapture::Resource::url):
(WebKit::NetworkCapture::Resource::EventStream::nextEvent):

  • NetworkProcess/capture/NetworkDataTaskReplay.cpp:

(WebKit::NetworkCapture::NetworkDataTaskReplay::NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::~NetworkDataTaskReplay):
(WebKit::NetworkCapture::NetworkDataTaskReplay::resume):
(WebKit::NetworkCapture::NetworkDataTaskReplay::suspend):
(WebKit::NetworkCapture::NetworkDataTaskReplay::complete):
(WebKit::NetworkCapture::NetworkDataTaskReplay::invalidateAndCancel):
(WebKit::NetworkCapture::NetworkDataTaskReplay::enqueueEventHandler):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRequestSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayResponseReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayRedirectSent):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayDataReceived):
(WebKit::NetworkCapture::NetworkDataTaskReplay::replayFinished):
(WebKit::NetworkCapture::NetworkDataTaskReplay::didReceiveResponse):

12:54 PM Changeset in webkit [209624] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

WebView doesn't become first responder in element fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=165664
rdar://problem/28927252

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-09
Reviewed by Tim Horton.

WebView was being set as the first responder while the contentView was still hidden.
A view can not become first responder while it or its ancestor is hidden.

This change waits until after the contentView is visible to make the web view the first responder.

  • UIProcess/mac/WKFullScreenWindowController.mm:

(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):

11:49 AM Changeset in webkit [209623] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, disable concurrent GC for real.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

11:49 AM Changeset in webkit [209622] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, disable concurrent GC while crashes get investigated.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

11:48 AM Changeset in webkit [209621] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

JSSegmentedVariableObject should keep its state private

Rubber stamped by Michael Saboff.

Its state fields were protected for no reason. They really should be private because
you have to know to obey a particular concurrency protocol when accessing them.

  • runtime/JSSegmentedVariableObject.h:
11:42 AM Changeset in webkit [209620] by Chris Dumez
  • 9 edits in trunk

[Cocoa] Validation message for required checkbox doesn’t conform the the Apple Style Guide
https://bugs.webkit.org/show_bug.cgi?id=165661

Reviewed by Dan Bernstein.

Source/WebCore:

Update validation message as per Apple Style Guide.

  • English.lproj/Localizable.strings:
  • platform/LocalizedStrings.cpp:

(WebCore::validationMessageValueMissingForCheckboxText):

LayoutTests:

Update / rebaseline tests.

  • fast/forms/ios/validation-bubble-dismiss-on-tap-expected.txt:
  • fast/forms/ios/validation-bubble-dismiss-on-tap.html:
  • fast/forms/validation-messages-expected.txt:
  • fast/forms/validation-messages.html:
  • platform/ios-simulator-wk2/fast/forms/validation-messages-expected.txt:
11:41 AM Changeset in webkit [209619] by jiewen_tan@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed, followup after r209598.

  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
11:22 AM Changeset in webkit [209618] by ggaren@apple.com
  • 3 edits
    1 copy in trunk/Source/WTF

Moved OrdinalNumber into its own file
https://bugs.webkit.org/show_bug.cgi?id=165663

Reviewed by Saam Barati.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/text/OrdinalNumber.h: Copied from Source/WTF/wtf/text/TextPosition.h.

(WTF::TextPosition::TextPosition): Deleted.
(WTF::TextPosition::operator==): Deleted.
(WTF::TextPosition::operator!=): Deleted.
(WTF::TextPosition::minimumPosition): Deleted.
(WTF::TextPosition::belowRangePosition): Deleted.

  • wtf/text/TextPosition.h:

(WTF::OrdinalNumber::fromZeroBasedInt): Deleted.
(WTF::OrdinalNumber::fromOneBasedInt): Deleted.
(WTF::OrdinalNumber::OrdinalNumber): Deleted.
(WTF::OrdinalNumber::zeroBasedInt): Deleted.
(WTF::OrdinalNumber::oneBasedInt): Deleted.
(WTF::OrdinalNumber::operator==): Deleted.
(WTF::OrdinalNumber::operator!=): Deleted.
(WTF::OrdinalNumber::first): Deleted.
(WTF::OrdinalNumber::beforeFirst): Deleted.

10:50 AM Changeset in webkit [209617] by Alan Bujtas
  • 3 edits
    2 adds in trunk

ASSERTION FAILED: !beforeChild->isRubyRun() in WebCore::RenderRubyAsBlock::addChild
https://bugs.webkit.org/show_bug.cgi?id=141433
<rdar://problem/27711351>

Reviewed by Dean Jackson.

Source/WebCore:

Do not try to inject the list marker into a block ruby subtree. Have it as the sibling
of the ruby instead (with an anonymous block wrapper ofc).

Test: fast/ruby/assert-with-listitem-and-block-ruby.html

  • rendering/RenderListItem.cpp:

(WebCore::getParentOfFirstLineBox):

LayoutTests:

  • fast/ruby/assert-with-listitem-and-block-ruby-expected.txt: Added.
  • fast/ruby/assert-with-listitem-and-block-ruby.html: Added.
10:29 AM Changeset in webkit [209616] by Ryan Haddad
  • 2 edits in trunk/Tools

Fix the 32-bit build.

Unreviewed build fix.

  • MiniBrowser/mac/SettingsController.h:
10:28 AM Changeset in webkit [209615] by graouts@webkit.org
  • 6 edits
    2 adds in trunk

[Modern Media Controls] Implement the pageScaleFactor property
https://bugs.webkit.org/show_bug.cgi?id=165660

Reviewed by Dean Jackson.

Source/WebCore:

We implement the pageScaleFactor property on MediaController. This property is set
by the HTMLMediaElement when the page scale factor changes, and we only choose to handle
it on iOS by setting controlsDependOnPageScaleFactor to true on the MediaControlsHost.

To do so, we now size the media controls by multiplying the layout size of the media by
the page scale factor, and apply an inverse CSS zoom on the media controls themselves.

Test: media/modern-media-controls/media-controller/media-controller-scale-factor.html

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls-container,):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.get scaleFactor):
(MediaControls.prototype.set scaleFactor):
(MediaControls.prototype.commitProperty):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.set pageScaleFactor):
(MediaController.prototype._updateControlsSize):

  • html/HTMLMediaElement.cpp:

(WebCore::controllerJSValue):
(WebCore::HTMLMediaElement::setControllerJSProperty):

We no longer hit a JSC assertion when trying to set the pageScaleFactor property before
the JS controller was actually created.

LayoutTests:

Add a new test to check that we correctly zoom and size the media controls when the page
scale factor is a value other than 1.

  • media/modern-media-controls/media-controller/media-controller-scale-factor-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-scale-factor.html: Added.
10:27 AM Changeset in webkit [209614] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix the Mac CMake build following <http://trac.webkit.org/changeset/209549>
(https://bugs.webkit.org/show_bug.cgi?id=165572)

Add directory html/canvas to the list of forwarding headers directories so that
the Legacy WebKit Objective-C DOM binding DOMHTMLCanvasElement.mm can ultimately
include header WebGLContextAttributes.h.

  • PlatformMac.cmake:
10:21 AM Changeset in webkit [209613] by beidson@apple.com
  • 4 edits
    1 copy in trunk/Source/WebCore

LinkIconCollector refactoring.
https://bugs.webkit.org/show_bug.cgi?id=165657

Reviewed by Dean Jackson.

No new tests (Refactor, no behavior change)

  • WebCore.xcodeproj/project.pbxproj:
  • html/LinkIconCollector.cpp:

(WebCore::iconSize):
(WebCore::compareIcons):

  • html/LinkIconCollector.h:
  • platform/LinkIcon.h: Move outside of LinkIconCollector for future expandability.
10:12 AM Changeset in webkit [209612] by Ryan Haddad
  • 17 edits
    1 add
    1 delete in trunk

Unreviewed, rolling out r209574.

This change broke the Windows build.

Reverted changeset:

"[WebIDL] Remove custom bindings for Geolocation"
https://bugs.webkit.org/show_bug.cgi?id=165625
http://trac.webkit.org/changeset/209574

9:57 AM Changeset in webkit [209611] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk

Fedora also needs a PHP7 config file alternative
https://bugs.webkit.org/show_bug.cgi?id=165606

Patch by Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> on 2016-12-09
Reviewed by Michael Catanzaro.

Tools:

  • Scripts/webkitpy/port/base.py:

(Port._is_fedora_php_version_7): check for the php7 library.
(Port._fedora_php_version): get the appropriate filename for Fedora.
(Port._apache_config_file_name_for_platform):

LayoutTests:

  • http/conf/fedora-httpd-2.4-php7.conf: Added.
9:54 AM Changeset in webkit [209610] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Custom Elements from a different document are not customized when created with innerHTML
https://bugs.webkit.org/show_bug.cgi?id=165617

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by a superflous null check on window in createHTMLElementOrFindCustomElementInterface.
Removed the nullcheck to fix the bug.

Test: fast/custom-elements/adopting-from-frameless-document.html

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):

LayoutTests:

Added a W3C style testharness.js test.

  • fast/custom-elements/adopting-from-frameless-document-expected.txt: Added.
  • fast/custom-elements/adopting-from-frameless-document.html: Added.
9:45 AM Changeset in webkit [209609] by Ryan Haddad
  • 4 edits in trunk/Tools

Complete the revert of r208865.
https://bugs.webkit.org/show_bug.cgi?id=164894

Unreviewed build fix.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController loadsAllSiteIcons]): Deleted.
(-[SettingsController toggleLoadsAllSiteIcons:]): Deleted.

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController webView:shouldLoadIconWithParameters:completionHandler:]): Deleted.

9:27 AM Changeset in webkit [209608] by dbates@webkit.org
  • 7 edits
    2 adds in trunk

[CSP] Policy of window opener not applied to about:blank window
https://bugs.webkit.org/show_bug.cgi?id=165531
<rdar://problem/29426639>

Reviewed by Brent Fulgham.

Source/WebCore:

Fixes an issue where the content security policy of the opener document was not applied to
an about:blank window.

An about:blank window inherits its security origin from its opener document. It should also
copy (inherit) the ContentSecurityPolicy from its opener document. When copying the ContentSecurityPolicy
state from the opener document to the about:blank document we must take care to avoid copying
any upgrade-insecure-request directive because new windows should not inherit it by definition.
With respect to upgrade-insecure-requests, new windows should only inherit the insecure navigation set
from their opener document.

Test: http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window.html

  • dom/Document.cpp:

(WebCore::Document::initContentSecurityPolicy): Copy the ContentSecurityPolicy state from the
owner document to this document when it inherits its security origin from its owner. An about:blank
window is one example of a document that inherits its security origin from its owner.

  • loader/WorkerThreadableLoader.cpp:

(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy the upgrade insecure requests state from the owner document to the worker now that
ContentSecurityPolicy::copyStateFrom() no longer does this.

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::copyStateFrom): Do not copy the upgrade insecure request state.
Callers are now responsible for calling ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy this state.

  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::parse): Ignore directive upgrade-insecure-requests when
inheriting ContentSecurityPolicy state as this directive as the Upgrade Insecure Requests feature has
its own inheritance semantics that differ from the semantics of copying a ContentSecurityPolicy object.

  • xml/XSLTProcessor.cpp:

(WebCore::XSLTProcessor::createDocumentFromSource): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
to copy the upgrade insecure requests state from the original document to the transformed document now
that ContentSecurityPolicy::copyStateFrom() no longer does this.

LayoutTests:

Add a test to ensure that an about:blank window inherits the CSP policy of its
opener document.

  • http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window-blocked.html: Added.
7:31 AM Changeset in webkit [209607] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Remaining time label first appears way to the left
https://bugs.webkit.org/show_bug.cgi?id=165637

Reviewed by Dean Jackson.

Source/WebCore:

We would sometimes see the remaining time label be laid out in an incorrect position
when a video would start playing. This happened because the time label was being committed
from a previous value before, in the same frame, we would call the layout() function
of MacOSInlineMediaControls. This would set the newly computed location for the
remaining time label, but because we would reset the list of dirty properties after
calling all layout functions, the new value set in MacOSInlineMediaControls.layout()
would be disregarded and the wrong, committed value would persist until it was reset
in a much later frame.

We now correctly clear the list of dirty nodes before laying them out, giving all nodes
a chance to become dirty again during layout, and updated again in the next frame.

Test: media/modern-media-controls/layout-node/node-made-dirty-during-layout.html

  • Modules/modern-media-controls/controls/layout-node.js:

(performScheduledLayout):

LayoutTests:

Add a new test that checks that marking a property as dirty during a layout correctly commits
that property on the next frame.

  • media/modern-media-controls/layout-node/node-made-dirty-during-layout-expected.txt: Added.
  • media/modern-media-controls/layout-node/node-made-dirty-during-layout.html: Added.
7:30 AM Changeset in webkit [209606] by Gustavo Noronha Silva
  • 2 edits in trunk/Tools

[GTK] Force GDK backend to x11 when running with XvfbDriver
https://bugs.webkit.org/show_bug.cgi?id=165612

Reviewed by Michael Catanzaro.

When the developer is running a Wayland session, GDK may get confused
and try to use its Wayland backend (which is higher priority) instead.
This ensures it will use the appropriate backend when running under
Xvfb.

  • Scripts/webkitpy/port/gtk.py:

(GtkPort.setup_environ_for_server): when running with XvfbDriver,
force GDK_BACKEND to x11.

7:23 AM Changeset in webkit [209605] by Gustavo Noronha Silva
  • 2 edits in trunk/Source/WebKit2

Unreviewed build fix. Thanks to Konstantin Tokarev and Csaba Osztrogonác
for pointing out the fix.

  • CMakeLists.txt: add WebCore/html/canvas to include paths.
6:05 AM Changeset in webkit [209604] by Gustavo Noronha Silva
  • 4 edits in trunk/Source/WebKit2

[GTK] Fix build after r209558
https://bugs.webkit.org/show_bug.cgi?id=165653

Unreviewed build fix.

  • UIProcess/API/APIPolicyClient.h: include WebsitePolicies.h.
  • UIProcess/API/gtk/WebKitPolicyClient.cpp: ditto.
  • UIProcess/API/gtk/WebKitPolicyDecision.cpp:

(webkit_policy_decision_use): pass empty structure to new required argument.

3:13 AM Changeset in webkit [209603] by pvollan@apple.com
  • 4 edits in trunk/Source/WebCore

Fix compile errors on Windows when building with .proj files.

Unreviewed build fix.

Fix include paths.

  • platform/graphics/win/IntPointWin.cpp:
  • platform/graphics/win/IntRectWin.cpp:
  • platform/graphics/win/IntSizeWin.cpp:
2:50 AM Changeset in webkit [209602] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Unreviewed buildfix after r209570.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

2:32 AM Changeset in webkit [209601] by svillar@igalia.com
  • 3 edits in trunk/Source/WebCore

[css-grid] Pass Grid as argument to items' placement methods
https://bugs.webkit.org/show_bug.cgi?id=165250

Reviewed by Darin Adler.

In order to constify computeIntrinsicLogicalWidths() it is required to constify
placeItemsOnGrid() first, which is the base method of the grid items' positioning logic. The
first step is to constify all the methods invoked by the latter, which basically means to
pass the Grid as argument to all of them instead of directly using the m_grid attribute from
RenderGrid. As this is an intermediate step, a new const_cast<> was required in the
intrinsic size computation. However it will be promptly removed after the const-ification of
placeItemsOnGrid().

After this, only the methods used by the track sizing algorithm will directly access
m_grid. All those would get a reference to the Grid via GridSizingData, but that's a matter
of a follow up patch.

Apart from that, m_gridIsDirty was removed because it was always too confusing. It was
replaced by Grid's m_needsItemsPlacement which is much more concise. The clearGrid() call
was indeed only forcing a new placement of the grid items.

No new tests as this is a refactoring.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::Grid::setNeedsItemsPlacement): New method to flag the Grid whenever
grid items' placement algorithm needs to be run.
(WebCore::RenderGrid::canPerformSimplifiedLayout):
(WebCore::RenderGrid::layoutBlock):
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Constified. Got Grid as
argument.
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid): Ditto.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Ditto.
(WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Ditto.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
(WebCore::RenderGrid::clearGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::numTracks):

  • rendering/RenderGrid.h:
1:50 AM Changeset in webkit [209600] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed ARM buildfix after 209570.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::or32): Added.

12:08 AM Changeset in webkit [209599] by barraclough@apple.com
  • 23 edits
    8 deletes in trunk/Source

Revert - Add _WKIconLoadingDelegate SPI
https://bugs.webkit.org/show_bug.cgi?id=164894

Unreviewed rollout due to performance regression.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::implicitClose):

  • html/LinkIconCollector.cpp:

(WebCore::iconSize):
(WebCore::compareIcons):

  • html/LinkIconCollector.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startIconLoading): Deleted.
(WebCore::DocumentLoader::didGetLoadDecisionForIcon): Deleted.
(WebCore::DocumentLoader::finishedLoadingIcon): Deleted.

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • platform/LinkIcon.h: Removed.

Source/WebKit2:

  • PlatformMac.cmake:
  • UIProcess/API/APIIconLoadingClient.h: Removed.
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _iconLoadingDelegate]): Deleted.
(-[WKWebView _setIconLoadingDelegate:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Removed.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.h: Removed.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Removed.
  • UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Removed.
  • UIProcess/Cocoa/IconLoadingDelegate.h: Removed.
  • UIProcess/Cocoa/IconLoadingDelegate.mm: Removed.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIconLoadingClient): Deleted.
(WebKit::WebPageProxy::getLoadDecisionForIcon): Deleted.
(WebKit::WebPageProxy::finishedLoadingIcon): Deleted.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::iconLoadingClient): Deleted.

  • UIProcess/WebPageProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.
(WebKit::WebFrameLoaderClient::getLoadDecisionForIcon): Deleted.
(WebKit::WebFrameLoaderClient::finishedLoadingIcon): Deleted.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

(WebKit::WebFrameLoaderClient::setUseIconLoadingClient): Deleted.
(): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didGetLoadDecisionForIcon): Deleted.
(WebKit::WebPage::setUseIconLoadingClient): Deleted.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
Note: See TracTimeline for information about the timeline view.