⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Sep 8, 2018:

10:02 PM Changeset in webkit [235836] by Simon Fraser
  • 2 edits in trunk/Tools

accessibility/notification-listeners.html abandons a document
https://bugs.webkit.org/show_bug.cgi?id=188724

Reviewed by Darin Adler.

AccessibilityControllerMac leaked m_globalNotificationHandler, which leaks a JSValueProtect'd function,
which leaks a Document. Fix by using adoptNS().

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:

(WTR::AccessibilityController::addNotificationListener):

9:24 PM Changeset in webkit [235835] by Wenson Hsieh
  • 18 edits in trunk/Tools

[Cocoa] Use more bridging casts in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=189457

Reviewed by Darin Adler.

Adds some bridging casts to TestWebKitAPI, when converting betweeen several common types of objects, including:
CFStringRef <=> NSString
CFURLRef <=> NSURL
WKPreferences <=> WKPreferencesRef
CFDataRef <=> NSData

  • TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:

(readHTMLFromPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):

  • TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:

(createWebViewWithCustomPasteboardDataEnabled):

  • TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:

(writeHTMLToPasteboard):
(createWebViewWithCustomPasteboardDataSetting):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:

(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:

(TestWebKitAPI::setUpWebView):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:

(writeRTFToPasteboard):
(writeRTFDToPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):
(TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:

(createWebViewWithCustomPasteboardDataEnabled):

  • TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(webViewForTestingAttachments):

  • TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:

(writeRTFDToPasteboard):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/ActionSheetTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:

(checkRichTextTypePrecedesPlainTextType):
(TestWebKitAPI::TEST):
(TestWebKitAPI::setUpTestWebViewForDataTransferItems):

  • TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/mac/PlatformUtilitiesMac.mm:

(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::MIMETypeForWKURLResponse):

  • TestWebKitAPI/mac/WebKitAgnosticTest.mm:

(TestWebKitAPI::WebKitAgnosticTest::loadURL):

9:16 PM Abandoned documents edited by Simon Fraser
(diff)
8:25 PM Changeset in webkit [235834] by Wenson Hsieh
  • 3 edits
    2 adds in trunk

REGRESSION (r235153): [iOS] Can't move selection start grabber when selecting text in a subframe
https://bugs.webkit.org/show_bug.cgi?id=189454
<rdar://problem/44265956>

Reviewed by Darin Adler.

Source/WebKit:

rangeForPointInRootViewCoordinates is responsible for taking a user gesture location representing the location
of the selection start or end handle (given in root view coordinates) and computing a Range representing an
updated selection. r235153 introduced a mechanism here to clamp the y offset of this user gesture location to
a max or min value determined by computing the bounds of the other selection handle, which more closely matches
platform behavior elsewhere in iOS.

However, this clamping logic would cause the user gesture location in root view coordinates to incorrectly clamp
in cases where the user selects text within an iframe that is offset from the top of the main document, since it
compares content coordinates (i.e. the caret bounds) against root view coordinates (i.e. the gesture location).
This makes it impossible to use selection handles to select text in some iframes.

We fix this by first converting the gesture location to document coordinates, and then clamping.

Test: editing/selection/ios/selection-handle-clamping-in-iframe.html

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeForPointInRootViewCoordinates):

Also reuse selectionStart and selectionEnd when computing absolute caret bounds, instead of creating new
VisiblePositions.

LayoutTests:

Adds a test that selects a word inside an iframe, moves the selection start handle down past the selection end,
and then moves the selection end handle up above the selection start. The test verifies that the entire word
remains selected.

  • editing/selection/ios/selection-handle-clamping-in-iframe-expected.txt: Added.
  • editing/selection/ios/selection-handle-clamping-in-iframe.html: Added.
7:03 PM Changeset in webkit [235833] by aestes@apple.com
  • 15 edits
    2 copies
    1 move
    2 adds
    1 delete in trunk

[Apple Pay] Dispatch a paymentmethodchange event when the payment method changes
https://bugs.webkit.org/show_bug.cgi?id=189386

Reviewed by Darin Adler.

Source/WebCore:

Implemented the "payment method changed" algorithm as defined in the Payment Request API W3C
Editor's Draft of 05 September 2018.

Payment Request says that the user agent MAY run this algorithm when the payment method
changes. In our case, we only wish to dispatch this event when a listener is registered for
it. Since PassKit requires merchants to respond to this event by calling updateWith() within
30 seconds, firing the event unconditionally would break compatibility with existing
clients.

For merchants that do not listen for this event, they can continue to use modifiers to
update details based on the selected payment method type.

Also made PaymentMethodChangeEvent.methodDetails a cached attribute in a way that avoids
potential reference cycles from holding a JSC::Strong in the wrapped object.

Test: http/tests/ssl/applepay/ApplePayPaymentMethodChangeEvent.https.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:

(WebCore::toJSDictionary):
(WebCore::ApplePayPaymentHandler::didAuthorizePayment):
(WebCore::ApplePayPaymentHandler::didSelectPaymentMethod):

  • Modules/paymentrequest/PaymentMethodChangeEvent.cpp:

(WebCore::PaymentMethodChangeEvent::PaymentMethodChangeEvent):

  • Modules/paymentrequest/PaymentMethodChangeEvent.h:
  • Modules/paymentrequest/PaymentMethodChangeEvent.idl:
  • Modules/paymentrequest/PaymentMethodChangeEventInit.idl: Removed.
  • Modules/paymentrequest/PaymentRequest.cpp:

(WebCore::PaymentRequest::paymentMethodChanged):

  • Modules/paymentrequest/PaymentRequest.h:
  • Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:

(WebCore::PaymentRequestUpdateEvent::updateWith):

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSPaymentMethodChangeEventCustom.cpp: Added.

(WebCore::JSPaymentMethodChangeEvent::methodDetails const):
(WebCore::JSPaymentMethodChangeEvent::visitAdditionalChildren):

LayoutTests:

  • fast/dom/reference-cycle-leaks-expected.txt:
  • fast/dom/reference-cycle-leaks.html:
  • http/tests/ssl/applepay/ApplePayPaymentMethodChangeEvent.https-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePayPaymentMethodChangeEvent.https.html: Added.
  • platform/ios-wk2/fast/dom/reference-cycle-leaks-expected.txt: Added.
  • platform/mac-wk2/fast/dom/reference-cycle-leaks-expected.txt: Added.
2:29 PM Changeset in webkit [235832] by Darin Adler
  • 22 edits in trunk/Tools

[Cocoa] Turn on ARC for WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=189228

Reviewed by Sam Weinig.

  • TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:

(+[EventSerializer dictionaryForEvent:relativeToTime:]): Removed autorelease.

  • TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:

(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Removed autorelease.

  • WebKitTestRunner/Configurations/Base.xcconfig: Added CLANG_ENABLE_OBJC_ARC.
  • WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:

(WTR::AccessibilityController::accessibleElementById): Use a bridge cast.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm:

(WTR::AccessibilityTextMarker::isEqual): Ditto.

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
(WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use a bridge cast.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto.
(WTR::AccessibilityUIElement::previousTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextTextMarker): Ditto.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Ditto.
(WTR::_CGPathEnumerationIteration): Ditto.
(WTR::AccessibilityUIElement::pathDescription const): Ditto.

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:

(-[AccessibilityNotificationHandler dealloc]): Removed [super dealloc].

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
(WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
(WTR::createJSStringRef): Removed autorelease.

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration): Removed release.
(WTR::TestController::cocoaPlatformInitialize): Removed release.
(WTR::TestController::platformCreateOtherPage): Removed autorelease.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView dealloc]): Removed [super dealloc] and also many
cases of setting properties to nil that were only present for memory
management reasons.

  • WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm:

(-[GeneratedTouchesDebugWindow dealloc]): Removed release and [super dealloc].

  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator dealloc]): Deleted.
(-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Removed
Block_copy.
(-[HIDEventGenerator markerEventReceived:]): Removed Block_release.
(-[HIDEventGenerator interpolatedEvents:]): Removed release.
(-[HIDEventGenerator sendEventStream:completionBlock:]): Removed autorelease.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].
(WTR::PlatformWebView::PlatformWebView): Removed release.
(WTR::PlatformWebView::~PlatformWebView): Removed release.
(WTR::PlatformWebView::addChromeInputField): Removed release.
(WTR::PlatformWebView::removeChromeInputField): Removed release.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::initializeInjectedBundlePath): Use bridge cast.
(WTR::TestController::initializeTestPluginDirectory): Ditto.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::accessibilitySpeakSelectionContent const):
Use bridge cast.
(WTR::UIScriptController::enterText): Ditto.
(WTR::UIScriptController::selectFormPopoverTitle const): Ditto.
(WTR::UIScriptController::textContentType const): Ditto.
(WTR::UIScriptController::formInputLabel const): Ditto.
(WTR::UIScriptController::scrollingTreeAsText const): Ditto.

  • WebKitTestRunner/mac/PlatformWebViewMac.mm:

(WTR::PlatformWebView::~PlatformWebView): Removed release.
(WTR::PlatformWebView::addChromeInputField): Removed release.

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::allowedFontFamilySet): Removed retain.
(WTR::systemHiddenFontFamilySet): Removed retain.

  • WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:

(-[WebKitTestRunnerDraggingInfo draggingDestinationWindow]): Removed retain.
(-[WebKitTestRunnerDraggingInfo dealloc]): Deleted.

  • WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:

(+[WebKitTestRunnerPasteboard _pasteboardWithName:]): Removed release.
(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]): Removed release.
Method name is still OK because setting localPasteboards to nil will
still release them.
(+[NSPasteboard superAlloc]): Added. Helper so that LocalPasteboard can
bypass +[NSPasteboard alloc].
(+[NSPasteboard superAllocWithZone:]): Ditto.
(+[LocalPasteboard alloc]): Call superAlloc instead of class_createInstance.
This is a different way to achieve the "bypass NSPasteboard" behavior we need.
(+[LocalPasteboard allocWithZone:]): Added. Calls superAllocWithZone: for the
same reason as above. Needed because, at least at this time, +[NSObject alloc]
calls +allocWithZone: so we have to override both.
(-[LocalPasteboard dealloc]): Deleted.
(-[LocalPasteboard addTypes:owner:]): Removed release.

  • WebKitTestRunner/mac/WebKitTestRunnerWindow.mm:

(-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].

  • WebKitTestRunner/mac/main.mm:

(disableAppNapInUIProcess): Removed retain.

1:51 PM Changeset in webkit [235831] by yusukesuzuki@slowstart.org
  • 8 edits in trunk

[JSC] Remove loadModule function in jsc.cpp
https://bugs.webkit.org/show_bug.cgi?id=184808

Patch by Yusuke Suzuki <Yusuke Suzuki> on 2018-09-08
Reviewed by Darin Adler.

JSTests:

Use import expression instead.

  • modules/different-view.js:

(from.string_appeared_here.shouldThrow): Deleted.

  • modules/fallback-ambiguous.js:

(from.string_appeared_here.shouldThrow): Deleted.

  • modules/import-error.js:

(from.string_appeared_here.shouldThrow): Deleted.
(shouldThrow): Deleted.

  • modules/indirect-export-error.js:

(from.string_appeared_here.shouldThrow): Deleted.
(shouldThrow): Deleted.

  • modules/namespace-error.js:

(from.string_appeared_here.shouldThrow): Deleted.

Source/JavaScriptCore:

Since we have import, we do not need to have loadModule function for testing purpose.

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionLoadModule): Deleted.

1:19 PM Changeset in webkit [235830] by Simon Fraser
  • 5 edits in trunk/Source/WebCore

Clean up code related to Document node removal
https://bugs.webkit.org/show_bug.cgi?id=189452

Reviewed by Wenson Hsieh.

Replace the "amongChildrenOnly" boolean argument with an enum for clarity.

Rename the remove*OfSubtree functions, because that naming is very unclear.
Instead, use adjust*OnNodeRemoval which better describes what the code does.

  • dom/Document.cpp:

(WebCore::isNodeInSubtree):
(WebCore::Document::adjustFocusedNodeOnNodeRemoval):
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
(WebCore::Document::adjustFocusNavigationNodeOnNodeRemoval):
(WebCore::Document::adjustFullScreenElementOnNodeRemoval):
(WebCore::Document::removeFocusedNodeOfSubtree): Deleted.
(WebCore::Document::removeFocusNavigationNodeOfSubtree): Deleted.
(WebCore::Document::removeFullScreenElementOfSubtree): Deleted.

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

(WebCore::Element::removeShadowRoot):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::clear):

12:25 PM Changeset in webkit [235829] by yusukesuzuki@slowstart.org
  • 2 edits in trunk/Source/WebCore

[CSSJIT] Use lshiftPtr instead of mul32
https://bugs.webkit.org/show_bug.cgi?id=189451

Reviewed by Sam Weinig.

Use value << 4 instead of value * 16. In 64bit environment, sizeof(Style::Relation) is 16,
so that we can use value << 4 in CSS JIT.

No behavior change.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateAddStyleRelation):

10:59 AM Changeset in webkit [235828] by timothy_horton@apple.com
  • 38 edits in trunk/Source/WebKit

Unify most of the WebKit Objective-C API sources
https://bugs.webkit.org/show_bug.cgi?id=189447

Reviewed by Andy Estes.

Unify and fix errors.

  • Shared/API/Cocoa/_WKFrameHandle.mm:
  • Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
  • SourcesCocoa.txt:
  • UIProcess/API/Cocoa/APIContentRuleListStoreCocoa.mm:
  • UIProcess/API/Cocoa/WKBackForwardList.mm:
  • UIProcess/API/Cocoa/WKBackForwardListItem.mm:
  • UIProcess/API/Cocoa/WKBrowsingContextController.mm:
  • UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
  • UIProcess/API/Cocoa/WKConnection.mm:
  • UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
  • UIProcess/API/Cocoa/WKNavigationData.mm:
  • UIProcess/API/Cocoa/WKProcessGroup.mm:
  • UIProcess/API/Cocoa/WKURLSchemeTask.mm:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/API/Cocoa/_WKAttachment.mm:
  • UIProcess/API/Cocoa/_WKGeolocationPosition.mm:
  • UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm:
  • UIProcess/API/Cocoa/_WKThumbnailView.mm:
  • UIProcess/API/mac/WKView.mm:
  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

Sep 7, 2018:

11:29 PM Changeset in webkit [235827] by mark.lam@apple.com
  • 14 edits
    2 adds in trunk

Ensure that handleIntrinsicCall() is only applied on op_call shaped instructions.
https://bugs.webkit.org/show_bug.cgi?id=189317
<rdar://problem/44152198>

Reviewed by Filip Pizlo.

JSTests:

  • stress/regress-189317.js: Added.

(testGetter):
(testSetter):

Source/JavaScriptCore:

handleIntrinsicCall() is normally used for checking if an op_call is a call to
an intrinsic function, and inlining it if it's a match.

However, getter and setter functions also does calls, and uses handleCall()
to implement the call. handleCall() eventually calls handleIntrinsicCall() to
check for intrinsics. This results in a bug because handleIntrinsicCall()
sometimes relies on the ArrayProfile* of the instruction, and is always assuming
that the instruction is op_call shaped. This turns out to be not true: getters
and setters can get there with op_get_by_val and op_put_by_val instead.

Since the intrinsic functions handled by handleIntrinsicCall() are never
intended to be used as getter / setter functions anyway, we can prevent this
whole class of bugs by having handleIntrinsicCall() fail early if the
instruction is not op_call shaped.

To implement this fix, we did the following:

  1. Introduced the OpcodeShape enum.
  2. Introduced isOpcodeShape<OpcodeShape>() for testing if a instruction of the shape of the specified OpcodeShape.
  3. Introduced arrayProfileFor<OpcodeShape>() for fetching the ArrayProfile* from the instruction given the OpcodeShape.

Using this arrayProfileFor template has the following benefits:

  1. Centralizes the definition of which instructions has an ArrayProfile* operand.
  2. Centralizes the definition of which operand is the ArrayProfile*.
  3. Asserts that the instruction is of the expected shape when retrieving the ArrayProfile*.
  1. Added ArrayProfile::m_typeName and ArrayProfile::s_typeName which are used in ArrayProfile::isValid() as a sanity check that a retrieved ArrayProfile* indeed does point to an ArrayProfile.
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/ArrayProfile.cpp:
  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::isValid const):

  • bytecode/OpcodeInlines.h: Added.

(JSC::isOpcodeShape):
(JSC::arrayProfileFor):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
(JSC::DFG::ByteCodeParser::parseBlock):

  • jit/JITCall.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_has_indexed_property):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::emit_op_has_indexed_property):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emitArrayStoragePutByVal):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::getByVal):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

7:17 PM Changeset in webkit [235826] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Try to fix the build

  • Shared/mac/SandboxExtensionMac.mm:
5:41 PM Changeset in webkit [235825] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win][Clang] exceptionShouldTerminateProgram of StructuredExceptionHandlerSuppressor.cpp should take DWORD
https://bugs.webkit.org/show_bug.cgi?id=189402

Reviewed by Alex Christensen.

Clang reports compilation errors like following:

StructuredExceptionHandlerSuppressor.cpp(38,10): error: case value evaluates to 2147483650, which cannot be narrowed to type 'int' [-Wc++11-narrowing]

case EXCEPTION_DATATYPE_MISALIGNMENT:


No new tests (no behavioral change).

  • platform/win/StructuredExceptionHandlerSuppressor.cpp:

(exceptionShouldTerminateProgram): Changed the type of argument from int to DWORD.

5:37 PM Changeset in webkit [235824] by Fujii Hironori
  • 3 edits in trunk/Tools

[WinCairo][MiniBrowser][WebKit] REGRESSION(r235398): ASSERTION FAILED: !m_client.didReceiveTitleForFrame
https://bugs.webkit.org/show_bug.cgi?id=189336

Reviewed by Alex Christensen.

WKPageSetPageLoaderClient is deprecated. Replaced it with
WKPageSetPageNavigationClient.

  • MiniBrowser/win/WebKitBrowserWindow.cpp:

(WebKitBrowserWindow::WebKitBrowserWindow):
Call WKPageSetPageNavigationClient instead of WKPageSetPageLoaderClient.
(WebKitBrowserWindow::didFinishNavigation):
Copied from didReceiveTitleForFrame. Use WKPageCopyTitle to get the title.
(WebKitBrowserWindow::didCommitNavigation):
Copied from didCommitLoadForFrame. Use WKPageCopyCommittedURL to get the URL.
(WebKitBrowserWindow::didReceiveTitleForFrame): Deleted.
(WebKitBrowserWindow::didCommitLoadForFrame): Deleted.

  • MiniBrowser/win/WebKitBrowserWindow.h: Renamed the class methods.
5:36 PM Changeset in webkit [235823] by timothy_horton@apple.com
  • 14 edits in trunk/Source/WebKit

Unify most of the WebKit C API sources
https://bugs.webkit.org/show_bug.cgi?id=189400

Reviewed by Alex Christensen.

Unify and fix errors (mostly API:String vs. WTF::String mismatches).

  • Shared/APIWebArchiveResource.h:
  • Sources.txt:
  • SourcesCocoa.txt:
  • UIProcess/API/APIContentRuleListStore.cpp:

(API::constructedPathPrefix):
(API::constructedPathFilter):
(API::constructedPath):
(API::encodeContentRuleListMetaData):
(API::decodeContentRuleListMetaData):
(API::openAndMapContentRuleList):
(API::writeDataToFile):
(API::compiledToFile):
(API::createExtension):
(API::ContentRuleListStore::lookupContentRuleList):
(API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
(API::ContentRuleListStore::compileContentRuleList):
(API::ContentRuleListStore::getContentRuleListSource):

  • UIProcess/API/APINavigation.cpp:

(API::Navigation::loggingString const):

  • UIProcess/API/APIWebsiteDataStore.cpp:

(API::WebsiteDataStore::defaultMediaCacheDirectory):
(API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory):

  • UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:

(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultCacheStorageDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultMediaCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
(API::WebsiteDataStore::defaultJavaScriptConfigurationDirectory):
(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):
(API::WebsiteDataStore::tempDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):

  • UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:

(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultNetworkCacheDirectory):
(API::WebsiteDataStore::defaultCacheStorageDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
(API::WebsiteDataStore::cacheDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation):
(API::WebsiteDataStore::legacyDefaultApplicationCacheDirectory):
(API::WebsiteDataStore::legacyDefaultNetworkCacheDirectory):
(API::WebsiteDataStore::legacyDefaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::legacyDefaultLocalStorageDirectory):
(API::WebsiteDataStore::legacyDefaultMediaCacheDirectory):
(API::WebsiteDataStore::legacyDefaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::legacyDefaultJavaScriptConfigurationDirectory):

  • WebKit.xcodeproj/project.pbxproj:
5:36 PM Changeset in webkit [235822] by Basuke Suzuki
  • 1 edit
    5 adds in trunk/LayoutTests

[LayoutTests] Add digest access authentication test.
https://bugs.webkit.org/show_bug.cgi?id=189286

Reviewed by Alex Christensen.

Add digest auth tests

  • http/tests/resources/digest-auth/authorize.php: Added.
  • http/tests/resources/digest-auth/digest.php: Added.
  • http/tests/xmlhttprequest/digest-auth-expected.txt: Added.
  • http/tests/xmlhttprequest/digest-auth.html: Added.
5:32 PM Changeset in webkit [235821] by Basuke Suzuki
  • 5 edits
    3 adds in trunk

[Curl] Stop sending request with credential if no authorization requested.
https://bugs.webkit.org/show_bug.cgi?id=189057

Reviewed by Alex Christensen.

Source/WebCore:

When 401 response returns without 'www-authenticate' header, suppress another request with credential.

Test: http/tests/xmlhttprequest/unauthorized-without-authenticate-header.html

  • platform/network/curl/CurlResourceHandleDelegate.cpp:

(WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):

Source/WebKit:

When 401 response returns without 'www-authenticate' header, suppress another request with credential.
Same fix for proxy authentication.

  • NetworkProcess/curl/NetworkDataTaskCurl.cpp:

(WebKit::NetworkDataTaskCurl::curlDidReceiveResponse):

LayoutTests:

  • http/tests/xmlhttprequest/resources/no-authenticate-header-401.php: Added.
  • http/tests/xmlhttprequest/unauthorized-without-authenticate-header-expected.txt: Added.
  • http/tests/xmlhttprequest/unauthorized-without-authenticate-header.html: Added.
4:47 PM Changeset in webkit [235820] by Fujii Hironori
  • 2 edits in trunk/Source/WebCore

[Win][Clang] duplicated variable name advance in UniscribeController::shapeAndPlaceItem
https://bugs.webkit.org/show_bug.cgi?id=189399

Reviewed by Myles C. Maxfield.

Clang reports the following compilation error:

UniscribeController.cpp(372,56): error: invalid operands to binary expression ('float' and 'WebCore::GlyphBufferAdvance' (aka 'WebCore::FloatSize'))

GlyphBufferAdvance advance(-origin.width() + advance, -origin.height());

~ ~

No new tests (No behavior change).

  • platform/graphics/win/UniscribeController.cpp:

(WebCore::UniscribeController::shapeAndPlaceItem): Replaced the second variable named advance with glyphAdvance.

4:13 PM Changeset in webkit [235819] by youenn@apple.com
  • 5 edits
    1 copy
    2 adds in trunk/LayoutTests

Tests checking document GC in case of ActiveDOMObjects are flaky
https://bugs.webkit.org/show_bug.cgi?id=189413

Reviewed by Eric Carlson.

Instead of calling parent.done() use postMessage.
The assumption is that GC might not always collect 'parent' as it is in the call stack.
With postMessage, no flakiness is observed locally.
Added a related MediaDevices test that was missing from r235438.

  • http/tests/IndexedDB/collect-IDB-objects.https.html:
  • http/tests/IndexedDB/resources/myidbframe.htm:
  • http/tests/media/clearkey/collect-webkit-media-session.html:
  • http/tests/media/clearkey/resources/mywebkitmediasessionframe.htm:
  • http/tests/media/media-stream/collect-media-devices.https-expected.txt: Added.
  • http/tests/media/media-stream/collect-media-devices.https.html: Added.
  • http/tests/media/media-stream/resources/mymediadevicesframe.htm: Added.
4:08 PM Changeset in webkit [235818] by dbates@webkit.org
  • 3 edits
    2 adds in trunk

[iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
https://bugs.webkit.org/show_bug.cgi?id=189325

Reviewed by Wenson Hsieh.

Tools:

Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed
by a key press (i.e. type '~') when instructed to simulate typing a grave accent (). Typing a
grave accent does not require holding the shift key.

  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(shouldWrapWithShiftKeyEventForCharacter):

LayoutTests:

Add a test to ensure that we dispatch the correct DOM key events when using uiController.typeCharacterUsingHardwareKeyboard("`")
(by way of UIHelper.typeCharacter()).

  • fast/events/ios/keypress-grave-accent-expected.txt: Added.
  • fast/events/ios/keypress-grave-accent.html: Added.
4:07 PM Changeset in webkit [235817] by youenn@apple.com
  • 10 edits
    1 delete in trunk/Source/WebCore

RTCRtpReceiver::track should return a MediaStreamTrack reference
https://bugs.webkit.org/show_bug.cgi?id=189420

Reviewed by Eric Carlson.

As per spec, a receiver always has a track.
Remove unneeded RTCRtpSenderReceiverBase and make RTCRtpReceiver have a Ref<MediaStreamTrack>.
RTCRtpSender keeps having a RefPtr<MediaStreamTrack>.
Update call sites accordingly.
No change of behavior.

  • Modules/mediastream/RTCRtpReceiver.cpp:

(WebCore::RTCRtpReceiver::RTCRtpReceiver):
(WebCore::RTCRtpReceiver::stop):

  • Modules/mediastream/RTCRtpReceiver.h:

(WebCore::RTCRtpReceiver::track):

  • Modules/mediastream/RTCRtpReceiver.idl:
  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::RTCRtpSender):

  • Modules/mediastream/RTCRtpSender.h:

(WebCore::RTCRtpSender::track):

  • Modules/mediastream/RTCRtpSender.idl:
  • Modules/mediastream/RTCRtpSenderReceiverBase.h: Removed.
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addRemoteTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::LibWebRTCPeerConnectionBackend::videoReceiver):
(WebCore::LibWebRTCPeerConnectionBackend::audioReceiver):

  • WebCore.xcodeproj/project.pbxproj:
4:00 PM Changeset in webkit [235816] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Cleanup: Remove extraneous "using namespace" and scope WebCore::LogThreading
https://bugs.webkit.org/show_bug.cgi?id=189381

Reviewed by Simon Fraser.

  • platform/ios/wak/WKGraphics.mm:
  • platform/ios/wak/WebCoreThread.mm:

(WebThreadEnable):

3:56 PM Changeset in webkit [235815] by Kocsen Chung
  • 1 copy in tags/Safari-606.2.10

Tag Safari-606.2.10.

3:53 PM Changeset in webkit [235814] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

Clean up FontAttributeChanges.cpp after r235748
https://bugs.webkit.org/show_bug.cgi?id=189394

Reviewed by Tim Horton.

  • Sources.txt: Move FontAttributeChanges.cpp into unified sources.
  • WebCore.xcodeproj/project.pbxproj:
  • editing/FontAttributeChanges.cpp: Replace #imports with #includes.
3:50 PM Changeset in webkit [235813] by Basuke Suzuki
  • 3 edits
    5 adds in trunk

[Curl][WebKitLegacy] Stop sending credential embedded in the url via XHR.
https://bugs.webkit.org/show_bug.cgi?id=189198

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Because sync XHR of Curl port uses passed request directly, the credential information in
url is not removed. Use ResourceHandleInternal's firstRequest because those are
already takne out.

Test: http/tests/xmlhttprequest/url-with-credentials.html

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):

LayoutTests:

  • http/tests/xmlhttprequest/resources/url-with-credentials/authenticate.php: Added.
  • http/tests/xmlhttprequest/resources/url-with-credentials/authorize.php: Added.
  • http/tests/xmlhttprequest/url-with-credentials-expected.txt: Added.
  • http/tests/xmlhttprequest/url-with-credentials.html: Added.
3:40 PM Changeset in webkit [235812] by Kocsen Chung
  • 7 edits in branches/safari-606.1.36.10-branch/Source

Versioning.

3:36 PM Changeset in webkit [235811] by Kocsen Chung
  • 7 edits in branches/safari-606-branch/Source

Versioning.

3:28 PM Changeset in webkit [235810] by youenn@apple.com
  • 4 edits in trunk/Source/WebCore

RealtimeOutgoingVideoSourceCocoa should use VTImageRotationSession to rotate CVPixelBuffers
https://bugs.webkit.org/show_bug.cgi?id=189427

Reviewed by Eric Carlson.

Previously, we were relying on libwebrtc utils to do the rotation.
This is inefficient compared to VTImageRotateSession and also induces additional memory cost
since libwebrtc is rotating using its own buffers and the encoder will convert this buffer back to a CVPixelBuffer.

Instead use VTImageRotationSession when rotation must be done at sending side.
Covered by webrtc/video-rotation.html.

  • platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:

(WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):

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

(WebCore::computeRotatedWidthAndHeight):
(WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):

2:57 PM Changeset in webkit [235809] by youenn@apple.com
  • 53 edits
    1 copy
    1 add in trunk

Add support for unified plan transceivers
https://bugs.webkit.org/show_bug.cgi?id=189390

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc/RTCDTMFSender-insertDTMF.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-addTrack.https-expected.txt:

Regression comes from the fact that the sender was never used but transceiver direction is sendrecv.
This might need further clarification in the spec or implementation of libwebrtc.

  • web-platform-tests/webrtc/RTCPeerConnection-addTransceiver-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-removeTrack.https-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-setDescription-transceiver-expected.txt:
  • web-platform-tests/webrtc/RTCRtpTransceiver-setDirection-expected.txt:

Source/ThirdParty/libwebrtc:

Expose more symbols.

  • Configurations/libwebrtc.iOS.exp:
  • Configurations/libwebrtc.iOSsim.exp:
  • Configurations/libwebrtc.mac.exp:

Source/WebCore:

Keep previous transceiver behavior when unified plan flag is off.
Otherwise, use the libwebrtc transceiver API to create and use unified plan transceivers.
Fuel the implementation of transceivers through a dedicated backend.

Update transceiver IDL and make some smaller fixes at the same time:

Our mock peer connections are only supporting plan B APIs at the moment.
We therefore mandate plan B when using such mocks until we can upgrade mocks to support unified plan APIs.

Covered by modified and rebased tests.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::addTrack):

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

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::addTransceiver):

  • Modules/mediastream/RTCRtpSender.cpp:

(WebCore::RTCRtpSender::RTCRtpSender):

  • Modules/mediastream/RTCRtpTransceiver.cpp:

(WebCore::RTCRtpTransceiver::mid const):
(WebCore::RTCRtpTransceiver::currentDirection const):

  • Modules/mediastream/RTCRtpTransceiver.h:

(WebCore::RTCRtpTransceiver::backend):

  • Modules/mediastream/RTCRtpTransceiver.idl:
  • Modules/mediastream/RTCRtpTransceiverBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::addTrack):
(WebCore::LibWebRTCMediaEndpoint::newTransceiver):
(WebCore::LibWebRTCMediaEndpoint::addTransceiver):
(WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender):
(WebCore::LibWebRTCMediaEndpoint::OnAddTrack):
(WebCore::LibWebRTCMediaEndpoint::OnTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::createReceiverForSource):
(WebCore::LibWebRTCPeerConnectionBackend::createReceiver):
(WebCore::LibWebRTCPeerConnectionBackend::videoReceiver):
(WebCore::LibWebRTCPeerConnectionBackend::audioReceiver):
(WebCore::LibWebRTCPeerConnectionBackend::addTrack):
(WebCore::LibWebRTCPeerConnectionBackend::addTransceiver):
(WebCore::backendFromRTPTransceiver):
(WebCore::LibWebRTCPeerConnectionBackend::existingTransceiver):
(WebCore::LibWebRTCPeerConnectionBackend::newTransceiver):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:

(WebCore::LibWebRTCRtpSenderBackend::replaceTrack):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: Added.

(WebCore::LibWebRTCRtpTransceiverBackend::createReceiverBackend):
(WebCore::LibWebRTCRtpTransceiverBackend::createSenderBackend):
(WebCore::LibWebRTCRtpTransceiverBackend::direction const):
(WebCore::LibWebRTCRtpTransceiverBackend::currentDirection const):
(WebCore::LibWebRTCRtpTransceiverBackend::setDirection):
(WebCore::LibWebRTCRtpTransceiverBackend::mid):
(WebCore::LibWebRTCRtpTransceiverBackend::stop):

  • Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.h: Added.
  • Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:

(WebCore::toRTCRtpTransceiverDirection):
(WebCore::fromRTCRtpTransceiverDirection):
(WebCore::fromRtpTransceiverInit):

  • Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
  • WebCore.xcodeproj/project.pbxproj:
  • platform/mediastream/RealtimeIncomingAudioSource.cpp:

(WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):

  • platform/mediastream/RealtimeIncomingVideoSource.cpp:

(WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):

  • platform/mediastream/RealtimeMediaSource.h:
  • testing/Internals.cpp:

(WebCore::Internals::useMockRTCPeerConnectionFactory):

LayoutTests:

Update tests using mock to enforce plan B for now until unified plan mocks are supported.

  • fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt:
  • fast/mediastream/RTCPeerConnection-icecandidate-event.html:
  • fast/mediastream/RTCPeerConnection-iceconnectionstatechange-event.html:
  • fast/mediastream/RTCPeerConnection-inspect-answer.html:
  • fast/mediastream/RTCPeerConnection-inspect-offer.html:
  • fast/mediastream/RTCPeerConnection-media-setup-single-dialog.html:
  • fast/mediastream/RTCPeerConnection-media-setup-two-dialogs.html:
  • fast/mediastream/RTCPeerConnection-remotely-assigned-transceiver-mid.html:
  • fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html:
  • fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html:
  • webrtc/calling-peerconnection-once-closed.html:

Once closed, addTransceiver is expected to throw.

  • webrtc/libwebrtc/release-while-creating-offer.html:
  • webrtc/libwebrtc/release-while-getting-stats.html:
  • webrtc/libwebrtc/release-while-setting-local-description.html:
  • webrtc/video-getParameters.html: sender and receiver parameters are no longer the same.

Testing them individually.

  • webrtc/video-with-receiver.html:

Test is working only with legacy mode.

2:43 PM Changeset in webkit [235808] by commit-queue@webkit.org
  • 5 edits in trunk

XMLHttpRequest: open() does not throw a SYNTAX_ERR exception if method is empty or url cannot be resolved
https://bugs.webkit.org/show_bug.cgi?id=46008

Patch by Rob Buis <rbuis@igalia.com> on 2018-09-07
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/xhr/open-url-bogus-expected.txt:
  • web-platform-tests/xhr/open-url-multi-window-6-expected.txt:

Source/WebCore:

Check if passed URL is valid as specified here [1].

Test: web-platform-tests/xhr/open-url-bogus.htm

[1] https://xhr.spec.whatwg.org/#the-open()-method Step 7

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::open):

2:29 PM Changeset in webkit [235807] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit

Allow WebContent access to AVCSupported IOKit property in sandbox
https://bugs.webkit.org/show_bug.cgi?id=189429
<rdar://problem/43612229>

Reviewed by Eric Carlson.

Allow access to the IOKit properties AVCSupported and HEVCSupported to allow the WebContent process
to check for efficient video codecs.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
  • WebProcess/com.apple.WebProcess.sb.in:
2:12 PM Changeset in webkit [235806] by commit-queue@webkit.org
  • 41 edits
    1 add
    1 delete in trunk

[CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
https://bugs.webkit.org/show_bug.cgi?id=182230

Patch by Frederic Wang <fwang@igalia.com> on 2018-09-07
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

This commit updates expectations for some WPT tests so that they have only PASS results.
Note that css/cssom-view/scrollingElement-quirks-dynamic-*.html still fail for now (bug 182292).

  • web-platform-tests/css/cssom-view/HTMLBody-ScrollArea_quirksmode-expected.txt:
  • web-platform-tests/css/cssom-view/scrolling-quirks-vs-nonquirks-expected.txt:
  • web-platform-tests/css/cssom-view/scrollingElement-expected.txt: Added.

Source/WebCore:

This commit moves the special logic for "scrolling element" body from the
HtmlBodyElement::scroll(Left/Top/Width/Height/To) functions to the Element class. The code
is executed when the element is the scrolling element which includes the case of body
in Quirks mode and of documentElement in standard mode. This makes the behavior closer to
the CSSOM View spec (bug 5991) while not deviating too much from the current implementation.
Finally, CSSOMViewScrollingAPI is now enabled for running tests and some adjustments are made
to existing tests. Further improvements will be performed in dependencies of bug 5991.

No new tests, already covered by existing tests.

  • dom/Document.cpp: Split scrollingElement into two functions so that one can be called

internally without updating the layout.
(WebCore::Document::scrollingElement):
(WebCore::Document::scrollingElementForAPI):

  • dom/Document.h: Ditto.
  • dom/Document.idl: Use the version updating the layout for API calls.
  • dom/Element.cpp: Add include to call DOMWindow::ScrollTo

(WebCore::Element::scrollTo): Moved some logic from HtmlBodyElement to handle the case of
the scrolling element. Also skip special handling of documentElement() when
CSSOMViewScrollingAPI is disabled.
(WebCore::adjustContentsScrollPositionOrSizeForZoom): Moved some logic from HtmlBodyElement
to handle the case of the scrolling element. Also add a FIXME for improving these kinds of
helper functions. Renamed to make more explicit the semantic of the value argument.
(WebCore::Element::scrollLeft): Moved some logic from HtmlBodyElement to handle the case of
the scrolling element. Use the new documentFrameWithNonNullView() helper function.
(WebCore::Element::scrollTop): Ditto.
(WebCore::Element::setScrollLeft): Ditto
(WebCore::Element::setScrollTop): Ditto.
(WebCore::Element::scrollWidth): Ditto.
(WebCore::Element::scrollHeight): Ditto.

  • dom/Element.h:

(WebCore::Document::documentFrameWithNonNullView): New helper function to retrieve the
frame and ensure a view is available.

  • html/HTMLBodyElement.cpp: Remove code that is now in Element.
  • html/HTMLBodyElement.h: Ditto.

Source/WebKit:

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

(webkit_dom_document_get_scrolling_element): Use the new name.

Source/WebKitLegacy/mac:

  • DOM/DOMDocument.mm:

(-[DOMDocument scrollingElement]): Use the new name.

Tools:

This patch enables CSSOMViewScrollingAPI during test execution.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(enableExperimentalFeatures):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetPreferencesToConsistentValues):

LayoutTests:

This commit updates some tests to work when CSSOMViewScrollingAPI is enabled.

  • TestExpectations: Enable web-platform-tests/cssom-view/scrollingElement.html.
  • fast/dom/Document/scrollingElement-quirks-mode.html: Do not enable explictly enable

CSSOMViewScrollingAPI.

  • fast/dom/Document/scrollingElement-standards-mode.html: Ditto.
  • fast/dom/Element/body-scrollLeft-expected.txt: Updated to follow the CSSOMView spec.
  • fast/dom/Element/body-scrollLeft.html: Ditto.
  • fast/dom/Element/body-scrollTop-expected.txt: Ditto.
  • fast/dom/Element/body-scrollTop.html: Ditto.
  • fast/dom/Element/documentElement-scrollLeft-expected.txt: Ditto.
  • fast/dom/Element/documentElement-scrollLeft.html: Ditto.
  • fast/dom/Element/documentElement-scrollTop-expected.txt: Ditto.
  • fast/dom/Element/documentElement-scrollTop.html: Ditto.
  • fast/dom/Element/scrollLeft-expected.txt: Ditto.
  • fast/dom/Element/scrollLeft.html: Ditto.
  • fast/dom/Element/scrollTop-expected.txt: Ditto.
  • fast/dom/Element/scrollTop.html: Ditto.
  • fast/dom/Element/scrolling-funtions-on-body-expected.txt: Ditto.
  • fast/dom/Element/scrolling-funtions-on-body.html: Ditto.
  • platform/ios/TestExpectations: Add expectation for one WPT test that was already failing

on iOS.

  • platform/ios/ios/fast/coordinates/page-offsets-expected.txt: Use documentElement instead

of body for this test when running in standard mode.

  • platform/ios/ios/fast/coordinates/resources/helpers.js: Ditto.

(verifyScrollOffsets):

  • tiled-drawing/scrolling/fast-scroll-div-latched-mainframe.html: Use

document.scrollingElement instead of document.body to access viewport scroll offset.

1:58 PM Changeset in webkit [235805] by Simon Fraser
  • 3 edits in trunk/Tools

resultsjsonparser needs to handle leak failures
https://bugs.webkit.org/show_bug.cgi?id=189430

Reviewed by Alexey Proskuryakov.

Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak
with a list of the leaked URLs.

  • Scripts/webkitpy/common/net/resultsjsonparser.py:

(JSONTestResult._failure_types_from_actual_result):

  • Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:

(ParsedJSONResultsTest):
(test_basic):

1:44 PM Changeset in webkit [235804] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[AX] Fix compile error in AXObjectCache constructor when !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=189423
<rdar://problem/44231775>

Reviewed by Yusuke Suzuki.

No new tests. Compilation fix.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::AXObjectCache):

1:08 PM Changeset in webkit [235803] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r235506. rdar://problem/44169670

[macOS] Whitelist Network process features for VPN
https://bugs.webkit.org/show_bug.cgi?id=189023
<rdar://problem/43310000>

Reviewed by Eric Carlson.

CFNetwork needs access to some VPN preference files to configure networking, and
need to be allowed to communicate with the VPN process from the Network Process
sandbox.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:

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

1:08 PM Changeset in webkit [235802] by Kocsen Chung
  • 10 edits in branches/safari-606-branch

Cherry-pick r235754. rdar://problem/44210305

[Apple Pay] Rename the -apple-pay-button-type value "checkout" to "check-out"
https://bugs.webkit.org/show_bug.cgi?id=189366
<rdar://problem/44193218>

Reviewed by Sam Weinig.

Source/WebCore:

The button title is "Check out with Apple Pay", so we should use the verb phrase "check out"
rather than the noun "checkout" for naming this value.

Updated http/tests/ssl/applepay/ApplePayButtonV4.html.

  • css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const):
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
  • rendering/RenderThemeCocoa.mm: (WebCore::toPKPaymentButtonType):
  • rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

  • UserInterface/Models/CSSKeywordCompletions.js:

LayoutTests:

  • http/tests/ssl/applepay/ApplePayButtonV4.html:

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

1:08 PM Changeset in webkit [235801] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/WebInspectorUI

Cherry-pick r235406. rdar://problem/44210305

Teach Web Inspector how to complete keywords for -apple-pay-button-style and -apple-pay-button-type
https://bugs.webkit.org/show_bug.cgi?id=189001

Reviewed by Devin Rousso.

  • UserInterface/Models/CSSKeywordCompletions.js:

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

1:08 PM Changeset in webkit [235800] by Kocsen Chung
  • 15 edits
    2 copies
    1 add in branches/safari-606-branch

Cherry-pick r235349. rdar://problem/44209834

[Apple Pay] Introduce new values for -apple-pay-button-type
https://bugs.webkit.org/show_bug.cgi?id=188949
<rdar://problem/39992228>

Reviewed by Anders Carlsson.

Source/WebCore:

Added "in-store", "checkout", "book", and "subscribe" keywords for -apple-pay-button-type,
and mapped those values to their equivalent PKPaymentButtonTypes.

Tests: http/tests/ssl/applepay/ApplePayButton.html

http/tests/ssl/applepay/ApplePayButtonV4.html

  • css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const):
  • css/CSSValueKeywords.in:
  • css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
  • rendering/RenderThemeCocoa.mm: (WebCore::toPKPaymentButtonType):
  • rendering/style/RenderStyleConstants.h:

Source/WebCore/PAL:

  • pal/spi/cocoa/PassKitSPI.h:

LayoutTests:

  • http/tests/ssl/applepay/ApplePayButton.html: Added.
  • http/tests/ssl/applepay/ApplePayButtonV4.html: Added.
  • platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.png:
  • platform/mac-highsierra/http/tests/ssl/applepay/ApplePayButton-expected.txt:
  • platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png: Added.
  • platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt: Added.
  • platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.png: Added.
  • platform/mac/http/tests/ssl/applepay/ApplePayButtonV4-expected.txt: Added.
  • platform/mac-wk2/TestExpectations:

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

1:08 PM Changeset in webkit [235799] by Kocsen Chung
  • 1 edit
    9 adds in branches/safari-606-branch/LayoutTests

Cherry-pick r235341. rdar://problem/44209834

[Apple Pay] Add a test for rendering Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=188947

Reviewed by Sam Weinig.

  • http/tests/ssl/applepay/ApplePayButton.html: Added.
  • platform/mac-sierra/http/tests/ssl/applepay/ApplePayButton-expected.png: Added.
  • platform/mac-sierra/http/tests/ssl/applepay/ApplePayButton-expected.txt: Added.
  • platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.png: Added.
  • platform/mac/http/tests/ssl/applepay/ApplePayButton-expected.txt: Added.

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

1:08 PM Changeset in webkit [235798] by Kocsen Chung
  • 11 edits
    2 copies
    2 moves in branches/safari-606-branch

Cherry-pick r235569. rdar://problem/44169479

Storage Access API: Maintain access through same-site navigations
https://bugs.webkit.org/show_bug.cgi?id=188564
<rdar://problem/43445160>

Reviewed by Alex Christensen.

Source/WebCore:

Tests: http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html

http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html

  • dom/Document.h:

Removed unused member variable m_hasFrameSpecificStorageAccess.

  • loader/DocumentLoader.cpp: (WebCore::DocumentLoader::willSendRequest):
  • loader/FrameLoaderClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillChangeDocument):

Now takes the current URL and the new URL as parameters
and only clears out storage access if the navigation is
cross-site, i.e. with differing eTLD+1s.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

LayoutTests:

  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame-expected.txt:
  • http/tests/storageAccess/request-and-grant-access-cross-origin-sandboxed-iframe-from-prevalent-domain-with-user-interaction-and-access-from-right-frame.html:

Added both a same-site and a cross-site navigation to the sub frame to test maintained and cleared access.

  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access-expected.txt: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access-expected.txt.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-cross-site-should-not-have-access.html: Copied from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access-expected.txt: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access-expected.txt.
  • http/tests/storageAccess/request-and-grant-access-then-navigate-same-site-should-have-access.html: Renamed from LayoutTests/http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html.
  • http/tests/storageAccess/resources/get-cookies.php:

Support for the new test scenarios.

  • http/tests/storageAccess/resources/self-navigating-frame-after-granted-access.html:

Support for the new test scenarios.

  • platform/mac-wk2/TestExpectations:

Marked the new and the renamed tests as [ Pass ].

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

1:07 PM Changeset in webkit [235797] by Kocsen Chung
  • 11 edits in branches/safari-606-branch

Cherry-pick r235318. rdar://problem/44209848

[Apple Pay] Allow $0 totals
https://bugs.webkit.org/show_bug.cgi?id=185150
<rdar://problem/39212331>

Reviewed by Dan Bernstein.

Source/WebCore:

Relaxed payment request validation to allow $0 totals. This matches PassKit behavior.

Updated test cases in http/tests/ssl/applepay/.

  • Modules/applepay/PaymentRequestValidator.mm: (WebCore::PaymentRequestValidator::validateTotal):

LayoutTests:

  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
  • http/tests/ssl/applepay/ApplePaySessionV3-expected.txt:
  • http/tests/ssl/applepay/ApplePaySessionV3.html:
  • http/tests/ssl/applepay/ApplePaySessionV4-expected.txt:
  • http/tests/ssl/applepay/ApplePaySessionV4.html:
  • http/tests/ssl/applepay/PaymentRequest.https-expected.txt:
  • http/tests/ssl/applepay/PaymentRequest.https.html:

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

1:07 PM Changeset in webkit [235796] by Kocsen Chung
  • 20 edits
    2 adds in branches/safari-606-branch

Cherry-pick r235251. rdar://problem/44209840

[Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
https://bugs.webkit.org/show_bug.cgi?id=188829

Reviewed by Tim Horton.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

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

  • Configurations/FeatureDefines.xcconfig:
  • testing/MockPaymentCoordinator.cpp: (WebCore::MockPaymentCoordinator::supportsVersion):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit:

  • Configurations/FeatureDefines.xcconfig:
  • WebProcess/ApplePay/WebPaymentCoordinator.cpp: (WebKit::WebPaymentCoordinator::supportsVersion):

Source/WebKitLegacy/mac:

  • Configurations/FeatureDefines.xcconfig:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

  • http/tests/ssl/applepay/ApplePaySession-expected.txt:
  • http/tests/ssl/applepay/ApplePaySession.html:
  • http/tests/ssl/applepay/ApplePaySessionV3-expected.txt:
  • http/tests/ssl/applepay/ApplePaySessionV3.html:
  • http/tests/ssl/applepay/ApplePaySessionV4-expected.txt: Added.
  • http/tests/ssl/applepay/ApplePaySessionV4.html: Added.
  • platform/mac-wk2/TestExpectations:

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

1:07 PM Changeset in webkit [235795] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r235209. rdar://problem/44169451

The Storage Access API prompt should show the eTLD+1s, not the full host names
https://bugs.webkit.org/show_bug.cgi?id=188830
<rdar://problem/43380645>

Reviewed by Brent Fulgham.

  • UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestStorageAccess):

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

1:07 PM Changeset in webkit [235794] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r235145. rdar://problem/44169453

Storage Access API: The call to ResourceLoadStatisticsMemoryStore::grantStorageAccessInternal() should send eTLD+1s, not full host names
https://bugs.webkit.org/show_bug.cgi?id=188783
<rdar://problem/43559215>

Reviewed by Alex Christensen.

  • UIProcess/ResourceLoadStatisticsMemoryStore.cpp: (WebKit::ResourceLoadStatisticsMemoryStore::grantStorageAccess):

Now sends the eTLD+1 for the top frame and sub frame.

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

1:07 PM Changeset in webkit [235793] by Kocsen Chung
  • 2 edits in branches/safari-606-branch/Source/WebKit

Cherry-pick r234719. rdar://problem/44169456

Yet more crashes in MobileSafari under -[WKFormInputSession setSuggestions:]
https://bugs.webkit.org/show_bug.cgi?id=188427
<rdar://problem/43064672>

Reviewed by Wenson Hsieh.

Speculatively fix more crashes seen under setSuggestions.

  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKFormInputSession isValid]): (-[WKFormInputSession setSuggestions:]): (-[WKFormInputSession invalidate]): Belt-and-suspenders fix: use WeakObjCPtr for WKFormInputSession's WKContentView reference.

(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
Invalidate the WKFormInputSession before replacing it; we theorize that
there is a path in which we get here without having previously called stopAssistingNode.
Most of the code is OK with this, but this leaves WKFormInputSession
with a raw reference to WKContentView which can later become stale.

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

1:07 PM Changeset in webkit [235792] by Kocsen Chung
  • 7 edits
    3 adds in branches/safari-606-branch

Cherry-pick r234504. rdar://problem/44209851

[iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents
https://bugs.webkit.org/show_bug.cgi?id=188251
<rdar://problem/37842108>

Reviewed by Tim Horton.

Source/WebKit:

Fixes a bug in key event handling where invoking -handleKeyWebEvent:withCompletionHandler: from within the
completion callback of a previous call to -handleKeyWebEvent:withCompletionHandler: would cause the completion
callback to be cleared out prematurely. In some cases (as described in the title of this bug), UIKit exercises
this codepath and subsequently hangs due to their completion block never getting invoked by WebKit.

Test: KeyboardInputTests.CanHandleKeyEventInCompletionHandler

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView handleKeyWebEvent:withCompletionHandler:]): (-[WKContentView _didHandleKeyEvent:eventWasHandled:]):

Tools:

Adds a new API test to verify that clients (in this case, UIKit) is allowed to invoke
-handleKeyWebEvent:withCompletionHandler: within the completion block of a prior invocation.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: Added. (TestWebKitAPI::TEST):
  • TestWebKitAPI/Tests/ios/TestInputDelegate.h: Added.

Pull some logic used to force an input session to start out from an existing API test file
(WKWebViewAutofillTests) and into a separate helper class that is used by both the existing API tests and the
new keyboard input test.

  • TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm: (-[AutofillTestView initWithFrame:]): (TestWebKitAPI::TEST): (-[TestInputDelegate init]): Deleted. (-[TestInputDelegate _webView:focusShouldStartInputSession:]): Deleted.
  • TestWebKitAPI/ios/UIKitSPI.h:

Add some UIKit SPI utilized by the new API test.

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

12:50 PM Changeset in webkit [235791] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit

[macOS] Remove unused XPC service from sandbox
https://bugs.webkit.org/show_bug.cgi?id=189406
<rdar://problem/43015423>

Reviewed by Youenn Fablet.

The API surface exposed by "com.apple.systemstats.analysis" is no longer used by the
WebContent process. Since there is no need for this sandbox opening, we should remove it.

  • WebProcess/com.apple.WebProcess.sb.in:
12:44 PM Changeset in webkit [235790] by yusukesuzuki@slowstart.org
  • 21 edits
    6 adds in trunk

[DFG] DFG should handle String#toString
https://bugs.webkit.org/show_bug.cgi?id=189151

Reviewed by Saam Barati.

JSTests:

The error message in String#toString and String#valueOf is poor, which will be
handled in a separate bug[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=189357

  • microbenchmarks/string-object-to-string.js: Added.

(test):

  • microbenchmarks/string-object-value-of.js: Added.

(test):

  • stress/string-to-string-error.js: Added.

(shouldThrow):
(test):

  • stress/string-to-string.js: Added.

(shouldBe):
(test1):
(test2):
(test3):

  • stress/string-value-of-error.js: Added.

(shouldThrow):
(test):

  • stress/string-value-of.js: Added.

(shouldBe):
(test1):
(test2):
(test3):

Source/JavaScriptCore:

We handle String#toString and String#valueOf in DFG by introducing StringValueOf node.
In the fixup phase, we attempt to lower StringValueOf to the existing ToString or Identity
nodes. If we fail to lower it, we have StringValueOf(UntypedUse), which may raise an error
if an argument is neither String nor StringObject. The error message in String#toString and
String#valueOf is poor, which will be handled in a separate bug[1].

It improves simple microbenchmarks by 53.4 - 67.6%.

baseline patched

string-object-to-string 21.7308+-3.3147 12.9655+-0.0527 definitely 1.6760x faster
string-object-value-of 20.1122+-0.0691 13.1134+-0.2482 definitely 1.5337x faster

[1]: https://bugs.webkit.org/show_bug.cgi?id=189357

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupStringValueOf):

  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToToString):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::DFG::SpeculativeJIT::compileToStringOrCallStringConstructor): Deleted.

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

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructorOrStringValueOf):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructor): Deleted.

11:49 AM Changeset in webkit [235789] by aakash_jain@apple.com
  • 3 edits in trunk/Tools

[ews-build] API tests should output result summary in json
https://bugs.webkit.org/show_bug.cgi?id=189417

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(RunAPITests): Passed --json-output parameter to run-api-tests.

  • BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
11:15 AM Changeset in webkit [235788] by commit-queue@webkit.org
  • 4 edits in trunk

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

RunLoopCF does not agree to the fix (Requested by yusukesuzuki
on #webkit).

Reverted changeset:

"[RunLoopGeneric] OneShotTimer should be inactive when fired."
https://bugs.webkit.org/show_bug.cgi?id=189335
https://trac.webkit.org/changeset/235784

10:50 AM Changeset in webkit [235787] by Alan Bujtas
  • 7 edits in trunk/Source/WebCore

[LFC] Replace "computed" value with "used" value to match spec language
https://bugs.webkit.org/show_bug.cgi?id=189414

Reviewed by Antti Koivisto.

  • layout/FormattingContext.cpp:

(WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
(WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):

  • layout/FormattingContext.h:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):

  • layout/FormattingContextGeometry.cpp:

(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::complicatedCases):
(WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowVerticalGeometry):
(WebCore::Layout::FormattingContext::Geometry::outOfFlowHorizontalGeometry):
(WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
(WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):

  • layout/blockformatting/BlockFormattingContext.cpp:

(WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
(WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):

  • layout/blockformatting/BlockFormattingContext.h:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):

  • layout/blockformatting/BlockFormattingContextGeometry.cpp:

(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):

10:29 AM Changeset in webkit [235786] by yusukesuzuki@slowstart.org
  • 19 edits
    1 move in trunk/Source/JavaScriptCore

[WebAssembly] Optimize JS to Wasm call by using pointer of Signature as SignatureIndex
https://bugs.webkit.org/show_bug.cgi?id=189401

Reviewed by Mark Lam.

SignatureInformation is a global repository for Signature to make Signature atomic.
It takes Ref<Signature>&& and generates SignatureIndex. And we get const Signature&
by using this SignatureIndex. However, converting SignatureIndex to const Signature&
always looks up a hash table. This is costly since JS to Wasm calls always use
Signature& to check types of arguments.

Instead of using this hash table, this patch uses a pointer of Signature as SignatureIndex.
This allows us to convert SignatureIndex to Signature by just casting it.

We also optimize SignatureInformation::singleton by making an accessor function inlined.
And we move ProtoCallFrame::init to the header since it's just setting values.

This change significantly optimizes JS to wasm calls (1e7 times) from 600ms to 320ms.

In the future, we can remove SignatureIndex by directly handling Ref<Signature>: adding
deref() of Signature which unregisters itself from SignatureInformation carefully. Or we can
make SignatureIndex uint32_t by introducing a mechanism similar to StructureID.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • interpreter/ProtoCallFrame.h:

(JSC::ProtoCallFrame::init):

  • wasm/WasmB3IRGenerator.cpp:

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

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

(JSC::Wasm::WasmToWasmImportableFunction::offsetOfSignatureIndex):

  • wasm/WasmFunctionParser.h:
  • wasm/WasmModule.h:
  • wasm/WasmOMGPlan.cpp:
  • wasm/WasmSectionParser.cpp:

(JSC::Wasm::SectionParser::parseType):

  • wasm/WasmSignature.cpp:

(JSC::Wasm::SignatureInformation::adopt):
(JSC::Wasm::SignatureInformation::tryCleanup):
(JSC::Wasm::SignatureInformation::singleton): Deleted.
(JSC::Wasm::SignatureInformation::get): Deleted.

  • wasm/WasmSignature.h:

(JSC::Wasm::Signature::index const):
(JSC::Wasm::SignatureHash::SignatureHash):
(JSC::Wasm::SignatureHash::hash):
(JSC::Wasm::SignatureHash::isHashTableDeletedValue const):
(JSC::Wasm::SignatureHash::empty): Deleted.
(JSC::Wasm::SignatureHash::deleted): Deleted.

  • wasm/WasmSignatureInlines.h: Renamed from Source/JavaScriptCore/interpreter/ProtoCallFrame.cpp.

(JSC::Wasm::SignatureInformation::singleton):
(JSC::Wasm::SignatureInformation::get):

  • wasm/js/JSToWasm.cpp:
  • wasm/js/JSWebAssemblyModule.h:
  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

  • wasm/js/WebAssemblyFunction.cpp:
  • wasm/js/WebAssemblyModuleRecord.cpp:
  • wasm/js/WebAssemblyWrapperFunction.cpp:
9:57 AM Changeset in webkit [235785] by yusukesuzuki@slowstart.org
  • 5 edits in trunk/Source/JavaScriptCore

[JSC] Put .throwStackOverflow code after the fast path in LLInt doVMEntry
https://bugs.webkit.org/show_bug.cgi?id=189410

Reviewed by Mark Lam.

Put .throwStackOverflow code after the fast path in LLInt doVMEntry to
make doVMEntry code tight.

  • llint/LLIntThunks.cpp:

(JSC::vmEntryToWasm): Deleted.

  • llint/LLIntThunks.h:

(JSC::vmEntryToWasm):

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
9:27 AM Changeset in webkit [235784] by yoshiaki.jitsukawa@sony.com
  • 4 edits in trunk

[RunLoopGeneric] OneShotTimer should be inactive when fired.
https://bugs.webkit.org/show_bug.cgi?id=189335

Reviewed by Yusuke Suzuki.

Source/WTF:

  • wtf/generic/RunLoopGeneric.cpp:

(WTF::RunLoop::TimerBase::ScheduledTask::fired):
(WTF::RunLoop::TimerBase::isActive const):

Deactivate one-shot timer before invoking its callback.

Tools:

  • TestWebKitAPI/Tests/WTF/RunLoop.cpp:

(TestWebKitAPI::TEST):

Add test expectations about timer's active state.

Add a new test to restart a one-shot timer within
its fired callback.

8:51 AM Changeset in webkit [235783] by Alan Bujtas
  • 2 edits in trunk/LayoutTests

[iOS] Unreviewed test gardening.

  • platform/ios/TestExpectations:
8:38 AM Changeset in webkit [235782] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

Unreviewed syntax fix after r235781

Don't use hash-quote syntax for these non-regex inputs.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb:
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
5:28 AM Changeset in webkit [235781] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit

[iOS] Move default mach-lookup deny to after common.sb is imported
https://bugs.webkit.org/show_bug.cgi?id=189385
<rdar://problem/43624193>

Reviewed by Eric Carlson.

  • Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Move the 'deny mach-lookup' call later in the file.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.Storage.sb: Ditto.
  • Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Ditto.
Note: See TracTimeline for information about the timeline view.