Timeline



Dec 3, 2016:

4:28 PM Changeset in webkit [209309] by Yusuke Suzuki
  • 14 edits
    1 copy in trunk

Refactor SymbolImpl layout
https://bugs.webkit.org/show_bug.cgi?id=165247

Reviewed by Darin Adler.

Source/JavaScriptCore:

Use SymbolImpl::{create, createNullSymbol} instead.

  • runtime/PrivateName.h:

(JSC::PrivateName::PrivateName):

Source/WTF:

This patch moves SymbolImpl initialization from StringImpl to SymbolImpl.
In SymbolImpl, we create the appropriate fields. At that time, these fields
should be aligned to the BufferSubstring StringImpl.

And we newly create the m_flags in SymbolImpl. Instead of using special
StringImpl::null(), we store s_flagIsNullSymbol flag here. In WTF, we have
the invariant that StringImpl::empty() is the only atomic empty string.
But StringImpl::null() breaks this invariant. Using a special flag is safer
way to represent the null Symbol Symbol().

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/StdLibExtras.h:

(WTF::roundUpToMultipleOfImpl0):
(WTF::roundUpToMultipleOfImpl):
(WTF::roundUpToMultipleOf):

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createSymbol): Deleted.
(WTF::StringImpl::createNullSymbol): Deleted.

  • wtf/text/StringImpl.h:

(WTF::StringImpl::isAtomic):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::isNullSymbol): Deleted.
(WTF::StringImpl::symbolAwareHash): Deleted.
(WTF::StringImpl::existingSymbolAwareHash): Deleted.
(WTF::StringImpl::null): Deleted.
(WTF::StringImpl::extractFoldedStringInSymbol): Deleted.
(WTF::StringImpl::symbolRegistry): Deleted.
(WTF::StringImpl::hashForSymbol): Deleted.

  • wtf/text/StringStatics.cpp:

(WTF::StringImpl::nextHashForSymbol): Deleted.

  • wtf/text/SymbolImpl.cpp: Copied from Source/WTF/wtf/text/SymbolRegistry.cpp.

(WTF::SymbolImpl::nextHashForSymbol):
(WTF::SymbolImpl::create):
(WTF::SymbolImpl::createNullSymbol):

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::symbolRegistry):
(WTF::SymbolImpl::isNullSymbol):
(WTF::SymbolImpl::extractFoldedString):
(WTF::SymbolImpl::SymbolImpl):
(WTF::StringImpl::symbolAwareHash):
(WTF::StringImpl::existingSymbolAwareHash):

  • wtf/text/SymbolRegistry.cpp:

(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):

  • wtf/text/UniquedStringImpl.h:

(WTF::UniquedStringImpl::UniquedStringImpl):

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

4:11 PM Changeset in webkit [209308] by mitz@apple.com
  • 2 edits in trunk/Tools

Fixed the build after r209307.

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:

(TEST):

3:49 PM Changeset in webkit [209307] by mitz@apple.com
  • 19 edits
    8 adds in trunk

[Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=165276
<rdar://problem/29467040>

Reviewed by Darin Adler.

Source/WebCore:

  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::write): Make sure to put the client data on the pasteboard,

like we do on macOS.

Source/WebKit2:

Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm

  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.

  • WebKit2.xcodeproj/project.pbxproj: Added references to new files, making WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.
  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class based on InjectedBundlePageEditorClient.

(API::InjectedBundle::EditorClient::~EditorClient):
(API::InjectedBundle::EditorClient::shouldBeginEditing):
(API::InjectedBundle::EditorClient::shouldEndEditing):
(API::InjectedBundle::EditorClient::shouldInsertNode):
(API::InjectedBundle::EditorClient::shouldInsertText):
(API::InjectedBundle::EditorClient::shouldDeleteRange):
(API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
(API::InjectedBundle::EditorClient::shouldApplyStyle):
(API::InjectedBundle::EditorClient::didBeginEditing):
(API::InjectedBundle::EditorClient::didEndEditing):
(API::InjectedBundle::EditorClient::didChange):
(API::InjectedBundle::EditorClient::didChangeSelection):
(API::InjectedBundle::EditorClient::willWriteToPasteboard):
(API::InjectedBundle::EditorClient::getPasteboardDataForRange):
(API::InjectedBundle::EditorClient::didWriteToPasteboard):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares the new delegate protocol, currently comprising three methods corresponding to willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:

(-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for

the specified range handle.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.

(-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
(+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an

InjectedBundleRangeHandle for the specified object.

(-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
(-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
(-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.

(WebKit::wrapper):

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEditorClient): Updated for WebPage change.

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

(-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the

delegate.

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a

Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
delegate methods. Instantiates a Client and sets it on the WebPage.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h: Declared new _editingDelegate property.
  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:

(WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle

for the range’s owner document.

  • WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls

initialize().

(WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
(WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
(WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
(WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from API::InjectedBundle::EditorClient.
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::shouldDeleteRange): Ditto.
(WebKit::WebEditorClient::shouldBeginEditing): Ditto.
(WebKit::WebEditorClient::shouldEndEditing): Ditto.
(WebKit::WebEditorClient::shouldInsertNode): Ditto.
(WebKit::WebEditorClient::shouldInsertText): Ditto.
(WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::WebEditorClient::shouldApplyStyle): Ditto.
(WebKit::WebEditorClient::didBeginEditing): Ditto.
(WebKit::WebEditorClient::respondToChangedContents): Ditto.
(WebKit::WebEditorClient::respondToChangedSelection): Ditto.
(WebKit::WebEditorClient::didEndEditing): Ditto.
(WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Initialize m_editorClient.
(WebKit::WebPage::setInjectedBundleEditorClient): Replaces

initializeInjectedBundleEditorClient and just sets m_editorClient.

(WebKit::WebPage::close): Resets m_editorClient.

  • WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm: Added.

(-[BundleEditingDelegateRemoteObject willWriteToPasteboard:]):
(-[BundleEditingDelegateRemoteObject didWriteToPasteboard]):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm: Added.

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:willWriteRangeToPasteboard:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:pasteboardDataForRange:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextControllerDidWriteToPasteboard:]):

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegateProtocol.h: Added.
2:58 PM Changeset in webkit [209306] by jfbastien@apple.com
  • 22 edits in trunk

WebAssembly: update binary format to 0xD version
https://bugs.webkit.org/show_bug.cgi?id=165345

Reviewed by Keith Miller.

As described in the following PR: https://github.com/WebAssembly/design/pull/836
Originally committed in r209175, reverted in r209242, and fixed in r209284.

JSTests:

  • wasm/Builder.js:

(const._normalizeFunctionSignature):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Code):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.block_type):
(export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.

  • wasm/WASM.js:
  • wasm/js-api/test_basic_api.js:
  • wasm/self-test/test_BuilderWebAssembly.js:

(EmptyModule):
(CustomSection):

  • wasm/self-test/test_WASM.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::marshallArgument):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::toString): Deleted.

  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::toB3Type): Deleted.

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):

  • wasm/WasmModuleParser.h:
  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseResultType):

  • wasm/generateWasm.py:

(Wasm.init):

  • wasm/generateWasmOpsHeader.py:

(cppMacro):
(typeMacroizer):
(opcodeMacroizer):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/wasm.json:
1:43 PM Changeset in webkit [209305] by hyatt@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests

[CSS Parser] Remove Inspector test of Bison errors
https://bugs.webkit.org/show_bug.cgi?id=165362

Reviewed by Simon Fraser.

The old parser logs invalid property declaration errors whenever a Bison error
occurs. This catches only a fraction of declaration errors,
since Bison accepts practically everything and leaves it up to the specific
parser functions to determine validity of a property.

The new parser does not have this error reporting. The old reporting will be
removed from CSSParser when the new parser turns on. This patch removes the
test of Bison errors.

  • inspector/console/css-source-locations-expected.txt: Removed.
  • inspector/console/css-source-locations.html: Removed.
1:22 PM Changeset in webkit [209304] by hyatt@apple.com
  • 12 edits in trunk/Source/WebCore

[CSS Parser] Remove line numbers from StyleRule.
https://bugs.webkit.org/show_bug.cgi?id=165361

Reviewed by Simon Fraser.

StyleRules have a concept of a source line that is eventually passed
to the inspector. This was only ever used by normal rules, i.e., ones with
selectors, and set to 0 for all other rules. This line was set to the line number
at which the end of the selector text occurred.

Because Inspector already computes the start and end range for the selector
text, storing a source line on StyleRule ends up being redundant. This patch
gets rid of the source line and uses the end line of the selector text
instead.

  • css/CSSGrammar.y.in:

Remove the code that updates the last seen selector line.

  • css/CSSKeyframeRule.cpp:

(WebCore::StyleKeyframe::StyleKeyframe):

  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
No longer need to pass in a 0 line number.

  • css/StyleRule.cpp:

(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):

  • css/StyleRule.h:

(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRuleBase::sourceLine): Deleted.

  • css/StyleRuleImport.cpp:

(WebCore::StyleRuleImport::StyleRuleImport):
Remove m_sourceLine and change the create methods and constructors to not
require a line number.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::createStyleRule):
Line number no longer needed.

(WebCore::CSSParser::updateLastSelectorLineAndPosition): Deleted.

  • css/parser/CSSParser.h:

Got rid of the function that tracks and updates the last seen selector line.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::consumeStyleRule):
Fix the rule creation in the new parser to not pass in a 0 line number.

  • inspector/InspectorStyleSheet.cpp:

(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):

  • inspector/InspectorStyleSheet.h:

Patch the methods that build up the selector range to return the end line
information for selector text so that it can be set as the source line
for the rule (thus eliminating the need to store the line number on the style
rule itself).

12:22 PM Changeset in webkit [209303] by weinig@apple.com
  • 42 edits
    2 deletes in trunk

optional sequence values not handled correctly by binding generator
https://bugs.webkit.org/show_bug.cgi?id=142562

Source/WebCore:

Also fixes:

Remove non-standard postMessage overload
https://bugs.webkit.org/show_bug.cgi?id=161911

and

Wrong argument order in window.postMessage
https://bugs.webkit.org/show_bug.cgi?id=63141

Reviewed by Darin Adler.

  • WebCore.xcodeproj/project.pbxproj:

Remove no longer needed files.

  • bindings/generic/IDLTypes.h:
  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLObject>::convert):
Add support for the WebIDL object type.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::createDOMException):
Add support for throwing stack overflow errors.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::handlePostMessage): Deleted.
(WebCore::JSDOMWindow::postMessage): Deleted.

  • bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Removed.
  • bindings/js/JSMessagePortCustom.cpp:

(WebCore::JSMessagePort::postMessage): Deleted.
(WebCore::extractTransferables): Deleted.

  • bindings/js/JSMessagePortCustom.h: Removed.
  • bindings/js/JSWorkerCustom.cpp:

(WebCore::JSWorker::postMessage): Deleted.
Remove custom bindings for postMessage.

  • bindings/js/SerializedScriptValue.h:

Switch to using enum class.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
Add new create function that takes the transfer list, processes it, and returns
MessagePorts and SerializedScriptValue / exception.

(WebCore::CloneBase::throwStackOverflow): Deleted.
(WebCore::CloneDeserializer::throwValidationError): Deleted.
Remove uncalled functions.

  • bindings/scripts/CodeGenerator.pm:

(IsRefPtrType):
(IsBuiltinType):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
(GetBaseIDLType):
Add support for the WebIDL 'object' type.

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

Add tests for 'object'.

  • dom/ExceptionCode.h:

Add two new ExceptionCodes:

  • ExistingExceptionError, to indicate that implementation code threw a JS exception.
  • StackOverflowError, to indicate that a stack overflow exception should be thrown.
  • dom/MessagePort.cpp:

(WebCore::MessagePort::postMessage):

  • dom/MessagePort.h:
  • dom/MessagePort.idl:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::postMessage):

  • page/DOMWindow.h:
  • page/DOMWindow.idl:
  • workers/DedicatedWorkerGlobalScope.cpp:

(WebCore::DedicatedWorkerGlobalScope::postMessage):

  • workers/DedicatedWorkerGlobalScope.h:
  • workers/DedicatedWorkerGlobalScope.idl:
  • workers/Worker.cpp:

(WebCore::Worker::postMessage):

  • workers/Worker.h:
  • workers/Worker.idl:

Update to call new SerializedScriptValue create function.

LayoutTests:

Reviewed by Darin Adler.

  • fast/canvas/webgl/resources/typed-array-worker.js:
  • fast/dom/Window/window-postmessage-args-expected.txt:
  • fast/dom/Window/window-postmessage-args.html:
  • fast/events/message-port-deleted-document.html:
  • fast/events/message-port-deleted-frame.html:
  • fast/events/message-port-inactive-document.html:
  • fast/events/message-port-multi-expected.txt:
  • fast/events/message-port.html:
  • fast/workers/worker-context-multi-port-expected.txt:
  • fast/workers/worker-multi-port-expected.txt:
  • webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
  • webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:

Update for new exceptions and stricter enforcement of the postMessage signature.

11:56 AM Changeset in webkit [209302] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Support Dashboard Regions
https://bugs.webkit.org/show_bug.cgi?id=165357

Reviewed by Daniel Bates.

  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWebkitDashboardRegion):
(WebCore::CSSPropertyParser::parseSingleValue):

11:05 AM Changeset in webkit [209301] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead

of a Double in B3.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.

  • wasm/wasm.json:
10:41 AM Changeset in webkit [209300] by commit-queue@webkit.org
  • 6 edits
    1 delete in trunk

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

broke the build (Requested by smfr on #webkit).

Reverted changeset:

"Add Wasm copysign"
https://bugs.webkit.org/show_bug.cgi?id=165355
http://trac.webkit.org/changeset/209298

10:33 AM Changeset in webkit [209299] by Simon Fraser
  • 21 edits
    6 adds in trunk

Improve the behavior of scroll-into-view when the target is inside position:fixed
https://bugs.webkit.org/show_bug.cgi?id=165354

Reviewed by Zalan Bujtas.
Source/WebCore:

The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
target was inside position:fixed, resulting in unwanted scrolls.

Fix this by plumbing through from the call sites a "insideFixed" flag which we get
when we call localToAbsolute(), and use this flag to avoid scrolling at all if
unzoomed.

If zoomed and we're focussing something inside position:fixed, and if visual viewports
are enabled, we can compute the visual viewport required to reveal the target rect,
which gives us the ideal scroll position.

Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
frameView.visibleContentRect() gives an unscaled rect on those platforms.

Not all callers of scrollRectToVisible() are fixed, but those that are not will get
the current behavior.

Tests: fast/overflow/scroll-anchor-in-position-fixed.html

fast/visual-viewport/zoomed-scroll-into-view-fixed.html
fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html

  • dom/Element.cpp:

(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::updateFocusAppearance):

  • editing/FrameSelection.cpp:

(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::revealSelection):

  • editing/FrameSelection.h:
  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::absoluteCaretBounds):

  • editing/VisiblePosition.h:
  • editing/htmlediting.cpp:

(WebCore::absoluteBoundsForLocalCaretRect):

  • editing/htmlediting.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):

  • page/PrintContext.cpp:

(WebCore::PrintContext::outputLinkedDestinations):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getLeadingCorner):
(WebCore::RenderElement::getTrailingCorner):
(WebCore::RenderElement::absoluteAnchorRect):
(WebCore::RenderElement::anchorRect): Renamed to absoluteAnchorRect().

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

(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::autoscroll):

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

(WebCore::RenderObject::scrollRectToVisible):

  • rendering/RenderObject.h:

Source/WebKit/mac:

Plumb through 'insideFixed'. We don't get compute it, so behavior from
these call sites won't change.

  • WebView/WebFrame.mm:

(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):

LayoutTests:

  • fast/overflow/scroll-anchor-in-position-fixed-expected.txt: Added.
  • fast/overflow/scroll-anchor-in-position-fixed.html: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed-expected.txt: Added.
  • fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html: Added.
  • platform/ios-simulator/TestExpectations:
9:37 AM Changeset in webkit [209298] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/copysign.js: Added.

Source/JavaScriptCore:

This patch also makes two other important changes:

1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead

of a Double in B3.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.

  • wasm/wasm.json:
8:36 AM Changeset in webkit [209297] by Simon Fraser
  • 6 edits
    2 adds in trunk

localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
https://bugs.webkit.org/show_bug.cgi?id=165244

Reviewed by Zalan Bujtas.

Source/WebCore:

RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
elements.

They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
and "absolute to local" applied the scroll position and then the transform.

However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
adjustment first before the transform, and "absolute to local" the reverse.

In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.

[Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]

RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
gets a similar fix.

Test: fast/zooming/client-rect-in-fixed-zoomed.html

  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::mapToContainer):

  • rendering/RenderView.cpp:

(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):

LayoutTests:

Test getBoundingClientRect() (which internally calls localToAbsolute())
for an element inside position:fixed after zooming.

  • fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
  • fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
  • fast/zooming/client-rect-in-fixed-zoomed.html: Added.
  • platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.

Dec 2, 2016:

11:28 PM Changeset in webkit [209296] by keith_miller@apple.com
  • 4 edits in trunk

Unreviewed, fix git having a breakdown over trying to reland a rollout.

10:40 PM Changeset in webkit [209295] by keith_miller@apple.com
  • 5 edits
    2 adds in trunk

[JSC] add additional bit to JSTokenType bitfield
https://bugs.webkit.org/show_bug.cgi?id=165091

Patch by Caitlin Potter <caitp@igalia.com> on 2016-12-02
Reviewed by Geoffrey Garen.

JSTests:

  • stress/bug-165091.js: Added.

(shouldThrowSyntaxError):

Source/JavaScriptCore:

Avoid overflow which causes keyword tokens to be treated as unary
tokens now that "async" is tokenized as a keyword, by granting an
additional 64 bits to be occupied by token IDs.

  • parser/ParserTokens.h:
7:58 PM Changeset in webkit [209294] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebKit2

[iOS] Add a WebView private configuration for changing the WebContent update frequency
https://bugs.webkit.org/show_bug.cgi?id=165289
<rdar://problem/29472577>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-12-02
Reviewed by Tim Horton.

Expose a preference which allows us to control the fps of web content updates.

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::contentUpdateFrequency):
(API::PageConfiguration::setContentUpdateFrequency):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _contentUpdateFrequency]):
(-[WKWebViewConfiguration _setContentUpdateFrequency:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(-[WKOneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::contentUpdateFrequency):

7:39 PM Changeset in webkit [209293] by caitp@igalia.com
  • 3 edits
    1 add in trunk

[JSC] add additional bit to JSTokenType bitfield
https://bugs.webkit.org/show_bug.cgi?id=165091

Reviewed by Geoffrey Garen.

JSTests:

  • stress/bug-165091.js: Added.

(shouldThrowSyntaxError):

Source/JavaScriptCore:

Avoid overflow which causes keyword tokens to be treated as unary
tokens now that "async" is tokenized as a keyword, by granting an
additional 64 bits to be occupied by token IDs.

  • parser/ParserTokens.h:
6:44 PM Changeset in webkit [209292] by Simon Fraser
  • 21 edits in trunk/Source/WebCore

Put names on layers in release builds
https://bugs.webkit.org/show_bug.cgi?id=165347

Reviewed by Tim Horton.

Put names on GraphicsLayers (and therefore CALayers) in release builds. Release names
are a simpler, truncated version of debug names, with <tagname> id class names.

Non-primary layer names converted to lowercase and "layer" removed.

Fix comments that refer to gdb.

Use ENABLE(TREE_DEBUGGING) in more places.

  • dom/Node.h:
  • dom/Position.h:
  • dom/Range.h:
  • editing/FrameSelection.h:
  • editing/VisiblePosition.h:
  • editing/VisibleSelection.h:
  • history/HistoryItem.h:
  • page/FrameTree.h:
  • platform/graphics/GraphicsLayer.h:
  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::updateNames):
(WebCore::GraphicsLayerCA::updateBackdropFilters):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateClippingStrategy):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::tileGridContainerLayerName):
(WebCore::TileController::zoomedOutTileGridContainerLayerName):
(WebCore::TileController::createTileLayer):

  • rendering/CounterNode.h:
  • rendering/InlineBox.h:
  • rendering/InlineFlowBox.h:
  • rendering/RenderCounter.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::name):

  • rendering/RenderLayer.h:
  • rendering/RenderLayerBacking.cpp:

(WebCore::RenderLayerBacking::createGraphicsLayer):
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
(WebCore::RenderLayerBacking::updateAncestorClippingLayer):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
(WebCore::RenderLayerBacking::updateForegroundLayer):
(WebCore::RenderLayerBacking::updateBackgroundLayer):
(WebCore::RenderLayerBacking::updateMaskingLayer):
(WebCore::RenderLayerBacking::updateChildClippingStrategy):
(WebCore::RenderLayerBacking::updateScrollingLayers):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
(WebCore::RenderLayerCompositor::updateLayerForHeader):
(WebCore::RenderLayerCompositor::updateLayerForFooter):
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
(WebCore::RenderLayerCompositor::ensureRootLayer):

  • rendering/RenderObject.h:
6:40 PM Changeset in webkit [209291] by graouts@webkit.org
  • 7 edits in trunk

[Modern Media Controls] Update the media controls size as the media element is resized
https://bugs.webkit.org/show_bug.cgi?id=165346

Reviewed by Dean Jackson.

The "resize" event dispatched by HTMLMediaElement indicates a change in the media's
intrinsic size, while the "resize" event dispatched by the HTMLMediaElement's ShadowRoot
indicates that the layout size of the media element has changed. We now use the latter.

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.handleEvent):

5:53 PM Changeset in webkit [209290] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking fast/dom/Window/window-resize-contents.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=165352

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
5:41 PM Changeset in webkit [209289] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-602.4.1

New tag.

5:31 PM Changeset in webkit [209288] by aestes@apple.com
  • 46 edits in trunk

[Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
https://bugs.webkit.org/show_bug.cgi?id=164492

Reviewed by Dan Bernstein.

Source/JavaScriptCore:

  • Configurations/JavaScriptCore.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to

${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebCore:

  • Configurations/WebCore.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to

${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebInspectorUI:

  • Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • Info.plist: Changed CFBundleIdentifier's value from

com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebKit/mac:

  • Configurations/WebKitLegacy.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to

${PRODUCT_BUNDLE_IDENTIFIER}.

Source/WebKit2:

  • Configurations/DatabaseService.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

$(PRODUCT_NAME).

  • Configurations/NetworkService.xcconfig: Ditto.
  • Configurations/PluginService.32.xcconfig: Ditto.
  • Configurations/PluginService.64.xcconfig: Ditto.
  • Configurations/WebContentService.xcconfig: Ditto.
  • Configurations/WebKit.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • DatabaseProcess/EntryPoint/mac/XPCService/DatabaseService/Info.plist: Changed

CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • Info.plist: Changed CFBundleIdentifier's value from com.apple.${PRODUCT_NAME} to

${PRODUCT_BUNDLE_IDENTIFIER}.

  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Changed

CFBundleIdentifier's value from ${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Ditto.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Ditto.
  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Ditto.
  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Ditto.
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Ditto.
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist: Ditto.
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.

Tools:

  • DumpRenderTree/TestNetscapePlugIn/mac/Info.plist: Changed CFBundleIdentifier's value from

com.apple.testnetscapeplugin to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • DumpRenderTree/ios/Info.plist: Changed CFBundleIdentifier's value from

org.webkit.DumpRenderTree to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • DumpRenderTree/mac/Configurations/DumpRenderTreeApp.xcconfig: Set

PRODUCT_BUNDLE_IDENTIFIER to org.webkit.DumpRenderTree.

  • DumpRenderTree/mac/Configurations/TestNetscapePlugIn.xcconfig: Set

PRODUCT_BUNDLE_IDENTIFIER to com.apple.testnetscapeplugin.

  • MiniBrowser/Configurations/MiniBrowser.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

org.webkit.$(PRODUCT_NAME:rfc1034identifier).

  • MiniBrowser/Configurations/MiniBrowserBundle.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • MiniBrowser/mac/Bundle/Info.plist: Changed CFBundleIdentifier's value from

com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • MiniBrowser/mac/Info.plist: Changed CFBundleIdentifier's value from

org.webkit.${PRODUCT_NAME} to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • TestWebKitAPI/Configurations/InjectedBundle.xcconfig: Set INFOPLIST_FILE to

InjectedBundle-Info.plist and set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • TestWebKitAPI/Configurations/WebProcessPlugIn.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to

com.apple.$(PRODUCT_NAME:rfc1034identifier).

  • TestWebKitAPI/InjectedBundle-Info.plist: Changed CFBundleIdentifier's value from

com.yourcompany.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • TestWebKitAPI/cocoa/WebProcessPlugIn/Info.plist: Added a CFBundleIdentifier key with the

value ${PRODUCT_BUNDLE_IDENTIFIER}.

  • WebKitTestRunner/Configurations/InjectedBundle.xcconfig: Set INFOPLIST_FILE to

InjectedBundle-Info.plist and set PRODUCT_BUNDLE_IDENTIFIER to
com.apple.WebKitTestRunner.InjectedBundle.

  • WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig: Set

PRODUCT_BUNDLE_IDENTIFIER to org.webkit.$(PRODUCT_NAME:rfc1034identifier).

  • WebKitTestRunner/InjectedBundle-Info.plist: Changed CFBundleIdentifier's value from

com.apple.WebKitTestRunner.InjectedBundle to ${PRODUCT_BUNDLE_IDENTIFIER}.

  • WebKitTestRunner/WebKitTestRunnerApp/WebKitTestRunnerApp-Info.plist: Changed

CFBundleIdentifier's value from org.webkit.${PRODUCT_NAME:rfc1034identifier} to
${PRODUCT_BUNDLE_IDENTIFIER}.

5:20 PM Changeset in webkit [209287] by dino@apple.com
  • 1 edit
    1 add in trunk/Websites/webkit.org

Make a public facing page to check for WebKit features
https://bugs.webkit.org/show_bug.cgi?id=165331
<rdar://problem/29488535>

Reviewed by Antoine Quint.

Add a web page to webkit.org that allows us to live
detect our experimental features. This is mostly for
internal debugging, but also provides simple examples
of how real content would do such detection.

  • experimental-features.html: Added.
5:09 PM Changeset in webkit [209286] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Turn off more tests until new parser is on
https://bugs.webkit.org/show_bug.cgi?id=165349

Reviewed by Dean Jackson.

4:54 PM Changeset in webkit [209285] by Ryan Haddad
  • 3 edits in trunk/LayoutTests

Rebaseline fast/text/crash-complex-text-surrogate.html after r209279.

Unreviewed test gardening.

  • platform/ios-simulator/fast/text/crash-complex-text-surrogate-expected.txt:
  • platform/mac-yosemite/fast/text/crash-complex-text-surrogate-expected.txt:
4:37 PM Changeset in webkit [209284] by jfbastien@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

WebAssembly: mark WasmOps.h as private
https://bugs.webkit.org/show_bug.cgi?id=165335

Reviewed by Mark Lam.

  • JavaScriptCore.xcodeproj/project.pbxproj: WasmOps.h will be used by non-JSC and should therefore be private
4:35 PM Changeset in webkit [209283] by Chris Dumez
  • 7 edits
    2 deletes in trunk

Unreviewed, rolling out r209275 and r209276.
https://bugs.webkit.org/show_bug.cgi?id=165348

"broke the arm build" (Requested by keith_miller on #webkit).

Reverted changesets:

"Add Wasm floating point nearest and trunc"
https://bugs.webkit.org/show_bug.cgi?id=165339
http://trac.webkit.org/changeset/209275

"Unreviewed, forgot to change instruction after renaming."
http://trac.webkit.org/changeset/209276

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

4:22 PM Changeset in webkit [209282] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

HTML Interactive Form Validation popovers do not show in iOS WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=165340
<rdar://problem/29489966>

Reviewed by Simon Fraser.

HTML Interactive Form Validation popovers do not show in iOS WKWebViews,
only in MobileSafari. To address the issue try to find an appropriate
UIViewController to present the popover when the client does not provide
a presenting view controller.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::fallbackViewController):
(WebCore::ValidationBubble::setAnchorRect):

  • platform/spi/ios/UIKitSPI.h:
3:36 PM Changeset in webkit [209281] by matthew_hanson@apple.com
  • 3 edits in tags/Safari-603.1.14/Source/WebCore

Merge r209264. rdar://problem/29487187

3:21 PM Changeset in webkit [209280] by Brent Fulgham
  • 5 edits in trunk/Source/WebKit2

[Mac] Update sandbox profiles to use modern syntax and avoid duplication
https://bugs.webkit.org/show_bug.cgi?id=165332
<rdar://problem/26898991>

Reviewed by Anders Carlsson.

Update the Mac sandbox profiles to reflect that modern Cocoa applications
communicate with cfprefsd, rather than plists on disk (and have done so
for the past several releases).

Get rid of some duplicated rules, as well as old compatibility rules that
are never triggered under supported operating systems.

  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
3:07 PM Changeset in webkit [209279] by hyatt@apple.com
  • 6 edits in trunk/LayoutTests

[CSS Parser] Fix errors in numerous layout tests
https://bugs.webkit.org/show_bug.cgi?id=165343

Reviewed by Zalan Bujtas.

  • fast/backgrounds/repeat/parsing-background-repeat-expected.txt:
  • fast/backgrounds/repeat/script-tests/parsing-background-repeat.js:

The old parser partially applies shorthands, even if it rejects later on.
The new parser properly rejects the entire shorthand. Fix the test so that
the numbers at the end are not unitless so that the entire shorthand parses, allowing
the components to be obtained.

  • fast/css/unknown-pseudo-element-matching-expected.txt:
  • fast/css/unknown-pseudo-element-matching.html:
  • fast/text/crash-complex-text-surrogate.html:

The old parser allows the tag name to be omitted following a namespace bar (|). This
is not legal according to the namespaces spec, and the new parser behaves correctly.
For the crash test, it's important that all the code still runs, so we know the crash
doesn't happen, so I patched the test to put in '*' for the tag names to keep everything
the same.

For the unknown-pseudo-element test, I just removed the five invalid cases.

3:07 PM Changeset in webkit [209278] by matthew_hanson@apple.com
  • 22 edits in tags/Safari-603.1.14

Merge r209242.

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

Remove redundant LayoutUnit conversions.
https://bugs.webkit.org/show_bug.cgi?id=165338

Reviewed by Simon Fraser.

RenderBlockFlow::computeColumnCountAndWidth has some redundant LayoutUnti <-> unsigned conversions.

No change in functionality.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeColumnCountAndWidth):

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

Unreviewed, forgot to change instruction after renaming.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::nearestIntDouble):
(JSC::MacroAssemblerARM64::nearestIntFloat):

2:59 PM Changeset in webkit [209275] by keith_miller@apple.com
  • 7 edits
    2 adds in trunk

Add Wasm floating point nearest and trunc
https://bugs.webkit.org/show_bug.cgi?id=165339

Reviewed by Filip Pizlo.

JSTests:

  • wasm/function-tests/nearest.js: Added.
  • wasm/function-tests/trunc.js: Added.

Source/JavaScriptCore:

This patch also allows any wasm primitive type to be passed as a
string.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::nearestIntDouble):
(JSC::MacroAssemblerARM64::nearestIntFloat):
(JSC::MacroAssemblerARM64::truncDouble):
(JSC::MacroAssemblerARM64::truncFloat):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::nearestIntDouble):
(JSC::MacroAssemblerX86Common::nearestIntFloat):

  • jsc.cpp:

(box):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Nearest>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F64Trunc>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32Trunc>):

  • wasm/WasmFunctionParser.h:

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

2:53 PM Changeset in webkit [209274] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Turn off the large value test, since clamping is not the same.
https://bugs.webkit.org/show_bug.cgi?id=165341

Reviewed by Zalan Bujtas.

2:44 PM Changeset in webkit [209273] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

ES6SampleBench should report an average for Steady State so that all of the numbers are comparable
https://bugs.webkit.org/show_bug.cgi?id=165325

Reviewed by Saam Barati.

This makes all of the numbers that ES6SampleBench reports comparable to each other: they all speak of the time
it took to run an iteration of something.

  • ES6SampleBench/results.js:

(Results.prototype.reportResult):

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

Marking three imported/w3c/web-platform-tests/IndexedDB/idbindex-* tests as flaky on macOS debug.
https://bugs.webkit.org/show_bug.cgi?id=165222

Unreviewed test gardening.

  • platform/mac/TestExpectations:
2:36 PM Changeset in webkit [209271] by graouts@webkit.org
  • 12 edits
    4 copies
    8 adds in trunk

[Modern Media Controls] Add rewind and fast-forward support
https://bugs.webkit.org/show_bug.cgi?id=165294

Reviewed by Dean Jackson.

We implement support for rewinding and fast-forwarding the media by pressing dedicated
buttons in fullscreen on macOS. We introduce a new SeekButton class that the existing
RewindButton and ForwardButton classes now extend and which provides handling of
"mousedown" and "mouseup" events to indicate that a button is being pressed to the
UI delegate.

We also introduce a new SeekSupport class from which SeekBackwardSupport and
SeekForwardSupport inherit to integrate with those controls and update the media
time.

Tests: media/modern-media-controls/layout-node/layout-node-parent-of-type.html

media/modern-media-controls/seek-backward-support/seek-backward-support.html
media/modern-media-controls/seek-forward-support/seek-forward-support.html

  • Modules/modern-media-controls/controls/forward-button.js:
  • Modules/modern-media-controls/controls/layout-node.js:

(LayoutNode.prototype.parentOfType):

  • Modules/modern-media-controls/controls/rewind-button.js:
  • Modules/modern-media-controls/controls/seek-button.js: Added.

(SeekButton):
(SeekButton.prototype.handleEvent):
(SeekButton.prototype._didStartPressing):
(SeekButton.prototype._didStopPressing):
(SeekButton.prototype._notifyDelegateOfPressingState):

  • Modules/modern-media-controls/js-files:
  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._updateControlsIfNeeded):

  • Modules/modern-media-controls/media/seek-backward-support.js: Added.

(SeekBackwardSupport.prototype.get control):
(SeekBackwardSupport.prototype.get multiplier):
(SeekBackwardSupport):

  • Modules/modern-media-controls/media/seek-forward-support.js: Added.

(SeekForwardSupport.prototype.get control):
(SeekForwardSupport.prototype.get multiplier):
(SeekForwardSupport):

  • Modules/modern-media-controls/media/seek-support.js: Added.

(SeekSupport.prototype.get multiplier):
(SeekSupport.prototype.buttonPressedStateDidChange):
(SeekSupport.prototype._startSeeking):
(SeekSupport.prototype._stopSeeking):
(SeekSupport.prototype._seek):
(SeekSupport):

  • WebCore.xcodeproj/project.pbxproj:
2:34 PM Changeset in webkit [209270] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

‘Versioning.’

2:29 PM Changeset in webkit [209269] by beidson@apple.com
  • 2 edits in trunk/Tools

Make IndexedDB.WebProcessKillIDBCleanup even more reliable.
https://bugs.webkit.org/show_bug.cgi?id=165330

Reviewed by Alex Christensen.

The test currently nulls out a RetainPtr<WKWebView> to try to destroy the view and kill the process.

Problem is that doesn't reliably destroy the view.
We should explicitly kill the process instead.

Also, by relocating when we kill the process, we can better test behavior of the IndexedDB mechanism.
e.g. We explicitly confirm that a second WebProcess can simultaneously attach to the same unique database as the first.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:

(TEST):

2:27 PM Changeset in webkit [209268] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.14

New tag.

2:17 PM Changeset in webkit [209267] by Chris Dumez
  • 2 edits in trunk/Source/WebKit/mac

Regression(r209252): HTML interactive validation should not be enabled on iOS WK1 yet
https://bugs.webkit.org/show_bug.cgi?id=165328

Reviewed by Simon Fraser.

Only enable HTML interactive form validation on Mac WK1, not iOS WK1.

  • WebView/WebViewData.mm:

(-[WebViewPrivate init]):

2:15 PM Changeset in webkit [209266] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

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

broke 36 webkitpy tests (Requested by mcatanzaro on #webkit).

Reverted changeset:

"Make it possible to use an existing simulator instance for
one-off testing"
https://bugs.webkit.org/show_bug.cgi?id=164568
http://trac.webkit.org/changeset/209136

2:07 PM Changeset in webkit [209265] by hyatt@apple.com
  • 8 edits in trunk/Source/WebCore

[CSS Parser] Need to set edit flags properly when user-modify/select are used.
https://bugs.webkit.org/show_bug.cgi?id=165334

Reviewed by Dean Jackson.

The old parser calls parserSetUsesStyleBasedEditability on
StyleSheetContents* from inside isValidKeywordPropertyAndValue. This
is pretty lame, but we have to do the same in order to pass editing
layout tests.

All of the functions below have been patched with the sole purpose of
propagating StyleSheetContents* through to isValidKeywordPropertyAndValue
in the new parser.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseValueWithVariableReferences):

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

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

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

(WebCore::CSSParserImpl::consumeDeclarationValue):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::CSSPropertyParser):
(WebCore::CSSPropertyParser::parseValue):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::parseShorthand):

  • css/parser/CSSPropertyParser.h:
2:00 PM Changeset in webkit [209264] by Beth Dakin
  • 3 edits in trunk/Source/WebCore

REGRESSION (r208802): TouchBar pause button doesn't work
https://bugs.webkit.org/show_bug.cgi?id=165333
-and corresponding-
rdar://problem/29487187

Reviewed by Wenson Hsieh.

The previous code got this right by using self.playing. _playing was totally un-
used, so this patch just removes it.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager setPlaying:]):

1:46 PM Changeset in webkit [209263] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/scrubber-support/scrubber-support-click.html as a flaky failure.
https://bugs.webkit.org/show_bug.cgi?id=165327

Unreviewed test gardening.

1:46 PM Changeset in webkit [209262] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/inspector/network/xhr-request-data-encoded-correctly.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=164033

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:33 PM Changeset in webkit [209261] by wilander@apple.com
  • 7 edits
    3 adds in trunk

Require preflight for non-standard CORS-safelisted request headers Accept, Accept-Language, and Content-Language
https://bugs.webkit.org/show_bug.cgi?id=165178
<rdar://problem/18792250>

Reviewed by Youenn Fablet.

Fetch currently only restricts the header Content-Type for simple requests:
https://fetch.spec.whatwg.org/#cors-safelisted-request-header

This means simple CORS requests can send unexpected characters in Accept,
Accept-Language, and Content-Language header values.

RFC 7231 implies restrictions on these header values:

As per discussions in the W3C WebAppSec group we should try to restrict
these header values to help protect servers that do not expect simple CORS
requests.

Non-standard, safelisted header values should trigger a preflight and require
the headers to be whitelisted in the response's Access-Control-Allow-Headers.
For Fetch in no-cors mode this change means non-standard header values are not
allowed to be set.

Source/WebCore:

Test: http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html

  • loader/CrossOriginAccessControl.cpp:

(WebCore::isSimpleCrossOriginAccessRequest):

Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().

(WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Deleted.

It was a duplicate of WebCore::isCrossOriginSafeRequestHeader().

  • loader/CrossOriginAccessControl.h:
  • loader/CrossOriginPreflightResultCache.cpp:

(WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginHeaders):

Now calls WebCore::isCrossOriginSafeRequestHeader() instead of
WebCore::isOnAccessControlSimpleRequestHeaderWhitelist().

  • platform/network/HTTPParsers.cpp:

(WebCore::isValidAcceptHeaderValue):

Basic check that the characters are all ASCII alphanumeric, ' ', '*', '.',
'/', ';', or '='.

(WebCore::isValidLanguageHeaderValue):

Basic check that the characters are all ASCII alphanumeric, ' ', '*', '-',
'.', ';', or '='.

(WebCore::isSimpleHeader):

Removed duplicate code. Now calls WebCore::isCrossOriginSafeRequestHeader().

(WebCore::isCrossOriginSafeRequestHeader):

Now makes a call to WebCore::isValidAcceptHeaderValue() for Accept
headers and WebCore::isValidLanguageHeaderValue() for Accept-Language
and Content-Language headers.

  • platform/network/HTTPParsers.h:

LayoutTests:

  • http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight-expected.txt: Added.
  • http/tests/xmlhttprequest/cors-non-standard-safelisted-headers-should-trigger-preflight.html: Added.

Tests that:

  • Normal Accept, Accept-Language, and Content-Language headers don't trigger

a preflight.

  • Abnormal Accept, Accept-Language, and Content-Language headers do trigger

a preflight.

  • Abnormal Accept, Accept-Language, and Content-Language headers are

accepted if the server whitelists them.

  • http/tests/xmlhttprequest/resources/cors-preflight-safelisted-headers-responder.php: Added.
1:25 PM Changeset in webkit [209260] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

1:25 PM Changeset in webkit [209259] by Alan Bujtas
  • 5 edits
    2 adds in trunk

ASSERTION FAILED: flowThread->regionInRange(region, startRegion, endRegion) in WebCore::RenderBox::borderBoxRectInRegion
https://bugs.webkit.org/show_bug.cgi?id=152113
<rdar://problem/27720221>

Reviewed by David Hyatt.

Source/WebCore:

In a nested column context, do not process a spanner if it belongs to an inner column.

While populating a flow, we search for possible spanners and construct multicolumnsets accordingly.
However due to the top-down nature of populating flows, a descendant spanner could belong to an inner
flow which hasn't been populated yet.
This patch checks if a potential spanner has an ancestor (which is also a descendant
of the flow that we are populating -> nested) that will eventually create a flow context.

Test: fast/multicol/assert-with-nested-columns-and-spanner.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::computeColumnCountAndWidth):
(WebCore::RenderBlockFlow::willCreateColumns):

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

(WebCore::isValidColumnSpanner):

LayoutTests:

  • fast/multicol/assert-with-nested-columns-and-spanner-expected.txt: Added.
  • fast/multicol/assert-with-nested-columns-and-spanner.html: Added.
1:02 PM Changeset in webkit [209258] by hyatt@apple.com
  • 4 edits in trunk

[CSS Parser] Make sure the z-component of transform-origin can be implicit
https://bugs.webkit.org/show_bug.cgi?id=165326

Reviewed by Tim Horton.

Source/WebCore:

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeTransformOrigin):

LayoutTests:

12:59 PM Changeset in webkit [209257] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error
https://bugs.webkit.org/show_bug.cgi?id=164804
<rdar://problem/29278028>

Reviewed by Matt Baker.

BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
Don't show any content view if we are not in a selected tab.

12:31 PM Changeset in webkit [209256] by hyatt@apple.com
  • 3 edits in trunk/LayoutTests

[CSS Parser] Fix invalid test font specification
https://bugs.webkit.org/show_bug.cgi?id=165324

Reviewed by Sam Weinig.

  • fast/text/trak-optimizeLegibility.html:
12:20 PM Changeset in webkit [209255] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Fix :any/:host to allow pseudo-elements. Support -webkit-border-radius.
https://bugs.webkit.org/show_bug.cgi?id=165323

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseShorthand):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo):

12:12 PM Changeset in webkit [209254] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Mark set-selector-text test, since it will need to be rewritten.
https://bugs.webkit.org/show_bug.cgi?id=165322

Reviewed by Dean Jackson.

12:05 PM Changeset in webkit [209253] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

[iOS] Tapping on an HTML validation bubble should dismiss it
https://bugs.webkit.org/show_bug.cgi?id=165122
<rdar://problem/29429372>

Reviewed by Simon Fraser.

Tapping on an HTML validation bubble should dismiss it. Previously it did
nothing.

No new tests, I tried writing one but the validation popover does not
show in the simulator, only on device. I believe at least one reason is that
_presentingViewControllerForWebView() is required and is currently not
implemented by WKTR. I'll look into this issue separately.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(-[WebValidationBubbleTapRecognizer initWithPopoverController:withPopoverView:]):
(-[WebValidationBubbleTapRecognizer dismissPopover]):
(WebCore::ValidationBubble::ValidationBubble):

12:05 PM Changeset in webkit [209252] by Chris Dumez
  • 13 edits
    2 adds in trunk

[Mac][WK1] Implement new HTML interactive form validation user interface
https://bugs.webkit.org/show_bug.cgi?id=164483

Reviewed by Simon Fraser.

Source/WebKit:

Add new files to xcode project.

  • WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Implement new HTML interactive form validation user interface on Mac
WK1 and enable it by default.

  • WebCoreSupport/WebValidationMessageClient.h: Added.
  • WebCoreSupport/WebValidationMessageClient.mm: Added.

(WebValidationMessageClient::WebValidationMessageClient):
(WebValidationMessageClient::~WebValidationMessageClient):
(WebValidationMessageClient::showValidationMessage):
(WebValidationMessageClient::hideValidationMessage):
(WebValidationMessageClient::isValidationMessageVisible):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView _frameOrBoundsChanged]):

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _willStartScrollingOrZooming]):
(-[WebView _contentsOfUserInterfaceItem:]):
(-[WebView _scaleWebView:atOrigin:]):
(-[WebView _didScrollDocumentInFrameView:]):
(-[WebView _setZoomMultiplier:isTextOnly:]):
(-[WebView showFormValidationMessage:withAnchorRect:]):
(-[WebView hideFormValidationMessage]):

  • WebView/WebViewData.h:
  • WebView/WebViewData.mm:

(-[WebViewPrivate init]):

  • WebView/WebViewInternal.h:
  • WebView/WebViewPrivate.h:

Tools:

Add support for UIScriptController's contentsOfUserInterfaceItem("validationBubble")
on Mac DRT as this is needed by the HTML form validation layout tests.

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::contentsOfUserInterfaceItem):

LayoutTests:

Unskip tests for HTML form validation that are now passing on Mac WK1.

  • platform/mac-wk1/TestExpectations:
11:55 AM Changeset in webkit [209251] by beidson@apple.com
  • 3 edits in trunk/Tools

IndexedDB.IndexedDBMultiProcess and IndexedDB.WebProcessKillIDBCleanup sometimes timeout.
https://bugs.webkit.org/show_bug.cgi?id=160780 and https://bugs.webkit.org/show_bug.cgi?id=161001

Reviewed by Alexey Proskuryakov.

These tests had "run-loop races."

The test spins the runloop waiting for one message.
Two messages might come in from the WebProcess in short succession, and both be delivered to the
UIProcess in the same spin of the runloop.

Therefore by the time the test stops spinning the runloop, notified that a message was received,
the first message has been overwritten by the second.

These tests are fixed by queueing the incoming messages instead of just storing one.

  • TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBMultiProcess.mm:

(-[IndexedDBMPMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebProcessKillIDBCleanup.mm:

(-[IndexedDBWebProcessKillMessageHandler userContentController:didReceiveScriptMessage:]):
(getNextMessage):
(TEST):

11:34 AM Changeset in webkit [209250] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165319

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:19 AM Changeset in webkit [209249] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html as flaky on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165318

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:51 AM Changeset in webkit [209248] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Add support for the SVG 'kerning' property
https://bugs.webkit.org/show_bug.cgi?id=165315

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeKerning):
(WebCore::CSSPropertyParser::parseSingleValue):

10:40 AM Changeset in webkit [209247] by commit-queue@webkit.org
  • 5 edits
    3 deletes in trunk/Source/WebCore

[WebIDL] Remove support for the 'Nondeterministic' extended attribute
https://bugs.webkit.org/show_bug.cgi?id=165307

Patch by Sam Weinig <sam@webkit.org> on 2016-12-02
Reviewed by Chris Dumez.

We are not currently using the WebReplay functionality that the Nondeterministic
extended attribute is intended to aide. If we come back to WebReplay in the future,
we can bring it back.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
(GenerateImplementationFunctionCall):
(GetNativeTypeForMemoization): Deleted.

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp: Removed.
  • bindings/scripts/test/JS/JSTestNondeterministic.h: Removed.
  • bindings/scripts/test/TestNondeterministic.idl: Removed.
  • page/Navigator.idl:
  • page/Screen.idl:
10:38 AM Changeset in webkit [209246] by hyatt@apple.com
  • 1 edit
    2 deletes in trunk/LayoutTests

[CSS Parser] Require whitespace following condition tokens in media queries
https://bugs.webkit.org/show_bug.cgi?id=165314

Reviewed by Dean Jackson.

This test is invalid according to the media queries spec, which states that whitespace is
required following "and"/"or" tokens.

  • fast/css/media-rule-no-whitespace-expected.txt: Removed.
  • fast/css/media-rule-no-whitespace.html: Removed.
10:31 AM Changeset in webkit [209245] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support the -webkit-letterpress value for text-decoration
https://bugs.webkit.org/show_bug.cgi?id=165313

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTextDecorationLine):

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

Marking media/modern-media-controls/pip-support/pip-support-click.html as flaky on Sierra.
https://bugs.webkit.org/show_bug.cgi?id=165311

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:05 AM Changeset in webkit [209243] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Fix invalid gradients test
https://bugs.webkit.org/show_bug.cgi?id=165310

Reviewed by Zalan Bujtas.

  • fast/gradients/generated-gradients.html:

The content property here is using invalid syntax. It's supposed to be
space-separated, not comma-separated. The old parser was finding the first
value and then bailing when it saw the comma, but not rejecting. The new parser
properly rejected. To keep the test working, just drop all the extra invalid
gradients and keep the first one.

9:55 AM Changeset in webkit [209242] by jfbastien@apple.com
  • 22 edits in trunk

WebAssembly: revert patch causing odd breakage
https://bugs.webkit.org/show_bug.cgi?id=165308

Unreviewed.

Bug #164724 seems to cause build issues which I haven't tracked down yet. WasmOps.h can't be found:
./Source/JavaScriptCore/wasm/WasmFormat.h:34:10: fatal error: 'WasmOps.h' file not found

It's weird since the file is auto-generated and has been for a while. #164724 merely includes it in WasmFormat.h.

JSTests:

  • wasm/Builder.js:

(const._normalizeFunctionSignature):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Code):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.inline_signature_type):
(export.default.LowLevelBinary.prototype.block_type): Deleted.

  • wasm/WASM.js:
  • wasm/js-api/test_basic_api.js:
  • wasm/self-test/test_BuilderWebAssembly.js:

(EmptyModule):
(CustomSection):

  • wasm/self-test/test_WASM.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::marshallArgument):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::toString):

  • wasm/WasmFormat.h:

(JSC::Wasm::toB3Type):

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):

  • wasm/WasmModuleParser.h:
  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseResultType):

  • wasm/generateWasm.py:

(Wasm.init):

  • wasm/generateWasmOpsHeader.py:

(cppMacro):
(opcodeMacroizer):
(typeMacroizer): Deleted.

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/wasm.json:
9:27 AM Changeset in webkit [209241] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix the color-gamut media query evaluator
https://bugs.webkit.org/show_bug.cgi?id=165309

Reviewed by Zalan Bujtas).

  • css/MediaQueryEvaluator.cpp:

(WebCore::colorGamutEvaluate):
Unknown values should result in a failed match, not a successful match.

9:16 AM Changeset in webkit [209240] by Darin Adler
  • 5 edits in trunk/Source/WebCore

Remove use of WebCore::Dictionary in MediaSession
https://bugs.webkit.org/show_bug.cgi?id=165296

Reviewed by Chris Dumez.

I am not exactly sure of the status of this code. When I enabled it to test my
changes it did not compile until I fixed some things, and it's far out of date
of the latest draft of the Media Session Standard. But despite that I updated it.

  • DerivedSources.make: Removed a line that was breaking the build for some

configurations, perhaps only for programmers from Apple, after r209198.

  • Modules/mediasession/MediaSession.cpp:

(WebCore::MediaSession::MediaSession): Fixed so it compiles.
(WebCore::MediaSession::setMetadata): Changed argument to use a struct rather
htan a WebCore::Dictionary.

  • Modules/mediasession/MediaSession.h: Added a Metadata struct, and used it.

Also fixed the arguments to the constructor.

  • Modules/mediasession/MediaSession.idl: Added MediaMetadata and used it instead

of Dictionary.

8:44 AM Changeset in webkit [209239] by hyatt@apple.com
  • 4 edits in trunk

[CSS Parser] Make sure margin and font set the implicit flag properly
https://bugs.webkit.org/show_bug.cgi?id=165306

Reviewed by Zalan Bujtas.

Source/WebCore:

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeFont):
(WebCore::CSSPropertyParser::consume4Values):

LayoutTests:

8:32 AM Changeset in webkit [209238] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure the templatized consumeIdent uses CSSValuePool
https://bugs.webkit.org/show_bug.cgi?id=165302

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParserHelpers.h:

(WebCore::CSSPropertyParserHelpers::consumeIdent):

8:31 AM Changeset in webkit [209237] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix font-variant parsing
https://bugs.webkit.org/show_bug.cgi?id=165301

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariantEastAsian):
(WebCore::CSSPropertyParser::consumeFontVariantShorthand):
Fix a bug with font-variant-east-asian parsing where the id
was getting improperly consumed even when it didn't match.

8:29 AM Changeset in webkit [209236] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix animation property parsing
https://bugs.webkit.org/show_bug.cgi?id=165305

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeAnimationPropertyList):
Match the old parser by only creating a list for animation properties if there
are two or more comma-separated values. Otherwise just return the CSSValue for
the singleton without creating a list.

8:21 AM Changeset in webkit [209235] by commit-queue@webkit.org
  • 6 edits in trunk/Source

Fix build break when disabling some features.
https://bugs.webkit.org/show_bug.cgi?id=165254

Source/WebCore:

Patch by Gustavo Sverzut Barbieri <barbieri@profusion.mobi> on 2016-12-02
Reviewed by Michael Catanzaro.

If we disable SVG_FONTS or XSLT, then
WebCore::CachedResource::isCORSSameOrigin() would have assertions
on non-existent members. These should be isolated within "#if" as
the other places.

If we're in DEVELOPER_MODE but did not provide
TEST_HYPHENATAION_PATH, then we must mark UNUSED_PARAM() if we're
not on GTK port (ie: EFL).

No new tests as this is a build fix.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::isCORSSameOrigin):

  • missing #if ENABLED(SVG_FONTS)
  • missing #if ENABLED(XSLT)
  • platform/text/hyphen/HyphenationLibHyphen.cpp:

(WebCore::scanTestDictionariesDirectoryIfNecessary):

  • missing UNUSED_PARAM()

Source/WebKit2:

The EFL port was broken if SPELLCHECK was disabled or
PLUGIN_ARCHITECTURE is not x11.

Patch by Gustavo Sverzut Barbieri <barbieri@profusion.mobi> on 2016-12-02
Reviewed by Michael Catanzaro.

  • UIProcess/efl/TextCheckerEfl.cpp:

(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::checkSpellingOfString):
Fix UNUSED_PARAM() usage if SPELLCHECK is disabled.

  • UIProcess/efl/WebPageProxyEfl.cpp:

Isolate methods within #if PLUGIN_ARCHITECTURE(X11).

5:22 AM Changeset in webkit [209234] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Use an OpenGL < 3.0 compliant way to request the OpenGL version
https://bugs.webkit.org/show_bug.cgi?id=165253

Reviewed by Carlos Garcia Campos.

Use glGetString(GL_VERSION) to get the OpenGL version, as glGetIntegerv with GL_MAJOR_VERSION
and GL_MINOR_VERSION is only supported from 3.0 on.

Covered by existent tests.

  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::version):

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

Fix WinCairo build after r208997
https://bugs.webkit.org/show_bug.cgi?id=165283

Patch by Alex Christensen <achristensen@webkit.org> on 2016-12-02
Reviewed by Carlos Garcia Campos.

  • platform/graphics/GLContext.cpp:

glGetIntegerv is defined in gl2.h.
GL_MAJOR_VERSION is defined in gl3.h.
These are not included in the WinCairo build.

Dec 1, 2016:

10:08 PM Changeset in webkit [209232] by BJ Burg
  • 9 edits in trunk/Source/JavaScriptCore

Remote Inspector: fix weird typo in generated ObjC protocol type initializer implementations
https://bugs.webkit.org/show_bug.cgi?id=165295
<rdar://problem/29427778>

Reviewed by Joseph Pecoraro.

Remove a stray semicolon appended after custom initializer signatures.
This is a syntax error when building with less lenient compiler warnings.

  • inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:

(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_required_members):

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
9:31 PM Changeset in webkit [209231] by Darin Adler
  • 6 edits in trunk/Source/WebCore

Stop using WebCore::Dictionary in bindings for Fetch
https://bugs.webkit.org/show_bug.cgi?id=165241

Reviewed by Chris Dumez.

  • Modules/fetch/DOMWindowFetch.idl: Use RequestInit instead of Dictionary.

No effect on code generated since this is a JSBuiltin.

  • Modules/fetch/FetchRequest.cpp:

(WebCore::setReferrerPolicy): Deleted. Bindings handle this now.
(WebCore::setMode): Ditto.
(WebCore::setCredentials): Ditto.
(WebCore::setCache): Ditto.
(WebCore::setRedirect): Ditto.
(WebCore::setReferrer): Changed argument from Dictionary to String.
(WebCore::buildOptions): Changed argument from Dictionary to FetchRequest::Init,
and simplified the code accordingly.
(WebCore::FetchRequest::initializeOptions): Ditto.
(WebCore::FetchRequest::initializeWith): Ditto.

  • Modules/fetch/FetchRequest.h: Updated for above changes. Also added the Init struct.
  • Modules/fetch/FetchRequest.idl: Added missing "only-if-cached" value to RequestCache.

Added RequestInit dictionary and used it instead of Dictionary. Used more-specific string
types for the method and referrer attributes; no effect at runtime, since the code for
getters is the same for ByteString, USVString, and DOMString and these are read-only.

  • Modules/fetch/WorkerGlobalScopeFetch.idl: Use RequestInit instead of Dictionary.

No effect on code generated since this is a JSBuiltin.

7:30 PM Changeset in webkit [209230] by jiewen_tan@apple.com
  • 19 edits in trunk

Add a runtime flag for SubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=164982

Reviewed by Brent Fulgham.

Source/WebCore:

  • bindings/generic/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setSubtleCryptoEnabled):
(WebCore::RuntimeEnabledFeatures::subtleCryptoEnabled):

  • page/Crypto.idl:

Source/WebKit/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences subtleCryptoEnabled]):
(-[WebPreferences setSubtleCryptoEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

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

(WKPreferencesSetSubtleCryptoEnabled):
(WKPreferencesGetSubtleCryptoEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setSubtleCryptoEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
6:38 PM Changeset in webkit [209229] by sbarati@apple.com
  • 89 edits in trunk/Source

Rename CallFrame::callee() to CallFrame::jsCallee()
https://bugs.webkit.org/show_bug.cgi?id=165293

Reviewed by Keith Miller.

Source/JavaScriptCore:

Wasm will soon have its own Callee that doesn't derive
from JSObject, but derives from JSCell. I want to introduce
a new function like:
`
CalleeBase* CallFrame::callee()
`

once we have a Wasm callee. It only makes sense to name that
function callee() and rename the current one turn to:
`
JSObject* CallFrame::jsCallee()
`

  • API/APICallbackFunction.h:

(JSC::APICallbackFunction::call):
(JSC::APICallbackFunction::construct):

  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::construct):
(JSC::JSCallbackObject<Parent>::call):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::type):

  • interpreter/CallFrame.cpp:

(JSC::CallFrame::friendlyFunctionName):

  • interpreter/CallFrame.h:

(JSC::ExecState::jsCallee):
(JSC::ExecState::callee): Deleted.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::dumpRegisters):
(JSC::notifyDebuggerOfUnwinding):

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::update):

  • interpreter/StackVisitor.cpp:

(JSC::StackVisitor::readNonInlinedFrame):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::traceFunctionPrologue):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/ArrayConstructor.cpp:

(JSC::constructArrayWithSizeQuirk):

  • runtime/AsyncFunctionConstructor.cpp:

(JSC::callAsyncFunctionConstructor):
(JSC::constructAsyncFunctionConstructor):

  • runtime/BooleanConstructor.cpp:

(JSC::constructWithBooleanConstructor):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createWithInlineFrame):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::arityCheckFor):

  • runtime/DateConstructor.cpp:

(JSC::constructWithDateConstructor):

  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::createByCopying):

  • runtime/Error.h:

(JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
(JSC::StrictModeTypeErrorFunction::callThrowTypeError):

  • runtime/ErrorConstructor.cpp:

(JSC::Interpreter::constructWithErrorConstructor):
(JSC::Interpreter::callErrorConstructor):

  • runtime/FunctionConstructor.cpp:

(JSC::constructWithFunctionConstructor):
(JSC::callFunctionConstructor):

  • runtime/GeneratorFunctionConstructor.cpp:

(JSC::callGeneratorFunctionConstructor):
(JSC::constructGeneratorFunctionConstructor):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::createSubclassStructure):

  • runtime/IntlCollator.cpp:

(JSC::IntlCollator::initializeCollator):

  • runtime/IntlCollatorConstructor.cpp:

(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::initializeDateTimeFormat):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlNumberFormat.cpp:

(JSC::IntlNumberFormat::initializeNumberFormat):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLocaleList):
(JSC::defaultLocale):
(JSC::lookupSupportedLocales):
(JSC::intlObjectFuncGetCanonicalLocales):

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::constructArrayBuffer):

  • runtime/JSArrayBufferPrototype.cpp:

(JSC::arrayBufferProtoFuncSlice):

  • runtime/JSBoundFunction.cpp:

(JSC::boundThisNoArgsFunctionCall):
(JSC::boundFunctionCall):
(JSC::boundThisNoArgsFunctionConstruct):
(JSC::boundFunctionConstruct):

  • runtime/JSCellInlines.h:

(JSC::ExecState::vm):

  • runtime/JSCustomGetterSetterFunction.cpp:

(JSC::JSCustomGetterSetterFunction::customGetterSetterFunctionCall):

  • runtime/JSFunction.cpp:

(JSC::callHostFunctionAsConstructor):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayView):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • runtime/JSInternalPromiseConstructor.cpp:

(JSC::constructPromise):

  • runtime/JSMapIterator.cpp:

(JSC::JSMapIterator::createPair):
(JSC::JSMapIterator::clone):

  • runtime/JSNativeStdFunction.cpp:

(JSC::runStdFunction):

  • runtime/JSPromiseConstructor.cpp:

(JSC::constructPromise):

  • runtime/JSPropertyNameIterator.cpp:

(JSC::JSPropertyNameIterator::clone):

  • runtime/JSScope.h:

(JSC::ExecState::lexicalGlobalObject):

  • runtime/JSSetIterator.cpp:

(JSC::JSSetIterator::createPair):
(JSC::JSSetIterator::clone):

  • runtime/JSStringIterator.cpp:

(JSC::JSStringIterator::clone):

  • runtime/MapConstructor.cpp:

(JSC::constructMap):

  • runtime/MapPrototype.cpp:

(JSC::mapProtoFuncValues):
(JSC::mapProtoFuncEntries):
(JSC::mapProtoFuncKeys):
(JSC::privateFuncMapIterator):

  • runtime/NativeErrorConstructor.cpp:

(JSC::Interpreter::constructWithNativeErrorConstructor):
(JSC::Interpreter::callNativeErrorConstructor):

  • runtime/ObjectConstructor.cpp:

(JSC::constructObject):

  • runtime/ProxyObject.cpp:

(JSC::performProxyCall):
(JSC::performProxyConstruct):

  • runtime/ProxyRevoke.cpp:

(JSC::performProxyRevoke):

  • runtime/RegExpConstructor.cpp:

(JSC::constructWithRegExpConstructor):
(JSC::callRegExpConstructor):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::createByCopying):

  • runtime/SetConstructor.cpp:

(JSC::constructSet):

  • runtime/SetPrototype.cpp:

(JSC::setProtoFuncValues):
(JSC::setProtoFuncEntries):
(JSC::privateFuncSetIterator):

  • runtime/StringConstructor.cpp:

(JSC::constructWithStringConstructor):

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncIterator):

  • runtime/WeakMapConstructor.cpp:

(JSC::constructWeakMap):

  • runtime/WeakSetConstructor.cpp:

(JSC::constructWeakSet):

  • wasm/js/WebAssemblyCompileErrorConstructor.cpp:

(JSC::constructJSWebAssemblyCompileError):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::constructJSWebAssemblyRuntimeError):

Source/WebCore:

  • bindings/js/JSDOMConstructor.h:

(WebCore::JSBuiltinConstructor<JSClass>::construct):

  • bindings/js/JSDataCueCustom.cpp:

(WebCore::constructJSDataCue):

  • bindings/js/JSHTMLAllCollectionCustom.cpp:

(WebCore::callHTMLAllCollection):

  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::constructJSHTMLElement):

  • bindings/js/JSImageConstructor.cpp:

(WebCore::JSImageConstructor::construct):

  • bindings/js/JSMutationObserverCustom.cpp:

(WebCore::constructJSMutationObserver):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::callPlugin):

  • bindings/js/JSWorkerCustom.cpp:

(WebCore::constructJSWorker):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateConstructorDefinition):

  • bindings/scripts/test/JS/JSFloat64Array.cpp:

(WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructorConstructor::construct):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterfaceConstructor::construct):

  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructorNamedConstructor::construct):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodeConstructor::construct):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjConstructor::construct):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::constructJSTestOverloadedConstructors1):
(WebCore::constructJSTestOverloadedConstructors2):
(WebCore::constructJSTestOverloadedConstructors3):
(WebCore::constructJSTestOverloadedConstructors4):
(WebCore::constructJSTestOverloadedConstructors5):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::constructJSTestOverloadedConstructorsWithSequence1):
(WebCore::constructJSTestOverloadedConstructorsWithSequence2):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefsConstructor::construct):

  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::callObjCFallbackObject):

  • bridge/runtime_method.cpp:

(JSC::callRuntimeMethod):

  • bridge/runtime_object.cpp:

(JSC::Bindings::callRuntimeObject):
(JSC::Bindings::callRuntimeConstructor):

Source/WebKit2:

  • WebProcess/Plugins/Netscape/JSNPMethod.cpp:

(WebKit::callMethod):

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::callNPJSObject):
(WebKit::constructWithConstructor):

6:11 PM Changeset in webkit [209228] by graouts@webkit.org
  • 8 edits
    2 adds in trunk

[Modern Media Controls] Fade controls in when entering and exiting fullscreen
https://bugs.webkit.org/show_bug.cgi?id=165287

Reviewed by Dean Jackson.

Fade controls in when we enter and leave fullscreen.

Test: media/modern-media-controls/media-controller/media-controller-fade-controls-when-entering-fullscreen.html

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls.fade-in):
(@keyframes fade-in):
(to):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.presentInElement):

  • Modules/modern-media-controls/media/fullscreen-support.js:

(FullscreenSupport.prototype.buttonWasClicked):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._updateControlsIfNeeded):

6:07 PM Changeset in webkit [209227] by graouts@webkit.org
  • 7 edits
    5 adds in trunk

[Modern Media Controls] Show and populate the tracks panel
https://bugs.webkit.org/show_bug.cgi?id=165284

Reviewed by Dean Jackson.

We added a TracksPanel in https://bugs.webkit.org/show_bug.cgi?id=165239 which allows to
show a list of media tracks and text tracks to choose from. We now show this panel when
clicking on the tracks button in the controls bar and populate its content with the
list of audio and text tracks for the media element. As an item is picked from the tracks
panel, we toggle the represented track's enabled state and dismiss the panel.

We also pick up the text track container display mostly unchanged from current media controls.

Tests: media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html

media/modern-media-controls/tracks-support/tracks-support-show-and-populate-panel.html

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.showTracksPanel):

  • Modules/modern-media-controls/controls/text-tracks.css: Added.

(video::-webkit-media-text-track-container):
(video::cue):
(video::-webkit-media-text-track-display):
(video::-webkit-media-text-track-display-backdrop):
(video::cue(:future)):
(video::-webkit-media-text-track-container b):
(video::-webkit-media-text-track-container u):
(video::-webkit-media-text-track-container i):
(video::-webkit-media-text-track-container .hidden):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):

  • Modules/modern-media-controls/media/tracks-support.js:

(TracksSupport):
(TracksSupport.prototype.destroy):
(TracksSupport.prototype.buttonWasClicked):
(TracksSupport.prototype.tracksPanelNumberOfSections):
(TracksSupport.prototype.tracksPanelTitleForSection):
(TracksSupport.prototype.tracksPanelNumberOfTracksInSection):
(TracksSupport.prototype.tracksPanelTitleForTrackInSection):
(TracksSupport.prototype.tracksPanelIsTrackInSectionSelected):
(TracksSupport.prototype.tracksPanelSelectionDidChange):
(TracksSupport.prototype.syncControl):
(TracksSupport.prototype._textTracks):
(TracksSupport.prototype._audioTracks):
(TracksSupport.prototype._canPickAudioTracks):
(TracksSupport.prototype._canPickTextTracks):
(TracksSupport.prototype._sortedTrackList):

5:30 PM Changeset in webkit [209226] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Rare crash when preparing to print
https://bugs.webkit.org/show_bug.cgi?id=165280
<rdar://problem/28240254>

Reviewed by Dean Jackson.

  • page/Frame.cpp:

(WebCore::Frame::setPrinting): Only manipulate the FrameView if it is non-null.
(WebCore::Frame::documentAtPoint): Drive-by fix to change a 0 return to nullptr.

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

Removing Release-only flag from flaky test http/tests/cache/disk-cache/disk-cache-request-max-stale.html
https://bugs.webkit.org/show_bug.cgi?id=159840

Unreviewed test gardening..

  • platform/ios-simulator-wk2/TestExpectations:
5:21 PM Changeset in webkit [209224] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Put an obvious debug border on layers with backdrop filters
https://bugs.webkit.org/show_bug.cgi?id=165291

Reviewed by Tim Horton.

Put a wide magenta border on layers with backdrop filters, to highlight their performance impact.

Change the "contents layer" color (used by WebGL, video etc) to blue.

Make the clipping layer border slightly narrower.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::getDebugBorderInfo):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::setBackdropFilters):

5:01 PM Changeset in webkit [209223] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html as a flaky timeout.
https://bugs.webkit.org/show_bug.cgi?id=165290

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:52 PM Changeset in webkit [209222] by BJ Burg
  • 15 edits in trunk/Source/JavaScriptCore

Web Inspector: generated code should use a framework-style import for *ProtocolArrayConversions.h
https://bugs.webkit.org/show_bug.cgi?id=165281
<rdar://problem/29427778>

Reviewed by Joseph Pecoraro.

  • inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:

(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):

  • inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
  • inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
  • inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
  • inspector/scripts/tests/expected/enum-values.json-result:
  • inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
  • inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
  • inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
  • inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
  • inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-array-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
  • inspector/scripts/tests/expected/type-declaration-object-type.json-result:
  • inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
4:47 PM Changeset in webkit [209221] by BJ Burg
  • 2 edits in trunk/Source/WebCore

Fix the Windows Release build after r209198
https://bugs.webkit.org/show_bug.cgi?id=165285

Unreviewed build fix.

  • Modules/webdriver/NavigatorWebDriver.cpp:

Brute force include all the inlines to work around a JSC issue.

4:24 PM Changeset in webkit [209220] by ggaren@apple.com
  • 6 edits
    1 copy
    1 move in trunk/Source/JavaScriptCore

SourceCodeKey should use unlinked source code
https://bugs.webkit.org/show_bug.cgi?id=165286

Reviewed by Saam Barati.

This patch splits out UnlinkedSourceCode from SourceCode, and deploys
UnlinkedSourceCode in SourceCodeKey.

It's misleading to store SourceCode in SourceCodeKey because SourceCode
has an absolute location whereas unlinked cached code has no location.

I plan to deploy UnlinkedSourceCode in more places, to indicate code
that has no absolute location.

(JSC::UnlinkedSourceCode::toUTF8):
(JSC::SourceCode::toUTF8): Deleted.

  • parser/SourceCode.h:

(JSC::SourceCode::SourceCode):
(JSC::SourceCode::startColumn):
(JSC::SourceCode::isHashTableDeletedValue): Deleted.
(JSC::SourceCode::hash): Deleted.
(JSC::SourceCode::view): Deleted.
(JSC::SourceCode::providerID): Deleted.
(JSC::SourceCode::isNull): Deleted.
(JSC::SourceCode::provider): Deleted.
(JSC::SourceCode::startOffset): Deleted.
(JSC::SourceCode::endOffset): Deleted.
(JSC::SourceCode::length): Deleted. Move a bunch of stuff in to a new
base class, UnlinkedSourceCode.

  • parser/SourceCodeKey.h:

(JSC::SourceCodeKey::SourceCodeKey): Use UnlinkedSourceCode since code
in the cache has no location.

  • parser/UnlinkedSourceCode.h: Copied from Source/JavaScriptCore/parser/SourceCode.h.

(JSC::UnlinkedSourceCode::UnlinkedSourceCode):
(JSC::UnlinkedSourceCode::provider):
(JSC::SourceCode::SourceCode): Deleted.
(JSC::SourceCode::isHashTableDeletedValue): Deleted.
(JSC::SourceCode::hash): Deleted.
(JSC::SourceCode::view): Deleted.
(JSC::SourceCode::providerID): Deleted.
(JSC::SourceCode::isNull): Deleted.
(JSC::SourceCode::provider): Deleted.
(JSC::SourceCode::firstLine): Deleted.
(JSC::SourceCode::startColumn): Deleted.
(JSC::SourceCode::startOffset): Deleted.
(JSC::SourceCode::endOffset): Deleted.
(JSC::SourceCode::length): Deleted.
(JSC::makeSource): Deleted.
(JSC::SourceCode::subExpression): Deleted.

  • runtime/CodeCache.h: Use UnlinkedSourceCode in the cache.
4:04 PM Changeset in webkit [209219] by Ryan Haddad
  • 2 edits in trunk/JSTests

Skip flaky test ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js
https://bugs.webkit.org/show_bug.cgi?id=162567

Reviewed by Saam Barati.

  • ChakraCore.yaml:
2:55 PM Changeset in webkit [209218] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-602-branch

Merge r209149. rdar://problem/29404230

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

[CSS Parser] Only allow a single font-family in @font-face
https://bugs.webkit.org/show_bug.cgi?id=165278

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontFamilyDescriptor):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):

2:53 PM Changeset in webkit [209216] by ap@apple.com
  • 5 edits in trunk/Tools

Remove webkitpy dependency on Eliza
https://bugs.webkit.org/show_bug.cgi?id=164979

Reviewed by Daniel Bates.

This module is not on pypi, so installing it is a challenge. The jokes feel pretty old too!

  • Scripts/webkitpy/thirdparty/init.py:
  • Scripts/webkitpy/thirdparty/init_unittest.py: Changed mock import hook to

test buildbot instead of eliza.

  • Scripts/webkitpy/tool/bot/ircbot.py:
  • Scripts/webkitpy/tool/bot/ircbot_unittest.py:
2:48 PM Changeset in webkit [209215] by Chris Dumez
  • 3 edits
    2 adds in trunk

Source/WebKit2:
[iOS][WK2] Tapping an element generates a 'click' event that has 0 as timeStamp
https://bugs.webkit.org/show_bug.cgi?id=165270
<rdar://problem/29224355>

Reviewed by Simon Fraser.

Tapping an element generates a 'click' event that has 0 as timeStamp
instead of having a proper timeStamp value. This is breaking some
sites.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::completeSyntheticClick):

LayoutTests:
[iOS] Tapping an element generates a 'click' event that has 0 as timeStamp
https://bugs.webkit.org/show_bug.cgi?id=165270
<rdar://problem/29224355>

Reviewed by Simon Fraser.

Add layout test coverage.

  • fast/events/ios/click-event-timestamp-expected.txt: Added.
  • fast/events/ios/click-event-timestamp.html: Added.
2:36 PM Changeset in webkit [209214] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

Try to fix the EFL/Gtk build

  • UIProcess/efl/WebProcessPoolEfl.cpp:

(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):

  • UIProcess/gtk/WebProcessPoolGtk.cpp:

(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):

2:32 PM Changeset in webkit [209213] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Show async stack traces for workers
https://bugs.webkit.org/show_bug.cgi?id=165235
<rdar://problem/29450172>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline > .children > .item.call-frame.async-boundary):
(.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary):
(.tree-outline .item.call-frame.async-boundary::before):
(.tree-outline.single-thread .item.call-frame.async-boundary::before):
(.tree-outline .item.call-frame.async-boundary): Deleted.
Style changes for single/multiple-thread call stacks.
Padding changes to account for Thread tree element.
Make selectors more specific where needed.

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger .tree-outline.single-thread > .item.thread):
(.sidebar > .panel.navigation.debugger .tree-outline.single-thread):
Style changes for single/multiple-thread call stacks.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
Use a single tree outline for showing a single thread or multiple threads.
For single-threaded, hide Thread tree element and un-indent children.

(WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
(WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
(WebInspector.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
Update tree style and whether Thread tree element is selectable.
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
Remove support for second tree outline.

(WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): Deleted.
(WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): Deleted.
No longer needed after unifying tree outlines.

  • UserInterface/Views/ThreadTreeElement.js:

(WebInspector.ThreadTreeElement.prototype.refresh):
Append call frames from the async stack trace.

2:31 PM Changeset in webkit [209212] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit2

Every WKWebView initialization spends a few milliseconds hitting the disk
https://bugs.webkit.org/show_bug.cgi?id=165268
<rdar://problem/29010113>

Reviewed by Brady Eidson.

Every WKWebView init currently involves doing directory creation and
symlink resolution for a number of paths (to create sandbox extensions
for all of our storage directories), which means touching the disk a
lot during init. All of these paths are immutable per-WebProcessPool,
so, instead, cache them on WebProcessPool and create sandbox extensions
from the already-resolved paths. This is a sizable (~4x) speedup when
initializing subsequent web views.

  • Shared/SandboxExtension.h:

(WebKit::SandboxExtension::createHandleWithoutResolvingPath):
Add createHandleWithoutResolvingPath, which makes a sandbox extension
handle without doing symlink resolution.

(WebKit::resolvePathForSandboxExtension):
(WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
Add two functions that do the same resolution that SandboxExtension::createHandle
and ::createHandleForReadWriteDirectory do, but just return the paths,
for later use with createHandleWithoutResolvingPath.

  • Shared/mac/SandboxExtensionMac.mm:

(WebKit::resolveAndCreateReadWriteDirectoryForSandboxExtension):
(WebKit::resolvePathForSandboxExtension):
(WebKit::SandboxExtension::createHandleWithoutResolvingPath):
(WebKit::SandboxExtension::createHandle):
(WebKit::SandboxExtension::createHandleForReadWriteDirectory):
Implement the aforementioned functions, and reimplement the existing
createHandle{ForReadWriteDirectory} functions in terms of them.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformDefaultIconDatabasePath):
Stop wasting time generating and resolving a platform default icon
database path, since we don't actually use it for anything anymore except
to determine whether the icon database is enabled, and we only want to
enable it if the client has provided a path.

(WebKit::WebProcessPool::platformResolvePathsForSandboxExtensions):
(WebKit::WebProcessPool::platformInitializeWebProcess):

  • UIProcess/WebProcessPool.cpp:

(WebKit::m_hiddenPageThrottlingTimer):
(WebKit::WebProcessPool::resolvePathsForSandboxExtensions):
(WebKit::WebProcessPool::createNewWebProcess):

  • UIProcess/WebProcessPool.h:

Resolve paths in resolvePathsForSandboxExtensions, and use the resolved
paths along with createHandleWithoutResolvingPath in order to effectively
cache the resolution operation.

2:24 PM Changeset in webkit [209211] by matthew_hanson@apple.com
  • 11 edits
    12 adds in branches/safari-602-branch

Merge r209145. rdar://problem/29404231

2:23 PM Changeset in webkit [209210] by matthew_hanson@apple.com
  • 6 edits
    2 adds in branches/safari-602-branch

Merge r208745. rdar://problem/29277336

2:23 PM Changeset in webkit [209209] by matthew_hanson@apple.com
  • 3 edits
    4 adds in branches/safari-602-branch

Merge r208825. rdar://problem/29277338

2:23 PM Changeset in webkit [209208] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r208629. rdar://problem/29277337

2:23 PM Changeset in webkit [209207] by matthew_hanson@apple.com
  • 3 edits
    2 adds in branches/safari-602-branch

Merge r208628. rdar://problem/29277337

2:14 PM Changeset in webkit [209206] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Blacklist Netflix for TouchBar support
https://bugs.webkit.org/show_bug.cgi?id=165104

Rubber-stamped by Tim Horton.

Meant to not have the www. in the first case because that is covered by the second
case.

  • html/HTMLMediaElement.cpp:

(WebCore::needsPlaybackControlsManagerQuirk):

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

[CSS Parser] Support -webkit-overflow-scrolling: touch
https://bugs.webkit.org/show_bug.cgi?id=165275

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

2:00 PM Changeset in webkit [209204] by keith_miller@apple.com
  • 9 edits
    1 add in trunk

Add wasm int to floating point opcodes
https://bugs.webkit.org/show_bug.cgi?id=165252

Reviewed by Geoffrey Garen.

JSTests:

Add tests for Wasm integral to floating point conversion opcodes.

  • wasm/function-tests/int-to-floating-point.js: Added.
  • wasm/wasm.json:

Source/JavaScriptCore:

This patch adds support for the Wasm integral type => floating point
type conversion opcodes. Most of these were already supported by B3
however there was no support for uint64 to float/double. Unfortunately,
AFAIK x86_64 does not have a single instruction that performs this
conversion. Since there is a signed conversion instruction on x86 we
use that for all uint64s that don't have the top bit set. If they do have
the top bit set we need to divide by 2 (rounding up) then convert the number
with the signed conversion then double the result.

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::convertUInt64ToDouble):
(JSC::MacroAssemblerX86_64::convertUInt64ToFloat):

  • jsc.cpp:

(valueWithTypeOfWasmValue):
(box):
(functionTestWasmModuleFunctions):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::F32ConvertUI64>):

  • wasm/WasmFunctionParser.h:

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

  • wasm/wasm.json:
1:58 PM Changeset in webkit [209203] by ggaren@apple.com
  • 1 edit
    1 add in trunk/JSTests

Land a test case for <rdar://problem/27889416>
https://bugs.webkit.org/show_bug.cgi?id=165272

Reviewed by Saam Barati.

  • stress/marked-argument-buffer.js: Added.

(allocate):
(test.o.toString):
(test):

1:57 PM Changeset in webkit [209202] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Fix an invalid shadow DOM test
https://bugs.webkit.org/show_bug.cgi?id=165273

Reviewed by Zalan Bujtas.

  • fast/shadow-dom/css-scoping-slot-with-id.html:

Pseudo-element needs to be rightmost. The rule is illegal, but our old parser
incorrectly allowed it. Fix the test by just flipping the order so that ::slotted(*)
occurs last.

1:47 PM Changeset in webkit [209201] by ggaren@apple.com
  • 6 edits
    1 move in trunk/Source/JavaScriptCore

Renamed EvalCodeCache => DirectEvalCodeCache
https://bugs.webkit.org/show_bug.cgi?id=165271

Reviewed by Saam Barati.

We only use this cache for DirectEval, not IndirectEval.

(JSC::DirectEvalCodeCache::visitAggregate):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::EvalCodeCache::visitAggregate): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::directEvalCodeCache):
(JSC::CodeBlock::evalCodeCache): Deleted.

  • bytecode/DirectEvalCodeCache.h: Copied from Source/JavaScriptCore/bytecode/EvalCodeCache.h.

(JSC::EvalCodeCache::CacheKey::CacheKey): Deleted.
(JSC::EvalCodeCache::CacheKey::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::isEmptyValue): Deleted.
(JSC::EvalCodeCache::CacheKey::operator==): Deleted.
(JSC::EvalCodeCache::CacheKey::isHashTableDeletedValue): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::hash): Deleted.
(JSC::EvalCodeCache::CacheKey::Hash::equal): Deleted.
(JSC::EvalCodeCache::tryGet): Deleted.
(JSC::EvalCodeCache::set): Deleted.
(JSC::EvalCodeCache::isEmpty): Deleted.
(JSC::EvalCodeCache::clear): Deleted.

  • bytecode/EvalCodeCache.h: Removed.
  • interpreter/Interpreter.cpp:

(JSC::eval):

  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

1:45 PM Changeset in webkit [209200] by jiewen_tan@apple.com
  • 12 edits
    21 adds in trunk

Update SubtleCrypto::unwrapKey to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164747
<rdar://problem/29258198>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::unwrapKey method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-unwrapKey. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-unwrapKey.
  2. It implements unwrapKey operations of the following algorithms: AES-KW.

Tests: crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-private.html

crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html
crypto/subtle/aes-kw-generate-key-wrap-key-unwrap-key.html
crypto/subtle/aes-kw-import-key-unwrap-raw-key.html
crypto/subtle/rsa-oaep-import-key-unwrap-jwk-oct-key.html
crypto/subtle/unwrapKey-malformed-parameters.html
crypto/workers/subtle/aes-cbc-import-key-unwrap-key.html
crypto/workers/subtle/aes-kw-import-key-unwrap-key.html
crypto/workers/subtle/rsa-oaep-import-key-unwrap-key.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
Add some comments.
(WebCore::jsSubtleCryptoFunctionUnwrapKeyPromise):
(WebCore::JSSubtleCrypto::unwrapKey):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::unwrapKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):

  • crypto/mac/CryptoAlgorithmAES_KWMac.cpp:

(WebCore::unwrapKeyAES_KW):
(WebCore::CryptoAlgorithmAES_KW::platformUnwrapKey):
(WebCore::CryptoAlgorithmAES_KW::platformDecrypt):

LayoutTests:

  • crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-private-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-unwrap-jwk-rsa-key-private.html: Added.
  • crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-uwrap-jwk-rsa-key-public.html: Added.
  • crypto/subtle/aes-kw-generate-key-wrap-key-unwrap-key-expected.txt: Added.
  • crypto/subtle/aes-kw-generate-key-wrap-key-unwrap-key.html: Added.
  • crypto/subtle/aes-kw-import-key-unwrap-raw-key-expected.txt: Added.
  • crypto/subtle/aes-kw-import-key-unwrap-raw-key.html: Added.
  • crypto/subtle/rsa-oaep-import-key-unwrap-jwk-oct-key-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-unwrap-jwk-oct-key.html: Added.
  • crypto/subtle/unwrapKey-malformed-parameters-expected.txt: Added.
  • crypto/subtle/unwrapKey-malformed-parameters.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-unwrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-unwrap-key.html: Added.
  • crypto/workers/subtle/aes-kw-import-key-unwrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-kw-import-key-unwrap-key.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-unwrap-key.js: Added.
  • crypto/workers/subtle/resources/aes-kw-import-key-unwrap-key.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-unwrap-key.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-unwrap-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-unwrap-key.html: Added.
1:41 PM Changeset in webkit [209199] by hyatt@apple.com
  • 4 edits in trunk

[CSS Parser] Fix font-variant parsing
https://bugs.webkit.org/show_bug.cgi?id=165266

Reviewed by Dean Jackson.

Source/WebCore:

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariantEastAsian):
(WebCore::consumeFontVariantAlternates):
(WebCore::consumeFontVariantPosition):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseFontFaceDescriptor):
(WebCore::CSSPropertyParser::consumeFontVariantShorthand):
(WebCore::consumeFontVariantList): Deleted.

LayoutTests:

1:39 PM Changeset in webkit [209198] by BJ Burg
  • 4 edits
    2 copies
    1 move
    1 add in trunk/Source/WebCore

Web Automation: expose navigator.webdriver if the page is controlled by automation
https://bugs.webkit.org/show_bug.cgi?id=165245
<rdar://problem/29449874>

Reviewed by Joseph Pecoraro.

Move the implementation into OpenSource. It's in Modules/webdriver/.

  • CMakeLists.txt:
  • DerivedSources.make:

Add new paths and files.

  • Modules/webdriver/NavigatorWebDriver.cpp: Added.

(WebCore::NavigatorWebDriver::NavigatorWebDriver):
(WebCore::NavigatorWebDriver::~NavigatorWebDriver):
(WebCore::NavigatorWebDriver::supplementName):
(WebCore::NavigatorWebDriver::isControlledByAutomation):
(WebCore::NavigatorWebDriver::from):
(WebCore::JSNavigator::webdriver):

  • Modules/webdriver/NavigatorWebDriver.h: Added.
  • Modules/webdriver/NavigatorWebDriver.idl: Added.
  • WebCore.xcodeproj/project.pbxproj:
1:33 PM Changeset in webkit [209197] by beidson@apple.com
  • 19 edits
    5 adds in trunk

IndexedDB 2.0: Implement IDBObjectStore.getKey().
https://bugs.webkit.org/show_bug.cgi?id=165256

Reviewed by Alex Christensen.

Source/WebCore:

Tests: storage/indexeddb/modern/idbobjectstore-getkey-1-private.html

storage/indexeddb/modern/idbobjectstore-getkey-1.html

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::getKey):

  • Modules/indexeddb/IDBObjectStore.h:
  • Modules/indexeddb/IDBObjectStore.idl:
  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::createObjectStoreGet):
(WebCore::IDBRequest::IDBRequest):
(WebCore::IDBRequest::requestedObjectStoreRecordType):

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::requestGetRecord):
(WebCore::IDBTransaction::requestIndexRecord):
(WebCore::IDBTransaction::didGetRecordOnServer):

  • Modules/indexeddb/IndexedDB.h:
  • Modules/indexeddb/server/IDBBackingStore.h:
  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):

  • Modules/indexeddb/server/MemoryIDBBackingStore.h:
  • Modules/indexeddb/server/MemoryObjectStore.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::performGetRecord):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
  • Modules/indexeddb/shared/IDBGetRecordData.cpp:

(WebCore::IDBGetRecordData::isolatedCopy):

  • Modules/indexeddb/shared/IDBGetRecordData.h:

(WebCore::IDBGetRecordData::encode):
(WebCore::IDBGetRecordData::decode):

LayoutTests:

  • storage/indexeddb/modern/idbobjectstore-getkey-1-expected.txt: Added.
  • storage/indexeddb/modern/idbobjectstore-getkey-1-private-expected.txt: Added.
  • storage/indexeddb/modern/idbobjectstore-getkey-1-private.html: Added.
  • storage/indexeddb/modern/idbobjectstore-getkey-1.html: Added.
  • storage/indexeddb/modern/resources/idbobjectstore-getkey-1.js: Added.
1:23 PM Changeset in webkit [209196] by ggaren@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

Removed some unnecessary indirection in code generation
https://bugs.webkit.org/show_bug.cgi?id=165264

Reviewed by Keith Miller.

There's no need to route through JSGlobalObject when producing code --
it just made the code harder to read.

This patch moves functions from JSGlobalObject to their singleton
call sites.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedEvalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalEvalCodeBlock): Deleted.

  • runtime/CodeCache.h:
  • runtime/DirectEvalExecutable.cpp:

(JSC::DirectEvalExecutable::create):

  • runtime/IndirectEvalExecutable.cpp:

(JSC::IndirectEvalExecutable::create):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createProgramCodeBlock): Deleted.
(JSC::JSGlobalObject::createLocalEvalCodeBlock): Deleted.
(JSC::JSGlobalObject::createGlobalEvalCodeBlock): Deleted.
(JSC::JSGlobalObject::createModuleProgramCodeBlock): Deleted.

  • runtime/JSGlobalObject.h:
  • runtime/ModuleProgramExecutable.cpp:

(JSC::ModuleProgramExecutable::create):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/ProgramExecutable.h:
1:22 PM Changeset in webkit [209195] by commit-queue@webkit.org
  • 13 edits in trunk/Source/WebCore

Misc. cleanup in Modules/fetch
https://bugs.webkit.org/show_bug.cgi?id=165240

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-12-01
Reviewed by Darin Adler.

  • Modules/fetch/DOMWindowFetch.h:
  • Modules/fetch/FetchBody.cpp:
  • Modules/fetch/FetchBody.h:
  • Modules/fetch/FetchBodyConsumer.cpp:
  • Modules/fetch/FetchBodyOwner.cpp:
  • Modules/fetch/FetchBodyOwner.h:
  • Modules/fetch/FetchInternals.js:

(consumeStream):

  • Modules/fetch/FetchLoader.cpp:
  • Modules/fetch/FetchResponse.h:

Remove unnecessary includes and forward declarations.

  • Modules/fetch/DOMWindowFetch.js:

(fetch):

  • Modules/fetch/FetchResponse.js:

(initializeFetchResponse):

  • Modules/fetch/WorkerGlobalScopeFetch.js:

(fetch):
Improve style.

1:10 PM Changeset in webkit [209194] by graouts@webkit.org
  • 3 edits
    6 adds in trunk

[Modern Media Controls] Turn off text selection
https://bugs.webkit.org/show_bug.cgi?id=165261

Reviewed by Dean Jackson.

We turn off text selection and force a non-text cursor for all text in media controls.

Tests: media/modern-media-controls/airplay-placard/airplay-placard-text-section.html

media/modern-media-controls/pip-placard/pip-placard-text-section.html
media/modern-media-controls/status-label/status-label-text-selection.html

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls):

1:09 PM MathML/Fonts edited by fred.wang@free.fr
(diff)
12:33 PM Changeset in webkit [209193] by Chris Dumez
  • 6 edits in trunk

Parameter to DOMStringList.contains() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=165257

Reviewed by Alex Christensen.

Source/WebCore:

Parameter to DOMStringList.contains() should be mandatory.
Gecko and Blink have it mandatory but WebKit had it optional and the
string 'undefined" was used by default, which is not helpful.

No new tests, updated existing test.

  • dom/DOMStringList.idl:

LayoutTests:

Extend layout test coverage.

  • storage/indexeddb/database-basics-expected.txt:
  • storage/indexeddb/resources/database-basics.js:

(checkObjectStore):

12:12 PM Changeset in webkit [209192] by Beth Dakin
  • 3 edits in trunk/Tools

Force clicking tests fail on some machines
https://bugs.webkit.org/show_bug.cgi?id=165263

Reviewed by Tim Horton.

Initialize com.apple.trackpad.forceClick to 1 so that we don’t have to depend on
the user account having this feature enabled.

  • WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:

(WTR::InjectedBundle::platformInitialize):

  • WebKitTestRunner/mac/main.mm:

(setDefaultsToConsistentValuesForTesting):

11:42 AM Changeset in webkit [209191] by jiewen_tan@apple.com
  • 6 edits
    2 adds in trunk

SubtleCrypto::deriveBits always return NOT_SUPPORTED_ERR for now
https://bugs.webkit.org/show_bug.cgi?id=164745
<rdar://problem/29258118>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

Since we don't support any cryptography algorithms that has deriveBits operations,
SubtleCrypto::deriveBits will always return NOT_SUPPORTED_ERR for now.

Test: crypto/subtle/deriveBits-malformed-parameters.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionDeriveBitsPromise):
(WebCore::JSSubtleCrypto::deriveBits):

  • crypto/SubtleCrypto.idl:

LayoutTests:

  • crypto/subtle/deriveBits-malformed-parameters-expected.txt: Added.
  • crypto/subtle/deriveBits-malformed-parameters.html: Added.
11:33 AM Changeset in webkit [209190] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165262

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
11:31 AM Changeset in webkit [209189] by Antti Koivisto
  • 12 edits in trunk/Source/WebKit2

Revert r208931
https://bugs.webkit.org/show_bug.cgi?id=164924

PLT regression.

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::makeCacheKey):
(WebKit::NetworkCache::Cache::makeCacheKey): Deleted.

  • NetworkProcess/cache/NetworkCache.h:
  • NetworkProcess/cache/NetworkCacheBlobStorage.cpp:

(WebKit::NetworkCache::BlobStorage::BlobStorage):
(WebKit::NetworkCache::BlobStorage::add):
(WebKit::NetworkCache::BlobStorage::get):

  • NetworkProcess/cache/NetworkCacheBlobStorage.h:
  • NetworkProcess/cache/NetworkCacheData.cpp:

(WebKit::NetworkCache::computeSHA1):
(WebKit::NetworkCache::makeSalt): Deleted.
(WebKit::NetworkCache::readOrMakeSalt): Deleted.

  • NetworkProcess/cache/NetworkCacheData.h:
  • NetworkProcess/cache/NetworkCacheKey.cpp:

(WebKit::NetworkCache::noPartitionString):
(WebKit::NetworkCache::Key::Key):
(WebKit::NetworkCache::Key::hasPartition):
(WebKit::NetworkCache::Key::computeHash):
(WebKit::NetworkCache::Key::hashAsString):
(WebKit::NetworkCache::Key::computePartitionHash): Deleted.

  • NetworkProcess/cache/NetworkCacheKey.h:

(WebKit::NetworkCache::Key::hash):
(WebKit::NetworkCache::Key::partitionHash): Deleted.
(WebKit::NetworkCache::Key::hashAsString): Deleted.
(WebKit::NetworkCache::Key::partitionHashAsString): Deleted.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::makeSubresourcesKey):
(WebKit::NetworkCache::constructRevalidationRequest):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::saveToDiskIfReady):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::Storage::open):
(WebKit::NetworkCache::traverseRecordsFiles):
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::recordDirectoryPathForKey):
(WebKit::NetworkCache::decodeRecordHeader):
(WebKit::NetworkCache::Storage::readRecord):
(WebKit::NetworkCache::Storage::encodeRecord):
(WebKit::NetworkCache::Storage::traverse):
(WebKit::NetworkCache::makeSaltFilePath): Deleted.

  • NetworkProcess/cache/NetworkCacheStorage.h:

(WebKit::NetworkCache::Storage::salt): Deleted.

11:27 AM Changeset in webkit [209188] by eric.carlson@apple.com
  • 3 edits in trunk/Source/WebCore

[MediaStream][Mac] Video presets sometimes don't work
https://bugs.webkit.org/show_bug.cgi?id=165214
<rdar://problem/29444533>

Reviewed by Jer Noble.

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::setPreset): Set videoSettings width and height.
(WebCore::AVVideoCaptureSource::setupCaptureSession): Store videoSettings object for later use.

Set videoSettings width and height.

(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions):
(WebCore::AVVideoCaptureSource::sizeForPreset): New.

10:41 AM Changeset in webkit [209187] by graouts@webkit.org
  • 7 edits
    2 adds in trunk

[Modern Media Controls] Promote the "on" property from AirPlayButton to IconButton
https://bugs.webkit.org/show_bug.cgi?id=165260

Reviewed by NOBODY (OOPS!).

With the fix for https://bugs.webkit.org/show_bug.cgi?id=165239 we now set the "on"
property for the TracksButton as well, so it makes sense to provide that property
for all IconButton subclasses, not just AirplayButton.

Test: media/modern-media-controls/icon-button/icon-button-on.html

  • Modules/modern-media-controls/controls/airplay-button.css:

(button.airplay.on):

  • Modules/modern-media-controls/controls/airplay-button.js:

(AirplayButton):
(AirplayButton.prototype.get on): Deleted.
(AirplayButton.prototype.set on): Deleted.

  • Modules/modern-media-controls/controls/icon-button.css:

(button.icon:active,):
(button.icon:active): Deleted.

  • Modules/modern-media-controls/controls/icon-button.js:

(IconButton.prototype.get on):
(IconButton.prototype.set on):

10:38 AM Changeset in webkit [209186] by graouts@webkit.org
  • 3 edits
    2 adds in trunk/LayoutTests

[Modern Media Controls] Fix media/modern-media-controls/status-label/status-label.html
https://bugs.webkit.org/show_bug.cgi?id=165259

Reviewed by Dean Jackson.

We broke the test at media/modern-media-controls/status-label/status-label.html with the
fix for https://bugs.webkit.org/show_bug.cgi?id=165239 since the test would test the
font-family for a StatusLabel which would only inherited to be -apple-system when hosted
in a MediaControls instance. We now remove this assertion and added a dedicated test
for when a StatusLabel is hosted in a MediaControls.

  • media/modern-media-controls/status-label/status-label-expected.txt:
  • media/modern-media-controls/status-label/status-label-font-expected.txt: Added.
  • media/modern-media-controls/status-label/status-label-font.html: Added.
  • media/modern-media-controls/status-label/status-label.html:
10:35 AM Changeset in webkit [209185] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165258

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
10:04 AM Changeset in webkit [209184] by weinig@apple.com
  • 39 edits
    2 moves
    4 adds
    1 delete in trunk

[WebIDL] Remove custom bindings for File and Blob constructors
https://bugs.webkit.org/show_bug.cgi?id=165218

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/basic/request-headers-expected.txt:
  • web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt:

Update results (still failing) to account for stricter rules about dictionary default values.

Source/WebCore:

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

Add/remove new files.

  • bindings/js/JSBlobCustom.cpp:

(WebCore::constructJSBlob): Deleted.

  • bindings/js/JSFileCustom.cpp: Removed.

Remove custom constructors.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDefaultValue):
(GenerateDictionaryImplementationContent):
(GenerateParametersCheck):
Add support for optional sequences without default values. Move string default value
optimizations into GenerateDefaultValue.

  • fileapi/Blob.cpp:

(WebCore::Blob::Blob):

  • fileapi/Blob.h:

(WebCore::Blob::create):

  • fileapi/Blob.idl:
  • fileapi/File.cpp:

(WebCore::File::File):

  • fileapi/File.h:
  • fileapi/File.idl:

Add support for the generated constructors.

  • fileapi/BlobBuilder.cpp: Copied from Source/WebCore/fileapi/WebKitBlobBuilder.cpp.
  • fileapi/BlobBuilder.h: Copied from Source/WebCore/fileapi/WebKitBlobBuilder.h.
  • fileapi/WebKitBlobBuilder.cpp: Removed.
  • fileapi/WebKitBlobBuilder.h: Removed.

Rename WebKitBlobBuilder to BlobBuilder, and update to work with generated constructor.

  • fileapi/BlobPropertyBag.h: Added.
  • fileapi/BlobPropertyBag.idl: Added.

Added.

  • fileapi/ThreadableBlobRegistry.cpp:

(WebCore::ThreadableBlobRegistry::registerBlobURL):

  • fileapi/ThreadableBlobRegistry.h:
  • platform/network/BlobRegistry.h:
  • platform/network/BlobRegistryImpl.cpp:

(WebCore::BlobRegistryImpl::registerBlobURL):

  • platform/network/BlobRegistryImpl.h:

Avoid copies of the BlobPart Vector.

  • platform/network/BlobPart.h:

Replace header-guards with #pragma once.

Source/WebKit2:

  • NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:

(WebKit::NetworkBlobRegistry::registerBlobURL):

  • NetworkProcess/FileAPI/NetworkBlobRegistry.h:
  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::registerBlobURL):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
  • WebProcess/FileAPI/BlobRegistryProxy.cpp:

(WebKit::BlobRegistryProxy::registerBlobURL):

  • WebProcess/FileAPI/BlobRegistryProxy.h:

Avoid copies of the BlobPart Vector.

LayoutTests:

  • fast/files/blob-constructor-expected.txt:
  • fast/files/file-constructor-expected.txt:
  • fast/files/file-constructor.html:
  • fast/files/script-tests/blob-constructor.js:

Update for stricter parsing and changed error text. (The error text
is regressed, but consistent with all generated bindings. I will work
on making improvements on this soon.)

  • http/tests/fetch/fetch-as-blob.js:

Update to account for stricter rules about dictionary default values.

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

Marking media/modern-media-controls/audio/audio-controls-buttons.html as a timeout.
https://bugs.webkit.org/show_bug.cgi?id=165234

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:16 AM Changeset in webkit [209182] by graouts@webkit.org
  • 13 edits
    19 adds in trunk

[Modern Media Controls] Provide a UI object to show a list of tracks
https://bugs.webkit.org/show_bug.cgi?id=165239

Reviewed by Dean Jackson.

We add a new TracksPanel object which we will be using to display a list of
audio and text tracks. The tracks panel can be shown by calling showTracksPanel()
on a MacOSMediaControls object and will be dismissed by hitting the Escape key
or mousing down outside of the panel's bounds. While the tracks panel is up,
arrows can be used to focus individual tracks which can be activated by either
pressing the Space bar or Enter key.

Activating a track will briefly animate its background to indicate selection and
dismissing the tracks panel is also animated with a quick fade-out animation.

Data for the tracks panel is provided by specifying a dataSource property and
implementing the required methods to provide the number of sections in the panel,
the number of tracks in each section, etc.

Tests: media/modern-media-controls/tracks-panel/tracks-panel-hide-click-outside.html

media/modern-media-controls/tracks-panel/tracks-panel-hide-esc-key.html
media/modern-media-controls/tracks-panel/tracks-panel-hide.html
media/modern-media-controls/tracks-panel/tracks-panel-population.html
media/modern-media-controls/tracks-panel/tracks-panel-right-x.html
media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-keyboard.html
media/modern-media-controls/tracks-panel/tracks-panel-select-track-with-mouse.html
media/modern-media-controls/tracks-panel/tracks-panel.html

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen):
(.media-controls.mac.fullscreen > .controls-bar):
(.media-controls.mac.fullscreen .tracks-panel):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.css:

(.media-controls.mac.inline .tracks-panel):

  • Modules/modern-media-controls/controls/macos-media-controls.js:

(MacOSMediaControls.prototype.showTracksPanel):
(MacOSMediaControls.prototype.hideTracksPanel):
(MacOSMediaControls):

  • Modules/modern-media-controls/controls/media-controls.css:

(.media-controls):

  • Modules/modern-media-controls/controls/placard.css:

(.placard):

  • Modules/modern-media-controls/controls/status-label.css:

(.status-label):

  • Modules/modern-media-controls/controls/tracks-panel.css: Added.

(.tracks-panel):
(.tracks-panel *):
(.tracks-panel.fade-out):
(.tracks-panel-section):
(.tracks-panel-section:first-of-type):
(.tracks-panel-section > h3):
(.tracks-panel-section > ul):
(.tracks-panel-section > ul > li):
(.tracks-panel-section > ul > li:focus):
(.tracks-panel-section > ul > li.selected:before):
(.tracks-panel-section > ul > li.animated):
(@keyframes tracks-panel-item-selection):
(22.22%):

  • Modules/modern-media-controls/controls/tracks-panel.js: Added.

(TracksPanel.prototype.get presented):
(TracksPanel.prototype.presentInParent):
(TracksPanel.prototype.hide):
(TracksPanel.prototype.get rightX):
(TracksPanel.prototype.set rightX):
(TracksPanel.prototype.trackNodeSelectionAnimationDidEnd):
(TracksPanel.prototype.mouseMovedOverTrackNode):
(TracksPanel.prototype.mouseExitedTrackNode):
(TracksPanel.prototype.commitProperty):
(TracksPanel.prototype.handleEvent):
(TracksPanel.prototype._childrenFromDataSource.):
(TracksPanel.prototype._childrenFromDataSource):
(TracksPanel.prototype._handleMousedown):
(TracksPanel.prototype._handleKeydown):
(TracksPanel.prototype._dismiss):
(TracksPanel.prototype._focusTrackNode):
(TracksPanel.prototype._focusPreviousTrackNode):
(TracksPanel.prototype._focusNextTrackNode):
(TracksPanel.prototype._focusFirstTrackNode):
(TracksPanel.prototype._focusLastTrackNode):
(TrackNode):
(TrackNode.prototype.activate):
(TrackNode.prototype.handleEvent):
(TrackNode.prototype._animationDidEnd):

  • Modules/modern-media-controls/js-files:
  • WebCore.xcodeproj/project.pbxproj:
8:15 AM Changeset in webkit [209181] by akling@apple.com
  • 7 edits
    3 adds in trunk/Source/WebCore

Log some basic memory usage stats at interesting points in time
<https://webkit.org/b/165206>

Reviewed by Antti Koivisto.

This patch adds a mechanism to mark points of interests where we might
want to do performance-related logging:

class PerformanceLogging {

enum PointOfInterest {

MainFrameLoadStarted,
MainFrameLoadCompleted,

}
void didReachPointOfInterest(PointOfInterest)

}

You get to this object via MainFrame::performanceLogging().

We respond to these callbacks by logging some basic data about memory usage
to the PerformanceLogging channel.

More PointOfInterest values will be added soon.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::setState):

  • page/MainFrame.cpp:

(WebCore::MainFrame::MainFrame):

  • page/MainFrame.h:
  • page/PerformanceLogging.cpp: Added.

(WebCore::toString):
(WebCore::getMemoryUsageStatistics):
(WebCore::PerformanceLogging::PerformanceLogging):
(WebCore::writeLog):
(WebCore::PerformanceLogging::didReachPointOfInterest):
(WebCore::PerformanceLogging::getPlatformMemoryUsageStatistics):

  • page/PerformanceLogging.h: Added.
  • page/cocoa/PerformanceLoggingCocoa.mm: Added.

(WebCore::PerformanceLogging::getPlatformMemoryUsageStatistics):

  • platform/Logging.h:
3:05 AM Changeset in webkit [209180] by svillar@igalia.com
  • 3 edits in trunk/Source/WebCore

[css-grid] Move more attributes from RenderGrid to the new Grid class
https://bugs.webkit.org/show_bug.cgi?id=165094

Reviewed by Darin Adler.

Moved more attributes from RenderGrid to Grid as they are not really part of the state of
the RenderGrid object. In particular m_autoRepeat{Columns|Rows},
m_autoRepeatEmpty{Columns|Rows} and m_orderIterator. All of them are now private attributes
of the Grid class so clients should use the getters/setters provided by this patch.

This change allows to definitely remove the grid{Column|Row}Count() methods from
RenderGrid. These two became Grid::numTracks() which returns the number of tracks in the
data structure used to represent the grid (currently a matrix). Contrary to that,
RenderGrid::numTracks() returns the actual size of the grid.

No new tests as this is a refactoring.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::Grid::numTracks):
(WebCore::RenderGrid::Grid::ensureGridSize):
(WebCore::RenderGrid::Grid::setAutoRepeatTracks):
(WebCore::RenderGrid::Grid::autoRepeatTracks):
(WebCore::RenderGrid::Grid::setAutoRepeatEmptyColumns):
(WebCore::RenderGrid::Grid::setAutoRepeatEmptyRows):
(WebCore::RenderGrid::Grid::hasAutoRepeatEmptyTracks):
(WebCore::RenderGrid::Grid::isEmptyAutoRepeatTrack):
(WebCore::RenderGrid::Grid::autoRepeatEmptyTracks):
(WebCore::RenderGrid::Grid::gridItemSpan):
(WebCore::RenderGrid::Grid::clear):
(WebCore::RenderGrid::RenderGrid):
(WebCore::RenderGrid::computeTrackSizesForDirection):
(WebCore::RenderGrid::guttersSize):
(WebCore::RenderGrid::computeIntrinsicLogicalHeight):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::rawGridTrackSize):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::trackSizesForComputedStyle):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):
(WebCore::RenderGrid::gridAreaBreadthForChild):
(WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
(WebCore::RenderGrid::populateGridPositionsForDirection):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::RenderGrid::numTracks):
(WebCore::RenderGrid::paintChildren):
(WebCore::RenderGrid::gridColumnCount): Deleted.
(WebCore::RenderGrid::gridRowCount): Deleted.
(WebCore::RenderGrid::hasAutoRepeatEmptyTracks): Deleted.
(WebCore::RenderGrid::isEmptyAutoRepeatTrack): Deleted.
(WebCore::RenderGrid::cachedGridSpan): Deleted.

  • rendering/RenderGrid.h:

(WebCore::RenderGrid::autoRepeatCountForDirection): Deleted.

1:24 AM Changeset in webkit [209179] by Yusuke Suzuki
  • 7 edits in trunk

Introduce StringImpl::StaticStringImpl with constexpr constructor
https://bugs.webkit.org/show_bug.cgi?id=165093

Reviewed by Darin Adler.

Source/WTF:

This patch adds new class, StringImpl::StaticStringImpl.
By using this class, we can easily create static StringImpls.
This class has constexpr constructor. You can initialize instances
of this class as global static variables without invoking global
constructors.

We already have similar system, StaticASCIILiteral. But using it
requires some special perl script since we need to calculate
hash value. On the other hand, we can use StaticStringImpl without
any script supports since we implement constexpr hash function.
In the future, we will replace all the use of StaticASCIILiteral
with this StaticStringImpl.

We define empty / null strings as StaticStringImpl. And we make
StringImpl::empty() & StringImpl::null() inline functions.

  • wtf/Hasher.h:

(WTF::StringHasher::hashWithTop8BitsMasked):
(WTF::StringHasher::hash):
(WTF::StringHasher::finalize):
(WTF::StringHasher::finalizeAndMaskTop8Bits):
(WTF::StringHasher::computeLiteralHash):
(WTF::StringHasher::computeLiteralHashAndMaskTop8Bits):
(WTF::StringHasher::avalancheBits3):
(WTF::StringHasher::avalancheBits2):
(WTF::StringHasher::avalancheBits1):
(WTF::StringHasher::avalancheBits0):
(WTF::StringHasher::avalancheBits):
(WTF::StringHasher::avoidZero):
(WTF::StringHasher::processPendingCharacter):
(WTF::StringHasher::calculateWithRemainingLastCharacter1):
(WTF::StringHasher::calculateWithRemainingLastCharacter0):
(WTF::StringHasher::calculateWithRemainingLastCharacter):
(WTF::StringHasher::calculate1):
(WTF::StringHasher::calculate0):
(WTF::StringHasher::calculate):
(WTF::StringHasher::computeLiteralHashImpl):

  • wtf/text/StringImpl.cpp:
  • wtf/text/StringImpl.h:

(WTF::StringImpl::StaticStringImpl::StaticStringImpl):
(WTF::StringImpl::null):
(WTF::StringImpl::empty):

  • wtf/text/StringStatics.cpp:

(WTF::StringImpl::null): Deleted.
(WTF::StringImpl::empty): Deleted.

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

1:22 AM Changeset in webkit [209178] by pvollan@apple.com
  • 3 edits in trunk/JSTests

[Win] Skip failing JSC tests.
https://bugs.webkit.org/show_bug.cgi?id=165140

Reviewed by Mark Lam.

  • ChakraCore.yaml:
  • microbenchmarks/tan.js:

Nov 30, 2016:

11:51 PM Changeset in webkit [209177] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebKit2

[GTK] UI process crash in WebKit::WaylandCompositor::Surface::prepareTextureForPainting
https://bugs.webkit.org/show_bug.cgi?id=164911

Reviewed by Michael Catanzaro.

The problem is that m_buffer is nullptr in Surface::prepareTextureForPainting() even though we have already an
image. We only use the buffer to get the image size, so we could save the image size when the image is created,
and then we don't need to care about the buffer anymore.

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::WaylandCompositor::Surface::prepareTextureForPainting):
(WebKit::WaylandCompositor::Surface::commit):

  • UIProcess/gtk/WaylandCompositor.h:
11:05 PM Changeset in webkit [209176] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r209168.

Caused 2 API tests to fail

Reverted changeset:

"IndexedDB: When doing puts, don't
"updateAllIndexesForAddRecord" if there are no indexes."
https://bugs.webkit.org/show_bug.cgi?id=165215
http://trac.webkit.org/changeset/209168

11:04 PM Changeset in webkit [209175] by jfbastien@apple.com
  • 22 edits in trunk

WebAssembly: update binary format to 0xD version
https://bugs.webkit.org/show_bug.cgi?id=164724

Reviewed by Saam Barati.

As described in the following PR: https://github.com/WebAssembly/design/pull/836

JSTests:

  • wasm/Builder.js:

(const._normalizeFunctionSignature):

  • wasm/Builder_WebAssemblyBinary.js:

(const.emitters.Type):
(const.emitters.Code):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.block_type):
(export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.

  • wasm/WASM.js:
  • wasm/js-api/test_basic_api.js:
  • wasm/self-test/test_BuilderWebAssembly.js:

(EmptyModule):
(CustomSection):

  • wasm/self-test/test_WASM.js:
  • wasm/wasm.json:

Source/JavaScriptCore:

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):

  • wasm/WasmCallingConvention.h:

(JSC::Wasm::CallingConvention::marshallArgument):

  • wasm/WasmFormat.cpp:

(JSC::Wasm::toString): Deleted.

  • wasm/WasmFormat.h:

(JSC::Wasm::isValueType):
(JSC::Wasm::toB3Type): Deleted.

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):

  • wasm/WasmModuleParser.h:
  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseResultType):

  • wasm/generateWasm.py:

(Wasm.init):

  • wasm/generateWasmOpsHeader.py:

(cppMacro):
(typeMacroizer):
(opcodeMacroizer):

  • wasm/wasm.json:
9:25 PM Changeset in webkit [209174] by Gyuyoung Kim
  • 2 edits in trunk/Source/WebCore

Build break when using --minimal
https://bugs.webkit.org/show_bug.cgi?id=165238

Reviewed by Darin Adler.

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumePseudo): Use #if ENABLE(VIDEO_TRACK) guard.

8:32 PM Changeset in webkit [209173] by Darin Adler
  • 5 edits in trunk/Source

Roll out StringBuilder changes from the previous patch.
They were a slowdown on a Kraken JSON test.

7:56 PM Changeset in webkit [209172] by Yusuke Suzuki
  • 3 edits
    2 adds in trunk

[JSC] Specifying same module entry point multiple times cause TypeError
https://bugs.webkit.org/show_bug.cgi?id=164858

Reviewed by Saam Barati.

Source/JavaScriptCore:

Allow importing the same module multiple times. Previously, when specifying the same
module in the <script type="module" src="here">, it throws TypeError.

  • builtins/ModuleLoaderPrototype.js:

(requestFetch):
(requestTranslate):
(requestInstantiate):
(requestSatisfy):

LayoutTests:

  • js/dom/modules/module-load-same-module-from-different-entry-point-in-src-expected.txt: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-in-src.html: Added.
7:54 PM Changeset in webkit [209171] by Yusuke Suzuki
  • 11 edits in trunk/Source/JavaScriptCore

WebAssembly JS API: export a module namespace object instead of a module environment
https://bugs.webkit.org/show_bug.cgi?id=165121

Reviewed by Saam Barati.

This patch setup AbstractModuleRecord further for WebAssemblyModuleRecord.
For exported entries in a wasm instance, we set up exported entries for
AbstractModuleRecord. This allows us to export WASM exported functions in
the module handling code.

Since the exported entries in the abstract module record are correctly
instantiated, the module namespace object for WASM module also starts
working correctly. So we start exposing the module namespace object
as instance.exports instead of the module environment object.

And we move SourceCode, lexicalVariables, and declaredVariables fields to
JSModuleRecord since they are related to JS source code (in the spec words,
they are related to the source text module record).

  • runtime/AbstractModuleRecord.cpp:

(JSC::AbstractModuleRecord::AbstractModuleRecord):

  • runtime/AbstractModuleRecord.h:

(JSC::AbstractModuleRecord::sourceCode): Deleted.
(JSC::AbstractModuleRecord::declaredVariables): Deleted.
(JSC::AbstractModuleRecord::lexicalVariables): Deleted.

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::JSModuleRecord):

  • runtime/JSModuleRecord.h:

(JSC::JSModuleRecord::sourceCode):
(JSC::JSModuleRecord::declaredVariables):
(JSC::JSModuleRecord::lexicalVariables):

  • wasm/WasmFormat.cpp:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finishCreation):

  • wasm/js/WebAssemblyFunction.cpp:
  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyModuleRecord.cpp:

(JSC::WebAssemblyModuleRecord::create):
(JSC::WebAssemblyModuleRecord::WebAssemblyModuleRecord):
(JSC::WebAssemblyModuleRecord::finishCreation):
WebAssemblyModuleRecord::link should perform linking things.
So allocating exported entries should be done here.
(JSC::WebAssemblyModuleRecord::link):

  • wasm/js/WebAssemblyModuleRecord.h:
7:20 PM Changeset in webkit [209170] by commit-queue@webkit.org
  • 7 edits
    2 adds in trunk

[Modern Media Controls] Add support for right-to-left layouts
https://bugs.webkit.org/show_bug.cgi?id=165229

Patch by Antoine Quint <Antoine Quint> on 2016-11-30
Reviewed by Dean Jackson.

Source/WebCore:

We implement the "usesLTRUserInterfaceLayoutDirection" property which is set by HTMLMediaElement
and set a CSS class when the layout is left-to-right, flipping the fullscreen volume slider in the
case that it would not be present (right-to-left).

Test: media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:

(.media-controls.mac.fullscreen:not(.uses-ltr-user-interface-layout-direction) .volume.slider):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.get usesLTRUserInterfaceLayoutDirection):
(MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):
(MediaController.prototype._updateControlsIfNeeded):

LayoutTests:

Add a test that toggles the layout direction and checks we correctly flip the volume slider.

  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr-expected.txt: Added.
  • media/modern-media-controls/media-controller/media-controller-fullscreen-ltr.html: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
7:16 PM Changeset in webkit [209169] by commit-queue@webkit.org
  • 6 edits in trunk/Source/WebCore

Web Inspector: Remove unused parameter of InspectorInstrumentation::didFinishXHRLoading
https://bugs.webkit.org/show_bug.cgi?id=165233

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

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::didFinishXHRLoading):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::didFinishXHRLoading):

  • inspector/InspectorNetworkAgent.h:
  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::didFinishLoading):
Remove unused ThreadableLoaderClient parameter.

6:42 PM Changeset in webkit [209168] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

IndexedDB: When doing puts, don't "updateAllIndexesForAddRecord" if there are no indexes.
https://bugs.webkit.org/show_bug.cgi?id=165215

Reviewed by Alex Christensen.

No new tests (No observable behavior change).

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Don't "updateAllIndexesForAddRecord" if there are no indexes.

Avoiding this saved us some IDBKey serialization and Javascript object manipulation.

6:33 PM Changeset in webkit [209167] by commit-queue@webkit.org
  • 14 edits in trunk

[Modern Media Controls] LayoutNode: only mark properties as dirty if different than current value
https://bugs.webkit.org/show_bug.cgi?id=165236

Patch by Antoine Quint <Antoine Quint> on 2016-11-30
Reviewed by Simon Fraser.

Source/WebCore:

Check that the new value is different than the current value before marking the property as dirty.

  • Modules/modern-media-controls/controls/layout-node.js:

(LayoutNode.prototype.set x):
(LayoutNode.prototype.set y):
(LayoutNode.prototype.set width):
(LayoutNode.prototype.set height):
(LayoutNode.prototype.set visible):
(performScheduledLayout):

  • Modules/modern-media-controls/controls/scheduler.js:

(const.scheduler.new.prototype.get hasScheduledLayoutCallbacks):

LayoutTests:

Update LayoutNode property tests to check that setting a given property to the
same value doesn't schedule an update.

  • media/modern-media-controls/layout-node/height-expected.txt:
  • media/modern-media-controls/layout-node/height.html:
  • media/modern-media-controls/layout-node/visible-expected.txt:
  • media/modern-media-controls/layout-node/visible.html:
  • media/modern-media-controls/layout-node/width-expected.txt:
  • media/modern-media-controls/layout-node/width.html:
  • media/modern-media-controls/layout-node/x-expected.txt:
  • media/modern-media-controls/layout-node/x.html:
  • media/modern-media-controls/layout-node/y-expected.txt:
  • media/modern-media-controls/layout-node/y.html:
5:11 PM Changeset in webkit [209166] by jiewen_tan@apple.com
  • 6 edits
    2 adds in trunk

SubtleCrypto::deriveKey always return NOT_SUPPORTED_ERR for now
https://bugs.webkit.org/show_bug.cgi?id=164744
<rdar://problem/29258083>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

Since we don't support any cryptography algorithms that has deriveKey operations,
SubtleCrypto::deriveKey will always return NOT_SUPPORTED_ERR for now.

Test: crypto/subtle/deriveKey-malformed-parameters.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionDeriveKeyPromise):
(WebCore::JSSubtleCrypto::deriveKey):

  • crypto/SubtleCrypto.idl:

LayoutTests:

  • crypto/subtle/deriveKey-malformed-parameters-expected.txt: Added.
  • crypto/subtle/deriveKey-malformed-parameters.html: Added.
5:03 PM Changeset in webkit [209165] by jfbastien@apple.com
  • 25 edits in trunk/JSTests

WebAssembly builder: don't throw when checker not implemented
https://bugs.webkit.org/show_bug.cgi?id=165219

Reviewed by Mark Lam.

We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.

  • wasm/Builder.js:
  • wasm/README.md:
  • wasm/function-tests/add-12.js:
  • wasm/function-tests/br-if-loop-less-than.js:
  • wasm/function-tests/brTableAsIf.js:
  • wasm/function-tests/brTableManyValues.js:
  • wasm/function-tests/brTableWithLoop.js:
  • wasm/function-tests/dumb-eq-if-then-else.js:
  • wasm/function-tests/dumb-less-than-fallthrough.js:
  • wasm/function-tests/dumb-less-than-ite.js:
  • wasm/function-tests/eqz.js:
  • wasm/function-tests/factorial.js:
  • wasm/function-tests/float-sub.js:
  • wasm/function-tests/i32-load.js:
  • wasm/function-tests/i32-load8-s.js:
  • wasm/function-tests/if-then-else-fallthrough.js:
  • wasm/function-tests/if-then-fallthrough.js:
  • wasm/function-tests/loop-mult.js:
  • wasm/function-tests/loop-sum.js:
  • wasm/function-tests/max.js:
  • wasm/function-tests/min.js:
  • wasm/function-tests/ret5.js:
  • wasm/function-tests/select.js:
  • wasm/self-test/test_BuilderJSON.js:
4:28 PM Changeset in webkit [209164] by jiewen_tan@apple.com
  • 19 edits
    27 adds in trunk

Update SubtleCrypto::digest to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164742
<rdar://problem/29258037>

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • WebCryptoAPI/digest/test_digest-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch updates the SubtleCrypto::digest method to match the latest spec:
https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-digest.
It also refers to the latest Editor's Draft to a certain degree:
https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-digest.
Currently supported digest algorithms are SHA-1, SHA-224, SHA-256, SHA-384,
and SHA-512.

Tests: crypto/subtle/digest-malformed-parameters.html

crypto/subtle/sha1-digest.html
crypto/subtle/sha224-digest.html
crypto/subtle/sha256-digest.html
crypto/subtle/sha384-digest.html
crypto/subtle/sha512-digest.html
crypto/workers/subtle/sha1-digest.html
crypto/workers/subtle/sha224-digest.html
crypto/workers/subtle/sha256-digest.html
crypto/workers/subtle/sha384-digest.html
crypto/workers/subtle/sha512-digest.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::jsSubtleCryptoFunctionDigestPromise):
(WebCore::JSSubtleCrypto::digest):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::digest):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmSHA1.cpp:

(WebCore::CryptoAlgorithmSHA1::digest):

  • crypto/algorithms/CryptoAlgorithmSHA1.h:
  • crypto/algorithms/CryptoAlgorithmSHA224.cpp:

(WebCore::CryptoAlgorithmSHA224::digest):

  • crypto/algorithms/CryptoAlgorithmSHA224.h:
  • crypto/algorithms/CryptoAlgorithmSHA256.cpp:

(WebCore::CryptoAlgorithmSHA256::digest):

  • crypto/algorithms/CryptoAlgorithmSHA256.h:
  • crypto/algorithms/CryptoAlgorithmSHA384.cpp:

(WebCore::CryptoAlgorithmSHA384::digest):

  • crypto/algorithms/CryptoAlgorithmSHA384.h:
  • crypto/algorithms/CryptoAlgorithmSHA512.cpp:

(WebCore::CryptoAlgorithmSHA512::digest):

  • crypto/algorithms/CryptoAlgorithmSHA512.h:

LayoutTests:

  • crypto/subtle/digest-malformed-parameters-expected.txt: Added.
  • crypto/subtle/digest-malformed-parameters.html: Added.
  • crypto/subtle/sha1-digest-expected.txt: Added.
  • crypto/subtle/sha1-digest.html: Added.
  • crypto/subtle/sha224-digest-expected.txt: Added.
  • crypto/subtle/sha224-digest.html: Added.
  • crypto/subtle/sha256-digest-expected.txt: Added.
  • crypto/subtle/sha256-digest.html: Added.
  • crypto/subtle/sha384-digest-expected.txt: Added.
  • crypto/subtle/sha384-digest.html: Added.
  • crypto/subtle/sha512-digest-expected.txt: Added.
  • crypto/subtle/sha512-digest.html: Added.
  • crypto/workers/subtle/resources/sha1-digest.js: Added.
  • crypto/workers/subtle/resources/sha224-digest.js: Added.
  • crypto/workers/subtle/resources/sha256-digest.js: Added.
  • crypto/workers/subtle/resources/sha384-digest.js: Added.
  • crypto/workers/subtle/resources/sha512-digest.js: Added.
  • crypto/workers/subtle/sha1-digest-expected.txt: Added.
  • crypto/workers/subtle/sha1-digest.html: Added.
  • crypto/workers/subtle/sha224-digest-expected.txt: Added.
  • crypto/workers/subtle/sha224-digest.html: Added.
  • crypto/workers/subtle/sha256-digest-expected.txt: Added.
  • crypto/workers/subtle/sha256-digest.html: Added.
  • crypto/workers/subtle/sha384-digest-expected.txt: Added.
  • crypto/workers/subtle/sha384-digest.html: Added.
  • crypto/workers/subtle/sha512-digest-expected.txt: Added.
  • crypto/workers/subtle/sha512-digest.html: Added.
4:14 PM Changeset in webkit [209163] by graouts@webkit.org
  • 5 edits
    5 adds in trunk

[Modern Media Controls] UI Library: <audio> controls
https://bugs.webkit.org/show_bug.cgi?id=164619
<rdar://problem/29207215>

Reviewed by Dean Jackson.

Add a default size for <audio> elements (200x50).

Tests: media/modern-media-controls/audio/audio-controls-buttons.html

media/modern-media-controls/audio/audio-controls-metrics.html

  • Modules/modern-media-controls/controls/media-controls.css:

(:host(audio)):

4:10 PM Changeset in webkit [209162] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

TypeInfo::OutOfLineTypeFlags should be 16 bits in size.
https://bugs.webkit.org/show_bug.cgi?id=165224

Reviewed by Saam Barati.

There's no reason for OutOfLineTypeFlags to be constraint to 8 bits since the
space is available to us. Making OutOfLineTypeFlags 16 bits brings TypeInfo up
to 32 bits in size from the current 24 bits.

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::TypeInfo):

4:10 PM Changeset in webkit [209161] by graouts@webkit.org
  • 12 edits in trunk

[Modern Media Controls] Add an HTML comment flag to turn the feature on
https://bugs.webkit.org/show_bug.cgi?id=165226

Reviewed by Dean Jackson.

Source/WebKit2:

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetModernMediaControlsEnabled):
(WKPreferencesGetModernMediaControlsEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:

Tools:

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:

(TestOptions::TestOptions):

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:
  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

3:53 PM Changeset in webkit [209160] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (r209144): API test IndexedDB.DeleteRecovery failing.
https://bugs.webkit.org/show_bug.cgi?id=165216

Rubberstamped by Tim Horton.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB): Change invalid ASSERT into a null check.

3:48 PM Changeset in webkit [209159] by commit-queue@webkit.org
  • 23 edits in trunk

Add separate settings and preferences to enable/disable async decoding for large images and animated images
https://bugs.webkit.org/show_bug.cgi?id=165177

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-30
Reviewed by Simon Fraser.
Source/WebCore:

Instead of having the async image decoding be controlled by one setting,
two separate settings are added:

largeImageAsyncDecodingEnabled
animatedImageAsyncDecodingEnabled

And an existing setting is removed:

asyncImageDecodingEnabled

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::load):

  • loader/cache/CachedImage.h:
  • page/Settings.in:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::internalStartAnimation):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/ImageObserver.h:

Source/WebKit/mac:

Hook up the async image decoding settings for WebKit1.

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences largeImageAsyncDecodingEnabled]):
(-[WebPreferences setLargeImageAsyncDecodingEnabled:]):
(-[WebPreferences animatedImageAsyncDecodingEnabled]):
(-[WebPreferences setAnimatedImageAsyncDecodingEnabled:]):
(-[WebPreferences asyncImageDecodingEnabled]): Deleted.
(-[WebPreferences setAsyncImageDecodingEnabled:]): Deleted.

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Hook up the async image decoding settings for WebKit2.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _largeImageAsyncDecodingEnabled]):
(-[WKPreferences _setLargeImageAsyncDecodingEnabled:]):
(-[WKPreferences _animatedImageAsyncDecodingEnabled]):
(-[WKPreferences _setAnimatedImageAsyncDecodingEnabled:]):
(-[WKPreferences _asyncImageDecodingEnabled]): Deleted.
(-[WKPreferences _setAsyncImageDecodingEnabled:]): Deleted.

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

Pref and a menu item to toggle async image decoding settings for WebKits 1 and 2.

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

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleLargeImageAsyncDecodingEnabled:]):
(-[SettingsController largeImageAsyncDecodingEnabled]):
(-[SettingsController toggleAnimatedImageAsyncDecodingEnabled:]):
(-[SettingsController animatedImageAsyncDecodingEnabled]):
(-[SettingsController toggleAsyncImageDecodingEnabled:]): Deleted.
(-[SettingsController asyncImageDecodingEnabled]): Deleted.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):

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

ASSERTION FAILED: layoutState->m_renderer == this in WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage
https://bugs.webkit.org/show_bug.cgi?id=155364
<rdar://problem/27720461>

Reviewed by David Hyatt.

Source/WebCore:

RenderNamedFlowThread is considered to be a root for the current renderer context so
we need to bail out from the containing block traversal here (like we do for the RenderView).

Test: fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeReplacedLogicalHeightUsing):

LayoutTests:

  • fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts-expected.txt: Added.
  • fast/replaced/replaced-element-with-percentage-width-inside-flow-asserts.html: Added.
2:59 PM Changeset in webkit [209157] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

IndexedDB 2.0: Send operations off to the server in batches instead of one at a time.
https://bugs.webkit.org/show_bug.cgi?id=165221

Reviewed by Myles C. Maxfield.

No new tests (No observable behavior change).

On a profile of "Lots of writes to an IndexedDB", timer scheduling/firing presented as over 10% of the time.

This patch negates much of that.

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::pendingOperationTimerFired): Send 100 operations off to the server

before spinning the runloop, instead of only 1.

2:45 PM Changeset in webkit [209156] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[Modern Media Controls] Controls are not visible when returning from picture-in-picture playback
https://bugs.webkit.org/show_bug.cgi?id=165183

Patch by Antoine Quint <Antoine Quint> on 2016-11-30
Reviewed by Dean Jackson.

We need to call MediaControlsHost::setPreparedToReturnVideoLayerToInline() when we return from
picture-in-picture playback such that the video layer is correctly stacked under the media controls.
We call that function in a rAF call to ensure it's performed in sync with the next scheduled layout
or the media controls would not appear in sync with the video layer.

We also fix an error from a previous commit in ControlsVisibilitySupport.

  • Modules/modern-media-controls/media/controls-visibility-support.js:

(ControlsVisibilitySupport.prototype.syncControl):
(ControlsVisibilitySupport):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController):
(MediaController.prototype.handleEvent):
(MediaController.prototype._returnMediaLayerToInlineIfNeeded):

2:26 PM Changeset in webkit [209155] by jiewen_tan@apple.com
  • 12 edits
    21 adds in trunk

Update SubtleCrypto::wrapKey to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164746
<rdar://problem/29258160>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::wrapKey method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-wrapKey. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-wrapKey.
  2. It implements wrapKey operations of the following algorithms: AES-KW.
  3. It also replaces JSSubtleCrypto* with auto in all promise functions.

Tests: crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-private.html

crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-public.html
crypto/subtle/aes-kw-import-key-wrap-raw-key.html
crypto/subtle/aes-kw-wrap-key-malformed-parameters.html
crypto/subtle/rsa-oaep-import-key-wrap-jwk-oct-key.html
crypto/subtle/wrapKey-malformed-parameters.html
crypto/workers/subtle/aes-cbc-import-key-wrap-key.html
crypto/workers/subtle/aes-kw-import-key-wrap-key.html
crypto/workers/subtle/rsa-oaep-import-key-wrap-key.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::supportExportKeyThrow):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::jsSubtleCryptoFunctionWrapKeyPromise):
(WebCore::JSSubtleCrypto::wrapKey):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::wrapKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::wrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_KW::platformWrapKey):

  • crypto/mac/CryptoAlgorithmAES_KWMac.cpp:

(WebCore::wrapKeyAES_KW):
(WebCore::CryptoAlgorithmAES_KW::platformWrapKey):
(WebCore::CryptoAlgorithmAES_KW::platformEncrypt):

LayoutTests:

  • crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-private-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-private.html: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-public-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-wrap-jwk-rsa-key-public.html: Added.
  • crypto/subtle/aes-kw-import-key-wrap-raw-key-expected.txt: Added.
  • crypto/subtle/aes-kw-import-key-wrap-raw-key.html: Added.
  • crypto/subtle/aes-kw-wrap-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-kw-wrap-key-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-import-key-wrap-jwk-oct-key-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-wrap-jwk-oct-key.html: Added.
  • crypto/subtle/wrapKey-malformed-parameters-expected.txt: Added.
  • crypto/subtle/wrapKey-malformed-parameters.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-wrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-wrap-key.html: Added.
  • crypto/workers/subtle/aes-kw-import-key-wrap-key-expected.txt: Added.
  • crypto/workers/subtle/aes-kw-import-key-wrap-key.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-wrap-key.js: Added.
  • crypto/workers/subtle/resources/aes-kw-import-key-wrap-key.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-wrap-key.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-wrap-key-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-wrap-key.html: Added.
2:21 PM Changeset in webkit [209154] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION: inspector/sampling-profiler/* LayoutTests are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=164388
<rdar://problem/29101555>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-30
Reviewed by Saam Barati.

Source/JavaScriptCore:

There was a possibility of a deadlock between the main thread and the GC thread
with the SamplingProfiler lock when Inspector is processing samples to send to
the frontend. The Inspector (main thread) was holding the SamplingProfiler lock
while processing samples, which runs JavaScript that could trigger a GC, and
GC then tries to acquire the SamplingProfiler lock to process unprocessed samples.

A simple solution here is to tighten the bounds of when Inspector holds the
SamplingProfiler lock. It only needs the lock when extracting samples from
the SamplingProfiler. It doesn't need to hold the lock for processing those
samples, which is what can run script and cause a GC.

  • inspector/agents/InspectorScriptProfilerAgent.cpp:

(Inspector::InspectorScriptProfilerAgent::trackingComplete):
Tighten bounds of this lock to only where it is needed.

LayoutTests:

  • platform/mac/TestExpectations:

Unskip now that tests are no longer flakey.

2:10 PM Changeset in webkit [209153] by weinig@apple.com
  • 21 edits in trunk/Source/WebCore

[WebIDL] Add support for more missing / exotic IDLTypes
https://bugs.webkit.org/show_bug.cgi?id=165156

Reviewed by Alex Christensen.

  • Adds JSDOMConvert support for WebIDL's 'callback interface' and 'callback function'.
  • Adds JSDOMConvert support for WebIDL extensions for SerializedScriptValue, Dictionary, EventListener and XPathNSResolver (moving much of their special casing out of perl and into JSDOMConvert).
  • DerivedSources.make:

Adds $(WebCore)/testing to the list of available IDL directories to keep internals
compiling.

  • Modules/webaudio/WaveShaperNode.cpp:
  • Modules/webaudio/WaveShaperNode.h:

Update to take curve by reference.

  • bindings/generic/IDLTypes.h:

(WebCore::IDLWrapper):
Add helper type, IDLWrapper, which serves as a base type for all IDLTypes that are
RefCounted.

  • bindings/js/JSDOMConvert.h:

(WebCore::convert):
(WebCore::Converter<IDLNullable<T>>::convert):
(WebCore::Converter<IDLCallbackFunction<T>>::convert):
(WebCore::JSConverter<IDLCallbackFunction<T>>::convert):
(WebCore::JSConverter<IDLCallbackFunction<T>>::convertNewlyCreated):
(WebCore::Converter<IDLCallbackInterface<T>>::convert):
(WebCore::JSConverter<IDLCallbackInterface<T>>::convert):
(WebCore::JSConverter<IDLCallbackInterface<T>>::convertNewlyCreated):
(WebCore::Converter<IDLSerializedScriptValue<T>>::convert):
(WebCore::JSConverter<IDLSerializedScriptValue<T>>::convert):
(WebCore::Converter<IDLLegacyDictionary<T>>::convert):
(WebCore::Converter<IDLEventListener<T>>::convert):
(WebCore::Converter<IDLXPathNSResolver<T>>::convert):
(WebCore::JSConverter<IDLXPathNSResolver<T>>::convert):
(WebCore::JSConverter<IDLXPathNSResolver<T>>::convertNewlyCreated):
Add converters for the new types. IDLSerializedScriptValue, IDLLegacyDictionary, IDLEventListener and IDLXPathNSResolver
have been templatized to avoid including their implementation classes everywhere. We can improve this in the future by
splitting JSDOMConvert up into to separate files.

  • bindings/scripts/CodeGenerator.pm:

(IsBuiltinType):
(IsInterfaceType):
(IsWrapperType):
(ComputeIsCallbackInterface):
(ComputeIsCallbackFunction):
Add new predicates, IsBuiltinType and IsInterfaceType, and re-work IsWrapperType to determine all types that
have a JS wrapper (and consequently a JS{name}.h file).

  • bindings/scripts/CodeGeneratorJS.pm:

(AddToIncludesForIDLType):
Update to add include for EventListener.

(GetArgumentExceptionFunction):
(GetArgumentExceptionThrower):
(GetAttributeExceptionFunction):
(GetAttributeExceptionThrower):
Add support for exceptions for callbacks.

(PassArgumentExpression):
Factor out logic on how to pass arguments to C++.

(GenerateHeader):
Make toWrapped and JSDOMWrapperConverterTraits work with XPathNSResolver.

(GenerateImplementation):
Update to use PassArgumentExpression and pass a global object reference to JSValueToNative.

(GenerateParametersCheck):
Remove special casing for callbacks.

(GenerateCallbackHeaderContent):
(GenerateCallbackImplementationContent):
Simplify toJS functions. State and global object are not necessary.

(GetBaseIDLType):
Add support for new types. Add assertion so that unknown types can't get through.

(ShouldPassArgumentByReference):
Rename from ShouldPassWrapperByReference, and merge in CodeGenerator's ShouldPassWrapperByReference.

(JSValueToNativeDOMConvertNeedsThisObject):
Added. Predicate to determine types that need a this object for conversion.

(JSValueToNativeDOMConvertNeedsGlobalObject):
Added. Predicate to determine types that need a global object for conversion.

(JSValueToNative):
Remove special cases for new types.

(NativeToJSValueDOMConvertNeedsState):
Add SerializedScriptValue and XPathNSResolver.

(NativeToJSValueDOMConvertNeedsGlobalObject):
Add SerializedScriptValue and XPathNSResolver.

(NativeToJSValueUsingReferences):
(NativeToJSValueUsingPointers):
(NativeToJSValue):
Remove unused $statePointer and replace $globalObject with $globalObjectReference. Remove
special cases for new types.

(GenerateConstructorDefinition):
Use PassArgumentExpression.

  • bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunction.h:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
  • bindings/scripts/test/JS/JSTestCallbackInterface.h:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestSerializedScriptValueInterface.idl:

Update tests. Remove test for a readonly attribute returning a Promise, which is not supported
yet (this was caught by the assertion added to GetBaseIDLType). Add tests for passing and returning
SerializedScriptValues from functions.

1:52 PM EnvironmentVariables edited by clopez@igalia.com
(diff)
1:42 PM Changeset in webkit [209152] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skipping crashing test js/dom/modules/module-will-fire-beforeload.html.
https://bugs.webkit.org/show_bug.cgi?id=164883

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:42 PM Changeset in webkit [209151] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[iOS][WK2] Turn on HTML interactive form validation feature
https://bugs.webkit.org/show_bug.cgi?id=165212
<rdar://problem/29444356>

Reviewed by Simon Fraser.

Turn on HTML interactive form validation feature on iOS WK2
now that we have a native UI.

  • Shared/WebPreferencesDefinitions.h:
1:19 PM Changeset in webkit [209150] by jiewen_tan@apple.com
  • 25 edits
    32 adds in trunk

Update SubtleCrypto::verify to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164741
<rdar://problem/29257935>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::verify method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-verify. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-verify.
  2. It implements verify operations of the following algorithms: HMAC, and RSASSA-PKCS1-V1_5.

Tests: crypto/subtle/hmac-generate-key-sign-verify.html

crypto/subtle/hmac-import-key-verify-sha1.html
crypto/subtle/hmac-import-key-verify-sha224.html
crypto/subtle/hmac-import-key-verify-sha256.html
crypto/subtle/hmac-import-key-verify-sha384.html
crypto/subtle/hmac-import-key-verify-sha512.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-key-sign-verify.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha1.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha224.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha256.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha384.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha512.html
crypto/subtle/verify-malformed-parameters.html
crypto/workers/subtle/hmac-import-key-verify.html
crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-verify.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionVerifyPromise):
(WebCore::JSSubtleCrypto::verify):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::verify):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::verify):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:

(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:

(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):

  • crypto/mac/CryptoAlgorithmHMACMac.cpp:

(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:

(WebCore::verifyRSASSA_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):

LayoutTests:

Besides adding tests for SubtleCrypto::verify, it also enhances
*generate-key-encrypt-decrypt tests.

  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt-expected.txt:
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html:
  • crypto/subtle/hmac-generate-key-sign-verify-expected.txt: Added.
  • crypto/subtle/hmac-generate-key-sign-verify.html: Added.
  • crypto/subtle/hmac-import-key-verify-sha1-expected.txt: Added.
  • crypto/subtle/hmac-import-key-verify-sha1.html: Added.
  • crypto/subtle/hmac-import-key-verify-sha224-expected.txt: Added.
  • crypto/subtle/hmac-import-key-verify-sha224.html: Added.
  • crypto/subtle/hmac-import-key-verify-sha256-expected.txt: Added.
  • crypto/subtle/hmac-import-key-verify-sha256.html: Added.
  • crypto/subtle/hmac-import-key-verify-sha384-expected.txt: Added.
  • crypto/subtle/hmac-import-key-verify-sha384.html: Added.
  • crypto/subtle/hmac-import-key-verify-sha512-expected.txt: Added.
  • crypto/subtle/hmac-import-key-verify-sha512.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-expected.txt:
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label-expected.txt:
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html:
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt-expected.txt:
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html:
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key-sign-verify-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-key-sign-verify.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha1-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha1.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha224-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha224.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha256-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha256.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha384-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha384.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha512-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-verify-sha512.html: Added.
  • crypto/subtle/verify-malformed-parameters-expected.txt: Added.
  • crypto/subtle/verify-malformed-parameters.html: Added.
  • crypto/workers/subtle/hmac-import-key-verify-expected.txt: Added.
  • crypto/workers/subtle/hmac-import-key-verify.html: Added.
  • crypto/workers/subtle/resources/hmac-import-key-verify.js: Added.
  • crypto/workers/subtle/resources/rsassa-pkcs1-v1_5-import-key-verify.js: Added.
  • crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-verify-expected.txt: Added.
  • crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-verify.html: Added.
1:13 PM Changeset in webkit [209149] by mark.lam@apple.com
  • 3 edits
    2 adds in trunk

Proxy is not allowed in the global prototype chain.
https://bugs.webkit.org/show_bug.cgi?id=165205

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • We'll now throw a TypeError if we detect a Proxy in the global prototype chain.

LayoutTests:

  • js/dom/proxy-is-not-allowed-in-global-prototype-chain-expected.txt: Added.
  • js/dom/proxy-is-not-allowed-in-global-prototype-chain.html: Added.
12:38 PM Changeset in webkit [209148] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix columns shorthand parsing
https://bugs.webkit.org/show_bug.cgi?id=165210

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeColumns):
(WebCore::consumeColumnWidthOrCount): Deleted.
Bring over the old parser code, since it was actually better at creating implicit values for auto.

12:34 PM Changeset in webkit [209147] by aestes@apple.com
  • 5 edits in trunk/Source/WebCore

[Cocoa] Pass the embedding app's bundle ID to new instances of NEFilterSource
https://bugs.webkit.org/show_bug.cgi?id=165168
<rdar://problem/29003618>

Reviewed by Simon Fraser.

  • platform/RuntimeApplicationChecks.h: Declared applicationBundleIdentifier().
  • platform/RuntimeApplicationChecks.mm:

(WebCore::applicationBundleIdentifier): Made non-static.

  • platform/cocoa/NetworkExtensionContentFilter.mm:

(WebCore::NetworkExtensionContentFilter::initialize): If the new NEFilterSource instance
responds to -setSourceAppBundleID:, call it with applicationBundleIdentifier().

  • platform/spi/cocoa/NEFilterSourceSPI.h: Moved NEFilterSourceOptionsRedirectURL into the

!USE(APPLE_INTERNAL_SDK) section and unconditionally declared @property sourceAppBundleID in
a new category on NEFilterSource.

12:30 PM Changeset in webkit [209146] by commit-queue@webkit.org
  • 5 edits in trunk/Source/JavaScriptCore

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

"It regressed Octane/Raytrace and JetStream" (Requested by
saamyjoon on #webkit).

Reverted changeset:

"We should support CreateThis in the FTL"
https://bugs.webkit.org/show_bug.cgi?id=164904
http://trac.webkit.org/changeset/209112

12:20 PM Changeset in webkit [209145] by Brent Fulgham
  • 11 edits
    12 adds in trunk

Use 'childOfType' template when retrieving Shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=165145
<rdar://problem/29331830>

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html

fast/shadow-dom/file-input-element-shadow-manipulation.html
fast/shadow-dom/keygen-shadow-manipulation.html
fast/shadow-dom/media-shadow-manipulation.html
fast/shadow-dom/range-input-element-shadow-manipulation.html
fast/shadow-dom/textarea-shadow-manipulation.html

Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
than relying on expected element positions, as these can be changed by
JavaScript.

Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.

  • dom/Element.h:

(WebCore::Element::isUploadButton): Added.
(WebCore::Element::isSliderContainerElement): Added.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
the first child is the one we want.

  • html/FileInputType.cpp:

(isType): Added.
(WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
the first child is the one we want.
(WebCore::FileInputType::multipleAttributeChanged): Ditto.

  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::shadowSelect): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElement): Ditto.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::sliderTrackElement): Ditto.

  • html/shadow/SliderThumbElement.h:

(isType): Added.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
the first child is the one we want.

LayoutTests:

  • fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/keygen-shadow-manipulation.html: Added.
  • fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/media-shadow-manipulation.html: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/textarea-shadow-manipulation.html: Added.
11:59 AM Changeset in webkit [209144] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=164974

Reviewed by Alex Christensen.

No new tests (No behavior change other than being faster).

Instead of building new SQLiteStatements from scratch each time they're needed and then
finalizing them after they're used for a single operation, we cache them.

For tests that do puts and/or gets in tight loops, this shows up as a 5%-20% speedup on profiles.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
(WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB):
(WebCore::IDBServer::queryForGetAllObjectStoreRecords): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
11:48 AM Changeset in webkit [209143] by Joseph Pecoraro
  • 5 edits in trunk

Web Inspector: Clicking on link in Web Inspector can cause UIProcess to crash
https://bugs.webkit.org/show_bug.cgi?id=165157
<rdar://problem/27896562>

Reviewed by Brian Burg.

Source/WebInspectorUI:

By correctly disallowing slashes in the scheme Web Inspector resolves
the correct absolute URL and doesn't end up trying to navigate to an
incorrect file URL.

  • UserInterface/Base/URLUtilities.js:

(parseURL):
Disallow "/" characters in the scheme portion. (/http://example.com)
Allow path to be optional before a fragment portion. (http://example.com#frag)

LayoutTests:

  • inspector/unit-tests/url-utilities-expected.txt:
  • inspector/unit-tests/url-utilities.html:

Add some tests for expected valid and invalid parseURL cases.
Note some cases that we don't handle properly and would benefit
by switching to URL constructor which is a much larger change.

11:39 AM Changeset in webkit [209142] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Make sure -webkit-background-size coalesces identical values.
https://bugs.webkit.org/show_bug.cgi?id=165207

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeBackgroundSize):

11:20 AM Changeset in webkit [209141] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream] Sync video preview layer and parent layer sizes
https://bugs.webkit.org/show_bug.cgi?id=165139

Reviewed by Jer Noble.

CALayer auto-resizing doesn't work on iOS, so manually reize the video capture preview layer
whenever the background layer's bounds change.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoSourcePreview::AVVideoSourcePreview): Create layer observer.
(WebCore::AVVideoSourcePreview::backgroundLayerBoundsChanged): Sync preview layer and background

layer sizes.

(WebCore::AVVideoSourcePreview::invalidate): Invalidate and clear observer.
(-[WebCoreAVVideoCaptureSourceObserver initWithParent:]):
(-[WebCoreAVVideoCaptureSourceObserver setParent:]): Add KVO bounds observer.
(-[WebCoreAVVideoCaptureSourceObserver observeValueForKeyPath:ofObject:change:context:]): Call
parent when "bounds" changes.
(-[WebCoreAVVideoCaptureSourceObserver actionForKey:]): Return nil to disable all animations.

11:19 AM Changeset in webkit [209140] by aestes@apple.com
  • 11 edits
    12 deletes in trunk

Reverted r209130.

The new test fast/shadow-dom/keygen-shadow-manipulation.html asserts and crashes on Mac debug builds.

10:51 AM Changeset in webkit [209139] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Fix a typo in a layout test for transforms
https://bugs.webkit.org/show_bug.cgi?id=165203

Reviewed by Dean Jackson.

  • transitions/transition-end-event-transform.html:
10:45 AM Changeset in webkit [209138] by Brent Fulgham
  • 2 edits in trunk

[Win] Apple build is using incorrect ICU library (if present)
https://bugs.webkit.org/show_bug.cgi?id=164934
<rdar://problem/29329654>

Reviewed by Alex Christensen.

Move the 'icuuc.lib' and 'icuin.lib' library names to the end of the set of choices when searching for ICU.
so that we preferentially select the 'new' version of these libraries if they are available.

  • Source/cmake/FindICU.cmake:
10:42 AM Changeset in webkit [209137] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix crash in -webkit-shape-outside parsing
https://bugs.webkit.org/show_bug.cgi?id=165202

Reviewed by Dean Jackson.

  • css/CSSBasicShapes.cpp:

(WebCore::buildSerializablePositionOffset):
The old parser never passed in a singleton value ID for top/right/bottom/left.
The new parser does, and it exposed a bug in the serialization code for
shapes that didn't properly create the offset primitive value as a percentage
in those cases.

10:30 AM Changeset in webkit [209136] by Jonathan Bedard
  • 4 edits in trunk/Tools

Make it possible to use an existing simulator instance for one-off testing
https://bugs.webkit.org/show_bug.cgi?id=164568
<rdar://problem/29189133>

Reviewed by Daniel Bates.

With this patch, if a simulator is currently running on the machine and
'--dedicated-simulators' is not passed into the application, only one simulator
instance will be used, and this instance will be the existing instance.
If no simulator is running or '--dedicated-simulators' is passed to the script,
previous behavior will be used.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(parse_args):

  • Scripts/webkitpy/port/ios.py:

(IOSSimulatorPort.init): Logic for enabling usage of currently running simulator.
(IOSSimulatorPort._create_simulators): Only create simulators when needed, don't reset already running simulators.
(IOSSimulatorPort.setup_test_run): Don't open already running simulators.
(IOSSimulatorPort._quit_ios_simulator): Only quit simulators if we manage them.
(IOSSimulatorPort.clean_up_test_run): Only clean up simulators if we manage them.
(IOSSimulatorPort._using_dedicated_simulators): True if simulators need to be managed, false if using an existing instance.
(IOSSimulatorPort.device_id_for_worker_number): Access currently running simulator if not managing devices.

  • Scripts/webkitpy/xcode/simulator.py:

(Simulator.current_device): Get currently running device.

10:03 AM Changeset in webkit [209135] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GLIB] IndexedDB: Switch to use new encoder for IDBKeyData
https://bugs.webkit.org/show_bug.cgi?id=165191

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-11-30
Reviewed by Sergio Villar Senin.

Instead of using KeyedEncoder.

  • Modules/indexeddb/server/IDBSerialization.cpp:

(WebCore::isLegacySerializedIDBKeyData): Helper function to check whether the given data were encoded with
KeyedEncoder or not.
(WebCore::serializedTypeForKeyType): Remove #ifdefs for CF and always use the new encoder.
(WebCore::encodeKey): Ditto.
(WebCore::serializeIDBKeyData): Ditto.
(WebCore::decodeKey): Ditto.
(WebCore::deserializeIDBKeyData): Ditto.

10:01 AM Changeset in webkit [209134] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Web Inspector: Null ResourceResponse Preflight requests cause crash
https://bugs.webkit.org/show_bug.cgi?id=165120
<rdar://problem/27911350>

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

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
Only inform Web Inspector about successful responses. Informing with a
null response would break the expected Inspector API contract when
notifying about did receive response. Also, when informing Web Inspector
include a didFinishLoading event so the frontend knows this pre-flight
request is complete.

9:53 AM Changeset in webkit [209133] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

Correct plugin sandbox after r208611
https://bugs.webkit.org/show_bug.cgi?id=165187
<rdar://problem/29431165>

Reviewed by Alex Christensen.

In r208611 I removed the 'else' clause of a Scheme conditional
that was needed to properly run plugins (such as Flash Player).

This change retains the relevant current sandbox content, while
still stripping out the old code that is no longer needed.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
9:38 AM Changeset in webkit [209132] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION (209086): IDB tests crash under GuardMalloc.
https://bugs.webkit.org/show_bug.cgi?id=165201

Reviewed by Chris Dumez.

No new tests (Covered by literally every IDB test when run under GuardMalloc).

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::commitOnServer): "Commit on Server" operations are special, in that they

are the last operation a transaction does, and they remove themselves from the protector map right away.
So when we remove them from the protector map we also need to remove their raw-pointer from the
"in-progress" queue.

9:10 AM Changeset in webkit [209131] by commit-queue@webkit.org
  • 6 edits
    2 adds in trunk

Some animated image do not animate after reseting their animations
https://bugs.webkit.org/show_bug.cgi?id=165131

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-11-30
Reviewed by Simon Fraser.
Source/WebCore:

Test: fast/images/reset-image-animation.html

The bug happens because the ImageFrameCache does not reset its cached
frames properly when the BitmapImage rests its animation.

-- We need to ignore caching the new NativeImage of an ImageFrame if the
decoding thread is terminated after asynchronously calling
cacheFrameNativeImageAtIndex() on the main thread through callOnMainThread().
Although the decoding thread was terminated this call is still scheduled
to be executed later on the main thread.

-- We need to open the m_frameRequestQueue before starting a new decoding
thread. Opening m_frameRequestQueue clears the enqueued requests from the
previous decoding thread and allows enqueueing requests for the new thread.

-- We need to clear the ImageFrames which were being decoded at the time
the decoding queue was closing and their new NativeImages were not cached.

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::cacheFrameNativeImageAtIndex): Assert the NativeImage
is cached for an ImageFrame which is still being decoded.

(WebCore::ImageFrameCache::startAsyncDecodingQueue): Open the m_frameRequestQueue
before starting the decoding thread. Don't cache the NativeImage of an ImageFrame
unless the decoding thread is still alive and it the same as the one that makes
the asynchronous call to cacheFrameNativeImageAtIndex().

(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex): Don't request an
image frame to be be asynchronously decoded if it is already being decoded.

(WebCore::ImageFrameCache::stopAsyncDecodingQueue): Clear the ImageFrames that
were being decoded when the decoding thread terminates.

  • testing/Internals.cpp:

(WebCore::Internals::resetImageAnimation):

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

Expose BitmapImage::resetAnimation() through Internals so tests can force it.

LayoutTests:

Ensure the image animation is played in order after the animation is reset.

  • fast/images/reset-image-animation-expected.txt: Added.
  • fast/images/reset-image-animation.html: Added.
9:03 AM Changeset in webkit [209130] by Brent Fulgham
  • 11 edits
    12 adds in trunk

Use 'childOfType' template when retrieving Shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=165145
<rdar://problem/29331830>

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html

fast/shadow-dom/file-input-element-shadow-manipulation.html
fast/shadow-dom/keygen-shadow-manipulation.html
fast/shadow-dom/media-shadow-manipulation.html
fast/shadow-dom/range-input-element-shadow-manipulation.html
fast/shadow-dom/textarea-shadow-manipulation.html

Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
than relying on expected element positions, as these can be changed by
JavaScript.

Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.

  • dom/Element.h:

(WebCore::Element::isUploadButton): Added.
(WebCore::Element::isSliderContainerElement): Added.

  • html/ColorInputType.cpp:

(WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
the first child is the one we want.

  • html/FileInputType.cpp:

(isType): Added.
(WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
the first child is the one we want.
(WebCore::FileInputType::multipleAttributeChanged): Ditto.

  • html/HTMLKeygenElement.cpp:

(WebCore::HTMLKeygenElement::shadowSelect): Ditto.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.

  • html/HTMLTextAreaElement.cpp:

(WebCore::HTMLTextAreaElement::innerTextElement): Ditto.

  • html/RangeInputType.cpp:

(WebCore::RangeInputType::sliderTrackElement): Ditto.

  • html/shadow/SliderThumbElement.h:

(isType): Added.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
the first child is the one we want.

LayoutTests:

  • fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/keygen-shadow-manipulation.html: Added.
  • fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/media-shadow-manipulation.html: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
  • fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
  • fast/shadow-dom/textarea-shadow-manipulation.html: Added.
8:59 AM Changeset in webkit [209129] by Darin Adler
  • 40 edits in trunk/Source

Streamline and speed up tokenizer and segmented string classes
https://bugs.webkit.org/show_bug.cgi?id=165003

Source/JavaScriptCore:

Reviewed by Sam Weinig.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue): Use viewWithUnderlyingString when calling
StringBuilder::appendQuotedJSONString, since it now takes a StringView and there is
no benefit in creating a String for that function if one doesn't already exist.

Source/WebCore:

Reviewed by Sam Weinig.

Profiling Speedometer on my iMac showed the tokenizer as one of the
hottest functions. This patch streamlines the segmented string class,
removing various unused features, and also improves some other functions
seen on the Speedometer profile. On my iMac I measured a speedup of
about 3%. Changes include:

  • Removed m_pushedChar1, m_pushedChar2, and m_empty data members from the SegmentedString class and all the code that used to handle them.
  • Simplified the SegmentedString advance functions so they are small enough to get inlined in the HTML tokenizer.
  • Updated callers to call the simpler SegmentedString advance functions that don't handle newlines in as many cases as possible.
  • Cut down on allocations of SegmentedString and made code move the segmented string and the strings that are moved into it rather than copying them whenever possible.
  • Simplified segmented string functions, removing some branches, mostly from the non-fast paths.
  • Removed small unused functions and small functions used in only one or two places, made more functions private and renamed for clarity.
  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::documentWrite): Moved a little more of the common code in here
from the two functions belwo. Removed obsolete comment saying this was not
following the DOM specification because it is. Removed unneeded special
cases for 1 argument and no arguments. Take a reference instead of a pointer.
(WebCore::JSHTMLDocument::write): Updated for above.
(WebCore::JSHTMLDocument::writeln): Ditto.

  • css/parser/CSSTokenizer.cpp: Added now-needed include.
  • css/parser/CSSTokenizer.h: Removed unneeded include.
  • css/parser/CSSTokenizerInputStream.h: Added definition of kEndOfFileMarker

here; this is now separate from the use in the HTMLParser. In the long run,
unclear to me whether it is really needed in either.

  • dom/Document.cpp:

(WebCore::Document::prepareToWrite): Added. Helper function used by the three
different variants of write. Using this may prevent us from having to construct
a SegmentedString just to append one string after future refactoring.
(WebCore::Document::write): Updated to take an rvalue reference and move the
value through.
(WebCore::Document::writeln): Use a single write call instead of two.

  • dom/Document.h: Changed write to take an rvalue reference to SegmentedString

rather than a const reference.

  • dom/DocumentParser.h: Changed insert to take an rvalue reference to

SegmentedString. In the future, should probably overload to take a single
string since that is the normal case.

  • dom/RawDataDocumentParser.h: Updated for change to DocumentParser.
  • html/FTPDirectoryDocument.cpp:

(WebCore::FTPDirectoryDocumentParser::append): Refactored a bit, just enough
so that we don't need an assignment operator for SegmentedString that can
copy a String.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::insert): Updated to take an rvalue reference,
and move the value through.

  • html/parser/HTMLDocumentParser.h: Updated for the above.
  • html/parser/HTMLEntityParser.cpp:

(WebCore::HTMLEntityParser::consumeNamedEntity): Updated for name changes.
Changed the twao calls to advance here to call advancePastNonNewline; no
change in behavior, but asserts what the code was assuming before, that the
character was not a newline.

  • html/parser/HTMLInputStream.h:

(WebCore::HTMLInputStream::appendToEnd): Updated to take an rvalue reference,
and move the value through.
(WebCore::HTMLInputStream::insertAtCurrentInsertionPoint): Ditto.
(WebCore::HTMLInputStream::markEndOfFile): Removed the code to construct a
SegmentedString, overkill since we can just append an individual string.
(WebCore::HTMLInputStream::splitInto): Rewrote the move idiom here to actually
use move, which will reduce reference count churn and other unneeded work.

  • html/parser/HTMLMetaCharsetParser.cpp:

(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Removed unneeded
construction of a SegmentedString, just to append a string.

  • html/parser/HTMLSourceTracker.cpp:

(WebCore::HTMLSourceTracker::HTMLSourceTracker): Moved to the class definition.
(WebCore::HTMLSourceTracker::source): Updated for function name change.

  • html/parser/HTMLSourceTracker.h: Updated for above.
  • html/parser/HTMLTokenizer.cpp: Added now-needed include.

(WebCore::HTMLTokenizer::emitAndResumeInDataState): Use advancePastNonNewline,
since this function is never called in response to a newline character.
(WebCore::HTMLTokenizer::commitToPartialEndTag): Ditto.
(WebCore::HTMLTokenizer::commitToCompleteEndTag): Ditto.
(WebCore::HTMLTokenizer::processToken): Use ADVANCE_PAST_NON_NEWLINE_TO macro
instead of ADVANCE_TO in cases where the character we are advancing past is
known not to be a newline, so we can use the more efficient advance function
that doesn't check for the newline character.

  • html/parser/InputStreamPreprocessor.h: Moved kEndOfFileMarker to

SegmentedString.h; not sure that's a good place for it either. In the long run,
unclear to me whether this is really needed.
(WebCore::InputStreamPreprocessor::peek): Added UNLIKELY for the empty check.
Added LIKELY for the not-special character check.
(WebCore::InputStreamPreprocessor::advance): Updated for the new name of the
advanceAndUpdateLineNumber function.
(WebCore::InputStreamPreprocessor::advancePastNonNewline): Added. More
efficient than advance for cases where the last characer is known not to be
a newline character.
(WebCore::InputStreamPreprocessor::skipNextNewLine): Deleted. Was unused.
(WebCore::InputStreamPreprocessor::reset): Deleted. Was unused except in the
constructor; added initial values for the data members to replace.
(WebCore::InputStreamPreprocessor::processNextInputCharacter): Removed long
FIXME comment that didn't really need to be here. Reorganized a bit.
(WebCore::InputStreamPreprocessor::isAtEndOfFile): Renamed and made static.

  • html/track/BufferedLineReader.cpp:

(WebCore::BufferedLineReader::nextLine): Updated to not use the poorly named
scanCharacter function to advance past a newline. Also renamed from getLine
and changed to return Optional<String> instead of using a boolean to indicate
failure and an out argument.

  • html/track/BufferedLineReader.h:

(WebCore::BufferedLineReader::BufferedLineReader): Use the default, putting
initial values on each data member below.
(WebCore::BufferedLineReader::append): Updated to take an rvalue reference,
and move the value through.
(WebCore::BufferedLineReader::scanCharacter): Deleted. Was poorly named,
and easy to replace with two lines of code at its two call sites.
(WebCore::BufferedLineReader::reset): Rewrote to correctly clear all the
data members of the class, not just the segmented string.

  • html/track/InbandGenericTextTrack.cpp:

(WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Updated to take
an rvalue reference and move the value through.

  • html/track/InbandGenericTextTrack.h: Updated for the above.
  • html/track/InbandTextTrack.h: Updated since parseWebVTTFileHeader now

takes an rvalue reference.

  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::parseFileHeader): Updated to take an rvalue reference
and move the value through.
(WebCore::WebVTTParser::parseBytes): Updated to pass ownership of the string
in to the line reader append function.
(WebCore::WebVTTParser::parseCueData): Use auto and WTFMove for WebVTTCueData.
(WebCore::WebVTTParser::flush): More of the same.
(WebCore::WebVTTParser::parse): Changed to use nextLine instead of getLine.

  • html/track/WebVTTParser.h: Updated for the above.
  • html/track/WebVTTTokenizer.cpp:

(WebCore::advanceAndEmitToken): Use advanceAndUpdateLineNumber by its new
name, just advance. No change in behavior.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Pass a String, not a
SegmentedString, to add the end of file marker.

  • platform/graphics/InbandTextTrackPrivateClient.h: Updated since

parseWebVTTFileHeader takes an rvalue reference.

  • platform/text/SegmentedString.cpp:

(WebCore::SegmentedString::Substring::appendTo): Moved here from the header.
The only caller is SegmentedString::toString, inside this file.
(WebCore::SegmentedString::SegmentedString): Deleted the copy constructor.
No longer needed.
(WebCore::SegmentedString::operator=): Defined a move assignment operator
rather than an ordinary assignment operator, since that's what the call
sites really need.
(WebCore::SegmentedString::length): Simplified since we no longer need to
support pushed characters.
(WebCore::SegmentedString::setExcludeLineNumbers): Simplified, since we
can just iterate m_otherSubstrings without an extra check. Also changed to
write directly to the data member of Substring instead of using a function.
(WebCore::SegmentedString::updateAdvanceFunctionPointersForEmptyString):
Added. Used when we run out of characters.
(WebCore::SegmentedString::clear): Removed code to clear now-deleted members.
Updated for changes to other member names.
(WebCore::SegmentedString::appendSubstring): Renamed from just append to
avoid ambiguity with the public append function. Changed to take an rvalue
reference, and move in, and added code to set m_currentCharacter properly,
so the caller doesn't have to deal with that.
(WebCore::SegmentedString::close): Updated to use m_isClosed by its new name.
Also removed unneeded comment about assertion that fires when trying to close
an already closed string.
(WebCore::SegmentedString::append): Added overloads for rvalue references of
both entire SegmentedString objects and of String. Streamlined to just call
appendSubstring and append to the deque.
(WebCore::SegmentedString::pushBack): Tightened up since we don't allow empty
strings and changed to take just a string, not an entire segmented string.
(WebCore::SegmentedString::advanceSubstring): Moved logic into the
advancePastSingleCharacterSubstringWithoutUpdatingLineNumber function.
(WebCore::SegmentedString::toString): Simplified now that we don't need to
support pushed characters.
(WebCore::SegmentedString::advancePastNonNewlines): Deleted.
(WebCore::SegmentedString::advance8): Deleted.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber16): Renamed from
advance16. Simplified now that there are no pushed characters. Also changed to
access data members of m_currentSubstring directly instead of calling a function.
(WebCore::SegmentedString::advanceAndUpdateLineNumber8): Deleted.
(WebCore::SegmentedString::advanceAndUpdateLineNumber16): Ditto.
(WebCore::SegmentedString::advancePastSingleCharacterSubstringWithoutUpdatingLineNumber):
Renamed from advanceSlowCase. Removed uneeded logic to handle pushed characters.
Moved code in here from advanceSubstring.
(WebCore::SegmentedString::advancePastSingleCharacterSubstring): Renamed from
advanceAndUpdateLineNumberSlowCase. Simplified by calling the function above.
(WebCore::SegmentedString::advanceEmpty): Broke assertion up into two.
(WebCore::SegmentedString::updateSlowCaseFunctionPointers): Updated for name changes.
(WebCore::SegmentedString::advancePastSlowCase): Changed name and meaning of
boolean argument. Rewrote to use the String class less; it's now used only when
we fail to match after the first character rather than being used for the actual
comparison with the literal.

  • platform/text/SegmentedString.h: Moved all non-trivial function bodies out of

the class definition to make things easier to read. Moved the SegmentedSubstring
class inside the SegmentedString class, making it a private struct named Substring.
Removed the m_ prefix from data members of the struct, removed many functions from
the struct and made its union be anonymous instead of naming it m_data. Removed
unneeded StringBuilder.h include.
(WebCore::SegmentedString::isEmpty): Changed to use the length of the substring
instead of a separate boolean. We never create an empty substring, nor leave one
in place as the current substring unless the entire segmented string is empty.
(WebCore::SegmentedString::advancePast): Updated to use the new member function
template instead of a non-template member function. The new member function is
entirely rewritten and does the matching directly rather than allocating a string
just to do prefix matching.
(WebCore::SegmentedString::advancePastLettersIgnoringASCIICase): Renamed to make
it clear that the literal must be all non-letters or lowercase letters as with
the other "letters ignoring ASCII case" functions. The three call sites all fit
the bill. Implement by calling the new function template.
(WebCore::SegmentedString::currentCharacter): Renamed from currentChar.
(WebCore::SegmentedString::Substring::Substring): Use an rvalue reference and
move the string in.
(WebCore::SegmentedString::Substring::currentCharacter): Simplified since this
is never used on an empty substring.
(WebCore::SegmentedString::Substring::incrementAndGetCurrentCharacter): Ditto.
(WebCore::SegmentedString::SegmentedString): Overload to take an rvalue reference.
Simplified since there are now fewer data members.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber): Renamed from
advance, since this is only safe to use if there is some reason it is OK to skip
updating the line number.
(WebCore::SegmentedString::advance): Renamed from advanceAndUpdateLineNumber,
since doing that is the normal desired behavior and not worth mentioning in the
public function name.
(WebCore::SegmentedString::advancePastNewline): Renamed from
advancePastNewlineAndUpdateLineNumber.
(WebCore::SegmentedString::numberOfCharactersConsumed): Greatly simplified since
pushed characters are no longer supported.
(WebCore::SegmentedString::characterMismatch): Added. Used by advancePast.

  • xml/parser/CharacterReferenceParserInlines.h:

(WebCore::unconsumeCharacters): Use toString rather than toStringPreserveCapacity
because the SegmentedString is going to take ownership of the string.
(WebCore::consumeCharacterReference): Updated to use the pushBack that takes just
a String, not a SegmentedString. Also use advancePastNonNewline.

  • xml/parser/MarkupTokenizerInlines.h: Added ADVANCE_PAST_NON_NEWLINE_TO.
  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::insert): Updated since this takes an rvalue reference.
(WebCore::XMLDocumentParser::append): Removed unnecessary code to create a
SegmentedString.

  • xml/parser/XMLDocumentParser.h: Updated for above. Also fixed indentation

and initialized most data members.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::XMLDocumentParser): Moved most data member
initialization into the class definition.
(WebCore::XMLDocumentParser::resumeParsing): Removed code that copied a
segmented string, but converted the whole thing into a string before using it.
Now we convert to a string right away.

Source/WTF:

And do it without re-introducing:

REGRESSION (r209058): API test StringBuilderTest.Equal crashing
https://bugs.webkit.org/show_bug.cgi?id=165142

Reviewed by Sam Weinig.

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::bufferCharacters<LChar>): Moved this here from
the header since it is only used inside the class. Also renamed from
getBufferCharacters.
(WTF::StringBuilder::bufferCharacters<UChar>): Ditto.
(WTF::StringBuilder::appendUninitializedUpconvert): Added. Helper
for the upconvert case in the 16-bit overload of StrinBuilder::append.
(WTF::StringBuilder::append): Changed to use appendUninitializedUpconvert.
(WTF::quotedJSONStringLength): Added. Used in new appendQuotedJSONString
implementation below that now correctly determines the size of what will
be appended by walking thorugh the string twice.
(WTF::appendQuotedJSONStringInternal): Moved the code that writes the
quote marks in here. Also made a few coding style tweaks.
(WTF::StringBuilder::appendQuotedJSONString): Rewrote to use a much
simpler algorithm that grows the string the same way the append function
does. The old code would use reserveCapacity in a way that was costly when
doing a lot of appends on the same string, and also allocated far too much
memory for normal use cases where characters did not need to be turned
into escape sequences.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::append): Tweaked style a bit, fixed a bug where the
m_is8Bit field wasn't set correctly in one case, optimized the function that
adds substrings for the case where this is the first append and the substring
happens to cover the entire string. Also clarified the assertions and removed
an unneeded check from that substring overload.
(WTF::equal): Reimplemented, using equalCommon. Added an overload of the equal
function just for the case where the arguments are StringBuilder, String.
This is needed because of the peculiar behavior of is8Bit in String, different
from any of our other string classes. I think we should consider changing
String::is8Bit to return true for null strings. We could then remove this
overload and probably remove other checks for null and zero length elsewhere
that are also needed only to avoid calling is8Bit on a null String.

8:56 AM Changeset in webkit [209128] by hyatt@apple.com
  • 2 edits in trunk/LayoutTests

[CSS Parser] Mark a bunch of tests as able to fail
https://bugs.webkit.org/show_bug.cgi?id=165199

Reviewed by Zalan Bujtas.

8:17 AM Changeset in webkit [209127] by Wenson Hsieh
  • 2 edits in trunk/LayoutTests

Unreviewed, mark tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html as flaky

It seems there are additional causes of test failures when scrolling in iframes. webkit.org/b/165196 will be
used to track this.

  • platform/mac-wk2/TestExpectations:
1:41 AM Changeset in webkit [209126] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Unreviewed speculative cmake buildfix after r209070.

  • PlatformMac.cmake: New sources added.
12:36 AM Changeset in webkit [209125] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[WebRTC][OpenWebRTC] Temporary device selection support
https://bugs.webkit.org/show_bug.cgi?id=165141

Reviewed by Alejandro G. Castro.

Make sure the player handles only one audio and video track at
most for now. The device choice can be influenced with the
WEBKIT_VIDEO_DEVICE and WEBKIT_AUDIO_DEVICE environment variables.
Each variable optionally holds the name of the device to use.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::play):
(WebCore::MediaPlayerPrivateGStreamerOwr::load):

12:30 AM Changeset in webkit [209124] by Claudio Saavedra
  • 2 edits in trunk/Source/WebCore

Build fix with !HAVE(ACCESSIBILITY)

  • accessibility/AXObjectCache.h:

(WebCore::AccessibilityReplacedText::AccessibilityReplacedText):
(WebCore::AccessibilityReplacedText::postTextStateChangeNotification):

Add dummy implementations.

Nov 29, 2016:

11:22 PM Changeset in webkit [209123] by jfbastien@apple.com
  • 40 edits
    7 copies
    3 adds in trunk

WebAssembly JS API: improve Instance
https://bugs.webkit.org/show_bug.cgi?id=164757

Reviewed by Keith Miller.

JSTests:

An Instance's exports property wasn't populated with exports.

A follow-up patch will do imports.

A few things of note:

  • LowLevelBinary: support 3-byte integers.
  • LowLevelBinary: support proper UTF-8 2003 code points (instead of UTF-16).
  • wasm/Builder.js:
  • wasm/Builder_WebAssemblyBinary.js: wire up exports, stub other things out some more

(const.emitters.Export):

  • wasm/LowLevelBinary.js:

(export.default.LowLevelBinary.prototype.uint24): add, used for UTF-8
(export.default.LowLevelBinary.prototype.string): support UTF-8
(export.default.LowLevelBinary.prototype.getUint24): add, used for UTF-8
(export.default.LowLevelBinary.prototype.getVaruint1): was missing
(export.default.LowLevelBinary.prototype.getString): support UTF-8
(export.default.LowLevelBinary):

  • wasm/js-api/test_Instance.js: instance.exports.answer() <-- this is where the magic of this entire patch is

(ExportedAnswerI32):

  • wasm/js-api/test_basic_api.js: punt test to later

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

  • wasm/self-test/test_BuilderWebAssembly.js: UTF-8

(CustomSection):

  • wasm/self-test/test_LowLevelBinary_string.js: UTF-8 now works
  • wasm/self-test/test_LowLevelBinary_uint16.js: was missing one value
  • wasm/self-test/test_LowLevelBinary_uint24.js: Copied from JSTests/wasm/self-test/test_LowLevelBinary_uint8.js.
  • wasm/self-test/test_LowLevelBinary_uint8.js: was missing one value
  • wasm/self-test/test_LowLevelBinary_varuint1.js: Added.
  • wasm/utilities.js: this dump thing was useful

(const._dump):

Source/JavaScriptCore:

An Instance's exports property wasn't populated with exports.

According to the spec [0], exports should present itself as a WebAssembly
Module Record. In order to do this we need to split JSModuleRecord into
AbstractModuleRecord (without the link and evaluate functions), and
JSModuleRecord (which implements link and evaluate). We can then have a separate
WebAssemblyModuleRecord which shares most of the implementation.

exports then maps function names to WebAssemblyFunction and
WebAssemblyFunctionCell, which call into the B3-generated WebAssembly code.

A follow-up patch will do imports.

A few things of note:

  • Use Identifier instead of String. They get uniqued, we need them for the JSModuleNamespaceObject. This is safe because JSWebAssemblyModule creation is on the main thread.
  • JSWebAssemblyInstance needs to refer to the JSWebAssemblyModule used to create it, because the module owns the code, identifiers, etc. The world would be very sad if it got GC'd.
  • Instance.exports shouldn't use putWithoutTransition because it affects all Structures, whereas here each instance needs its own exports.
  • Expose the compiled functions, and pipe them to the InstanceConstructor. Start moving things around to split JSModuleRecord out into JS and WebAssembly parts.

[0]: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyinstance-constructor

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/AbstractModuleRecord.cpp: Copied from Source/JavaScriptCore/runtime/JSModuleRecord.cpp, which I split in two

(JSC::AbstractModuleRecord::AbstractModuleRecord):
(JSC::AbstractModuleRecord::destroy):
(JSC::AbstractModuleRecord::finishCreation):
(JSC::AbstractModuleRecord::visitChildren):
(JSC::AbstractModuleRecord::appendRequestedModule):
(JSC::AbstractModuleRecord::addStarExportEntry):
(JSC::AbstractModuleRecord::addImportEntry):
(JSC::AbstractModuleRecord::addExportEntry):
(JSC::identifierToJSValue):
(JSC::AbstractModuleRecord::hostResolveImportedModule):
(JSC::AbstractModuleRecord::ResolveQuery::ResolveQuery):
(JSC::AbstractModuleRecord::ResolveQuery::isEmptyValue):
(JSC::AbstractModuleRecord::ResolveQuery::isDeletedValue):
(JSC::AbstractModuleRecord::ResolveQuery::Hash::hash):
(JSC::AbstractModuleRecord::ResolveQuery::Hash::equal):
(JSC::AbstractModuleRecord::cacheResolution):
(JSC::getExportedNames):
(JSC::AbstractModuleRecord::getModuleNamespace):
(JSC::printableName):
(JSC::AbstractModuleRecord::dump):

  • runtime/AbstractModuleRecord.h: Copied from Source/JavaScriptCore/runtime/JSModuleRecord.h.

(JSC::AbstractModuleRecord::ImportEntry::isNamespace):
(JSC::AbstractModuleRecord::sourceCode):
(JSC::AbstractModuleRecord::moduleKey):
(JSC::AbstractModuleRecord::requestedModules):
(JSC::AbstractModuleRecord::exportEntries):
(JSC::AbstractModuleRecord::importEntries):
(JSC::AbstractModuleRecord::starExportEntries):
(JSC::AbstractModuleRecord::declaredVariables):
(JSC::AbstractModuleRecord::lexicalVariables):
(JSC::AbstractModuleRecord::moduleEnvironment):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::webAssemblyModuleRecordStructure):
(JSC::JSGlobalObject::webAssemblyFunctionStructure):

  • runtime/JSModuleEnvironment.cpp:

(JSC::JSModuleEnvironment::create):
(JSC::JSModuleEnvironment::finishCreation):
(JSC::JSModuleEnvironment::getOwnPropertySlot):
(JSC::JSModuleEnvironment::getOwnNonIndexPropertyNames):
(JSC::JSModuleEnvironment::put):
(JSC::JSModuleEnvironment::deleteProperty):

  • runtime/JSModuleEnvironment.h:

(JSC::JSModuleEnvironment::create):
(JSC::JSModuleEnvironment::offsetOfModuleRecord):
(JSC::JSModuleEnvironment::allocationSize):
(JSC::JSModuleEnvironment::moduleRecord):
(JSC::JSModuleEnvironment::moduleRecordSlot):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::JSModuleNamespaceObject::getOwnPropertySlot):

  • runtime/JSModuleNamespaceObject.h:

(JSC::JSModuleNamespaceObject::create):
(JSC::JSModuleNamespaceObject::moduleRecord):

  • runtime/JSModuleRecord.cpp:

(JSC::JSModuleRecord::createStructure):
(JSC::JSModuleRecord::create):
(JSC::JSModuleRecord::JSModuleRecord):
(JSC::JSModuleRecord::destroy):
(JSC::JSModuleRecord::finishCreation):
(JSC::JSModuleRecord::visitChildren):
(JSC::JSModuleRecord::instantiateDeclarations):

  • runtime/JSModuleRecord.h:
  • runtime/JSScope.cpp:

(JSC::abstractAccess):
(JSC::JSScope::collectClosureVariablesUnderTDZ):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • wasm/JSWebAssembly.h:
  • wasm/WasmFormat.h: use Identifier instead of String
  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):
(JSC::Wasm::ModuleParser::parseImport): fix off-by-one
(JSC::Wasm::ModuleParser::parseFunction):
(JSC::Wasm::ModuleParser::parseExport):

  • wasm/WasmModuleParser.h:

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

  • wasm/WasmPlan.cpp:

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

  • wasm/js/JSWebAssemblyInstance.cpp:

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

  • wasm/js/JSWebAssemblyInstance.h:

(JSC::JSWebAssemblyInstance::module):

  • wasm/js/JSWebAssemblyModule.cpp:

(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::finishCreation):
(JSC::JSWebAssemblyModule::visitChildren):

  • wasm/js/JSWebAssemblyModule.h:

(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::compiledFunctions):
(JSC::JSWebAssemblyModule::exportSymbolTable):

  • wasm/js/WebAssemblyFunction.cpp: Added.

(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::createStructure):
(JSC::WebAssemblyFunction::WebAssemblyFunction):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):

  • wasm/js/WebAssemblyFunction.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h.

(JSC::CallableWebAssemblyFunction::CallableWebAssemblyFunction):
(JSC::WebAssemblyFunction::webAssemblyFunctionCell):

  • wasm/js/WebAssemblyFunctionCell.cpp: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h.

(JSC::WebAssemblyFunctionCell::create):
(JSC::WebAssemblyFunctionCell::WebAssemblyFunctionCell):
(JSC::WebAssemblyFunctionCell::destroy):
(JSC::WebAssemblyFunctionCell::createStructure):

  • wasm/js/WebAssemblyFunctionCell.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h.

(JSC::WebAssemblyFunctionCell::function):

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::constructJSWebAssemblyModule):

  • wasm/js/WebAssemblyModuleRecord.cpp: Added.

(JSC::WebAssemblyModuleRecord::createStructure):
(JSC::WebAssemblyModuleRecord::create):
(JSC::WebAssemblyModuleRecord::WebAssemblyModuleRecord):
(JSC::WebAssemblyModuleRecord::destroy):
(JSC::WebAssemblyModuleRecord::finishCreation):
(JSC::WebAssemblyModuleRecord::visitChildren):
(JSC::WebAssemblyModuleRecord::link):
(JSC::WebAssemblyModuleRecord::evaluate):

  • wasm/js/WebAssemblyModuleRecord.h: Copied from Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h.

Source/WTF:

  • wtf/Expected.h:

(WTF::ExpectedDetail::destroy): silence a warning

11:14 PM Changeset in webkit [209122] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Database process should not initialize gtk
https://bugs.webkit.org/show_bug.cgi?id=165138

Reviewed by Sergio Villar Senin.

It doesn't use GTK+ at all.

  • DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp:

(WebKit::DatabaseProcessMainUnix):
(): Deleted.

10:24 PM Changeset in webkit [209121] by sbarati@apple.com
  • 30 edits
    12 adds in trunk

We should be able optimize the pattern where we spread a function's rest parameter to another call
https://bugs.webkit.org/show_bug.cgi?id=163865

Reviewed by Filip Pizlo.

JSTests:

  • microbenchmarks/default-derived-constructor.js: Added.

(createClassHierarchy.let.currentClass):
(createClassHierarchy):

  • stress/call-varargs-spread.js: Added.

(assert):
(bar):
(foo):

  • stress/load-varargs-on-new-array-with-spread-convert-to-static-loads.js: Added.

(assert):
(baz):
(bar):
(foo):

  • stress/new-array-with-spread-with-normal-spread-and-phantom-spread.js: Added.

(assert):
(foo):
(escape):
(bar):

  • stress/phantom-new-array-with-spread-osr-exit.js: Added.

(assert):
(baz):
(bar):
(effects):
(foo):

  • stress/phantom-spread-forward-varargs.js: Added.

(assert):
(test1.bar):
(test1.foo):
(test1):
(test2.bar):
(test2.foo):
(test3.baz):
(test3.bar):
(test3.foo):
(test4.baz):
(test4.bar):
(test4.foo):
(test5.baz):
(test5.bar):
(test5.foo):

  • stress/phantom-spread-osr-exit.js: Added.

(assert):
(baz):
(bar):
(effects):
(foo):

  • stress/spread-call-convert-to-static-call.js: Added.

(assert):
(baz):
(bar):
(foo):

  • stress/spread-forward-call-varargs-stack-overflow.js: Added.

(assert):
(identity):
(bar):
(foo):

  • stress/spread-forward-varargs-rest-parameter-change-iterator-protocol-2.js: Added.

(assert):
(baz.Array.prototype.Symbol.iterator):
(baz):
(bar):
(foo):
(test):

  • stress/spread-forward-varargs-rest-parameter-change-iterator-protocol.js: Added.

(assert):
(baz.Array.prototype.Symbol.iterator):
(baz):
(bar):
(foo):

  • stress/spread-forward-varargs-stack-overflow.js: Added.

(assert):
(bar):
(foo):

Source/JavaScriptCore:

This patch optimizes the following patterns to prevent both the allocation
of the rest parameter, and the execution of the iterator protocol:

`
function foo(...args) {

let arr = [...args];

}

and

function foo(...args) {

bar(...args);

}
`

To do this, I've extended the arguments elimination phase to reason
about Spread and NewArrayWithSpread. I've added two new nodes, PhantomSpread
and PhantomNewArrayWithSpread. PhantomSpread is only allowed over rest
parameters that don't escape. If the rest parameter *does* escape, we can't
convert the spread into a phantom because it would not be sound w.r.t JS
semantics because we would be reading from the call frame even though
the rest array may have changed.

Note that NewArrayWithSpread also understands what to do when one of its
arguments is PhantomSpread(@PhantomCreateRest) even if it itself is escaped.

PhantomNewArrayWithSpread is only allowed over a series of
PhantomSpread(@PhantomCreateRest) nodes. Like with PhantomSpread, PhantomNewArrayWithSpread
is only allowed if none of its arguments that are being spread are escaped
and if it itself is not escaped.

Because there is a dependency between a node being a candidate and
the escaped state of the node's children, I've extended the notion
of escaping a node inside the arguments elimination phase. Now, when
any node is escaped, we must consider all other candidates that are may
now no longer be valid.

For example:

`
function foo(...args) {

escape(args);
bar(...args);

}
`

In the above program, we don't know if the function call to escape()
modifies args, therefore, the spread can not become phantom because
the execution of the spread may not be as simple as reading the
arguments from the call frame.

Unfortunately, the arguments elimination phase does not consider control
flow when doing its escape analysis. It would be good to integrate this
phase with the object allocation sinking phase. To see why, consider
an example where we don't eliminate the spread and allocation of the rest
parameter even though we could:

`
function foo(rareCondition, ...args) {

bar(...args);
if (rareCondition)

baz(args);

}
`

There are only a few users of the PhantomSpread and PhantomNewArrayWithSpread
nodes. PhantomSpread is only used by PhantomNewArrayWithSpread and NewArrayWithSpread.
PhantomNewArrayWithSpread is only used by ForwardVarargs and the various
*Call*ForwardVarargs nodes. The users of these phantoms know how to produce
what the phantom node would have produced. For example, NewArrayWithSpread
knows how to produce the values that would have been produced by PhantomSpread(@PhantomCreateRest)
by directly reading from the call frame.

This patch is a 6% speedup on my MBP on ES6SampleBench.

  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::tryAppendLea):

  • b3/B3ValueRep.h:
  • builtins/BuiltinExecutables.cpp:

(JSC::BuiltinExecutables::createDefaultConstructor):

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGForAllKills.h:

(JSC::DFG::forAllKillsInBlock):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasConstant):
(JSC::DFG::Node::constant):
(JSC::DFG::Node::bitVector):
(JSC::DFG::Node::isPhantomAllocation):

  • dfg/DFGNodeType.h:
  • dfg/DFGOSRAvailabilityAnalysisPhase.cpp:

(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
(JSC::DFG::LocalOSRAvailabilityCalculator::LocalOSRAvailabilityCalculator):
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):

  • dfg/DFGOSRAvailabilityAnalysisPhase.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPreciseLocalClobberize.h:

(JSC::DFG::PreciseLocalClobberizeAdaptor::readTop):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGPromotedHeapLocation.cpp:

(WTF::printInternal):

  • dfg/DFGPromotedHeapLocation.h:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::LowerDFGToB3):
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::getSpreadLengthFromInlineCallFrame):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargsWithSpread):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionMaxArguments):

  • runtime/JSFixedArray.h:

(JSC::JSFixedArray::createFromArray):

8:54 PM Changeset in webkit [209120] by commit-queue@webkit.org
  • 40 edits in trunk/Source

Unreviewed, rolling out r209058 and r209074.
https://bugs.webkit.org/show_bug.cgi?id=165188

These changes caused API test StringBuilderTest.Equal to crash
and/or fail. (Requested by ryanhaddad on #webkit).

Reverted changesets:

"Streamline and speed up tokenizer and segmented string
classes"
https://bugs.webkit.org/show_bug.cgi?id=165003
http://trac.webkit.org/changeset/209058

"REGRESSION (r209058): API test StringBuilderTest.Equal
crashing"
https://bugs.webkit.org/show_bug.cgi?id=165142
http://trac.webkit.org/changeset/209074

8:43 PM Changeset in webkit [209119] by Chris Dumez
  • 1 edit
    2 adds in trunk/LayoutTests

[iOS] Add test for HTML form validation popover dismissal on tap
https://bugs.webkit.org/show_bug.cgi?id=165185

Reviewed by Simon Fraser.

Add test for HTML form validation popover dismissal on tap outside the
popover.

  • fast/forms/ios/validation-bubble-dismiss-on-tap-expected.txt: Added.
  • fast/forms/ios/validation-bubble-dismiss-on-tap.html: Added.
8:38 PM Changeset in webkit [209118] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: ARIA tree & treeitem roles & aria-expanded state not spoken to VoiceOver iOS 10
https://bugs.webkit.org/show_bug.cgi?id=164936
<rdar://problem/29334274>

Reviewed by Chris Fleizach.

Source/WebCore:

Added a new container type on iOS for trees. Also, since the treeitem role is ignored
on iOS, we should expose the expanded status of a treeitem to its accessible children.

Test: accessibility/ios-simulator/treeitem-expanded.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper _accessibilityTreeAncestor]):
(-[WebAccessibilityObjectWrapper treeItemParentForObject:]):
(-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
(-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):

LayoutTests:

  • accessibility/ios-simulator/treeitem-expanded-expected.txt: Added.
  • accessibility/ios-simulator/treeitem-expanded.html: Added.
8:37 PM Changeset in webkit [209117] by Chris Dumez
  • 6 edits in trunk

Unreviewed, rolling out r209096, r209104, and r209114.

Caused over 200 layout test failures on the bots

Reverted changesets:

"IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite
backend."
https://bugs.webkit.org/show_bug.cgi?id=164974
http://trac.webkit.org/changeset/209096

"Followup to:"
https://bugs.webkit.org/show_bug.cgi?id=164974
http://trac.webkit.org/changeset/209104

"REGRESSION (r209104): storage/indexeddb/modern/gc-closes-
database(-private).html timeout."
https://bugs.webkit.org/show_bug.cgi?id=165186
http://trac.webkit.org/changeset/209114

8:26 PM Changeset in webkit [209116] by commit-queue@webkit.org
  • 10 edits
    1 add in trunk

[Modern Media Controls] Localization
https://bugs.webkit.org/show_bug.cgi?id=165176

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

Source/WebCore:

We add a new localization file for the purpose of modern media controls, since we may
require different strings than the legacy one.

  • English.lproj/modern-media-controls-localized-strings.js: Added.
  • Modules/modern-media-controls/controls/airplay-placard.js:

(AirplayPlacard):

  • Modules/modern-media-controls/controls/pip-placard.js:

(PiPPlacard):

  • Modules/modern-media-controls/main.js:

(UIString):

  • Modules/modern-media-controls/media/status-support.js:

(StatusSupport.prototype.syncControl):
(StatusSupport):

  • WebCore.xcodeproj/project.pbxproj:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::mediaControlsScript):

LayoutTests:

Using the modern media controls module loader to ensure we pick up main.js,
and also because it's the right thing to do.

  • media/modern-media-controls/airplay-placard/airplay-placard.html:
  • media/modern-media-controls/pip-placard/pip-placard.html:
8:22 PM Changeset in webkit [209115] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Improve name sorting in HeapSnapshot data grids
https://bugs.webkit.org/show_bug.cgi?id=165170
<rdar://problem/28784421>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-29
Reviewed by Matt Baker.

When sorting the Name column, group named properties and unnamed
properties and sort them each individually:

  • Sort named properties by their property name (property names will be unique if they exist)
  • Sort unnamed properties by their class name (guaranteed)
  • Sort any tied class names by their object id

This makes using the Object Graph with Name sort easier to follow.
In the ascending sort you see all the named properties first,
followed by the unnamed (internal) properties.

  • UserInterface/Views/HeapSnapshotContentView.js:

(WebInspector.HeapSnapshotObjectGraphContentView):
Since this data grid column now sorts on more than just the "Class Name"
rename it to "Name".

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
Make the sort of the className column more general to handle sorting
by property names, class names, and object identifiers.

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get propertyName):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
Provide a lazy propertyName accessor where we compute it once and stash
it on the DataGridNode to avoid extra work when resorting.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate.propertyName):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
In the initial populated sort, provide the necessary property name property
the sort comparator expects.

7:50 PM Changeset in webkit [209114] by beidson@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r209104): storage/indexeddb/modern/gc-closes-database(-private).html timeout.
https://bugs.webkit.org/show_bug.cgi?id=165186

Unreviewed gardening.

  • TestExpectations: Skip these tests for now until I can resolve things properly.
7:42 PM Changeset in webkit [209113] by caitp@igalia.com
  • 4 edits in trunk

[JSC] always wrap AwaitExpression operand in a new Promise
https://bugs.webkit.org/show_bug.cgi?id=165181

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/async-await-basic.js:

(async.awaitedPromisesAreWrapped):

Source/JavaScriptCore:

Ensure operand of AwaitExpression is wrapped in a new Promise by
explicitly creating a new Promise Capability and invoking its
resolve callback. This avoids the specified short-circuit for
Promise.resolve().

  • builtins/AsyncFunctionPrototype.js:

(globalPrivate.asyncFunctionResume):

7:09 PM Changeset in webkit [209112] by sbarati@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

We should support CreateThis in the FTL
https://bugs.webkit.org/show_bug.cgi?id=164904

Reviewed by Geoffrey Garen.

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateThis):
(JSC::FTL::DFG::LowerDFGToB3::storeStructure):
(JSC::FTL::DFG::LowerDFGToB3::allocateCell):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedCell):

  • runtime/Structure.h:
7:05 PM Changeset in webkit [209111] by commit-queue@webkit.org
  • 12 edits
    1 copy
    10 adds in trunk

[Modern Media Controls] Show an invalid placard when we fail to load a media file
https://bugs.webkit.org/show_bug.cgi?id=165180

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

Source/WebCore:

We now show a placard with an "invalid" icon when we fail to load the media file.

Tests: media/modern-media-controls/invalid-placard/invalid-placard.html

media/modern-media-controls/placard-support/placard-support-error.html

  • Modules/modern-media-controls/controls/icon-service.js:
  • Modules/modern-media-controls/controls/invalid-placard.js: Added.

(InvalidPlacard):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.get showsStartButton):
(MediaControls.prototype.set showsStartButton):
(MediaControls.prototype.get showsPlacard):
(MediaControls.prototype.hidePlacard):
(MediaControls.prototype._invalidateChildren):

  • Modules/modern-media-controls/controls/placard.css:

(.placard .icon):

(PlacardSupport.prototype.get mediaEvents):
(PlacardSupport.prototype._updatePlacard):
(PlacardSupport):

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

We add tests for the new InvalidPlacard class.

  • media/modern-media-controls/invalid-placard/invalid-placard-expected.txt: Added.
  • media/modern-media-controls/invalid-placard/invalid-placard.html: Added.
  • media/modern-media-controls/media-controls/media-controls-constructor-expected.txt:
  • media/modern-media-controls/media-controls/media-controls-constructor.html:
  • media/modern-media-controls/media-controls/media-controls-placard-expected.txt:
  • media/modern-media-controls/media-controls/media-controls-placard.html:
  • media/modern-media-controls/placard-support/placard-support-error-expected.txt: Added.
  • media/modern-media-controls/placard-support/placard-support-error.html: Added.
7:02 PM Changeset in webkit [209110] by Simon Fraser
  • 2 edits in trunk/Source/WTF

Allow TracePoint to take arbitrary data
https://bugs.webkit.org/show_bug.cgi?id=165182

Reviewed by Tim Horton.

Allow TracePoint() to take four numeric arguments, for arbitrary data.

#pragma once

  • wtf/SystemTracing.h:

(WTF::TracePoint):

6:55 PM Changeset in webkit [209109] by matthew_hanson@apple.com
  • 6 edits in tags/Safari-603.1.13.1/Source/WebKit2

Roll out r208611.

6:26 PM Changeset in webkit [209108] by commit-queue@webkit.org
  • 18 edits
    2 copies
    11 adds in trunk

[Modern Media Controls] Only show controls when the controls attribute is set
https://bugs.webkit.org/show_bug.cgi?id=165175

Source/WebCore:

We now respect the value of the media's "controls" attribute so that the start button and the controls
bar are only shown when that attribute is set to "true".

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

Tests: media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html

media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html
media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html
media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html
media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html

  • Modules/modern-media-controls/controls/controls-bar.js: Added.

(ControlsBar):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.): Deleted.

  • Modules/modern-media-controls/js-files:
  • Modules/modern-media-controls/media/controls-visibility-support.js: Added.

(ControlsVisibilitySupport):
(ControlsVisibilitySupport.prototype.destroy):
(ControlsVisibilitySupport.prototype.get mediaEvents):
(ControlsVisibilitySupport.prototype.syncControl):

  • Modules/modern-media-controls/media/media-controller-support.js:

(MediaControllerSupport):
(MediaControllerSupport.prototype.handleEvent):

  • Modules/modern-media-controls/media/media-controller.js:

(MediaController.prototype._updateControlsIfNeeded):

  • WebCore.xcodeproj/project.pbxproj:

LayoutTests:

We add new tests to check that the media's "control" attribute is respected. We also update a
series of tests to be more robust and turn the media "controls" attribute on so that the controls
bar is displayed as required by the tests.

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio-expected.txt: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-audio.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off-expected.txt: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-off.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt: Added.
  • media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html: Added.
  • media/modern-media-controls/fullscreen-support/fullscreen-support-click.html:
  • media/modern-media-controls/media-controls/media-controls-constructor-expected.txt:
  • media/modern-media-controls/media-controls/media-controls-constructor.html:
  • media/modern-media-controls/pip-support/pip-support-click.html:
  • media/modern-media-controls/placard-support/placard-support-airplay.html:
  • media/modern-media-controls/scrubber-support/scrubber-support-click-expected.txt:
  • media/modern-media-controls/scrubber-support/scrubber-support-click.html:
  • media/modern-media-controls/scrubber-support/scrubber-support-drag-expected.txt:
  • media/modern-media-controls/scrubber-support/scrubber-support-drag.html:
  • media/modern-media-controls/volume-support/volume-support-click.html:
  • media/modern-media-controls/volume-support/volume-support-drag.html:
5:58 PM Changeset in webkit [209107] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13.1/Source/WebKit2

Merge r209057. rdar://problem/26899976

5:58 PM Changeset in webkit [209106] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13.1/Source/WebKit2

Merge r208835. rdar://problem/26899976

5:58 PM Changeset in webkit [209105] by matthew_hanson@apple.com
  • 5 edits
    1 move in tags/Safari-603.1.13.1/Source/WebKit2

Merge r208589. rdar://problem/26899976

5:16 PM Changeset in webkit [209104] by beidson@apple.com
  • 2 edits in trunk/Source/WebCore

Followup to:
IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=164974

Unreviewed.

  • Modules/indexeddb/IDBTransaction.h: Until I can explore further why these operations are not protected in the map, change these raw pointers to RefPtrs. This fixes issues seen under GuardMalloc.
5:08 PM Changeset in webkit [209103] by barraclough@apple.com
  • 2 edits in trunk/Source/WebKit2

Remove WebPage::SetPageSuppressed
https://bugs.webkit.org/show_bug.cgi?id=165158

Unreviewed revert accidental change.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setActivityState):

5:00 PM Changeset in webkit [209102] by barraclough@apple.com
  • 7 edits in trunk/Source/WebKit2

Remove WebPage::SetPageSuppressed
https://bugs.webkit.org/show_bug.cgi?id=165158

Reviewed by Tim Horton.

This was scaffolding. We've now refactored to the point that the information driving throttling originates
from the UI process (so UI and web processes can have a consistent view of what should throttle), but we
don't need a separate message to handle this - necessary state to determine is provided in ActivityState.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateThrottleState):

  • used to send SetPageSuppressed; no longer does.
  • UIProcess/WebPageProxy.h:
    • removed m_pageSuppressed (was used to avoid duplicated messages).
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState):

  • compute throttle state based on m_activityState.

(WebKit::WebPage::setActivityState):

  • update throttle state whenever activity state changes.

(WebKit::WebPage::updatePreferences):

  • update throttle state whenever preferences change (throttling can be disabled via preference).

(WebKit::WebPage::setPageSuppressed): Deleted.

  • Removed WebPage::SetPageSuppressed.
  • WebProcess/WebPage/WebPage.h:
    • Removed WebPage::SetPageSuppressed.
    • Added m_processSuppressionEnabled, to cache preference state.
  • WebProcess/WebPage/WebPage.messages.in:
    • Removed WebPage::SetPageSuppressed.
4:06 PM Changeset in webkit [209101] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/RegExp* files.
https://bugs.webkit.org/show_bug.cgi?id=165054

Reviewed by Saam Barati.

Also replaced returning JSValue() with returning { }.

  • runtime/RegExpConstructor.cpp:

(JSC::toFlags):
(JSC::regExpCreate):
(JSC::constructRegExp):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::defineOwnProperty):
(JSC::collectMatches):
(JSC::RegExpObject::matchGlobal):

  • runtime/RegExpObjectInlines.h:

(JSC::getRegExpObjectLastIndexAsUnsigned):
(JSC::RegExpObject::execInline):
(JSC::RegExpObject::matchInline):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncCompile):
(JSC::flagsString):
(JSC::regExpProtoFuncToString):
(JSC::regExpProtoFuncSplitFast):

4:00 PM Changeset in webkit [209100] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking media/modern-media-controls/tracks-support/tracks-support-audio-tracks.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=165169

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:38 PM Changeset in webkit [209099] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[Modern Media Controls] Inline controls show when entering fullscreen
https://bugs.webkit.org/show_bug.cgi?id=165161

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

We would error when entering fullscreen due to the TracksSupport having its destroy() method
called when tearing down the inline controls and the mediaController reference being incorrect.

  • Modules/modern-media-controls/media/tracks-support.js:

(TracksSupport.prototype.destroy):

3:38 PM Changeset in webkit [209098] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

[Modern Media Controls] Status text stuck saying "Loading" after media starts playing
https://bugs.webkit.org/show_bug.cgi?id=165162

Patch by Antoine Quint <Antoine Quint> on 2016-11-29
Reviewed by Dean Jackson.

Source/WebCore:

We forgot to handle the case where none of the special messages need to be set and the
status text should be just an empty string, meaning there is no status text shown in the
controls bar and the scrubber appears instead.

Test: media/modern-media-controls/status-support/status-support-playing.html

  • Modules/modern-media-controls/media/status-support.js:

(StatusSupport.prototype.syncControl):
(StatusSupport):

LayoutTests:

Adding a new test ensuring the status text is the empty string once the media starts playing.

  • media/modern-media-controls/status-support/status-support-playing-expected.txt: Added.
  • media/modern-media-controls/status-support/status-support-playing.html: Added.
3:35 PM Changeset in webkit [209097] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking js/dom/modules/module-will-fire-beforeload.html as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=164883

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:28 PM Changeset in webkit [209096] by beidson@apple.com
  • 3 edits in trunk/Source/WebCore

IndexedDB 2.0: Cache and reuse SQLiteStatements in the SQLite backend.
https://bugs.webkit.org/show_bug.cgi?id=164974

Reviewed by Alex Christensen.

No new tests (No behavior change other than being faster).

Instead of building new SQLiteStatements from scratch each time they're needed and then
finalizing them after used for a single operation, cache them.

For tests that do puts and/or gets in tight loops, this shows up as a 5%-20% speedup on profiles.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::createAndPopulateInitialDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement):
(WebCore::IDBServer::SQLiteIDBBackingStore::closeSQLiteDB):
(WebCore::IDBServer::queryForGetAllObjectStoreRecords): Deleted.

  • Modules/indexeddb/server/SQLiteIDBBackingStore.h:
3:26 PM Changeset in webkit [209095] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/contentSecurityPolicy/1.1/scriptnonce-invalidnonce.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=165165

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:21 PM Changeset in webkit [209094] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/storage/callbacks-are-called-in-correct-context.html as a timeout on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=164961

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
3:17 PM Changeset in webkit [209093] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/security/module-correct-mime-types.html as slow on ios-simulator-wk2.
https://bugs.webkit.org/show_bug.cgi?id=164960

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
2:52 PM Changeset in webkit [209092] by jiewen_tan@apple.com
  • 17 edits
    28 adds in trunk

Update SubtleCrypto::sign to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164740
<rdar://problem/29257864>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::sign method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-sign. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-sign.
  2. It implements sign operations of the following algorithms: HMAC, and RSASSA-PKCS1-V1_5.
  3. It also replaces promise.copyRef() with WTFMove(promise) for all the capture lists of exception callbacks in promise functions.

Tests: crypto/subtle/hmac-import-key-sign-sha1.html

crypto/subtle/hmac-import-key-sign-sha224.html
crypto/subtle/hmac-import-key-sign-sha256.html
crypto/subtle/hmac-import-key-sign-sha384.html
crypto/subtle/hmac-import-key-sign-sha512.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha1.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha224.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha256.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha384.html
crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha512.html
crypto/subtle/sign-malformed-parameters.html
crypto/workers/subtle/hmac-import-key-sign.html
crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-sign.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
Fix a minor bug.
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionSignPromise):
(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):
(WebCore::jsSubtleCryptoFunctionImportKeyPromise):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::JSSubtleCrypto::sign):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::sign):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::sign):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/gcrypt/CryptoAlgorithmHMACGCrypt.cpp:

(WebCore::CryptoAlgorithmHMAC::platformSign):

  • crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:

(WebCore::CryptoAlgorithmHMAC::platformSign):

  • crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):

  • crypto/mac/CryptoAlgorithmHMACMac.cpp:

(WebCore::commonCryptoHMACAlgorithm):
(WebCore::calculateSignature):
Remove a null guardance since the depending bug is resolved.
(WebCore::CryptoAlgorithmHMAC::platformSign):
(WebCore::CryptoAlgorithmHMAC::platformVerify):

  • crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:

(WebCore::signRSASSA_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):

LayoutTests:

  • crypto/subtle/hmac-import-key-sign-sha1-expected.txt: Added.
  • crypto/subtle/hmac-import-key-sign-sha1.html: Added.
  • crypto/subtle/hmac-import-key-sign-sha224-expected.txt: Added.
  • crypto/subtle/hmac-import-key-sign-sha224.html: Added.
  • crypto/subtle/hmac-import-key-sign-sha256-expected.txt: Added.
  • crypto/subtle/hmac-import-key-sign-sha256.html: Added.
  • crypto/subtle/hmac-import-key-sign-sha384-expected.txt: Added.
  • crypto/subtle/hmac-import-key-sign-sha384.html: Added.
  • crypto/subtle/hmac-import-key-sign-sha512-expected.txt: Added.
  • crypto/subtle/hmac-import-key-sign-sha512.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha1-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha1.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha224-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha224.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha256-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha256.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha384-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha384.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha512-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-import-key-sign-sha512.html: Added.
  • crypto/subtle/sign-malformed-parameters-expected.txt: Added.
  • crypto/subtle/sign-malformed-parameters.html: Added.
  • crypto/workers/subtle/hmac-import-key-sign-expected.txt: Added.
  • crypto/workers/subtle/hmac-import-key-sign.html: Added.
  • crypto/workers/subtle/resources/hmac-import-key-sign.js: Added.
  • crypto/workers/subtle/resources/rsassa-pkcs1-v1_5-import-key-sign.js: Added.
  • crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-sign-expected.txt: Added.
  • crypto/workers/subtle/rsassa-pkcs1-v1_5-import-key-sign.html: Added.
2:38 PM Changeset in webkit [209091] by Chris Dumez
  • 5 edits in trunk

Can't download move.simple.com direct deposit transition PDF: Non user-triggered activations of anchors that have a download attribute are ignored
https://bugs.webkit.org/show_bug.cgi?id=165148
<rdar://problem/29421771>

Reviewed by Daniel Bates.

Source/WebCore:

We were ignoring non user-triggered activations of anchors that have a
download attribute which is stricter than Chrome and Firefox and breaks
downloads on move.simple.com. This patch relaxes our policy to allow
simulated clicks on such links, similarly to other browsers.

Web authors can anyway already trigger downloads using script by setting
window.location to a specific URL and serving to right HTTP headers to
trigger a download.

Note that our previous behavior matches the current version of the
specification so I also filed a bug against the HTML specification to
see if we can get it changed to match the behavior of browsers:

No new tests, updated existing test.

  • html/HTMLAnchorElement.cpp:

(WebCore::HTMLAnchorElement::handleClick):

LayoutTests:

Update existing test to reflect behavior change.

  • fast/dom/HTMLAnchorElement/anchor-download-synthetic-click-expected.txt:
  • fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html:
2:15 PM Changeset in webkit [209090] by clopez@igalia.com
  • 6 edits
    2 copies
    2 moves
    1 add in trunk/Tools

[Linux] run-benchmark should be able to execute the benchmarks with more browsers.
https://bugs.webkit.org/show_bug.cgi?id=164792

Reviewed by Michael Catanzaro.

This removes the GTKBrowserDriver (and the platform 'gtk') from the run-benchmark script,
and adds a new LinuxBrowserDriver with a platform 'linux'.

It add also drivers for Chrome (Chromium), Firefox, Epiphany and MiniBrowser-GTK (previously MiniBrowser).

The detection of the platform is now done automatically, so it is not longer needed to pass a "--platform" parameter.

The tracking of the browser process is now more robust, we track the pid of the browser process and we only try to
kill the ones that were executed by this script, instead of doing a 'killall $browser' (like before).
We also check for browser process childs and we kill them if they are still alive after the main browser process has been killed.
This depends on psutil, so this will only be done if psutil is installed.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(RunBenchmarkTests.start): The platform is now autodetected and the MiniBrowser driver is renamed to MiniBrowser-GTK.

  • Scripts/webkitpy/benchmark_runner/benchmark_runner.py:

(BenchmarkRunner._run_benchmark): Fix a bug that caused close_browsers to be called twice. Its already called inside BenchmarkRunner._run_one_test.

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_browser_driver.py: Added.

(LinuxBrowserDriver): Implement base class that has all the needed functionality for driving the browsers.
(LinuxBrowserDriver.init):
(LinuxBrowserDriver.prepare_env):
(LinuxBrowserDriver.restore_env):
(LinuxBrowserDriver.close_browsers): Made the dependency on psutil optional (because it was listed as such on the README file <Tools/Scripts/webkitpy/benchmark_runner/README.md>)
(LinuxBrowserDriver.launch_url):
(LinuxBrowserDriver._get_first_executable_path_from_list):
(LinuxBrowserDriver._screen_size):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_chrome_driver.py: Copied from Tools/Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py.

(LinuxChromeDriver):
(LinuxChromeDriver.launch_url):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_epiphany_driver.py: Renamed from Tools/Scripts/webkitpy/benchmark_runner/browser_driver/gtk_browser_driver.py.

(EpiphanyBrowserDriver):
(EpiphanyBrowserDriver.launch_url):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_firefox_driver.py: Copied from Tools/Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py.

(LinuxFirefoxDriver):
(LinuxFirefoxDriver.launch_url):

  • Scripts/webkitpy/benchmark_runner/browser_driver/linux_minibrowsergtk_driver.py: Renamed from Tools/Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py.

(GTKMiniBrowserDriver):
(GTKMiniBrowserDriver.launch_url):

  • Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:

(SimpleHTTPServerDriver):

  • Scripts/webkitpy/benchmark_runner/run_benchmark.py:

(getplatform):
(getdefaultbrowser):
(parse_args):

  • Scripts/webkitpy/benchmark_runner/utils.py:

(load_subclasses): The loading of subclasses was still (even after r196979) sensitive to the order in which the modules are loaded.
We have to ensure that the files containing subclasses of the base_class_file are loaded after the base_class_file,
we can do that by matching against the base_class_file pattern when the list is created.

1:49 PM Changeset in webkit [209089] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Breakpoints button enabled state is too subtle
https://bugs.webkit.org/show_bug.cgi?id=165153

Reviewed by Joseph Pecoraro.

  • UserInterface/Images/Breakpoints.svg:

Change to path so stroke and fill can be styled.

  • UserInterface/Views/DebuggerSidebarPanel.css:

(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints):
(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints.activated):
Fill and stroke styles for the active and inactive breakpoint button.

1:36 PM Changeset in webkit [209088] by aestes@apple.com
  • 17 edits in trunk

[Cocoa] Enable two clang warnings recommended by Xcode
https://bugs.webkit.org/show_bug.cgi?id=164498

Reviewed by Mark Lam.

Source/bmalloc:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Source/JavaScriptCore:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Source/WebCore:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Source/WebKit/mac:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Source/WebKit2:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Source/WTF:

  • Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.

Tools:

  • DumpRenderTree/mac/Configurations/Base.xcconfig: Enabled CLANG_WARN_INFINITE_RECURSION and CLANG_WARN_SUSPICIOUS_MOVE.
  • MiniBrowser/Configurations/Base.xcconfig: Ditto.
  • TestWebKitAPI/Configurations/Base.xcconfig: Ditto.
  • WebKitTestRunner/Configurations/Base.xcconfig: Ditto.
1:12 PM Changeset in webkit [209087] by Wenson Hsieh
  • 19 edits in trunk/Source/WebCore

Address post-review feedback following r209070 (AppKit momentum scrolling adoption for scroll snapping)
https://bugs.webkit.org/show_bug.cgi?id=165147

Reviewed by Simon Fraser.

Addresses some additional review feedback after r209070, which adopts _NSScrollingMomentumCalculator for scroll
snapping. See individual changes below for more details. No new tests, since there is no behavior change.

  • page/EventHandler.cpp:

(WebCore::handleWheelEventInAppropriateEnclosingBox):
(WebCore::EventHandler::defaultWheelEventHandler):

  • page/Page.cpp:

(WebCore::Page::ensureTestTrigger):

  • page/WheelEventDeltaFilter.cpp:

(WebCore::WheelEventDeltaFilter::filteredVelocity):

  • page/WheelEventDeltaFilter.h:
  • page/mac/WheelEventDeltaFilterMac.mm:

(WebCore::WheelEventDeltaFilterMac::updateFromDelta):

  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):

  • page/scrolling/AsyncScrollingCoordinator.h:
  • page/scrolling/ScrollingCoordinator.h:

(WebCore::ScrollingCoordinator::updateExpectsWheelEventTestTriggerWithFrameView):

Rather than force a complete layout pass when the Page first acquires a WheelEventTestTrigger, we now simply
have the scrolling coordinator update its frame node to expect a wheel event test trigger.

  • page/scrolling/ScrollingMomentumCalculator.cpp:

(WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
(WebCore::ScrollingMomentumCalculator::create):
(WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
(WebCore::BasicScrollingMomentumCalculator::scrollOffsetAfterElapsedTime):
(WebCore::BasicScrollingMomentumCalculator::animationDuration):
(WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):
(WebCore::BasicScrollingMomentumCalculator::animationProgressAfterElapsedTime):

  • page/scrolling/ScrollingMomentumCalculator.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:

(WebCore::ScrollingMomentumCalculator::create):
(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::copyWithDeltasAndVelocity):
(WebCore::PlatformWheelEvent::scrollingVelocity):

Change scrolling velocity in PlatformWheelEvent to be a FloatSize instead of a FloatPoint. This change
propagates to the ScrollController, where state variables and arguments pertaining to scrolling velocity are
also now sizes instead of points.

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

(WebCore::ScrollController::scheduleStatelessScrollSnap):

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

(WebCore::ScrollSnapAnimatorState::transitionToGlideAnimationState):
(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::teardownAnimationForState):
(WebCore::ScrollSnapAnimatorState::currentAnimatedScrollOffset):

Refactor elapsed time to be Seconds instead of double. Additionally, use MonotonicTime::now() instead of
monotonicallyIncreasingTime(), and MonotonicTime instead of double for keeping track of the start time.

  • platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
1:08 PM Changeset in webkit [209086] by beidson@apple.com
  • 4 edits in trunk/Source/WebCore

IndexedDB 2.0: The client's transaction operation queue should flush as much to the server as possible.
https://bugs.webkit.org/show_bug.cgi?id=164932

Reviewed by Alex Christensen.

No new tests (No new test necessary, covered extensively by all existing tests).

Profiles showed that on tests with lots of rapid IDBRequests in a row, both the main thread and database
threads were largely idle.

The explanation was simple. Currently the client IDBTransaction queues up operations and only vends them out
to the server 1 at a time, waiting for the previous operation to complete.

While some operations do need to wait for the server to reply, by making the change to send most operations
(all operations with an associated IDBRequest) to the server without waiting we get rid of most of the idleness.

It is possible we can find a few other types of operations to send without waiting, but we haven't yet seen any
test case where they would show up on profiles.

Sending more than one operation at a time was actually a very small part of this change.
As many "edge case" regression tests revealed, we also needed to start having IDBTransaction track all of their
"in progress" operations such that they could be aborted on the client side in exceptional circumstances.

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::abortInProgressOperations): Abort's all in-progress operations (ones that have already

been sent to the server)

(WebCore::IDBTransaction::abortOnServerAndCancelRequests): Abort in-progress operations before pending ones.
(WebCore::IDBTransaction::operationTimerFired): If we just started an operation with an associated IDBRequest,

schedule the timer to send another one right away.

(WebCore::IDBTransaction::operationDidComplete):
(WebCore::IDBTransaction::connectionClosedFromServer): Abort in-progress operations before pending ones.

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/client/TransactionOperation.cpp:

(WebCore::IDBClient::TransactionOperation::TransactionOperation):

  • Modules/indexeddb/client/TransactionOperation.h:

(WebCore::IDBClient::TransactionOperation::completed):
(WebCore::IDBClient::TransactionOperation::hasIDBRequest):

1:04 PM Changeset in webkit [209085] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Fix ::cue parsing
https://bugs.webkit.org/show_bug.cgi?id=165152

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserValues.h:

(WebCore::CSSParserSelector::setPseudoElementType):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::isOnlyPseudoClassFunction):
(WebCore::isOnlyPseudoElementFunction):
(WebCore::CSSSelectorParser::consumePseudo):
(WebCore::isPseudoClassFunction): Deleted.
(WebCore::isPseudoElementFunction): Deleted.

11:46 AM Changeset in webkit [209084] by barraclough@apple.com
  • 2 edits in trunk/Source/WebCore

HTMLMediaElement::updateVolume should updateIsPlayingMedia
https://bugs.webkit.org/show_bug.cgi?id=165132

Reviewed by Darin Adler & Jer Noble.

HTMLMediaElement::mediaState takes the volume into account when determining whether media
is playing (audio is not considered to be playing if volume is 0). As such, any change to
the volume may require mediaState to be recomputed.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::updateVolume):

11:37 AM Changeset in webkit [209083] by keith_miller@apple.com
  • 10 edits
    3 adds in trunk

Add simple way to implement Wasm ops that require more than one B3 opcode
https://bugs.webkit.org/show_bug.cgi?id=165129

Reviewed by Geoffrey Garen.

JSTests:

  • wasm/function-tests/eqz.js: Added.
  • wasm/function-tests/max.js: Added.
  • wasm/function-tests/min.js: Added.
  • wasm/wasm.json:

Source/JavaScriptCore:

This patch adds a simple way to show the B3IRGenerator opcode script how
to generate code for Wasm opcodes that do not have a one to one mapping.
The syntax is pretty simple right now. There are only three things one
can use as of this patch (although more things might be added in the future)
1) Wasm opcode arguments: These are referred to as @<argument_number>. For example,

I32.sub would map to Sub(@0, @1).

2) 32-bit int constants: These are reffered to as i32(<value>). For example, i32.inc

would map to Add(@0, i32(1))

3) B3 opcodes: These are referred to as the B3 opcode name followed by the B3Value's constructor

arguments. A value may take the result of another value as an argument. For example, you can do
Div(Mul(@0, Add(@0, i32(1))), i32(2)) if there was a b3 opcode that computed the sum from 1 to n.

These scripts are used to implement Wasm's eqz and floating point max/min opcodes. This patch
also adds missing support for the Wasm Neg opcodes.

  • jsc.cpp:

(box):
(functionTestWasmModuleFunctions):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::toB3Op): Deleted.

  • wasm/WasmFunctionParser.h:

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

  • wasm/WasmModuleParser.cpp:

(JSC::Wasm::ModuleParser::parseType):

  • wasm/WasmParser.h:

(JSC::Wasm::Parser::parseUInt8):
(JSC::Wasm::Parser::parseValueType):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py:

(Source):
(Source.init):
(read):
(lex):
(CodeGenerator):
(CodeGenerator.init):
(CodeGenerator.advance):
(CodeGenerator.token):
(CodeGenerator.parseError):
(CodeGenerator.consume):
(CodeGenerator.generateParameters):
(CodeGenerator.generateOpcode):
(CodeGenerator.generate):
(temp):
(generateB3OpCode):
(generateI32ConstCode):
(generateB3Code):
(generateSimpleCode):

  • wasm/wasm.json:
11:20 AM Changeset in webkit [209082] by eric.carlson@apple.com
  • 23 edits
    2 adds in trunk

[MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
https://bugs.webkit.org/show_bug.cgi?id=164760
Source/WebKit2:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::FrameAuthorizationState::FrameAuthorizationState):
(WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::reset):
(WebKit::FrameAuthorizationState::securityOriginsAreEqual):
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

(WebKit::FrameAuthorizationState::~FrameAuthorizationState):
(WebKit::FrameAuthorizationState::frameID):

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::frameID):
(WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
(WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):

Tools:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

Allow scripts to determine the number of times the user has been prompted for capture device access.

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

(WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin):
(WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::setUserMediaPermissionForOrigin): Deleted.

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

(WTR::TestRunner::setUserMediaPersistentPermissionForOrigin):
(WTR::TestRunner::userMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::setUserMediaPermissionForOrigin): Deleted.

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

(WTR::TestController::resetStateToConsistentValues):
(WTR::OriginSettings::incrementRequestCount):
(WTR::OriginSettings::resetRequestCount):
(WTR::OriginSettings::requestCount):
(WTR::TestController::saltForOrigin):
(WTR::TestController::setUserMediaPersistentPermissionForOrigin):
(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin):
(WTR::TestController::settingsForOrigin):
(WTR::TestController::userMediaPermissionRequestCountForOrigin):
(WTR::TestController::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible):
(WTR::TestController::setUserMediaPermissionForOrigin): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Reviewed by Youenn Fablet.

  • fast/mediastream/MediaDevices-getUserMedia-expected.txt:
  • fast/mediastream/MediaDevices-getUserMedia.html:
11:15 AM Changeset in webkit [209081] by Ryan Haddad
  • 1 edit
    2 adds in trunk/LayoutTests

Rebaseline fast/forms/validation-message-appearance.html for mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=165149

Unreviewed test gardening.

  • platform/mac-wk1/fast/forms/validation-message-appearance-expected.txt: Added.
11:08 AM Changeset in webkit [209080] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ProxyConstructor.cpp and ProxyObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165053

Reviewed by Saam Barati.

Also replaced returning JSValue() with returning { }.

  • runtime/ProxyConstructor.cpp:

(JSC::constructProxyObject):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::structureForTarget):
(JSC::performProxyGet):
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
(JSC::ProxyObject::performHasProperty):
(JSC::ProxyObject::getOwnPropertySlotCommon):
(JSC::ProxyObject::performPut):
(JSC::ProxyObject::putByIndexCommon):
(JSC::performProxyCall):
(JSC::performProxyConstruct):
(JSC::ProxyObject::performDelete):
(JSC::ProxyObject::performPreventExtensions):
(JSC::ProxyObject::performIsExtensible):
(JSC::ProxyObject::performDefineOwnProperty):
(JSC::ProxyObject::performGetOwnPropertyNames):
(JSC::ProxyObject::performSetPrototype):
(JSC::ProxyObject::performGetPrototype):

11:02 AM Changeset in webkit [209079] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Avoid ref-count churn in ShadowParseContext::commitColor()
https://bugs.webkit.org/show_bug.cgi?id=165125

Reviewed by Simon Fraser.

Avoid ref-count churn in ShadowParseContext::commitColor() by moving the passed
color into its instance variable.

Also modified ShadowParseContext::commitColor() to take a Ref<> instead of a
RefPtr<> because it is never passed a nullptr.

  • css/parser/CSSParser.cpp:

(WebCore::ShadowParseContext::commitColor):

10:53 AM Changeset in webkit [209078] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Avoid ref-count churn in CSSParser::ValueWithCalculation::setCalculation()
https://bugs.webkit.org/show_bug.cgi?id=165127

Reviewed by Simon Fraser.

Use WTFMove() to move the passed RefPtr into CSSParser::ValueWithCalculation::m_calculation
instead of copying it.

  • css/parser/CSSParser.h:

(WebCore::CSSParser::ValueWithCalculation::setCalculation):

10:51 AM Changeset in webkit [209077] by dbates@webkit.org
  • 16 edits in trunk/Source/WebCore

CryptoAlgorithm::generateKey() should take lvalue reference to const CryptoAlgorithmParameters
https://bugs.webkit.org/show_bug.cgi?id=165111

Reviewed by Darin Adler.

CryptoAlgorithm::generateKey() and its overrides always expect to receive a non-null pointer
to a CryptoAlgorithmParameter object and never take ownership of it. This kind of relationship
is best expressed by modifying CryptoAlgorithm::generateKey() to take a lvalue reference to
a const CryptoAlgorithmParameter object.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::jsSubtleCryptoFunctionGenerateKeyPromise):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::generateKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::generateKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::generateKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::generateKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
10:40 AM Changeset in webkit [209076] by aestes@apple.com
  • 8 edits
    14 adds in trunk

window.name leaks information across domains
https://bugs.webkit.org/show_bug.cgi?id=158216
<rdar://problem/14548481>

Reviewed by Brent Fulgham.

Source/WebCore:

When updating the history after a cross-origin navigation, the HTML Standard says:

"If the browsing context is a top-level browsing context, but not an auxiliary browsing
context, then set the browsing context's name to the empty string."

https://html.spec.whatwg.org/multipage/browsers.html#resetBCName

Tests: http/tests/security/window-name-after-cross-origin-aux-frame-navigation.html

http/tests/security/window-name-after-cross-origin-main-frame-navigation.html
http/tests/security/window-name-after-cross-origin-sub-frame-navigation.html
http/tests/security/window-name-after-same-origin-aux-frame-navigation.html
http/tests/security/window-name-after-same-origin-main-frame-navigation.html
http/tests/security/window-name-after-same-origin-sub-frame-navigation.html

  • loader/FrameLoader.cpp:

(WebCore::shouldClearWindowName): Returns true if frame is a main frame with no opener and
newDocument does not have the same origin as the frame's current document.
(WebCore::FrameLoader::clear): Changed to set m_frame's name to nullAtom if
clearWindowProperties and shouldClearWindowName() are true.

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::canAccessStorage): Changed to call isSameOriginAs() and check
m_universalAccess.
(WebCore::SecurityOrigin::isSameOriginAs): Renamed from isThirdParty(); removed the check
for m_universalAccess.
(WebCore::SecurityOrigin::isThirdParty): Renamed to isSameOriginAs().

  • page/SecurityOrigin.h: Renamed isThirdParty() to isSameOriginAs() and made it public.

LayoutTests:

  • fast/events/pageshow-pagehide-on-back-uncached-expected.txt: Updated to account for the

main frame no longer having a name.

  • fast/events/pageshow-pagehide-on-back-uncached.html: Updated to use the History API

instead of relying on window.name being retained after a cross-origin navigation.

  • fast/events/script-tests/onunload-back-to-page-cache.js:

(onpageshow): Ditto.

  • http/tests/security/resources/log-window-name.html: Added.
  • http/tests/security/resources/window-name-test.html: Added.
  • http/tests/security/window-name-after-cross-origin-aux-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-cross-origin-aux-frame-navigation.html: Added.
  • http/tests/security/window-name-after-cross-origin-main-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-cross-origin-main-frame-navigation.html: Added.
  • http/tests/security/window-name-after-cross-origin-sub-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-cross-origin-sub-frame-navigation.html: Added.
  • http/tests/security/window-name-after-same-origin-aux-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-same-origin-aux-frame-navigation.html: Added.
  • http/tests/security/window-name-after-same-origin-main-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-same-origin-main-frame-navigation.html: Added.
  • http/tests/security/window-name-after-same-origin-sub-frame-navigation-expected.txt: Added.
  • http/tests/security/window-name-after-same-origin-sub-frame-navigation.html: Added.
9:36 AM Changeset in webkit [209075] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Fix parsing of "all" in transitions
https://bugs.webkit.org/show_bug.cgi?id=165144

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeTransitionProperty):

9:18 AM Changeset in webkit [209074] by Darin Adler
  • 2 edits in trunk/Source/WTF

REGRESSION (r209058): API test StringBuilderTest.Equal crashing
https://bugs.webkit.org/show_bug.cgi?id=165142

  • wtf/text/StringBuilder.h: Added an overload of the equal function just

for the case where the arguments are StringBuilder, String. This is needed
because of the peculiar behavior of is8Bit in String, different from any of
our other string classes. I think we should consider changing String::is8Bit
to return true for null strings. We could then remove this overload and
probably remove other checks for null and zero length elsewhere that are
also needed only to avoid calling is8Bit on a null String.

9:16 AM Changeset in webkit [209073] by Simon Fraser
  • 4 edits in trunk/Tools

intersection-observer-entry-interface.html test fails on the bots
https://bugs.webkit.org/show_bug.cgi?id=165133

Reviewed by Darin Adler.

Tests that enabled Intersection Observer via <!-- webkit-test-runner [ enableIntersectionObserver=true ] -->
would fail sometimes, because TestController::ensureViewSupportsOptionsForTest() failed to check
to see if this option required creating a new web view, so would just use the old view without
even resetting preferences.

In general, TestController doesn't distinguish properly between options that require the creation
of a new view (like mock scrollbars), and those that can be simply reset as resetPreferencesToConsistentValues()
does.

Do the easy fix of having viewSupportsOptions() check options.enableIntersectionObserver. We should probably
just call resetPreferencesToConsistentValues() even when re-use the same view.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(WTR::PlatformWebView::viewSupportsOptions):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::viewSupportsOptions):

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

[CSS Parser] Fix @page rule parsing
https://bugs.webkit.org/show_bug.cgi?id=165143

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserImpl.cpp:

(WebCore::CSSParserImpl::parsePageSelector):

8:58 AM Changeset in webkit [209071] by Wenson Hsieh
  • 3 edits in trunk/Source/WebCore

Unreviewed, fix the build after r209070

-[ScrollingMomentumCalculatorMac calculateToReachDestination] is only available on Sierra.

  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:

(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):

  • platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
8:10 AM Changeset in webkit [209070] by Wenson Hsieh
  • 27 edits
    1 copy
    6 adds in trunk

Scroll snapping on Mac should use AppKit animations
https://bugs.webkit.org/show_bug.cgi?id=147261
<rdar://problem/29395293>

Reviewed by Brent Fulgham.

Source/WebCore:

Refactors the scroll snapping animation logic to support arbitrary scrolling momentum calculators and
introduces ScrollingMomentumCalculatorMac, which wraps AppKit's _NSScrollingMomentumCalculator. On macOS El
Capitan and later, we use the platform scrolling momentum calculator and for all other cases, we fall back to
the preexissting platform-invariant momentum calculator.

Previously, the scroll snapping animation logic was shared between the ScrollSnapAnimatorState and
ScrollController -- namely, the ScrollController would update various parameters of the ScrollSnapAnimatorState
and then tell it to compute animation-specific constants and coefficients. After this patch, ScrollController
will no longer directly set the ScrollSnapAnimatorState's member variables. Instead, it will tell the animator
state to transition to a new ScrollSnapState with the necessary parameters, and the ScrollSnapAnimatorState is
responsible for modifying itself accordingly. Furthermore, logic pertaining to computing animated scroll offsets
is now split out into a new ScrollingMomentumCalculator, which may have different platform-dependent
implementations. The correct calculator is initialized via ScrollingMomentumCalculator::create, which currently
returns a ScrollingMomentumCalculatorMac on El Capitan and later, and a BasicScrollingMomentumCalculator
otherwise.

The new abstracted ScrollingMomentumCalculator is initialized with various parameters describing the scrolled
content and viewport, as well as the initial and target scrolling offsets. The momentum calculator is then able
to compute the animated scroll offset at any given elapsed time, as well as the total duration of the snapping
animation. The ScrollController's scroll snap timer uses this information (via the ScrollSnapAnimatorState) to
animate its client's scroll offset during a snap or glide.

Also reenables 8 failing and/or flaky scroll snapping tests and adds a new layout test. This patch addresses
two causes for failures and flakiness in these scroll snapping tests:

  1. When starting or stopping the scroll snap animation timer, we call deferTestsForReason and

removeTestDeferralForReason, respectively. These were actually noops for the first simulated scroll gesture
on each of the failing mainframe scrolling tests due to m_expectsWheelEventTestTrigger being false. This
member variable is updated when AsyncScrollingCoordinator::frameViewLayoutUpdated is invoked, wherein we
call ScrollingStateFrameScrollingNode::setExpectsWheelEventTestTrigger(true) when the test has started
monitoring wheel events. However, if this does not happen before scrolling begins in the test (which is the
case here), then the mainframe scrolling node will not expect a wheel event test trigger even though
eventSender.monitorWheelEvents() has been called. To fix this, we simply make the Page trigger a layout of
the main FrameView when first ensuring the wheel event test trigger on the Page.

  1. The second reason for flakiness affects both overflow and mainframe scrolling. Previously, due to the way

we would wait for multiple momentum scroll events before starting to glide, we would end up starting the
scroll snap timer for a snapping animation, stopping it, and then starting it again for the glide animation.
Thus, if the wheel event test trigger's timer fires right after the scroll snap timer stops and before it
starts again due to a glide animation, it will erroneously think that scroll snapping is complete, even
though it's only just about to begin! Now that we know scrolling velocity when we receive the initial
"momentum begin", we now directly transition the scroll snap state from a snapping state to a gliding state
and no longer stop and start the timer during this transition, which means that the test trigger will be
deferred for at least the entire duration of the scroll snapping animation (starting right after the first
"drag end" wheel event).

Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-vertical-then-horizontal.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/EventHandler.cpp:

(WebCore::handleWheelEventInAppropriateEnclosingBox):
(WebCore::EventHandler::defaultWheelEventHandler):

  • page/Page.cpp:

(WebCore::Page::ensureTestTrigger):

Addresses test failures by forcing the mainframe scrolling node to expect wheel event test triggers.

  • page/WheelEventDeltaFilter.cpp:

(WebCore::WheelEventDeltaFilter::create):
(WebCore::WheelEventDeltaFilter::filteredVelocity):

  • page/WheelEventDeltaFilter.h:
  • page/mac/WheelEventDeltaFilterMac.mm:

(WebCore::WheelEventDeltaFilterMac::updateFromDelta):

Add support for plumbing filtered scrolling velocity over to the ScrollController.

  • page/scrolling/ScrollingMomentumCalculator.cpp: Copied from Source/WebCore/platform/cocoa/ScrollSnapAnimatorState.mm.

(WebCore::ScrollingMomentumCalculator::ScrollingMomentumCalculator):
(WebCore::ScrollingMomentumCalculator::create):

Creates a platform-independent BasicScrollingMomentumCalculator.

(WebCore::BasicScrollingMomentumCalculator::BasicScrollingMomentumCalculator):
(WebCore::BasicScrollingMomentumCalculator::linearlyInterpolatedOffsetAtProgress):
(WebCore::BasicScrollingMomentumCalculator::cubicallyInterpolatedOffsetAtProgress):
(WebCore::BasicScrollingMomentumCalculator::scrollOffsetAfterElapsedTime):
(WebCore::BasicScrollingMomentumCalculator::animationDuration):
(WebCore::BasicScrollingMomentumCalculator::initializeInterpolationCoefficientsIfNecessary):
(WebCore::BasicScrollingMomentumCalculator::initializeSnapProgressCurve):
(WebCore::BasicScrollingMomentumCalculator::animationProgressAfterElapsedTime):

Interpolation logic ported over from ScrollSnapAnimatorState.

  • page/scrolling/ScrollingMomentumCalculator.h: Added.

(WebCore::ScrollingMomentumCalculator::~ScrollingMomentumCalculator):

  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h: Copied from Source/WebCore/page/WheelEventDeltaFilter.h.
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: Added.

(WebCore::ScrollingMomentumCalculator::create):

Creates a ScrollingMomentumCalculatorMac.

(WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
(WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
(WebCore::ScrollingMomentumCalculatorMac::animationDuration):
(WebCore::ScrollingMomentumCalculatorMac::ensurePlatformMomentumCalculator):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffset):
(WebCore::ScrollingTreeFrameScrollingNodeMac::viewportSize):
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Deleted.

  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::copyWithDeltasAndVelocity):
(WebCore::PlatformWheelEvent::scrollingVelocity):
(WebCore::PlatformWheelEvent::copyWithDeltas): Deleted.

  • platform/ScrollAnimator.cpp:

(WebCore::ScrollAnimator::scrollOffset):
(WebCore::ScrollAnimator::viewportSize):
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Deleted.

  • platform/ScrollAnimator.h:
  • platform/cocoa/ScrollController.h:
  • platform/cocoa/ScrollController.mm:

(WebCore::otherScrollEventAxis):
(WebCore::ScrollController::ScrollController):
(WebCore::ScrollController::shouldOverrideInertialScrolling):
(WebCore::ScrollController::scheduleStatelessScrollSnap):
(WebCore::ScrollController::statelessSnapTransitionTimerFired):
(WebCore::ScrollController::startDeferringTestsDueToScrollSnapping):
(WebCore::ScrollController::stopDeferringTestsDueToScrollSnapping):
(WebCore::ScrollController::processWheelEventForScrollSnap):
(WebCore::ScrollController::updateScrollSnapState):
(WebCore::ScrollController::updateScrollSnapPoints):

Update the ScrollController's ScrollSnapAnimationState for both vertical and horizontal axes. If both axes lack
any snap points, the pointer to the animation state will be nulled out; otherwise, the animation state will
exist.

(WebCore::ScrollController::startScrollSnapTimer):
(WebCore::ScrollController::stopScrollSnapTimer):
(WebCore::ScrollController::scrollSnapTimerFired):
(WebCore::ScrollController::activeScrollSnapIndexForAxis):
(WebCore::ScrollController::setActiveScrollSnapIndexForAxis):
(WebCore::ScrollController::setNearestScrollSnapIndexForAxisAndOffset):
(WebCore::ScrollController::setActiveScrollSnapIndicesForOffset):
(WebCore::ScrollController::scrollSnapPointState): Deleted.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Deleted.
(WebCore::ScrollController::shouldOverrideWheelEvent): Deleted.
(WebCore::projectedInertialScrollDistance): Deleted.
(WebCore::ScrollController::beginScrollSnapAnimation): Deleted.
(WebCore::ScrollController::endScrollSnapAnimation): Deleted.
(WebCore::ScrollController::initializeScrollSnapAnimationParameters): Deleted.
(WebCore::ScrollController::isSnappingOnAxis): Deleted.

  • platform/cocoa/ScrollSnapAnimatorState.h:

(WebCore::ScrollSnapAnimatorState::snapOffsetsForAxis):
(WebCore::ScrollSnapAnimatorState::setSnapOffsetsForAxis):
(WebCore::ScrollSnapAnimatorState::currentState):
(WebCore::ScrollSnapAnimatorState::activeSnapIndexForAxis):
(WebCore::ScrollSnapAnimatorState::setActiveSnapIndexForAxis):

  • platform/cocoa/ScrollSnapAnimatorState.mm:

(WebCore::projectedInertialScrollDistance):
(WebCore::ScrollSnapAnimatorState::transitionToSnapAnimationState):
(WebCore::ScrollSnapAnimatorState::transitionToGlideAnimationState):
(WebCore::ScrollSnapAnimatorState::transitionToUserInteractionState):
(WebCore::ScrollSnapAnimatorState::transitionToDestinationReachedState):

These methods are used to update the ScrollSnapAnimationState. These state transitions should (and do)
encapsulate all changes that need to be made to the animation state; in other words, the ScrollController should
no longer be reaching directly into the ScrollSnapAnimatorState to change member variables.

(WebCore::ScrollSnapAnimatorState::setupAnimationForState):
(WebCore::ScrollSnapAnimatorState::teardownAnimationForState):
(WebCore::ScrollSnapAnimatorState::currentAnimatedScrollOffset):
(WebCore::ScrollSnapAnimatorState::targetOffsetForStartOffset):
(WebCore::ScrollSnapAnimatorState::ScrollSnapAnimatorState): Deleted.
(WebCore::ScrollSnapAnimatorState::pushInitialWheelDelta): Deleted.
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Deleted.
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Deleted.
(WebCore::ScrollSnapAnimatorState::isSnapping): Deleted.
(WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Deleted.
(WebCore::ScrollSnapAnimatorState::wheelDeltaTrackingIsInProgress): Deleted.
(WebCore::ScrollSnapAnimatorState::hasFinishedTrackingWheelDeltas): Deleted.
(WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Deleted.
(WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Deleted.
(WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Deleted.
(WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Deleted.
(WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Deleted.
(WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Deleted.

The ScrollSnapAnimatorState now tracks state across both axes. This simplifies coordinating scroll snapping in
both horizontal and vertical axes and fixes the issue of the scroll offset not snapping when performing a scroll
in one direction without momentum, then scrolling with momentum in the other direction in a single gesture.

  • platform/spi/mac/NSScrollingMomentumCalculatorSPI.h: Added.

Source/WebKit2:

Add some logic to plumb filtered wheel velocity over to WebCore in the case of mainframe scrolling. See
WebCore/ChangeLog for more details.

  • WebProcess/WebPage/EventDispatcher.cpp:

(WebKit::EventDispatcher::wheelEvent):

Source/WTF:

Introduce HAVE(NSSCROLLING_FILTERS), which is on for macOS El Capitan and later.

  • wtf/Platform.h:

LayoutTests:

Fixes 8 previously failing scroll snapping tests in the tiled-drawing/scrolling/scroll-snap directory and
removes them from TestExpectations. Also adds a new layout test. See WebCore/ChangeLog for more details.

  • platform/mac-wk2/TestExpectations:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow-expected.txt:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders-expected.txt:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html:
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal-expected.txt: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical-then-horizontal.html: Added.
  • tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-vertical.html:
8:05 AM Changeset in webkit [209069] by beidson@apple.com
  • 11 edits in trunk

IndexedDB 2.0: Queue up completed requests in the client, handle them one by one.
https://bugs.webkit.org/show_bug.cgi?id=165000

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered extensively by every existing test).

Currently when a TransactionOperation completes on the server, it immediately completes
itself on the client side, including scheduling an event dispatch if necessary.

This patch changes it so that "server completed operations" instead queue up in the
IDBTransaction and are "client-side completed" asynchronously, 1-by-1.

Currently this is a "no behavior change" because only one operation is ever sent to
the server at a time.

But that will change with https://webkit.org/b/164932
And this patch is a pre-requisite for that.

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::dispatchEvent):
(WebCore::IDBRequest::didOpenOrIterateCursor):
(WebCore::IDBRequest::completeRequestAndDispatchEvent):
(WebCore::IDBRequest::requestCompleted): Deleted.

  • Modules/indexeddb/IDBRequest.h:
  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::IDBTransaction):
(WebCore::IDBTransaction::internalAbort):
(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::scheduleOperation):
(WebCore::IDBTransaction::schedulePendingOperationTimer):
(WebCore::IDBTransaction::pendingOperationTimerFired):
(WebCore::IDBTransaction::operationCompletedOnServer):
(WebCore::IDBTransaction::scheduleCompletedOperationTimer):
(WebCore::IDBTransaction::completedOperationTimerFired):
(WebCore::IDBTransaction::completeNoncursorRequest):
(WebCore::IDBTransaction::completeCursorRequest):
(WebCore::IDBTransaction::finishedDispatchEventForRequest):
(WebCore::IDBTransaction::didStart):
(WebCore::IDBTransaction::didOpenCursorOnServer):
(WebCore::IDBTransaction::didIterateCursorOnServer):
(WebCore::IDBTransaction::didGetAllRecordsOnServer):
(WebCore::IDBTransaction::didGetRecordOnServer):
(WebCore::IDBTransaction::didGetCountOnServer):
(WebCore::IDBTransaction::didDeleteRecordOnServer):
(WebCore::IDBTransaction::didClearObjectStoreOnServer):
(WebCore::IDBTransaction::putOrAddOnServer):
(WebCore::IDBTransaction::didPutOrAddOnServer):
(WebCore::IDBTransaction::operationCompletedOnClient):
(WebCore::IDBTransaction::deactivate):
(WebCore::IDBTransaction::connectionClosedFromServer):
(WebCore::IDBTransaction::scheduleOperationTimer): Deleted.
(WebCore::IDBTransaction::operationTimerFired): Deleted.
(WebCore::IDBTransaction::operationDidComplete): Deleted.

  • Modules/indexeddb/IDBTransaction.h:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::completeOperation):

  • Modules/indexeddb/client/TransactionOperation.cpp:

(WebCore::IDBClient::TransactionOperation::TransactionOperation):

  • Modules/indexeddb/client/TransactionOperation.h:

(WebCore::IDBClient::TransactionOperation::transitionToCompleteOnThisThread):
(WebCore::IDBClient::TransactionOperation::transitionToComplete):
(WebCore::IDBClient::TransactionOperation::doComplete):
(WebCore::IDBClient::TransactionOperation::idbRequest):
(WebCore::IDBClient::TransactionOperation::performCompleteOnOriginThread): Deleted.
(WebCore::IDBClient::TransactionOperation::completed): Deleted.

LayoutTests:

  • storage/indexeddb/modern/resources/transaction-scheduler-6.js: This test had a bug which was masked by previously synchronous behavior. Fix that bug!
8:04 AM Changeset in webkit [209068] by Alan Bujtas
  • 3 edits
    4 adds in trunk

Safari (WebKit) doesn't wrap element within flex when width comes below min-width
https://bugs.webkit.org/show_bug.cgi?id=136041
<rdar://problem/25569370>

Reviewed by Darin Adler.

Source/WebCore:

While figuring out whether a particular flex item fits the current line, we need to take
the min-width into account too. This matches both FF and Chrome behaviour.

Tests: fast/flexbox/flex-wrap-when-min-widht-is-set-1.html

fast/flexbox/flex-wrap-when-min-widht-is-set-2.html

  • rendering/RenderFlexibleBox.cpp:

(WebCore::RenderFlexibleBox::computeNextFlexLine):

LayoutTests:

  • fast/flexbox/flex-wrap-when-min-widht-is-set-1-expected.html: Added.
  • fast/flexbox/flex-wrap-when-min-widht-is-set-1.html: Added.
  • fast/flexbox/flex-wrap-when-min-widht-is-set-2-expected.html: Added.
  • fast/flexbox/flex-wrap-when-min-widht-is-set-2.html: Added.
6:02 AM Changeset in webkit [209067] by BJ Burg
  • 7 edits in trunk/Source/WebKit2

Web Automation: add ObjC SPI to set whether a page is controlled by automation
https://bugs.webkit.org/show_bug.cgi?id=165001
<rdar://problem/29350432>

Reviewed by Dan Bernstein.

Add SPI property to WKWebViewConfiguration and plumb it through to
initialize WebPageProxy::m_controlledByAutomation. This is propagated
to the WebProcess on creation via WebPageCreationParameters.

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy):

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::isControlledByAutomation):
(API::PageConfiguration::setControlledByAutomation):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _isControlledByAutomation]):
(-[WKWebViewConfiguration _setControlledByAutomation:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):

4:57 AM Changeset in webkit [209066] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Try to fix win/gtk build.

  • style/StyleUpdate.h:

(WebCore::Style::ElementUpdate::ElementUpdate):

Add explicit constructor for compilers that don't support C++14 list initialization correctly.

2:59 AM Changeset in webkit [209065] by Antti Koivisto
  • 6 edits
    2 adds in trunk

Slotted nodes ignore transition
https://bugs.webkit.org/show_bug.cgi?id=160866
<rdar://problem/29231901>

Reviewed by Sam Weinig.

Source/WebCore:

The problem is that slot (display:contents) always triggers full render tree rebuild when something
changes in the slotted subtree. This causes animation to jump to end (may be another bug).

Test: fast/shadow-dom/shadow-host-transition.html

  • style/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::RenderTreeUpdater::updateBeforeOrAfterPseudoElement):

  • style/StyleChange.h:

Rearrange so the strongest ('Detach') is the highest.

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):

If style was display:contents and stays that way, use 'Inherit' StyleChange which doesn't force render tree rebuild.
Refactor more of the functionality to createAnimatedElementUpdate.

  • style/StyleTreeResolver.h:

LayoutTests:

  • fast/shadow-dom/shadow-host-transition-expected.html: Added.
  • fast/shadow-dom/shadow-host-transition.html: Added.
Note: See TracTimeline for information about the timeline view.