Timeline



Apr 16, 2019:

11:16 PM Changeset in webkit [244372] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
https://bugs.webkit.org/show_bug.cgi?id=191354
<rdar://problem/46123406>

Reviewed by Michael Catanzaro.

ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
index validity and, if the index is valid, check for completeness of the
corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
also only retrieve duration for already-complete frames, or expand the
default 0-second value according to the flashing-protection rule when
the target frame is not yet complete.

Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
as that method goes on and decodes image data to determine specific
information. The ImageSource class that's querying this information
doesn't anticipate this, and doesn't handle the increased memory
consumption of the decoded data, leaving MemoryCache in the blind about
the image resource's actual amount of consumed memory. ImageSource can
instead gracefully handle any incomplete frame by marking the decoding
status for this frame as only partial.

  • platform/image-decoders/ScalableImageDecoder.cpp:

(WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
(WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
(WebCore::ScalableImageDecoder::frameDurationAtIndex const):

9:45 PM Changeset in webkit [244371] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit

[iOSMac] Use UIDocumentPickerViewController for picking files
https://bugs.webkit.org/show_bug.cgi?id=196999
<rdar://problem/49961414>

Reviewed by Tim Horton.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _showDocumentPickerMenu]):
Changed to present a UIDocumentPickerViewController on iOSMac.

(-[WKFileUploadPanel documentPicker:didPickDocumentsAtURLs:]):
(-[WKFileUploadPanel documentPicker:didPickDocumentAtURL:]):
Replaced a deprecated delegate method implementation.

8:34 PM Changeset in webkit [244370] by Wenson Hsieh
  • 25 edits
    2 adds in trunk

[iOS] [WebKit2] Add support for honoring -[UIMenuItem dontDismiss]
https://bugs.webkit.org/show_bug.cgi?id=196919
<rdar://problem/41630459>

Reviewed by Tim Horton.

Source/WebKit:

Adds modern WebKit support for -dontDismiss by implementing a couple of new platform hooks. Covered by a new
layout test: editing/selection/ios/selection-after-changing-text-with-callout-menu.html.

  • Platform/spi/ios/UIKitSPI.h:

Declare the private -dontDismiss property of UIMenuItem.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView willFinishIgnoringCalloutBarFadeAfterPerformingAction]):

Additionally teach the web view (not just the content view) to respond to the hook. This matters in the case
where the WebKit client (most notably, Mail) overrides WKWebView methods to define custom actions in the menu
controller. This scenario is exercised by the new layout test.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView willFinishIgnoringCalloutBarFadeAfterPerformingAction]):

If an action was performed where callout bar fading was ignored, then in WebKit, don't allow selection changes
to fade the callout bar until after the next remote layer tree commit.

(-[WKContentView _updateChangedSelection:]):

Stop suppressing selection updates when showing B/I/U controls, now that we can properly honor the -dontDismiss
property. This was originally introduced in <rdar://problem/15199925>, presumably to ensure that B/I/U buttons
(which have -dontDismiss set to YES) don't trigger selection change and end up dismissing themselves; however,
if triggering B/I/U actually changes the selection rects, this also means that the selection rects on-screen
would be stale after triggering these actions. This effect is most noticeable when bolding text.

(-[WKContentView shouldAllowHidingSelectionCommands]):

Tools:

Add iOS support for several new testing hooks. See below for more detail.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::isDismissingMenu const):

Add a new script controller method to query whether the platform menu (on iOS, the callout bar) is done
dismissing. We consider the menu to be dismissing in between the -WillHide and -DidHide notifications sent
by UIKit when dismissing the callout bar (i.e. UIMenuController).

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::isDismissingMenu const):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setAllowedMenuActions):

Add a new helper method to specify a list of allowed actions when bringing up the menu. On iOS, in the case of
actions supported by the platform, this matches against method selector names (for instance, "SelectAll", or
"Copy", or "Paste"). In the case of the custom actions installed via installCustomMenuAction, we instead match
against the name of the custom action.

(WTR::TestRunner::installCustomMenuAction):

Add a new helper method to install a custom action for the context menu (on iOS, this is the callout bar). This
takes the name of the action (which appears in a button in the callout bar), whether the action should cause
the callout bar to automatically dismiss, and finally, a JavaScript callback that is invoked when the action is
triggered.

(WTR::TestRunner::performCustomMenuAction):

Invoked when the custom menu action is triggered.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::installCustomMenuAction):
(WTR::TestController::setAllowedMenuActions):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::performCustomMenuAction):

Add plumbing to call back into the injected bundle when performing the custom action.

  • WebKitTestRunner/TestInvocation.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::installCustomMenuAction):
(WTR::TestController::setAllowedMenuActions):

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:

(-[TestRunnerWKWebView initWithFrame:configuration:]):
(-[TestRunnerWKWebView becomeFirstResponder]):
(-[TestRunnerWKWebView _addCustomItemToMenuControllerIfNecessary]):

Helper method that converts web view's current custom menu action info into a UIMenuItem, and adds it to the
shared menu controller. This is also invoked when the web view becomes first responder, which matches behavior
in the Mail app on iOS.

(-[TestRunnerWKWebView installCustomMenuAction:dismissesAutomatically:callback:]):
(-[TestRunnerWKWebView setAllowedMenuActions:]):
(-[TestRunnerWKWebView resetCustomMenuAction]):
(-[TestRunnerWKWebView performCustomAction:]):
(-[TestRunnerWKWebView canPerformAction:withSender:]):
(-[TestRunnerWKWebView _willHideMenu]):
(-[TestRunnerWKWebView _didHideMenu]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

Reset both any custom installed actions on the shared menu controller, as well as the list of allowed actions,
if specified.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::isDismissingMenu const):

LayoutTests:

Add a new iOS layout test that installs a custom, non-dismissing action in the callout menu that enlarges text.
The test then activates this custom menu item and checks that the selection rects after triggering this custom
action are updated, and the callout bar is still showing.

  • editing/selection/ios/selection-after-changing-text-with-callout-menu-expected.txt: Added.
  • editing/selection/ios/selection-after-changing-text-with-callout-menu.html: Added.

This test additionally suppresses all callout bar menu items except for the custom "Embiggen" action, to ensure
that the "Embiggen" option can be tapped from the layout test without having to navigate callout bar items by
tapping on the "Next" and "Show styles" buttons. This latter approach is very challenging to make reliable in
automation; when navigating submenus in the callout bar, the next button can't be tapped until the current
callout bar transition animation is complete, but there's no delegate method invoked or notification posted when
this happens.

  • resources/ui-helper.js:

(window.UIHelper.isShowingMenu):
(window.UIHelper.isDismissingMenu):
(window.UIHelper.rectForMenuAction):
(window.UIHelper.async.chooseMenuAction):

Additionally add a few more UIHelper methods.

(window.UIHelper):

7:56 PM Changeset in webkit [244369] by Ross Kirsling
  • 4 edits in trunk/Source

Unreviewed non-unified build fix after r244307.

Source/WebCore:

  • page/DiagnosticLoggingClient.h:

Source/WebKit:

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
6:41 PM Changeset in webkit [244368] by Megan Gardner
  • 9 edits in trunk

Allow sharing from imageSheet on an image document
https://bugs.webkit.org/show_bug.cgi?id=196891
<rdar://problem/25377386>

Reviewed by Tim Horton.

Source/WebKit:

Allow sharing from an image sheet generated from an image document
by storing the image URL and using it as a fallback for the URL.
Store it as an image on WKElementAction to not accidentally trigger
any actions that should actually be associated with pure URLs.

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:

(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:]):
(-[_WKActivatedElementInfo _initWithType:URL:imageURL:location:title:ID:rect:image:userInfo:]):
(-[_WKActivatedElementInfo imageURL]):
(-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:]): Deleted.
(-[_WKActivatedElementInfo _initWithType:URL:location:title:ID:rect:image:userInfo:]): Deleted.

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
  • UIProcess/API/Cocoa/_WKElementAction.mm:

(+[_WKElementAction _elementActionWithType:customTitle:assistant:]):

  • UIProcess/ios/WKActionSheetAssistant.mm:

(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
(-[WKActionSheetAssistant showLinkSheet]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _showAttachmentSheet]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):

Tools:

Test to make sure that the correct imageURL is extracted from an image element.

  • TestWebKitAPI/Tests/WebKitCocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::TEST):

6:32 PM Changeset in webkit [244367] by Wenson Hsieh
  • 4 edits in trunk/Source/WebKit

[Cocoa] Add a way for Apple-internal clients to opt into recommended compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196977
<rdar://problem/49871194>

Reviewed by Tim Horton.

Add a helper method to query whether the navigation client should bypass policy safeguards when determining the
recommended compatibility mode. We bypass policy safeguards in Cocoa platforms if the navigation delegate
implements the new navigation delegate API.

  • UIProcess/API/APINavigationClient.h:

(API::NavigationClient::shouldBypassCompatibilityModeSafeguards const):

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

(WebKit::NavigationState::NavigationClient::shouldBypassCompatibilityModeSafeguards const):

6:27 PM Changeset in webkit [244366] by stephan.szabo@sony.com
  • 4 edits in trunk/Source

[PlayStation] Update port for system library changes
https://bugs.webkit.org/show_bug.cgi?id=196978

Reviewed by Ross Kirsling.

Source/JavaScriptCore:

  • shell/playstation/Initializer.cpp:

Add reference to new posix compatibility library.

Source/WTF:

  • wtf/PlatformPlayStation.cmake:

Remove reference to deleted system library

5:33 PM Changeset in webkit [244365] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:] never returns _WKWebsiteDataTypeCredentials
https://bugs.webkit.org/show_bug.cgi?id=196991
<rdar://problem/45507423>

Reviewed by Brent Fulgham.

The credentials are stored in the Network process. To enable fetching credentials from the Network process,
a proper process access type needs to be set for the credential Website data type.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::computeNetworkProcessAccessTypeForDataFetch):

5:18 PM Changeset in webkit [244364] by commit-queue@webkit.org
  • 4 edits in trunk

REGRESSION(r244162) Clearing website data from ephemeral WKWebsiteDataStore should finish instead of asserting or hanging
https://bugs.webkit.org/show_bug.cgi?id=196995

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-16
Reviewed by Brady Eidson.

Source/WebKit:

Always call CompletionHandlers. Otherwise things hang or assert.
I added an API test that asserts without this change so we don't regress this again.

  • NetworkProcess/cache/CacheStorageEngine.cpp:

(WebKit::CacheStorage::Engine::clearAllCaches):
(WebKit::CacheStorage::Engine::clearCachesForOrigin):

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm:

(TEST):

4:44 PM Changeset in webkit [244363] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Worker imported scripts not showing up in Open Quickly dialog if inspector open after workers exist
https://bugs.webkit.org/show_bug.cgi?id=196986

Reviewed by Devin Rousso.

  • UserInterface/Views/OpenResourceDialog.js:

(WI.OpenResourceDialog.prototype._addScriptsForTarget):
We were unnecessary skipping Scripts that do not have a sourceURL but do
have a URL, which ends up being Worker populated scripts.

4:29 PM Changeset in webkit [244362] by jer.noble@apple.com
  • 2 edits in trunk/Source/WTF

Enable HAVE_AVKIT on PLATFORM(IOSMAC)
https://bugs.webkit.org/show_bug.cgi?id=196987

Reviewed by Tim Horton.

  • wtf/Platform.h:
4:07 PM Changeset in webkit [244361] by Chris Dumez
  • 14 edits
    1 add in trunk

URL set by document.open() is not communicated to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=196941
<rdar://problem/49237544>

Reviewed by Geoff Garen.

Source/WebCore:

Notify the FrameLoaderClient whenever an explicit open was done and provide it with
the latest document URL.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::didExplicitOpen):

  • loader/FrameLoaderClient.h:

Source/WebKit:

Whenever the UIProcess is notified of an explicit document.open() call, update the
PageLoadState to make sure the URL is up-to-date. Also make sure the page / process
knows it committed a load (i.e. It is no longer showing the initially empty document).

  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::didExplicitOpen):

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

(WebKit::WebPageProxy::didExplicitOpenForFrame):

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

(WebKit::WebFrameLoaderClient::dispatchDidExplicitOpen):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/open-window-then-write-to-it.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:

(-[OpenWindowThenDocumentOpenUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

3:43 PM Changeset in webkit [244360] by Chris Dumez
  • 4 edits
    2 adds in trunk/Source

Show prompt for device orientation access if the client does not implement the corresponding API delegate
https://bugs.webkit.org/show_bug.cgi?id=196971
<rdar://problem/49945840>

Reviewed by Alex Christensen.

Show prompt for device orientation access if the client does not implement the corresponding
API delegate, instead of rejecting access by default.

  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::shouldAllowDeviceOrientationAndMotionAccess):

  • UIProcess/Cocoa/WKOrientationAccessAlert.h: Added.
  • UIProcess/Cocoa/WKOrientationAccessAlert.mm: Added.

(WebKit::presentOrientationAccessAlert):

  • WebKit.xcodeproj/project.pbxproj:
2:35 PM Changeset in webkit [244359] by wilander@apple.com
  • 3 edits in trunk/LayoutTests

Set test conditions closer to conversion redirect in LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html
https://bugs.webkit.org/show_bug.cgi?id=196983
<rdar://problem/49952679>

Unreviewed test gardening.

  • http/tests/adClickAttribution/resources/redirectToConversion.php:
  • http/tests/adClickAttribution/send-attribution-conversion-request.html:
2:28 PM Changeset in webkit [244358] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION(r238168) Web Inspector: <iframe src=...> request does not show up in Network Tab
https://bugs.webkit.org/show_bug.cgi?id=193505
<rdar://problem/47325957>

Reviewed by Devin Rousso.

  • UserInterface/Views/NetworkTableContentView.js:

(WI.NetworkTableContentView):
(WI.NetworkTableContentView.prototype._handleFrameWasAdded):
Handle new frames by adding the frame's main resource.

1:52 PM Changeset in webkit [244357] by jonlee@apple.com
  • 5 edits in trunk

[MotionMark] The text "kkkj" is causing Firefox console warning: unreachable code after return statement
https://bugs.webkit.org/show_bug.cgi?id=196814

Reviewed by Wenson Hsieh.

  • MotionMark/resources/extensions.js:

(subtract.subtract.sampleY):
Websites/browserbench.org:

  • MotionMark1.1/resources/extensions.js:

(subtract.subtract.sampleY):

1:39 PM Changeset in webkit [244356] by Alan Bujtas
  • 2 edits in trunk/Source/WebKit

REGRESSION(r243557)[ContentChangeObserver] Need to double tap text formatting elements in MS Word web app
https://bugs.webkit.org/show_bug.cgi?id=196975
<rdar://problem/49489849>

Reviewed by Simon Fraser.

This patch ensures that we always proceed with synthetic click on form elements.

Covered by existing tests.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::handleSyntheticClick):

1:32 PM Changeset in webkit [244355] by timothy@apple.com
  • 4 edits in trunk/Source

FrameView base background color always starts white.
https://bugs.webkit.org/show_bug.cgi?id=196976

Reviewed by Beth Dakin.

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::setBaseBackgroundColor): Bail early if the base background
color did not change.

Source/WebKit:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Set m_backgroundColor before calling
WebFrame::createWithCoreMainFrame so the call to create the FrameView
for the empty page in transitionToCommittedForNewPage() gets
the correct color from WebPage.

12:53 PM Changeset in webkit [244354] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.selectionPathComponents')
https://bugs.webkit.org/show_bug.cgi?id=196936
<rdar://problem/49917789>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WI.HeapAllocationsTimelineView.prototype.get navigationItems):
(WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
Drive-by: when selecting a record, force it to be visible before selecting it, as otherwise
the selection events won't be fired.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Drive-by: ensure that clicking on a [S] heap snapshot record icon actually selects the record.

12:48 PM Changeset in webkit [244353] by Devin Rousso
  • 67 edits in trunk

Unprefix -webkit-sticky
https://bugs.webkit.org/show_bug.cgi?id=196962
<rdar://problem/40903458>

Reviewed by Simon Fraser.

Source/WebCore:

Updated existing tests.

This change doesn't modify functionality, only exposing a new unprefixed CSS value.

  • css/CSSProperties.json:
  • css/CSSValueKeywords.in:
  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator PositionType const):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::convertPositionStyle):

Source/WebInspectorUI:

Replace all -webkit-sticky with sticky.

  • UserInterface/Models/CSSKeywordCompletions.js:
  • UserInterface/Views/AuditTestCaseContentView.css:

(.content-view-container > .content-view.audit-test-case > header):

  • UserInterface/Views/AuditTestGroupContentView.css:

(.content-view.audit-test-group.contains-test-case > header):

  • UserInterface/Views/ChangesDetailsSidebarPanel.css:

(.changes-panel .resource-section > .header):

  • UserInterface/Views/DetailsSection.css:

(.details-section > .header):

  • UserInterface/Views/NetworkDetailView.css:

(.network-detail .navigation-bar):

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings .navigation-bar):

  • UserInterface/Views/Table.css:

(.table > .header):

LayoutTests:

  • compositing/layer-creation/no-compositing-for-sticky.html:
  • editing/pasteboard/copy-paste-converts-sticky.html:
  • editing/pasteboard/copy-paste-converts-sticky-expected.txt:
  • fast/block/positioning/fixed-container-with-sticky-parent.html:
  • fast/block/sticky-position-containing-block-crash.html:
  • fast/css/sticky/inflow-sticky.html:
  • fast/css/sticky/inline-sticky-abspos-child.html:
  • fast/css/sticky/inline-sticky.html:
  • fast/css/sticky/multiple-layers-sticky-crash.html:
  • fast/css/sticky/parsing-position-sticky-expected.txt:
  • fast/css/sticky/remove-inline-sticky-crash.html:
  • fast/css/sticky/remove-sticky-crash.html:
  • fast/css/sticky/replaced-sticky.html:
  • fast/css/sticky/resources/parsing-position-sticky.js:
  • fast/css/sticky/sticky-as-positioning-container.html:
  • fast/css/sticky/sticky-both-sides.html:
  • fast/css/sticky/sticky-bottom-overflow-padding.html:
  • fast/css/sticky/sticky-left-percentage.html:
  • fast/css/sticky/sticky-left.html:
  • fast/css/sticky/sticky-margins.html:
  • fast/css/sticky/sticky-overflowing.html:
  • fast/css/sticky/sticky-side-margins.html:
  • fast/css/sticky/sticky-stacking-context.html:
  • fast/css/sticky/sticky-stacking-context-expected.html:
  • fast/css/sticky/sticky-table-row-top.html:
  • fast/css/sticky/sticky-table-thead-top.html:
  • fast/css/sticky/sticky-top-margins.html:
  • fast/css/sticky/sticky-top-overflow-container-overflow.html:
  • fast/css/sticky/sticky-top-overflow.html:
  • fast/css/sticky/sticky-top-zoomed.html:
  • fast/css/sticky/sticky-top-zoomed-expected.html:
  • fast/css/sticky/sticky-top.html:
  • fast/css/sticky/sticky-writing-mode-horizontal-bt.html:
  • fast/css/sticky/sticky-writing-mode-vertical-lr.html:
  • fast/css/sticky/sticky-writing-mode-vertical-rl.html:
  • fast/multicol/newmulticol/table-section-crash.html:
  • fast/scrolling/ios/reconcile-layer-position-recursive.html:
  • fast/scrolling/rtl-scrollbars-sticky-document-2.html:
  • fast/scrolling/rtl-scrollbars-sticky-document.html:
  • fast/scrolling/rtl-scrollbars-sticky-iframe-2.html:
  • fast/scrolling/rtl-scrollbars-sticky-iframe.html:
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll-2.html:
  • fast/scrolling/rtl-scrollbars-sticky-overflow-scroll.html:
  • fast/scrolling/sticky-to-fixed.html:
  • legacy-animation-engine/fast/multicol/newmulticol/table-section-crash.html:
  • scrollingcoordinator/scrolling-tree/resources/doc-with-sticky.html:
  • svg/text/select-text-inside-non-static-position.html:
  • tiled-drawing/scrolling/sticky/negative-scroll-offset.html:
  • tiled-drawing/scrolling/sticky/sticky-horizontal.html:
  • tiled-drawing/scrolling/sticky/sticky-layers.html:
  • tiled-drawing/scrolling/sticky/sticky-vertical.html:
12:46 PM Changeset in webkit [244352] by rmorisset@apple.com
  • 4 edits in trunk/Source

[WTF] holdLock should be marked WARN_UNUSED_RETURN
https://bugs.webkit.org/show_bug.cgi?id=196922

Reviewed by Keith Miller.

Source/JavaScriptCore:

There was one case where holdLock was used and the result ignored.
From a comment that was deleted in https://bugs.webkit.org/attachment.cgi?id=328438&action=prettypatch, I believe that it is on purpose.
So I brought back a variant of the comment, and made the ignoring of the return explicit.

  • heap/BlockDirectory.cpp:

(JSC::BlockDirectory::isPagedOut):

Source/WTF:

  • wtf/Locker.h:
12:37 PM Changeset in webkit [244351] by Devin Rousso
  • 2 edits
    3 deletes in trunk/Source/WebInspectorUI

Web Inspector: remove unused WI.DOMTreeDataGrid
https://bugs.webkit.org/show_bug.cgi?id=196958
<rdar://problem/49931383>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/DOMTreeDataGrid.css: Removed.
  • UserInterface/Views/DOMTreeDataGrid.js: Removed.
  • UserInterface/Views/DOMTreeDataGridNode.js: Removed.
  • UserInterface/Main.html:
12:02 PM Changeset in webkit [244350] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Storage: values truncated in Local/Session table
https://bugs.webkit.org/show_bug.cgi?id=178318
<rdar://problem/34998581>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/DataGrid.js:

(WI.DataGrid):
(WI.DataGrid.prototype._copyTextForDataGridNode):

  • UserInterface/Views/TimelineDataGrid.js:

(WI.TimelineDataGrid):
Refactor WI.DataGrid constructor to allow for more optional arguments.
Introduce a new optional argument copyCallback that can be used to override the text that
would be copied for any WI.DataGridNode in any column.

  • UserInterface/Views/DOMStorageContentView.js:

(WI.DOMStorageContentView):
(WI.DOMStorageContentView.prototype.itemAdded):
(WI.DOMStorageContentView.prototype.itemUpdated):
(WI.DOMStorageContentView.prototype._populate):
(WI.DOMStorageContentView.prototype._dataGridCopy): Added.
Save the full non-truncated value as part of the WI.DataGridNode's data. When copying,
use the full non-truncated value instead of what was shown in the DOM.

11:51 AM Changeset in webkit [244349] by don.olmstead@sony.com
  • 7 edits in trunk

[CMake] Set WTF_SCRIPTS_DIR
https://bugs.webkit.org/show_bug.cgi?id=196917

Reviewed by Konstantin Tokarev.

.:

Define WTF_SCRIPTS_DIR in WebKitFS.cmake and use that within the WEBKIT_COMPUTE_SOURCES
macro. This allows it to be overridden by a port such as the AppleWin internal build.

  • Source/cmake/OptionsAppleWin.cmake:
  • Source/cmake/OptionsWinCairo.cmake:
  • Source/cmake/WebKitFS.cmake:
  • Source/cmake/WebKitMacros.cmake:

Source/WTF:

Use WTF_SCRIPTS_DIR for copying the unified sources script.

  • wtf/CMakeLists.txt:
11:32 AM Changeset in webkit [244348] by Kocsen Chung
  • 8 edits
    1 add in tags/Safari-607.2.4.1/Source

Apply patch. rdar://problem/49836497

11:27 AM Changeset in webkit [244347] by Kocsen Chung
  • 7 edits in tags/Safari-607.2.4.1/Source

Versioning.

11:25 AM Changeset in webkit [244346] by wilander@apple.com
  • 2 edits in trunk/LayoutTests

Increase timeout threshold in http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
https://bugs.webkit.org/show_bug.cgi?id=196970
<rdar://problem/49945327>

Unreviewed test gardening.

  • http/tests/adClickAttribution/send-attribution-conversion-request.html:

Increased test timeout from 2 seconds to 4.

11:19 AM Changeset in webkit [244345] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Unreviewed test gardening, rebaseline HAR test after r244294.

  • http/tests/inspector/network/har/har-page-expected.txt:
  • http/tests/inspector/network/har/har-page.html:

Update for stricter SameSite parsing.

11:11 AM Changeset in webkit [244344] by Shawn Roberts
  • 3 edits in trunk/LayoutTests

media/W3C/video/events/event_progress_manual.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=177663

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations: Updating test expectations
11:07 AM Changeset in webkit [244343] by Kocsen Chung
  • 1 copy in tags/Safari-607.2.4.1

New tag.

11:01 AM Changeset in webkit [244342] by Alan Coon
  • 7 edits in tags/Safari-608.1.16.100/Source

Versioning.

10:55 AM Changeset in webkit [244341] by Alan Coon
  • 1 copy in tags/Safari-608.1.16.100

New tag.

10:47 AM Changeset in webkit [244340] by Alan Coon
  • 7 edits in tags/Safari-608.1.16.200/Source

Versioning.

10:45 AM Changeset in webkit [244339] by Alan Coon
  • 1 delete in tags/Safari-608.1.16.1.200

Delete tag.

10:44 AM Changeset in webkit [244338] by Alan Coon
  • 1 copy in tags/Safari-608.1.16.200

New tag.

10:41 AM Changeset in webkit [244337] by Alan Coon
  • 1 copy in tags/Safari-608.1.16.1.200

New tag.

10:40 AM Changeset in webkit [244336] by Alan Coon
  • 1 delete in tags/Safari-608.1.16.200

Delete tag.

10:36 AM Changeset in webkit [244335] by Alan Coon
  • 1 copy in tags/Safari-608.1.16.200

New tag.

10:18 AM Changeset in webkit [244334] by Kocsen Chung
  • 7 edits in branches/safari-607-branch/Source

Versioning.

9:46 AM Changeset in webkit [244333] by Ryan Haddad
  • 2 edits in trunk/Source/WebKit

Unreviewed, fix the build with recent SDKs.

  • UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:

(WebKit::WKWebViewState::store):

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

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Correct a typo in bug URL.
9:28 AM Changeset in webkit [244331] by commit-queue@webkit.org
  • 14 edits
    1 delete in trunk

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

Causing all WK2 Debug builds to exit early after Assertion
failures. (Requested by ShawnRoberts on #webkit).

Reverted changeset:

"URL set by document.open() is not communicated to the
UIProcess"
https://bugs.webkit.org/show_bug.cgi?id=196941
https://trac.webkit.org/changeset/244321

8:58 AM Changeset in webkit [244330] by caitp@igalia.com
  • 8 edits in trunk

[JSC] Filter DontEnum properties in ProxyObject::getOwnPropertyNames()
https://bugs.webkit.org/show_bug.cgi?id=176810

Reviewed by Saam Barati.

JSTests:

Add tests for the DontEnum filtering, and variations of other tests
take the DontEnum-filtering path.

  • stress/proxy-own-keys.js:

(i.catch):
(set assert):
(set add):
(let.set new):
(get let):

Source/JavaScriptCore:

This adds conditional logic following the invariant checks, to perform
filtering in common uses of getOwnPropertyNames.

While this would ideally only be done in JSPropertyNameEnumerator, adding
the filtering to ProxyObject::performGetOwnPropertyNames maintains the
invariant that the EnumerationMode is properly followed.

This was originally rolled out in r244020, as DontEnum filtering code
in ObjectConstructor.cpp's ownPropertyKeys() had not been removed. It's
now redundant due to being handled in ProxyObject::getOwnPropertyNames().

  • runtime/PropertyNameArray.h:

(JSC::PropertyNameArray::reset):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performGetOwnPropertyNames):

Source/WebCore:

Previously, there was a comment here indicating uncertainty of whether it
was necessary to filter DontEnum properties explicitly or not. It turns
out that it was necessary in the case of JSC ProxyObjects.

This patch adds DontEnum filtering for ProxyObjects, however we continue
to explicitly filter them in JSDOMConvertRecord, which needs to use the
property descriptor after filtering. This change prevents observably
fetching the property descriptor twice per property.

  • bindings/js/JSDOMConvertRecord.h:
8:16 AM EnvironmentVariables edited by Philippe Normand
(diff)
2:41 AM Changeset in webkit [244329] by Philippe Normand
  • 2 edits in trunk/LayoutTests

Unreviewed, GTK gardening

  • platform/gtk/TestExpectations:

media/media-controls-accessibility.html times out since r244182.

1:03 AM Changeset in webkit [244328] by graouts@webkit.org
  • 4 edits
    2 adds in trunk

[iOS] Redundant pointer events causes material design buttons to flush twice
https://bugs.webkit.org/show_bug.cgi?id=196914
<rdar://problem/49571860>

Reviewed by Dean Jackson.

Source/WebCore:

Test: pointerevents/ios/pointer-event-order.html

Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.

  • dom/Element.cpp:

(WebCore::Element::dispatchMouseEvent):

LayoutTests:

Add a new test that listens to all pointer event types as well as click, which forces the dispatch of compatibility mouse events
along with the click which would trigger duplicated pointer events prior to the source changes.

To ensure the new test added runs smoothly with a preceeding test that also uses ui.tap(), we add a delay to guarantee that no
double-taps are seen rather two successive single taps.

  • pointerevents/ios/pointer-event-order-expected.txt: Added.
  • pointerevents/ios/pointer-event-order.html: Added.
  • pointerevents/utils.js:

(const.ui.new.UIController.prototype.tap):

Apr 15, 2019:

11:57 PM Changeset in webkit [244327] by Joseph Pecoraro
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: DOM Nodes should not show $0 when selected in Console area
https://bugs.webkit.org/show_bug.cgi?id=196953

Reviewed by Devin Rousso.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView):
Enable showing the last selected element.

  • UserInterface/Views/DOMTreeOutline.js:

Make parameters explicit. Drop "selectable" which was always true.
And add a new option for adding a class name.

  • UserInterface/Views/DOMTreeOutline.css:

(.tree-outline.dom.show-last-selected li.last-selected > span::after):
(.tree-outline.dom.show-last-selected:focus li.last-selected > span::after):
Only show the "= $0" for a DOM tree that has enabled showing the last selected element.

  • UserInterface/Views/FormattedValue.css:

(.formatted-node > .tree-outline.dom li.selected .selection-area):
Don't show the selection-area for a console formatted node.

11:22 PM Changeset in webkit [244326] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebKit

Web Inspector: CRASH when reopening tab with docked inspector on crashed page
https://bugs.webkit.org/show_bug.cgi?id=196954
<rdar://problem/48716433>

Reviewed by Ryosuke Niwa.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):

9:24 PM Changeset in webkit [244325] by wilander@apple.com
  • 7 edits in trunk

Add a query string nonce to LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html to address flakiness
https://bugs.webkit.org/show_bug.cgi?id=196955

Source/WebCore:

Unreviewed test gardening. The WebCore change is only in a dedicated
test function.

No new tests. Existing test updated.

  • loader/AdClickAttribution.cpp:

(WebCore::AdClickAttribution::urlForTesting const):

Now preserves the query string in the test URL.

LayoutTests:

Unreviewed test gardening.

  • http/tests/adClickAttribution/resources/conversionFilePath.php:
  • http/tests/adClickAttribution/resources/conversionReport.php:
  • http/tests/adClickAttribution/resources/getConversionData.php:
  • http/tests/adClickAttribution/send-attribution-conversion-request.html:
7:41 PM Changeset in webkit [244324] by sbarati@apple.com
  • 23 edits
    1 add in trunk

Modify how we do SetArgument when we inline varargs calls
https://bugs.webkit.org/show_bug.cgi?id=196712
<rdar://problem/49605012>

Reviewed by Michael Saboff.

JSTests:

  • stress/get-stack-wrong-type-when-inline-varargs.js: Added.

(foo):

Source/JavaScriptCore:

When we inline varargs calls, we guarantee that the number of arguments that
go on the stack are somewhere between the "mandatoryMinimum" and the "limit - 1".
However, we can't statically guarantee that the arguments between these two
ranges was filled out by Load/ForwardVarargs. This is because in the general
case we don't know the argument count statically.

However, we used to always emit SetArgumentDefinitely up to "limit - 1" for
all arguments, even when some arguments aren't guaranteed to be in a valid
state. Emitting these SetArgumentDefinitely were helpful because they let us
handle variable liveness and OSR exit metadata. However, when we converted
to SSA, we ended up emitting a GetStack for each such SetArgumentDefinitely.

This is wrong, as we can't guarantee such SetArgumentDefinitely nodes are
actually looking at a range of the stack that are guaranteed to be initialized.
This patch introduces a new form of SetArgument node: SetArgumentMaybe. In terms
of OSR exit metadata and variable liveness tracking, it behaves like SetArgumentDefinitely.

However, it differs in a couple key ways:

  1. In ThreadedCPS, GetLocal(@SetArgumentMaybe) is invalid IR, as this implies

you might be loading uninitialized stack. (This same rule applies when you do
the full data flow reachability analysis over CPS Phis.) If someone logically
wanted to emit code like this, the correct node to emit would be GetArgument,
not GetLocal. For similar reasons, PhantomLocal(@SetArgumentMaybe) is also
invalid IR.

  1. To track liveness, Flush(@SetArgumentMaybe) is valid, and is the main user

of SetArgumentMaybe.

  1. In SSA conversion, we don't lower SetArgumentMaybe to GetStack, as there

should be no data flow user of SetArgumentMaybe.

SetArgumentDefinitely guarantees that the stack slot is initialized.
SetArgumentMaybe makes no such guarantee.

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleVarargsInlining):

  • dfg/DFGCPSRethreadingPhase.cpp:

(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
(JSC::DFG::CPSRethreadingPhase::canonicalizeGetLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeFlushOrPhantomLocalFor):
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
(JSC::DFG::CPSRethreadingPhase::propagatePhis):
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGCommon.h:
  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

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

  • dfg/DFGInPlaceAbstractState.cpp:

(JSC::DFG::InPlaceAbstractState::endBasicBlock):

  • dfg/DFGLiveCatchVariablePreservationPhase.cpp:

(JSC::DFG::LiveCatchVariablePreservationPhase::handleBlockForTryCatch):

  • dfg/DFGMaximalFlushInsertionPhase.cpp:

(JSC::DFG::MaximalFlushInsertionPhase::treatRegularBlock):
(JSC::DFG::MaximalFlushInsertionPhase::treatRootBlock):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.cpp:

(JSC::DFG::Node::hasVariableAccessData):

  • dfg/DFGNodeType.h:
  • dfg/DFGPhantomInsertionPhase.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSSAConversionPhase.cpp:

(JSC::DFG::SSAConversionPhase::run):

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

7:12 PM Changeset in webkit [244323] by commit-queue@webkit.org
  • 7 edits in trunk/Source/JavaScriptCore

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

[JSValue release] should be thread-safe (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"[JSC] JSWrapperMap should not use Objective-C Weak map
(NSMapTable with NSPointerFunctionsWeakMemory) for
m_cachedObjCWrappers"
https://bugs.webkit.org/show_bug.cgi?id=196392
https://trac.webkit.org/changeset/243672

7:03 PM Changeset in webkit [244322] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Regression (r244291): Broken API Test AutoLayoutRenderingProgressRelativeOrdering
https://bugs.webkit.org/show_bug.cgi?id=196948

Reviewed by Zalan Bujtas.

  • TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:

(TEST): Disabling the test for now to keep infrastructure happy, while the root-cause is being investigated.

7:01 PM Changeset in webkit [244321] by Chris Dumez
  • 14 edits
    1 add in trunk

URL set by document.open() is not communicated to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=196941
<rdar://problem/49237544>

Reviewed by Geoffrey Garen.

Source/WebCore:

Notify the FrameLoaderClient whenever an explicit open was done and provide it with
the latest document URL.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::didExplicitOpen):

  • loader/FrameLoaderClient.h:

Source/WebKit:

Whenever the UIProcess is notified of an explicit document.open() call, update the
PageLoadState to make sure the URL is up-to-date. Also make sure the page / process
knows it committed a load (i.e. It is no longer showing the initially empty document).

  • UIProcess/PageLoadState.cpp:

(WebKit::PageLoadState::didExplicitOpen):

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

(WebKit::WebPageProxy::didExplicitOpenForFrame):

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

(WebKit::WebFrameLoaderClient::dispatchDidExplicitOpen):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Add API test coverage.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit/open-window-then-write-to-it.html: Added.
  • TestWebKitAPI/Tests/WebKitCocoa/OpenAndCloseWindow.mm:

(-[OpenWindowThenDocumentOpenUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

6:55 PM Changeset in webkit [244320] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix logic flow for error log
https://bugs.webkit.org/show_bug.cgi?id=196933

Patch by Eike Rathke <erack@redhat.com> on 2019-04-15
Reviewed by Alexey Proskuryakov.

Missing block braces logged an error always, not just
if (actionIfInvalid == Complain).

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isSafeToLoadURL):

6:43 PM Changeset in webkit [244319] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Stop using hyphenationFactor
https://bugs.webkit.org/show_bug.cgi?id=196949
<rdar://problem/49779594>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-15
Reviewed by Geoffrey Garen.

  • UIProcess/Cocoa/WKSafeBrowsingWarning.mm:

(-[WKSafeBrowsingTextView initWithAttributedString:forWarning:]):
I added this use of hyphenationFactor in r241124 but the other changes in that revision make the use of hyphenationFactor redundant.
There is a reason to remove it in the radar.

6:43 PM Changeset in webkit [244318] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: update sheet rect whenever inspector window size changes
https://bugs.webkit.org/show_bug.cgi?id=196942
<rdar://problem/49920241>

Reviewed by Joseph Pecoraro.

  • UserInterface/Base/Main.js:

(WI.contentLoaded):
(WI._windowResized):
(WI._updateSheetRect): Added.

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

Forward declare WKWebView in _WKDiagnosticLoggingDelegate.h

  • UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:

This fixes builds where _WKDiagnosticLoggingDelegate.h is the only WebKit header included, such as my work on rdar://problem/35175989

6:19 PM Changeset in webkit [244316] by yoshiaki.jitsukawa@sony.com
  • 2 edits in trunk/Source/bmalloc

Unreviewed. Build fix after r244244.

  • Source/bmalloc/bmalloc/AvailableMemory.cpp
5:51 PM Changeset in webkit [244315] by mmaxfield@apple.com
  • 9 edits
    1 add in trunk

[Cocoa] FontPlatformData objects aren't cached at all when using font-family:system-ui
https://bugs.webkit.org/show_bug.cgi?id=196846
<rdar://problem/49499971>

Reviewed by Simon Fraser and Darin Adler.

PerformanceTests:

  • Layout/system-ui-rebuild-emoji.html: Added.

Source/WebCore:

When adding the special codepath for system-ui to behave as an entire list of fonts rather than a single item,
I never added a cache for the FontPlatformData objects that codepath creates. The non-system-ui codepath already
has a cache in fontPlatformDataCache() in FontCache.cpp.

This patch causes a 16.8x performance improvement on the attached benchmark.

Test: PerformanceTests/Layout/system-ui-rebuild-emoji.html

  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:

(WebCore::FontFamilySpecificationKey::FontFamilySpecificationKey):
(WebCore::FontFamilySpecificationKey::operator== const):
(WebCore::FontFamilySpecificationKey::operator!= const):
(WebCore::FontFamilySpecificationKey::isHashTableDeletedValue const):
(WebCore::FontFamilySpecificationKey::computeHash const):
(WebCore::FontFamilySpecificationKeyHash::hash):
(WebCore::FontFamilySpecificationKeyHash::equal):
(WebCore::fontMap):
(WebCore::clearFontFamilySpecificationCoreTextCache):
(WebCore::FontFamilySpecificationCoreText::fontRanges const):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.h:
  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
(WebCore::safeCFEqual): Deleted.

Source/WTF:

  • wtf/RetainPtr.h:

(WTF::safeCFEqual):
(WTF::safeCFHash):

5:39 PM Changeset in webkit [244314] by sbarati@apple.com
  • 3 edits
    1 add in trunk

SafeToExecute for GetByOffset/GetGetterByOffset/PutByOffset is using the wrong child for the base
https://bugs.webkit.org/show_bug.cgi?id=196945
<rdar://problem/49802750>

Reviewed by Filip Pizlo.

JSTests:

  • stress/get-by-offset-should-use-correct-child.js: Added.

(foo.bar):
(foo):

Source/JavaScriptCore:

  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

5:28 PM Changeset in webkit [244313] by rmorisset@apple.com
  • 7 edits
    1 add in trunk

DFG should be able to constant fold Object.create() with a constant prototype operand
https://bugs.webkit.org/show_bug.cgi?id=196886

Reviewed by Yusuke Suzuki.

JSTests:

Note that this new benchmark does not currently see a speedup with inlining removed.
The reason is that we do not yet have inline caching for Object.create(), we only optimize it when the DFG can see statically the prototype being passed.

  • microbenchmarks/object-create-constant-prototype.js: Added.

(test):

Source/JavaScriptCore:

It is a fairly simple and limited patch, as it only works when the DFG can prove the exact object used as prototype.
But when it applies it can be a significant win:

Baseline Optim

object-create-constant-prototype 3.6082+-0.0979 1.6947+-0.0756 definitely 2.1292x faster
object-create-null 11.4492+-0.2510 ? 11.5030+-0.2402 ?
object-create-unknown-object-prototype 15.6067+-0.1851 ? 15.7500+-0.2322 ?
object-create-untyped-prototype 8.8873+-0.1240 ? 8.9806+-0.1202 ? might be 1.0105x slower
<geometric> 8.6967+-0.1208 7.2408+-0.1367 definitely 1.2011x faster

The only subtlety is that we need to to access the StructureCache concurrently from the compiler thread (see https://bugs.webkit.org/show_bug.cgi?id=186199)
I solved this with a simple lock, taken when the compiler thread tries to read it, and when the main thread tries to modify it.
I expect it to be extremely low contention, but will watch the bots just in case.
The lock is taken neither when the main thread is only reading the cache (it has no-one to race with), nor when the GC purges it of dead entries (it does not free anything while a compiler thread is in the middle of a phase).

  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

  • runtime/StructureCache.cpp:

(JSC::StructureCache::createEmptyStructure):
(JSC::StructureCache::tryEmptyObjectStructureForPrototypeFromCompilerThread):

  • runtime/StructureCache.h:
5:02 PM Changeset in webkit [244312] by Devin Rousso
  • 15 edits
    2 adds in trunk

Web Inspector: fake value descriptors for promises add a catch handler, preventing "rejectionhandled" events from being fired
https://bugs.webkit.org/show_bug.cgi?id=196484
<rdar://problem/49114725>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

Only add a catch handler when the promise is reachable via a native getter and is known to
have rejected. A non-rejected promise doesn't need a catch handler, and any promise that
isn't reachable via a getter won't actually be reached, as InjectedScript doesn't call any
functions, instead only getting the function object itself.

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype._propertyDescriptors.createFakeValueDescriptor):

  • inspector/JSInjectedScriptHost.h:
  • inspector/JSInjectedScriptHost.cpp:

(Inspector::JSInjectedScriptHost::isPromiseRejectedWithNativeGetterTypeError): Added.

  • inspector/JSInjectedScriptHostPrototype.cpp:

(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionIsPromiseRejectedWithNativeGetterTypeError): Added.

  • runtime/ErrorInstance.h:

(JSC::ErrorInstance::setNativeGetterTypeError): Added.
(JSC::ErrorInstance::isNativeGetterTypeError const): Added.

  • runtime/Error.h:

(JSC::throwVMGetterTypeError): Added.

  • runtime/Error.cpp:

(JSC::createGetterTypeError): Added.
(JSC::throwGetterTypeError): Added.
(JSC::throwDOMAttributeGetterTypeError):

Source/WebCore:

Test: inspector/runtime/promise-native-getter.html

Mark errors created from getters as being isNativeGetterTypeError.

  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::throwGetterTypeError):
(WebCore::rejectPromiseWithGetterTypeError):
(WebCore::rejectPromiseWithThisTypeError):

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::makeGetterTypeErrorForBuiltins):

  • bindings/js/JSDOMPromiseDeferred.h:
  • bindings/js/JSDOMPromiseDeferred.cpp:

(WebCore::createRejectedPromiseWithTypeError):

  • Modules/streams/WritableStream.js:

(getter.closed):
(getter.ready):

LayoutTests:

  • inspector/runtime/promise-native-getter.html: Added.
  • inspector/runtime/promise-native-getter-expected.txt: Added.
5:00 PM Changeset in webkit [244311] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Unreviewed, fix typo in a comment.

  • UserInterface/Views/SearchSidebarPanel.js:

(WI.SearchSidebarPanel.prototype.performSearch):

5:00 PM Changeset in webkit [244310] by dean_johnson@apple.com
  • 3 edits in trunk/Tools

Using Tools/Scripts/clean-webkit should not install requests
https://bugs.webkit.org/show_bug.cgi?id=196940

Reviewed by Lucas Forschler.

  • Scripts/webkitpy/common/system/autoinstall.py: Drive-by fix for no logging handlers

existing, depending on the path autoinstalled is run through.

  • Scripts/webkitpy/port/base.py: Import webkitpy.results.upload.Upload only where it's

needed.
(Port.configuration_for_upload):
(Port.commits_for_upload):

4:53 PM Changeset in webkit [244309] by rmorisset@apple.com
  • 51 edits in trunk/Source/JavaScriptCore

B3::Value should have different kinds of adjacency lists
https://bugs.webkit.org/show_bug.cgi?id=196091

Reviewed by Filip Pizlo.

The key idea of this optimization is to replace the Vector<Value*, 3> m_children in B3::Value (40 bytes on 64-bits platform) by one of the following:

  • Nothing (0 bytes)
  • 1 Value* (8 bytes)
  • 2 Value* (16 bytes)
  • 3 Value* (24 bytes)
  • A Vector<Value*, 3>

after the end of the Value object, depending on the kind of the Value.
So for example, when allocating an Add, we would allocate an extra 16 bytes into which to store 2 Values.
This would halve the memory consumption of Const64/Const32/Nop/Identity and a bunch more kinds of values, and reduce by a more moderate amount the memory consumption of the rest of non-varargs values (e.g. Add would go from 72 to 48 bytes).

A few implementation points:

  • Even if there is no children, we must remember to allocate at least enough space for replaceWithIdentity to work later. It needs sizeof(Value) (for the object itself) + sizeof(Value*) (for the pointer to its child)
  • We must make sure to destroy the vector whenever we destroy a Value which is VarArgs
  • We must remember how many elements there are in the case where we did not allocate a Vector. We cannot do it purely by relying on the kind, both for speed reasons and because Return can have either 0 or 1 argument in B3 Thankfully, we have an extra byte of padding to use in the middle of B3::Value
  • In order to support clone(), we must have a separate version of allocate, which extracts the opcode from the to-be-cloned object instead of from the call to the constructor
  • Speaking of which, we need a special templated function opcodeFromConstructor, because some of the constructors of subclasses of Value don't take an explicit Opcode as argument, typically because they match a single one.
  • To maximize performance, we provide specialized versions of child/lastChild/numChildren/children in the subclasses of Value, skipping checks when the actual type of the Value is already known. This is done through the B3_SPECIALIZE_VALUE_FOR_... defined at the bottom of B3Value.h
  • In the constructors of Value, we convert all extra children arguments to Value* eagerly. It is not required for correctness (they will be converted when put into a Vector<Value*> or a Value* in the end), but it helps limit an explosion in the number of template instantiations.
  • I moved DeepValueDump::dump from the .h to the .cpp, as there is no good reason to inline it, and recompiling JSC is already slow enough

(JSC::B3::ArgumentRegValue::cloneImpl const): Deleted.

  • b3/B3ArgumentRegValue.h:
  • b3/B3AtomicValue.cpp:

(JSC::B3::AtomicValue::AtomicValue):
(JSC::B3::AtomicValue::cloneImpl const): Deleted.

  • b3/B3AtomicValue.h:
  • b3/B3BasicBlock.h:
  • b3/B3BasicBlockInlines.h:

(JSC::B3::BasicBlock::appendNewNonTerminal): Deleted.

  • b3/B3CCallValue.cpp:

(JSC::B3::CCallValue::appendArgs):
(JSC::B3::CCallValue::cloneImpl const): Deleted.

  • b3/B3CCallValue.h:
  • b3/B3CheckValue.cpp:

(JSC::B3::CheckValue::cloneImpl const): Deleted.

  • b3/B3CheckValue.h:
  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::cloneImpl const): Deleted.

  • b3/B3Const32Value.h:
  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::cloneImpl const): Deleted.

  • b3/B3Const64Value.h:
  • b3/B3ConstDoubleValue.cpp:

(JSC::B3::ConstDoubleValue::cloneImpl const): Deleted.

  • b3/B3ConstDoubleValue.h:
  • b3/B3ConstFloatValue.cpp:

(JSC::B3::ConstFloatValue::cloneImpl const): Deleted.

  • b3/B3ConstFloatValue.h:
  • b3/B3ConstPtrValue.h:

(JSC::B3::ConstPtrValue::opcodeFromConstructor):

  • b3/B3FenceValue.cpp:

(JSC::B3::FenceValue::FenceValue):
(JSC::B3::FenceValue::cloneImpl const): Deleted.

  • b3/B3FenceValue.h:
  • b3/B3MemoryValue.cpp:

(JSC::B3::MemoryValue::MemoryValue):
(JSC::B3::MemoryValue::cloneImpl const): Deleted.

  • b3/B3MemoryValue.h:
  • b3/B3MoveConstants.cpp:
  • b3/B3PatchpointValue.cpp:

(JSC::B3::PatchpointValue::cloneImpl const): Deleted.

  • b3/B3PatchpointValue.h:

(JSC::B3::PatchpointValue::opcodeFromConstructor):

  • b3/B3Procedure.cpp:
  • b3/B3Procedure.h:
  • b3/B3ProcedureInlines.h:

(JSC::B3::Procedure::add):

  • b3/B3SlotBaseValue.cpp:

(JSC::B3::SlotBaseValue::cloneImpl const): Deleted.

  • b3/B3SlotBaseValue.h:
  • b3/B3StackmapSpecial.cpp:

(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isValidImpl):

  • b3/B3StackmapValue.cpp:

(JSC::B3::StackmapValue::append):
(JSC::B3::StackmapValue::StackmapValue):

  • b3/B3StackmapValue.h:
  • b3/B3SwitchValue.cpp:

(JSC::B3::SwitchValue::SwitchValue):
(JSC::B3::SwitchValue::cloneImpl const): Deleted.

  • b3/B3SwitchValue.h:

(JSC::B3::SwitchValue::opcodeFromConstructor):

  • b3/B3UpsilonValue.cpp:

(JSC::B3::UpsilonValue::cloneImpl const): Deleted.

  • b3/B3UpsilonValue.h:
  • b3/B3Value.cpp:

(JSC::B3::DeepValueDump::dump const):
(JSC::B3::Value::~Value):
(JSC::B3::Value::replaceWithIdentity):
(JSC::B3::Value::replaceWithNopIgnoringType):
(JSC::B3::Value::replaceWithPhi):
(JSC::B3::Value::replaceWithJump):
(JSC::B3::Value::replaceWithOops):
(JSC::B3::Value::replaceWith):
(JSC::B3::Value::invertedCompare const):
(JSC::B3::Value::returnsBool const):
(JSC::B3::Value::cloneImpl const): Deleted.

  • b3/B3Value.h:

(JSC::B3::DeepValueDump::dump const): Deleted.

  • b3/B3ValueInlines.h:

(JSC::B3::Value::adjacencyListOffset const):
(JSC::B3::Value::cloneImpl const):

  • b3/B3VariableValue.cpp:

(JSC::B3::VariableValue::VariableValue):
(JSC::B3::VariableValue::cloneImpl const): Deleted.

  • b3/B3VariableValue.h:
  • b3/B3WasmAddressValue.cpp:

(JSC::B3::WasmAddressValue::WasmAddressValue):
(JSC::B3::WasmAddressValue::cloneImpl const): Deleted.

  • b3/B3WasmAddressValue.h:
  • b3/B3WasmBoundsCheckValue.cpp:

(JSC::B3::WasmBoundsCheckValue::WasmBoundsCheckValue):
(JSC::B3::WasmBoundsCheckValue::cloneImpl const): Deleted.

  • b3/B3WasmBoundsCheckValue.h:

(JSC::B3::WasmBoundsCheckValue::accepts):
(JSC::B3::WasmBoundsCheckValue::opcodeFromConstructor):

  • b3/testb3.cpp:

(JSC::B3::testCallFunctionWithHellaArguments):
(JSC::B3::testCallFunctionWithHellaArguments2):
(JSC::B3::testCallFunctionWithHellaArguments3):
(JSC::B3::testCallFunctionWithHellaDoubleArguments):
(JSC::B3::testCallFunctionWithHellaFloatArguments):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::call):

4:48 PM Changeset in webkit [244308] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Heap: don't use recursion when calculating root paths
https://bugs.webkit.org/show_bug.cgi?id=196890
<rdar://problem/49870751>

Reviewed by Joseph Pecoraro.

  • UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:

(HeapSnapshot.prototype.shortestGCRootPath):
(HeapSnapshot.prototype._determineGCRootPaths):
(HeapSnapshot.prototype._gcRootPathes.visitNode): Deleted.
(HeapSnapshot.prototype._gcRootPathes): Deleted.

4:48 PM Changeset in webkit [244307] by achristensen@apple.com
  • 25 edits in trunk

Add a DiagnosticLogging method taking an arbitrary dictionary of values.
https://bugs.webkit.org/show_bug.cgi?id=196773

Source/WebCore:

Patch by Jer Noble <jer.noble@apple.com> on 2019-04-15
Reviewed by Alex Christensen.

  • page/DiagnosticLoggingClient.h:

Source/WebKit:

Patch by Jer Noble <jer.noble@apple.com> on 2019-04-15
Reviewed by Alex Christensen.

In addition to adding the new logging delegate method (and piping everything into it),
add a new APIObject class to represent a signed integer.

  • Shared/API/APINumber.h:
  • Shared/API/APIObject.h:
  • Shared/Cocoa/APIObject.mm:

(API::Object::newObject):

  • Shared/Cocoa/WKNSNumber.mm:

(-[WKNSNumber dealloc]):
(-[WKNSNumber objCType]):
(-[WKNSNumber getValue:]):
(-[WKNSNumber longLongValue]):
(-[WKNSNumber _apiObject]):

  • Shared/UserData.cpp:

(WebKit::UserData::encode):
(WebKit::UserData::decode):

  • UIProcess/API/APIDiagnosticLoggingClient.h:
  • UIProcess/API/C/WKPageDiagnosticLoggingClient.h:
  • UIProcess/API/Cocoa/_WKDiagnosticLoggingDelegate.h:
  • UIProcess/Cocoa/DiagnosticLoggingClient.h:
  • UIProcess/Cocoa/DiagnosticLoggingClient.mm:

(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::didReceiveMessage):

  • UIProcess/WebPageDiagnosticLoggingClient.cpp:

(WebKit::WebPageDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):

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

(WebKit::WebPageProxy::logDiagnosticMessageWithValueDictionary):

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

(WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):

  • WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:

Tools:

Reviewed by Jer Noble.

  • TestWebKitAPI/Tests/WebKitCocoa/WKWebViewDiagnosticLogging.mm:

(-[TestLoggingDelegate _webView:logDiagnosticMessage:description:valueDictionary:]):
(TEST):

4:36 PM Changeset in webkit [244306] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

ews-build should clearly indicate flaky test failures
https://bugs.webkit.org/show_bug.cgi?id=196947

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(AnalyzeAPITestsResults.analyzeResults):

4:15 PM Changeset in webkit [244305] by Alan Coon
  • 1 copy in tags/Safari-607.2.5

Tag Safari-607.2.5.

4:02 PM Changeset in webkit [244304] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

storage/indexeddb/modern/gc-closes-database-private.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=194450

Unreviewed test gardening.

  • platform/win/TestExpectations: Updating test expectations
3:58 PM Changeset in webkit [244303] by Alan Coon
  • 2 edits
    3 adds in branches/safari-607-branch/Tools

Apply patch. rdar://problem/49788895

3:57 PM Changeset in webkit [244302] by dino@apple.com
  • 2 edits in trunk/Source/WebKit

Provide option to not create a longpress gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=196937
<rdar://problem/49918278>

Build fix for iOS platforms that don't have link preview.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):

3:35 PM Changeset in webkit [244301] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

imported/w3c/web-platform-tests/hr-time/test_cross_frame_start.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196944

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations: Updating test expecations for flaky failure
3:23 PM Changeset in webkit [244300] by Tadeu Zagallo
  • 5 edits in trunk/Source/JavaScriptCore

Bytecode cache should not encode the SourceProvider for UnlinkedFunctionExecutable's classSource
https://bugs.webkit.org/show_bug.cgi?id=196878

Reviewed by Saam Barati.

Every time we encode an (Unlinked)SourceCode, we encode its SourceProvider,
including the full source if it's a StringSourceProvider. This wasn't an issue,
since the SourceCode contains a RefPtr to the SourceProvider, and the Encoder
would avoid encoding the provider multiple times. With the addition of the
incremental cache, each UnlinkedFunctionCodeBlock is encoded in isolation, which
means we can no longer deduplicate it and the full program text was being encoded
multiple times in the cache.
As a work around, this patch adds a custom cached type for encoding the SourceCode
without its provider, and later injects the SourceProvider through the Decoder.

  • parser/SourceCode.h:
  • parser/UnlinkedSourceCode.h:

(JSC::UnlinkedSourceCode::provider const):

  • runtime/CachedTypes.cpp:

(JSC::Decoder::Decoder):
(JSC::Decoder::create):
(JSC::Decoder::provider const):
(JSC::CachedSourceCodeWithoutProvider::encode):
(JSC::CachedSourceCodeWithoutProvider::decode const):
(JSC::decodeCodeBlockImpl):

  • runtime/CachedTypes.h:
3:21 PM Changeset in webkit [244299] by Brent Fulgham
  • 6 edits in trunk

InjectedBundle parameters often need initialization function called before unarchiving
https://bugs.webkit.org/show_bug.cgi?id=189709
<rdar://problem/44573653>

Reviewed by Ryosuke Niwa.

Source/WebKit:

Handle the case where the InjectedBundle parameters do not successfully decode because they contain
an unexpected class from the embedding program. If this happens, try decoding the bundle parameters
after the bundle initialiation function runs, which gives the embedding program the opportunity to
register additional classes that are safe for serialization.

Extend WKWebProcessPlugIn with a method that returns the names of any custom classes that need
to be serialized by the InjectedBundle.

Create a new 'decodeBundleParameters' method that contains the logic that used to live in 'initialize'.
Revise 'initialize' to call this new method.

  • WebProcess/InjectedBundle/InjectedBundle.h:
  • WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:

(WebKit::InjectedBundle::initialize): Use the new method.
(WebKit::InjectedBundle::decodeBundleParameters): Added.
(WebKit::InjectedBundle::setBundleParameters): Use 'decodeObjectOfClasses' with the more complete
'classesForCoder' method to unarchive the passed bundle parameters, rather than the
NSDictionary-specific method, since InjectedBundles often encode other types of objects, and the
NSDictionary object may itself hold other kinds of objects.

  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:

(WebKit::WKWebProcessPlugIn::additionalClassesForParameterCoder): Added.

Tools:

  • TestWebKitAPI/cocoa/WebProcessPlugIn/WebProcessPlugIn.mm:

(-[WebProcessPlugIn additionalClassesForParameterCoder]): Added.

3:06 PM Changeset in webkit [244298] by rmorisset@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

MarkedSpace.cpp is not in the Xcode workspace
https://bugs.webkit.org/show_bug.cgi?id=196928

Reviewed by Saam Barati.

2:58 PM Changeset in webkit [244297] by Justin Fan
  • 4 edits in trunk/Source/WebCore

Let WTF::convertSafely deduce types from arguments.

Reviewer's (Darin Adler) follow-up to https://bugs.webkit.org/show_bug.cgi?id=196793.

  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::tryCreate):

  • platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::copyBufferToTexture):
(WebCore::GPUCommandBuffer::copyTextureToBuffer):

  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::trySetInputStateForPipelineDescriptor):

2:58 PM Changeset in webkit [244296] by dino@apple.com
  • 3 edits in trunk/Source/WebKit

Provide option to not create a longpress gesture recognizer
https://bugs.webkit.org/show_bug.cgi?id=196937
<rdar://problem/49918278>

Reviewed by Antoine Quint.

A WebKitAdditions file has changed name to WKContentViewInteractionWKInteraction.mm.

Add a property to toggle if we should add a long press gesture
recognizer.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView setupInteraction]):
(shouldUsePreviewForLongPress):
(-[WKContentView shouldUsePreviewForLongPress]):

2:55 PM Changeset in webkit [244295] by Tadeu Zagallo
  • 3 edits
    1 add in trunk

Incremental bytecode cache should not append function updates when loaded from memory
https://bugs.webkit.org/show_bug.cgi?id=196865

Reviewed by Filip Pizlo.

JSTests:

  • stress/bytecode-cache-shared-code-block.js: Added.

(b):
(program):

Source/JavaScriptCore:

Function updates hold the assumption that a function can only be executed/cached
after its containing code block has already been cached. This assumptions does
not hold if the UnlinkedCodeBlock is loaded from memory by the CodeCache, since
we might have two independent SourceProviders executing different paths of the
code and causing the same UnlinkedCodeBlock to be modified in memory.
Use a RefPtr instead of Ref for m_cachedBytecode in ShellSourceProvider to distinguish
between a new, empty cache and a cache that was not loaded and therefore cannot be updated.

  • jsc.cpp:

(ShellSourceProvider::ShellSourceProvider):

2:53 PM Changeset in webkit [244294] by Joseph Pecoraro
  • 5 edits in trunk

Web Inspector: SameSite parsing should be stricter
https://bugs.webkit.org/show_bug.cgi?id=196927
<rdar://problem/42291601>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

  • UserInterface/Models/Cookie.js:

(WI.Cookie.parseSameSiteAttributeValue):

LayoutTests:

  • inspector/unit-tests/cookie.html:
  • inspector/unit-tests/cookie-expected.txt:
2:49 PM Changeset in webkit [244293] by rniwa@webkit.org
  • 8 edits in trunk

Throw TypeError when custom element constructor returns a wrong element or tries to create itself
https://bugs.webkit.org/show_bug.cgi?id=196892

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Update the tests according to https://github.com/web-platform-tests/wpt/pull/16328.

  • web-platform-tests/custom-elements/upgrading/Node-cloneNode-expected.txt:
  • web-platform-tests/custom-elements/upgrading/Node-cloneNode.html:
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element-expected.txt:
  • web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html:

Source/WebCore:

Throw TypeError instead of InvalidStateError for consistency. This updates WebKit's custom elements
implementation for https://github.com/whatwg/html/pull/4525.

Tests: imported/w3c/web-platform-tests/custom-elements/upgrading/Node-cloneNode.html

imported/w3c/web-platform-tests/custom-elements/upgrading/upgrading-parser-created-element.html

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::upgradeElement):

  • bindings/js/JSHTMLElementCustom.cpp:

(WebCore::constructJSHTMLElement):

2:46 PM Changeset in webkit [244292] by don.olmstead@sony.com
  • 12 edits in trunk

[CMake] WebCore derived sources should only be referenced inside WebCore
https://bugs.webkit.org/show_bug.cgi?id=196904

Reviewed by Konstantin Tokarev.

.:

Override WebCore_DERIVED_SOURCES_DIR for WinCairo.

  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

Use WebCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_WEBCORE_DIR.

  • CMakeLists.txt:
  • PlatformGTK.cmake:
  • PlatformWin.cmake:
  • WebCoreMacros.cmake:

Source/WebCore/PAL:

Specify PAL_DERIVED_SOURCES_DIR as a private include directory.

  • pal/CMakeLists.txt:
  • pal/PlatformWin.cmake:

Source/WebKit:

Remove reference to DERIVED_SOURCES_WEBCORE_DIR in PlatformMac.cmake.

  • PlatformMac.cmake:
2:34 PM Changeset in webkit [244291] by Alan Bujtas
  • 10 edits in trunk/Source/WebKit

DrawingArea should only capture painting related milestones
https://bugs.webkit.org/show_bug.cgi?id=196926
<rdar://problem/48003845>

Reviewed by Tim Horton.

While dispatching layout milestones (mixture of layout and painting items), the associated drawing areas should only capture the painting related milestones.
These captured milestones get dispatched later in the commit handler to ensure that they are not forwarded prematurely.
However the truly layout related milestones (e.g. DidFirstVisuallyNonEmptyLayout) should be dispatched right away with no delay.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::newlyReachedPaintingMilestones const):
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedPaintingMilestones):
(WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones const): Deleted.
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones): Deleted.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode const):
(WebKit::RemoteLayerTreeTransaction::decode):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::addMilestonesToDispatch):
(WebKit::DrawingArea::dispatchDidReachLayoutMilestone): Deleted.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:

(WebKit::RemoteLayerTreeDrawingArea::addMilestonesToDispatch):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::dispatchDidReachLayoutMilestone): Deleted.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::dispatchDidReachLayoutMilestone):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:

(WebKit::TiledCoreAnimationDrawingArea::addMilestonesToDispatch):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedPaintingMilestones):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::sendPendingNewlyReachedLayoutMilestones): Deleted.
(WebKit::TiledCoreAnimationDrawingArea::dispatchDidReachLayoutMilestone): Deleted.

2:33 PM Changeset in webkit [244290] by Joseph Pecoraro
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: CPU Usage Timeline - Energy impact popover flickers
https://bugs.webkit.org/show_bug.cgi?id=196931
<rdar://problem/49569122>

Reviewed by Devin Rousso.

  • UserInterface/Views/CPUTimelineView.js:

(WI.CPUTimelineView.prototype.initialLayout):

2:30 PM Changeset in webkit [244289] by rniwa@webkit.org
  • 4 edits in trunk

HashTable::removeIf always shrinks the hash table by half even if there is nothing left
https://bugs.webkit.org/show_bug.cgi?id=196681

Reviewed by Darin Adler.

Source/WTF:

Made HashTable::removeIf shrink to the "best size", which is the least power of two bigger
than twice the key count as already used in the copy constructor.

  • wtf/HashTable.h:

(WTF::HashTable::computeBestTableSize): Extracted from the copy constructor.
(WTF::HashTable::shrinkToBestSize): Added.
(WTF::HashTable::removeIf): Use shrinkToBestSize instead of shrink.
(WTF::HashTable::HashTable):

Tools:

Added tests.

  • TestWebKitAPI/Tests/WTF/HashSet.cpp:

(WTF_HashSet.RemoveIf):
(WTF_HashSet.RemoveIfShrinkToBestSize):

2:10 PM Changeset in webkit [244288] by wilander@apple.com
  • 33 edits
    1 move
    6 adds
    1 delete in trunk

Send delayed Ad Click Attribution conversion requests to the click source
https://bugs.webkit.org/show_bug.cgi?id=196838
<rdar://problem/47650157>

Reviewed by Chris Dumez and Youenn Fablet.

Source/WebCore:

WebCore::AdClickAttribution now:

  • Sets m_earliestTimeToSend correctly based on WallTime::now().
  • Allows for a test override of the base URL for conversions.
  • Holds state for whether or not a conversion request has been sent.
  • Outputs m_earliestTimeToSend and m_conversion->hasBeenSent in toString().
  • Returns m_earliestTimeToSend as a result of a call to

convertAndGetEarliestTimeToSend() which used to be called setConversion().

Test: http/tests/adClickAttribution/send-attribution-conversion-request.html

  • loader/AdClickAttribution.cpp:

(WebCore::AdClickAttribution::convertAndGetEarliestTimeToSend):
(WebCore::AdClickAttribution::url const):
(WebCore::AdClickAttribution::urlForTesting const):
(WebCore::AdClickAttribution::markConversionAsSent):
(WebCore::AdClickAttribution::wasConversionSent const):
(WebCore::AdClickAttribution::toString const):
(WebCore::AdClickAttribution::setConversion): Deleted.

Renamed convertAndGetEarliestTimeToSend().

  • loader/AdClickAttribution.h:

(WebCore::AdClickAttribution::Conversion::Conversion):
(WebCore::AdClickAttribution::Conversion::encode const):
(WebCore::AdClickAttribution::Conversion::decode):

  • platform/Timer.h:

Now exports nextFireInterval.

Source/WebKit:

This patch schedules a conversion request with appropriate data going to the
click source as a result of an ad click conversion.

WebKit::AdClickAttributionManager makes use of existing WebKit::PingLoad
infrastructure to make the request. This will probably be reworked into a
dedicated load class further on.

New test infrastructure allows for an override of both the conversion URL
and the 24-48 hour timer.

  • NetworkProcess/AdClickAttributionManager.cpp: Added.

(WebKit::AdClickAttributionManager::ensureDestinationMapForSource):
(WebKit::AdClickAttributionManager::store):
(WebKit::AdClickAttributionManager::startTimer):

Convenience function to support test override.

(WebKit::AdClickAttributionManager::convert):

This function now sets the timer.

(WebKit::AdClickAttributionManager::fireConversionRequest):

Fire an individual request.

(WebKit::AdClickAttributionManager::firePendingConversionRequests):

This is the timer function that iterates over all pending attributions.

(WebKit::AdClickAttributionManager::clear):

Now clears the two new test settings members.

(WebKit::AdClickAttributionManager::toString const):

  • NetworkProcess/AdClickAttributionManager.h: Renamed from Source/WebKit/NetworkProcess/NetworkAdClickAttribution.h.

(WebKit::AdClickAttributionManager::AdClickAttributionManager):
(WebKit::AdClickAttributionManager::setPingLoadFunction):
(WebKit::AdClickAttributionManager::setOverrideTimerForTesting):
(WebKit::AdClickAttributionManager::setConversionURLForTesting):

  • NetworkProcess/NetworkAdClickAttribution.cpp: Renamed from Source/WebKit/NetworkProcess/NetworkAdClickAttribution.cpp.
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::storeAdClickAttribution):
(WebKit::NetworkProcess::dumpAdClickAttribution):
(WebKit::NetworkProcess::clearAdClickAttribution):
(WebKit::NetworkProcess::setAdClickAttributionOverrideTimerForTesting):
(WebKit::NetworkProcess::setAdClickAttributionConversionURLForTesting):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkSession.cpp:

(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::setAdClickAttributionOverrideTimerForTesting):
(WebKit::NetworkSession::setAdClickAttributionConversionURLForTesting):

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

(WebKit::PingLoad::PingLoad):
(WebKit::m_blobFiles):
(WebKit::PingLoad::initialize):

The PingLoad constructor is now split in two to allow for construction
without a WebKit::NetworkConnectionToWebProcess object. The body of
the constructor was moved into the new initialize() function which is
shared between constructors.

  • NetworkProcess/PingLoad.h:
  • Sources.txt:

Removed NetworkProcess/NetworkAdClickAttribution.cpp and added
NetworkProcess/NetworkAdClickAttribution.cpp.

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetAdClickAttributionOverrideTimerForTesting):
(WKPageSetAdClickAttributionConversionURLForTesting):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::dumpAdClickAttribution): Deleted.
(WebKit::NetworkProcessProxy::clearAdClickAttribution): Deleted.

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dumpAdClickAttribution):
(WebKit::WebPageProxy::clearAdClickAttribution):
(WebKit::WebPageProxy::setAdClickAttributionOverrideTimerForTesting):
(WebKit::WebPageProxy::setAdClickAttributionConversionURLForTesting):

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

(WebKit::WebProcessPool::dumpAdClickAttribution): Deleted.
(WebKit::WebProcessPool::clearAdClickAttribution): Deleted.

  • UIProcess/WebProcessPool.h:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

This patch adds test infrastructure to override the default behavior in
WebKit::NetworkAdClickAttribution.

  • TestWebKitAPI/Tests/WebCore/AdClickAttribution.cpp:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::dumpAdClickAttribution):
(WTR::TestRunner::clearAdClickAttribution):
(WTR::TestRunner::setAdClickAttributionOverrideTimerForTesting):
(WTR::TestRunner::setAdClickAttributionConversionURLForTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::setAdClickAttributionOverrideTimerForTesting):
(WTR::TestController::setAdClickAttributionConversionURLForTesting):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-with-priority-expected.txt:
  • http/tests/adClickAttribution/attribution-conversion-through-image-redirect-without-priority-expected.txt:
  • http/tests/adClickAttribution/resources/conversionFilePath.php: Added.
  • http/tests/adClickAttribution/resources/conversionReport.php: Added.
  • http/tests/adClickAttribution/resources/getConversionData.php: Added.
  • http/tests/adClickAttribution/send-attribution-conversion-request-expected.txt: Added.
  • http/tests/adClickAttribution/send-attribution-conversion-request.html: Added.
1:44 PM Changeset in webkit [244287] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

mergeOSREntryValue is wrong when the incoming value does not match up with the flush format
https://bugs.webkit.org/show_bug.cgi?id=196918

Reviewed by Yusuke Suzuki.

r244238 lead to some debug failures because we were calling checkConsistency()
before doing fixTypeForRepresentation when merging in must handle values in
CFA. This patch fixes that.

However, as I was reading over mergeOSREntryValue, I realized it was wrong. It
was possible it could merge in a value/type outside of the variable's flushed type.
Once the flush format types are locked in, we can't introduce a type out of
that range. This probably never lead to any crashes as our profiling injection
and speculation decision code is solid. However, what we were doing is clearly
wrong, and something a fuzzer could have found if we fuzzed the must handle
values inside prediction injection. We should do that fuzzing:
https://bugs.webkit.org/show_bug.cgi?id=196924

  • dfg/DFGAbstractValue.cpp:

(JSC::DFG::AbstractValue::mergeOSREntryValue):

  • dfg/DFGAbstractValue.h:
  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::injectOSR):

1:39 PM Changeset in webkit [244286] by rmorisset@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Several structures and enums in the Yarr interpreter can be shrunk
https://bugs.webkit.org/show_bug.cgi?id=196923

Reviewed by Saam Barati.

YarrOp: 88 -> 80
RegularExpression: 40 -> 32
ByteTerm: 56 -> 48
PatternTerm: 56 -> 48

  • yarr/RegularExpression.cpp:
  • yarr/YarrInterpreter.h:
  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::YarrOp::YarrOp):

  • yarr/YarrParser.h:
  • yarr/YarrPattern.h:
1:29 PM Changeset in webkit [244285] by Devin Rousso
  • 3 edits in trunk/Source/JavaScriptCore

Web Inspector: REGRESSION(r244172): crash when trying to add extra domain while inspecting JSContext
https://bugs.webkit.org/show_bug.cgi?id=196925
<rdar://problem/49873994>

Reviewed by Joseph Pecoraro.

Move the logic for creating the InspectorAgent and InspectorDebuggerAgent into separate
functions so that callers can be guaranteed to have a valid instance of the agent.

  • inspector/JSGlobalObjectInspectorController.h:
  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::connectFrontend):
(Inspector::JSGlobalObjectInspectorController::frontendInitialized):
(Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
(Inspector::JSGlobalObjectInspectorController::ensureInspectorAgent): Added.
(Inspector::JSGlobalObjectInspectorController::ensureDebuggerAgent): Added.
(Inspector::JSGlobalObjectInspectorController::createLazyAgents):

1:18 PM Changeset in webkit [244284] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-app] status-bubble should display position in queue
https://bugs.webkit.org/show_bug.cgi?id=196607

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble._build_bubble):
(StatusBubble._queue_position): Method to calculate patch's position in queue.

1:12 PM Changeset in webkit [244283] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

[ews-build] Do not run clean build by default on EWS builders
https://bugs.webkit.org/show_bug.cgi?id=196897

Reviewed by Lucas Forschler.

  • BuildSlaveSupport/ews-build/steps.py:

(ApplyPatch.start): Do not create .buildbot-patched file. This is a special file for Buildbot and if this
file is present, during the Source checkout, Buildbot cleans the working directory completely (including removing
untracked directories like WebKitBuild).
(CheckOutSource.init): Pass method=clean so that Buildbot clean the working directory. This does not remove
untracked files/directories (like WebKitBuild).

12:56 PM Changeset in webkit [244282] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r244268): Canvas: navigation sidebar no longer appears
https://bugs.webkit.org/show_bug.cgi?id=196920
<rdar://problem/49910618>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/ContentBrowserTabContentView.js:

(WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
Now that we no longer call addSubview when adding a sidebar panel, we can't check to see
if parentSidebar has been set, as that is just an alias for parentView.

12:49 PM Changeset in webkit [244281] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

WebDriver: Set Cookie endpoint does not correctly set subdomain cookies
https://bugs.webkit.org/show_bug.cgi?id=196872
<rdar://problem/49233240>

Reviewed by Joseph Pecoraro.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::addSingleCookie):
Rather than try to "force" the cookie to be set on the current active URL, use the cookie
itself to figure out which domain it should be set on.

12:46 PM Changeset in webkit [244280] by Devin Rousso
  • 3 edits in trunk/LayoutTests

REGRESSION (r240644): Layout Test inspector/page/overrideSetting-ICECandidateFilteringEnabled.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=194437
<rdar://problem/48008005>

Reviewed by Joseph Pecoraro.

  • inspector/page/overrideSetting-ICECandidateFilteringEnabled.html:
  • inspector/page/overrideSetting-ICECandidateFilteringEnabled-expected.txt:
12:17 PM Changeset in webkit [244279] by Devin Rousso
  • 6 edits in trunk/Source/WebInspectorUI

Web Inspector: DOMDebugger: move breakpoint storage to use WI.ObjectStore
https://bugs.webkit.org/show_bug.cgi?id=196231
<rdar://problem/49236864>

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/DOMDebuggerManager.js:

(WI.DOMDebuggerManager):
(WI.DOMDebuggerManager.prototype.addDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
(WI.DOMDebuggerManager.prototype.removeDOMBreakpointsForNode):
(WI.DOMDebuggerManager.prototype.addEventBreakpoint):
(WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
(WI.DOMDebuggerManager.prototype.addURLBreakpoint):
(WI.DOMDebuggerManager.prototype.removeURLBreakpoint):
(WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
(WI.DOMDebuggerManager.prototype._saveDOMBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype._saveEventBreakpoints): Deleted.
(WI.DOMDebuggerManager.prototype._saveURLBreakpoints): Deleted.

  • UserInterface/Models/DOMBreakpoint.js:

(WI.DOMBreakpoint.prototype.saveIdentityToCookie):
(WI.DOMBreakpoint.prototype.toJSON): Added.
(WI.DOMBreakpoint.prototype.get serializableInfo): Deleted.

  • UserInterface/Models/EventBreakpoint.js:

(WI.EventBreakpoint.prototype.saveIdentityToCookie):
(WI.EventBreakpoint.prototype.toJSON): Added.
(WI.EventBreakpoint.prototype.get serializableInfo): Deleted.

  • UserInterface/Models/URLBreakpoint.js:

(WI.URLBreakpoint.prototype.saveIdentityToCookie):
(WI.URLBreakpoint.prototype.toJSON): Added.
(WI.URLBreakpoint.prototype.get serializableInfo): Deleted.
Replace get serializableInfo with toJSON as required by WI.ObjectStore.

  • UserInterface/Base/ObjectStore.js:

(WI.ObjectStore._open):
Increment version.

11:58 AM Changeset in webkit [244278] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: drag/drop over the sidebar should load an imported file in Canvas/Audit tab
https://bugs.webkit.org/show_bug.cgi?id=196873
<rdar://problem/49858190>

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:

(WI.contentLoaded):
(WI._handleDragOver): Added.
(WI._handleDrop): Added.
(WI._dragOver): Deleted.

  • UserInterface/Views/AuditTabContentView.js:

(WI.AuditTabContentView):
(WI.AuditTabContentView.prototype.async handleFileDrop): Added.
(WI.AuditTabContentView.prototype._handleDragOver): Deleted.
(WI.AuditTabContentView.prototype._handleDrop): Deleted.

  • UserInterface/Views/CanvasTabContentView.js:

(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.async handleFileDrop): Added.
(WI.CanvasTabContentView.prototype._handleDragOver): Deleted.
(WI.CanvasTabContentView.prototype._handleDrop): Deleted.

  • UserInterface/Views/TimelineTabContentView.js:

(WI.TimelineTabContentView.prototype.async handleFileDrop): Added.
Check whether the current tab is able to handle a file drop, and if so, don't prevent the
drag from occuring. This now allows the user to drop anywhere on the Web Inspector area to
import files, so long as the relevant tab is currently selected.

  • UserInterface/Controllers/CanvasManager.js:

(WI.CanvasManager.prototype.async processJSON): Added.
(WI.CanvasManager.prototype.processJSON): Deleted.

  • UserInterface/Controllers/TimelineManager.js:

(WI.TimelineManager.prototype.async processJSON): Added.
(WI.TimelineManager.prototype.processJSON): Deleted.
Make async to match other processJSON functions.

11:56 AM Changeset in webkit [244277] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r237903) Speedometer 2 is 1-2% regressed on iOS
https://bugs.webkit.org/show_bug.cgi?id=196841
<rdar://problem/45957016>

Reviewed by Myles C. Maxfield.

Speedometer 2 content does not use the text-underline-offset and text-decoration-thickness
features that were added in r237903 so I looked for behavior changes in the context of
Speedometer from r237903. I found that RenderStyle::changeAffectsVisualOverflow() started
returning true a lot more often after r237903. The reason is that r237903 dropped the
visualOverflowForDecorations() checks in this method and started returning true a lot
more as a result.

To restore previous behavior, this patch adds back the visualOverflowForDecorations() checks
that were dropped in r237903. I have verified that with this patch,
RenderStyle::changeAffectsVisualOverflow() returns true as many times as it used to before
r237903.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeAffectsVisualOverflow const):

11:54 AM Changeset in webkit [244276] by Said Abou-Hallawa
  • 3 edits
    2 adds in trunk

ASSERT fires when removing a disallowed clone from the shadow tree without reseting its corresponding element
https://bugs.webkit.org/show_bug.cgi?id=196895

Reviewed by Darin Adler.

Source/WebCore:

When cloning elements to the shadow tree of an SVGUseElement, the
corresponding element links are set from the clones to the originals.
Later some of the elements may be disallowed to exist in the shadow tree.
For example the SVGPatternElement is disallowed and has to be removed
even after cloning. The problem is the corresponding elements are not
reset to null. Usually this is not a problem because the removed elements
will be deleted and the destructor of SVGElement will reset the corresponding
element links. However in some cases, the cloned element is referenced
from another SVGElement, for example the target of a SVGTRefElement. In
this case the clone won't be deleted but it will be linked to the original
and the event listeners won't be copied from the original. When the
original is deleted, its event listeners have to be removed. The event
listeners of the clones also ave to be removed. But because the event
listeners of the original were not copied when cloning, the assertion in
SVGElement::removeEventListener() fires.

Test: svg/custom/use-disallowed-element-clear-corresponding-element.html

  • svg/SVGUseElement.cpp:

(WebCore::disassociateAndRemoveClones):

LayoutTests:

  • svg/custom/use-disallowed-element-clear-corresponding-element-expected.txt: Added.
  • svg/custom/use-disallowed-element-clear-corresponding-element.html: Added.
11:47 AM Changeset in webkit [244275] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Heap: logging an object from a snapshot shouldn't use the "special" style if the object is reachable
https://bugs.webkit.org/show_bug.cgi?id=196889
<rdar://problem/49870693>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:

(WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):

11:34 AM Changeset in webkit [244274] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Debugger: deleting a special breakpoint should disable it
https://bugs.webkit.org/show_bug.cgi?id=196737
<rdar://problem/49740680>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/BreakpointTreeElement.js:

(WI.BreakpointTreeElement.prototype.ondelete):

11:27 AM Changeset in webkit [244273] by pvollan@apple.com
  • 3 edits in trunk/Tools

TestRunner::notifyDone() should be safely reentrant
https://bugs.webkit.org/show_bug.cgi?id=196898

Reviewed by Darin Adler.

It is currently possible that TestRunner::notifyDone() will call itself, since
notifyDone() will force a repaint, which can start executing JavaScript, which
may call notifyDone() again. This can lead to test failures and flakiness.
Fix this by setting the m_waitToDump flag before calling the dump() method.

  • DumpRenderTree/mac/TestRunnerMac.mm:

(TestRunner::notifyDone):
(TestRunner::forceImmediateCompletion):

  • DumpRenderTree/win/TestRunnerWin.cpp:

(TestRunner::notifyDone):
(TestRunner::forceImmediateCompletion):

10:36 AM Changeset in webkit [244272] by bshafiei@apple.com
  • 1 edit in branches/safari-607-branch/Source/WebCore/platform/sql/SQLiteDatabase.cpp

Apply patch. rdar://problem/49308059

10:31 AM Changeset in webkit [244271] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: null is not an object (evaluating 'this.selectedTreeElement.reveal')
https://bugs.webkit.org/show_bug.cgi?id=196804
<rdar://problem/49800708>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/DOMTreeOutline.js:

(WI.DOMTreeOutline.prototype.update):

10:29 AM Changeset in webkit [244270] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Uncaught Exception: Can't find variable: WebGL2RenderingContext
https://bugs.webkit.org/show_bug.cgi?id=196874
<rdar://problem/49858912>

Reviewed by Timothy Hatcher.

  • UserInterface/Models/Recording.js:

(WI.Recording.prototype.createContext):

  • UserInterface/Models/RecordingAction.js:

(WI.RecordingAction.prototype.process.getContent):

10:27 AM Changeset in webkit [244269] by Devin Rousso
  • 11 edits
    2 adds in trunk

Web Inspector: DOMDebugger: "Attribute Modified" breakpoints pause after the modification occurs for the style attribute
https://bugs.webkit.org/show_bug.cgi?id=196556
<rdar://problem/49570681>

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/dom-debugger/attribute-modified-style.html

  • css/PropertySetCSSStyleDeclaration.h:
  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope):
(WebCore::InlineCSSStyleDeclaration::willMutate): Added.

  • dom/StyledElement.cpp:

(WebCore::StyledElement::styleAttributeChanged):
(WebCore::StyledElement::inlineStyleChanged):

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willInvalidateStyleAttr): Added.
(WebCore::InspectorInstrumentation::didInvalidateStyleAttr):

  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willInvalidateStyleAttrImpl): Added.
(WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::didInvalidateStyleAttr):

  • inspector/agents/InspectorDOMDebuggerAgent.h:
  • inspector/agents/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::willInvalidateStyleAttr): Added.
(WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr): Deleted.

LayoutTests:

  • inspector/dom-debugger/attribute-modified-style.html: Added.
  • inspector/dom-debugger/attribute-modified-style-expected.txt: Added.
10:27 AM Changeset in webkit [244268] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: sidebar panels shouldn't be added as subviews unless visible
https://bugs.webkit.org/show_bug.cgi?id=196888
<rdar://problem/49870659>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/Sidebar.js:

(WI.Sidebar.prototype.insertSidebarPanel):
(WI.Sidebar.prototype.removeSidebarPanel):
(WI.Sidebar.prototype.set selectedSidebarPanel):

10:26 AM Changeset in webkit [244267] by Devin Rousso
  • 8 edits
    2 adds in trunk

Web Inspector: Elements: event listener change events should only be fired for the selected node and it's ancestors
https://bugs.webkit.org/show_bug.cgi?id=196887
<rdar://problem/49870627>

Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector/dom/event-listener-add-remove.html

inspector/dom/event-listener-inspected-node.html

  • inspector/agents/InspectorDOMAgent.h:
  • inspector/agents/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::getEventListenersForNode):
(WebCore::InspectorDOMAgent::setInspectedNode):
(WebCore::InspectorDOMAgent::didAddEventListener):
(WebCore::InspectorDOMAgent::willRemoveEventListener):

Source/WebInspectorUI:

  • UserInterface/Models/DOMNode.js:

(WI.DOMNode.prototype.getEventListeners):

LayoutTests:

  • inspector/dom/event-listener-inspected-node.html: Added.
  • inspector/dom/event-listener-inspected-node-expected.txt: Added.
  • inspector/dom/event-listener-add-remove.html:
  • inspector/dom/event-listener-add-remove-expected.txt:
10:24 AM Changeset in webkit [244266] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: replace all uses of this with WI in Main.js/Test.js
https://bugs.webkit.org/show_bug.cgi?id=196795
<rdar://problem/49796618>

Reviewed by Timothy Hatcher.

  • UserInterface/Base/Main.js:
  • UserInterface/Test/Test.js:
10:23 AM Changeset in webkit [244265] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list
https://bugs.webkit.org/show_bug.cgi?id=196900
<rdar://problem/49880278>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView):
(WI.HeapAllocationsTimelineView.prototype.layout):
(WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked):
(WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
Drive-by: only show heap snapshots for the selected range.

  • UserInterface/Views/TimelineView.js:
  • UserInterface/Views/TimelineRecordingContentView.js:

(WI.TimelineRecordingContentView):
(WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange): Added.
Drive-by: taking (or importing) a heap snapshot should select the entire range so that the
new record will appear in the list of heap snapshots.

10:22 AM Changeset in webkit [244264] by Devin Rousso
  • 7 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r244157): Timelines: ruler size appears wrong on first layout
https://bugs.webkit.org/show_bug.cgi?id=196901
<rdar://problem/49880539>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/View.js:

(WI.View.prototype._layoutSubtree):
Ensure that the forced override of the layout reason during the initial layout doesn't
affect subviews.

  • UserInterface/Views/ConsoleDrawer.js:

(WI.ConsoleDrawer.prototype.sizeDidChange): Added.
(WI.ConsoleDrawer.prototype.layout): Deleted.

  • UserInterface/Views/ConsolePrompt.js:

(WI.ConsolePrompt.prototype.sizeDidChange): Added.
(WI.ConsolePrompt.prototype.layout): Deleted.

  • UserInterface/Views/DOMTreeContentView.js:

(WI.DOMTreeContentView.prototype.sizeDidChange): Added.
(WI.DOMTreeContentView.prototype.layout):

  • UserInterface/Views/NavigationBar.js:

(WI.NavigationBar.prototype.sizeDidChange): Added.
(WI.NavigationBar.prototype.layout):
(WI.NavigationBar.prototype._updateContent): Added.
(WI.NavigationBar.prototype._updateContent.forceItemHidden): Added.
(WI.NavigationBar.prototype._updateContent.isDivider): Added.
(WI.NavigationBar.prototype._updateContent.calculateVisibleItemWidth): Added.
(WI.NavigationBar.prototype.layout.forceItemHidden): Deleted.
(WI.NavigationBar.prototype.layout.isDivider): Deleted.
(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth): Deleted.

  • UserInterface/Views/TabBrowser.js:

(WI.TabBrowser.prototype.sizeDidChange): Added.
(WI.TabBrowser.prototype.layout): Deleted.
Move logic in layout to sizeDidChange where applicable.

10:12 AM Changeset in webkit [244263] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

inspector/canvas/recording-webgl-snapshots.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196875

Unreviewed test gardening.

  • platform/mac/TestExpectations: Updating test expectations
10:06 AM Changeset in webkit [244262] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

inspector/timeline/timeline-recording.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=196915

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Updating test expectations for flaky failure
9:52 AM Changeset in webkit [244261] by Shawn Roberts
  • 2 edits in trunk/LayoutTests

Layout tests
inspector/heap/imported-snapshot.html
inspector/heap/snapshot.html are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=155607

Unreviewed test gardening

  • platform/mac/TestExpectations: Updating expectations for flaky failures
7:41 AM Changeset in webkit [244260] by Philippe Normand
  • 9 edits in trunk

[GTK][WPE] Add enable-media websetting
https://bugs.webkit.org/show_bug.cgi?id=196863

Reviewed by Michael Catanzaro.

Source/WebKit:

It can be useful for headless browsers, for instance. The setting is enabled by default.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/glib/WebKitSettings.cpp:

(webKitSettingsSetProperty):
(webKitSettingsGetProperty):
(webkit_settings_class_init):
(webkit_settings_get_enable_media):
(webkit_settings_set_enable_media):

  • UIProcess/API/gtk/WebKitSettings.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/wpe/WebKitSettings.h:
  • UIProcess/API/wpe/docs/wpe-1.0-sections.txt:

Tools:

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:

(testWebKitSettings): Add test for the enable-media web-setting.

4:49 AM Changeset in webkit [244259] by graouts@webkit.org
  • 2 edits in trunk/Source/WebCore

Ensure iOS layout traits are used for media controls in modern compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196812
<rdar://problem/47460637>

Unreviewed. Speculative fix for test regressions on open-source bots.

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

(MediaController.prototype.get layoutTraits):

12:43 AM Changeset in webkit [244258] by bshafiei@apple.com
  • 1 edit in branches/safari-607-branch/Source/WebCore/platform/sql/SQLiteDatabase.cpp

Revert r243585. rdar://problem/49894388

12:43 AM Changeset in webkit [244257] by bshafiei@apple.com
  • 9 edits in branches/safari-607-branch/Source

Revert r244131. rdar://problem/49894388

12:43 AM Changeset in webkit [244256] by bshafiei@apple.com
  • 1 edit in branches/safari-607-branch/Source/WebKit/WebProcess/WebProcess.h

Revert r244137. rdar://problem/49894388

12:15 AM Changeset in webkit [244255] by bshafiei@apple.com
  • 2 edits in branches/safari-607-branch/Source/WebKit

Cherry-pick r243487. rdar://problem/49788895

Do not terminate the NetworkProcess if a third party application sends a NSCredential with a SecIdentityRef
https://bugs.webkit.org/show_bug.cgi?id=196213

Patch by Alex Christensen <achristensen@webkit.org> on 2019-03-25
Reviewed by Geoff Garen.

Source/WebKit:

A release assertion added in r230225 was reachable. I reached it in a unit test that responds to a challenge
with a SecIdentityRef wrapped in an NSCredential.

  • Shared/cf/ArgumentCodersCF.cpp: (IPC::decode):

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

12:15 AM Changeset in webkit [244254] by bshafiei@apple.com
  • 8 edits
    1 add in branches/safari-607-branch/Source

Apply patch. rdar://problem/49836497

12:11 AM Changeset in webkit [244253] by graouts@webkit.org
  • 3 edits
    2 adds in trunk

Ensure iOS layout traits are used for media controls in modern compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196812
<rdar://problem/47460637>

Reviewed by Dean Jackson.

Source/WebCore:

Test: media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html

Instead of looking at the UA string, check whether we support touches which is the correct indicator of whether we should
be using the iOS layout traits for media controls.

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

(MediaController.prototype.get layoutTraits):

LayoutTests:

Add a new test that enforces modern compatibility mode and checks that the iOS controls are used.

  • media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode-expected.txt: Added.
  • media/modern-media-controls/media-controller/ios/media-controller-ios-layout-traits-modern-compatibility-mode.html: Added.

Apr 14, 2019:

11:25 PM Changeset in webkit [244252] by bshafiei@apple.com
  • 7 edits in branches/safari-607-branch/Source

Versioning.

9:47 PM Changeset in webkit [244251] by Wenson Hsieh
  • 2 edits in trunk/Tools

API test WKAttachmentTests.AddAttachmentToConnectedImageElement is a flaky failure on Mac Release builds
https://bugs.webkit.org/show_bug.cgi?id=196905
<rdar://problem/49886096>

Reviewed by Tim Horton.

This flaky test exercises a race condition between when attachment insertion updates are dispatched from the web
process to the UI process, and when script is executed via -[WKWebView evaluateJavaScript:completionHandler:].
Since attachment insertion and removal updates from the web process to the UI process are scheduled on a zero-
delay timer, we end up with this sequence of events in the problematic (failure) case:

(a) [UI] Run script #1 (which calls HTMLAttachmentElement.getAttachmentIdentifier)

...IPC from UI to web process...

(b) [Web] Evaluate script #1 in the web process, which schedules attachment updates on a zero-delay timer

...IPC from web to UI process...

(c) [UI] Invoke completion handler for script #1
(d) [UI] Run script #2 (which calls document.querySelector('img').attachmentIdentifier)

...IPC from UI to web process...

(e) [Web] Evaluate script #2 in the web process
(f) [Web] Zero-delay timer fires and dispatches attachment updates to the UI process

...which means that script #2 will complete before the UI process has received the attachment updates sent in
step (f). However, in the case where the flaky test succeeds, the zero-delay timer in (f) fires *before* script
#2 is run in step (e).

This patch fixes the flaky test by waiting until attachment insertion updates are guaranteed to be received in
the UI process by waiting on a script message posted by the web process, after attachment updates are
dispatched.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

8:47 PM Changeset in webkit [244250] by Fujii Hironori
  • 2 edits in trunk/LayoutTests

[WinCairo][WKL] Unreviewed test gardening.

  • platform/wincairo-wk1/TestExpectations: Skip animation tests.
5:02 PM Changeset in webkit [244249] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

Disable Flaky API Test WKAttachmentTests.AddAttachmentToConnectedImageElement
https://bugs.webkit.org/show_bug.cgi?id=196909

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:

(TestWebKitAPI::TEST):

1:52 PM Changeset in webkit [244248] by commit-queue@webkit.org
  • 17 edits
    8 adds in trunk

Link prefetch not useful for top-level navigation
https://bugs.webkit.org/show_bug.cgi?id=195623

Patch by Rob Buis <rbuis@igalia.com> on 2019-04-14
Reviewed by Youenn Fablet.

Source/WebCore:

Cache cross-domain top-level prefetches in a dedicated cache and not in the
memory cache. Ignore prefetches for content extension checks.

Tests: http/tests/cache/link-prefetch-main-resource-iframe.html

http/tests/cache/link-prefetch-main-resource.html

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::prefetchIfNeeded):

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType):

  • loader/ResourceLoadInfo.h:
  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::willSendRequestInternal):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):

Source/WebKit:

Cache cross-domain top-level prefetches in a dedicated cache. When a navigation
to the same url is done within a threshold (5 seconds), reuse the
prefetch cache entry, move it to the disk cache and navigate to
the url, meaning no extra network trip is needed. When not used within
the threshold period, the prefetch entry will be erased using a timer.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::lowMemoryHandler):

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::prefetchCache):

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::tryStoreAsCacheEntry):
(WebKit::NetworkResourceLoader::isCrossOriginPrefetch const):

  • NetworkProcess/NetworkResourceLoader.h:
  • NetworkProcess/cache/PrefetchCache.cpp: Added.

(WebKit::PrefetchCache::Entry::Entry):
(WebKit::PrefetchCache::PrefetchCache):
(WebKit::PrefetchCache::~PrefetchCache):
(WebKit::PrefetchCache::clear):
(WebKit::PrefetchCache::take):
(WebKit::PrefetchCache::store):
(WebKit::PrefetchCache::sessionPrefetchMap const):
(WebKit::PrefetchCache::clearExpiredEntries):

  • NetworkProcess/cache/PrefetchCache.h: Added.

(WebKit::PrefetchCache::Entry::response const):
(WebKit::PrefetchCache::Entry::releaseBuffer):

  • Shared/WebPreferences.yaml:
  • Sources.txt:
  • WebKit.xcodeproj/project.pbxproj:

LayoutTests:

Verify that prefetching a cross-domain top-level main resource
is cached in the prefetch cache and only loaded once, and that non
top-level prefetches keep the old behavior.

  • http/tests/cache/link-prefetch-main-resource-expected.txt: Added.
  • http/tests/cache/link-prefetch-main-resource-iframe-expected.txt: Added.
  • http/tests/cache/link-prefetch-main-resource-iframe.html: Added.
  • http/tests/cache/link-prefetch-main-resource.html: Added.
  • http/tests/cache/resources/prefetched-main-resource-iframe.php: Added.
  • http/tests/cache/resources/prefetched-main-resource.php: Added.
  • platform/mac-wk1/TestExpectations:
  • platform/win/TestExpectations:
1:14 PM Changeset in webkit [244247] by dino@apple.com
  • 2 edits in trunk/Source/WebCore

Extract UTI mapping and allow for additions
https://bugs.webkit.org/show_bug.cgi?id=196822
<rdar://problem/49822339>

Reviewed by Darin Adler

Post landing feedback on minimizing String constructors.

  • platform/network/mac/UTIUtilities.mm:

(WebCore::MIMETypeFromUTITree):
(WebCore::UTIFromMIMETypeCachePolicy::createValueForKey):

9:08 AM Changeset in webkit [244246] by aestes@apple.com
  • 3 edits in trunk/Source/WebKit

[Cocoa] WKCustomProtocolLoader should store a WeakPtr to its LegacyCustomProtocolManagerProxy
https://bugs.webkit.org/show_bug.cgi?id=196893
<rdar://problem/48318983>

Reviewed by Anders Carlsson.

In addition to manually invalidating each WKCustomProtocolLoader's _customProtocolManagerProxy
pointer when the LegacyCustomProtocolManagerClient is invalidated, use a WeakPtr in case the
LegacyCustomProtocolManagerProxy is ever destroyed without first invalidating the client.
Also add null pointer checks to NSURLConnectionDelegate methods, which might be called after
the LegacyCustomProtocolManagerProxy has been destroyed.

  • UIProcess/Cocoa/LegacyCustomProtocolManagerClient.mm:

(-[WKCustomProtocolLoader initWithLegacyCustomProtocolManagerProxy:customProtocolID:request:]):
(-[WKCustomProtocolLoader cancel]):
(-[WKCustomProtocolLoader connection:didFailWithError:]):
(-[WKCustomProtocolLoader connection:didReceiveResponse:]):
(-[WKCustomProtocolLoader connection:didReceiveData:]):
(-[WKCustomProtocolLoader connection:willSendRequest:redirectResponse:]):
(-[WKCustomProtocolLoader connectionDidFinishLoading:]):
(WebKit::LegacyCustomProtocolManagerClient::startLoading):
(WebKit::LegacyCustomProtocolManagerClient::invalidate):
(-[WKCustomProtocolLoader customProtocolManagerProxyDestroyed]): Deleted.

  • UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h:
6:50 AM Changeset in webkit [244245] by don.olmstead@sony.com
  • 14 edits in trunk

[CMake] JavaScriptCore derived sources should only be referenced inside JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=196742

Reviewed by Konstantin Tokarev.

.:

Migrate to using JavaScriptCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_JAVASCRIPTCORE_DIR
to support moving the JavaScriptCore derived sources outside of a shared directory.
This is in support of the target oriented design refactoring.

WinCairo is explicitly overriding the value as a canary for this setup.

Also move JavaScriptCore_SCRIPTS_DIR to WebKitFS to remove logic setting it in other projects.

  • Source/PlatformWin.cmake:
  • Source/cmake/OptionsAppleWin.cmake:
  • Source/cmake/OptionsWinCairo.cmake:
  • Source/cmake/WebKitFS.cmake:

Source/JavaScriptCore:

Migrate to using JavaScriptCore_DERIVED_SOURCES_DIR instead of DERIVED_SOURCES_JAVASCRIPTCORE_DIR
to support moving the JavaScriptCore derived sources outside of a shared directory.

Also use JavaScriptCore_DERIVED_SOURCES_DIR instead of DERIVED_SOUCES_DIR.

  • CMakeLists.txt:

Source/WebCore:

Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.

  • CMakeLists.txt:

Source/WebDriver:

Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.

  • CMakeLists.txt:

Source/WebKit:

Don't set JavaScriptCore_SCRIPTS_DIR now that it is set within WebKitFS.

  • CMakeLists.txt:
  • PlatformWin.cmake:

Remove use of DERIVED_SOURCES_JAVASCRIPTCORE_DIR.

Apr 13, 2019:

11:46 PM Changeset in webkit [244244] by zandobersek@gmail.com
  • 4 edits in trunk/Source/bmalloc

[bmalloc][Linux] Add support for memory status calculation
https://bugs.webkit.org/show_bug.cgi?id=195938

Reviewed by Carlos Garcia Campos.

Memory status and under-memory-pressure capabilities in bmalloc can be
implemented on Linux by reading and parsing the statm file under the
proc filesystem.

We retrieve the resident set size from the statm file and multiply it
with the page size. This gives an upper-bound estimate of the memory
that's being consumed by the process.

The statm-based estimate seems preferable to other alternatives. One
such alternative would be reading and parsing more-detailed smaps file,
also exposed under the proc filesystem. This is at the moment being done
in WTF's MemoryFootprint implementation for Linux systems, but on Linux
ports this operation is being throttled to only execute once per second
because of the big computing expense required to read and parse out the
data. A future MemoryFootprint implementation could simply retrieve the
memory footprint value from bmalloc.

Another alternative is the Linux taskstats interface. This one would
require utilizing a netlink socket to retrieve the necessary statistics,
but it requires the process to have elevated privileges, which is a
blocker.

  • bmalloc/AvailableMemory.cpp:

(bmalloc::LinuxMemory::singleton):
(bmalloc::LinuxMemory::footprint const):
(bmalloc::computeAvailableMemory):
(bmalloc::memoryStatus):

  • bmalloc/AvailableMemory.h:

(bmalloc::isUnderMemoryPressure):

  • bmalloc/bmalloc.h:
9:22 PM Changeset in webkit [244243] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[ Mac Debug ] TestWebKitAPI.ProcessSwap.ReuseSuspendedProcessForRegularNavigationRetainBundlePage is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=196548
<rdar://problem/49567254>

Reviewed by Darin Adler.

Update ProvisionalPageProxy methods to more consistently ignore unexpected IPC from the process. Previously,
some of the methods were doing this, but some other like didFailProvisionalLoadForFrame() weren't and this
was leading to this flaky crash. The issue is that if we do the load in an existing process that was recently
doing, there may be leftover IPC for the same pageID and this IPC gets received by the ProvisionalPageProxy
even though it is from a previous navigation. For this reason, the ProvisionalPageProxy should ignore all
incoming IPC that is not for its associated navigation.

  • UIProcess/ProvisionalPageProxy.cpp:

(WebKit::ProvisionalPageProxy::didPerformClientRedirect):
(WebKit::ProvisionalPageProxy::didStartProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didFailProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::didCommitLoadForFrame):
(WebKit::ProvisionalPageProxy::didNavigateWithNavigationData):
(WebKit::ProvisionalPageProxy::didChangeProvisionalURLForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionAsync):
(WebKit::ProvisionalPageProxy::decidePolicyForResponse):
(WebKit::ProvisionalPageProxy::didPerformServerRedirect):
(WebKit::ProvisionalPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::ProvisionalPageProxy::decidePolicyForNavigationActionSync):

12:44 PM Changeset in webkit [244242] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

Unreviewed, try to fix the internal build after r244239

Force the bots to regenerate WKWebpagePreferences.h by touching the file. Adds a Foundation/Foundation.h
import that was missing anyways.

  • UIProcess/API/Cocoa/WKWebpagePreferences.h:
1:54 AM Changeset in webkit [244241] by Tadeu Zagallo
  • 6 edits
    1 add in trunk

CodeCache should check that the UnlinkedCodeBlock was successfully created before caching it
https://bugs.webkit.org/show_bug.cgi?id=196880

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/bytecode-cache-syntax-error.js: Added.

(catch):

Source/JavaScriptCore:

CodeCache should not tell the SourceProvider to cache the bytecode if it failed
to create the UnlinkedCodeBlock.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

Tools:

Add a new function for bytecode cache tests that does not forceDiskCache
for the second run: runBytecodeCacheNoAssetion. This is necessary for the
test added in this patch, since the code is invalid and therefore won't be
cached. It should also be useful for tests that evaluate dynamically
generated code.

  • Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh:
  • Scripts/run-jsc-stress-tests:
1:00 AM Changeset in webkit [244240] by graouts@webkit.org
  • 6 edits in trunk/Source/WebCore

Provide a quirk to disable Pointer Events
https://bugs.webkit.org/show_bug.cgi?id=196877
<rdar://problem/49863470>

Reviewed by Dean Jackson.

Add a quirk to disable Pointer Events. We also opt a website that has compatibility issues with Pointer Events into this new quirk.

  • dom/PointerEvent.idl:
  • page/Quirks.cpp:

(WebCore::Quirks::shouldDisablePointerEventsQuirk const):

  • page/Quirks.h:
  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::absoluteEventTrackingRegionsForFrame const):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::resolveElement):

Apr 12, 2019:

8:54 PM Changeset in webkit [244239] by Wenson Hsieh
  • 13 edits in trunk/Source

Enable modern compatibility mode by default in WKWebView on some devices
https://bugs.webkit.org/show_bug.cgi?id=196883
<rdar://problem/49864527>

Reviewed by Tim Horton.

Source/WebCore:

Add a new helper function to determine whether an app is pre-installed on iOS, for the purposes of ensuring
compatibility with existing Apple apps that are not affected by linked-on-or-after. This involves all apps with
a bundle ID that begins with "com.apple.".

  • platform/RuntimeApplicationChecks.h:
  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::setApplicationBundleIdentifier):
(WebCore::applicationBundleStartsWith):
(WebCore::IOSApplication::isAppleApplication):

Source/WebKit:

Make some minor adjustments to new API.

  • Shared/WebCompatibilityMode.h:

Rename WebCompatibilityMode::Default to WebCompatibilityMode::Recommended.

  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.h:

Now that the role of the UseModernCompatibilityModeByDefault debug preference is limited to bypassing linked-on-
or-after and app bundle compatibility hacks, we no longer make this default to true in iOSMac.

  • UIProcess/API/APIWebsitePolicies.h:
  • UIProcess/API/Cocoa/WKNavigationDelegate.h:

Rename the withPreferences: label to just preferences:.

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

(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):

  • UIProcess/Cocoa/VersionChecks.h:
  • UIProcess/ios/WebPageProxyIOS.mm:
8:04 PM Changeset in webkit [244238] by sbarati@apple.com
  • 7 edits
    1 add in trunk

r244079 logically broke shouldSpeculateInt52
https://bugs.webkit.org/show_bug.cgi?id=196884

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/int52-rand-function.js: Added.

(Math.random):

Source/JavaScriptCore:

In r244079, I changed shouldSpeculateInt52 to only return true
when the prediction is isAnyInt52Speculation(). However, it was
wrong to not to include SpecInt32 in this for two reasons:

  1. We diligently write code that first checks if we should speculate Int32.

For example:
if (shouldSpeculateInt32()) ...
else if (shouldSpeculateInt52()) ...

It would be wrong not to fall back to Int52 if we're dealing with the union of
Int32 and Int52.

It would be a performance mistake to not include Int32 here because
data flow can easily tell us that we have variables that are the union
of Int32 and Int52 values. It's better to speculate Int52 than Double
in that situation.

  1. We also write code where we ask if the inputs can be Int52, e.g, if

we know via profiling that an Add overflows, we may not emit an Int32 add.
However, we only emit such an add if both inputs can be Int52, and Int32
can trivially become Int52.

This patch recovers the 0.5-1% regression r244079 caused on JetStream 2.

  • bytecode/SpeculatedType.h:

(JSC::isInt32SpeculationForArithmetic):
(JSC::isInt32OrBooleanSpeculationForArithmetic):
(JSC::isInt32OrInt52Speculation):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::observeUseKindOnNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::shouldSpeculateInt52):

  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGVariableAccessData.cpp:

(JSC::DFG::VariableAccessData::couldRepresentInt52Impl):

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

Unreviewed. Build fix after r244233.

  • assembler/CPU.cpp:
4:45 PM Changeset in webkit [244236] by BJ Burg
  • 2 edits in trunk/Source/WebKit

WebDriver: fix typo in EnterFullscreen.js in error-handling code
https://bugs.webkit.org/show_bug.cgi?id=196882
<rdar://problem/49867122>

Reviewed by Devin Rousso.

  • UIProcess/Automation/atoms/EnterFullscreen.js:

(enterFullscreen):

4:40 PM Changeset in webkit [244235] by Justin Fan
  • 7 edits in trunk/Source/WebCore

[Web GPU] Prevent narrowing conversions during Metal function calls on 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=196793

Reviewed by Darin Adler.

On 32-bit platforms, NSUInteger is 32-bit, which limits certain Web GPU parameters.
Ensure that valid parameters are properly converted to NSUInteger for Metal calls, regardless of platform.

  • platform/graphics/gpu/GPUBuffer.h:

(WebCore::GPUBuffer::byteLength const):

  • platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm:

(WebCore::tryGetResourceAsBufferBinding):
(WebCore::setBufferOnEncoder):

  • platform/graphics/gpu/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::validateBufferUsage):
(WebCore::GPUBuffer::tryCreate):
(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::setSubData):

  • platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:

(WebCore::GPUCommandBuffer::copyBufferToBuffer):
(WebCore::GPUCommandBuffer::copyBufferToTexture):
(WebCore::GPUCommandBuffer::copyTextureToBuffer):

  • platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:

(WebCore::GPURenderPassEncoder::drawIndexed):

  • platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:

(WebCore::trySetInputStateForPipelineDescriptor):

4:32 PM Changeset in webkit [244234] by Ross Kirsling
  • 4 edits in trunk/Source

Unreviewed fix for non-unified build.

Source/WebCore:

  • dom/ScriptedAnimationController.h:

Add missing include from r244182.

Source/WebKit:

  • Shared/PrintInfo.cpp:

Add missing include from r244202.

4:26 PM Changeset in webkit [244233] by sbarati@apple.com
  • 10 edits
    1 add in trunk/Source

Sometimes we need to user fewer CPUs in our threading calculations
https://bugs.webkit.org/show_bug.cgi?id=196794
<rdar://problem/49389497>

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Sources.txt:
  • assembler/CPU.cpp: Added.

(JSC::isKernTCSMAvailable):
(JSC::enableKernTCSM):
(JSC::kernTCSMAwareNumberOfProcessorCores):

  • assembler/CPU.h:

(JSC::isKernTCSMAvailable):
(JSC::enableKernTCSM):
(JSC::kernTCSMAwareNumberOfProcessorCores):

  • heap/MachineStackMarker.h:

(JSC::MachineThreads::addCurrentThread):

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

  • runtime/Options.cpp:

(JSC::computeNumberOfWorkerThreads):
(JSC::computePriorityDeltaOfWorkerThreads):

  • wasm/WasmWorklist.cpp:

(JSC::Wasm::Worklist::Worklist):

Source/WebKit:

  • WebProcess/com.apple.WebProcess.sb.in:
3:44 PM Changeset in webkit [244232] by Alan Coon
  • 1 copy in tags/Safari-607.2.4

Tag Safari-607.2.4.

3:31 PM Changeset in webkit [244231] by Ross Kirsling
  • 2 edits in trunk/LayoutTests

[WinCairo][WKL] Unreviewed test gardening.

  • platform/wincairo-wk1/TestExpectations:

r244182 causes all animations tests to time out.

1:46 PM Changeset in webkit [244230] by Devin Rousso
  • 2 edits in trunk/Source/WebKit

WebDriver: evaluating javascript shouldn't fail if a dialog is shown
https://bugs.webkit.org/show_bug.cgi?id=196847
<rdar://problem/49609396>

Reviewed by Brian Burg.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::willShowJavaScriptDialog):

1:37 PM Changeset in webkit [244229] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

WebThread should run at a higher priority than user initiated
https://bugs.webkit.org/show_bug.cgi?id=196849
<rdar://problem/46851062>

Reviewed by Geoffrey Garen.

Use QOS_CLASS_USER_INTERACTIVE on WebThread with -10 relative priority so that WebThread
won't wait for other threads with priority 30-37 but does not content with the main thread.

Also removed the call to pthread_attr_setschedparam which disables QoS.

This improves the blocked time in StartWebThread from 2~3ms to 250μs while cold launching
iBooks to an opened book.

  • platform/ios/wak/WebCoreThread.mm:

(StartWebThread): Replaced 200 * 4096 by 800 * KB for a better readability.

11:52 AM Changeset in webkit [244228] by Simon Fraser
  • 28 edits in trunk

[iOS WK2] Make -webkit-overflow-scrolling be a no-op
https://bugs.webkit.org/show_bug.cgi?id=196803
rdar://problem/49078202

Reviewed by Antti Koivisto.

Source/WebKit:

Flip LegacyOverflowScrollingTouchEnabled to false.

  • Shared/WebPreferences.yaml:

LayoutTests:

Rebase some tests, if I thought that non-stacking context overflow was interesting.
For others, make overflow be stacking context by adding z-index.
Add <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> to those that
need it.

  • compositing/overflow/scrolling-content-clip-to-viewport.html:
  • compositing/rtl/rtl-scrolling-with-transformed-descendants.html:
  • fast/scrolling/ios/change-scrollability-on-content-resize-nested.html:
  • fast/scrolling/ios/overflow-scroll-inherited-expected.txt:
  • fast/scrolling/ios/overflow-scrolling-ancestor-clip-size.html:
  • fast/scrolling/ios/overflow-scrolling-ancestor-clip.html:
  • fast/scrolling/ios/reconcile-layer-position-recursive-expected.txt:
  • fast/scrolling/ios/reconcile-layer-position-recursive.html:
  • fast/scrolling/ios/scrolling-content-clip-to-viewport.html:
  • fast/scrolling/ios/subpixel-overflow-scrolling-with-ancestor.html:
  • fast/scrolling/ios/touch-scroll-pointer-events-none.html:
  • fast/scrolling/ios/touch-scroll-visibility-hidden.html:
  • platform/ios/compositing/overflow/scrolling-content-clip-to-viewport-expected.txt:
  • platform/ios/fast/scrolling/ios/scrolling-content-clip-to-viewport-expected.txt:
  • scrollingcoordinator/scrolling-tree/coordinated-frame-gain-scrolling-ancestor.html:
  • scrollingcoordinator/scrolling-tree/coordinated-frame-in-fixed.html:
  • scrollingcoordinator/scrolling-tree/coordinated-frame-lose-scrolling-ancestor.html:
  • scrollingcoordinator/scrolling-tree/coordinated-frame.html:
  • scrollingcoordinator/scrolling-tree/resources/doc-with-sticky.html:
11:34 AM Changeset in webkit [244227] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Unreviewed test gardening for Windows.

  • platform/win/TestExpectations:
11:26 AM Changeset in webkit [244226] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Add CSS Shadow Parts as a feature under consideration
https://bugs.webkit.org/show_bug.cgi?id=196835

Reviewed by Antti Koivisto.

This feature is under consideration.

  • features.json:
11:18 AM Changeset in webkit [244225] by Ross Kirsling
  • 43 edits in trunk/Source

WebKit should build successfully even with -DENABLE_UNIFIED_BUILDS=OFF
https://bugs.webkit.org/show_bug.cgi?id=196845

Reviewed by Ryosuke Niwa.

Source/WebCore:

  • html/canvas/CanvasRenderingContext2DBase.cpp:

(WebCore::CanvasRenderingContext2DBase::FontProxy::initialize):
(WebCore::CanvasRenderingContext2DBase::FontProxy::fontMetrics const):
(WebCore::CanvasRenderingContext2DBase::FontProxy::fontDescription const):
(WebCore::CanvasRenderingContext2DBase::FontProxy::width const):
(WebCore::CanvasRenderingContext2DBase::FontProxy::drawBidiText const):
(WebCore::CanvasRenderingContext2DBase::beginCompositeLayer):
(WebCore::CanvasRenderingContext2DBase::endCompositeLayer):
Remove inline specifier to address linking errors (regardless of CMake platform).
Doing this in a .cpp file interferes with symbol creation.

  • Modules/mediastream/MediaStreamTrack.cpp:
  • Modules/webvr/VREyeParameters.cpp:
  • Modules/webvr/VRFrameData.cpp:
  • Modules/webvr/VRPose.cpp:
  • accessibility/AccessibilityList.cpp:
  • accessibility/isolatedtree/AXIsolatedTree.cpp:
  • accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
  • bindings/js/JSDOMConvertWebGL.cpp:
  • bindings/js/JSHistoryCustom.cpp:
  • bindings/js/JSIDBCursorWithValueCustom.cpp:
  • bindings/js/JSPerformanceObserverCustom.cpp:
  • bindings/js/WindowProxy.cpp:
  • platform/ColorData.gperf:
  • platform/mediastream/RealtimeMediaSourceSettings.cpp:
  • platform/network/DNSResolveQueue.cpp:
  • workers/service/ServiceWorkerClientQueryOptions.h:
  • workers/service/ServiceWorkerContainer.cpp:

Add missing includes to address compiler errors on GTK.

Source/WebKit:

  • NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.h:
  • NetworkProcess/NetworkCORSPreflightChecker.cpp:
  • NetworkProcess/NetworkDataTask.cpp:
  • NetworkProcess/NetworkHTTPSUpgradeChecker.cpp:
  • NetworkProcess/NetworkHTTPSUpgradeChecker.h: Include wtf/Forward.h for String and CompletionHandler fwd decls.
  • NetworkProcess/NetworkProcess.cpp:
  • NetworkProcess/NetworkResourceLoadMap.cpp:
  • NetworkProcess/NetworkResourceLoadMap.h:
  • NetworkProcess/NetworkResourceLoader.cpp:
  • NetworkProcess/PingLoad.h:
  • Shared/WebCompiledContentRuleListData.cpp:
  • Shared/gtk/WebEventFactory.cpp:
  • UIProcess/API/C/WKWebsiteDataStoreRef.cpp:

(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStore):
(WKWebsiteDataStoreStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKWebsiteDataStoreStatisticsResetToConsistentState):

  • UIProcess/Downloads/DownloadProxyMap.cpp:
  • UIProcess/InspectorTargetProxy.cpp:
  • UIProcess/PageClient.h:
  • UIProcess/ProcessAssertion.cpp:
  • UIProcess/ProvisionalPageProxy.h:
  • UIProcess/WebPageInspectorTargetAgent.h:
  • UIProcess/geoclue/GeoclueGeolocationProvider.cpp:
  • WebProcess/Cache/WebCacheStorageConnection.cpp:

(WebKit::WebCacheStorageConnection::updateQuotaBasedOnSpaceUsage):

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

(WKBundleSetDatabaseQuota):

  • WebProcess/Storage/WebServiceWorkerFetchTaskClient.h:

Add missing includes / forward declarations to address compiler errors on GTK / WinCairo.

11:14 AM Changeset in webkit [244224] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

REGRESSION (r244098): [ Mac WK1 ] Layout Test fast/dynamic/paused-event-dispatch.html is Timing out
https://bugs.webkit.org/show_bug.cgi?id=196789
<rdar://problem/49855255>

Reviewed by Tim Horton.

Disable auto-sizing mode at the start of each test.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

11:04 AM Changeset in webkit [244223] by eric.carlson@apple.com
  • 13 edits in trunk

Update AudioSession route sharing policy
https://bugs.webkit.org/show_bug.cgi?id=196776
<rdar://problem/46501611>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, updated an API test.

  • platform/audio/AudioSession.cpp:

(WebCore::convertEnumerationToString):

  • platform/audio/AudioSession.h:

(WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
(WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):

  • platform/audio/cocoa/MediaSessionManagerCocoa.mm:

(MediaSessionManagerCocoa::updateSessionState):

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::routeSharingPolicy const):

  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::setCategory):

Source/WebKit:

  • UIProcess/ios/forms/WKAirPlayRoutePicker.mm:

(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:hasVideo:]):

Source/WTF:

  • wtf/Platform.h: Define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO.

Tools:

  • TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:

(TestWebKitAPI::routeSharingPolicyLongFormVideo):
(TestWebKitAPI::routeSharingPolicyLongFormAudio):
(TestWebKitAPI::TEST):

11:02 AM Changeset in webkit [244222] by rmorisset@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Use padding at end of ArrayBuffer
https://bugs.webkit.org/show_bug.cgi?id=196823

Reviewed by Filip Pizlo.

  • runtime/ArrayBuffer.h:
10:59 AM Changeset in webkit [244221] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

WebsitePolicies doesn't copy its media source policy in WebsitePolicies::copy
https://bugs.webkit.org/show_bug.cgi?id=196862

Reviewed by Darin Adler.

Add a missing bit of code to copy m_mediaSourcePolicy over when making a copy of WebsitePolicies. This doesn't
have any observable effect, since m_mediaSourcePolicy isn't currently exposed as SPI on WKWebpagePreferences.

  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):

10:30 AM Changeset in webkit [244220] by Wenson Hsieh
  • 20 edits in trunk

[iOS] Software keyboard is shown too frequently on some websites
https://bugs.webkit.org/show_bug.cgi?id=195856
<rdar://problem/49191395>

Reviewed by Darin Adler.

Source/WebCore/PAL:

Declare new GraphicsServices SPI.

  • pal/spi/ios/GraphicsServicesSPI.h:

Source/WebKit:

On some websites, hidden editable elements are very frequently focused upon user interaction. Currently, this
causes the software keyboard to pop in and out unexpectedly; luckily, these same sites also apply
inputmode="none" to the hidden editable element, which ought to ensure that the software keyboard doesn't appear
when the element is focused.

However, since we disabled support for inputmode="none" in r240497, the software keyboard is no longer
suppressed, and becomes a big nuissance. r240497 removed support for this feature because, when using a hardware
keyboard, pressing the globe key no longer showed UI for switching languages. However, support for inputmode
none makes a much larger impact when a software keyboard is used (since the entire software keyboard animates in
and out), whereas a hardware keyboard only displays an input accessory view. For this reason, we can mitigate
this bug without reintroducing <rdar://problem/47406553> by re-enabling inputmode="none", but only when a
hardware keyboard is not attached.

  • UIProcess/API/Cocoa/WKWebView.mm:

(hardwareKeyboardAvailabilityChangedCallback):

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView shouldShowAutomaticKeyboardUI]):

Don't show the keyboard if inputmode is none and a hardware keyboard is not attached.

(-[WKContentView _hardwareKeyboardAvailabilityChanged]):

Reload input views if the inputmode is none to ensure that if a hardware keyboard is attached while editing an
element with inputmode="none", we'll show the input accessory view once again.

Tools:

Add support for attaching or detaching the hardware keyboard on iOS in layout tests.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::setHardwareKeyboardAttached):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::UIScriptController::setHardwareKeyboardAttached):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:

Additionally link against GraphicsServices in WebKitTestRunner.

  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):
(WTR::UIScriptController::setHardwareKeyboardAttached):

WebKitLibraries:

Add a symbol for GSEventSetHardwareKeyboardAttached.

  • WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd:

LayoutTests:

Fix a failing layout test, which (among other reasons) is currently failing because support for inputmode="none"
is disabled.

  • fast/forms/ios/inputmode-none-expected.txt:
  • fast/forms/ios/inputmode-none.html:
  • resources/ui-helper.js:

Add a UIHelper method for attaching or detaching the hardware keyboard.

(window.UIHelper.setHardwareKeyboardAttached):
(window.UIHelper):

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

[macOS WK1] ASSERTION FAILED: formData in WebCore::ResourceRequest::doUpdateResourceHTTPBody()
https://bugs.webkit.org/show_bug.cgi?id=196864

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations: Skip test since it consistently crashes, update bug number.
9:52 AM Changeset in webkit [244218] by graouts@webkit.org
  • 13 edits
    1 copy in trunk/Source

Opt some websites into the simulated mouse events dispatch quirk when in modern compatibility mode
https://bugs.webkit.org/show_bug.cgi?id=196830
<rdar://problem/49124313>

Reviewed by Wenson Hsieh.

Source/WebCore:

We add a new policy to determine whether simulated mouse events dispatch are allowed and use it to determine whether the
simulated mouse events dispatch quirk can be used for a given website. We then check the domain name for the current page's
document to see if it matches some known websites that require this quirk.

We needed to add some calls into Quirks::shouldDispatchSimulateMouseEvents() where we used to only consult the RuntimeEnabledFeature
flag to ensure we correctly created touch regions for simulated mouse events.

  • dom/EventNames.h:

(WebCore::EventNames::isTouchRelatedEventType const):

  • dom/Node.cpp:

(WebCore::Node::moveNodeToNewDocument):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
(WebCore::Node::defaultEventHandler):

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::simulatedMouseEventsDispatchPolicy const):
(WebCore::DocumentLoader::setSimulatedMouseEventsDispatchPolicy):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):

  • page/Quirks.cpp:

(WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
(WebCore::Quirks::shouldDispatchSimulateMouseEvents const): Deleted.

  • page/Quirks.h:

Source/WebKit:

We add a new policy to determine whether simulated mouse events dispatch are allowed.

  • Shared/WebsitePoliciesData.cpp:

(WebKit::WebsitePoliciesData::encode const):
(WebKit::WebsitePoliciesData::decode):
(WebKit::WebsitePoliciesData::applyToDocumentLoader):

  • Shared/WebsitePoliciesData.h:
  • Shared/WebsiteSimulatedMouseEventsDispatchPolicy.h: Added.
  • UIProcess/API/APIWebsitePolicies.cpp:

(API::WebsitePolicies::copy const):
(API::WebsitePolicies::data):

  • UIProcess/API/APIWebsitePolicies.h:
  • WebKit.xcodeproj/project.pbxproj:
9:11 AM Changeset in webkit [244217] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

[iOS Sim Debug] ASSERTION FAILED: m_downloads.isEmpty() Layout Test http/tests/websocket/tests/hybi/network-process-crash-error.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=196781
<rdar://problem/49789381>

Reviewed by Darin Adler.

When the network process gets terminated by the client, the NetworkProcessProxy object (and thus its DownloadProxyMap member) get
destroyed right away, before we get a call to didClose(IPC::Connection&). As a result, if there are ongoing downloads at the time
of the termination, we will hit the assertion above. To address the issue, update the NetworkProcessProxy destructor to invalidate
its DownloadProxyMap member, similator to what it does in didClose(IPC::Connection&).

  • UIProcess/Downloads/DownloadProxyMap.cpp:

(WebKit::DownloadProxyMap::invalidate):
(WebKit::DownloadProxyMap::processDidClose): Deleted.

  • UIProcess/Downloads/DownloadProxyMap.h:
  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
(WebKit::NetworkProcessProxy::didClose):

8:54 AM Changeset in webkit [244216] by commit-queue@webkit.org
  • 1 edit
    26 adds in trunk/LayoutTests/imported/w3c

Import WPT preload tests
https://bugs.webkit.org/show_bug.cgi?id=196439

Patch by Rob Buis <rbuis@igalia.com> on 2019-04-12
Reviewed by Youenn Fablet.

  • web-platform-tests/preload/avoid-delaying-onload-link-preload-expected.txt: Added.
  • web-platform-tests/preload/avoid-delaying-onload-link-preload.html: Added.
  • web-platform-tests/preload/delaying-onload-link-preload-after-discovery-expected.txt: Added.
  • web-platform-tests/preload/delaying-onload-link-preload-after-discovery.html: Added.
  • web-platform-tests/preload/dynamic-adding-preload-expected.txt: Added.
  • web-platform-tests/preload/dynamic-adding-preload.html: Added.
  • web-platform-tests/preload/preload-csp.sub-expected.txt: Added.
  • web-platform-tests/preload/preload-csp.sub.html: Added.
  • web-platform-tests/preload/preload-default-csp.sub-expected.txt: Added.
  • web-platform-tests/preload/preload-default-csp.sub.html: Added.
  • web-platform-tests/preload/resources/dummy.css: Added.
  • web-platform-tests/preload/resources/dummy.css.sub.headers: Added.
  • web-platform-tests/preload/resources/dummy.js: Added.
  • web-platform-tests/preload/resources/dummy.js.sub.headers: Added.
  • web-platform-tests/preload/resources/dummy.xml: Added.
  • web-platform-tests/preload/resources/dummy.xml.sub.headers: Added.
  • web-platform-tests/preload/resources/foo.vtt: Added.
  • web-platform-tests/preload/resources/preload_helper.js: Added.

(verifyPreloadAndRTSupport):
(getAbsoluteURL):
(verifyNumberOfResourceTimingEntries):
(verifyLoadedAndNoDoubleDownload):

  • web-platform-tests/preload/resources/sound_5.oga: Added.
  • web-platform-tests/preload/resources/square.png: Added.
  • web-platform-tests/preload/resources/white.mp4: Added.
  • web-platform-tests/preload/single-download-late-used-preload-expected.txt: Added.
  • web-platform-tests/preload/single-download-late-used-preload.html: Added.
  • web-platform-tests/preload/single-download-preload-expected.txt: Added.
  • web-platform-tests/preload/single-download-preload.html: Added.
7:54 AM Changeset in webkit [244215] by Simon Fraser
  • 4 edits
    12 adds in trunk

[iOS WK2] Wrong scrolling behavior for nested absolute position elements inside overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=196146

Reviewed by Antti Koivisto.

Source/WebCore:

computeCoordinatedPositioningForLayer() failed to handle nested positions elements
inside overflow scroll, because it only walked up to the first containing block of
a nested position:absolute. We need to walk all the way up the ancestor layer chain,
looking at containing block, scroller and composited ancestor relationships.

Make this code easier to understand by writing it in terms of "is foo scrolled by bar", rather than
trying to collapse all the logic into a single ancestor walk, which was really hard. This is a few
more ancestor traversals, but we now only run this code if there's composited scrolling
in the ancestor chain.

Tests: scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html

scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html
scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html
scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::enclosingCompositedScrollingLayer):
(WebCore::isScrolledByOverflowScrollLayer):
(WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor):
(WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary):
(WebCore::collectStationaryLayerRelatedOverflowNodes):
(WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
(WebCore::collectRelatedCoordinatedScrollingNodes):
(WebCore::layerParentedAcrossCoordinatedScrollingBoundary): Deleted.

LayoutTests:

Dump the scrolling tree for various configurations of positioned, overflow and stacking context
elements.

  • fast/scrolling/ios/overflow-scroll-overlap-6-expected.txt: Progressed results.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: Added.
  • platform/ios-wk2/scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-absolute-overflow.html: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-overflow.html: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-relative-in-overflow.html: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow-expected.txt: Added.
  • scrollingcoordinator/scrolling-tree/nested-absolute-in-sc-overflow.html: Added.
6:29 AM Changeset in webkit [244214] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[GTK][WPE] Fix pacman install-dependencies packages
https://bugs.webkit.org/show_bug.cgi?id=196817

Patch by Ludovico de Nittis <ludovico.denittis@collabora.com> on 2019-04-12
Reviewed by Žan Doberšek.

python3-setuptools is called python-setuptools
ruby-highline is only available on AUR
libv4l-devel is incorporated in v4l-utils

  • gtk/install-dependencies:
  • wpe/install-dependencies:
5:04 AM Changeset in webkit [244213] by Manuel Rego Casasnovas
  • 17 edits
    2 moves
    13 adds in trunk

[css-flex][css-grid] Fix synthesized baseline
https://bugs.webkit.org/show_bug.cgi?id=196312

Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

Imported some tests from WPT css-align test suite that are fixed with this patch.

  • resources/import-expectations.json:
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001-expected.txt: Added.
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html: Added.
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001-expected.txt: Added.
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html: Added.
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001-expected.txt: Added.
  • web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html: Added.
  • web-platform-tests/css/css-align/baseline-rules/w3c-import.log: Added.

Source/WebCore:

When a flex or grid container has no baseline,
its baseline should be synthesized from the border edges.
The same happens for flex and grid items.

Right now we were using the content box in some cases
and even using the margin box in a particular scenario.
The patch fixes this.

At the same time this is also fixing the baseline for
inline flex/grid containers to make it interoperable with Firefox.
Inline blocks have a special behavior per legacy reasons,
which applies to inline flex/grid containers when they have no items;
otherwise the items should be used to compute its baseline.
See more at: https://github.com/w3c/csswg-drafts/issues/3416

Note that we need to keep current behavior for buttons,
as the flexbox spec doesn't apply to them.

Tests: css3/flexbox/flexbox-baseline-margins.html

fast/css-grid-layout/grid-baseline-margins-1.html
fast/css-grid-layout/grid-baseline-margins-2.html
imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-flexbox-001.html
imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-grid-001.html
imported/w3c/web-platform-tests/css/css-align/baseline-rules/synthesized-baseline-inline-block-001.html

  • rendering/RenderButton.cpp:

(WebCore::synthesizedBaselineFromContentBox):
(WebCore::RenderButton::baselinePosition const):

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

(WebCore::synthesizedBaselineFromBorderBox):
(WebCore::RenderFlexibleBox::baselinePosition const):
(WebCore::RenderFlexibleBox::firstLineBaseline const):
(WebCore::RenderFlexibleBox::inlineBlockBaseline const):

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::baselinePosition const):
(WebCore::RenderGrid::inlineBlockBaseline const):

LayoutTests:

Some of the tests were not checking the right behavior changed them to test the expected one.
We need new rebaselines for some tests.

  • TestExpectations:
  • css3/flexbox/flexbox-baseline-margins.html:
  • fast/css-grid-layout/grid-baseline-expected.html:
  • fast/css-grid-layout/grid-baseline-margins-1-expected.html: Renamed from LayoutTests/fast/css-grid-layout/grid-baseline-margins-expected.html.
  • fast/css-grid-layout/grid-baseline-margins-1.html: Renamed from LayoutTests/fast/css-grid-layout/grid-baseline-margins.html.
  • fast/css-grid-layout/grid-baseline-margins-2-expected.html: Added.
  • fast/css-grid-layout/grid-baseline-margins-2.html: Added.
  • fast/css-grid-layout/grid-baseline.html: This test is modified and split in two parts as it doesn't fit in the viewport.
  • platform/gtk/css3/flexbox/flexbox-baseline-margins-expected.png:
  • platform/gtk/css3/flexbox/flexbox-baseline-margins-expected.txt:
  • platform/ios/css3/flexbox/flexbox-baseline-margins-expected.png: Added.
  • platform/ios/css3/flexbox/flexbox-baseline-margins-expected.txt:
  • platform/mac/css3/flexbox/flexbox-baseline-margins-expected.png: Added.
  • platform/mac/css3/flexbox/flexbox-baseline-margins-expected.txt:
  • platform/win/css3/flexbox/flexbox-baseline-margins-expected.png: Added.
  • platform/win/css3/flexbox/flexbox-baseline-margins-expected.txt:
1:46 AM Changeset in webkit [244212] by Carlos Garcia Campos
  • 11 edits in trunk

[GTK] REGRESSION(r243860): Many tests failing
https://bugs.webkit.org/show_bug.cgi?id=196791

Reviewed by Joanmarie Diggs.

Source/WebKit:

Calling updateAccessibilityTree() on document loaded was causing a re-layout because of the backing store update
that confused all those tests. We shouldn't need to update the accessibility tree on document load, it should
happen automatically when root object is attached/detached. This patch emits children-changed::add when the root
object wrapper is attached and children-changed::remove when the root object is detached. That way ATs are
notified of the changes in the accessibility tree.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Remove call to WebPage::updateAccessibilityTree().

  • WebProcess/WebPage/WebPage.h: Remove updateAccessibilityTree().
  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.cpp:

(coreRootObjectWrapperDetachedCallback): Emit children-changed::remove.
(rootWebAreaWrapper): Helper to get the root WebArea wrapper.
(accessibilityRootObjectWrapper): Set the parent here when root object is created and emit children-changed::add.
(webkitWebPageAccessibilityObjectRefChild): Dot no set the parent here, it's now set when the root object is created.

  • WebProcess/WebPage/atk/WebKitWebPageAccessibilityObject.h: Remove webkitWebPageAccessibilityObjectRefresh().
  • WebProcess/WebPage/gtk/WebPageGtk.cpp:

Tools:

Rework the accessibility unit test to use DBus for the communication with the server. This way we can load
multiple documents and check that accessibility hierarchy is updated after a navigation.

  • TestWebKitAPI/Tests/WebKitGtk/AccessibilityTestServer.cpp:

(loadChangedCallback):

  • TestWebKitAPI/Tests/WebKitGtk/TestWebKitAccessibility.cpp:

(AccessibilityTest::AccessibilityTest):
(AccessibilityTest::~AccessibilityTest):
(AccessibilityTest::loadHTMLAndWaitUntilFinished):
(AccessibilityTest::findTestServerApplication):
(AccessibilityTest::findDocumentWeb):
(AccessibilityTest::findRootObject):
(AccessibilityTest::waitUntilChildrenRemoved):
(AccessibilityTest::ensureProxy):
(testAtspiBasicHierarchy):
(beforeAll):
(afterAll):

LayoutTests:

Remove expectations for tests that pass now.

  • platform/gtk/TestExpectations:
Note: See TracTimeline for information about the timeline view.